Search is not available for this dataset
text
string
meta
dict
{-# OPTIONS --without-K --exact-split --safe #-} open import Fragment.Algebra.Signature module Fragment.Algebra.Free.Monad (Σ : Signature) where open import Fragment.Algebra.Free.Base Σ open import Fragment.Algebra.Algebra Σ open import Fragment.Algebra.Homomorphism Σ using (_⟿_; Congruent; Homomorphic) open import Fragment.Setoid.Morphism open import Level using (Level) open import Data.Vec using (Vec; []; _∷_; map) open import Data.Vec.Relation.Binary.Pointwise.Inductive using (Pointwise; []; _∷_) open import Relation.Binary using (Setoid) private variable a b ℓ₁ ℓ₂ : Level unit : ∀ {S : Setoid a ℓ₁} → S ↝ Herbrand S unit = record { ∣_∣ = atom ; ∣_∣-cong = atom } module _ {A : Setoid a ℓ₁} {B : Setoid b ℓ₂} (f : A ↝ Herbrand B) where private open Setoid ∥ Free B ∥/≈ module _ {A : Set a} {B : Set b} where mutual map-∣bind∣ : ∀ {n} → (A → Term B) → Vec (Term A) n → Vec (Term B) n map-∣bind∣ f [] = [] map-∣bind∣ f (x ∷ xs) = ∣bind∣ f x ∷ map-∣bind∣ f xs ∣bind∣ : (A → Term B) → Term A → Term B ∣bind∣ f (atom x) = f x ∣bind∣ f (term op xs) = term op (map-∣bind∣ f xs) mutual map-∣bind∣-cong : ∀ {n} {xs ys : Vec ∥ Free A ∥ n} → Pointwise (_~_ A) xs ys → Pointwise (_~_ B) (map-∣bind∣ ∣ f ∣ xs) (map-∣bind∣ ∣ f ∣ ys) map-∣bind∣-cong [] = [] map-∣bind∣-cong (p ∷ ps) = ∣bind∣-cong p ∷ map-∣bind∣-cong ps ∣bind∣-cong : Congruent (_~_ A) (_~_ B) (∣bind∣ ∣ f ∣) ∣bind∣-cong (atom p) = ∣ f ∣-cong p ∣bind∣-cong {x = term op _} (term p) = term (map-∣bind∣-cong p) map-∣bind∣≡map : ∀ {n} {xs : Vec ∥ Free A ∥ n} → Pointwise (_~_ B) (map-∣bind∣ ∣ f ∣ xs) (map (∣bind∣ ∣ f ∣) xs) map-∣bind∣≡map {xs = []} = [] map-∣bind∣≡map {xs = x ∷ xs} = refl ∷ map-∣bind∣≡map ∣bind∣-hom : Homomorphic (Free A) (Free B) (∣bind∣ ∣ f ∣) ∣bind∣-hom op [] = refl ∣bind∣-hom op (x ∷ xs) = sym (term (map-∣bind∣≡map {xs = x ∷ xs})) ∣bind∣⃗ : Herbrand A ↝ Herbrand B ∣bind∣⃗ = record { ∣_∣ = ∣bind∣ ∣ f ∣ ; ∣_∣-cong = ∣bind∣-cong } bind : Free A ⟿ Free B bind = record { ∣_∣⃗ = ∣bind∣⃗ ; ∣_∣-hom = ∣bind∣-hom } fmap : ∀ {A : Setoid a ℓ₁} {B : Setoid b ℓ₂} → A ↝ B → Free A ⟿ Free B fmap f = bind (unit · f) join : ∀ {A : Setoid a ℓ₁} → Free (Herbrand A) ⟿ Free A join = bind id
{ "alphanum_fraction": 0.4813432836, "avg_line_length": 29.7777777778, "ext": "agda", "hexsha": "5f9ea7ae695c3395fae12d622c09530fd70d39fe", "lang": "Agda", "max_forks_count": 3, "max_forks_repo_forks_event_max_datetime": "2021-06-16T08:04:31.000Z", "max_forks_repo_forks_event_min_datetime": "2021-06-15T15:34:50.000Z", "max_forks_repo_head_hexsha": "f2a6b1cf4bc95214bd075a155012f84c593b9496", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "yallop/agda-fragment", "max_forks_repo_path": "src/Fragment/Algebra/Free/Monad.agda", "max_issues_count": 1, "max_issues_repo_head_hexsha": "f2a6b1cf4bc95214bd075a155012f84c593b9496", "max_issues_repo_issues_event_max_datetime": "2021-06-16T10:24:15.000Z", "max_issues_repo_issues_event_min_datetime": "2021-06-16T09:44:31.000Z", "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "yallop/agda-fragment", "max_issues_repo_path": "src/Fragment/Algebra/Free/Monad.agda", "max_line_length": 79, "max_stars_count": 18, "max_stars_repo_head_hexsha": "f2a6b1cf4bc95214bd075a155012f84c593b9496", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "yallop/agda-fragment", "max_stars_repo_path": "src/Fragment/Algebra/Free/Monad.agda", "max_stars_repo_stars_event_max_datetime": "2022-01-17T17:26:09.000Z", "max_stars_repo_stars_event_min_datetime": "2021-06-15T15:45:39.000Z", "num_tokens": 1071, "size": 2680 }
module Star where open import Prelude infixr 40 _•_ _++_ infixl 30 _on_ infixr 20 _==>_ _=[_]=>_ data Star {X : Set} (R : Rel X) : Rel X where ε : {x : X} -> Star R x x _•_ : {x y z : X} -> R x y -> Star R y z -> Star R x z _++_ : {X : Set}{R : Rel X}{x y z : X} -> Star R x y -> Star R y z -> Star R x z ε ++ ys = ys (x • xs) ++ ys = x • (xs ++ ys) _==>_ : {X : Set} -> Rel X -> Rel X -> Set R ==> S = forall {a b} -> R a b -> S a b _on_ : {X Y : Set} -> (R : Rel X) -> (f : Y -> X) -> Rel Y R on f = \a b -> R (f a) (f b) _=[_]=>_ : {X Y : Set} (R : Rel X) (f : X -> Y) (S : Rel Y) -> Set R =[ f ]=> S = R ==> S on f return : {X : Set}{R : Rel X} -> R ==> Star R return x = x • ε module JoinMap where join : {X : Set}{R : Rel X} -> Star (Star R) ==> Star R join ε = ε join (xs • xss) = xs ++ join xss map : forall {X Y R S} -> (f : X -> Y) -> R =[ f ]=> S -> Star R =[ f ]=> Star S map f pm ε = ε map f pm (x • xs) = pm x • map f pm xs bind : forall {X Y R S} -> (f : X -> Y) -> R =[ f ]=> Star S -> Star R =[ f ]=> Star S bind f k m = join (map f k m) bind : forall {X Y R S} -> (f : X -> Y) -> R =[ f ]=> Star S -> Star R =[ f ]=> Star S bind f k ε = ε bind f k (x • xs) = k x ++ bind f k xs join : {X : Set}{R : Rel X} -> Star (Star R) ==> Star R join = bind id id map : forall {X Y R S} -> (f : X -> Y) -> R =[ f ]=> S -> Star R =[ f ]=> Star S map f k = bind f (return · k) -- Generic length length : {X : Set}{R : Rel X} -> Star R =[ ! ]=> Star One length = map ! ! -- Reverse _op : {X : Set} -> Rel X -> Rel X (R op) a b = R b a reverse : {X : Set}{R : Rel X}{a b : X} -> Star R a b -> Star (R op) b a reverse {X}{R} xs = rev xs ε where rev : forall {a b c} -> Star R a b -> Star (R op) a c -> Star (R op) b c rev ε ys = ys rev (x • xs) ys = rev xs (x • ys)
{ "alphanum_fraction": 0.4307213285, "avg_line_length": 25.6933333333, "ext": "agda", "hexsha": "6518817969fd73cd3c8843c4ecb4ed30d5d9c4d6", "lang": "Agda", "max_forks_count": 371, "max_forks_repo_forks_event_max_datetime": "2022-03-30T19:00:30.000Z", "max_forks_repo_forks_event_min_datetime": "2015-01-03T14:04:08.000Z", "max_forks_repo_head_hexsha": "7f58030124fa99dfbf8db376659416f3ad8384de", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "cruhland/agda", "max_forks_repo_path": "examples/AIM6/Path/Star.agda", "max_issues_count": 4066, "max_issues_repo_head_hexsha": "7f58030124fa99dfbf8db376659416f3ad8384de", "max_issues_repo_issues_event_max_datetime": "2022-03-31T21:14:49.000Z", "max_issues_repo_issues_event_min_datetime": "2015-01-10T11:24:51.000Z", "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "cruhland/agda", "max_issues_repo_path": "examples/AIM6/Path/Star.agda", "max_line_length": 72, "max_stars_count": 1989, "max_stars_repo_head_hexsha": "7f58030124fa99dfbf8db376659416f3ad8384de", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "cruhland/agda", "max_stars_repo_path": "examples/AIM6/Path/Star.agda", "max_stars_repo_stars_event_max_datetime": "2022-03-30T18:20:48.000Z", "max_stars_repo_stars_event_min_datetime": "2015-01-09T23:51:16.000Z", "num_tokens": 790, "size": 1927 }
{-# OPTIONS --copatterns #-} module MixingCoPatternsAndCoConstructors where data ℕ : Set where zero : ℕ suc : (n : ℕ) → ℕ module MStream where record Stream (A : Set) : Set where coinductive constructor _∷_ field head : A tail : Stream A open Stream weird : (n : ℕ) → Stream ℕ head (weird zero) = zero tail (weird zero) = weird zero head (weird (suc n)) = n tail (weird (suc n)) = tail (weird n) weird' : (n : ℕ) → Stream ℕ head (weird' zero) = zero tail (weird' zero) = weird' zero weird' (suc n) = n ∷ tail (weird' n) -- BAD: weird'' : (n : ℕ) → Stream ℕ weird'' zero = zero ∷ weird'' zero weird'' (suc n) = n ∷ tail (weird'' n) -- productive, but not strongly normalizing, -- should be rejected by termination checker: repeat : {A : Set}(a : A) → Stream A head (repeat a) = a tail (repeat a) = a ∷ tail (repeat a) module Coinduction where import Common.Level open import Common.Coinduction record Stream (A : Set) : Set where inductive constructor _∷_ field head : A tail : ∞ (Stream A) open Stream weird'' : (n : ℕ) → Stream ℕ weird'' zero = zero ∷ (♯ weird'' zero) weird'' (suc n) = n ∷ tail (weird'' n) module CoList where mutual data CoList (A : Set) : Set where [] : CoList A _∷_ : (x : A)(xs : CoList∞ A) → CoList A record CoList∞ (A : Set) : Set where coinductive constructor delay field force : CoList A open CoList∞ downFrom : (n : ℕ) → CoList ℕ downFrom zero = [] downFrom (suc n) = n ∷ delay (downFrom n) down : (n : ℕ) → CoList∞ ℕ force (down zero) = [] force (down (suc n)) = n ∷ delay (force (down n)) -- weird detour: delay (force ... to test termination checker
{ "alphanum_fraction": 0.5760445682, "avg_line_length": 21.1176470588, "ext": "agda", "hexsha": "2e39fc626a82d8dac3141c46911332825172e90a", "lang": "Agda", "max_forks_count": 1, "max_forks_repo_forks_event_max_datetime": "2019-03-05T20:02:38.000Z", "max_forks_repo_forks_event_min_datetime": "2019-03-05T20:02:38.000Z", "max_forks_repo_head_hexsha": "6043e77e4a72518711f5f808fb4eb593cbf0bb7c", "max_forks_repo_licenses": [ "BSD-3-Clause" ], "max_forks_repo_name": "alhassy/agda", "max_forks_repo_path": "test/Fail/MixingCoPatternsAndCoConstructors.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "6043e77e4a72518711f5f808fb4eb593cbf0bb7c", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "BSD-3-Clause" ], "max_issues_repo_name": "alhassy/agda", "max_issues_repo_path": "test/Fail/MixingCoPatternsAndCoConstructors.agda", "max_line_length": 65, "max_stars_count": 3, "max_stars_repo_head_hexsha": "6043e77e4a72518711f5f808fb4eb593cbf0bb7c", "max_stars_repo_licenses": [ "BSD-3-Clause" ], "max_stars_repo_name": "alhassy/agda", "max_stars_repo_path": "test/Fail/MixingCoPatternsAndCoConstructors.agda", "max_stars_repo_stars_event_max_datetime": "2015-12-07T20:14:00.000Z", "max_stars_repo_stars_event_min_datetime": "2015-03-28T14:51:03.000Z", "num_tokens": 617, "size": 1795 }
module cws where open import lib open import cws-types public ---------------------------------------------------------------------------------- -- Run-rewriting rules ---------------------------------------------------------------------------------- data gratr2-nt : Set where _ws-plus-67 : gratr2-nt _ws : gratr2-nt _start : gratr2-nt _posinfo : gratr2-nt _otherpunct-bar-58 : gratr2-nt _otherpunct-bar-57 : gratr2-nt _otherpunct-bar-56 : gratr2-nt _otherpunct-bar-55 : gratr2-nt _otherpunct-bar-54 : gratr2-nt _otherpunct-bar-53 : gratr2-nt _otherpunct-bar-52 : gratr2-nt _otherpunct-bar-51 : gratr2-nt _otherpunct-bar-50 : gratr2-nt _otherpunct-bar-49 : gratr2-nt _otherpunct-bar-48 : gratr2-nt _otherpunct-bar-47 : gratr2-nt _otherpunct-bar-46 : gratr2-nt _otherpunct-bar-45 : gratr2-nt _otherpunct-bar-44 : gratr2-nt _otherpunct-bar-43 : gratr2-nt _otherpunct-bar-42 : gratr2-nt _otherpunct-bar-41 : gratr2-nt _otherpunct-bar-40 : gratr2-nt _otherpunct-bar-39 : gratr2-nt _otherpunct-bar-38 : gratr2-nt _otherpunct-bar-37 : gratr2-nt _otherpunct-bar-36 : gratr2-nt _otherpunct-bar-35 : gratr2-nt _otherpunct-bar-34 : gratr2-nt _otherpunct-bar-33 : gratr2-nt _otherpunct-bar-32 : gratr2-nt _otherpunct-bar-31 : gratr2-nt _otherpunct-bar-30 : gratr2-nt _otherpunct-bar-29 : gratr2-nt _otherpunct-bar-28 : gratr2-nt _otherpunct-bar-27 : gratr2-nt _otherpunct-bar-26 : gratr2-nt _otherpunct-bar-25 : gratr2-nt _otherpunct-bar-24 : gratr2-nt _otherpunct-bar-23 : gratr2-nt _otherpunct-bar-22 : gratr2-nt _otherpunct-bar-21 : gratr2-nt _otherpunct-bar-20 : gratr2-nt _otherpunct-bar-19 : gratr2-nt _otherpunct-bar-18 : gratr2-nt _otherpunct-bar-17 : gratr2-nt _otherpunct-bar-16 : gratr2-nt _otherpunct-bar-15 : gratr2-nt _otherpunct-bar-14 : gratr2-nt _otherpunct-bar-13 : gratr2-nt _otherpunct-bar-12 : gratr2-nt _otherpunct : gratr2-nt _numpunct-bar-9 : gratr2-nt _numpunct-bar-8 : gratr2-nt _numpunct-bar-7 : gratr2-nt _numpunct-bar-6 : gratr2-nt _numpunct-bar-11 : gratr2-nt _numpunct-bar-10 : gratr2-nt _numpunct : gratr2-nt _numone-range-4 : gratr2-nt _numone : gratr2-nt _num-plus-5 : gratr2-nt _num : gratr2-nt _nonws-plus-70 : gratr2-nt _nonws : gratr2-nt _entity : gratr2-nt _entities : gratr2-nt _comment-star-64 : gratr2-nt _comment : gratr2-nt _aws-bar-66 : gratr2-nt _aws-bar-65 : gratr2-nt _aws : gratr2-nt _anynonwschar-bar-69 : gratr2-nt _anynonwschar-bar-68 : gratr2-nt _anynonwschar : gratr2-nt _anychar-bar-63 : gratr2-nt _anychar-bar-62 : gratr2-nt _anychar-bar-61 : gratr2-nt _anychar-bar-60 : gratr2-nt _anychar-bar-59 : gratr2-nt _anychar : gratr2-nt _alpha-range-2 : gratr2-nt _alpha-range-1 : gratr2-nt _alpha-bar-3 : gratr2-nt _alpha : gratr2-nt gratr2-nt-eq : gratr2-nt → gratr2-nt → 𝔹 gratr2-nt-eq _ws-plus-67 _ws-plus-67 = tt gratr2-nt-eq _ws _ws = tt gratr2-nt-eq _start _start = tt gratr2-nt-eq _posinfo _posinfo = tt gratr2-nt-eq _otherpunct-bar-58 _otherpunct-bar-58 = tt gratr2-nt-eq _otherpunct-bar-57 _otherpunct-bar-57 = tt gratr2-nt-eq _otherpunct-bar-56 _otherpunct-bar-56 = tt gratr2-nt-eq _otherpunct-bar-55 _otherpunct-bar-55 = tt gratr2-nt-eq _otherpunct-bar-54 _otherpunct-bar-54 = tt gratr2-nt-eq _otherpunct-bar-53 _otherpunct-bar-53 = tt gratr2-nt-eq _otherpunct-bar-52 _otherpunct-bar-52 = tt gratr2-nt-eq _otherpunct-bar-51 _otherpunct-bar-51 = tt gratr2-nt-eq _otherpunct-bar-50 _otherpunct-bar-50 = tt gratr2-nt-eq _otherpunct-bar-49 _otherpunct-bar-49 = tt gratr2-nt-eq _otherpunct-bar-48 _otherpunct-bar-48 = tt gratr2-nt-eq _otherpunct-bar-47 _otherpunct-bar-47 = tt gratr2-nt-eq _otherpunct-bar-46 _otherpunct-bar-46 = tt gratr2-nt-eq _otherpunct-bar-45 _otherpunct-bar-45 = tt gratr2-nt-eq _otherpunct-bar-44 _otherpunct-bar-44 = tt gratr2-nt-eq _otherpunct-bar-43 _otherpunct-bar-43 = tt gratr2-nt-eq _otherpunct-bar-42 _otherpunct-bar-42 = tt gratr2-nt-eq _otherpunct-bar-41 _otherpunct-bar-41 = tt gratr2-nt-eq _otherpunct-bar-40 _otherpunct-bar-40 = tt gratr2-nt-eq _otherpunct-bar-39 _otherpunct-bar-39 = tt gratr2-nt-eq _otherpunct-bar-38 _otherpunct-bar-38 = tt gratr2-nt-eq _otherpunct-bar-37 _otherpunct-bar-37 = tt gratr2-nt-eq _otherpunct-bar-36 _otherpunct-bar-36 = tt gratr2-nt-eq _otherpunct-bar-35 _otherpunct-bar-35 = tt gratr2-nt-eq _otherpunct-bar-34 _otherpunct-bar-34 = tt gratr2-nt-eq _otherpunct-bar-33 _otherpunct-bar-33 = tt gratr2-nt-eq _otherpunct-bar-32 _otherpunct-bar-32 = tt gratr2-nt-eq _otherpunct-bar-31 _otherpunct-bar-31 = tt gratr2-nt-eq _otherpunct-bar-30 _otherpunct-bar-30 = tt gratr2-nt-eq _otherpunct-bar-29 _otherpunct-bar-29 = tt gratr2-nt-eq _otherpunct-bar-28 _otherpunct-bar-28 = tt gratr2-nt-eq _otherpunct-bar-27 _otherpunct-bar-27 = tt gratr2-nt-eq _otherpunct-bar-26 _otherpunct-bar-26 = tt gratr2-nt-eq _otherpunct-bar-25 _otherpunct-bar-25 = tt gratr2-nt-eq _otherpunct-bar-24 _otherpunct-bar-24 = tt gratr2-nt-eq _otherpunct-bar-23 _otherpunct-bar-23 = tt gratr2-nt-eq _otherpunct-bar-22 _otherpunct-bar-22 = tt gratr2-nt-eq _otherpunct-bar-21 _otherpunct-bar-21 = tt gratr2-nt-eq _otherpunct-bar-20 _otherpunct-bar-20 = tt gratr2-nt-eq _otherpunct-bar-19 _otherpunct-bar-19 = tt gratr2-nt-eq _otherpunct-bar-18 _otherpunct-bar-18 = tt gratr2-nt-eq _otherpunct-bar-17 _otherpunct-bar-17 = tt gratr2-nt-eq _otherpunct-bar-16 _otherpunct-bar-16 = tt gratr2-nt-eq _otherpunct-bar-15 _otherpunct-bar-15 = tt gratr2-nt-eq _otherpunct-bar-14 _otherpunct-bar-14 = tt gratr2-nt-eq _otherpunct-bar-13 _otherpunct-bar-13 = tt gratr2-nt-eq _otherpunct-bar-12 _otherpunct-bar-12 = tt gratr2-nt-eq _otherpunct _otherpunct = tt gratr2-nt-eq _numpunct-bar-9 _numpunct-bar-9 = tt gratr2-nt-eq _numpunct-bar-8 _numpunct-bar-8 = tt gratr2-nt-eq _numpunct-bar-7 _numpunct-bar-7 = tt gratr2-nt-eq _numpunct-bar-6 _numpunct-bar-6 = tt gratr2-nt-eq _numpunct-bar-11 _numpunct-bar-11 = tt gratr2-nt-eq _numpunct-bar-10 _numpunct-bar-10 = tt gratr2-nt-eq _numpunct _numpunct = tt gratr2-nt-eq _numone-range-4 _numone-range-4 = tt gratr2-nt-eq _numone _numone = tt gratr2-nt-eq _num-plus-5 _num-plus-5 = tt gratr2-nt-eq _num _num = tt gratr2-nt-eq _nonws-plus-70 _nonws-plus-70 = tt gratr2-nt-eq _nonws _nonws = tt gratr2-nt-eq _entity _entity = tt gratr2-nt-eq _entities _entities = tt gratr2-nt-eq _comment-star-64 _comment-star-64 = tt gratr2-nt-eq _comment _comment = tt gratr2-nt-eq _aws-bar-66 _aws-bar-66 = tt gratr2-nt-eq _aws-bar-65 _aws-bar-65 = tt gratr2-nt-eq _aws _aws = tt gratr2-nt-eq _anynonwschar-bar-69 _anynonwschar-bar-69 = tt gratr2-nt-eq _anynonwschar-bar-68 _anynonwschar-bar-68 = tt gratr2-nt-eq _anynonwschar _anynonwschar = tt gratr2-nt-eq _anychar-bar-63 _anychar-bar-63 = tt gratr2-nt-eq _anychar-bar-62 _anychar-bar-62 = tt gratr2-nt-eq _anychar-bar-61 _anychar-bar-61 = tt gratr2-nt-eq _anychar-bar-60 _anychar-bar-60 = tt gratr2-nt-eq _anychar-bar-59 _anychar-bar-59 = tt gratr2-nt-eq _anychar _anychar = tt gratr2-nt-eq _alpha-range-2 _alpha-range-2 = tt gratr2-nt-eq _alpha-range-1 _alpha-range-1 = tt gratr2-nt-eq _alpha-bar-3 _alpha-bar-3 = tt gratr2-nt-eq _alpha _alpha = tt gratr2-nt-eq _ _ = ff open import rtn gratr2-nt cws-start : gratr2-nt → 𝕃 gratr2-rule cws-start _ws-plus-67 = (just "P197" , nothing , just _ws-plus-67 , inj₁ _aws :: inj₁ _ws-plus-67 :: []) :: (just "P196" , nothing , just _ws-plus-67 , inj₁ _aws :: []) :: [] cws-start _ws = (just "P198" , nothing , just _ws , inj₁ _ws-plus-67 :: []) :: [] cws-start _start = (just "File" , nothing , just _start , inj₁ _entities :: []) :: [] cws-start _posinfo = (just "Posinfo" , nothing , just _posinfo , []) :: [] cws-start _otherpunct-bar-58 = (just "P175" , nothing , just _otherpunct-bar-58 , inj₁ _otherpunct-bar-57 :: []) :: (just "P174" , nothing , just _otherpunct-bar-58 , inj₂ '|' :: []) :: [] cws-start _otherpunct-bar-57 = (just "P173" , nothing , just _otherpunct-bar-57 , inj₁ _otherpunct-bar-56 :: []) :: (just "P172" , nothing , just _otherpunct-bar-57 , inj₂ '□' :: []) :: [] cws-start _otherpunct-bar-56 = (just "P171" , nothing , just _otherpunct-bar-56 , inj₁ _otherpunct-bar-55 :: []) :: (just "P170" , nothing , just _otherpunct-bar-56 , inj₂ 'Π' :: []) :: [] cws-start _otherpunct-bar-55 = (just "P169" , nothing , just _otherpunct-bar-55 , inj₁ _otherpunct-bar-54 :: []) :: (just "P168" , nothing , just _otherpunct-bar-55 , inj₂ 'ι' :: []) :: [] cws-start _otherpunct-bar-54 = (just "P167" , nothing , just _otherpunct-bar-54 , inj₁ _otherpunct-bar-53 :: []) :: (just "P166" , nothing , just _otherpunct-bar-54 , inj₂ 'λ' :: []) :: [] cws-start _otherpunct-bar-53 = (just "P165" , nothing , just _otherpunct-bar-53 , inj₁ _otherpunct-bar-52 :: []) :: (just "P164" , nothing , just _otherpunct-bar-53 , inj₂ '∀' :: []) :: [] cws-start _otherpunct-bar-52 = (just "P163" , nothing , just _otherpunct-bar-52 , inj₁ _otherpunct-bar-51 :: []) :: (just "P162" , nothing , just _otherpunct-bar-52 , inj₂ 'π' :: []) :: [] cws-start _otherpunct-bar-51 = (just "P161" , nothing , just _otherpunct-bar-51 , inj₁ _otherpunct-bar-50 :: []) :: (just "P160" , nothing , just _otherpunct-bar-51 , inj₂ '★' :: []) :: [] cws-start _otherpunct-bar-50 = (just "P159" , nothing , just _otherpunct-bar-50 , inj₁ _otherpunct-bar-49 :: []) :: (just "P158" , nothing , just _otherpunct-bar-50 , inj₂ '☆' :: []) :: [] cws-start _otherpunct-bar-49 = (just "P157" , nothing , just _otherpunct-bar-49 , inj₁ _otherpunct-bar-48 :: []) :: (just "P156" , nothing , just _otherpunct-bar-49 , inj₂ '·' :: []) :: [] cws-start _otherpunct-bar-48 = (just "P155" , nothing , just _otherpunct-bar-48 , inj₁ _otherpunct-bar-47 :: []) :: (just "P154" , nothing , just _otherpunct-bar-48 , inj₂ '⇐' :: []) :: [] cws-start _otherpunct-bar-47 = (just "P153" , nothing , just _otherpunct-bar-47 , inj₁ _otherpunct-bar-46 :: []) :: (just "P152" , nothing , just _otherpunct-bar-47 , inj₂ '➔' :: []) :: [] cws-start _otherpunct-bar-46 = (just "P151" , nothing , just _otherpunct-bar-46 , inj₁ _otherpunct-bar-45 :: []) :: (just "P150" , nothing , just _otherpunct-bar-46 , inj₂ '➾' :: []) :: [] cws-start _otherpunct-bar-45 = (just "P149" , nothing , just _otherpunct-bar-45 , inj₁ _otherpunct-bar-44 :: []) :: (just "P148" , nothing , just _otherpunct-bar-45 , inj₂ '↑' :: []) :: [] cws-start _otherpunct-bar-44 = (just "P147" , nothing , just _otherpunct-bar-44 , inj₁ _otherpunct-bar-43 :: []) :: (just "P146" , nothing , just _otherpunct-bar-44 , inj₂ '●' :: []) :: [] cws-start _otherpunct-bar-43 = (just "P145" , nothing , just _otherpunct-bar-43 , inj₁ _otherpunct-bar-42 :: []) :: (just "P144" , nothing , just _otherpunct-bar-43 , inj₂ '(' :: []) :: [] cws-start _otherpunct-bar-42 = (just "P143" , nothing , just _otherpunct-bar-42 , inj₁ _otherpunct-bar-41 :: []) :: (just "P142" , nothing , just _otherpunct-bar-42 , inj₂ ')' :: []) :: [] cws-start _otherpunct-bar-41 = (just "P141" , nothing , just _otherpunct-bar-41 , inj₁ _otherpunct-bar-40 :: []) :: (just "P140" , nothing , just _otherpunct-bar-41 , inj₂ ':' :: []) :: [] cws-start _otherpunct-bar-40 = (just "P139" , nothing , just _otherpunct-bar-40 , inj₁ _otherpunct-bar-39 :: []) :: (just "P138" , nothing , just _otherpunct-bar-40 , inj₂ '.' :: []) :: [] cws-start _otherpunct-bar-39 = (just "P137" , nothing , just _otherpunct-bar-39 , inj₁ _otherpunct-bar-38 :: []) :: (just "P136" , nothing , just _otherpunct-bar-39 , inj₂ '[' :: []) :: [] cws-start _otherpunct-bar-38 = (just "P135" , nothing , just _otherpunct-bar-38 , inj₁ _otherpunct-bar-37 :: []) :: (just "P134" , nothing , just _otherpunct-bar-38 , inj₂ ']' :: []) :: [] cws-start _otherpunct-bar-37 = (just "P133" , nothing , just _otherpunct-bar-37 , inj₁ _otherpunct-bar-36 :: []) :: (just "P132" , nothing , just _otherpunct-bar-37 , inj₂ ',' :: []) :: [] cws-start _otherpunct-bar-36 = (just "P131" , nothing , just _otherpunct-bar-36 , inj₁ _otherpunct-bar-35 :: []) :: (just "P130" , nothing , just _otherpunct-bar-36 , inj₂ '!' :: []) :: [] cws-start _otherpunct-bar-35 = (just "P129" , nothing , just _otherpunct-bar-35 , inj₁ _otherpunct-bar-34 :: []) :: (just "P128" , nothing , just _otherpunct-bar-35 , inj₂ '{' :: []) :: [] cws-start _otherpunct-bar-34 = (just "P127" , nothing , just _otherpunct-bar-34 , inj₁ _otherpunct-bar-33 :: []) :: (just "P126" , nothing , just _otherpunct-bar-34 , inj₂ '}' :: []) :: [] cws-start _otherpunct-bar-33 = (just "P125" , nothing , just _otherpunct-bar-33 , inj₁ _otherpunct-bar-32 :: []) :: (just "P124" , nothing , just _otherpunct-bar-33 , inj₂ '⇒' :: []) :: [] cws-start _otherpunct-bar-32 = (just "P123" , nothing , just _otherpunct-bar-32 , inj₁ _otherpunct-bar-31 :: []) :: (just "P122" , nothing , just _otherpunct-bar-32 , inj₂ '?' :: []) :: [] cws-start _otherpunct-bar-31 = (just "P121" , nothing , just _otherpunct-bar-31 , inj₁ _otherpunct-bar-30 :: []) :: (just "P120" , nothing , just _otherpunct-bar-31 , inj₂ 'Λ' :: []) :: [] cws-start _otherpunct-bar-30 = (just "P119" , nothing , just _otherpunct-bar-30 , inj₁ _otherpunct-bar-29 :: []) :: (just "P118" , nothing , just _otherpunct-bar-30 , inj₂ 'ρ' :: []) :: [] cws-start _otherpunct-bar-29 = (just "P117" , nothing , just _otherpunct-bar-29 , inj₁ _otherpunct-bar-28 :: []) :: (just "P116" , nothing , just _otherpunct-bar-29 , inj₂ 'ε' :: []) :: [] cws-start _otherpunct-bar-28 = (just "P115" , nothing , just _otherpunct-bar-28 , inj₁ _otherpunct-bar-27 :: []) :: (just "P114" , nothing , just _otherpunct-bar-28 , inj₂ 'β' :: []) :: [] cws-start _otherpunct-bar-27 = (just "P113" , nothing , just _otherpunct-bar-27 , inj₁ _otherpunct-bar-26 :: []) :: (just "P112" , nothing , just _otherpunct-bar-27 , inj₂ '-' :: []) :: [] cws-start _otherpunct-bar-26 = (just "P111" , nothing , just _otherpunct-bar-26 , inj₁ _otherpunct-bar-25 :: []) :: (just "P110" , nothing , just _otherpunct-bar-26 , inj₂ '𝒌' :: []) :: [] cws-start _otherpunct-bar-25 = (just "P109" , nothing , just _otherpunct-bar-25 , inj₁ _otherpunct-bar-24 :: []) :: (just "P108" , nothing , just _otherpunct-bar-25 , inj₂ '=' :: []) :: [] cws-start _otherpunct-bar-24 = (just "P107" , nothing , just _otherpunct-bar-24 , inj₁ _otherpunct-bar-23 :: []) :: (just "P106" , nothing , just _otherpunct-bar-24 , inj₂ 'ς' :: []) :: [] cws-start _otherpunct-bar-23 = (just "P105" , nothing , just _otherpunct-bar-23 , inj₁ _otherpunct-bar-22 :: []) :: (just "P104" , nothing , just _otherpunct-bar-23 , inj₂ 'θ' :: []) :: [] cws-start _otherpunct-bar-22 = (just "P103" , nothing , just _otherpunct-bar-22 , inj₁ _otherpunct-bar-21 :: []) :: (just "P102" , nothing , just _otherpunct-bar-22 , inj₂ '+' :: []) :: [] cws-start _otherpunct-bar-21 = (just "P101" , nothing , just _otherpunct-bar-21 , inj₁ _otherpunct-bar-20 :: []) :: (just "P100" , nothing , just _otherpunct-bar-21 , inj₂ '<' :: []) :: [] cws-start _otherpunct-bar-20 = (just "P99" , nothing , just _otherpunct-bar-20 , inj₁ _otherpunct-bar-19 :: []) :: (just "P98" , nothing , just _otherpunct-bar-20 , inj₂ '>' :: []) :: [] cws-start _otherpunct-bar-19 = (just "P97" , nothing , just _otherpunct-bar-19 , inj₁ _otherpunct-bar-18 :: []) :: (just "P96" , nothing , just _otherpunct-bar-19 , inj₂ '≃' :: []) :: [] cws-start _otherpunct-bar-18 = (just "P95" , nothing , just _otherpunct-bar-18 , inj₁ _otherpunct-bar-17 :: []) :: (just "P94" , nothing , just _otherpunct-bar-18 , inj₂ '\"' :: []) :: [] cws-start _otherpunct-bar-17 = (just "P93" , nothing , just _otherpunct-bar-17 , inj₁ _otherpunct-bar-16 :: []) :: (just "P92" , nothing , just _otherpunct-bar-17 , inj₂ 'δ' :: []) :: [] cws-start _otherpunct-bar-16 = (just "P91" , nothing , just _otherpunct-bar-16 , inj₁ _otherpunct-bar-15 :: []) :: (just "P90" , nothing , just _otherpunct-bar-16 , inj₂ 'χ' :: []) :: [] cws-start _otherpunct-bar-15 = (just "P89" , nothing , just _otherpunct-bar-15 , inj₁ _otherpunct-bar-14 :: []) :: (just "P88" , nothing , just _otherpunct-bar-15 , inj₂ 'μ' :: []) :: [] cws-start _otherpunct-bar-14 = (just "P87" , nothing , just _otherpunct-bar-14 , inj₁ _otherpunct-bar-13 :: []) :: (just "P86" , nothing , just _otherpunct-bar-14 , inj₂ 'υ' :: []) :: [] cws-start _otherpunct-bar-13 = (just "P85" , nothing , just _otherpunct-bar-13 , inj₁ _otherpunct-bar-12 :: []) :: (just "P84" , nothing , just _otherpunct-bar-13 , inj₂ 'φ' :: []) :: [] cws-start _otherpunct-bar-12 = (just "P83" , nothing , just _otherpunct-bar-12 , inj₂ 'ω' :: []) :: (just "P82" , nothing , just _otherpunct-bar-12 , inj₂ '◂' :: []) :: [] cws-start _otherpunct = (just "P176" , nothing , just _otherpunct , inj₁ _otherpunct-bar-58 :: []) :: [] cws-start _numpunct-bar-9 = (just "P76" , nothing , just _numpunct-bar-9 , inj₁ _numpunct-bar-8 :: []) :: (just "P75" , nothing , just _numpunct-bar-9 , inj₂ '-' :: []) :: [] cws-start _numpunct-bar-8 = (just "P74" , nothing , just _numpunct-bar-8 , inj₁ _numpunct-bar-7 :: []) :: (just "P73" , nothing , just _numpunct-bar-8 , inj₂ '~' :: []) :: [] cws-start _numpunct-bar-7 = (just "P72" , nothing , just _numpunct-bar-7 , inj₁ _numpunct-bar-6 :: []) :: (just "P71" , nothing , just _numpunct-bar-7 , inj₂ '#' :: []) :: [] cws-start _numpunct-bar-6 = (just "P70" , nothing , just _numpunct-bar-6 , inj₂ '/' :: []) :: (just "P69" , nothing , just _numpunct-bar-6 , inj₂ '_' :: []) :: [] cws-start _numpunct-bar-11 = (just "P80" , nothing , just _numpunct-bar-11 , inj₁ _numpunct-bar-10 :: []) :: (just "P79" , nothing , just _numpunct-bar-11 , inj₁ _numone :: []) :: [] cws-start _numpunct-bar-10 = (just "P78" , nothing , just _numpunct-bar-10 , inj₁ _numpunct-bar-9 :: []) :: (just "P77" , nothing , just _numpunct-bar-10 , inj₂ '\'' :: []) :: [] cws-start _numpunct = (just "P81" , nothing , just _numpunct , inj₁ _numpunct-bar-11 :: []) :: [] cws-start _numone-range-4 = (just "P64" , nothing , just _numone-range-4 , inj₂ '9' :: []) :: (just "P63" , nothing , just _numone-range-4 , inj₂ '8' :: []) :: (just "P62" , nothing , just _numone-range-4 , inj₂ '7' :: []) :: (just "P61" , nothing , just _numone-range-4 , inj₂ '6' :: []) :: (just "P60" , nothing , just _numone-range-4 , inj₂ '5' :: []) :: (just "P59" , nothing , just _numone-range-4 , inj₂ '4' :: []) :: (just "P58" , nothing , just _numone-range-4 , inj₂ '3' :: []) :: (just "P57" , nothing , just _numone-range-4 , inj₂ '2' :: []) :: (just "P56" , nothing , just _numone-range-4 , inj₂ '1' :: []) :: (just "P55" , nothing , just _numone-range-4 , inj₂ '0' :: []) :: [] cws-start _numone = (just "P65" , nothing , just _numone , inj₁ _numone-range-4 :: []) :: [] cws-start _num-plus-5 = (just "P67" , nothing , just _num-plus-5 , inj₁ _numone :: inj₁ _num-plus-5 :: []) :: (just "P66" , nothing , just _num-plus-5 , inj₁ _numone :: []) :: [] cws-start _num = (just "P68" , nothing , just _num , inj₁ _num-plus-5 :: []) :: [] cws-start _nonws-plus-70 = (just "P205" , nothing , just _nonws-plus-70 , inj₁ _anynonwschar :: inj₁ _nonws-plus-70 :: []) :: (just "P204" , nothing , just _nonws-plus-70 , inj₁ _anynonwschar :: []) :: [] cws-start _nonws = (just "P206" , nothing , just _nonws , inj₁ _nonws-plus-70 :: []) :: [] cws-start _entity = (just "EntityWs" , nothing , just _entity , inj₁ _posinfo :: inj₁ _ws :: inj₁ _posinfo :: []) :: (just "EntityNonws" , nothing , just _entity , inj₁ _nonws :: []) :: (just "EntityComment" , nothing , just _entity , inj₁ _posinfo :: inj₁ _comment :: inj₁ _posinfo :: []) :: [] cws-start _entities = (just "Entity" , nothing , just _entities , inj₁ _entity :: inj₁ _entities :: []) :: (just "EndEntity" , nothing , just _entities , []) :: [] cws-start _comment-star-64 = (just "P189" , nothing , just _comment-star-64 , inj₁ _anychar :: inj₁ _comment-star-64 :: []) :: (just "P188" , nothing , just _comment-star-64 , []) :: [] cws-start _comment = (just "P190" , nothing , just _comment , inj₂ '%' :: inj₁ _comment-star-64 :: inj₂ '\n' :: []) :: [] cws-start _aws-bar-66 = (just "P194" , nothing , just _aws-bar-66 , inj₁ _aws-bar-65 :: []) :: (just "P193" , nothing , just _aws-bar-66 , inj₂ '\n' :: []) :: [] cws-start _aws-bar-65 = (just "P192" , nothing , just _aws-bar-65 , inj₂ ' ' :: []) :: (just "P191" , nothing , just _aws-bar-65 , inj₂ '\t' :: []) :: [] cws-start _aws = (just "P195" , nothing , just _aws , inj₁ _aws-bar-66 :: []) :: [] cws-start _anynonwschar-bar-69 = (just "P202" , nothing , just _anynonwschar-bar-69 , inj₁ _anynonwschar-bar-68 :: []) :: (just "P201" , nothing , just _anynonwschar-bar-69 , inj₁ _alpha :: []) :: [] cws-start _anynonwschar-bar-68 = (just "P200" , nothing , just _anynonwschar-bar-68 , inj₁ _otherpunct :: []) :: (just "P199" , nothing , just _anynonwschar-bar-68 , inj₁ _numpunct :: []) :: [] cws-start _anynonwschar = (just "P203" , nothing , just _anynonwschar , inj₁ _anynonwschar-bar-69 :: []) :: [] cws-start _anychar-bar-63 = (just "P186" , nothing , just _anychar-bar-63 , inj₁ _anychar-bar-62 :: []) :: (just "P185" , nothing , just _anychar-bar-63 , inj₁ _alpha :: []) :: [] cws-start _anychar-bar-62 = (just "P184" , nothing , just _anychar-bar-62 , inj₁ _anychar-bar-61 :: []) :: (just "P183" , nothing , just _anychar-bar-62 , inj₁ _numpunct :: []) :: [] cws-start _anychar-bar-61 = (just "P182" , nothing , just _anychar-bar-61 , inj₁ _anychar-bar-60 :: []) :: (just "P181" , nothing , just _anychar-bar-61 , inj₂ '\t' :: []) :: [] cws-start _anychar-bar-60 = (just "P180" , nothing , just _anychar-bar-60 , inj₁ _anychar-bar-59 :: []) :: (just "P179" , nothing , just _anychar-bar-60 , inj₂ ' ' :: []) :: [] cws-start _anychar-bar-59 = (just "P178" , nothing , just _anychar-bar-59 , inj₁ _otherpunct :: []) :: (just "P177" , nothing , just _anychar-bar-59 , inj₂ '%' :: []) :: [] cws-start _anychar = (just "P187" , nothing , just _anychar , inj₁ _anychar-bar-63 :: []) :: [] cws-start _alpha-range-2 = (just "P51" , nothing , just _alpha-range-2 , inj₂ 'Z' :: []) :: (just "P50" , nothing , just _alpha-range-2 , inj₂ 'Y' :: []) :: (just "P49" , nothing , just _alpha-range-2 , inj₂ 'X' :: []) :: (just "P48" , nothing , just _alpha-range-2 , inj₂ 'W' :: []) :: (just "P47" , nothing , just _alpha-range-2 , inj₂ 'V' :: []) :: (just "P46" , nothing , just _alpha-range-2 , inj₂ 'U' :: []) :: (just "P45" , nothing , just _alpha-range-2 , inj₂ 'T' :: []) :: (just "P44" , nothing , just _alpha-range-2 , inj₂ 'S' :: []) :: (just "P43" , nothing , just _alpha-range-2 , inj₂ 'R' :: []) :: (just "P42" , nothing , just _alpha-range-2 , inj₂ 'Q' :: []) :: (just "P41" , nothing , just _alpha-range-2 , inj₂ 'P' :: []) :: (just "P40" , nothing , just _alpha-range-2 , inj₂ 'O' :: []) :: (just "P39" , nothing , just _alpha-range-2 , inj₂ 'N' :: []) :: (just "P38" , nothing , just _alpha-range-2 , inj₂ 'M' :: []) :: (just "P37" , nothing , just _alpha-range-2 , inj₂ 'L' :: []) :: (just "P36" , nothing , just _alpha-range-2 , inj₂ 'K' :: []) :: (just "P35" , nothing , just _alpha-range-2 , inj₂ 'J' :: []) :: (just "P34" , nothing , just _alpha-range-2 , inj₂ 'I' :: []) :: (just "P33" , nothing , just _alpha-range-2 , inj₂ 'H' :: []) :: (just "P32" , nothing , just _alpha-range-2 , inj₂ 'G' :: []) :: (just "P31" , nothing , just _alpha-range-2 , inj₂ 'F' :: []) :: (just "P30" , nothing , just _alpha-range-2 , inj₂ 'E' :: []) :: (just "P29" , nothing , just _alpha-range-2 , inj₂ 'D' :: []) :: (just "P28" , nothing , just _alpha-range-2 , inj₂ 'C' :: []) :: (just "P27" , nothing , just _alpha-range-2 , inj₂ 'B' :: []) :: (just "P26" , nothing , just _alpha-range-2 , inj₂ 'A' :: []) :: [] cws-start _alpha-range-1 = (just "P9" , nothing , just _alpha-range-1 , inj₂ 'j' :: []) :: (just "P8" , nothing , just _alpha-range-1 , inj₂ 'i' :: []) :: (just "P7" , nothing , just _alpha-range-1 , inj₂ 'h' :: []) :: (just "P6" , nothing , just _alpha-range-1 , inj₂ 'g' :: []) :: (just "P5" , nothing , just _alpha-range-1 , inj₂ 'f' :: []) :: (just "P4" , nothing , just _alpha-range-1 , inj₂ 'e' :: []) :: (just "P3" , nothing , just _alpha-range-1 , inj₂ 'd' :: []) :: (just "P25" , nothing , just _alpha-range-1 , inj₂ 'z' :: []) :: (just "P24" , nothing , just _alpha-range-1 , inj₂ 'y' :: []) :: (just "P23" , nothing , just _alpha-range-1 , inj₂ 'x' :: []) :: (just "P22" , nothing , just _alpha-range-1 , inj₂ 'w' :: []) :: (just "P21" , nothing , just _alpha-range-1 , inj₂ 'v' :: []) :: (just "P20" , nothing , just _alpha-range-1 , inj₂ 'u' :: []) :: (just "P2" , nothing , just _alpha-range-1 , inj₂ 'c' :: []) :: (just "P19" , nothing , just _alpha-range-1 , inj₂ 't' :: []) :: (just "P18" , nothing , just _alpha-range-1 , inj₂ 's' :: []) :: (just "P17" , nothing , just _alpha-range-1 , inj₂ 'r' :: []) :: (just "P16" , nothing , just _alpha-range-1 , inj₂ 'q' :: []) :: (just "P15" , nothing , just _alpha-range-1 , inj₂ 'p' :: []) :: (just "P14" , nothing , just _alpha-range-1 , inj₂ 'o' :: []) :: (just "P13" , nothing , just _alpha-range-1 , inj₂ 'n' :: []) :: (just "P12" , nothing , just _alpha-range-1 , inj₂ 'm' :: []) :: (just "P11" , nothing , just _alpha-range-1 , inj₂ 'l' :: []) :: (just "P10" , nothing , just _alpha-range-1 , inj₂ 'k' :: []) :: (just "P1" , nothing , just _alpha-range-1 , inj₂ 'b' :: []) :: (just "P0" , nothing , just _alpha-range-1 , inj₂ 'a' :: []) :: [] cws-start _alpha-bar-3 = (just "P53" , nothing , just _alpha-bar-3 , inj₁ _alpha-range-2 :: []) :: (just "P52" , nothing , just _alpha-bar-3 , inj₁ _alpha-range-1 :: []) :: [] cws-start _alpha = (just "P54" , nothing , just _alpha , inj₁ _alpha-bar-3 :: []) :: [] cws-return : maybe gratr2-nt → 𝕃 gratr2-rule cws-return _ = [] cws-rtn : gratr2-rtn cws-rtn = record { start = _start ; _eq_ = gratr2-nt-eq ; gratr2-start = cws-start ; gratr2-return = cws-return } open import run ptr open noderiv ------------------------------------------ -- Length-decreasing rules ------------------------------------------ len-dec-rewrite : Run → maybe (Run × ℕ) len-dec-rewrite {- Entity-} ((Id "Entity") :: (ParseTree (parsed-entity x0)) :: _::_(ParseTree (parsed-entities x1)) rest) = just (ParseTree (parsed-entities (norm-entities (Entity x0 x1))) ::' rest , 3) len-dec-rewrite {- EntityComment-} ((Id "EntityComment") :: (ParseTree (parsed-posinfo x0)) :: (ParseTree parsed-comment) :: _::_(ParseTree (parsed-posinfo x1)) rest) = just (ParseTree (parsed-entity (norm-entity (EntityComment x0 x1))) ::' rest , 4) len-dec-rewrite {- EntityNonws-} ((Id "EntityNonws") :: _::_(ParseTree parsed-nonws) rest) = just (ParseTree (parsed-entity (norm-entity EntityNonws)) ::' rest , 2) len-dec-rewrite {- EntityWs-} ((Id "EntityWs") :: (ParseTree (parsed-posinfo x0)) :: (ParseTree parsed-ws) :: _::_(ParseTree (parsed-posinfo x1)) rest) = just (ParseTree (parsed-entity (norm-entity (EntityWs x0 x1))) ::' rest , 4) len-dec-rewrite {- File-} ((Id "File") :: _::_(ParseTree (parsed-entities x0)) rest) = just (ParseTree (parsed-start (norm-start (File x0))) ::' rest , 2) len-dec-rewrite {- P0-} ((Id "P0") :: _::_(InputChar 'a') rest) = just (ParseTree parsed-alpha-range-1 ::' rest , 2) len-dec-rewrite {- P1-} ((Id "P1") :: _::_(InputChar 'b') rest) = just (ParseTree parsed-alpha-range-1 ::' rest , 2) len-dec-rewrite {- P10-} ((Id "P10") :: _::_(InputChar 'k') rest) = just (ParseTree parsed-alpha-range-1 ::' rest , 2) len-dec-rewrite {- P100-} ((Id "P100") :: _::_(InputChar '<') rest) = just (ParseTree parsed-otherpunct-bar-21 ::' rest , 2) len-dec-rewrite {- P101-} ((Id "P101") :: _::_(ParseTree parsed-otherpunct-bar-20) rest) = just (ParseTree parsed-otherpunct-bar-21 ::' rest , 2) len-dec-rewrite {- P102-} ((Id "P102") :: _::_(InputChar '+') rest) = just (ParseTree parsed-otherpunct-bar-22 ::' rest , 2) len-dec-rewrite {- P103-} ((Id "P103") :: _::_(ParseTree parsed-otherpunct-bar-21) rest) = just (ParseTree parsed-otherpunct-bar-22 ::' rest , 2) len-dec-rewrite {- P104-} ((Id "P104") :: _::_(InputChar 'θ') rest) = just (ParseTree parsed-otherpunct-bar-23 ::' rest , 2) len-dec-rewrite {- P105-} ((Id "P105") :: _::_(ParseTree parsed-otherpunct-bar-22) rest) = just (ParseTree parsed-otherpunct-bar-23 ::' rest , 2) len-dec-rewrite {- P106-} ((Id "P106") :: _::_(InputChar 'ς') rest) = just (ParseTree parsed-otherpunct-bar-24 ::' rest , 2) len-dec-rewrite {- P107-} ((Id "P107") :: _::_(ParseTree parsed-otherpunct-bar-23) rest) = just (ParseTree parsed-otherpunct-bar-24 ::' rest , 2) len-dec-rewrite {- P108-} ((Id "P108") :: _::_(InputChar '=') rest) = just (ParseTree parsed-otherpunct-bar-25 ::' rest , 2) len-dec-rewrite {- P109-} ((Id "P109") :: _::_(ParseTree parsed-otherpunct-bar-24) rest) = just (ParseTree parsed-otherpunct-bar-25 ::' rest , 2) len-dec-rewrite {- P11-} ((Id "P11") :: _::_(InputChar 'l') rest) = just (ParseTree parsed-alpha-range-1 ::' rest , 2) len-dec-rewrite {- P110-} ((Id "P110") :: _::_(InputChar '𝒌') rest) = just (ParseTree parsed-otherpunct-bar-26 ::' rest , 2) len-dec-rewrite {- P111-} ((Id "P111") :: _::_(ParseTree parsed-otherpunct-bar-25) rest) = just (ParseTree parsed-otherpunct-bar-26 ::' rest , 2) len-dec-rewrite {- P112-} ((Id "P112") :: _::_(InputChar '-') rest) = just (ParseTree parsed-otherpunct-bar-27 ::' rest , 2) len-dec-rewrite {- P113-} ((Id "P113") :: _::_(ParseTree parsed-otherpunct-bar-26) rest) = just (ParseTree parsed-otherpunct-bar-27 ::' rest , 2) len-dec-rewrite {- P114-} ((Id "P114") :: _::_(InputChar 'β') rest) = just (ParseTree parsed-otherpunct-bar-28 ::' rest , 2) len-dec-rewrite {- P115-} ((Id "P115") :: _::_(ParseTree parsed-otherpunct-bar-27) rest) = just (ParseTree parsed-otherpunct-bar-28 ::' rest , 2) len-dec-rewrite {- P116-} ((Id "P116") :: _::_(InputChar 'ε') rest) = just (ParseTree parsed-otherpunct-bar-29 ::' rest , 2) len-dec-rewrite {- P117-} ((Id "P117") :: _::_(ParseTree parsed-otherpunct-bar-28) rest) = just (ParseTree parsed-otherpunct-bar-29 ::' rest , 2) len-dec-rewrite {- P118-} ((Id "P118") :: _::_(InputChar 'ρ') rest) = just (ParseTree parsed-otherpunct-bar-30 ::' rest , 2) len-dec-rewrite {- P119-} ((Id "P119") :: _::_(ParseTree parsed-otherpunct-bar-29) rest) = just (ParseTree parsed-otherpunct-bar-30 ::' rest , 2) len-dec-rewrite {- P12-} ((Id "P12") :: _::_(InputChar 'm') rest) = just (ParseTree parsed-alpha-range-1 ::' rest , 2) len-dec-rewrite {- P120-} ((Id "P120") :: _::_(InputChar 'Λ') rest) = just (ParseTree parsed-otherpunct-bar-31 ::' rest , 2) len-dec-rewrite {- P121-} ((Id "P121") :: _::_(ParseTree parsed-otherpunct-bar-30) rest) = just (ParseTree parsed-otherpunct-bar-31 ::' rest , 2) len-dec-rewrite {- P122-} ((Id "P122") :: _::_(InputChar '?') rest) = just (ParseTree parsed-otherpunct-bar-32 ::' rest , 2) len-dec-rewrite {- P123-} ((Id "P123") :: _::_(ParseTree parsed-otherpunct-bar-31) rest) = just (ParseTree parsed-otherpunct-bar-32 ::' rest , 2) len-dec-rewrite {- P124-} ((Id "P124") :: _::_(InputChar '⇒') rest) = just (ParseTree parsed-otherpunct-bar-33 ::' rest , 2) len-dec-rewrite {- P125-} ((Id "P125") :: _::_(ParseTree parsed-otherpunct-bar-32) rest) = just (ParseTree parsed-otherpunct-bar-33 ::' rest , 2) len-dec-rewrite {- P126-} ((Id "P126") :: _::_(InputChar '}') rest) = just (ParseTree parsed-otherpunct-bar-34 ::' rest , 2) len-dec-rewrite {- P127-} ((Id "P127") :: _::_(ParseTree parsed-otherpunct-bar-33) rest) = just (ParseTree parsed-otherpunct-bar-34 ::' rest , 2) len-dec-rewrite {- P128-} ((Id "P128") :: _::_(InputChar '{') rest) = just (ParseTree parsed-otherpunct-bar-35 ::' rest , 2) len-dec-rewrite {- P129-} ((Id "P129") :: _::_(ParseTree parsed-otherpunct-bar-34) rest) = just (ParseTree parsed-otherpunct-bar-35 ::' rest , 2) len-dec-rewrite {- P13-} ((Id "P13") :: _::_(InputChar 'n') rest) = just (ParseTree parsed-alpha-range-1 ::' rest , 2) len-dec-rewrite {- P130-} ((Id "P130") :: _::_(InputChar '!') rest) = just (ParseTree parsed-otherpunct-bar-36 ::' rest , 2) len-dec-rewrite {- P131-} ((Id "P131") :: _::_(ParseTree parsed-otherpunct-bar-35) rest) = just (ParseTree parsed-otherpunct-bar-36 ::' rest , 2) len-dec-rewrite {- P132-} ((Id "P132") :: _::_(InputChar ',') rest) = just (ParseTree parsed-otherpunct-bar-37 ::' rest , 2) len-dec-rewrite {- P133-} ((Id "P133") :: _::_(ParseTree parsed-otherpunct-bar-36) rest) = just (ParseTree parsed-otherpunct-bar-37 ::' rest , 2) len-dec-rewrite {- P134-} ((Id "P134") :: _::_(InputChar ']') rest) = just (ParseTree parsed-otherpunct-bar-38 ::' rest , 2) len-dec-rewrite {- P135-} ((Id "P135") :: _::_(ParseTree parsed-otherpunct-bar-37) rest) = just (ParseTree parsed-otherpunct-bar-38 ::' rest , 2) len-dec-rewrite {- P136-} ((Id "P136") :: _::_(InputChar '[') rest) = just (ParseTree parsed-otherpunct-bar-39 ::' rest , 2) len-dec-rewrite {- P137-} ((Id "P137") :: _::_(ParseTree parsed-otherpunct-bar-38) rest) = just (ParseTree parsed-otherpunct-bar-39 ::' rest , 2) len-dec-rewrite {- P138-} ((Id "P138") :: _::_(InputChar '.') rest) = just (ParseTree parsed-otherpunct-bar-40 ::' rest , 2) len-dec-rewrite {- P139-} ((Id "P139") :: _::_(ParseTree parsed-otherpunct-bar-39) rest) = just (ParseTree parsed-otherpunct-bar-40 ::' rest , 2) len-dec-rewrite {- P14-} ((Id "P14") :: _::_(InputChar 'o') rest) = just (ParseTree parsed-alpha-range-1 ::' rest , 2) len-dec-rewrite {- P140-} ((Id "P140") :: _::_(InputChar ':') rest) = just (ParseTree parsed-otherpunct-bar-41 ::' rest , 2) len-dec-rewrite {- P141-} ((Id "P141") :: _::_(ParseTree parsed-otherpunct-bar-40) rest) = just (ParseTree parsed-otherpunct-bar-41 ::' rest , 2) len-dec-rewrite {- P142-} ((Id "P142") :: _::_(InputChar ')') rest) = just (ParseTree parsed-otherpunct-bar-42 ::' rest , 2) len-dec-rewrite {- P143-} ((Id "P143") :: _::_(ParseTree parsed-otherpunct-bar-41) rest) = just (ParseTree parsed-otherpunct-bar-42 ::' rest , 2) len-dec-rewrite {- P144-} ((Id "P144") :: _::_(InputChar '(') rest) = just (ParseTree parsed-otherpunct-bar-43 ::' rest , 2) len-dec-rewrite {- P145-} ((Id "P145") :: _::_(ParseTree parsed-otherpunct-bar-42) rest) = just (ParseTree parsed-otherpunct-bar-43 ::' rest , 2) len-dec-rewrite {- P146-} ((Id "P146") :: _::_(InputChar '●') rest) = just (ParseTree parsed-otherpunct-bar-44 ::' rest , 2) len-dec-rewrite {- P147-} ((Id "P147") :: _::_(ParseTree parsed-otherpunct-bar-43) rest) = just (ParseTree parsed-otherpunct-bar-44 ::' rest , 2) len-dec-rewrite {- P148-} ((Id "P148") :: _::_(InputChar '↑') rest) = just (ParseTree parsed-otherpunct-bar-45 ::' rest , 2) len-dec-rewrite {- P149-} ((Id "P149") :: _::_(ParseTree parsed-otherpunct-bar-44) rest) = just (ParseTree parsed-otherpunct-bar-45 ::' rest , 2) len-dec-rewrite {- P15-} ((Id "P15") :: _::_(InputChar 'p') rest) = just (ParseTree parsed-alpha-range-1 ::' rest , 2) len-dec-rewrite {- P150-} ((Id "P150") :: _::_(InputChar '➾') rest) = just (ParseTree parsed-otherpunct-bar-46 ::' rest , 2) len-dec-rewrite {- P151-} ((Id "P151") :: _::_(ParseTree parsed-otherpunct-bar-45) rest) = just (ParseTree parsed-otherpunct-bar-46 ::' rest , 2) len-dec-rewrite {- P152-} ((Id "P152") :: _::_(InputChar '➔') rest) = just (ParseTree parsed-otherpunct-bar-47 ::' rest , 2) len-dec-rewrite {- P153-} ((Id "P153") :: _::_(ParseTree parsed-otherpunct-bar-46) rest) = just (ParseTree parsed-otherpunct-bar-47 ::' rest , 2) len-dec-rewrite {- P154-} ((Id "P154") :: _::_(InputChar '⇐') rest) = just (ParseTree parsed-otherpunct-bar-48 ::' rest , 2) len-dec-rewrite {- P155-} ((Id "P155") :: _::_(ParseTree parsed-otherpunct-bar-47) rest) = just (ParseTree parsed-otherpunct-bar-48 ::' rest , 2) len-dec-rewrite {- P156-} ((Id "P156") :: _::_(InputChar '·') rest) = just (ParseTree parsed-otherpunct-bar-49 ::' rest , 2) len-dec-rewrite {- P157-} ((Id "P157") :: _::_(ParseTree parsed-otherpunct-bar-48) rest) = just (ParseTree parsed-otherpunct-bar-49 ::' rest , 2) len-dec-rewrite {- P158-} ((Id "P158") :: _::_(InputChar '☆') rest) = just (ParseTree parsed-otherpunct-bar-50 ::' rest , 2) len-dec-rewrite {- P159-} ((Id "P159") :: _::_(ParseTree parsed-otherpunct-bar-49) rest) = just (ParseTree parsed-otherpunct-bar-50 ::' rest , 2) len-dec-rewrite {- P16-} ((Id "P16") :: _::_(InputChar 'q') rest) = just (ParseTree parsed-alpha-range-1 ::' rest , 2) len-dec-rewrite {- P160-} ((Id "P160") :: _::_(InputChar '★') rest) = just (ParseTree parsed-otherpunct-bar-51 ::' rest , 2) len-dec-rewrite {- P161-} ((Id "P161") :: _::_(ParseTree parsed-otherpunct-bar-50) rest) = just (ParseTree parsed-otherpunct-bar-51 ::' rest , 2) len-dec-rewrite {- P162-} ((Id "P162") :: _::_(InputChar 'π') rest) = just (ParseTree parsed-otherpunct-bar-52 ::' rest , 2) len-dec-rewrite {- P163-} ((Id "P163") :: _::_(ParseTree parsed-otherpunct-bar-51) rest) = just (ParseTree parsed-otherpunct-bar-52 ::' rest , 2) len-dec-rewrite {- P164-} ((Id "P164") :: _::_(InputChar '∀') rest) = just (ParseTree parsed-otherpunct-bar-53 ::' rest , 2) len-dec-rewrite {- P165-} ((Id "P165") :: _::_(ParseTree parsed-otherpunct-bar-52) rest) = just (ParseTree parsed-otherpunct-bar-53 ::' rest , 2) len-dec-rewrite {- P166-} ((Id "P166") :: _::_(InputChar 'λ') rest) = just (ParseTree parsed-otherpunct-bar-54 ::' rest , 2) len-dec-rewrite {- P167-} ((Id "P167") :: _::_(ParseTree parsed-otherpunct-bar-53) rest) = just (ParseTree parsed-otherpunct-bar-54 ::' rest , 2) len-dec-rewrite {- P168-} ((Id "P168") :: _::_(InputChar 'ι') rest) = just (ParseTree parsed-otherpunct-bar-55 ::' rest , 2) len-dec-rewrite {- P169-} ((Id "P169") :: _::_(ParseTree parsed-otherpunct-bar-54) rest) = just (ParseTree parsed-otherpunct-bar-55 ::' rest , 2) len-dec-rewrite {- P17-} ((Id "P17") :: _::_(InputChar 'r') rest) = just (ParseTree parsed-alpha-range-1 ::' rest , 2) len-dec-rewrite {- P170-} ((Id "P170") :: _::_(InputChar 'Π') rest) = just (ParseTree parsed-otherpunct-bar-56 ::' rest , 2) len-dec-rewrite {- P171-} ((Id "P171") :: _::_(ParseTree parsed-otherpunct-bar-55) rest) = just (ParseTree parsed-otherpunct-bar-56 ::' rest , 2) len-dec-rewrite {- P172-} ((Id "P172") :: _::_(InputChar '□') rest) = just (ParseTree parsed-otherpunct-bar-57 ::' rest , 2) len-dec-rewrite {- P173-} ((Id "P173") :: _::_(ParseTree parsed-otherpunct-bar-56) rest) = just (ParseTree parsed-otherpunct-bar-57 ::' rest , 2) len-dec-rewrite {- P174-} ((Id "P174") :: _::_(InputChar '|') rest) = just (ParseTree parsed-otherpunct-bar-58 ::' rest , 2) len-dec-rewrite {- P175-} ((Id "P175") :: _::_(ParseTree parsed-otherpunct-bar-57) rest) = just (ParseTree parsed-otherpunct-bar-58 ::' rest , 2) len-dec-rewrite {- P176-} ((Id "P176") :: _::_(ParseTree parsed-otherpunct-bar-58) rest) = just (ParseTree parsed-otherpunct ::' rest , 2) len-dec-rewrite {- P177-} ((Id "P177") :: _::_(InputChar '%') rest) = just (ParseTree parsed-anychar-bar-59 ::' rest , 2) len-dec-rewrite {- P178-} ((Id "P178") :: _::_(ParseTree parsed-otherpunct) rest) = just (ParseTree parsed-anychar-bar-59 ::' rest , 2) len-dec-rewrite {- P179-} ((Id "P179") :: _::_(InputChar ' ') rest) = just (ParseTree parsed-anychar-bar-60 ::' rest , 2) len-dec-rewrite {- P18-} ((Id "P18") :: _::_(InputChar 's') rest) = just (ParseTree parsed-alpha-range-1 ::' rest , 2) len-dec-rewrite {- P180-} ((Id "P180") :: _::_(ParseTree parsed-anychar-bar-59) rest) = just (ParseTree parsed-anychar-bar-60 ::' rest , 2) len-dec-rewrite {- P181-} ((Id "P181") :: _::_(InputChar '\t') rest) = just (ParseTree parsed-anychar-bar-61 ::' rest , 2) len-dec-rewrite {- P182-} ((Id "P182") :: _::_(ParseTree parsed-anychar-bar-60) rest) = just (ParseTree parsed-anychar-bar-61 ::' rest , 2) len-dec-rewrite {- P183-} ((Id "P183") :: _::_(ParseTree parsed-numpunct) rest) = just (ParseTree parsed-anychar-bar-62 ::' rest , 2) len-dec-rewrite {- P184-} ((Id "P184") :: _::_(ParseTree parsed-anychar-bar-61) rest) = just (ParseTree parsed-anychar-bar-62 ::' rest , 2) len-dec-rewrite {- P185-} ((Id "P185") :: _::_(ParseTree parsed-alpha) rest) = just (ParseTree parsed-anychar-bar-63 ::' rest , 2) len-dec-rewrite {- P186-} ((Id "P186") :: _::_(ParseTree parsed-anychar-bar-62) rest) = just (ParseTree parsed-anychar-bar-63 ::' rest , 2) len-dec-rewrite {- P187-} ((Id "P187") :: _::_(ParseTree parsed-anychar-bar-63) rest) = just (ParseTree parsed-anychar ::' rest , 2) len-dec-rewrite {- P189-} ((Id "P189") :: (ParseTree parsed-anychar) :: _::_(ParseTree parsed-comment-star-64) rest) = just (ParseTree parsed-comment-star-64 ::' rest , 3) len-dec-rewrite {- P19-} ((Id "P19") :: _::_(InputChar 't') rest) = just (ParseTree parsed-alpha-range-1 ::' rest , 2) len-dec-rewrite {- P190-} ((Id "P190") :: (InputChar '%') :: (ParseTree parsed-comment-star-64) :: _::_(InputChar '\n') rest) = just (ParseTree parsed-comment ::' rest , 4) len-dec-rewrite {- P191-} ((Id "P191") :: _::_(InputChar '\t') rest) = just (ParseTree parsed-aws-bar-65 ::' rest , 2) len-dec-rewrite {- P192-} ((Id "P192") :: _::_(InputChar ' ') rest) = just (ParseTree parsed-aws-bar-65 ::' rest , 2) len-dec-rewrite {- P193-} ((Id "P193") :: _::_(InputChar '\n') rest) = just (ParseTree parsed-aws-bar-66 ::' rest , 2) len-dec-rewrite {- P194-} ((Id "P194") :: _::_(ParseTree parsed-aws-bar-65) rest) = just (ParseTree parsed-aws-bar-66 ::' rest , 2) len-dec-rewrite {- P195-} ((Id "P195") :: _::_(ParseTree parsed-aws-bar-66) rest) = just (ParseTree parsed-aws ::' rest , 2) len-dec-rewrite {- P196-} ((Id "P196") :: _::_(ParseTree parsed-aws) rest) = just (ParseTree parsed-ws-plus-67 ::' rest , 2) len-dec-rewrite {- P197-} ((Id "P197") :: (ParseTree parsed-aws) :: _::_(ParseTree parsed-ws-plus-67) rest) = just (ParseTree parsed-ws-plus-67 ::' rest , 3) len-dec-rewrite {- P198-} ((Id "P198") :: _::_(ParseTree parsed-ws-plus-67) rest) = just (ParseTree parsed-ws ::' rest , 2) len-dec-rewrite {- P199-} ((Id "P199") :: _::_(ParseTree parsed-numpunct) rest) = just (ParseTree parsed-anynonwschar-bar-68 ::' rest , 2) len-dec-rewrite {- P2-} ((Id "P2") :: _::_(InputChar 'c') rest) = just (ParseTree parsed-alpha-range-1 ::' rest , 2) len-dec-rewrite {- P20-} ((Id "P20") :: _::_(InputChar 'u') rest) = just (ParseTree parsed-alpha-range-1 ::' rest , 2) len-dec-rewrite {- P200-} ((Id "P200") :: _::_(ParseTree parsed-otherpunct) rest) = just (ParseTree parsed-anynonwschar-bar-68 ::' rest , 2) len-dec-rewrite {- P201-} ((Id "P201") :: _::_(ParseTree parsed-alpha) rest) = just (ParseTree parsed-anynonwschar-bar-69 ::' rest , 2) len-dec-rewrite {- P202-} ((Id "P202") :: _::_(ParseTree parsed-anynonwschar-bar-68) rest) = just (ParseTree parsed-anynonwschar-bar-69 ::' rest , 2) len-dec-rewrite {- P203-} ((Id "P203") :: _::_(ParseTree parsed-anynonwschar-bar-69) rest) = just (ParseTree parsed-anynonwschar ::' rest , 2) len-dec-rewrite {- P204-} ((Id "P204") :: _::_(ParseTree parsed-anynonwschar) rest) = just (ParseTree parsed-nonws-plus-70 ::' rest , 2) len-dec-rewrite {- P205-} ((Id "P205") :: (ParseTree parsed-anynonwschar) :: _::_(ParseTree parsed-nonws-plus-70) rest) = just (ParseTree parsed-nonws-plus-70 ::' rest , 3) len-dec-rewrite {- P206-} ((Id "P206") :: _::_(ParseTree parsed-nonws-plus-70) rest) = just (ParseTree parsed-nonws ::' rest , 2) len-dec-rewrite {- P21-} ((Id "P21") :: _::_(InputChar 'v') rest) = just (ParseTree parsed-alpha-range-1 ::' rest , 2) len-dec-rewrite {- P22-} ((Id "P22") :: _::_(InputChar 'w') rest) = just (ParseTree parsed-alpha-range-1 ::' rest , 2) len-dec-rewrite {- P23-} ((Id "P23") :: _::_(InputChar 'x') rest) = just (ParseTree parsed-alpha-range-1 ::' rest , 2) len-dec-rewrite {- P24-} ((Id "P24") :: _::_(InputChar 'y') rest) = just (ParseTree parsed-alpha-range-1 ::' rest , 2) len-dec-rewrite {- P25-} ((Id "P25") :: _::_(InputChar 'z') rest) = just (ParseTree parsed-alpha-range-1 ::' rest , 2) len-dec-rewrite {- P26-} ((Id "P26") :: _::_(InputChar 'A') rest) = just (ParseTree parsed-alpha-range-2 ::' rest , 2) len-dec-rewrite {- P27-} ((Id "P27") :: _::_(InputChar 'B') rest) = just (ParseTree parsed-alpha-range-2 ::' rest , 2) len-dec-rewrite {- P28-} ((Id "P28") :: _::_(InputChar 'C') rest) = just (ParseTree parsed-alpha-range-2 ::' rest , 2) len-dec-rewrite {- P29-} ((Id "P29") :: _::_(InputChar 'D') rest) = just (ParseTree parsed-alpha-range-2 ::' rest , 2) len-dec-rewrite {- P3-} ((Id "P3") :: _::_(InputChar 'd') rest) = just (ParseTree parsed-alpha-range-1 ::' rest , 2) len-dec-rewrite {- P30-} ((Id "P30") :: _::_(InputChar 'E') rest) = just (ParseTree parsed-alpha-range-2 ::' rest , 2) len-dec-rewrite {- P31-} ((Id "P31") :: _::_(InputChar 'F') rest) = just (ParseTree parsed-alpha-range-2 ::' rest , 2) len-dec-rewrite {- P32-} ((Id "P32") :: _::_(InputChar 'G') rest) = just (ParseTree parsed-alpha-range-2 ::' rest , 2) len-dec-rewrite {- P33-} ((Id "P33") :: _::_(InputChar 'H') rest) = just (ParseTree parsed-alpha-range-2 ::' rest , 2) len-dec-rewrite {- P34-} ((Id "P34") :: _::_(InputChar 'I') rest) = just (ParseTree parsed-alpha-range-2 ::' rest , 2) len-dec-rewrite {- P35-} ((Id "P35") :: _::_(InputChar 'J') rest) = just (ParseTree parsed-alpha-range-2 ::' rest , 2) len-dec-rewrite {- P36-} ((Id "P36") :: _::_(InputChar 'K') rest) = just (ParseTree parsed-alpha-range-2 ::' rest , 2) len-dec-rewrite {- P37-} ((Id "P37") :: _::_(InputChar 'L') rest) = just (ParseTree parsed-alpha-range-2 ::' rest , 2) len-dec-rewrite {- P38-} ((Id "P38") :: _::_(InputChar 'M') rest) = just (ParseTree parsed-alpha-range-2 ::' rest , 2) len-dec-rewrite {- P39-} ((Id "P39") :: _::_(InputChar 'N') rest) = just (ParseTree parsed-alpha-range-2 ::' rest , 2) len-dec-rewrite {- P4-} ((Id "P4") :: _::_(InputChar 'e') rest) = just (ParseTree parsed-alpha-range-1 ::' rest , 2) len-dec-rewrite {- P40-} ((Id "P40") :: _::_(InputChar 'O') rest) = just (ParseTree parsed-alpha-range-2 ::' rest , 2) len-dec-rewrite {- P41-} ((Id "P41") :: _::_(InputChar 'P') rest) = just (ParseTree parsed-alpha-range-2 ::' rest , 2) len-dec-rewrite {- P42-} ((Id "P42") :: _::_(InputChar 'Q') rest) = just (ParseTree parsed-alpha-range-2 ::' rest , 2) len-dec-rewrite {- P43-} ((Id "P43") :: _::_(InputChar 'R') rest) = just (ParseTree parsed-alpha-range-2 ::' rest , 2) len-dec-rewrite {- P44-} ((Id "P44") :: _::_(InputChar 'S') rest) = just (ParseTree parsed-alpha-range-2 ::' rest , 2) len-dec-rewrite {- P45-} ((Id "P45") :: _::_(InputChar 'T') rest) = just (ParseTree parsed-alpha-range-2 ::' rest , 2) len-dec-rewrite {- P46-} ((Id "P46") :: _::_(InputChar 'U') rest) = just (ParseTree parsed-alpha-range-2 ::' rest , 2) len-dec-rewrite {- P47-} ((Id "P47") :: _::_(InputChar 'V') rest) = just (ParseTree parsed-alpha-range-2 ::' rest , 2) len-dec-rewrite {- P48-} ((Id "P48") :: _::_(InputChar 'W') rest) = just (ParseTree parsed-alpha-range-2 ::' rest , 2) len-dec-rewrite {- P49-} ((Id "P49") :: _::_(InputChar 'X') rest) = just (ParseTree parsed-alpha-range-2 ::' rest , 2) len-dec-rewrite {- P5-} ((Id "P5") :: _::_(InputChar 'f') rest) = just (ParseTree parsed-alpha-range-1 ::' rest , 2) len-dec-rewrite {- P50-} ((Id "P50") :: _::_(InputChar 'Y') rest) = just (ParseTree parsed-alpha-range-2 ::' rest , 2) len-dec-rewrite {- P51-} ((Id "P51") :: _::_(InputChar 'Z') rest) = just (ParseTree parsed-alpha-range-2 ::' rest , 2) len-dec-rewrite {- P52-} ((Id "P52") :: _::_(ParseTree parsed-alpha-range-1) rest) = just (ParseTree parsed-alpha-bar-3 ::' rest , 2) len-dec-rewrite {- P53-} ((Id "P53") :: _::_(ParseTree parsed-alpha-range-2) rest) = just (ParseTree parsed-alpha-bar-3 ::' rest , 2) len-dec-rewrite {- P54-} ((Id "P54") :: _::_(ParseTree parsed-alpha-bar-3) rest) = just (ParseTree parsed-alpha ::' rest , 2) len-dec-rewrite {- P55-} ((Id "P55") :: _::_(InputChar '0') rest) = just (ParseTree parsed-numone-range-4 ::' rest , 2) len-dec-rewrite {- P56-} ((Id "P56") :: _::_(InputChar '1') rest) = just (ParseTree parsed-numone-range-4 ::' rest , 2) len-dec-rewrite {- P57-} ((Id "P57") :: _::_(InputChar '2') rest) = just (ParseTree parsed-numone-range-4 ::' rest , 2) len-dec-rewrite {- P58-} ((Id "P58") :: _::_(InputChar '3') rest) = just (ParseTree parsed-numone-range-4 ::' rest , 2) len-dec-rewrite {- P59-} ((Id "P59") :: _::_(InputChar '4') rest) = just (ParseTree parsed-numone-range-4 ::' rest , 2) len-dec-rewrite {- P6-} ((Id "P6") :: _::_(InputChar 'g') rest) = just (ParseTree parsed-alpha-range-1 ::' rest , 2) len-dec-rewrite {- P60-} ((Id "P60") :: _::_(InputChar '5') rest) = just (ParseTree parsed-numone-range-4 ::' rest , 2) len-dec-rewrite {- P61-} ((Id "P61") :: _::_(InputChar '6') rest) = just (ParseTree parsed-numone-range-4 ::' rest , 2) len-dec-rewrite {- P62-} ((Id "P62") :: _::_(InputChar '7') rest) = just (ParseTree parsed-numone-range-4 ::' rest , 2) len-dec-rewrite {- P63-} ((Id "P63") :: _::_(InputChar '8') rest) = just (ParseTree parsed-numone-range-4 ::' rest , 2) len-dec-rewrite {- P64-} ((Id "P64") :: _::_(InputChar '9') rest) = just (ParseTree parsed-numone-range-4 ::' rest , 2) len-dec-rewrite {- P65-} ((Id "P65") :: _::_(ParseTree parsed-numone-range-4) rest) = just (ParseTree parsed-numone ::' rest , 2) len-dec-rewrite {- P66-} ((Id "P66") :: _::_(ParseTree parsed-numone) rest) = just (ParseTree parsed-num-plus-5 ::' rest , 2) len-dec-rewrite {- P67-} ((Id "P67") :: (ParseTree parsed-numone) :: _::_(ParseTree parsed-num-plus-5) rest) = just (ParseTree parsed-num-plus-5 ::' rest , 3) len-dec-rewrite {- P68-} ((Id "P68") :: _::_(ParseTree parsed-num-plus-5) rest) = just (ParseTree parsed-num ::' rest , 2) len-dec-rewrite {- P69-} ((Id "P69") :: _::_(InputChar '_') rest) = just (ParseTree parsed-numpunct-bar-6 ::' rest , 2) len-dec-rewrite {- P7-} ((Id "P7") :: _::_(InputChar 'h') rest) = just (ParseTree parsed-alpha-range-1 ::' rest , 2) len-dec-rewrite {- P70-} ((Id "P70") :: _::_(InputChar '/') rest) = just (ParseTree parsed-numpunct-bar-6 ::' rest , 2) len-dec-rewrite {- P71-} ((Id "P71") :: _::_(InputChar '#') rest) = just (ParseTree parsed-numpunct-bar-7 ::' rest , 2) len-dec-rewrite {- P72-} ((Id "P72") :: _::_(ParseTree parsed-numpunct-bar-6) rest) = just (ParseTree parsed-numpunct-bar-7 ::' rest , 2) len-dec-rewrite {- P73-} ((Id "P73") :: _::_(InputChar '~') rest) = just (ParseTree parsed-numpunct-bar-8 ::' rest , 2) len-dec-rewrite {- P74-} ((Id "P74") :: _::_(ParseTree parsed-numpunct-bar-7) rest) = just (ParseTree parsed-numpunct-bar-8 ::' rest , 2) len-dec-rewrite {- P75-} ((Id "P75") :: _::_(InputChar '-') rest) = just (ParseTree parsed-numpunct-bar-9 ::' rest , 2) len-dec-rewrite {- P76-} ((Id "P76") :: _::_(ParseTree parsed-numpunct-bar-8) rest) = just (ParseTree parsed-numpunct-bar-9 ::' rest , 2) len-dec-rewrite {- P77-} ((Id "P77") :: _::_(InputChar '\'') rest) = just (ParseTree parsed-numpunct-bar-10 ::' rest , 2) len-dec-rewrite {- P78-} ((Id "P78") :: _::_(ParseTree parsed-numpunct-bar-9) rest) = just (ParseTree parsed-numpunct-bar-10 ::' rest , 2) len-dec-rewrite {- P79-} ((Id "P79") :: _::_(ParseTree parsed-numone) rest) = just (ParseTree parsed-numpunct-bar-11 ::' rest , 2) len-dec-rewrite {- P8-} ((Id "P8") :: _::_(InputChar 'i') rest) = just (ParseTree parsed-alpha-range-1 ::' rest , 2) len-dec-rewrite {- P80-} ((Id "P80") :: _::_(ParseTree parsed-numpunct-bar-10) rest) = just (ParseTree parsed-numpunct-bar-11 ::' rest , 2) len-dec-rewrite {- P81-} ((Id "P81") :: _::_(ParseTree parsed-numpunct-bar-11) rest) = just (ParseTree parsed-numpunct ::' rest , 2) len-dec-rewrite {- P82-} ((Id "P82") :: _::_(InputChar '◂') rest) = just (ParseTree parsed-otherpunct-bar-12 ::' rest , 2) len-dec-rewrite {- P83-} ((Id "P83") :: _::_(InputChar 'ω') rest) = just (ParseTree parsed-otherpunct-bar-12 ::' rest , 2) len-dec-rewrite {- P84-} ((Id "P84") :: _::_(InputChar 'φ') rest) = just (ParseTree parsed-otherpunct-bar-13 ::' rest , 2) len-dec-rewrite {- P85-} ((Id "P85") :: _::_(ParseTree parsed-otherpunct-bar-12) rest) = just (ParseTree parsed-otherpunct-bar-13 ::' rest , 2) len-dec-rewrite {- P86-} ((Id "P86") :: _::_(InputChar 'υ') rest) = just (ParseTree parsed-otherpunct-bar-14 ::' rest , 2) len-dec-rewrite {- P87-} ((Id "P87") :: _::_(ParseTree parsed-otherpunct-bar-13) rest) = just (ParseTree parsed-otherpunct-bar-14 ::' rest , 2) len-dec-rewrite {- P88-} ((Id "P88") :: _::_(InputChar 'μ') rest) = just (ParseTree parsed-otherpunct-bar-15 ::' rest , 2) len-dec-rewrite {- P89-} ((Id "P89") :: _::_(ParseTree parsed-otherpunct-bar-14) rest) = just (ParseTree parsed-otherpunct-bar-15 ::' rest , 2) len-dec-rewrite {- P9-} ((Id "P9") :: _::_(InputChar 'j') rest) = just (ParseTree parsed-alpha-range-1 ::' rest , 2) len-dec-rewrite {- P90-} ((Id "P90") :: _::_(InputChar 'χ') rest) = just (ParseTree parsed-otherpunct-bar-16 ::' rest , 2) len-dec-rewrite {- P91-} ((Id "P91") :: _::_(ParseTree parsed-otherpunct-bar-15) rest) = just (ParseTree parsed-otherpunct-bar-16 ::' rest , 2) len-dec-rewrite {- P92-} ((Id "P92") :: _::_(InputChar 'δ') rest) = just (ParseTree parsed-otherpunct-bar-17 ::' rest , 2) len-dec-rewrite {- P93-} ((Id "P93") :: _::_(ParseTree parsed-otherpunct-bar-16) rest) = just (ParseTree parsed-otherpunct-bar-17 ::' rest , 2) len-dec-rewrite {- P94-} ((Id "P94") :: _::_(InputChar '\"') rest) = just (ParseTree parsed-otherpunct-bar-18 ::' rest , 2) len-dec-rewrite {- P95-} ((Id "P95") :: _::_(ParseTree parsed-otherpunct-bar-17) rest) = just (ParseTree parsed-otherpunct-bar-18 ::' rest , 2) len-dec-rewrite {- P96-} ((Id "P96") :: _::_(InputChar '≃') rest) = just (ParseTree parsed-otherpunct-bar-19 ::' rest , 2) len-dec-rewrite {- P97-} ((Id "P97") :: _::_(ParseTree parsed-otherpunct-bar-18) rest) = just (ParseTree parsed-otherpunct-bar-19 ::' rest , 2) len-dec-rewrite {- P98-} ((Id "P98") :: _::_(InputChar '>') rest) = just (ParseTree parsed-otherpunct-bar-20 ::' rest , 2) len-dec-rewrite {- P99-} ((Id "P99") :: _::_(ParseTree parsed-otherpunct-bar-19) rest) = just (ParseTree parsed-otherpunct-bar-20 ::' rest , 2) len-dec-rewrite {- EndEntity-} (_::_(Id "EndEntity") rest) = just (ParseTree (parsed-entities (norm-entities EndEntity)) ::' rest , 1) len-dec-rewrite {- P188-} (_::_(Id "P188") rest) = just (ParseTree parsed-comment-star-64 ::' rest , 1) len-dec-rewrite {- Posinfo-} (_::_(Posinfo n) rest) = just (ParseTree (parsed-posinfo (ℕ-to-string n)) ::' rest , 1) len-dec-rewrite x = nothing rrs : rewriteRules rrs = record { len-dec-rewrite = len-dec-rewrite }
{ "alphanum_fraction": 0.6353755305, "avg_line_length": 106.2549019608, "ext": "agda", "hexsha": "f44c7935efde09cc5c596ded9741e978ba3ea32f", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "acf691e37210607d028f4b19f98ec26c4353bfb5", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "xoltar/cedille", "max_forks_repo_path": "src/cws.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "acf691e37210607d028f4b19f98ec26c4353bfb5", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "xoltar/cedille", "max_issues_repo_path": "src/cws.agda", "max_line_length": 1719, "max_stars_count": null, "max_stars_repo_head_hexsha": "acf691e37210607d028f4b19f98ec26c4353bfb5", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "xoltar/cedille", "max_stars_repo_path": "src/cws.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 20100, "size": 54190 }
{-# OPTIONS --safe --warning=error --without-K #-} open import Groups.Definition open import Groups.Abelian.Definition open import Setoids.Setoids open import Rings.Definition open import Modules.Definition open import Fields.Fields open import Agda.Primitive using (Level; lzero; lsuc; _⊔_) module Vectors.VectorSpace {a b : _} {A : Set a} {S : Setoid {a} {b} A} {_+R_ : A → A → A} {_*_ : A → A → A} (R : Ring S _+R_ _*_) {m n : _} {M : Set m} {T : Setoid {m} {n} M} {_+_ : M → M → M} {G' : Group T _+_} (G : AbelianGroup G') (_·_ : A → M → M) where record VectorSpace : Set (lsuc a ⊔ b ⊔ m ⊔ n) where field isModule : Module R G _·_ isField : Field R
{ "alphanum_fraction": 0.6311844078, "avg_line_length": 37.0555555556, "ext": "agda", "hexsha": "ce1b0b4b9be3f7f5104169f562bf0bb68ebb0d44", "lang": "Agda", "max_forks_count": 1, "max_forks_repo_forks_event_max_datetime": "2021-11-29T13:23:07.000Z", "max_forks_repo_forks_event_min_datetime": "2021-11-29T13:23:07.000Z", "max_forks_repo_head_hexsha": "0f4230011039092f58f673abcad8fb0652e6b562", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "Smaug123/agdaproofs", "max_forks_repo_path": "Vectors/VectorSpace.agda", "max_issues_count": 14, "max_issues_repo_head_hexsha": "0f4230011039092f58f673abcad8fb0652e6b562", "max_issues_repo_issues_event_max_datetime": "2020-04-11T11:03:39.000Z", "max_issues_repo_issues_event_min_datetime": "2019-01-06T21:11:59.000Z", "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "Smaug123/agdaproofs", "max_issues_repo_path": "Vectors/VectorSpace.agda", "max_line_length": 258, "max_stars_count": 4, "max_stars_repo_head_hexsha": "0f4230011039092f58f673abcad8fb0652e6b562", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "Smaug123/agdaproofs", "max_stars_repo_path": "Vectors/VectorSpace.agda", "max_stars_repo_stars_event_max_datetime": "2022-01-28T06:04:15.000Z", "max_stars_repo_stars_event_min_datetime": "2019-08-08T12:44:19.000Z", "num_tokens": 240, "size": 667 }
{-# OPTIONS --type-in-type #-} open import Data.Product renaming (proj₁ to ₁; proj₂ to ₂) open import Relation.Binary.PropositionalEquality open import Function test : Set test = Set where -- (Agda 2.6.1.3) -- works -------------------------------------------------------------------------------- -- eliminating projections -- m : Set × Set -- m = _ -- p₁ = (m .₁ ≡ Set) ∋ refl -- p₂ = (m .₂ ≡ Set) ∋ refl -- currying -- m : Set × Set → Set -- m = _ -- p = λ (A : Set)(B : Set) → m (A , B) ≡ A ∋ refl -- nested currying -- m : Set × (Set × Set) → Set -- m = _ -- p = λ (A : Set)(B : Set)(C : Set) → m (A , (B , C)) ≡ A ∋ refl -- projected variable under pairing -- m : Set × Set → Set -- m = _ -- p = λ (A : Set)(B : Set × Set) → m (A , B .₁) ≡ B .₁ ∋ refl -- non-linearity -- m : Set → Set → Set → Set -- m = _ -- p = λ (A : Set)(B : Set) → m A B B ≡ A ∋ refl -- m A B B =? A -- m = λ A _ _. A -- m : (a : A)(a' : A) → B a → B a' → C -- m a a (b : B a)(b' : B a) -- eta-reduction -- m : (Set → Set × Set) → Set -- m = _ -- p = λ (f : Set → Set × Set) → m (λ x → f x .₁ , f x .₂) ≡ f Set .₁ ∋ refl -- = p = λ (f : Set → Set × Set) → m f ≡ f Set .₁ ∋ refl -- doesn't work ------------------------------------------------------------ -- non-linearity under pairing -- m : Set × Set × Set → Set -- m = _ -- p = λ (A : Set)(B : Set) → m (A , B , B) ≡ A ∋ refl -- flipping -- m : (Set → Set → Set) → Set -- m = _ -- p = λ (f : Set → Set → Set) → m (λ A B → f B A) ≡ f Set (Set → Set) ∋ refl -- projection under λ (no full Skolemization) -- m : (Set → Set) → Set -- m = _ -- p = λ (f : Set → Set × Set) → m (λ A → f A .₁) ≡ f Set .₁ ∋ refl -- flipping + projection -- m : (Set → Set × Set) → Set -- m = _ -- p = λ (f : Set → Set × Set) → m (λ x → f x .₂ , f x .₁) ≡ f Set .₁ ∋ refl
{ "alphanum_fraction": 0.4093291405, "avg_line_length": 25.7837837838, "ext": "agda", "hexsha": "c2a268ededf132c8dd73bd72f5e027e8f71c5c80", "lang": "Agda", "max_forks_count": 21, "max_forks_repo_forks_event_max_datetime": "2022-03-11T05:29:46.000Z", "max_forks_repo_forks_event_min_datetime": "2019-06-20T04:07:20.000Z", "max_forks_repo_head_hexsha": "0268d20f25d6b0e228ef59e1b2bdb223640946f8", "max_forks_repo_licenses": [ "BSD-3-Clause" ], "max_forks_repo_name": "lunalunaa/elaboration-zoo", "max_forks_repo_path": "experiments/sigma-unification/Demo.agda", "max_issues_count": 26, "max_issues_repo_head_hexsha": "0268d20f25d6b0e228ef59e1b2bdb223640946f8", "max_issues_repo_issues_event_max_datetime": "2022-03-06T08:20:20.000Z", "max_issues_repo_issues_event_min_datetime": "2019-09-10T15:23:50.000Z", "max_issues_repo_licenses": [ "BSD-3-Clause" ], "max_issues_repo_name": "lunalunaa/elaboration-zoo", "max_issues_repo_path": "experiments/sigma-unification/Demo.agda", "max_line_length": 82, "max_stars_count": 242, "max_stars_repo_head_hexsha": "f2d5ba52d73d4cd5a0b1b7996423844d375fa22d", "max_stars_repo_licenses": [ "BSD-3-Clause" ], "max_stars_repo_name": "AndrasKovacs/elaboration-zoo", "max_stars_repo_path": "experiments/sigma-unification/Demo.agda", "max_stars_repo_stars_event_max_datetime": "2022-03-30T05:40:25.000Z", "max_stars_repo_stars_event_min_datetime": "2019-05-28T09:37:21.000Z", "num_tokens": 744, "size": 1908 }
{-# OPTIONS --without-K #-} module sets.unit where open import level record ⊤ {i : Level} : Set i where constructor tt ⊤-elim : ∀ {i j} (P : ⊤ {i} → Set j) → P tt → (x : ⊤) → P x ⊤-elim P ptt tt = ptt
{ "alphanum_fraction": 0.5480769231, "avg_line_length": 17.3333333333, "ext": "agda", "hexsha": "fa6f0bab6b70bd0385879f8ad3ae82fbddee5d9c", "lang": "Agda", "max_forks_count": 4, "max_forks_repo_forks_event_max_datetime": "2019-05-04T19:31:00.000Z", "max_forks_repo_forks_event_min_datetime": "2015-02-02T12:17:00.000Z", "max_forks_repo_head_hexsha": "bbbc3bfb2f80ad08c8e608cccfa14b83ea3d258c", "max_forks_repo_licenses": [ "BSD-3-Clause" ], "max_forks_repo_name": "pcapriotti/agda-base", "max_forks_repo_path": "src/sets/unit.agda", "max_issues_count": 4, "max_issues_repo_head_hexsha": "bbbc3bfb2f80ad08c8e608cccfa14b83ea3d258c", "max_issues_repo_issues_event_max_datetime": "2016-10-26T11:57:26.000Z", "max_issues_repo_issues_event_min_datetime": "2015-02-02T14:32:16.000Z", "max_issues_repo_licenses": [ "BSD-3-Clause" ], "max_issues_repo_name": "pcapriotti/agda-base", "max_issues_repo_path": "src/sets/unit.agda", "max_line_length": 59, "max_stars_count": 20, "max_stars_repo_head_hexsha": "bbbc3bfb2f80ad08c8e608cccfa14b83ea3d258c", "max_stars_repo_licenses": [ "BSD-3-Clause" ], "max_stars_repo_name": "pcapriotti/agda-base", "max_stars_repo_path": "src/sets/unit.agda", "max_stars_repo_stars_event_max_datetime": "2022-02-01T11:25:54.000Z", "max_stars_repo_stars_event_min_datetime": "2015-06-12T12:20:17.000Z", "num_tokens": 83, "size": 208 }
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.HITs.Ints.BiInvInt where open import Cubical.HITs.Ints.BiInvInt.Base public open import Cubical.HITs.Ints.BiInvInt.Properties public
{ "alphanum_fraction": 0.7810945274, "avg_line_length": 28.7142857143, "ext": "agda", "hexsha": "367e01d9d88e3c7e5ad63091a7f536c8fb0a3828", "lang": "Agda", "max_forks_count": 1, "max_forks_repo_forks_event_max_datetime": "2021-11-22T02:02:01.000Z", "max_forks_repo_forks_event_min_datetime": "2021-11-22T02:02:01.000Z", "max_forks_repo_head_hexsha": "fd8059ec3eed03f8280b4233753d00ad123ffce8", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "dan-iel-lee/cubical", "max_forks_repo_path": "Cubical/HITs/Ints/BiInvInt.agda", "max_issues_count": 1, "max_issues_repo_head_hexsha": "fd8059ec3eed03f8280b4233753d00ad123ffce8", "max_issues_repo_issues_event_max_datetime": "2022-01-27T02:07:48.000Z", "max_issues_repo_issues_event_min_datetime": "2022-01-27T02:07:48.000Z", "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "dan-iel-lee/cubical", "max_issues_repo_path": "Cubical/HITs/Ints/BiInvInt.agda", "max_line_length": 56, "max_stars_count": null, "max_stars_repo_head_hexsha": "fd8059ec3eed03f8280b4233753d00ad123ffce8", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "dan-iel-lee/cubical", "max_stars_repo_path": "Cubical/HITs/Ints/BiInvInt.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 60, "size": 201 }
{-# OPTIONS --without-K #-} open import lib.Basics open import lib.NType2 open import lib.PathGroupoid open import lib.types.Bool open import lib.types.IteratedSuspension open import lib.types.Lift open import lib.types.LoopSpace open import lib.types.Nat open import lib.types.Paths open import lib.types.Pi open import lib.types.Pointed open import lib.types.Sigma open import lib.types.Suspension open import lib.types.TLevel open import lib.types.Unit open SuspensionRec public using () renaming (f to Susp-rec) open import nicolai.pseudotruncations.Preliminary-definitions open import nicolai.pseudotruncations.Liblemmas module nicolai.pseudotruncations.pointed-O-Sphere where {- helper file for some technical things -} module _ {i} where bool = fst (⊙Sphere {i} O) tt₀ : bool tt₀ = snd (⊙Sphere {i} O) ff₀ : bool ff₀ = lift false module bool-neutral {i j} (P : bool {i} → Type j) (p₀ : P tt₀) where bool-pair : (P tt₀ × P ff₀) ≃ ((b : bool) → P b) bool-pair = equiv (λ tf → (λ { (lift true) → fst tf ; (lift false) → snd tf })) (λ f → (f tt₀ , f ff₀)) (λ f → λ= (λ { (lift true) → idp ; (lift false) → idp })) (λ tf → idp) pair-red : Σ (P tt₀ × P ff₀) (λ tf → fst tf == p₀) → P ff₀ pair-red ((pt , pf) , q) = pf sing-exp : P ff₀ → Σ (P tt₀ × P ff₀) (λ tf → fst tf == p₀) sing-exp pf = ((p₀ , pf) , idp) red-exp : (pf : P ff₀) → pair-red (sing-exp pf) == pf red-exp _ = idp exp-red : (x : Σ (P tt₀ × P ff₀) (λ tf → fst tf == p₀)) → sing-exp (pair-red x) == x exp-red ((.p₀ , pf) , idp) = idp {- I tried to do it with pattern matching, but this does not introduce a dot [.] before [p₀]. Thus, is fails. Is this a bug? -} pair-one-determined : Σ (P tt₀ × P ff₀) (λ tf → fst tf == p₀) ≃ P ff₀ pair-one-determined = equiv pair-red sing-exp red-exp exp-red {- This reduction result is (on paper) trivial, but for our formalization quite powerful! -} reduction : (Σ ((b : bool) → P b) λ g → g tt₀ == p₀) ≃ P ff₀ reduction = (Σ ((b : bool) → P b) λ g → g tt₀ == p₀) ≃⟨ equiv-Σ-fst {A = P tt₀ × P ff₀} {B = (b : bool) → P b} (λ g → g tt₀ == p₀) {h = fst bool-pair} (snd bool-pair) ⁻¹ ⟩ Σ (P tt₀ × P ff₀) ((λ g → g tt₀ == p₀) ∘ fst bool-pair) ≃⟨ ide _ ⟩ Σ (P tt₀ × P ff₀) (λ tf → fst tf == p₀) ≃⟨ pair-one-determined ⟩ P ff₀ ≃∎
{ "alphanum_fraction": 0.5432145565, "avg_line_length": 31.0352941176, "ext": "agda", "hexsha": "1c500609e4d4316c507da27fe4f65329ee7d750c", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "939a2d83e090fcc924f69f7dfa5b65b3b79fe633", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "nicolaikraus/HoTT-Agda", "max_forks_repo_path": "nicolai/pseudotruncations/pointed-O-Sphere.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "939a2d83e090fcc924f69f7dfa5b65b3b79fe633", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "nicolaikraus/HoTT-Agda", "max_issues_repo_path": "nicolai/pseudotruncations/pointed-O-Sphere.agda", "max_line_length": 86, "max_stars_count": 1, "max_stars_repo_head_hexsha": "939a2d83e090fcc924f69f7dfa5b65b3b79fe633", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "nicolaikraus/HoTT-Agda", "max_stars_repo_path": "nicolai/pseudotruncations/pointed-O-Sphere.agda", "max_stars_repo_stars_event_max_datetime": "2021-06-30T00:17:55.000Z", "max_stars_repo_stars_event_min_datetime": "2021-06-30T00:17:55.000Z", "num_tokens": 867, "size": 2638 }
module plfa.part1.Relations where import Relation.Binary.PropositionalEquality as Eq open Eq using (_≡_; refl; cong) open import Data.Nat using (ℕ; zero; suc; _+_) open import Data.Nat.Properties using (+-comm; +-identityʳ) data _≤_ : ℕ → ℕ → Set where z≤n : ∀ {n : ℕ} -------- → zero ≤ n s≤s : ∀ {m n : ℕ} → m ≤ n ------------- → suc m ≤ suc n infix 4 _≤_ inv-s≤s : ∀ {m n : ℕ} → suc m ≤ suc n ------------- → m ≤ n inv-s≤s (s≤s m≤n) = m≤n inv-z≤n : ∀ {m : ℕ} → m ≤ zero -------- → m ≡ zero inv-z≤n z≤n = refl ≤-refl : ∀ {n} → n ≤ n ≤-refl {zero} = z≤n ≤-refl {suc n} = s≤s ≤-refl ≤-trans : ∀ {m n p} → m ≤ n → n ≤ p → m ≤ p ≤-trans z≤n n = z≤n ≤-trans (s≤s m) (s≤s n) = s≤s (≤-trans m n) ≤-antisymm : ∀ {m n} → m ≤ n → n ≤ m → m ≡ n ≤-antisymm z≤n z≤n = refl ≤-antisymm (s≤s m) (s≤s n) = cong suc (≤-antisymm m n) data Total (m n : ℕ) : Set where forward : m ≤ n --------- → Total m n flipped : n ≤ m --------- → Total m n ≤-total : ∀ (m n : ℕ) → Total m n ≤-total zero n = forward z≤n ≤-total (suc m) (zero) = flipped z≤n ≤-total (suc m) (suc n) with ≤-total m n ... | forward a = forward (s≤s a) ... | flipped b = flipped (s≤s b) +-monoʳ-≤ : ∀ (n p q : ℕ) → p ≤ q ------------- → n + p ≤ n + q +-monoʳ-≤ zero p q p≤q = p≤q +-monoʳ-≤ (suc n) p q p≤q = s≤s (+-monoʳ-≤ n p q p≤q) +-monoˡ-≤ : ∀ (m n p : ℕ) → m ≤ n ------------- → m + p ≤ n + p +-monoˡ-≤ m n p m≤n rewrite +-comm m p | +-comm n p = +-monoʳ-≤ p m n m≤n +-mono-≤ : ∀ (m n p q : ℕ) → m ≤ n → p ≤ q ------------- → m + p ≤ n + q +-mono-≤ m n p q m≤n p≤q = ≤-trans (+-monoˡ-≤ m n p m≤n) (+-monoʳ-≤ n p q p≤q) data even : ℕ → Set data odd : ℕ → Set data even where zero : --------- even zero suc : ∀ {n : ℕ} → odd n ------------ → even (suc n) data odd where suc : ∀ {n : ℕ} → even n ----------- → odd (suc n) e+e≡e : ∀ {m n : ℕ} → even m → even n ------------ → even (m + n) o+e≡o : ∀ {m n : ℕ} → odd m → even n ----------- → odd (m + n) e+e≡e zero en = en e+e≡e (suc om) en = suc (o+e≡o om en) o+e≡o (suc em) en = suc (e+e≡e em en) o+o≡e : ∀ {m n : ℕ} → odd m → odd n → even (m + n) o+o≡e {suc a} {suc b} (suc m) (suc n) rewrite +-comm a (suc b) = suc (o+e≡o (suc n) m)
{ "alphanum_fraction": 0.4153846154, "avg_line_length": 18.6434108527, "ext": "agda", "hexsha": "68d81b80cf9cc5bec769abe8ae6976e53f1a1b09", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "275ecc582b3a6a1da1af387251c6b4d74d9a5203", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "sym-cereal/proofs", "max_forks_repo_path": "plfa/part1/Relations.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "275ecc582b3a6a1da1af387251c6b4d74d9a5203", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "sym-cereal/proofs", "max_issues_repo_path": "plfa/part1/Relations.agda", "max_line_length": 73, "max_stars_count": 6, "max_stars_repo_head_hexsha": "275ecc582b3a6a1da1af387251c6b4d74d9a5203", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "UnsoundWitch/proofs", "max_stars_repo_path": "plfa/part1/Relations.agda", "max_stars_repo_stars_event_max_datetime": "2021-01-18T10:58:03.000Z", "max_stars_repo_stars_event_min_datetime": "2021-01-03T03:29:40.000Z", "num_tokens": 1128, "size": 2405 }
module Main where import PolyDepPrelude import Homogenous.Base import Homogenous.Equality import Homogenous.Reflexivity import Homogenous.Nat import Tools import Reflexivity import EqBase import TYPE
{ "alphanum_fraction": 0.8663366337, "avg_line_length": 15.5384615385, "ext": "agda", "hexsha": "0324fea1a84fd48e792a4a07b5f669f7406f138a", "lang": "Agda", "max_forks_count": 371, "max_forks_repo_forks_event_max_datetime": "2022-03-30T19:00:30.000Z", "max_forks_repo_forks_event_min_datetime": "2015-01-03T14:04:08.000Z", "max_forks_repo_head_hexsha": "7f58030124fa99dfbf8db376659416f3ad8384de", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "cruhland/agda", "max_forks_repo_path": "examples/AIM5/PolyDep/Main.agda", "max_issues_count": 4066, "max_issues_repo_head_hexsha": "7f58030124fa99dfbf8db376659416f3ad8384de", "max_issues_repo_issues_event_max_datetime": "2022-03-31T21:14:49.000Z", "max_issues_repo_issues_event_min_datetime": "2015-01-10T11:24:51.000Z", "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "cruhland/agda", "max_issues_repo_path": "examples/AIM5/PolyDep/Main.agda", "max_line_length": 29, "max_stars_count": 1989, "max_stars_repo_head_hexsha": "7f58030124fa99dfbf8db376659416f3ad8384de", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "cruhland/agda", "max_stars_repo_path": "examples/AIM5/PolyDep/Main.agda", "max_stars_repo_stars_event_max_datetime": "2022-03-30T18:20:48.000Z", "max_stars_repo_stars_event_min_datetime": "2015-01-09T23:51:16.000Z", "num_tokens": 49, "size": 202 }
module Logic where data True : Set where tt : True infix 10 _/\_ data _/\_ (P Q : Set) : Set where <_,_> : P -> Q -> P /\ Q
{ "alphanum_fraction": 0.5413533835, "avg_line_length": 11.0833333333, "ext": "agda", "hexsha": "d1644f488734ecd5b7a2446fc9fbc86359422e2b", "lang": "Agda", "max_forks_count": 371, "max_forks_repo_forks_event_max_datetime": "2022-03-30T19:00:30.000Z", "max_forks_repo_forks_event_min_datetime": "2015-01-03T14:04:08.000Z", "max_forks_repo_head_hexsha": "231d6ad8e77b67ff8c4b1cb35a6c31ccd988c3e9", "max_forks_repo_licenses": [ "BSD-3-Clause" ], "max_forks_repo_name": "Agda-zh/agda", "max_forks_repo_path": "examples/outdated-and-incorrect/cat/Base.agda", "max_issues_count": 4066, "max_issues_repo_head_hexsha": "ed8ac6f4062ea8a20fa0f62d5db82d4e68278338", "max_issues_repo_issues_event_max_datetime": "2022-03-31T21:14:49.000Z", "max_issues_repo_issues_event_min_datetime": "2015-01-10T11:24:51.000Z", "max_issues_repo_licenses": [ "BSD-3-Clause" ], "max_issues_repo_name": "shlevy/agda", "max_issues_repo_path": "examples/outdated-and-incorrect/cat/Base.agda", "max_line_length": 33, "max_stars_count": 1989, "max_stars_repo_head_hexsha": "ed8ac6f4062ea8a20fa0f62d5db82d4e68278338", "max_stars_repo_licenses": [ "BSD-3-Clause" ], "max_stars_repo_name": "shlevy/agda", "max_stars_repo_path": "examples/outdated-and-incorrect/cat/Base.agda", "max_stars_repo_stars_event_max_datetime": "2022-03-30T18:20:48.000Z", "max_stars_repo_stars_event_min_datetime": "2015-01-09T23:51:16.000Z", "num_tokens": 50, "size": 133 }
open import Mockingbird.Forest using (Forest) -- Craig’s Discovery module Mockingbird.Problems.Chapter20 {ℓb ℓ} (forest : Forest {ℓb} {ℓ}) where open import Data.Product using (_,_) open import Data.Vec using ([]; _∷_) open import Function using (_$_) open import Relation.Unary using (Pred; _∈_; _⊆_; _⊇_) open Forest forest open import Mockingbird.Forest.Birds forest open import Mockingbird.Forest.Combination.Vec forest open import Mockingbird.Forest.Combination.Vec.Properties forest open import Mockingbird.Forest.Extensionality forest import Mockingbird.Problems.Chapter11 forest as Chapter₁₁ open import Mockingbird.Problems.Chapter19 forest using (_≐_) problem₁ : ⦃ _ : HasGoldfinch ⦄ ⦃ _ : HasIdentity ⦄ → HasQuirkyBird problem₁ = record { Q₃ = G ∙ I ; isQuirkyBird = λ x y z → begin G ∙ I ∙ x ∙ y ∙ z ≈⟨ isGoldfinch I x y z ⟩ I ∙ z ∙ (x ∙ y) ≈⟨ congʳ $ isIdentity z ⟩ z ∙ (x ∙ y) ∎ } problem₂′ : ⦃ _ : HasQuirkyBird ⦄ ⦃ _ : HasIdentity ⦄ → HasThrush problem₂′ = record { T = Q₃ ∙ I ; isThrush = λ x y → begin Q₃ ∙ I ∙ x ∙ y ≈⟨ isQuirkyBird I x y ⟩ y ∙ (I ∙ x) ≈⟨ congˡ $ isIdentity x ⟩ y ∙ x ∎ } problem₂ : ⦃ _ : HasGoldfinch ⦄ ⦃ _ : HasIdentity ⦄ → HasThrush problem₂ = record { T = G ∙ I ∙ I ; isThrush = isThrush ⦃ problem₂′ ⦄ } where instance hasQuirkyBird = problem₁ problem₃ : ⦃ _ : HasGoldfinch ⦄ ⦃ _ : HasIdentity ⦄ → HasCardinal problem₃ = record { C = G ∙ G ∙ I ∙ I ; isCardinal = λ x y z → begin G ∙ G ∙ I ∙ I ∙ x ∙ y ∙ z ≈⟨ congʳ $ congʳ $ isGoldfinch G I I x ⟩ G ∙ x ∙ (I ∙ I) ∙ y ∙ z ≈⟨ isGoldfinch x (I ∙ I) y z ⟩ x ∙ z ∙ (I ∙ I ∙ y) ≈⟨ congˡ $ congʳ $ isIdentity I ⟩ x ∙ z ∙ (I ∙ y) ≈⟨ congˡ $ isIdentity y ⟩ x ∙ z ∙ y ∎ } problem₄-Q : ⦃ _ : HasGoldfinch ⦄ ⦃ _ : HasIdentity ⦄ → HasQueerBird problem₄-Q = record { Q = G ∙ R ∙ Q₃ ; isQueerBird = λ x y z → begin G ∙ R ∙ Q₃ ∙ x ∙ y ∙ z ≈⟨ congʳ $ isGoldfinch R Q₃ x y ⟩ R ∙ y ∙ (Q₃ ∙ x) ∙ z ≈⟨ isRobin y (Q₃ ∙ x) z ⟩ Q₃ ∙ x ∙ z ∙ y ≈⟨ isQuirkyBird x z y ⟩ y ∙ (x ∙ z) ∎ } where instance hasQuirkyBird = problem₁ hasCardinal = problem₃ hasRobin = Chapter₁₁.problem₂₃ problem₄-B : ⦃ _ : HasGoldfinch ⦄ ⦃ _ : HasIdentity ⦄ → HasBluebird problem₄-B = record { B = C ∙ Q ; isBluebird = λ x y z → begin C ∙ Q ∙ x ∙ y ∙ z ≈⟨ congʳ $ isCardinal Q x y ⟩ Q ∙ y ∙ x ∙ z ≈⟨ isQueerBird y x z ⟩ x ∙ (y ∙ z) ∎ } where instance hasCardinal = problem₃ hasQueerBird = problem₄-Q module _ ⦃ _ : Extensional ⦄ ⦃ _ : HasBluebird ⦄ ⦃ _ : HasThrush ⦄ ⦃ _ : HasIdentity ⦄ ⦃ _ : HasGoldfinch ⦄ where ⟨B,T,I⟩ = ⟨ B ∷ T ∷ I ∷ [] ⟩ ⟨G,I⟩ = ⟨ G ∷ I ∷ [] ⟩ module _ where private instance hasCardinal = Chapter₁₁.problem₂₁-bonus hasDove = Chapter₁₁.problem₅ hasGoldfinch = Chapter₁₁.problem₄₇ b : B ∈ ⟨B,T,I⟩ b = [ here refl ] t : T ∈ ⟨B,T,I⟩ t = [ there (here refl) ] i : I ∈ ⟨B,T,I⟩ i = [ there (there (here refl)) ] c : C ∈ ⟨B,T,I⟩ c = b ⟨∙⟩ (t ⟨∙⟩ (b ⟨∙⟩ b ⟨∙⟩ t)) ⟨∙⟩ (b ⟨∙⟩ b ⟨∙⟩ t) d : D ∈ ⟨B,T,I⟩ d = b ⟨∙⟩ b g : G ∈ ⟨B,T,I⟩ g = subst′ (ext′ $ ext′ $ ext′ $ ext′ $ trans (isGoldfinch _ _ _ _) (sym $ isGoldfinch ⦃ hasGoldfinch ⦄ _ _ _ _)) (d ⟨∙⟩ c) ⟨G,I⟩⊆⟨B,T,I⟩ : ⟨G,I⟩ ⊆ ⟨B,T,I⟩ ⟨G,I⟩⊆⟨B,T,I⟩ [ here x≈G ] = subst′ x≈G g ⟨G,I⟩⊆⟨B,T,I⟩ [ there (here x≈I) ] = [ there (there (here x≈I)) ] ⟨G,I⟩⊆⟨B,T,I⟩ (x∈⟨G,I⟩ ⟨∙⟩ y∈⟨G,I⟩ ∣ xy≈z) = ⟨G,I⟩⊆⟨B,T,I⟩ x∈⟨G,I⟩ ⟨∙⟩ ⟨G,I⟩⊆⟨B,T,I⟩ y∈⟨G,I⟩ ∣ xy≈z module _ where private g : G ∈ ⟨G,I⟩ g = [ here refl ] i : I ∈ ⟨G,I⟩ i = [ there (here refl) ] t : T ∈ ⟨G,I⟩ t = subst′ (ext′ $ ext′ $ trans (isThrush _ _) (sym $ isThrush ⦃ problem₂ ⦄ _ _)) (g ⟨∙⟩ i ⟨∙⟩ i) b : B ∈ ⟨G,I⟩ b = subst′ (ext′ $ ext′ $ ext′ $ trans (isBluebird _ _ _) (sym $ isBluebird ⦃ problem₄-B ⦄ _ _ _)) (g ⟨∙⟩ g ⟨∙⟩ i ⟨∙⟩ i ⟨∙⟩ (g ⟨∙⟩ (g ⟨∙⟩ g ⟨∙⟩ i ⟨∙⟩ i ⟨∙⟩ (g ⟨∙⟩ g ⟨∙⟩ i ⟨∙⟩ i)) ⟨∙⟩ (g ⟨∙⟩ i))) ⟨G,I⟩⊇⟨B,T,I⟩ : ⟨G,I⟩ ⊇ ⟨B,T,I⟩ ⟨G,I⟩⊇⟨B,T,I⟩ [ here x≈B ] = subst′ x≈B b ⟨G,I⟩⊇⟨B,T,I⟩ [ there (here x≈T) ] = subst′ x≈T t ⟨G,I⟩⊇⟨B,T,I⟩ [ there (there (here x≈I)) ] = [ there (here x≈I) ] ⟨G,I⟩⊇⟨B,T,I⟩ (x∈⟨B,T,I⟩ ⟨∙⟩ y∈⟨B,T,I⟩ ∣ xy≈z) = ⟨G,I⟩⊇⟨B,T,I⟩ x∈⟨B,T,I⟩ ⟨∙⟩ ⟨G,I⟩⊇⟨B,T,I⟩ y∈⟨B,T,I⟩ ∣ xy≈z ⟨G,I⟩≐⟨B,T,I⟩ : ⟨ G ∷ I ∷ [] ⟩ ≐ ⟨ B ∷ T ∷ I ∷ [] ⟩ ⟨G,I⟩≐⟨B,T,I⟩ = (⟨G,I⟩⊆⟨B,T,I⟩ , ⟨G,I⟩⊇⟨B,T,I⟩)
{ "alphanum_fraction": 0.4832658282, "avg_line_length": 30.660130719, "ext": "agda", "hexsha": "9bcd293c2d12acd68f5eab50f98492856c7e3029", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "df8bf877e60b3059532c54a247a36a3d83cd55b0", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "splintah/combinatory-logic", "max_forks_repo_path": "Mockingbird/Problems/Chapter20.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "df8bf877e60b3059532c54a247a36a3d83cd55b0", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "splintah/combinatory-logic", "max_issues_repo_path": "Mockingbird/Problems/Chapter20.agda", "max_line_length": 111, "max_stars_count": 1, "max_stars_repo_head_hexsha": "df8bf877e60b3059532c54a247a36a3d83cd55b0", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "splintah/combinatory-logic", "max_stars_repo_path": "Mockingbird/Problems/Chapter20.agda", "max_stars_repo_stars_event_max_datetime": "2022-02-28T23:44:42.000Z", "max_stars_repo_stars_event_min_datetime": "2022-02-28T23:44:42.000Z", "num_tokens": 2261, "size": 4691 }
------------------------------------------------------------------------ -- Bi-invertibility ------------------------------------------------------------------------ -- The development is based on the presentation of bi-invertibility -- (for types and functions) and related things in the HoTT book. {-# OPTIONS --without-K --safe #-} open import Equality open import Prelude hiding (id; _∘_) -- The code is parametrised by something like a "raw" category. module Bi-invertibility {e⁺} (eq : ∀ {a p} → Equality-with-J a p e⁺) {o h} (Obj : Type o) (Hom : Obj → Obj → Type h) (id : {A : Obj} → Hom A A) (_∘′_ : {A B C : Obj} → Hom B C → Hom A B → Hom A C) where open Derived-definitions-and-properties eq open import Equivalence eq as Eq using (_≃_; Is-equivalence) open import Function-universe eq as F hiding (id; _∘_) open import Logical-equivalence using (_⇔_) open import H-level eq open import H-level.Closure eq open import Preimage eq open import Surjection eq using (_↠_) private variable A B : Obj f : Hom A B infixr 9 _∘_ _∘_ : {A B C : Obj} → Hom B C → Hom A B → Hom A C _∘_ = _∘′_ -- Has-left-inverse f means that f has a left inverse. Has-left-inverse : Hom A B → Type h Has-left-inverse f = ∃ λ f⁻¹ → f⁻¹ ∘ f ≡ id -- Has-right-inverse f means that f has a right inverse. Has-right-inverse : Hom A B → Type h Has-right-inverse f = ∃ λ f⁻¹ → f ∘ f⁻¹ ≡ id -- Is-bi-invertible f means that f has a left inverse and a (possibly -- distinct) right inverse. Is-bi-invertible : Hom A B → Type h Is-bi-invertible f = Has-left-inverse f × Has-right-inverse f -- Has-quasi-inverse f means that f has a left inverse that is also a -- right inverse. Has-quasi-inverse : Hom A B → Type h Has-quasi-inverse f = ∃ λ f⁻¹ → f ∘ f⁻¹ ≡ id × f⁻¹ ∘ f ≡ id -- Some notions of isomorphism or equivalence. infix 4 _≊_ _≅_ _≊_ : Obj → Obj → Type h A ≊ B = ∃ λ (f : Hom A B) → Is-bi-invertible f _≅_ : Obj → Obj → Type h A ≅ B = ∃ λ (f : Hom A B) → Has-quasi-inverse f -- Morphisms with quasi-inverses are bi-invertible. Has-quasi-inverse→Is-bi-invertible : (f : Hom A B) → Has-quasi-inverse f → Is-bi-invertible f Has-quasi-inverse→Is-bi-invertible _ (f⁻¹ , f∘f⁻¹≡id , f⁻¹∘f≡id) = (f⁻¹ , f⁻¹∘f≡id) , (f⁻¹ , f∘f⁻¹≡id) ≅→≊ : A ≅ B → A ≊ B ≅→≊ = ∃-cong Has-quasi-inverse→Is-bi-invertible -- The remaining code relies on some further assumptions, similar to -- those of a precategory. However, note that Hom A B is not required -- to be a set (some properties require Hom A A to be a set for some -- A). module More (left-identity : {A B : Obj} (f : Hom A B) → id ∘ f ≡ f) (right-identity : {A B : Obj} (f : Hom A B) → f ∘ id ≡ f) (associativity : {A B C D : Obj} (f : Hom C D) (g : Hom B C) (h : Hom A B) → f ∘ (g ∘ h) ≡ (f ∘ g) ∘ h) where -- Bi-invertible morphisms have quasi-inverses. Is-bi-invertible→Has-quasi-inverse : Is-bi-invertible f → Has-quasi-inverse f Is-bi-invertible→Has-quasi-inverse {f = f} ((f⁻¹₁ , f⁻¹₁∘f≡id) , (f⁻¹₂ , f∘f⁻¹₂≡id)) = (f⁻¹₁ ∘ f ∘ f⁻¹₂) , (f ∘ f⁻¹₁ ∘ f ∘ f⁻¹₂ ≡⟨ cong (f ∘_) $ associativity _ _ _ ⟩ f ∘ (f⁻¹₁ ∘ f) ∘ f⁻¹₂ ≡⟨ cong (λ f′ → f ∘ f′ ∘ f⁻¹₂) f⁻¹₁∘f≡id ⟩ f ∘ id ∘ f⁻¹₂ ≡⟨ cong (f ∘_) $ left-identity _ ⟩ f ∘ f⁻¹₂ ≡⟨ f∘f⁻¹₂≡id ⟩∎ id ∎) , ((f⁻¹₁ ∘ f ∘ f⁻¹₂) ∘ f ≡⟨ cong (λ f′ → (f⁻¹₁ ∘ f′) ∘ f) f∘f⁻¹₂≡id ⟩ (f⁻¹₁ ∘ id) ∘ f ≡⟨ cong (_∘ f) $ right-identity _ ⟩ f⁻¹₁ ∘ f ≡⟨ f⁻¹₁∘f≡id ⟩∎ id ∎) -- Has-left-inverse f is contractible if f has a quasi-inverse. Has-left-inverse-contractible : Has-quasi-inverse f → Contractible (Has-left-inverse f) Has-left-inverse-contractible {f = f} (f⁻¹ , f∘f⁻¹≡id , f⁻¹∘f≡id) = bijection⁻¹-contractible (record { surjection = record { logical-equivalence = record { to = _∘ f ; from = _∘ f⁻¹ } ; right-inverse-of = λ g → (g ∘ f⁻¹) ∘ f ≡⟨ sym $ associativity _ _ _ ⟩ g ∘ f⁻¹ ∘ f ≡⟨ cong (g ∘_) f⁻¹∘f≡id ⟩ g ∘ id ≡⟨ right-identity _ ⟩∎ g ∎ } ; left-inverse-of = λ g → (g ∘ f) ∘ f⁻¹ ≡⟨ sym $ associativity _ _ _ ⟩ g ∘ f ∘ f⁻¹ ≡⟨ cong (g ∘_) f∘f⁻¹≡id ⟩ g ∘ id ≡⟨ right-identity _ ⟩∎ g ∎ }) id -- Has-right-inverse f is contractible if f has a quasi-inverse. Has-right-inverse-contractible : Has-quasi-inverse f → Contractible (Has-right-inverse f) Has-right-inverse-contractible {f = f} (f⁻¹ , f∘f⁻¹≡id , f⁻¹∘f≡id) = bijection⁻¹-contractible (record { surjection = record { logical-equivalence = record { to = f ∘_ ; from = f⁻¹ ∘_ } ; right-inverse-of = λ g → f ∘ f⁻¹ ∘ g ≡⟨ associativity _ _ _ ⟩ (f ∘ f⁻¹) ∘ g ≡⟨ cong (_∘ g) f∘f⁻¹≡id ⟩ id ∘ g ≡⟨ left-identity _ ⟩∎ g ∎ } ; left-inverse-of = λ g → f⁻¹ ∘ f ∘ g ≡⟨ associativity _ _ _ ⟩ (f⁻¹ ∘ f) ∘ g ≡⟨ cong (_∘ g) f⁻¹∘f≡id ⟩ id ∘ g ≡⟨ left-identity _ ⟩∎ g ∎ }) id -- Is-bi-invertible f is a proposition. Is-bi-invertible-propositional : (f : Hom A B) → Is-proposition (Is-bi-invertible f) Is-bi-invertible-propositional f = [inhabited⇒+]⇒+ 0 λ b → let q = Is-bi-invertible→Has-quasi-inverse b in mono₁ 0 $ ×-closure 0 (Has-left-inverse-contractible q) (Has-right-inverse-contractible q) -- If Hom A A is a set, where A is the domain of f, then -- Has-quasi-inverse f is a proposition. Has-quasi-inverse-propositional-domain : {f : Hom A B} → Is-set (Hom A A) → Is-proposition (Has-quasi-inverse f) Has-quasi-inverse-propositional-domain {f = f} s = $⟨ (λ inv → Σ-closure 1 (mono₁ 0 $ Has-right-inverse-contractible inv) (λ _ → s)) ⟩ (Has-quasi-inverse f → Is-proposition (∃ λ ((f⁻¹ , _) : Has-right-inverse f) → f⁻¹ ∘ f ≡ id)) ↝⟨ (∀-cong _ λ _ → H-level-cong _ 1 (inverse Σ-assoc)) ⟩ (Has-quasi-inverse f → Is-proposition (Has-quasi-inverse f)) ↝⟨ [inhabited⇒+]⇒+ 0 ⟩□ Is-proposition (Has-quasi-inverse f) □ -- If Hom B B is a set, where B is the codomain of f, then -- Has-quasi-inverse f is a proposition. Has-quasi-inverse-propositional-codomain : {f : Hom A B} → Is-set (Hom B B) → Is-proposition (Has-quasi-inverse f) Has-quasi-inverse-propositional-codomain {f = f} s = $⟨ (λ inv → Σ-closure 1 (mono₁ 0 $ Has-left-inverse-contractible inv) (λ _ → s)) ⟩ (Has-quasi-inverse f → Is-proposition (∃ λ ((f⁻¹ , _) : Has-left-inverse f) → f ∘ f⁻¹ ≡ id)) ↝⟨ (∀-cong _ λ _ → H-level-cong _ 1 lemma) ⟩ (Has-quasi-inverse f → Is-proposition (Has-quasi-inverse f)) ↝⟨ [inhabited⇒+]⇒+ 0 ⟩□ Is-proposition (Has-quasi-inverse f) □ where lemma = (∃ λ ((f⁻¹ , _) : Has-left-inverse f) → f ∘ f⁻¹ ≡ id) ↔⟨⟩ (∃ λ ((f⁻¹ , _) : ∃ λ f⁻¹ → f⁻¹ ∘ f ≡ id) → f ∘ f⁻¹ ≡ id) ↝⟨ inverse Σ-assoc ⟩ (∃ λ f⁻¹ → f⁻¹ ∘ f ≡ id × f ∘ f⁻¹ ≡ id) ↝⟨ (∃-cong λ _ → ×-comm) ⟩ (∃ λ f⁻¹ → f ∘ f⁻¹ ≡ id × f⁻¹ ∘ f ≡ id) ↔⟨⟩ Has-quasi-inverse f □ -- There is a split surjection from Has-quasi-inverse f to -- Is-bi-invertible f. Has-quasi-inverse↠Is-bi-invertible : Has-quasi-inverse f ↠ Is-bi-invertible f Has-quasi-inverse↠Is-bi-invertible = record { logical-equivalence = record { to = Has-quasi-inverse→Is-bi-invertible _ ; from = Is-bi-invertible→Has-quasi-inverse } ; right-inverse-of = λ _ → Is-bi-invertible-propositional _ _ _ } -- There is a split surjection from A ≅ B to A ≊ B. ≅↠≊ : (A ≅ B) ↠ (A ≊ B) ≅↠≊ = ∃-cong λ _ → Has-quasi-inverse↠Is-bi-invertible -- Is-bi-invertible and Has-quasi-inverse are equivalent for -- morphisms with domain A for which Hom A A is a set. Is-bi-invertible≃Has-quasi-inverse-domain : {f : Hom A B} → Is-set (Hom A A) → Is-bi-invertible f ≃ Has-quasi-inverse f Is-bi-invertible≃Has-quasi-inverse-domain s = inverse $ Eq.↔⇒≃ (record { surjection = Has-quasi-inverse↠Is-bi-invertible ; left-inverse-of = λ _ → Has-quasi-inverse-propositional-domain s _ _ }) -- Is-bi-invertible and Has-quasi-inverse are equivalent for -- morphisms with codomain B for which Hom B B is a set. Is-bi-invertible≃Has-quasi-inverse-codomain : {f : Hom A B} → Is-set (Hom B B) → Is-bi-invertible f ≃ Has-quasi-inverse f Is-bi-invertible≃Has-quasi-inverse-codomain s = inverse $ Eq.↔⇒≃ (record { surjection = Has-quasi-inverse↠Is-bi-invertible ; left-inverse-of = λ _ → Has-quasi-inverse-propositional-codomain s _ _ }) -- A ≊ B and A ≅ B are equivalent if Hom A A is a set. ≊≃≅-domain : Is-set (Hom A A) → (A ≊ B) ≃ (A ≅ B) ≊≃≅-domain s = ∃-cong λ _ → Is-bi-invertible≃Has-quasi-inverse-domain s -- A ≊ B and A ≅ B are equivalent if Hom B B is a set. ≊≃≅-codomain : Is-set (Hom B B) → (A ≊ B) ≃ (A ≅ B) ≊≃≅-codomain s = ∃-cong λ _ → Is-bi-invertible≃Has-quasi-inverse-codomain s -- An equality characterisation lemma for _≊_. equality-characterisation-≊ : (f g : A ≊ B) → (f ≡ g) ≃ (proj₁ f ≡ proj₁ g) equality-characterisation-≊ _ _ = Eq.↔⇒≃ $ inverse $ ignore-propositional-component $ Is-bi-invertible-propositional _ -- Two equality characterisation lemmas for _≅_. equality-characterisation-≅-domain : Is-set (Hom A A) → (f g : A ≅ B) → (f ≡ g) ≃ (proj₁ f ≡ proj₁ g) equality-characterisation-≅-domain s _ _ = Eq.↔⇒≃ $ inverse $ ignore-propositional-component $ Has-quasi-inverse-propositional-domain s equality-characterisation-≅-codomain : Is-set (Hom B B) → (f g : A ≅ B) → (f ≡ g) ≃ (proj₁ f ≡ proj₁ g) equality-characterisation-≅-codomain s _ _ = Eq.↔⇒≃ $ inverse $ ignore-propositional-component $ Has-quasi-inverse-propositional-codomain s -- If f : Hom A B has a quasi-inverse, then Has-quasi-inverse f is -- equivalent to id ≡ id, where id stands for either the identity at -- A or at B. Has-quasi-inverse≃id≡id-domain : {f : Hom A B} → Has-quasi-inverse f → Has-quasi-inverse f ≃ (id ≡ id {A = A}) Has-quasi-inverse≃id≡id-domain {f = f} q-inv@(f⁻¹ , _ , f⁻¹∘f≡id) = Has-quasi-inverse f ↔⟨ Σ-assoc ⟩ (∃ λ ((f⁻¹ , _) : Has-right-inverse f) → f⁻¹ ∘ f ≡ id) ↔⟨ drop-⊤-left-Σ (_⇔_.to contractible⇔↔⊤ $ Has-right-inverse-contractible q-inv) ⟩ (f⁻¹ ∘ id) ∘ f ≡ id ↝⟨ ≡⇒↝ _ $ cong (λ f′ → f′ ∘ _ ≡ _) $ right-identity _ ⟩ f⁻¹ ∘ f ≡ id ↝⟨ ≡⇒↝ _ $ cong (_≡ _) f⁻¹∘f≡id ⟩□ id ≡ id □ Has-quasi-inverse≃id≡id-codomain : {f : Hom A B} → Has-quasi-inverse f → Has-quasi-inverse f ≃ (id ≡ id {A = B}) Has-quasi-inverse≃id≡id-codomain {f = f} q-inv@(f⁻¹ , f∘f⁻¹≡id , _) = Has-quasi-inverse f ↔⟨ Σ-assoc F.∘ (∃-cong λ _ → ×-comm) ⟩ (∃ λ ((f⁻¹ , _) : Has-left-inverse f) → f ∘ f⁻¹ ≡ id) ↔⟨ drop-⊤-left-Σ (_⇔_.to contractible⇔↔⊤ $ Has-left-inverse-contractible q-inv) ⟩ f ∘ id ∘ f⁻¹ ≡ id ↝⟨ ≡⇒↝ _ $ cong (λ f′ → _ ∘ f′ ≡ _) $ left-identity _ ⟩ f ∘ f⁻¹ ≡ id ↝⟨ ≡⇒↝ _ $ cong (_≡ _) f∘f⁻¹≡id ⟩□ id ≡ id □ ---------------------------------------------------------------------- -- Univalence -- The relation _≅_ is reflexive. id-≅ : A ≅ A id-≅ = id , id , left-identity id , right-identity id -- Equal objects are related by _≅_. ≡→≅ : A ≡ B → A ≅ B ≡→≅ = elim (λ {A B} _ → A ≅ B) (λ _ → id-≅) -- A "computation" rule for ≡→≅. ≡→≅-refl : ≡→≅ (refl A) ≡ id-≅ ≡→≅-refl = elim-refl _ _ -- A notion of univalence, defined using _≅_. Univalence-≅ : Type (o ⊔ h) Univalence-≅ = {A B : Obj} → Is-equivalence (≡→≅ {A = A} {B = B}) -- If equality is equivalent to _≅_, then univalence holds. ≡≃≅→Univalence-≅ : (∀ {A B} → (A ≡ B) ≃ (A ≅ B)) → Univalence-≅ ≡≃≅→Univalence-≅ ≡≃≅ = Eq.≡≃→≡→→Is-equivalence (_ ≅_) ≡≃≅ ≡→≅ -- The relation _≊_ is reflexive. id-≊ : A ≊ A id-≊ = id , (id , left-identity id) , (id , right-identity id) -- Equal objects are related by _≊_. ≡→≊ : A ≡ B → A ≊ B ≡→≊ = elim (λ {A B} _ → A ≊ B) (λ _ → id-≊) -- A "computation" rule for ≡→≊. ≡→≊-refl : ≡→≊ (refl A) ≡ id-≊ ≡→≊-refl = elim-refl _ _ -- A notion of univalence, defined using _≊_. Univalence-≊ : Type (o ⊔ h) Univalence-≊ = {A B : Obj} → Is-equivalence (≡→≊ {A = A} {B = B}) -- If equality is equivalent to _≊_, then univalence holds. ≡≃≊→Univalence-≊ : (∀ {A B} → (A ≡ B) ≃ (A ≊ B)) → Univalence-≊ ≡≃≊→Univalence-≊ ≡≃≊ = Eq.≡≃→≡→→Is-equivalence (_ ≊_) ≡≃≊ ≡→≊
{ "alphanum_fraction": 0.5075116686, "avg_line_length": 34.6262626263, "ext": "agda", "hexsha": "27b1be3085eb506ad30bdd7ad01873201414ca43", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "402b20615cfe9ca944662380d7b2d69b0f175200", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "nad/equality", "max_forks_repo_path": "src/Bi-invertibility.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "402b20615cfe9ca944662380d7b2d69b0f175200", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "nad/equality", "max_issues_repo_path": "src/Bi-invertibility.agda", "max_line_length": 142, "max_stars_count": 3, "max_stars_repo_head_hexsha": "402b20615cfe9ca944662380d7b2d69b0f175200", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "nad/equality", "max_stars_repo_path": "src/Bi-invertibility.agda", "max_stars_repo_stars_event_max_datetime": "2021-09-02T17:18:15.000Z", "max_stars_repo_stars_event_min_datetime": "2020-05-21T22:58:50.000Z", "num_tokens": 5269, "size": 13712 }
------------------------------------------------------------------------ -- The Agda standard library -- -- Properties for distributive lattice ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Relation.Binary.Lattice module Relation.Binary.Properties.DistributiveLattice {c ℓ₁ ℓ₂} (L : DistributiveLattice c ℓ₁ ℓ₂) where open DistributiveLattice L hiding (refl) open import Algebra.FunctionProperties _≈_ open import Data.Product using (_,_) open import Relation.Binary open import Relation.Binary.Reasoning.Setoid setoid open import Relation.Binary.Properties.Lattice lattice open import Relation.Binary.Properties.MeetSemilattice meetSemilattice open import Relation.Binary.Properties.JoinSemilattice joinSemilattice open Setoid setoid ∧-distribʳ-∨ : _∧_ DistributesOverʳ _∨_ ∧-distribʳ-∨ x y z = begin (y ∨ z) ∧ x ≈⟨ ∧-comm _ _ ⟩ x ∧ (y ∨ z) ≈⟨ ∧-distribˡ-∨ x y z ⟩ x ∧ y ∨ x ∧ z ≈⟨ ∨-cong (∧-comm _ _) (∧-comm _ _) ⟩ y ∧ x ∨ z ∧ x ∎ ∧-distrib-∨ : _∧_ DistributesOver _∨_ ∧-distrib-∨ = ∧-distribˡ-∨ , ∧-distribʳ-∨ ∨-distribˡ-∧ : _∨_ DistributesOverˡ _∧_ ∨-distribˡ-∧ x y z = begin x ∨ y ∧ z ≈⟨ ∨-cong (sym (∨-absorbs-∧ x y)) refl ⟩ (x ∨ x ∧ y) ∨ y ∧ z ≈⟨ ∨-cong (∨-cong refl (∧-comm _ _)) refl ⟩ (x ∨ y ∧ x) ∨ y ∧ z ≈⟨ ∨-assoc x (y ∧ x) (y ∧ z) ⟩ x ∨ y ∧ x ∨ y ∧ z ≈⟨ ∨-cong refl (sym (∧-distribˡ-∨ y x z)) ⟩ x ∨ y ∧ (x ∨ z) ≈⟨ ∨-cong (sym (∧-absorbs-∨ _ _)) refl ⟩ x ∧ (x ∨ z) ∨ y ∧ (x ∨ z) ≈⟨ sym (∧-distribʳ-∨ (x ∨ z) x y) ⟩ (x ∨ y) ∧ (x ∨ z) ∎ ∨-distribʳ-∧ : _∨_ DistributesOverʳ _∧_ ∨-distribʳ-∧ x y z = begin y ∧ z ∨ x ≈⟨ ∨-comm _ _ ⟩ x ∨ y ∧ z ≈⟨ ∨-distribˡ-∧ _ _ _ ⟩ (x ∨ y) ∧ (x ∨ z) ≈⟨ ∧-cong (∨-comm _ _) (∨-comm _ _) ⟩ (y ∨ x) ∧ (z ∨ x) ∎ ∨-distrib-∧ : _∨_ DistributesOver _∧_ ∨-distrib-∧ = ∨-distribˡ-∧ , ∨-distribʳ-∧
{ "alphanum_fraction": 0.5229736706, "avg_line_length": 35.2181818182, "ext": "agda", "hexsha": "d8651a8ae35eb765f4223a85dc1093903b9b2530", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "0debb886eb5dbcd38dbeebd04b34cf9d9c5e0e71", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "omega12345/agda-mode", "max_forks_repo_path": "test/asset/agda-stdlib-1.0/Relation/Binary/Properties/DistributiveLattice.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "0debb886eb5dbcd38dbeebd04b34cf9d9c5e0e71", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "omega12345/agda-mode", "max_issues_repo_path": "test/asset/agda-stdlib-1.0/Relation/Binary/Properties/DistributiveLattice.agda", "max_line_length": 72, "max_stars_count": null, "max_stars_repo_head_hexsha": "0debb886eb5dbcd38dbeebd04b34cf9d9c5e0e71", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "omega12345/agda-mode", "max_stars_repo_path": "test/asset/agda-stdlib-1.0/Relation/Binary/Properties/DistributiveLattice.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 843, "size": 1937 }
{-# OPTIONS --allow-unsolved-metas #-} module InnerProduct where open import Algebra.Bundles using (CommutativeRing) open import NormedModule using (NormedModule) open import Level using (_⊔_; suc) open import Relation.Nullary using (¬_) module _ {r ℓr} (CR : CommutativeRing r ℓr) m ℓm rel where module _ {r ℓr} {CR : CommutativeRing r ℓr} (open CommutativeRing CR renaming (Carrier to S)) {rel} {_<_ : S → S → Set rel} (STO : IsStrictTotalOrder _≈_ _<_) (_† : S → S) {m ℓm} (M : Module CR m ℓm) (open Module M renaming (Carrierᴹ to A)) (⟨_,_⟩ : A → A → S) where record IsInnerProduct : Set (r ⊔ ℓr ⊔ suc (m ⊔ ℓm ⊔ rel)) where field ⟨,⟩-linear-+ : ∀ x y z → ⟨ x +ᴹ y , z ⟩ ≈ ⟨ x , z ⟩ + ⟨ y , z ⟩ ⟨,⟩-linear-* : ∀ s x y → ⟨ s *ₗ x , y ⟩ ≈ s * ⟨ x , y ⟩ ⟨,⟩-cong : ∀ {x y} → x ≈ᴹ y → ⟨ x , x ⟩ ≈ ⟨ y , y ⟩ †-linear-+ : ∀ x y → (x + y) † ≈ x † + y † †-cong : ∀ {s t} → s ≈ t → s † ≈ t † †-inv : ∀ s → (s †) † ≈ s ⟨,⟩-herm : ∀ x y → ⟨ x , y ⟩ ≈ ⟨ y , x ⟩ † real : S → Set _ real s = s ≈ s † field ⟨x,x⟩-real : ∀ x → real ⟨ x , x ⟩ positive-definite : ∀ {x} → ¬ (x ≈ᴹ 0ᴹ) → 0# < ⟨ x , x ⟩ open IsStrictTotalOrder STO public open import Relation.Binary.Construct.StrictToNonStrict _≈_ _<_ public using (_≤_) _-ᴹ_ : A → A → A x -ᴹ y = x +ᴹ (-ᴹ y) ∥_∥² : A → S ∥ x ∥² = ⟨ x , x ⟩ -- TODO -- is this universally true? -- or just common? ∥-x∥²≈∥x∥² : ∀ x → ∥ -ᴹ x ∥² ≈ ∥ x ∥² ∥-x∥²≈∥x∥² = {! !} -- ∥a-b∥≤∥a∥-∥b∥ : ∀ a b → ∥ a -ᴹ b ∥² ≤ ∥ a ∥² - ∥ b ∥² -- ∥a-b∥≤∥a∥-∥b∥ = {! !} [s+s†]†≈s+s† : ∀ s → (s + s †) † ≈ s + s † [s+s†]†≈s+s† s = begin (s + s †) † ≈⟨ †-linear-+ s (s †) ⟩ (s † + (s †) †) ≈⟨ +-cong refl (†-inv _) ⟩ (s † + s) ≈⟨ +-comm _ _ ⟩ (s + s †) ∎ where open import Relation.Binary.Reasoning.Setoid setoid
{ "alphanum_fraction": 0.4441611423, "avg_line_length": 25.4675324675, "ext": "agda", "hexsha": "e61ccac0e0149e30e2a3cd1b5bc48b17f127af16", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "78c3dec24834ffeca5e74cb75578e9b210a5be62", "max_forks_repo_licenses": [ "CC0-1.0" ], "max_forks_repo_name": "cspollard/diff", "max_forks_repo_path": "src/InnerProduct.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "78c3dec24834ffeca5e74cb75578e9b210a5be62", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "CC0-1.0" ], "max_issues_repo_name": "cspollard/diff", "max_issues_repo_path": "src/InnerProduct.agda", "max_line_length": 86, "max_stars_count": null, "max_stars_repo_head_hexsha": "78c3dec24834ffeca5e74cb75578e9b210a5be62", "max_stars_repo_licenses": [ "CC0-1.0" ], "max_stars_repo_name": "cspollard/diff", "max_stars_repo_path": "src/InnerProduct.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 948, "size": 1961 }
{-# OPTIONS --without-K #-} module Stream where open import Level as Level using (zero) import Relation.Binary as BinRel open import Relation.Binary as BinRel hiding (Setoid; Rel) open import Relation.Binary.PropositionalEquality as PE Setoid = BinRel.Setoid Level.zero Level.zero open import Data.Nat using (ℕ; zero; suc) open import PropsAsTypes record Stream (A : Set) : Set where coinductive field hd : A tl : Stream A open Stream public coiter : {X A : Set} → (X → A × X) → (X → Stream A) coiter c x .hd = π₁ (c x) coiter c x .tl = coiter c (π₂ (c x)) δ : ∀{A} → ℕ → Stream A → Stream A δ 0 s = s δ (suc n) s = δ n (s .tl) _at_ : ∀{A} → Stream A → ℕ → A s at n = (δ n s) .hd module Bisim (A : Set) where infix 2 _~_ record _~_ (s t : Stream A) : Prop where coinductive field hd≡ : s .hd ≡ t .hd tl~ : s .tl ~ t .tl open _~_ public isBisim : Rel (Stream A) → Prop isBisim _R_ = ∀ s t → s R t → (s .hd ≡ t .hd) ∧ (s .tl R t .tl) ∃-bisim→~ : ∀ {_R_} → isBisim _R_ → ∀ (s t : Stream A) → s R t → s ~ t ∃-bisim→~ R-isBisim s t q .hd≡ = ∧-elim₁ (R-isBisim s t q) ∃-bisim→~ R-isBisim s t q .tl~ = ∃-bisim→~ R-isBisim (s .tl) (t .tl) (∧-elim₂ (R-isBisim s t q)) bisim→ext-≡ : ∀ {s t} → s ~ t → (∀ n → s at n ≡ t at n) bisim→ext-≡ p zero = p .hd≡ bisim→ext-≡ p (suc n) = bisim→ext-≡ (p .tl~) n s-bisim-refl : ∀ {s : Stream A} → s ~ s s-bisim-refl .hd≡ = PE.refl s-bisim-refl {s} .tl~ = s-bisim-refl {s .tl} s-bisim-sym : ∀ {s t : Stream A} → s ~ t → t ~ s s-bisim-sym p .hd≡ = PE.sym (p .hd≡) s-bisim-sym p .tl~ = s-bisim-sym (p .tl~) s-bisim-trans : ∀ {r s t : Stream A} → r ~ s → s ~ t → r ~ t s-bisim-trans p q .hd≡ = PE.trans (p .hd≡) (q .hd≡) s-bisim-trans p q .tl~ = s-bisim-trans (p .tl~) (q .tl~) stream-setoid : Setoid stream-setoid = record { Carrier = Stream A ; _≈_ = _~_ ; isEquivalence = record { refl = s-bisim-refl ; sym = s-bisim-sym ; trans = s-bisim-trans } } import Relation.Binary.EqReasoning as EqR module ~-Reasoning where module _ where open EqR (stream-setoid) public hiding (_≡⟨_⟩_) renaming (_≈⟨_⟩_ to _~⟨_⟩_; begin_ to begin_; _∎ to _∎)
{ "alphanum_fraction": 0.5446234219, "avg_line_length": 27.0235294118, "ext": "agda", "hexsha": "407a08c39fd42c04644eba82bc07d48568a2e5d7", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "8fc7a6cd878f37f9595124ee8dea62258da28aa4", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "hbasold/Sandbox", "max_forks_repo_path": "TypeTheory/Lecture/Stream.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "8fc7a6cd878f37f9595124ee8dea62258da28aa4", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "hbasold/Sandbox", "max_issues_repo_path": "TypeTheory/Lecture/Stream.agda", "max_line_length": 79, "max_stars_count": null, "max_stars_repo_head_hexsha": "8fc7a6cd878f37f9595124ee8dea62258da28aa4", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "hbasold/Sandbox", "max_stars_repo_path": "TypeTheory/Lecture/Stream.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 979, "size": 2297 }
open import Issue1296.SolvedMeta -- Expected error:
{ "alphanum_fraction": 0.7924528302, "avg_line_length": 13.25, "ext": "agda", "hexsha": "60e83da8b3d92cf963d808b334f70eed7e91ebe0", "lang": "Agda", "max_forks_count": 371, "max_forks_repo_forks_event_max_datetime": "2022-03-30T19:00:30.000Z", "max_forks_repo_forks_event_min_datetime": "2015-01-03T14:04:08.000Z", "max_forks_repo_head_hexsha": "7f58030124fa99dfbf8db376659416f3ad8384de", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "cruhland/agda", "max_forks_repo_path": "test/Fail/Issue1296.agda", "max_issues_count": 4066, "max_issues_repo_head_hexsha": "7f58030124fa99dfbf8db376659416f3ad8384de", "max_issues_repo_issues_event_max_datetime": "2022-03-31T21:14:49.000Z", "max_issues_repo_issues_event_min_datetime": "2015-01-10T11:24:51.000Z", "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "cruhland/agda", "max_issues_repo_path": "test/Fail/Issue1296.agda", "max_line_length": 32, "max_stars_count": 1989, "max_stars_repo_head_hexsha": "7f58030124fa99dfbf8db376659416f3ad8384de", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "cruhland/agda", "max_stars_repo_path": "test/Fail/Issue1296.agda", "max_stars_repo_stars_event_max_datetime": "2022-03-30T18:20:48.000Z", "max_stars_repo_stars_event_min_datetime": "2015-01-09T23:51:16.000Z", "num_tokens": 13, "size": 53 }
module Dave.Algebra.Naturals.Addition where open import Dave.Algebra.Naturals.Definition public open import Dave.Extensionality _+_ : ℕ → ℕ → ℕ zero + b = b suc a + b = suc (a + b) infixl 6 _+_ {- Semigroup -} +-assoc : associative _+_ +-assoc zero n p = refl +-assoc (suc m) n p = cong suc (+-assoc m n p) +-assoc' : associative _+_ +-assoc' zero n p = begin (zero + n) + p ≡⟨⟩ n + p ≡⟨⟩ zero + (n + p) ∎ +-assoc' (suc m) n p = begin (suc m + n) + p ≡⟨⟩ suc (m + n) + p ≡⟨⟩ suc ((m + n) + p) ≡⟨ cong suc (+-assoc' m n p) ⟩ suc (m + (n + p)) ∎ ℕ-+-IsSemigroup : IsSemigroup _+_ IsSemigroup.assoc ℕ-+-IsSemigroup = +-assoc ℕ-+-Semigroup : Semigroup Semigroup.Carrier ℕ-+-Semigroup = ℕ Semigroup._·_ ℕ-+-Semigroup = _+_ Semigroup.isSemigroup ℕ-+-Semigroup = ℕ-+-IsSemigroup {- Identity -} +-right-identity : right-identity _+_ 0 +-right-identity zero = refl +-right-identity (suc n) = cong suc (+-right-identity n) +-left-identity : left-identity _+_ 0 +-left-identity m = refl ℕ-+-HasIdentity : Identity _+_ 0 Identity.left ℕ-+-HasIdentity = +-left-identity Identity.right ℕ-+-HasIdentity = +-right-identity {- Monoid -} ℕ-+-IsMonoid : IsMonoid _+_ 0 IsMonoid.semigroup ℕ-+-IsMonoid = ℕ-+-IsSemigroup IsMonoid.identity ℕ-+-IsMonoid = ℕ-+-HasIdentity ℕ-+-Monoid : Monoid Monoid.Carrier ℕ-+-Monoid = ℕ Monoid._·_ ℕ-+-Monoid = _+_ Monoid.e ℕ-+-Monoid = 0 Monoid.isMonoid ℕ-+-Monoid = ℕ-+-IsMonoid {- Commutative Monoid -} +-suc : ∀ (m n : ℕ) → m + suc n ≡ suc (m + n) +-suc zero n = refl +-suc (suc m) n = cong suc (+-suc m n) +-comm : commutative _+_ +-comm m zero = +-right-identity m +-comm m (suc n) = trans (+-suc m n) (cong suc (+-comm m n)) +-comm' : commutative _+_ +-comm' m zero = +-right-identity m +-comm' m (suc n) = begin (m + suc n) ≡⟨ +-suc m n ⟩ suc (m + n) ≡⟨ cong suc (+-comm' m n) ⟩ suc (n + m) ∎ ℕ-+-IsCommutativeMonoid : IsCommutativeMonoid _+_ 0 IsCommutativeMonoid.isSemigroup ℕ-+-IsCommutativeMonoid = ℕ-+-IsSemigroup IsCommutativeMonoid.leftIdentity ℕ-+-IsCommutativeMonoid = +-left-identity IsCommutativeMonoid.comm ℕ-+-IsCommutativeMonoid = +-comm {- Additional Theorems -} +-add1ᵣ : ∀ (m : ℕ) → m + 1 ≡ suc m +-add1ᵣ zero = refl +-add1ᵣ (suc m) = cong suc (+-add1ᵣ m) +-add1ₗ : ∀ (m : ℕ) → 1 + m ≡ suc m +-add1ₗ m = refl {- Another equal Addition Definition -} _+´_ : ℕ → ℕ → ℕ m +´ zero = m m +´ suc n = suc (m +´ n) app-+≡+´ : ∀ (m n : ℕ) → m + n ≡ m +´ n app-+≡+´ zero zero = refl app-+≡+´ zero (suc n) = cong suc (app-+≡+´ zero n) app-+≡+´ (suc m) zero = cong suc (app-+≡+´ m zero) app-+≡+´ (suc m) (suc n) = cong suc ( begin m + suc n ≡⟨ +-suc m n ⟩ suc m + n ≡⟨ app-+≡+´ (suc m) n ⟩ suc m +´ n ∎ ) +≡+´ : _+_ ≡ _+´_ +≡+´ = extensionality (λ m → extensionality (λ n → app-+≡+´ m n))
{ "alphanum_fraction": 0.5643463497, "avg_line_length": 28.3173076923, "ext": "agda", "hexsha": "afbe5a867ed49fc87df673b4079d78536acd51b9", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "05213fb6ab1f51f770f9858b61526ba950e06232", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "DavidStahl97/formal-proofs", "max_forks_repo_path": "Dave/Algebra/Naturals/Addition.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "05213fb6ab1f51f770f9858b61526ba950e06232", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "DavidStahl97/formal-proofs", "max_issues_repo_path": "Dave/Algebra/Naturals/Addition.agda", "max_line_length": 76, "max_stars_count": null, "max_stars_repo_head_hexsha": "05213fb6ab1f51f770f9858b61526ba950e06232", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "DavidStahl97/formal-proofs", "max_stars_repo_path": "Dave/Algebra/Naturals/Addition.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 1236, "size": 2945 }
{-# OPTIONS --cubical #-} open import Agda.Primitive.Cubical renaming ( primIMin to _∧_ -- I → I → I ; primIMax to _∨_ -- I → I → I ; primINeg to ~_ -- I → I ) infix 10 _≡_ postulate _≡_ : I → I → Set refl : ∀ {i} → i ≡ i module Vars (i j k : I) where _ : i ∧ i1 ≡ i _ = refl _ : i ∧ i0 ≡ i0 _ = refl _ : i1 ∧ i ≡ i _ = refl _ : i0 ∧ i ≡ i0 _ = refl _ : i ∧ j ≡ j ∧ i _ = refl _ : i ∧ (j ∧ k) ≡ (i ∧ j) ∧ k _ = refl _ : i ∧ i ≡ i _ = refl _ : i ∨ j ≡ j ∨ i _ = refl _ : i ∨ (j ∨ k) ≡ (i ∨ j) ∨ k _ = refl _ : i ∨ i ≡ i _ = refl _ : i ∨ i1 ≡ i1 _ = refl _ : i ∨ i0 ≡ i _ = refl _ : i1 ∨ i ≡ i1 _ = refl _ : i0 ∨ i ≡ i _ = refl _ : ~ i0 ≡ i1 _ = refl _ : ~ i1 ≡ i0 _ = refl _ : ~ (~ i) ≡ i _ = refl _ : ~ (i ∧ j) ≡ ~ i ∨ ~ j _ = refl _ : ~ (i ∨ j) ≡ ~ i ∧ ~ j _ = refl _ : i ∧ (j ∨ k) ≡ (i ∧ j) ∨ (i ∧ k) _ = refl _ : i ∨ (j ∧ k) ≡ (i ∨ j) ∧ (i ∨ k) _ = refl module Postulates where postulate i j k : I _ : i ∧ i1 ≡ i _ = refl _ : i ∧ i0 ≡ i0 _ = refl _ : i1 ∧ i ≡ i _ = refl _ : i0 ∧ i ≡ i0 _ = refl _ : i ∧ j ≡ j ∧ i _ = refl _ : i ∧ (j ∧ k) ≡ (i ∧ j) ∧ k _ = refl _ : i ∧ i ≡ i _ = refl _ : i ∨ j ≡ j ∨ i _ = refl _ : i ∨ (j ∨ k) ≡ (i ∨ j) ∨ k _ = refl _ : i ∨ i ≡ i _ = refl _ : i ∨ i1 ≡ i1 _ = refl _ : i ∨ i0 ≡ i _ = refl _ : i1 ∨ i ≡ i1 _ = refl _ : i0 ∨ i ≡ i _ = refl _ : ~ i0 ≡ i1 _ = refl _ : ~ i1 ≡ i0 _ = refl _ : ~ (~ i) ≡ i _ = refl _ : ~ (i ∧ j) ≡ ~ i ∨ ~ j _ = refl _ : ~ (i ∨ j) ≡ ~ i ∧ ~ j _ = refl _ : i ∧ (j ∨ k) ≡ (i ∧ j) ∨ (i ∧ k) _ = refl _ : i ∨ (j ∧ k) ≡ (i ∨ j) ∧ (i ∨ k) _ = refl
{ "alphanum_fraction": 0.3467561521, "avg_line_length": 12.2465753425, "ext": "agda", "hexsha": "f803636714c4b821cf6d691b036de278b3470def", "lang": "Agda", "max_forks_count": 371, "max_forks_repo_forks_event_max_datetime": "2022-03-30T19:00:30.000Z", "max_forks_repo_forks_event_min_datetime": "2015-01-03T14:04:08.000Z", "max_forks_repo_head_hexsha": "231d6ad8e77b67ff8c4b1cb35a6c31ccd988c3e9", "max_forks_repo_licenses": [ "BSD-3-Clause" ], "max_forks_repo_name": "Agda-zh/agda", "max_forks_repo_path": "test/Succeed/Issue2582.agda", "max_issues_count": 4066, "max_issues_repo_head_hexsha": "ed8ac6f4062ea8a20fa0f62d5db82d4e68278338", "max_issues_repo_issues_event_max_datetime": "2022-03-31T21:14:49.000Z", "max_issues_repo_issues_event_min_datetime": "2015-01-10T11:24:51.000Z", "max_issues_repo_licenses": [ "BSD-3-Clause" ], "max_issues_repo_name": "shlevy/agda", "max_issues_repo_path": "test/Succeed/Issue2582.agda", "max_line_length": 48, "max_stars_count": 1989, "max_stars_repo_head_hexsha": "ed8ac6f4062ea8a20fa0f62d5db82d4e68278338", "max_stars_repo_licenses": [ "BSD-3-Clause" ], "max_stars_repo_name": "shlevy/agda", "max_stars_repo_path": "test/Succeed/Issue2582.agda", "max_stars_repo_stars_event_max_datetime": "2022-03-30T18:20:48.000Z", "max_stars_repo_stars_event_min_datetime": "2015-01-09T23:51:16.000Z", "num_tokens": 961, "size": 1788 }
------------------------------------------------------------------------ -- The Agda standard library -- -- Every respectful unary relation induces a preorder. No claim is -- made that this preorder is unique. ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Relation.Binary open import Relation.Unary using (Pred) module Relation.Binary.Construct.FromPred {s₁ s₂} (S : Setoid s₁ s₂) -- The underlying equality {p} (P : Pred (Setoid.Carrier S) p) -- The predicate where open import Function open import Data.Product open module Eq = Setoid S using (_≈_) renaming (Carrier to A) ------------------------------------------------------------------------ -- Definition Resp : Rel A p Resp x y = P x → P y ------------------------------------------------------------------------ -- Properties reflexive : P Respects _≈_ → _≈_ ⇒ Resp reflexive resp = resp refl : P Respects _≈_ → Reflexive Resp refl resp = resp Eq.refl trans : Transitive Resp trans x⇒y y⇒z = y⇒z ∘ x⇒y isPreorder : P Respects _≈_ → IsPreorder _≈_ Resp isPreorder resp = record { isEquivalence = Eq.isEquivalence ; reflexive = reflexive resp ; trans = flip _∘′_ } preorder : P Respects _≈_ → Preorder _ _ _ preorder resp = record { isPreorder = isPreorder resp }
{ "alphanum_fraction": 0.5360059391, "avg_line_length": 25.9038461538, "ext": "agda", "hexsha": "dab90acb726279521d32be387fedbbf5b03fc988", "lang": "Agda", "max_forks_count": 1, "max_forks_repo_forks_event_max_datetime": "2021-11-04T06:54:45.000Z", "max_forks_repo_forks_event_min_datetime": "2021-11-04T06:54:45.000Z", "max_forks_repo_head_hexsha": "0debb886eb5dbcd38dbeebd04b34cf9d9c5e0e71", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "omega12345/agda-mode", "max_forks_repo_path": "test/asset/agda-stdlib-1.0/Relation/Binary/Construct/FromPred.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "0debb886eb5dbcd38dbeebd04b34cf9d9c5e0e71", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "omega12345/agda-mode", "max_issues_repo_path": "test/asset/agda-stdlib-1.0/Relation/Binary/Construct/FromPred.agda", "max_line_length": 72, "max_stars_count": 5, "max_stars_repo_head_hexsha": "0debb886eb5dbcd38dbeebd04b34cf9d9c5e0e71", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "omega12345/agda-mode", "max_stars_repo_path": "test/asset/agda-stdlib-1.0/Relation/Binary/Construct/FromPred.agda", "max_stars_repo_stars_event_max_datetime": "2020-10-10T21:41:32.000Z", "max_stars_repo_stars_event_min_datetime": "2020-10-07T12:07:53.000Z", "num_tokens": 341, "size": 1347 }
module Dave.Structures.Monoid where open import Dave.Structures.Semigroup public record Identity {A : Set} (_·_ : op₂ A) (e : A) : Set where field left : left-identity _·_ e right : right-identity _·_ e record IsMonoid {A : Set} (_·_ : op₂ A) (e : A) : Set where field semigroup : IsSemigroup _·_ identity : Identity _·_ e record Monoid : Set₁ where field Carrier : Set _·_ : op₂ Carrier e : Carrier isMonoid : IsMonoid _·_ e record IsCommutativeMonoid {A : Set} (_·_ : op₂ A) (e : A) : Set where field isSemigroup : IsSemigroup _·_ leftIdentity : left-identity _·_ e comm : commutative _·_ rightIdentity : right-identity _·_ e rightIdentity m = begin m · e ≡⟨ comm m e ⟩ e · m ≡⟨ leftIdentity m ⟩ m ∎ identity : Identity _·_ e Identity.left identity = leftIdentity Identity.right identity = rightIdentity isMonoid : IsMonoid _·_ e IsMonoid.semigroup isMonoid = isSemigroup IsMonoid.identity isMonoid = identity swap021 : ∀ (m n p : A) → (m · n) · p ≡ (m · p) · n swap021 m n p = begin (m · n) · p ≡⟨ IsSemigroup.assoc isSemigroup m n p ⟩ m · (n · p) ≡⟨ cong (λ a → m · a) (comm n p) ⟩ m · (p · n) ≡⟨ sym (IsSemigroup.assoc isSemigroup m p n) ⟩ (m · p) · n ∎ swap102 : ∀ (m n p : A) → (m · n) · p ≡ (n · m) · p swap102 m n p = begin (m · n) · p ≡⟨ cong (λ a → a · p) (comm m n) ⟩ (n · m) · p ∎ swap120 : ∀ (m n p : A) → (m · n) · p ≡ (n · m) · p swap120 m n p = begin (m · n) · p ≡⟨ cong (λ a → a · p) (comm m n) ⟩ (n · m) · p ∎ swap210 : ∀ (m n p : A) → (m · n) · p ≡ (p · n) · m swap210 m n p = begin (m · n) · p ≡⟨ comm (m · n) p ⟩ p · (m · n) ≡⟨ cong (λ a → p · a) (comm m n) ⟩ p · (n · m) ≡⟨ sym (IsSemigroup.assoc isSemigroup p n m) ⟩ (p · n) · m ∎ swap201 : ∀ (m n p : A) → (m · n) · p ≡ (p · m) · n swap201 m n p = begin (m · n) · p ≡⟨ comm (m · n) p ⟩ p · (m · n) ≡⟨ sym (IsSemigroup.assoc isSemigroup p m n) ⟩ (p · m) · n ∎ record CommutativeMonoid : Set₁ where field Carrier : Set _·_ : op₂ Carrier e : Carrier isCommutativeMonoid : IsCommutativeMonoid _·_ e
{ "alphanum_fraction": 0.4506503443, "avg_line_length": 34.3947368421, "ext": "agda", "hexsha": "38ecb7e232fb7aba6f33c6cae7a4c27925ec76ee", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "05213fb6ab1f51f770f9858b61526ba950e06232", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "DavidStahl97/formal-proofs", "max_forks_repo_path": "Dave/Structures/Monoid.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "05213fb6ab1f51f770f9858b61526ba950e06232", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "DavidStahl97/formal-proofs", "max_issues_repo_path": "Dave/Structures/Monoid.agda", "max_line_length": 74, "max_stars_count": null, "max_stars_repo_head_hexsha": "05213fb6ab1f51f770f9858b61526ba950e06232", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "DavidStahl97/formal-proofs", "max_stars_repo_path": "Dave/Structures/Monoid.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 920, "size": 2614 }
-- Andreas, 2016-02-02, issue reported by Nisse record R : Set₁ where field F : Set postulate r : R open R r using (F) S : Set S = F -- Run "Explain why a particular name is in scope" (C-c C-w) for F. -- Expected result: -- -- F is in scope as -- * a record field Issue1804._.F brought into scope by -- - the application of R at ... -- - its definition at ...
{ "alphanum_fraction": 0.6233421751, "avg_line_length": 18.85, "ext": "agda", "hexsha": "e4dcda8c64c23b3084d7b3d1202bce9df0ff2032", "lang": "Agda", "max_forks_count": 371, "max_forks_repo_forks_event_max_datetime": "2022-03-30T19:00:30.000Z", "max_forks_repo_forks_event_min_datetime": "2015-01-03T14:04:08.000Z", "max_forks_repo_head_hexsha": "231d6ad8e77b67ff8c4b1cb35a6c31ccd988c3e9", "max_forks_repo_licenses": [ "BSD-3-Clause" ], "max_forks_repo_name": "Agda-zh/agda", "max_forks_repo_path": "test/interaction/Issue1804.agda", "max_issues_count": 4066, "max_issues_repo_head_hexsha": "ed8ac6f4062ea8a20fa0f62d5db82d4e68278338", "max_issues_repo_issues_event_max_datetime": "2022-03-31T21:14:49.000Z", "max_issues_repo_issues_event_min_datetime": "2015-01-10T11:24:51.000Z", "max_issues_repo_licenses": [ "BSD-3-Clause" ], "max_issues_repo_name": "shlevy/agda", "max_issues_repo_path": "test/interaction/Issue1804.agda", "max_line_length": 67, "max_stars_count": 1989, "max_stars_repo_head_hexsha": "ed8ac6f4062ea8a20fa0f62d5db82d4e68278338", "max_stars_repo_licenses": [ "BSD-3-Clause" ], "max_stars_repo_name": "shlevy/agda", "max_stars_repo_path": "test/interaction/Issue1804.agda", "max_stars_repo_stars_event_max_datetime": "2022-03-30T18:20:48.000Z", "max_stars_repo_stars_event_min_datetime": "2015-01-09T23:51:16.000Z", "num_tokens": 118, "size": 377 }
module Oscar.Property.Reflexivity where open import Oscar.Level record Reflexivity {𝔬} {⋆ : Set 𝔬} {ℓ} (_≣_ : ⋆ → ⋆ → Set ℓ) : Set (𝔬 ⊔ ℓ) where field reflexivity : ∀ x → x ≣ x open Reflexivity ⦃ … ⦄ public
{ "alphanum_fraction": 0.6175115207, "avg_line_length": 19.7272727273, "ext": "agda", "hexsha": "787a9640f46cc33b68b5631d8d087a493fb2e88c", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "52e1cdbdee54d9a8eaee04ee518a0d7f61d25afb", "max_forks_repo_licenses": [ "RSA-MD" ], "max_forks_repo_name": "m0davis/oscar", "max_forks_repo_path": "archive/agda-2/Oscar/Property/Reflexivity.agda", "max_issues_count": 1, "max_issues_repo_head_hexsha": "52e1cdbdee54d9a8eaee04ee518a0d7f61d25afb", "max_issues_repo_issues_event_max_datetime": "2019-05-11T23:33:04.000Z", "max_issues_repo_issues_event_min_datetime": "2019-04-29T00:35:04.000Z", "max_issues_repo_licenses": [ "RSA-MD" ], "max_issues_repo_name": "m0davis/oscar", "max_issues_repo_path": "archive/agda-2/Oscar/Property/Reflexivity.agda", "max_line_length": 80, "max_stars_count": null, "max_stars_repo_head_hexsha": "52e1cdbdee54d9a8eaee04ee518a0d7f61d25afb", "max_stars_repo_licenses": [ "RSA-MD" ], "max_stars_repo_name": "m0davis/oscar", "max_stars_repo_path": "archive/agda-2/Oscar/Property/Reflexivity.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 92, "size": 217 }
module Selective.Examples.PingPong where open import Selective.ActorMonad public open import Prelude -- An example including three actors: spawner, pinger, ponger -- -- Spawner is the actor that starts it all. -- Spawner spawns both pinger and ponger. -- Then spawner send the reference of ponger to pinger, -- and the reference of pinger to ponger. -- -- Pinger is an actor that can receive Bool messages. -- Pinger counts the number of 'false' messages it receives, until it receives a 'true' -- -- Ponger is an actor that can receive Nat messages. -- Ponger keeps sending 'false' until it receives a message containing 10. Spawnbox : InboxShape Spawnbox = [] ℕ₁ : Set₁ ℕ₁ = Lift (lsuc lzero) ℕ Bool₁ : Set₁ Bool₁ = Lift (lsuc lzero) Bool mutual PingValues = [ Bool ]ˡ PongValues = [ ℕ ]ˡ PingRefs : TypingContext PingRefs = [ ⊠-of-values PongValues ]ˡ PongRefs : TypingContext PongRefs = [ ⊠-of-values PingValues ]ˡ PongReferenceMessage : MessageType PongReferenceMessage = [ ReferenceType (⊠-of-values PongValues) ]ˡ BoolMessage : MessageType BoolMessage = [ ValueType Bool ]ˡ Pingbox : InboxShape Pingbox = BoolMessage ∷ [ PongReferenceMessage ]ˡ PingReferenceMessage : MessageType PingReferenceMessage = [ ReferenceType (⊠-of-values PingValues) ]ˡ NatMessage : MessageType NatMessage = [ ValueType ℕ ]ˡ Pongbox : InboxShape Pongbox = NatMessage ∷ [ PingReferenceMessage ]ˡ constPingrefs : {A : Set₁} → (A → TypingContext) constPingrefs _ = PingRefs pingMainActor : (i : Size) (A : Set₁) → Set₂ pingMainActor i A = ∞ActorM i Pingbox A PingRefs constPingrefs pinger : ∀ {i} → ∞ActorM (↑ i) Pingbox ⊤₁ [] constPingrefs pinger .force = waitForPong ∞>> pingMain 0 where waitForPong : ∀ {i} → ∞ActorM i Pingbox ⊤₁ [] constPingrefs waitForPong = selective-receive (λ { (Msg Z _) → false ; (Msg (S Z) _) → true ; (Msg (S (S ())) _) }) >>= λ { record { msg = (Msg Z _) ; msg-ok = () } ; record { msg = (Msg (S Z) _) ; msg-ok = refl } → return _ ; record { msg = (Msg (S (S ())) x₁) } } waitForPingValue : ∀ {i Γ} → ∞ActorM i Pingbox Bool₁ Γ (λ _ → Γ) waitForPingValue = selective-receive (λ { (Msg Z _) → true ; (Msg (S Z) _) → false ; (Msg (S (S ())) _) }) >>= λ { record { msg = (Msg Z (b ∷ [])) ; msg-ok = refl } → return b ; record { msg = (Msg (S Z) _) ; msg-ok = () } ; record { msg = (Msg (S (S ())) x₁) } } pingMain : ∀ {i} → ℕ → pingMainActor i ⊤₁ pingMain n .force = waitForPingValue ∞>>= λ { (lift false) → (Z ![t: Z ] ([ lift n ]ᵃ)) >> pingMain (suc n) ; (lift true) → return _} constPongrefs : {A : Set₁} → (A → TypingContext) constPongrefs _ = PongRefs pongMainActor : (i : Size) (A : Set₁) → Set₂ pongMainActor i A = ∞ActorM i Pongbox A PongRefs constPongrefs ponger : ∀ {i} → ∞ActorM (↑ i) Pongbox ⊤₁ [] constPongrefs ponger .force = waitForPing ∞>> ((Z ![t: Z ] ([ lift false ]ᵃ)) >> pongMain) where waitForPing : ∀ {i} → ∞ActorM i Pongbox ⊤₁ [] constPongrefs waitForPing = selective-receive (λ { (Msg Z _) → false ; (Msg (S Z) _) → true ; (Msg (S (S ())) _) }) >>= λ { record { msg = (Msg Z _) ; msg-ok = () } ; record { msg = (Msg (S Z) x₁) ; msg-ok = refl } → return _ ; record { msg = (Msg (S (S ())) x₁) } } waitForPongValue : ∀ {i Γ} → ∞ActorM i Pongbox ℕ₁ Γ (λ _ → Γ) waitForPongValue = selective-receive (λ { (Msg Z _) → true ; (Msg (S Z) _) → false ; (Msg (S (S ())) _) }) >>= λ { record { msg = (Msg Z (n ∷ [])) ; msg-ok = refl } → return n ; record { msg = (Msg (S Z) x₁) ; msg-ok = () } ; record { msg = (Msg (S (S ())) x₁) } } pongMain : ∀ {i} → pongMainActor i ⊤₁ pongMain .force = waitForPongValue ∞>>= λ { (lift 10) → Z ![t: Z ] [ lift true ]ᵃ ; (lift n) → Z ![t: Z ] [ lift false ]ᵃ >> pongMain } spawner : ∀ {i} → ∞ActorM i Spawnbox ⊤₁ [] (λ _ → Pingbox ∷ [ Pongbox ]ˡ) spawner = do spawn∞ ponger spawn∞ pinger Z ![t: S Z ] [ [ S Z ]>: [ Z ]ᵐ ]ᵃ S Z ![t: S Z ] [ [ Z ]>: [ Z ]ᵐ ]ᵃ
{ "alphanum_fraction": 0.5784431138, "avg_line_length": 31.8702290076, "ext": "agda", "hexsha": "552d00c51e29cafc04d720595f541227e2eefb37", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "ae541df13d069df4eb1464f29fbaa9804aad439f", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "Zalastax/singly-typed-actors", "max_forks_repo_path": "src/Selective/Examples/PingPong.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "ae541df13d069df4eb1464f29fbaa9804aad439f", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "Zalastax/singly-typed-actors", "max_issues_repo_path": "src/Selective/Examples/PingPong.agda", "max_line_length": 87, "max_stars_count": 1, "max_stars_repo_head_hexsha": "ae541df13d069df4eb1464f29fbaa9804aad439f", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "Zalastax/thesis", "max_stars_repo_path": "src/Selective/Examples/PingPong.agda", "max_stars_repo_stars_event_max_datetime": "2018-02-02T16:44:43.000Z", "max_stars_repo_stars_event_min_datetime": "2018-02-02T16:44:43.000Z", "num_tokens": 1464, "size": 4175 }
-- Minimal implicational logic, vector-based de Bruijn approach, initial encoding module Vi.ArrMp where open import Lib using (Nat; suc; _+_; Fin; fin; Vec; _,_; proj; VMem; mem) -- Types infixr 0 _=>_ data Ty : Set where UNIT : Ty _=>_ : Ty -> Ty -> Ty -- Context and truth judgement Cx : Nat -> Set Cx n = Vec Ty n isTrue : forall {tn} -> Ty -> Fin tn -> Cx tn -> Set isTrue a i tc = VMem a i tc -- Terms module ArrMp where infixr 0 lam=>_ infixl 1 _$_ data Tm {tn} (tc : Cx tn) : Ty -> Set where var : forall {a i} -> isTrue a i tc -> Tm tc a lam=>_ : forall {a b} -> Tm (tc , a) b -> Tm tc (a => b) _$_ : forall {a b} -> Tm tc (a => b) -> Tm tc a -> Tm tc b v : forall {tn} (k : Nat) {tc : Cx (suc (k + tn))} -> Tm tc (proj tc (fin k)) v i = var (mem i) Thm : Ty -> Set Thm a = forall {tn} {tc : Cx tn} -> Tm tc a open ArrMp public -- Example theorems aI : forall {a} -> Thm (a => a) aI = lam=> v 0 aK : forall {a b} -> Thm (a => b => a) aK = lam=> lam=> v 1 aS : forall {a b c} -> Thm ((a => b => c) => (a => b) => a => c) aS = lam=> lam=> lam=> v 2 $ v 0 $ (v 1 $ v 0) tSKK : forall {a} -> Thm (a => a) tSKK {a = a} = aS {b = a => a} $ aK $ aK
{ "alphanum_fraction": 0.496835443, "avg_line_length": 20.0634920635, "ext": "agda", "hexsha": "cd38259a8e109561abc33509c35736ba8452f82d", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "2dd761bfa96ccda089888e8defa6814776fa2922", "max_forks_repo_licenses": [ "X11" ], "max_forks_repo_name": "mietek/formal-logic", "max_forks_repo_path": "src/Vi/ArrMp.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "2dd761bfa96ccda089888e8defa6814776fa2922", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "X11" ], "max_issues_repo_name": "mietek/formal-logic", "max_issues_repo_path": "src/Vi/ArrMp.agda", "max_line_length": 81, "max_stars_count": 26, "max_stars_repo_head_hexsha": "2dd761bfa96ccda089888e8defa6814776fa2922", "max_stars_repo_licenses": [ "X11" ], "max_stars_repo_name": "mietek/formal-logic", "max_stars_repo_path": "src/Vi/ArrMp.agda", "max_stars_repo_stars_event_max_datetime": "2021-11-13T12:37:44.000Z", "max_stars_repo_stars_event_min_datetime": "2015-08-31T09:49:52.000Z", "num_tokens": 507, "size": 1264 }
-- From Dimytro Starosud -- https://github.com/dima-starosud/Uniqueness-typing-in-Agda/blob/master/RefAPITest.agda module Issue784 where open import Issue784.RefAPI open import Function open import Data.Nat open import Data.Product -- new : ∀ a n → Transformer! [] [(n , Unique (Ref-ℕ a))] {-Here also doesn't work without type constraint. Note: that type is exactly the same as of new-ℕ !!! -} new = new-ℕ _++ = inc-ℕ *_ = get-ℕ free = free-ℕ tr : (n : ℕ) → Transformer! [] [(_ , Pure (Exact $ suc n))] tr i = "r" := new i ⇒⟦ refl ⟧⇒ -- new ℕ(i) "r" ++ ⇒⟦ refl ⟧⇒ -- r++ "j" := * "r" ⇒⟦ refl ⟧⇒ -- j := *r free "r" p : ∀ n → getExact (extract $ tr n) ≡ suc n p = ≡-exact ∘ extract ∘ tr
{ "alphanum_fraction": 0.5842541436, "avg_line_length": 25.8571428571, "ext": "agda", "hexsha": "f6ce12db8c2db806058d5cc06ba030429acbc125", "lang": "Agda", "max_forks_count": 1, "max_forks_repo_forks_event_max_datetime": "2022-03-12T11:35:18.000Z", "max_forks_repo_forks_event_min_datetime": "2022-03-12T11:35:18.000Z", "max_forks_repo_head_hexsha": "70c8a575c46f6a568c7518150a1a64fcd03aa437", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "masondesu/agda", "max_forks_repo_path": "test/lib-succeed/Issue784.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "70c8a575c46f6a568c7518150a1a64fcd03aa437", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "masondesu/agda", "max_issues_repo_path": "test/lib-succeed/Issue784.agda", "max_line_length": 89, "max_stars_count": 1, "max_stars_repo_head_hexsha": "477c8c37f948e6038b773409358fd8f38395f827", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "larrytheliquid/agda", "max_stars_repo_path": "test/lib-succeed/Issue784.agda", "max_stars_repo_stars_event_max_datetime": "2019-11-27T04:41:05.000Z", "max_stars_repo_stars_event_min_datetime": "2019-11-27T04:41:05.000Z", "num_tokens": 271, "size": 724 }
import Lvl open import Structure.Operator.Vector open import Structure.Setoid open import Type module Structure.Operator.Vector.LinearCombination {ℓᵥ ℓₛ ℓᵥₑ ℓₛₑ} {V : Type{ℓᵥ}} ⦃ equiv-V : Equiv{ℓᵥₑ}(V) ⦄ {S : Type{ℓₛ}} ⦃ equiv-S : Equiv{ℓₛₑ}(S) ⦄ {_+ᵥ_ : V → V → V} {_⋅ₛᵥ_ : S → V → V} {_+ₛ_ _⋅ₛ_ : S → S → S} ⦃ vectorSpace : VectorSpace(_+ᵥ_)(_⋅ₛᵥ_)(_+ₛ_)(_⋅ₛ_) ⦄ where open VectorSpace(vectorSpace) open import Data.Tuple using (_⨯_ ; _,_) open import Functional using (id ; _∘_ ; _∘₂_ ; _$_ ; swap ; _on₂_) open import Function.Equals open import Logic open import Logic.Predicate open import Numeral.CoordinateVector as Vec using () renaming (Vector to Vec) open import Numeral.Finite open import Numeral.Natural open import Sets.ExtensionalPredicateSet as PredSet using (PredSet ; _∈_ ; [∋]-binaryRelator) open import Structure.Function.Domain open import Syntax.Function private variable ℓ ℓₗ : Lvl.Level private variable n : ℕ -- A linear combination constructed from a sequence of vectors and a sequence of scalars. -- Linear combination of 0 scalars and vectors are the zero vector. -- Linear combination of 1 scalar and vector is just scalar on vector multiplication. -- Example: LinearCombination {4} sf vf = (sf[0] ⋅ₛᵥ vf[0]) +ᵥ (sf[1] ⋅ₛᵥ vf[1]) +ᵥ (sf[2] ⋅ₛᵥ vf[2]) +ᵥ (sf[3] ⋅ₛᵥ vf[3]) -- Inlined definition: -- LinearCombination {0} _ _ = 𝟎ᵥ -- LinearCombination {1} vf sf = Vec.proj(sf)(0) ⋅ₛᵥ Vec.proj(vf)(0) -- LinearCombination {𝐒(𝐒(n))} vf sf = (Vec.proj(sf)(0) ⋅ₛᵥ Vec.proj(vf)(0)) +ᵥ (LinearCombination {𝐒(n)} (Vec.tail vf) (Vec.tail sf)) linearCombination : Vec(n)(V) → Vec(n)(S) → V linearCombination = Vec.reduceOrᵣ(_+ᵥ_) 𝟎ᵥ ∘₂ Vec.map₂(_⋅ᵥₛ_) -- Whether the two specified vectors are linearly dependent or not. -- TODO: Is this definition neccessary? LinearlyDependentPair : V → V → Stmt LinearlyDependentPair v₁ v₂ = ∃{Obj = S ⨯ S}(\{(s₁ , s₂) → s₁ ⋅ₛᵥ v₁ ≡ s₂ ⋅ₛᵥ v₂})
{ "alphanum_fraction": 0.6891058582, "avg_line_length": 40.5416666667, "ext": "agda", "hexsha": "c21de1c4bdee976daa6bca866302c971b593831e", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "70f4fba849f2fd779c5aaa5af122ccb6a5b271ba", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "Lolirofle/stuff-in-agda", "max_forks_repo_path": "Structure/Operator/Vector/LinearCombination.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "70f4fba849f2fd779c5aaa5af122ccb6a5b271ba", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "Lolirofle/stuff-in-agda", "max_issues_repo_path": "Structure/Operator/Vector/LinearCombination.agda", "max_line_length": 136, "max_stars_count": 6, "max_stars_repo_head_hexsha": "70f4fba849f2fd779c5aaa5af122ccb6a5b271ba", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "Lolirofle/stuff-in-agda", "max_stars_repo_path": "Structure/Operator/Vector/LinearCombination.agda", "max_stars_repo_stars_event_max_datetime": "2022-02-05T06:53:22.000Z", "max_stars_repo_stars_event_min_datetime": "2020-04-07T17:58:13.000Z", "num_tokens": 783, "size": 1946 }
{-# OPTIONS --cubical --safe #-} module Cardinality.Finite.ManifestEnumerable.Inductive where open import Prelude open import Data.List public open import Data.List.Membership public ℰ : Type a → Type a ℰ A = Σ[ xs ⦂ List A ] Π[ x ⦂ A ] ∥ x ∈ xs ∥
{ "alphanum_fraction": 0.6972111554, "avg_line_length": 22.8181818182, "ext": "agda", "hexsha": "2a5b2286074e3ec10adefdee91a3ff66a0ab8627", "lang": "Agda", "max_forks_count": 1, "max_forks_repo_forks_event_max_datetime": "2021-01-05T14:05:30.000Z", "max_forks_repo_forks_event_min_datetime": "2021-01-05T14:05:30.000Z", "max_forks_repo_head_hexsha": "3c176d4690566d81611080e9378f5a178b39b851", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "oisdk/combinatorics-paper", "max_forks_repo_path": "agda/Cardinality/Finite/ManifestEnumerable/Inductive.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "3c176d4690566d81611080e9378f5a178b39b851", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "oisdk/combinatorics-paper", "max_issues_repo_path": "agda/Cardinality/Finite/ManifestEnumerable/Inductive.agda", "max_line_length": 60, "max_stars_count": 4, "max_stars_repo_head_hexsha": "3c176d4690566d81611080e9378f5a178b39b851", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "oisdk/combinatorics-paper", "max_stars_repo_path": "agda/Cardinality/Finite/ManifestEnumerable/Inductive.agda", "max_stars_repo_stars_event_max_datetime": "2021-01-05T15:32:14.000Z", "max_stars_repo_stars_event_min_datetime": "2021-01-05T14:07:44.000Z", "num_tokens": 77, "size": 251 }
module interactiveProgramsAgdaUnsized where open import NativeIO open import Function record IOInterface : Set₁ where field Command : Set Response : (c : Command) → Set open IOInterface public mutual record IO (I : IOInterface) (A : Set) : Set where coinductive constructor delay field force : IO' I A data IO' (I : IOInterface) (A : Set) : Set where do' : (c : Command I) (f : Response I c → IO I A) → IO' I A return' : (a : A) → IO' I A open IO public module _ {I : IOInterface} (let C = Command I) (let R = Response I) where do : ∀{A} (c : C) (f : R c → IO I A) → IO I A force (do c f) = do' c f return : ∀{A} (a : A) → IO I A force (return a) = return' a infixl 2 _>>=_ _>>=_ : ∀{A B} (m : IO I A) (k : A → IO I B) → IO I B force (m >>= k) with force m ... | do' c f = do' c λ x → f x >>= k ... | return' a = force (k a) {-# NON_TERMINATING #-} translateIO : ∀ {A} (tr : (c : C) → NativeIO (R c)) → IO I A → NativeIO A translateIO tr m = case (force m) of λ { (do' c f) → (tr c) native>>= λ r → translateIO tr (f r) ; (return' a) → nativeReturn a } data ConsoleCommand : Set where getLine : ConsoleCommand putStrLn : String → ConsoleCommand ConsoleResponse : ConsoleCommand → Set ConsoleResponse getLine = String ConsoleResponse (putStrLn s) = Unit ConsoleInterface : IOInterface Command ConsoleInterface = ConsoleCommand Response ConsoleInterface = ConsoleResponse IOConsole : Set → Set IOConsole = IO ConsoleInterface translateIOConsoleLocal : (c : ConsoleCommand) → NativeIO (ConsoleResponse c) translateIOConsoleLocal (putStrLn s) = nativePutStrLn s translateIOConsoleLocal getLine = nativeGetLine translateIOConsole : {A : Set} → IOConsole A → NativeIO A translateIOConsole = translateIO translateIOConsoleLocal {-# NON_TERMINATING #-} cat : IOConsole Unit force cat = do' getLine λ{ line → do (putStrLn line) λ _ → cat } mutual cat' : IOConsole Unit force cat' = do' getLine λ{ line → cat'' line} cat'' : String → IOConsole Unit force (cat'' line) = do' (putStrLn line) λ _ → cat' main : NativeIO Unit main = translateIOConsole cat
{ "alphanum_fraction": 0.5927334178, "avg_line_length": 26.010989011, "ext": "agda", "hexsha": "e639c55eca949ea59613de285284efcf5aa6bd74", "lang": "Agda", "max_forks_count": 2, "max_forks_repo_forks_event_max_datetime": "2022-03-12T11:41:00.000Z", "max_forks_repo_forks_event_min_datetime": "2018-09-01T15:02:37.000Z", "max_forks_repo_head_hexsha": "7cc45e0148a4a508d20ed67e791544c30fecd795", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "agda/ooAgda", "max_forks_repo_path": "presentationsAndExampleCode/agdaImplementorsMeetingGlasgow22April2016AntonSetzer/interactiveProgramsAgdaUnsized.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "7cc45e0148a4a508d20ed67e791544c30fecd795", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "agda/ooAgda", "max_issues_repo_path": "presentationsAndExampleCode/agdaImplementorsMeetingGlasgow22April2016AntonSetzer/interactiveProgramsAgdaUnsized.agda", "max_line_length": 77, "max_stars_count": 23, "max_stars_repo_head_hexsha": "7cc45e0148a4a508d20ed67e791544c30fecd795", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "agda/ooAgda", "max_stars_repo_path": "presentationsAndExampleCode/agdaImplementorsMeetingGlasgow22April2016AntonSetzer/interactiveProgramsAgdaUnsized.agda", "max_stars_repo_stars_event_max_datetime": "2020-10-12T23:15:25.000Z", "max_stars_repo_stars_event_min_datetime": "2016-06-19T12:57:55.000Z", "num_tokens": 732, "size": 2367 }
------------------------------------------------------------------------------ -- Testing a type synonymous for Set ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTIONS --without-K #-} module FOT.FOTC.Data.Nat.SetType where open import FOTC.Base open import FOTC.Data.Nat -- Type synonymous for Set. Type = Set data N' : D → Type where nzero' : N' zero nsucc' : ∀ {n} → N' n → N' (succ₁ n) {-# ATP axioms nzero' nsucc' #-} pred-N' : ∀ {n} → N' n → N' (pred₁ n) pred-N' nzero' = prf where postulate prf : N' (pred₁ zero) {-# ATP prove prf #-} pred-N' (nsucc' {n} N'n) = prf where postulate prf : N' (pred₁ (succ₁ n)) {-# ATP prove prf #-}
{ "alphanum_fraction": 0.4547591069, "avg_line_length": 27.4516129032, "ext": "agda", "hexsha": "21fd6aaf6c67d764f8582d9f6aaeadc99e1e5a44", "lang": "Agda", "max_forks_count": 3, "max_forks_repo_forks_event_max_datetime": "2018-03-14T08:50:00.000Z", "max_forks_repo_forks_event_min_datetime": "2016-09-19T14:18:30.000Z", "max_forks_repo_head_hexsha": "2fc9f2b81052a2e0822669f02036c5750371b72d", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "asr/fotc", "max_forks_repo_path": "notes/FOT/FOTC/Data/Nat/SetType.agda", "max_issues_count": 2, "max_issues_repo_head_hexsha": "2fc9f2b81052a2e0822669f02036c5750371b72d", "max_issues_repo_issues_event_max_datetime": "2017-01-01T14:34:26.000Z", "max_issues_repo_issues_event_min_datetime": "2016-10-12T17:28:16.000Z", "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "asr/fotc", "max_issues_repo_path": "notes/FOT/FOTC/Data/Nat/SetType.agda", "max_line_length": 78, "max_stars_count": 11, "max_stars_repo_head_hexsha": "2fc9f2b81052a2e0822669f02036c5750371b72d", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "asr/fotc", "max_stars_repo_path": "notes/FOT/FOTC/Data/Nat/SetType.agda", "max_stars_repo_stars_event_max_datetime": "2021-09-12T16:09:54.000Z", "max_stars_repo_stars_event_min_datetime": "2015-09-03T20:53:42.000Z", "num_tokens": 227, "size": 851 }
-- This file needs to exist because the Makefile dependencies require a *.agda file. -- The actual test is in Issue2937.sh which uses two files under Issue2737/*.agda
{ "alphanum_fraction": 0.7724550898, "avg_line_length": 55.6666666667, "ext": "agda", "hexsha": "87b61e27ec5361b641e15c29cd42c52546d2bf3f", "lang": "Agda", "max_forks_count": 371, "max_forks_repo_forks_event_max_datetime": "2022-03-30T19:00:30.000Z", "max_forks_repo_forks_event_min_datetime": "2015-01-03T14:04:08.000Z", "max_forks_repo_head_hexsha": "7f58030124fa99dfbf8db376659416f3ad8384de", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "cruhland/agda", "max_forks_repo_path": "test/interaction/Issue2937.agda", "max_issues_count": 4066, "max_issues_repo_head_hexsha": "7f58030124fa99dfbf8db376659416f3ad8384de", "max_issues_repo_issues_event_max_datetime": "2022-03-31T21:14:49.000Z", "max_issues_repo_issues_event_min_datetime": "2015-01-10T11:24:51.000Z", "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "cruhland/agda", "max_issues_repo_path": "test/interaction/Issue2937.agda", "max_line_length": 84, "max_stars_count": 1989, "max_stars_repo_head_hexsha": "7f58030124fa99dfbf8db376659416f3ad8384de", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "cruhland/agda", "max_stars_repo_path": "test/interaction/Issue2937.agda", "max_stars_repo_stars_event_max_datetime": "2022-03-30T18:20:48.000Z", "max_stars_repo_stars_event_min_datetime": "2015-01-09T23:51:16.000Z", "num_tokens": 40, "size": 167 }
{-# OPTIONS --without-K --safe #-} module Source.Type where open import Source.Size as S using ( Size ; Δ ; Δ′ ; Δ″ ; Ω ; Ω′ ; Ω″ ; n ; m ; o ; p ; b ) open import Source.Size.Substitution.Canonical as SC using ( Sub⊢ ) open import Source.Size.Substitution.Theory open import Source.Size.Substitution.Universe as SU using ( σ ; τ ; ι ; ⟨_⟩ ) open import Util.Prelude open S.Ctx infixr 3 Π_,_ infixr 4 _⇒_ infixl 4 _∙_ data Type (Δ : S.Ctx) : Set where Nat : (n : Size Δ) → Type Δ Stream : (n : Size Δ) → Type Δ _⇒_ : (T U : Type Δ) → Type Δ Π_,_ : (n : Size Δ) (T : Type (Δ ∙ n)) → Type Δ variable T U V W T′ U′ V′ W′ : Type Δ Π-≡⁺ : ∀ {n m} {T : Type (Δ ∙ n)} {U : Type (Δ ∙ m)} → (n≡m : n ≡ m) → subst (λ n → Type (Δ ∙ n)) n≡m T ≡ U → (Π n , T) ≡ (Π m , U) Π-≡⁺ refl refl = refl data Ctx (Δ : S.Ctx) : Set where [] : Ctx Δ _∙_ : (Γ : Ctx Δ) (T : Type Δ) → Ctx Δ variable Γ Γ′ Γ″ Ψ Ψ′ Ψ″ : Ctx Δ sub : SC.Sub Δ Ω → Type Ω → Type Δ sub σ (Nat n) = Nat (SC.sub σ n) sub σ (Stream n) = Stream (SC.sub σ n) sub σ (T ⇒ U) = sub σ T ⇒ sub σ U sub σ (Π n , T) = Π SC.sub σ n , sub (SC.Lift σ) T abstract sub->> : ∀ {Δ Δ′ Δ″} (σ : SC.Sub Δ Δ′) (τ : SC.Sub Δ′ Δ″) T → sub (σ SC.>> τ) T ≡ sub σ (sub τ T) sub->> σ τ (Nat n) = cong Nat (SC.sub->> n refl) sub->> σ τ (Stream n) = cong Stream (SC.sub->> n refl) sub->> σ τ (T ⇒ U) = cong₂ _⇒_ (sub->> σ τ T) (sub->> σ τ U) sub->> σ τ (Π n , T) rewrite SC.sub->> {σ = σ} {τ} n refl = cong (λ T → Π SC.sub σ (SC.sub τ n) , T) (trans (cong (λ σ → sub σ T) (sym SC.Lift>>Lift)) (sub->> (SC.Lift σ) (SC.Lift τ) T)) sub-Id : (T : Type Δ) → sub SC.Id T ≡ T sub-Id (Nat n) = cong Nat (SC.sub-Id n refl) sub-Id (Stream n) = cong Stream (SC.sub-Id n refl) sub-Id (T ⇒ U) = cong₂ _⇒_ (sub-Id T) (sub-Id U) sub-Id (Π n , T) rewrite SC.sub-Id n refl = cong (λ T → Π n , T) (sub-Id T) instance SubTheory-Type : SubTheory Type SubTheory-Type = record { _[_] = λ T σ → sub σ T ; [Id] = sub-Id ; [>>] = sub->> } subΓ : SC.Sub Δ Ω → Ctx Ω → Ctx Δ subΓ σ [] = [] subΓ σ (Γ ∙ T) = subΓ σ Γ ∙ sub σ T abstract subΓ->> : ∀ (σ : SC.Sub Δ Δ′) (τ : SC.Sub Δ′ Δ″) Γ → subΓ (σ SC.>> τ) Γ ≡ subΓ σ (subΓ τ Γ) subΓ->> σ τ [] = refl subΓ->> σ τ (Γ ∙ T) = cong₂ _∙_ (subΓ->> σ τ Γ) (sub->> σ τ T) subΓ-Id : (Γ : Ctx Δ) → subΓ SC.Id Γ ≡ Γ subΓ-Id [] = refl subΓ-Id (Γ ∙ T) = cong₂ _∙_ (subΓ-Id Γ) (sub-Id T) instance SubTheory-Ctx : SubTheory Ctx SubTheory-Ctx = record { _[_] = λ Γ σ → subΓ σ Γ ; [Id] = subΓ-Id ; [>>] = subΓ->> }
{ "alphanum_fraction": 0.5080583269, "avg_line_length": 24.1296296296, "ext": "agda", "hexsha": "f24a5261592a0996c5c26c8671d18b5cbcc0a3ed", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "104cddc6b65386c7e121c13db417aebfd4b7a863", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "JLimperg/msc-thesis-code", "max_forks_repo_path": "src/Source/Type.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "104cddc6b65386c7e121c13db417aebfd4b7a863", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "JLimperg/msc-thesis-code", "max_issues_repo_path": "src/Source/Type.agda", "max_line_length": 64, "max_stars_count": 5, "max_stars_repo_head_hexsha": "104cddc6b65386c7e121c13db417aebfd4b7a863", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "JLimperg/msc-thesis-code", "max_stars_repo_path": "src/Source/Type.agda", "max_stars_repo_stars_event_max_datetime": "2021-06-26T06:37:31.000Z", "max_stars_repo_stars_event_min_datetime": "2021-04-13T21:31:17.000Z", "num_tokens": 1198, "size": 2606 }
module map-is-foldr where import Relation.Binary.PropositionalEquality as Eq open Eq using (_≡_; cong) open Eq.≡-Reasoning open import lists using (List; []; _∷_; map; foldr) postulate -- 外延性の公理 extensionality : ∀ {A B : Set} {f g : A → B} → (∀ (x : A) → f x ≡ g x) ----------------------- → f ≡ g -- 外延性の公理を利用した証明のための補題 lemma : ∀ {A B : Set} → (f : A → B) → (xs : List A) → map f xs ≡ foldr (λ x xs → f x ∷ xs) [] xs lemma f [] = begin map f [] ≡⟨⟩ [] ≡⟨⟩ foldr (λ x xs → f x ∷ xs) [] [] ∎ lemma f (x ∷ xs) = begin map f (x ∷ xs) ≡⟨⟩ f x ∷ map f xs ≡⟨ cong (f x ∷_) (lemma f xs) ⟩ f x ∷ foldr (λ x xs → f x ∷ xs) [] xs ≡⟨⟩ foldr (λ x xs → f x ∷ xs) [] (x ∷ xs) ∎ -- mapが畳み込みで表現できることの証明 map-is-foldr : ∀ {A B : Set} → (f : A → B) → map f ≡ foldr (λ x xs → f x ∷ xs) [] map-is-foldr f = extensionality (lemma f)
{ "alphanum_fraction": 0.4847112118, "avg_line_length": 21.5365853659, "ext": "agda", "hexsha": "1d396f4e6e39820424ea6917f7d8c62aac654572", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "df7722b88a9b3dfde320a690b78c4c1ef8c7c547", "max_forks_repo_licenses": [ "Apache-2.0" ], "max_forks_repo_name": "akiomik/plfa-solutions", "max_forks_repo_path": "part1/lists/map-is-foldr.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "df7722b88a9b3dfde320a690b78c4c1ef8c7c547", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "Apache-2.0" ], "max_issues_repo_name": "akiomik/plfa-solutions", "max_issues_repo_path": "part1/lists/map-is-foldr.agda", "max_line_length": 51, "max_stars_count": 1, "max_stars_repo_head_hexsha": "df7722b88a9b3dfde320a690b78c4c1ef8c7c547", "max_stars_repo_licenses": [ "Apache-2.0" ], "max_stars_repo_name": "akiomik/plfa-solutions", "max_stars_repo_path": "part1/lists/map-is-foldr.agda", "max_stars_repo_stars_event_max_datetime": "2020-07-07T09:42:22.000Z", "max_stars_repo_stars_event_min_datetime": "2020-07-07T09:42:22.000Z", "num_tokens": 416, "size": 883 }
module Proof-last-is-deterministic where -- Show that last is a deterministic operation. -- The property to show is: -- -- l == l1 ++ [x1] and l == l2 ++ [x2] implies x1 == x2 -- -- Here we show the simplified property -- -- l1 ++ [x1] == l2 ++ [x2] implies x1 == x2 -- -- The initial property can be derived from this one by by symmetry -- and transitivity of Boolean equality. open import bool open import bool-thms open import bool-thms2 open import list open import nat open import eq -- Auxiliary statements: an empty list cannot be equal to a list with -- an element at the end: nonemptylast : ∀ (l : 𝕃 ℕ)(x : ℕ) → =𝕃 _=ℕ_ [] (l ++ [ x ]) ≡ ff nonemptylast [] x = refl nonemptylast (z :: l) x = refl nonemptylastr : ∀ (l : 𝕃 ℕ)(x : ℕ) → =𝕃 _=ℕ_ (l ++ [ x ]) [] ≡ ff nonemptylastr [] x = refl nonemptylastr (z :: l) x = refl -- Main property formulated as Boolean implication: lasteqp : ∀ (l1 l2 : 𝕃 ℕ)(x1 x2 : ℕ) → (=𝕃 _=ℕ_ (l1 ++ [ x1 ]) (l2 ++ [ x2 ])) imp (x1 =ℕ x2) ≡ tt lasteqp [] [] x1 x2 rewrite &&-tt (x1 =ℕ x2) | imp-same (x1 =ℕ x2) = refl lasteqp [] (x :: l2) x1 x2 rewrite nonemptylast l2 x2 | &&-ff (x1 =ℕ x) = refl lasteqp (x :: l1) [] x1 x2 rewrite nonemptylastr l1 x1 | &&-ff (x =ℕ x2) = refl lasteqp (z1 :: l1) (z2 :: l2) x1 x2 with (z1 =ℕ z2) lasteqp (z1 :: l1) (z2 :: l2) x1 x2 | tt rewrite lasteqp l1 l2 x1 x2 = refl lasteqp (z1 :: l1) (z2 :: l2) x1 x2 | ff = refl -- Main property formulated as propositional implication: lasteq : ∀ (l1 l2 : 𝕃 ℕ)(x1 x2 : ℕ) → =𝕃 _=ℕ_ (l1 ++ [ x1 ]) (l2 ++ [ x2 ]) ≡ tt → x1 =ℕ x2 ≡ tt lasteq l1 l2 x1 x2 p = imp-mp (lasteqp l1 l2 x1 x2) p
{ "alphanum_fraction": 0.5904416213, "avg_line_length": 32.4117647059, "ext": "agda", "hexsha": "e704334ca1e2c4189a3eeb8019b28623b8ab0ff9", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "7905bc4f625a94a725f9f6d8a2de1140bea5e471", "max_forks_repo_licenses": [ "BSD-3-Clause" ], "max_forks_repo_name": "phlummox/curry-tools", "max_forks_repo_path": "currypp/.cpm/packages/currycheck/examples/Proof-last-is-deterministic.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "7905bc4f625a94a725f9f6d8a2de1140bea5e471", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "BSD-3-Clause" ], "max_issues_repo_name": "phlummox/curry-tools", "max_issues_repo_path": "currypp/.cpm/packages/currycheck/examples/Proof-last-is-deterministic.agda", "max_line_length": 73, "max_stars_count": null, "max_stars_repo_head_hexsha": "7905bc4f625a94a725f9f6d8a2de1140bea5e471", "max_stars_repo_licenses": [ "BSD-3-Clause" ], "max_stars_repo_name": "phlummox/curry-tools", "max_stars_repo_path": "currypp/.cpm/packages/currycheck/examples/Proof-last-is-deterministic.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 676, "size": 1653 }
module Haskell.Prim.Absurd where open import Agda.Builtin.Nat open import Agda.Builtin.List open import Agda.Builtin.Unit open import Agda.Builtin.Reflection renaming (bindTC to _>>=_; absurd to absurdP) open import Agda.Builtin.Equality open import Haskell.Prim private pattern vArg x = arg (arg-info visible relevant) x refute : Nat → Term refute i = def (quote _$_) (vArg (pat-lam (absurd-clause (vArg absurdP ∷ []) ∷ []) []) ∷ vArg (var i []) ∷ []) tryRefute : Nat → Term → TC ⊤ tryRefute 0 _ = typeError (strErr "No variable of empty type found in the context" ∷ []) tryRefute (suc n) hole = catchTC (unify hole (refute n)) (tryRefute n hole) absurd : Term → TC ⊤ absurd hole = do Γ ← getContext tryRefute (lengthNat Γ) hole
{ "alphanum_fraction": 0.6893840105, "avg_line_length": 28.2592592593, "ext": "agda", "hexsha": "bd2bbe439129597ded19834db36bbd0c43f00e7a", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "8c8f24a079ed9677dbe6893cf786e7ed52dfe8b6", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "dxts/agda2hs", "max_forks_repo_path": "lib/Haskell/Prim/Absurd.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "8c8f24a079ed9677dbe6893cf786e7ed52dfe8b6", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "dxts/agda2hs", "max_issues_repo_path": "lib/Haskell/Prim/Absurd.agda", "max_line_length": 112, "max_stars_count": 1, "max_stars_repo_head_hexsha": "8c8f24a079ed9677dbe6893cf786e7ed52dfe8b6", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "dxts/agda2hs", "max_stars_repo_path": "lib/Haskell/Prim/Absurd.agda", "max_stars_repo_stars_event_max_datetime": "2021-05-25T09:41:34.000Z", "max_stars_repo_stars_event_min_datetime": "2021-05-25T09:41:34.000Z", "num_tokens": 241, "size": 763 }
{-# OPTIONS --without-K #-} module Data.ByteVec where import Data.ByteString as BS open import Data.Word8 using (Word8) open BS using (ByteString; length) open import Data.Nat using (ℕ; _<_) open import Data.Product using (Σ; _,_; proj₁; proj₂) open import Relation.Nullary using (yes; no) open import Relation.Nullary.Decidable using (True) open import Relation.Binary using (Decidable) open import Relation.Binary.PropositionalEquality using (_≡_; refl; cong) open import Relation.Binary.PropositionalEquality.TrustMe using (trustMe) open BS public using (ByteStringKind; Lazy; Strict) ByteVec : ∀ {k} → ℕ → Set ByteVec {k} n = Σ (ByteString k) (λ bs → n ≡ length bs) mkVec′ : ∀ {k} → (bs : ByteString k) → ByteVec {k} (length bs) mkVec′ {k} bs = bs , refl mkVec : ∀ {k} (n : ℕ) (bs : ByteString k) → (n≡∣bs∣ : n ≡ length bs) → ByteVec {k} n mkVec {k} n = _,_ primMkVec : ∀ {k n} → ByteString k → ByteVec {k} n primMkVec bs = bs , trustMe index : ∀ {k n} → ByteVec {k} n → (ix : ℕ) → {ix<n : ix < n} → Word8 index (bs , _) ix {_} = BS.unsafeIndex bs ix module test where open import Data.ByteString.Utf8 using (packStrict) -- bv5 : ByteVec {_} 5 -- bv5 = packStrict "asdef" Σ., {!!} bv′ : _ bv′ = mkVec′ (packStrict "asdef") infix 4 _≟_ private t : ∀ {n k} → {v : ByteString k} → (us vs : n ≡ length v) → us ≡ vs t us vs = trustMe -- only one proof: refl _≟_ : ∀ {k n} → Decidable {A = ByteVec {k} n} _≡_ _≟_ {n = n} (u , us) (v , vs) with u BS.≟ v _≟_ {n = n} (u , us) (v , vs) | yes p rewrite p | t us vs = yes refl _≟_ {n = n} (u , us) (v , vs) | no ¬p = no (λ x → ¬p (cong proj₁ x))
{ "alphanum_fraction": 0.6224552745, "avg_line_length": 30.0185185185, "ext": "agda", "hexsha": "bb613295471396143702ff86f8a47bac5c199bf0", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "98a53f35fca27e3379cf851a9a6bdfe5bd8c9626", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "semenov-vladyslav/bytes-agda", "max_forks_repo_path": "src/Data/ByteVec.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "98a53f35fca27e3379cf851a9a6bdfe5bd8c9626", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "semenov-vladyslav/bytes-agda", "max_issues_repo_path": "src/Data/ByteVec.agda", "max_line_length": 73, "max_stars_count": null, "max_stars_repo_head_hexsha": "98a53f35fca27e3379cf851a9a6bdfe5bd8c9626", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "semenov-vladyslav/bytes-agda", "max_stars_repo_path": "src/Data/ByteVec.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 596, "size": 1621 }
module Haskell.Prim.Show where open import Agda.Builtin.Char open import Agda.Builtin.Nat import Agda.Builtin.String as Str open import Haskell.Prim open import Haskell.Prim.String open import Haskell.Prim.List open import Haskell.Prim.Word open import Haskell.Prim.Double open import Haskell.Prim.Maybe open import Haskell.Prim.Eq open import Haskell.Prim.Tuple open import Haskell.Prim.Ord open import Haskell.Prim.Either open import Haskell.Prim.Integer open import Haskell.Prim.Bool open import Haskell.Prim.Int open import Haskell.Prim.Foldable -------------------------------------------------- -- Show ShowS : Set ShowS = String → String showChar : Char → ShowS showChar = _∷_ showString : String → ShowS showString = _++_ showParen : Bool → ShowS → ShowS showParen false s = s showParen true s = showString "(" ∘ s ∘ showString ")" record Show (a : Set) : Set where field showsPrec : Int → a → ShowS showList : List a → ShowS shows : a → ShowS shows = showsPrec 0 show : a → String show x = shows x "" defaultShowList : (a → ShowS) → List a → ShowS defaultShowList _ [] = showString "[]" defaultShowList shows (x ∷ xs) = showString "[" ∘ foldl (λ s x → s ∘ showString "," ∘ shows x) (shows x) xs ∘ showString "]" open Show ⦃ ... ⦄ public private makeShow : (a → String) → Show a makeShow sh .showsPrec _ = showString ∘ sh makeShow sh .showList = defaultShowList (showString ∘ sh) makeShowsPrec : (Int → a → ShowS) → Show a makeShowsPrec shp .showsPrec = shp makeShowsPrec shp .showList = defaultShowList (shp 0) instance iShowNat : Show Nat iShowNat = makeShow (Str.primStringToList ∘ Str.primShowNat) iShowInteger : Show Integer iShowInteger = makeShow showInteger iShowInt : Show Int iShowInt = makeShow showInt iShowWord : Show Word iShowWord = makeShow showWord iShowDouble : Show Double iShowDouble = makeShow (Str.primStringToList ∘ primShowFloat) iShowBool : Show Bool iShowBool = makeShow λ where false → "False"; true → "True" iShowChar : Show Char iShowChar .showsPrec _ = showString ∘ Str.primStringToList ∘ Str.primShowChar iShowChar .showList = showString ∘ Str.primStringToList ∘ Str.primShowString ∘ Str.primStringFromList iShowList : ⦃ Show a ⦄ → Show (List a) iShowList .showsPrec _ = showList iShowList .showList = defaultShowList showList private showApp₁ : ⦃ Show a ⦄ → Int → String → a → ShowS showApp₁ p tag x = showParen (p > 10) $ showString tag ∘ showString " " ∘ showsPrec 11 x instance iShowMaybe : ⦃ Show a ⦄ → Show (Maybe a) iShowMaybe = makeShowsPrec λ where p Nothing → showString "Nothing" p (Just x) → showApp₁ p "Just" x iShowEither : ⦃ Show a ⦄ → ⦃ Show b ⦄ → Show (Either a b) iShowEither = makeShowsPrec λ where p (Left x) → showApp₁ p "Left" x p (Right y) → showApp₁ p "Right" y private -- Minus the parens showTuple : ∀ {as} → ⦃ All Show as ⦄ → Tuple as → ShowS showTuple [] = showString "" showTuple ⦃ allCons ⦄ (x ∷ []) = shows x showTuple ⦃ allCons ⦄ (x ∷ xs) = shows x ∘ showString "," ∘ showTuple xs instance iShowTuple : ∀ {as} → ⦃ All Show as ⦄ → Show (Tuple as) iShowTuple = makeShowsPrec λ _ → showParen true ∘ showTuple
{ "alphanum_fraction": 0.6660633484, "avg_line_length": 28.5775862069, "ext": "agda", "hexsha": "b16820b1a19048ad04578ae849916742d4306ecf", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "4cb28f1b5032948b19b977b390fa260be292abf6", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "flupe/agda2hs", "max_forks_repo_path": "lib/Haskell/Prim/Show.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "4cb28f1b5032948b19b977b390fa260be292abf6", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "flupe/agda2hs", "max_issues_repo_path": "lib/Haskell/Prim/Show.agda", "max_line_length": 124, "max_stars_count": null, "max_stars_repo_head_hexsha": "4cb28f1b5032948b19b977b390fa260be292abf6", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "flupe/agda2hs", "max_stars_repo_path": "lib/Haskell/Prim/Show.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 1051, "size": 3315 }
------------------------------------------------------------------------ -- The Agda standard library -- -- Membership of vectors, along with some additional definitions. ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Relation.Binary using (Setoid; _Respects_) module Data.Vec.Membership.Setoid {c ℓ} (S : Setoid c ℓ) where open import Function open import Data.Vec as Vec using (Vec; []; _∷_) open import Data.Vec.Relation.Unary.Any as Any using (Any; here; there; index) open import Data.Product using (∃; _×_; _,_) open import Relation.Nullary using (¬_) open import Relation.Unary using (Pred) open Setoid S renaming (Carrier to A) ------------------------------------------------------------------------ -- Definitions infix 4 _∈_ _∉_ _∈_ : A → ∀ {n} → Vec A n → Set _ x ∈ xs = Any (x ≈_) xs _∉_ : A → ∀ {n} → Vec A n → Set _ x ∉ xs = ¬ x ∈ xs ------------------------------------------------------------------------ -- Operations mapWith∈ : ∀ {b} {B : Set b} {n} (xs : Vec A n) → (∀ {x} → x ∈ xs → B) → Vec B n mapWith∈ [] f = [] mapWith∈ (x ∷ xs) f = f (here refl) ∷ mapWith∈ xs (f ∘ there) _∷=_ : ∀ {n} {xs : Vec A n} {x} → x ∈ xs → A → Vec A n _∷=_ {xs = xs} x∈xs v = xs Vec.[ index x∈xs ]≔ v ------------------------------------------------------------------------ -- Finding and losing witnesses module _ {p} {P : Pred A p} where find : ∀ {n} {xs : Vec A n} → Any P xs → ∃ λ x → x ∈ xs × P x find (here px) = (_ , here refl , px) find (there pxs) with find pxs ... | (x , x∈xs , px) = (x , there x∈xs , px) lose : P Respects _≈_ → ∀ {x n} {xs : Vec A n} → x ∈ xs → P x → Any P xs lose resp x∈xs px = Any.map (flip resp px) x∈xs
{ "alphanum_fraction": 0.4571266326, "avg_line_length": 30.8947368421, "ext": "agda", "hexsha": "af54d76d48e779a1ede9c9774b315fc99703f463", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "0debb886eb5dbcd38dbeebd04b34cf9d9c5e0e71", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "omega12345/agda-mode", "max_forks_repo_path": "test/asset/agda-stdlib-1.0/Data/Vec/Membership/Setoid.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "0debb886eb5dbcd38dbeebd04b34cf9d9c5e0e71", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "omega12345/agda-mode", "max_issues_repo_path": "test/asset/agda-stdlib-1.0/Data/Vec/Membership/Setoid.agda", "max_line_length": 74, "max_stars_count": null, "max_stars_repo_head_hexsha": "0debb886eb5dbcd38dbeebd04b34cf9d9c5e0e71", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "omega12345/agda-mode", "max_stars_repo_path": "test/asset/agda-stdlib-1.0/Data/Vec/Membership/Setoid.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 536, "size": 1761 }
-- Andreas, 2017-12-16, issue #2873, reported by m0davis -- Regression introduced by a fix of #737 that printed -- the refinement candidate to concrete syntax -- and ran the scope checker again to get back to abstract syntax. -- {-# OPTIONS -v interaction:50 #-} open import Agda.Builtin.Nat data Vec {a} (A : Set a) : Nat → Set a where [] : Vec A zero _∷_ : ∀ {n} (x : A) (xs : Vec A n) → Vec A (suc n) module Fails where open import Agda.Builtin.List test : Vec Nat 1 test = {!(_∷_) !} -- WAS: C-c C-r fails here test2 : Vec Nat 1 test2 = {! !} -- WAS: C-c C-r fails here module Succeeds where open import Agda.Builtin.List public test : Vec Nat 1 test = {!!} -- C-c C-r succeeds here
{ "alphanum_fraction": 0.6387726639, "avg_line_length": 24.724137931, "ext": "agda", "hexsha": "f2d02fc5b5ac6ae7bb596a35f541ab848d9ce177", "lang": "Agda", "max_forks_count": 371, "max_forks_repo_forks_event_max_datetime": "2022-03-30T19:00:30.000Z", "max_forks_repo_forks_event_min_datetime": "2015-01-03T14:04:08.000Z", "max_forks_repo_head_hexsha": "231d6ad8e77b67ff8c4b1cb35a6c31ccd988c3e9", "max_forks_repo_licenses": [ "BSD-3-Clause" ], "max_forks_repo_name": "Agda-zh/agda", "max_forks_repo_path": "test/interaction/Issue2873.agda", "max_issues_count": 4066, "max_issues_repo_head_hexsha": "ed8ac6f4062ea8a20fa0f62d5db82d4e68278338", "max_issues_repo_issues_event_max_datetime": "2022-03-31T21:14:49.000Z", "max_issues_repo_issues_event_min_datetime": "2015-01-10T11:24:51.000Z", "max_issues_repo_licenses": [ "BSD-3-Clause" ], "max_issues_repo_name": "shlevy/agda", "max_issues_repo_path": "test/interaction/Issue2873.agda", "max_line_length": 66, "max_stars_count": 1989, "max_stars_repo_head_hexsha": "ed8ac6f4062ea8a20fa0f62d5db82d4e68278338", "max_stars_repo_licenses": [ "BSD-3-Clause" ], "max_stars_repo_name": "shlevy/agda", "max_stars_repo_path": "test/interaction/Issue2873.agda", "max_stars_repo_stars_event_max_datetime": "2022-03-30T18:20:48.000Z", "max_stars_repo_stars_event_min_datetime": "2015-01-09T23:51:16.000Z", "num_tokens": 237, "size": 717 }
{-# OPTIONS --cubical --safe --postfix-projections #-} module Function.Injective.Base where open import Level open import Path open import Data.Sigma Injective : (A → B) → Type _ Injective f = ∀ x y → (f⟨x⟩≡f⟨y⟩ : f x ≡ f y) → x ≡ y infixr 0 _↣_ _↣_ : Type a → Type b → Type (a ℓ⊔ b) A ↣ B = Σ[ f ⦂ (A → B) ] × Injective f refl-↣ : A ↣ A refl-↣ .fst x = x refl-↣ .snd x y x≡y = x≡y
{ "alphanum_fraction": 0.585492228, "avg_line_length": 21.4444444444, "ext": "agda", "hexsha": "f04539dfa2f9ce2e5ed8fc7560edef26fe57915f", "lang": "Agda", "max_forks_count": 1, "max_forks_repo_forks_event_max_datetime": "2021-11-11T12:30:21.000Z", "max_forks_repo_forks_event_min_datetime": "2021-11-11T12:30:21.000Z", "max_forks_repo_head_hexsha": "97a3aab1282b2337c5f43e2cfa3fa969a94c11b7", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "oisdk/agda-playground", "max_forks_repo_path": "Function/Injective/Base.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "97a3aab1282b2337c5f43e2cfa3fa969a94c11b7", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "oisdk/agda-playground", "max_issues_repo_path": "Function/Injective/Base.agda", "max_line_length": 54, "max_stars_count": 6, "max_stars_repo_head_hexsha": "97a3aab1282b2337c5f43e2cfa3fa969a94c11b7", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "oisdk/agda-playground", "max_stars_repo_path": "Function/Injective/Base.agda", "max_stars_repo_stars_event_max_datetime": "2021-11-16T08:11:34.000Z", "max_stars_repo_stars_event_min_datetime": "2020-09-11T17:45:41.000Z", "num_tokens": 174, "size": 386 }
{-# OPTIONS --cubical #-} module _ where module _ where open import Agda.Primitive.Cubical public open import Agda.Builtin.Cubical.Path public refl : ∀ {a} {A : Set a} {x : A} → x ≡ x refl {x = x} = \ _ → x -- Here there's no solution for H, pattern unification will try -- H := \ i -> b, but the equality constraints from -- H : Path b a should rule out that assignment. testPath : ∀ {A : Set} {b a : A} (let H : b ≡ a; H = _) → ∀ i → H i ≡ b testPath i = refl
{ "alphanum_fraction": 0.6097046414, "avg_line_length": 27.8823529412, "ext": "agda", "hexsha": "d2994ccd03ee34cd49e63cf30a207cbd5ea77dcc", "lang": "Agda", "max_forks_count": 371, "max_forks_repo_forks_event_max_datetime": "2022-03-30T19:00:30.000Z", "max_forks_repo_forks_event_min_datetime": "2015-01-03T14:04:08.000Z", "max_forks_repo_head_hexsha": "231d6ad8e77b67ff8c4b1cb35a6c31ccd988c3e9", "max_forks_repo_licenses": [ "BSD-3-Clause" ], "max_forks_repo_name": "Agda-zh/agda", "max_forks_repo_path": "test/Fail/Issue2650.agda", "max_issues_count": 4066, "max_issues_repo_head_hexsha": "ed8ac6f4062ea8a20fa0f62d5db82d4e68278338", "max_issues_repo_issues_event_max_datetime": "2022-03-31T21:14:49.000Z", "max_issues_repo_issues_event_min_datetime": "2015-01-10T11:24:51.000Z", "max_issues_repo_licenses": [ "BSD-3-Clause" ], "max_issues_repo_name": "shlevy/agda", "max_issues_repo_path": "test/Fail/Issue2650.agda", "max_line_length": 71, "max_stars_count": 1989, "max_stars_repo_head_hexsha": "ed8ac6f4062ea8a20fa0f62d5db82d4e68278338", "max_stars_repo_licenses": [ "BSD-3-Clause" ], "max_stars_repo_name": "shlevy/agda", "max_stars_repo_path": "test/Fail/Issue2650.agda", "max_stars_repo_stars_event_max_datetime": "2022-03-30T18:20:48.000Z", "max_stars_repo_stars_event_min_datetime": "2015-01-09T23:51:16.000Z", "num_tokens": 161, "size": 474 }
module Structure.Operator.Field.VectorSpace where import Lvl open import Structure.Setoid open import Structure.Operator.Field open import Structure.Operator.Properties using (associativity ; identityₗ ; distributivityᵣ) open import Structure.Operator.Vector open import Structure.Operator open import Type private variable ℓ ℓₑ ℓₗ ℓₗₑ : Lvl.Level private variable T : Type{ℓ} private variable _+_ _⋅_ : T → T → T module _ ⦃ equiv : Equiv{ℓₑ}(T) ⦄ ⦃ [+]-oper : BinaryOperator(_+_) ⦄ ⦃ [⋅]-oper : BinaryOperator(_⋅_) ⦄ (field-structure : Field{T = T}(_+_)(_⋅_)) where open Field(field-structure) fieldVectorSpace : VectorSpace(_+_)(_⋅_)(_+_)(_⋅_) VectorSpace.scalarField fieldVectorSpace = field-structure VectorSpace.[⋅ₛᵥ]-binaryOperator fieldVectorSpace = [⋅]-oper VectorSpace.[⋅ₛ][⋅ₛᵥ]-compatibility fieldVectorSpace = associativity(_⋅_) VectorSpace.[⋅ₛᵥ][+ᵥ]-distributivityₗ fieldVectorSpace = [⋅][+]-distributivityₗ VectorSpace.[⋅ₛᵥ][+ₛ][+ᵥ]-distributivityᵣ fieldVectorSpace = distributivityᵣ(_⋅_)(_+_)
{ "alphanum_fraction": 0.7121634169, "avg_line_length": 37.1379310345, "ext": "agda", "hexsha": "74210b12b4aec24d32a9c3bd9163a46cd6d49820", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "70f4fba849f2fd779c5aaa5af122ccb6a5b271ba", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "Lolirofle/stuff-in-agda", "max_forks_repo_path": "Structure/Operator/Field/VectorSpace.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "70f4fba849f2fd779c5aaa5af122ccb6a5b271ba", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "Lolirofle/stuff-in-agda", "max_issues_repo_path": "Structure/Operator/Field/VectorSpace.agda", "max_line_length": 93, "max_stars_count": 6, "max_stars_repo_head_hexsha": "70f4fba849f2fd779c5aaa5af122ccb6a5b271ba", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "Lolirofle/stuff-in-agda", "max_stars_repo_path": "Structure/Operator/Field/VectorSpace.agda", "max_stars_repo_stars_event_max_datetime": "2022-02-05T06:53:22.000Z", "max_stars_repo_stars_event_min_datetime": "2020-04-07T17:58:13.000Z", "num_tokens": 384, "size": 1077 }
------------------------------------------------------------------------ -- The Agda standard library -- -- Some derivable properties ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Algebra.Bundles module Algebra.Properties.Group {g₁ g₂} (G : Group g₁ g₂) where open Group G open import Algebra.Definitions _≈_ open import Relation.Binary.Reasoning.Setoid setoid open import Function open import Data.Product ε⁻¹≈ε : ε ⁻¹ ≈ ε ε⁻¹≈ε = begin ε ⁻¹ ≈⟨ sym $ identityʳ (ε ⁻¹) ⟩ ε ⁻¹ ∙ ε ≈⟨ inverseˡ ε ⟩ ε ∎ private left-helper : ∀ x y → x ≈ (x ∙ y) ∙ y ⁻¹ left-helper x y = begin x ≈⟨ sym (identityʳ x) ⟩ x ∙ ε ≈⟨ ∙-congˡ $ sym (inverseʳ y) ⟩ x ∙ (y ∙ y ⁻¹) ≈⟨ sym (assoc x y (y ⁻¹)) ⟩ (x ∙ y) ∙ y ⁻¹ ∎ right-helper : ∀ x y → y ≈ x ⁻¹ ∙ (x ∙ y) right-helper x y = begin y ≈⟨ sym (identityˡ y) ⟩ ε ∙ y ≈⟨ ∙-congʳ $ sym (inverseˡ x) ⟩ (x ⁻¹ ∙ x) ∙ y ≈⟨ assoc (x ⁻¹) x y ⟩ x ⁻¹ ∙ (x ∙ y) ∎ ∙-cancelˡ : LeftCancellative _∙_ ∙-cancelˡ x {y} {z} eq = begin y ≈⟨ right-helper x y ⟩ x ⁻¹ ∙ (x ∙ y) ≈⟨ ∙-congˡ eq ⟩ x ⁻¹ ∙ (x ∙ z) ≈˘⟨ right-helper x z ⟩ z ∎ ∙-cancelʳ : RightCancellative _∙_ ∙-cancelʳ {x} y z eq = begin y ≈⟨ left-helper y x ⟩ y ∙ x ∙ x ⁻¹ ≈⟨ ∙-congʳ eq ⟩ z ∙ x ∙ x ⁻¹ ≈˘⟨ left-helper z x ⟩ z ∎ ∙-cancel : Cancellative _∙_ ∙-cancel = ∙-cancelˡ , ∙-cancelʳ ⁻¹-involutive : ∀ x → x ⁻¹ ⁻¹ ≈ x ⁻¹-involutive x = begin x ⁻¹ ⁻¹ ≈˘⟨ identityʳ _ ⟩ x ⁻¹ ⁻¹ ∙ ε ≈˘⟨ ∙-congˡ $ inverseˡ _ ⟩ x ⁻¹ ⁻¹ ∙ (x ⁻¹ ∙ x) ≈˘⟨ right-helper (x ⁻¹) x ⟩ x ∎ ⁻¹-injective : ∀ {x y} → x ⁻¹ ≈ y ⁻¹ → x ≈ y ⁻¹-injective {x} {y} eq = ∙-cancelʳ x y ( begin x ∙ x ⁻¹ ≈⟨ inverseʳ x ⟩ ε ≈˘⟨ inverseʳ y ⟩ y ∙ y ⁻¹ ≈˘⟨ ∙-congˡ eq ⟩ y ∙ x ⁻¹ ∎ ) ⁻¹-anti-homo-∙ : ∀ x y → (x ∙ y) ⁻¹ ≈ y ⁻¹ ∙ x ⁻¹ ⁻¹-anti-homo-∙ x y = ∙-cancelˡ _ ( begin x ∙ y ∙ (x ∙ y) ⁻¹ ≈⟨ inverseʳ _ ⟩ ε ≈˘⟨ inverseʳ _ ⟩ x ∙ x ⁻¹ ≈⟨ ∙-congʳ (left-helper x y) ⟩ (x ∙ y) ∙ y ⁻¹ ∙ x ⁻¹ ≈⟨ assoc (x ∙ y) (y ⁻¹) (x ⁻¹) ⟩ x ∙ y ∙ (y ⁻¹ ∙ x ⁻¹) ∎ ) identityˡ-unique : ∀ x y → x ∙ y ≈ y → x ≈ ε identityˡ-unique x y eq = begin x ≈⟨ left-helper x y ⟩ (x ∙ y) ∙ y ⁻¹ ≈⟨ ∙-congʳ eq ⟩ y ∙ y ⁻¹ ≈⟨ inverseʳ y ⟩ ε ∎ identityʳ-unique : ∀ x y → x ∙ y ≈ x → y ≈ ε identityʳ-unique x y eq = begin y ≈⟨ right-helper x y ⟩ x ⁻¹ ∙ (x ∙ y) ≈⟨ refl ⟨ ∙-cong ⟩ eq ⟩ x ⁻¹ ∙ x ≈⟨ inverseˡ x ⟩ ε ∎ identity-unique : ∀ {x} → Identity x _∙_ → x ≈ ε identity-unique {x} id = identityˡ-unique x x (proj₂ id x) inverseˡ-unique : ∀ x y → x ∙ y ≈ ε → x ≈ y ⁻¹ inverseˡ-unique x y eq = begin x ≈⟨ left-helper x y ⟩ (x ∙ y) ∙ y ⁻¹ ≈⟨ ∙-congʳ eq ⟩ ε ∙ y ⁻¹ ≈⟨ identityˡ (y ⁻¹) ⟩ y ⁻¹ ∎ inverseʳ-unique : ∀ x y → x ∙ y ≈ ε → y ≈ x ⁻¹ inverseʳ-unique x y eq = begin y ≈⟨ sym (⁻¹-involutive y) ⟩ y ⁻¹ ⁻¹ ≈⟨ ⁻¹-cong (sym (inverseˡ-unique x y eq)) ⟩ x ⁻¹ ∎ ------------------------------------------------------------------------ -- DEPRECATED NAMES ------------------------------------------------------------------------ -- Please use the new names as continuing support for the old names is -- not guaranteed. -- Version 1.1 left-identity-unique = identityˡ-unique {-# WARNING_ON_USAGE left-identity-unique "Warning: left-identity-unique was deprecated in v1.1. Please use identityˡ-unique instead." #-} right-identity-unique = identityʳ-unique {-# WARNING_ON_USAGE right-identity-unique "Warning: right-identity-unique was deprecated in v1.1. Please use identityʳ-unique instead." #-} left-inverse-unique = inverseˡ-unique {-# WARNING_ON_USAGE left-inverse-unique "Warning: left-inverse-unique was deprecated in v1.1. Please use inverseˡ-unique instead." #-} right-inverse-unique = inverseʳ-unique {-# WARNING_ON_USAGE right-inverse-unique "Warning: right-inverse-unique was deprecated in v1.1. Please use inverseʳ-unique instead." #-}
{ "alphanum_fraction": 0.4919023447, "avg_line_length": 29.7625899281, "ext": "agda", "hexsha": "c3508362a1fa198bc05bc89780dd9e00b478f9c4", "lang": "Agda", "max_forks_count": 1, "max_forks_repo_forks_event_max_datetime": "2021-11-04T06:54:45.000Z", "max_forks_repo_forks_event_min_datetime": "2021-11-04T06:54:45.000Z", "max_forks_repo_head_hexsha": "fb380f2e67dcb4a94f353dbaec91624fcb5b8933", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "DreamLinuxer/popl21-artifact", "max_forks_repo_path": "agda-stdlib/src/Algebra/Properties/Group.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "fb380f2e67dcb4a94f353dbaec91624fcb5b8933", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "DreamLinuxer/popl21-artifact", "max_issues_repo_path": "agda-stdlib/src/Algebra/Properties/Group.agda", "max_line_length": 72, "max_stars_count": 5, "max_stars_repo_head_hexsha": "fb380f2e67dcb4a94f353dbaec91624fcb5b8933", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "DreamLinuxer/popl21-artifact", "max_stars_repo_path": "agda-stdlib/src/Algebra/Properties/Group.agda", "max_stars_repo_stars_event_max_datetime": "2020-10-10T21:41:32.000Z", "max_stars_repo_stars_event_min_datetime": "2020-10-07T12:07:53.000Z", "num_tokens": 1788, "size": 4137 }
module Category where open import Agda.Primitive open import Equality open import Finite record Category ℓ : Set (lsuc ℓ) where field obj : Set ℓ hom : obj → obj → Set ℓ id-hom : ∀ {x} → hom x x compose : ∀ {x y z} → hom y z → hom x y → hom x z compose-id-left : ∀ {x y} {f : hom x y} → compose id-hom f ≡ f compose-id-right : ∀ {x y} {f : hom x y} → compose f id-hom ≡ f compose-assoc : ∀ {x y z w} {f : hom x y} {g : hom y z} {h : hom z w} → compose (compose h g) f ≡ compose h (compose g f) record FPCategory ℓ : Set (lsuc ℓ) where open Category field {{category}} : Category ℓ product : ∀ n (xs : Fin n → obj category) → obj category project : ∀ n {xs : Fin n → obj category} → ∀ (i : Fin n) → hom category (product n xs) (xs i) tuple : ∀ n {xs : Fin n → obj category} {y} → ∀ (f : ∀ i → hom category y (xs i)) → hom category y (product n xs) project-tuple : ∀ {n} {xs : Fin n → obj category} {y} {f : ∀ i → hom category y (xs i)} {j} → compose category (project n j) (tuple n f) ≡ f j tuple-project : ∀ {n} {xs : Fin n → obj category} {y} {u v : hom category y (product n xs)} → (∀ i → compose category (project n i) u ≡ compose category (project n i) v) → u ≡ v tuple-hom : ∀ n {xs ys : Fin n → obj category} (f : ∀ i → hom category (xs i) (ys i)) → hom category (product n xs) (product n ys) tuple-hom n f = tuple n (λ i → compose category (f i) (project n i)) power : ℕ → obj category → obj category power n x = product n (λ _ → x) power-hom : ∀ n {x y : obj category} → hom category x y → hom category (power n x) (power n y) power-hom n f = tuple-hom n (λ i → f) terminal-obj : obj category terminal-obj = product Z (λ ()) terminal-hom : ∀ {x : obj category} → hom category x terminal-obj terminal-hom = tuple Z (λ ()) terminal-eq : ∀ {x : obj category} {f g : hom category x terminal-obj} → f ≡ g terminal-eq {x} {f} {g} = tuple-project λ ()
{ "alphanum_fraction": 0.5712856428, "avg_line_length": 40.7959183673, "ext": "agda", "hexsha": "b4110737a9f7d71f3691b5930c812e544ec2d9a5", "lang": "Agda", "max_forks_count": 6, "max_forks_repo_forks_event_max_datetime": "2021-05-24T02:51:43.000Z", "max_forks_repo_forks_event_min_datetime": "2021-02-16T13:43:07.000Z", "max_forks_repo_head_hexsha": "2aaf850bb1a262681c5a232cdefae312f921b9d4", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "andrejbauer/formaltt", "max_forks_repo_path": "src/Experimental/Category.agda", "max_issues_count": 1, "max_issues_repo_head_hexsha": "2aaf850bb1a262681c5a232cdefae312f921b9d4", "max_issues_repo_issues_event_max_datetime": "2021-05-14T16:15:17.000Z", "max_issues_repo_issues_event_min_datetime": "2021-04-30T14:18:25.000Z", "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "andrejbauer/formaltt", "max_issues_repo_path": "src/Experimental/Category.agda", "max_line_length": 125, "max_stars_count": 21, "max_stars_repo_head_hexsha": "0a9d25e6e3965913d9b49a47c88cdfb94b55ffeb", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "cilinder/formaltt", "max_stars_repo_path": "src/Experimental/Category.agda", "max_stars_repo_stars_event_max_datetime": "2021-11-19T15:50:08.000Z", "max_stars_repo_stars_event_min_datetime": "2021-02-16T14:07:06.000Z", "num_tokens": 683, "size": 1999 }
{-# OPTIONS --cubical-compatible #-} open import Agda.Primitive data _≡_ {a} {A : Set a} (x : A) : A → Set where refl : x ≡ x
{ "alphanum_fraction": 0.5846153846, "avg_line_length": 18.5714285714, "ext": "agda", "hexsha": "4aae168fc47de7fd746f4de0142808776d3e4b23", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "98c9382a59f707c2c97d75919e389fc2a783ac75", "max_forks_repo_licenses": [ "BSD-2-Clause" ], "max_forks_repo_name": "KDr2/agda", "max_forks_repo_path": "test/Fail/Issue3420-Identity.agda", "max_issues_count": 6, "max_issues_repo_head_hexsha": "98c9382a59f707c2c97d75919e389fc2a783ac75", "max_issues_repo_issues_event_max_datetime": "2021-11-24T08:31:10.000Z", "max_issues_repo_issues_event_min_datetime": "2021-10-18T08:12:24.000Z", "max_issues_repo_licenses": [ "BSD-2-Clause" ], "max_issues_repo_name": "KDr2/agda", "max_issues_repo_path": "test/Fail/Issue3420-Identity.agda", "max_line_length": 48, "max_stars_count": null, "max_stars_repo_head_hexsha": "98c9382a59f707c2c97d75919e389fc2a783ac75", "max_stars_repo_licenses": [ "BSD-2-Clause" ], "max_stars_repo_name": "KDr2/agda", "max_stars_repo_path": "test/Fail/Issue3420-Identity.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 48, "size": 130 }
-- Andreas and James, Nov 2011 and Oct 2012 -- function with flexible arity -- {-# OPTIONS --no-coverage-check #-} -- {-# OPTIONS -v tc.cover:20 #-} module FlexibleInterpreter where open import Common.Prelude using (Nat; zero; suc) open import Common.MAlonzo hiding (main) open import Common.Equality data Ty : Set where nat : Ty arr : Ty -> Ty -> Ty data Exp : Ty -> Set where zero : Exp nat suc : Exp (arr nat nat) pred : Exp (arr nat nat) app : {a b : Ty} -> Exp (arr a b) -> Exp a -> Exp b Sem : Ty -> Set Sem nat = Nat Sem (arr a b) = Sem a -> Sem b module Flex where -- Haskell does not seem to handle this eval' : (a : Ty) -> Exp a -> Sem a eval' ._ zero = zero eval' ._ suc = suc eval' b (app f e) = eval' _ f (eval' _ e) eval' .(arr nat nat) pred zero = zero eval' ._ pred (suc n) = n eval : {a : Ty} -> Exp a -> Sem a eval zero = zero eval suc = suc eval pred zero = zero eval pred (suc n) = n eval (app f e) = eval f (eval e) testEvalSuc : ∀ {n} → eval suc n ≡ suc n testEvalSuc = refl testEvalPredZero : eval pred zero ≡ zero testEvalPredZero = refl testEvalPredSuc : ∀ {n} → eval pred (suc n) ≡ n testEvalPredSuc = refl module Rigid where -- This executes fine eval : {a : Ty} -> Exp a -> Sem a eval zero = zero eval suc = suc eval pred = λ { zero -> zero ; (suc n) -> n } eval (app f e) = eval f (eval e) open Flex expr = (app pred (app suc (app suc zero))) test = eval expr main = mainPrintNat test -- should print 1
{ "alphanum_fraction": 0.5774294671, "avg_line_length": 23.4558823529, "ext": "agda", "hexsha": "e4279f86f7c43d0cd26a32e113f7f62ecf9a9e9a", "lang": "Agda", "max_forks_count": 1, "max_forks_repo_forks_event_max_datetime": "2022-03-12T11:35:18.000Z", "max_forks_repo_forks_event_min_datetime": "2022-03-12T11:35:18.000Z", "max_forks_repo_head_hexsha": "70c8a575c46f6a568c7518150a1a64fcd03aa437", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "masondesu/agda", "max_forks_repo_path": "test/succeed/FlexibleInterpreter.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "70c8a575c46f6a568c7518150a1a64fcd03aa437", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "masondesu/agda", "max_issues_repo_path": "test/succeed/FlexibleInterpreter.agda", "max_line_length": 54, "max_stars_count": 1, "max_stars_repo_head_hexsha": "477c8c37f948e6038b773409358fd8f38395f827", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "larrytheliquid/agda", "max_stars_repo_path": "test/succeed/FlexibleInterpreter.agda", "max_stars_repo_stars_event_max_datetime": "2018-10-10T17:08:44.000Z", "max_stars_repo_stars_event_min_datetime": "2018-10-10T17:08:44.000Z", "num_tokens": 523, "size": 1595 }
{-# OPTIONS --without-K --safe #-} module Cats.Category.Fun.Facts.Limit where open import Data.Product using (_,_) open import Cats.Category open import Cats.Category.Cat.Facts.Exponential using (Eval ; Curry ; Uncurry) open import Cats.Category.Cat.Facts.Product using (Swap) open import Cats.Category.Cones as Cones using (Cone ; Apex ; arr ; commute) open import Cats.Category.Fun using (≈-intro ; ≈-elim) renaming (Fun to _↝_) open import Cats.Category.Product.Binary using (_×_) open import Cats.Functor using (Functor ; _∘_) open import Cats.Limit using (Limit ; IsLimit ; Complete ; trans ; arr∘trans) open import Cats.Trans using (Trans ; component ; natural) open Functor open Limit instance -- Good lord this proof... complete : ∀ {lo la l≈ lo′ la′ l≈′ lo″ la″ l≈″} → {C : Category lo la l≈} {D : Category lo′ la′ l≈′} → {{_ : Complete D lo″ la″ l≈″}} → Complete (C ↝ D) lo″ la″ l≈″ complete {C = C} {D} {{D-complete}} .Complete.lim′ {J} F = record { cone = record { Apex = DC.limF ∘ F′ ; arr = λ j → record { component = λ c → DC.lim′ (fobj F′ c) .arr j ; natural = λ {c} {d} {f} → D.≈.trans (arr∘trans (fmap F′ f) (DC.lim′ (fobj F′ c)) (DC.lim′ (fobj F′ d)) j) (D.∘-resp-l F′fj≈Fjf) } ; commute = λ {i} {j} f → ≈-intro λ {c} → D.≈.trans (DC.lim′ (fobj F′ c) .commute f) (D.∘-resp-l F′cf≈Ffc) } ; isLimit = λ X → record { arr = record { arr = record { component = λ c → !! (DC.lim′ (F′ .fobj c)) (apCone X c) ; natural = λ {c} {d} {f} → begin !! (DC.lim′ (fobj F′ d)) (apCone X d) D.∘ fmap (Apex X) f ≈⟨ !!∘ (DC.lim′ (fobj F′ d)) {C = record { Apex = Apex X .fobj c ; arr = λ j → apCone X d .arr j D.∘ Apex X .fmap f ; commute = λ {i} {j} g → D.≈.sym ( begin (F .fobj j .fmap C.id D.∘ F .fmap g .component d) D.∘ X .arr i .component d D.∘ Apex X .fmap f ≈⟨ D.∘-resp-l (D.≈.trans (D.∘-resp-l (F .fobj j .fmap-id)) D.id-l) ⟩ F .fmap g .component d D.∘ X .arr i .component d D.∘ Apex X .fmap f ≈⟨ D.unassoc ⟩ (F .fmap g .component d D.∘ X .arr i .component d) D.∘ Apex X .fmap f ≈⟨ D.∘-resp-l (D.≈.sym (X .commute g .≈-elim)) ⟩ X .arr j .component d D.∘ Apex X .fmap f ∎) }} record { commute = λ j → D.≈.refl } ⟩ !! (DC.lim′ (fobj F′ d)) _ ≈⟨ !!-unique (DC.lim′ (fobj F′ d)) record { commute = λ j → begin DC.lim′ (fobj F′ d) .arr j D.∘ trans (F′ .fmap f) (DC.lim′ (fobj F′ c)) (DC.lim′ (fobj F′ d)) D.∘ !! (DC.lim′ (fobj F′ c)) (apCone X c) ≈⟨ D.unassoc ⟩ (DC.lim′ (fobj F′ d) .arr j D.∘ trans (F′ .fmap f) (DC.lim′ (fobj F′ c)) (DC.lim′ (fobj F′ d))) D.∘ !! (DC.lim′ (fobj F′ c)) (apCone X c) ≈⟨ D.∘-resp-l (arr∘trans (F′ .fmap f) (DC.lim′ (fobj F′ c)) (DC.lim′ (fobj F′ d)) j) ⟩ (F′ .fmap f .component j D.∘ DC.lim′ (fobj F′ c) .arr j) D.∘ !! (DC.lim′ (fobj F′ c)) (apCone X c) ≈⟨ D.assoc ⟩ F′ .fmap f .component j D.∘ DC.lim′ (fobj F′ c) .arr j D.∘ !! (DC.lim′ (fobj F′ c)) (apCone X c) ≈⟨ D.∘-resp-r (arr∘!! (DC.lim′ (fobj F′ c)) (apCone X c)) ⟩ F′ .fmap f .component j D.∘ X .arr j .component c ≈⟨ D.∘-resp-l F′fj≈Fjf ⟩ F .fobj j .fmap f D.∘ X .arr j .component c ≈˘⟨ X .arr j .natural ⟩ X .arr j .component d D.∘ Apex X .fmap f ∎ } ⟩ fmap (DC.limF ∘ F′) f D.∘ !! (DC.lim′ (fobj F′ c)) (apCone X c) ∎ } ; commute = λ j → ≈-intro λ {c} → arr∘!! (DC.lim′ (F′ .fobj c)) (apCone X c) } ; unique = λ {g} _ → ≈-intro λ {c} → !!-unique (DC.lim′ (F′ .fobj c)) record { commute = λ j → g .commute j .≈-elim } } } where module C = Category C module D = Category D module J = Category J open D.≈-Reasoning module DC = Complete D-complete F′ : Functor C (J ↝ D) F′ = Curry (Uncurry F ∘ Swap) F′fj≈Fjf : ∀ {c d} {f : c C.⇒ d} {j} → F′ .fmap f .component j D.≈ F .fobj j .fmap f F′fj≈Fjf = D.≈.trans (D.∘-resp-r (fmap-id F .≈-elim)) D.id-r F′cf≈Ffc : ∀ {c i j} {f : i J.⇒ j} → F′ .fobj c .fmap f D.≈ F .fmap f .component c F′cf≈Ffc = D.≈.trans (D.∘-resp-l (fmap-id (fobj F _))) D.id-l apCone : Cone F → ∀ c → Cone (fobj F′ c) apCone X c = record { Apex = Apex X .fobj c ; arr = λ j → X .arr j .component c ; commute = λ f → D.≈.trans (X .commute f .≈-elim) (D.∘-resp-l (D.≈.sym F′cf≈Ffc)) }
{ "alphanum_fraction": 0.4243098017, "avg_line_length": 40.5789473684, "ext": "agda", "hexsha": "5d5f181acbeaf0cc1fb7bf7e17ed75318e697109", "lang": "Agda", "max_forks_count": 1, "max_forks_repo_forks_event_max_datetime": "2019-03-18T15:35:07.000Z", "max_forks_repo_forks_event_min_datetime": "2019-03-18T15:35:07.000Z", "max_forks_repo_head_hexsha": "1ad7b243acb622d46731e9ae7029408db6e561f1", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "JLimperg/cats", "max_forks_repo_path": "Cats/Category/Fun/Facts/Limit.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "1ad7b243acb622d46731e9ae7029408db6e561f1", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "JLimperg/cats", "max_issues_repo_path": "Cats/Category/Fun/Facts/Limit.agda", "max_line_length": 89, "max_stars_count": 24, "max_stars_repo_head_hexsha": "1ad7b243acb622d46731e9ae7029408db6e561f1", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "JLimperg/cats", "max_stars_repo_path": "Cats/Category/Fun/Facts/Limit.agda", "max_stars_repo_stars_event_max_datetime": "2021-08-06T05:00:46.000Z", "max_stars_repo_stars_event_min_datetime": "2017-11-03T15:18:57.000Z", "num_tokens": 1985, "size": 5397 }
{- Byzantine Fault Tolerant Consensus Verification in Agda, version 0.9. Copyright (c) 2021, Oracle and/or its affiliates. Licensed under the Universal Permissive License v 1.0 as shown at https://opensource.oracle.com/licenses/upl -} open import LibraBFT.Base.Types import LibraBFT.Impl.Consensus.SafetyRules.SafetyRules as SafetyRules import LibraBFT.Impl.Consensus.TestUtils.MockStorage as MockStorage open import LibraBFT.ImplShared.Consensus.Types open import LibraBFT.Prelude open import Optics.All module LibraBFT.Impl.Consensus.MetricsSafetyRules where performInitialize : SafetyRules → PersistentLivenessStorage → Either ErrLog SafetyRules performInitialize self obmPersistentLivenessStorage = do let consensusState = SafetyRules.consensusState self srWaypoint = consensusState ^∙ csWaypoint proofs <- MockStorage.retrieveEpochChangeProofE (srWaypoint ^∙ wVersion) obmPersistentLivenessStorage SafetyRules.initialize self proofs
{ "alphanum_fraction": 0.7865612648, "avg_line_length": 44, "ext": "agda", "hexsha": "017d6001ddd0b8d73680abf8eb6fa4bdf665747b", "lang": "Agda", "max_forks_count": 6, "max_forks_repo_forks_event_max_datetime": "2022-02-18T01:04:32.000Z", "max_forks_repo_forks_event_min_datetime": "2020-12-16T19:43:52.000Z", "max_forks_repo_head_hexsha": "49f8b1b70823be805d84ffc3157c3b880edb1e92", "max_forks_repo_licenses": [ "UPL-1.0" ], "max_forks_repo_name": "oracle/bft-consensus-agda", "max_forks_repo_path": "LibraBFT/Impl/Consensus/MetricsSafetyRules.agda", "max_issues_count": 72, "max_issues_repo_head_hexsha": "49f8b1b70823be805d84ffc3157c3b880edb1e92", "max_issues_repo_issues_event_max_datetime": "2022-03-25T05:36:11.000Z", "max_issues_repo_issues_event_min_datetime": "2021-02-04T05:04:33.000Z", "max_issues_repo_licenses": [ "UPL-1.0" ], "max_issues_repo_name": "oracle/bft-consensus-agda", "max_issues_repo_path": "LibraBFT/Impl/Consensus/MetricsSafetyRules.agda", "max_line_length": 111, "max_stars_count": 4, "max_stars_repo_head_hexsha": "49f8b1b70823be805d84ffc3157c3b880edb1e92", "max_stars_repo_licenses": [ "UPL-1.0" ], "max_stars_repo_name": "oracle/bft-consensus-agda", "max_stars_repo_path": "LibraBFT/Impl/Consensus/MetricsSafetyRules.agda", "max_stars_repo_stars_event_max_datetime": "2021-12-18T19:24:05.000Z", "max_stars_repo_stars_event_min_datetime": "2020-12-16T19:43:41.000Z", "num_tokens": 246, "size": 1012 }
-- Andreas, 2020-06-21, issue #3734, reported 2019-05-01 by gallais -- User warnings also on constructors and pattern synonyms. -- {-# OPTIONS -v scope.warning.usage:50 #-} data A : Set where s : A → A a : A b : A b = a -- (usage of a, but no warning yet installed) {-# WARNING_ON_USAGE a "Used a" #-} _ : A _ = a -- usage of a _ : A → A _ = λ where a → -- pattern usage of a a -- usage of a x → x _ : A _ = s b -- (usage of a via b, need not show) pattern c = s a -- usage of a {-# WARNING_ON_USAGE c "Used c" #-} _ : A _ = c -- usage of c _ : A → A _ = λ where c → -- pattern usage of c a -- usage of a x → x -- Ambiguous constructors module M where data D1 : Set where cons : D1 {-# WARNING_ON_USAGE cons "Warning on D1.cons (shouldn't show)" #-} data D2 : Set where cons : D2 {-# WARNING_ON_USAGE cons "Warning on D2.cons (should show)" #-} open M d2 : D2 d2 = cons -- usage of D2.cons f2 : D2 → Set f2 cons = A -- pattern usage of D2.cons -- Ambiguous attachments of warnings shall apply to all disambiguations. data Amb1 : Set where amb : Amb1 data Amb2 : Set where amb : Amb2 {-# WARNING_ON_USAGE amb "Ambiguous constructor amb was used" #-} test1 : Amb1 test1 = amb test2 : Amb2 test2 = amb
{ "alphanum_fraction": 0.6191607284, "avg_line_length": 18.0428571429, "ext": "agda", "hexsha": "5ab03eeafb1162164d85f331c2116858375fb58e", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "ed8ac6f4062ea8a20fa0f62d5db82d4e68278338", "max_forks_repo_licenses": [ "BSD-3-Clause" ], "max_forks_repo_name": "shlevy/agda", "max_forks_repo_path": "test/Succeed/Issue3734.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "ed8ac6f4062ea8a20fa0f62d5db82d4e68278338", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "BSD-3-Clause" ], "max_issues_repo_name": "shlevy/agda", "max_issues_repo_path": "test/Succeed/Issue3734.agda", "max_line_length": 72, "max_stars_count": null, "max_stars_repo_head_hexsha": "ed8ac6f4062ea8a20fa0f62d5db82d4e68278338", "max_stars_repo_licenses": [ "BSD-3-Clause" ], "max_stars_repo_name": "shlevy/agda", "max_stars_repo_path": "test/Succeed/Issue3734.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 418, "size": 1263 }
-------------------------------------------------------------------------------- -- This file provides the data structures and functions for the theory of -- cedille core extended with the constructs for metaprogramming. -------------------------------------------------------------------------------- {-# OPTIONS --type-in-type #-} module CoreTheory where import Agda.Builtin.Nat using (_+_; _-_; _==_) import Data.Product open import Class.Map open import Class.Monad.Except open import Data.HSTrie open import Data.Integer using (ℤ; +_; -[1+_]) open import Data.String using (toList; fromList) open import Data.Word using (Word64; toℕ; fromℕ) open import Data.Word64.Exts open import Monads.Except open import Prelude open import Theory.PrimMeta public private variable A B C : Set M : Set → Set data Sort : Set where ⋆ : Sort □ : Sort instance Sort-Show : Show Sort Sort-Show = record { show = helper } where helper : Sort → String helper ⋆ = "*" helper □ = "□" Sort-Eq : Eq Sort Sort-Eq = record { _≟_ = helper } where helper : (s s' : Sort) → Dec (s ≡ s') helper ⋆ ⋆ = yes refl helper ⋆ □ = no λ () helper □ ⋆ = no λ () helper □ □ = yes refl Sort-EqB = Eq→EqB {{Sort-Eq}} GlobalName : Set GlobalName = String 𝕀 : Set 𝕀 = Word64 instance 𝕀-Eq : Eq 𝕀 𝕀-Eq = record { _≟_ = Data.Word._≟_ } 𝕀-EqB : EqB 𝕀 𝕀-EqB = record { _≣_ = Agda.Builtin.Nat._==_ on toℕ } 𝕀-Show : Show 𝕀 𝕀-Show = record { show = show ∘ toℕ } _<𝕀_ : 𝕀 → 𝕀 → Bool x <𝕀 y = toℕ x <ᵇ toℕ y _+𝕀_ : 𝕀 → 𝕀 → 𝕀 x +𝕀 y = fromℕ $ toℕ x + toℕ y _-𝕀_ : 𝕀 → 𝕀 → 𝕀 _-𝕀_ = subWord suc𝕀 : 𝕀 → 𝕀 suc𝕀 = _+𝕀 fromℕ 1 pred𝕀 : 𝕀 → 𝕀 pred𝕀 = _-𝕀 fromℕ 1 data Name : Set where Bound : 𝕀 → Name Free : GlobalName → Name instance Name-Eq : Eq Name Name-Eq = record { _≟_ = helper } where helper : (n n' : Name) → Dec (n ≡ n') helper (Bound x) (Bound x₁) with x ≟ x₁ ... | yes p rewrite p = yes refl ... | no ¬p = no λ { refl → ¬p refl } helper (Bound x) (Free x₁) = no λ () helper (Free x) (Bound x₁) = no λ () helper (Free x) (Free x₁) with x ≟ x₁ ... | yes p rewrite p = yes refl ... | no ¬p = no λ { refl → ¬p refl } Name-EqB : EqB Name Name-EqB = Eq→EqB Name-Show : Show Name Name-Show = record { show = helper } where helper : Name → String helper (Bound x) = show x helper (Free x) = x record TermLike (T : Set) : Set where infixl -1 _⟪$⟫_ -- same as $ but on the left field Var : Name → T _⟪$⟫_ : T → T → T BoundVar : 𝕀 → T BoundVar = Var ∘ Bound FreeVar : GlobalName → T FreeVar = Var ∘ Free open TermLike {{...}} public showVar : List String → Name → String showVar l (Bound x) with lookupMaybe (toℕ x) l ... | nothing = show x ... | just x₁ = if x₁ ≣ "_" then show x else x₁ showVar l (Free x) = x data Const : Set where CharT : Const instance Const-Eq : Eq Const Const-Eq = record { _≟_ = helper } where helper : (c c' : Const) → Dec (c ≡ c') helper CharT CharT = yes refl Const-EqB : EqB Const Const-EqB = Eq→EqB Const-Show : Show Const Const-Show = record { show = helper } where helper : Const → String helper CharT = "CharT" data PureTerm : Set where Var-P : Name → PureTerm Sort-P : Sort → PureTerm Const-P : Const → PureTerm App-P : PureTerm → PureTerm → PureTerm Lam-P : String → PureTerm → PureTerm Pi-P : String → PureTerm → PureTerm → PureTerm All-P : String → PureTerm → PureTerm → PureTerm Iota-P : String → PureTerm → PureTerm → PureTerm Eq-P : PureTerm → PureTerm → PureTerm M-P : PureTerm → PureTerm Mu-P : PureTerm → PureTerm → PureTerm Epsilon-P : PureTerm → PureTerm Gamma-P : PureTerm → PureTerm → PureTerm Ev-P : (m : PrimMeta) → primMetaArgs PureTerm m → PureTerm Char-P : Char → PureTerm CharEq-P : PureTerm → PureTerm → PureTerm instance PureTerm-TermLike : TermLike PureTerm PureTerm-TermLike = record { Var = Var-P ; _⟪$⟫_ = App-P } {-# TERMINATING #-} PureTerm-Show : Show PureTerm PureTerm-Show = record { show = helper [] } where helper : List String → PureTerm → String helper l (Var-P x) = showVar l x helper l (Sort-P x) = show x helper l (Const-P x) = show x helper l (App-P t t₁) = "[" + helper l t <+> helper l t₁ + "]" helper l (Lam-P n t) = "λ" <+> n <+> helper (n ∷ l) t helper l (Pi-P n t t₁) = "Π" <+> n <+> helper (n ∷ l) t <+> helper l t₁ helper l (All-P n t t₁) = "∀" <+> n <+> helper (n ∷ l) t <+> helper l t₁ helper l (Iota-P n t t₁) = "ι" <+> n <+> helper (n ∷ l) t <+> helper l t₁ helper l (Eq-P t t₁) = "=" <+> helper l t <+> helper l t₁ helper l (M-P t) = "M" <+> helper l t helper l (Mu-P t t₁) = "μ" <+> helper l t <+> helper l t₁ helper l (Epsilon-P t) = "ε" <+> helper l t helper l (Gamma-P t t₁) = "Γ" <+> helper l t <+> helper l t₁ helper l (Ev-P m args) = "ζ" <+> show m <+> primMetaArgs-Show (helper l) args helper l (Char-P c) = "Char" <+> show c helper l (CharEq-P t t') = "CharEq" <+> show t <+> show t' private beqMonadHelper : {{_ : EqB A}} {{_ : Show A}} {{_ : Monad M}} {{_ : MonadExcept M String}} → A → A → String → M ⊤ beqMonadHelper a a' s = if a ≣ a' then return tt else throwError (s <+> show a <+> "isn't equal to name" <+> show a') {-# TERMINATING #-} pureTermBeq : {{_ : Monad M}} {{_ : MonadExcept M String}} → PureTerm → PureTerm → M ⊤ pureTermBeq (Var-P x) (Var-P x₁) = beqMonadHelper x x₁ "Name" pureTermBeq (Sort-P x) (Sort-P x₁) = beqMonadHelper x x₁ "Sort" pureTermBeq (Const-P x) (Const-P x₁) = beqMonadHelper x x₁ "Const" pureTermBeq (App-P t t₁) (App-P x x₁) = pureTermBeq t x >> pureTermBeq t₁ x₁ pureTermBeq (Lam-P _ t) (Lam-P _ t₁) = pureTermBeq t t₁ pureTermBeq (Pi-P _ t t₁) (Pi-P _ x x₁) = pureTermBeq t x >> pureTermBeq t₁ x₁ pureTermBeq (All-P _ t t₁) (All-P _ x x₁) = pureTermBeq t x >> pureTermBeq t₁ x₁ pureTermBeq (Iota-P _ t t₁) (Iota-P _ x x₁) = pureTermBeq t x >> pureTermBeq t₁ x₁ pureTermBeq (Eq-P t t₁) (Eq-P x x₁) = pureTermBeq t x >> pureTermBeq t₁ x₁ pureTermBeq (M-P t) (M-P x) = pureTermBeq x t pureTermBeq (Mu-P t t₁) (Mu-P x x₁) = pureTermBeq t x >> pureTermBeq t₁ x₁ pureTermBeq (Epsilon-P t) (Epsilon-P x) = pureTermBeq t x pureTermBeq (Gamma-P t t₁) (Gamma-P x x₁) = pureTermBeq t x >> pureTermBeq t₁ x₁ pureTermBeq (Ev-P m t) (Ev-P m' x) with m ≟ m' ... | yes refl = void $ primMetaArgsSequence $ primMetaArgsZipWith pureTermBeq t x ... | no _ = throwError $ show m <+> "and" <+> show m' <+> "aren't equal!" pureTermBeq (Char-P c) (Char-P c') = beqMonadHelper c c' "Char" pureTermBeq (CharEq-P t t₁) (CharEq-P x x₁) = pureTermBeq t x >> pureTermBeq t₁ x₁ {-# CATCHALL #-} pureTermBeq t t' = throwError $ "The terms" <+> show t <+> "and" <+> show t' <+> "aren't equal!" data AnnTerm : Set where Var-A : Name → AnnTerm Sort-A : Sort → AnnTerm Const-A : Const → AnnTerm Pr1-A : AnnTerm → AnnTerm Pr2-A : AnnTerm → AnnTerm Beta-A : AnnTerm → AnnTerm → AnnTerm -- proves first arg eq, erase to second arg Delta-A : AnnTerm → AnnTerm → AnnTerm -- inhabits first arg if snd arg proves false Sigma-A : AnnTerm → AnnTerm App-A : AnnTerm → AnnTerm → AnnTerm AppE-A : AnnTerm → AnnTerm → AnnTerm Rho-A : AnnTerm → AnnTerm → AnnTerm → AnnTerm -- first arg is eq, rewrite the name in the third arg and inhabit with fourth arg All-A : String → AnnTerm → AnnTerm → AnnTerm Pi-A : String → AnnTerm → AnnTerm → AnnTerm Iota-A : String → AnnTerm → AnnTerm → AnnTerm Lam-A : String → AnnTerm → AnnTerm → AnnTerm LamE-A : String → AnnTerm → AnnTerm → AnnTerm Pair-A : AnnTerm → AnnTerm → AnnTerm → AnnTerm Phi-A : AnnTerm → AnnTerm → AnnTerm → AnnTerm -- there is a let binding here, which is probably unnecessary Eq-A : AnnTerm → AnnTerm → AnnTerm M-A : AnnTerm → AnnTerm Mu-A : AnnTerm → AnnTerm → AnnTerm Epsilon-A : AnnTerm → AnnTerm Gamma-A : AnnTerm → AnnTerm → AnnTerm Ev-A : (x : PrimMeta) → primMetaArgs AnnTerm x → AnnTerm Char-A : Char → AnnTerm CharEq-A : AnnTerm → AnnTerm → AnnTerm instance AnnTerm-TermLike : TermLike AnnTerm AnnTerm-TermLike = record { Var = Var-A ; _⟪$⟫_ = App-A } {-# TERMINATING #-} AnnTerm-Show : Show AnnTerm AnnTerm-Show = record { show = helper [] } where helper : List String → AnnTerm → String helper l (Var-A x) = showVar l x helper l (Sort-A x) = show x helper l (Const-A x) = show x helper l (Pr1-A t) = "π1" <+> helper l t helper l (Pr2-A t) = "π2" <+> helper l t helper l (Beta-A t t₁) = "β" <+> helper l t <+> helper l t₁ helper l (Delta-A t t₁) = "Delta-A" + helper l t <+> helper l t₁ helper l (Sigma-A t) = "ς" + helper l t helper l (App-A t t₁) = "[" + helper l t <+> helper l t₁ + "]" helper l (AppE-A t t₁) = "<" + helper l t <+> helper l t₁ + ">" helper l (Rho-A t t₁ t₂) = "ρ" <+> helper l t <+> ":" <+> helper l t₁ <+> helper l t₂ helper l (All-A n t t₁) = "∀" <+> n <+> ":" <+> helper l t + "." <+> helper (n ∷ l) t₁ helper l (Pi-A n t t₁) = "Π" <+> n <+> ":" <+> helper l t + "." <+> helper (n ∷ l) t₁ helper l (Iota-A n t t₁) = "ι" <+> n <+> ":" <+> helper l t + "." <+> helper (n ∷ l) t₁ helper l (Lam-A n t t₁) = "λ" <+> n <+> ":" <+> helper l t + "." <+> helper (n ∷ l) t₁ helper l (LamE-A n t t₁) = "Λ" <+> n <+> ":" <+> helper l t + "." <+> helper (n ∷ l) t₁ helper l (Pair-A t t₁ t₂) = "{" + helper l t + "," + helper l t₁ <+> "." <+> helper l t₂ + "}" helper l (Phi-A t t₁ t₂) = "φ" <+> helper l t <+> helper l t₁ <+> helper l t₂ helper l (Eq-A t t₁) = "(=" <+> helper l t <+> helper l t₁ + ")" helper l (M-A t) = "M" <+> helper l t helper l (Mu-A t t₁) = "μ" <+> helper l t <+> helper l t₁ helper l (Epsilon-A t) = "ε" <+> helper l t helper l (Gamma-A t t₁) = "Γ" <+> helper l t <+> helper l t₁ helper l (Ev-A m args) = "Ev" <+> show m <+> primMetaArgs-Show (helper l) args helper l (Char-A c) = "Char" <+> show c helper l (CharEq-A t t') = "CharEq" <+> show t <+> show t' primMetaS : (m : PrimMeta) → primMetaArgs AnnTerm m primMetaS EvalStmt = FreeVar "init$stmt" primMetaS ShellCmd = (FreeVar "init$string" , FreeVar "init$stringList") primMetaS CheckTerm = (Sort-A ⋆ , FreeVar "init$term") primMetaS Parse = (FreeVar "init$string" , Sort-A ⋆ , FreeVar "init$string") primMetaS Normalize = FreeVar "init$term" primMetaS HeadNormalize = FreeVar "init$term" primMetaS InferType = FreeVar "init$term" primMetaT : ∀ {T} {{_ : TermLike T}} (m : PrimMeta) → primMetaArgs T m → T primMetaT EvalStmt _ = FreeVar "init$metaResult" primMetaT ShellCmd _ = FreeVar "init$string" primMetaT CheckTerm (t , _) = t primMetaT Parse (_ , t , _) = FreeVar "init$product" ⟪$⟫ t ⟪$⟫ FreeVar "init$string" primMetaT Normalize _ = FreeVar "init$term" primMetaT HeadNormalize _ = FreeVar "init$term" primMetaT InferType _ = FreeVar "init$term" data Def : Set where Let : AnnTerm → AnnTerm → Def Axiom : AnnTerm → Def data EfficientDef : Set where EfficientLet : AnnTerm → PureTerm → AnnTerm → EfficientDef EfficientAxiom : AnnTerm → EfficientDef toDef : EfficientDef → Def toDef (EfficientLet x x₁ x₂) = Let x x₂ toDef (EfficientAxiom x) = Axiom x getNorm : EfficientDef → Maybe PureTerm getNorm (EfficientLet x x₁ x₂) = return x₁ getNorm (EfficientAxiom x) = nothing instance Def-Show : Show Def Def-Show = record { show = helper } where helper : Def → String helper (Let x x₁) = " :=" <+> show x <+> ":" <+> show x₁ helper (Axiom x) = " :" <+> show x typeOfDef : Def → AnnTerm typeOfDef (Let _ x) = x typeOfDef (Axiom x) = x {-# TERMINATING #-} modifyIndicesPure : 𝕀 → PureTerm → PureTerm modifyIndicesPure = helper $ fromℕ 0 where helper : 𝕀 → 𝕀 → PureTerm → PureTerm helper k n v@(Var-P (Bound x)) = if x <𝕀 k then v else BoundVar (pred𝕀 (x +𝕀 n)) helper k n v@(Var-P (Free x)) = v helper k n v@(Sort-P x) = v helper k n v@(Const-P x) = v helper k n (App-P t t₁) = App-P (helper k n t) (helper k n t₁) helper k n (Lam-P x t) = Lam-P x (helper (suc𝕀 k) n t) helper k n (Pi-P x t t₁) = Pi-P x (helper k n t) (helper (suc𝕀 k) n t₁) helper k n (All-P x t t₁) = All-P x (helper k n t) (helper (suc𝕀 k) n t₁) helper k n (Iota-P x t t₁) = Iota-P x (helper k n t) (helper (suc𝕀 k) n t₁) helper k n (Eq-P t t₁) = Eq-P (helper k n t) (helper k n t₁) helper k n (M-P t) = M-P (helper k n t) helper k n (Mu-P t t₁) = Mu-P (helper k n t) (helper k n t₁) helper k n (Epsilon-P t) = Epsilon-P (helper k n t) helper k n (Gamma-P t t₁) = Gamma-P (helper k n t) (helper k n t₁) helper k n (Ev-P m args) = Ev-P m (mapPrimMetaArgs (helper k n) args) helper k n (Char-P c) = Char-P c helper k n (CharEq-P t t') = CharEq-P (helper k n t) (helper k n t') incrementIndicesPureBy : 𝕀 → PureTerm → PureTerm incrementIndicesPureBy i = modifyIndicesPure (suc𝕀 i) decrementIndicesPure : PureTerm → PureTerm decrementIndicesPure = modifyIndicesPure (fromℕ 0) {-# TERMINATING #-} modifyIndices : 𝕀 → AnnTerm → AnnTerm modifyIndices = helper (fromℕ 0) where helper : 𝕀 → 𝕀 → AnnTerm → AnnTerm helper k n v@(Var-A (Bound x)) = if x <𝕀 k then v else BoundVar (pred𝕀 (x +𝕀 n)) helper k n v@(Var-A (Free x)) = v helper k n (Sort-A x) = Sort-A x helper k n (Const-A x) = Const-A x helper k n (Pr1-A t) = Pr1-A $ helper k n t helper k n (Pr2-A t) = Pr2-A $ helper k n t helper k n (Beta-A t t₁) = Beta-A (helper k n t) (helper k n t₁) helper k n (Delta-A t t₁) = Delta-A (helper k n t) (helper k n t₁) helper k n (Sigma-A t) = Sigma-A (helper k n t) helper k n (App-A t t₁) = App-A (helper k n t) (helper k n t₁) helper k n (AppE-A t t₁) = AppE-A (helper k n t) (helper k n t₁) helper k n (Rho-A t t₁ t₂) = Rho-A (helper k n t) (helper (suc𝕀 k) n t₁) (helper k n t₂) helper k n (All-A x t t₁) = All-A x (helper k n t) (helper (suc𝕀 k) n t₁) helper k n (Pi-A x t t₁) = Pi-A x (helper k n t) (helper (suc𝕀 k) n t₁) helper k n (Iota-A x t t₁) = Iota-A x (helper k n t) (helper (suc𝕀 k) n t₁) helper k n (Lam-A x t t₁) = Lam-A x (helper k n t) (helper (suc𝕀 k) n t₁) helper k n (LamE-A x t t₁) = LamE-A x (helper k n t) (helper (suc𝕀 k) n t₁) helper k n (Pair-A t t₁ t₂) = Pair-A (helper k n t) (helper k n t₁) (helper (suc𝕀 k) n t₂) helper k n (Phi-A t t₁ t₂) = Phi-A (helper k n t) (helper k n t₁) (helper k n t₂) helper k n (Eq-A t t₁) = Eq-A (helper k n t) (helper k n t₁) helper k n (M-A t) = M-A (helper k n t) helper k n (Mu-A t t₁) = Mu-A (helper k n t) (helper k n t₁) helper k n (Epsilon-A t) = Epsilon-A (helper k n t) helper k n (Gamma-A t t₁) = Gamma-A (helper k n t) (helper k n t₁) helper k n (Ev-A m args) = Ev-A m (mapPrimMetaArgs (helper k n) args) helper k n (Char-A c) = Char-A c helper k n (CharEq-A t t₁) = CharEq-A (helper k n t) (helper k n t₁) incrementIndicesBy : 𝕀 → AnnTerm → AnnTerm incrementIndicesBy i = modifyIndices (suc𝕀 i) decrementIndices : AnnTerm → AnnTerm decrementIndices = modifyIndices (fromℕ 0) {-# TERMINATING #-} checkFree : Name → PureTerm → Bool checkFree = helper 0 where helper : ℕ → Name → PureTerm → Bool helper k n (Var-P (Bound x)) = case n of λ where (Bound x₁) → x ≣ (fromℕ k +𝕀 x₁) (Free x₁) → false helper k n (Var-P (Free x)) = case n of λ where (Bound x₁) → false (Free x₁) → x ≣ x₁ helper k n (Sort-P x) = false helper k n (Const-P x) = false helper k n (App-P t t₁) = helper k n t ∧ helper k n t₁ helper k n (Lam-P _ t) = helper (suc k) n t helper k n (Pi-P _ t t₁) = helper k n t ∧ helper (suc k) n t₁ helper k n (All-P _ t t₁) = helper k n t ∧ helper (suc k) n t₁ helper k n (Iota-P _ t t₁) = helper k n t ∧ helper (suc k) n t₁ helper k n (Eq-P t t₁) = helper k n t ∧ helper k n t₁ helper k n (M-P t) = helper k n t helper k n (Mu-P t t₁) = helper k n t ∧ helper k n t₁ helper k n (Epsilon-P t) = helper k n t helper k n (Gamma-P t t₁) = helper k n t ∧ helper k n t₁ helper k n (Ev-P m t) = primMetaArgsAnd $ mapPrimMetaArgs (helper k n) t helper k n (Char-P c) = false helper k n (CharEq-P t t₁) = helper k n t ∧ helper k n t₁ GlobalContext : Set GlobalContext = HSTrie EfficientDef emptyGlobalContext : GlobalContext emptyGlobalContext = emptyMap Context : Set Context = GlobalContext × List AnnTerm instance Context-Show : Show Context Context-Show = record { show = helper } where helper : Context → String helper (fst , snd) = (show $ length snd) <+> "local variables:" + show snd globalToContext : GlobalContext → Context globalToContext Γ = Γ , [] contextToGlobal : Context → GlobalContext contextToGlobal (fst , snd) = fst -- add variable to context, so that index 0 points to that variable pushVar : AnnTerm → Context → Context pushVar v (fst , snd) = fst , v ∷ snd localContextLength : Context → ℕ localContextLength (fst , snd) = length snd efficientLookupInContext : Name → Context → Maybe EfficientDef efficientLookupInContext (Bound x) (fst , snd) = EfficientAxiom ∘ incrementIndicesBy (suc𝕀 x) <$> lookupMaybe (toℕ x) snd efficientLookupInContext (Free x) (fst , snd) = lookup x fst lookupInContext : Name → Context → Maybe Def lookupInContext n Γ = toDef <$> efficientLookupInContext n Γ {-# TERMINATING #-} validInContext : PureTerm → Context → Bool validInContext = helper 0 where -- instead of modifying the context here, we just count how many variables we would have added if we did helper : ℕ → PureTerm → Context → Bool helper k (Var-P (Bound x)) Γ = x <𝕀 fromℕ (localContextLength Γ + k) helper k (Var-P n@(Free x)) Γ = maybe (λ _ → true) false $ lookupInContext n Γ helper k (Sort-P x) Γ = true helper k (Const-P x) Γ = true helper k (App-P t t₁) Γ = helper k t Γ ∧ helper k t₁ Γ helper k (Lam-P _ t) Γ = helper (suc k) t Γ helper k (Pi-P _ t t₁) Γ = helper k t Γ ∧ helper (suc k) t₁ Γ helper k (All-P _ t t₁) Γ = helper k t Γ ∧ helper (suc k) t₁ Γ helper k (Iota-P _ t t₁) Γ = helper k t Γ ∧ helper (suc k) t₁ Γ helper k (Eq-P t t₁) Γ = helper k t Γ ∧ helper k t₁ Γ helper k (M-P t) Γ = helper k t Γ helper k (Mu-P t t₁) Γ = helper k t Γ ∧ helper k t₁ Γ helper k (Epsilon-P t) Γ = helper k t Γ helper k (Gamma-P t t₁) Γ = helper k t Γ ∧ helper k t₁ Γ helper k (Ev-P m t) Γ = primMetaArgsAnd $ mapPrimMetaArgs (λ x → helper k x Γ) t helper k (Char-P c) Γ = true helper k (CharEq-P t t₁) Γ = helper k t Γ ∧ helper k t₁ Γ {-# TERMINATING #-} Erase : AnnTerm → PureTerm Erase (Var-A x) = Var-P x Erase (Sort-A x) = Sort-P x Erase (Const-A x) = Const-P x Erase (Pr1-A t) = Erase t Erase (Pr2-A t) = Erase t Erase (Beta-A t t₁) = Erase t₁ Erase (Delta-A t t₁) = Erase t₁ Erase (Sigma-A t) = Erase t Erase (App-A t t₁) = App-P (Erase t) (Erase t₁) Erase (AppE-A t t₁) = Erase t Erase (Rho-A t t₁ t₂) = Erase t₂ Erase (All-A n t t₁) = All-P n (Erase t) (Erase t₁) Erase (Pi-A n t t₁) = Pi-P n (Erase t) (Erase t₁) Erase (Iota-A n t t₁) = Iota-P n (Erase t) (Erase t₁) Erase (Lam-A n t t₁) = Lam-P n (Erase t₁) Erase (LamE-A _ t t₁) = decrementIndicesPure (Erase t₁) Erase (Pair-A t t₁ t₂) = Erase t Erase (Phi-A t t₁ t₂) = Erase t₂ Erase (Eq-A x x₁) = Eq-P (Erase x) (Erase x₁) Erase (M-A t) = M-P (Erase t) Erase (Mu-A t t₁) = Mu-P (Erase t) (Erase t₁) Erase (Epsilon-A t) = Epsilon-P (Erase t) Erase (Gamma-A t t₁) = Gamma-P (Erase t) (Erase t₁) Erase (Ev-A m args) = Ev-P m (mapPrimMetaArgs Erase args) Erase (Char-A c) = Char-P c Erase (CharEq-A x x₁) = CharEq-P (Erase x) (Erase x₁) -- substitute the first unbound variable in t with t' {-# TERMINATING #-} subst : AnnTerm → AnnTerm → AnnTerm subst t t' = decrementIndices $ substIndex t (fromℕ 0) t' where -- substitute the k-th unbound variable in t with t' substIndex : AnnTerm → 𝕀 → AnnTerm → AnnTerm substIndex v@(Var-A (Bound x)) k t' = if k ≣ x then incrementIndicesBy (suc𝕀 k) t' else v substIndex v@(Var-A (Free x)) k t' = v substIndex v@(Sort-A x) k t' = v substIndex v@(Const-A x) k t' = v substIndex (Pr1-A t) k t' = Pr1-A (substIndex t k t') substIndex (Pr2-A t) k t' = Pr2-A (substIndex t k t') substIndex (Beta-A t t₁) k t' = Beta-A (substIndex t k t') (substIndex t₁ k t') substIndex (Delta-A t t₁) k t' = Delta-A (substIndex t k t') (substIndex t₁ k t') substIndex (Sigma-A t) k t' = Sigma-A (substIndex t k t') substIndex (App-A t t₁) k t' = App-A (substIndex t k t') (substIndex t₁ k t') substIndex (AppE-A t t₁) k t' = AppE-A (substIndex t k t') (substIndex t₁ k t') substIndex (Rho-A t t₁ t₂) k t' = Rho-A (substIndex t k t') (substIndex t₁ k t') (substIndex t₂ k t') substIndex (All-A n t t₁) k t' = All-A n (substIndex t k t') (substIndex t₁ (suc𝕀 k) t') substIndex (Pi-A n t t₁) k t' = Pi-A n (substIndex t k t') (substIndex t₁ (suc𝕀 k) t') substIndex (Iota-A n t t₁) k t' = Iota-A n (substIndex t k t') (substIndex t₁ (suc𝕀 k) t') substIndex (Lam-A n t t₁) k t' = Lam-A n (substIndex t k t') (substIndex t₁ (suc𝕀 k) t') substIndex (LamE-A n t t₁) k t' = LamE-A n (substIndex t k t') (substIndex t₁ (suc𝕀 k) t') substIndex (Pair-A t t₁ t₂) k t' = Pair-A (substIndex t k t') (substIndex t₁ k t') (substIndex t₂ (suc𝕀 k) t') substIndex (Phi-A t t₁ t₂) k t' = Phi-A (substIndex t k t') (substIndex t₁ k t') (substIndex t₂ k t') substIndex (Eq-A t t₁) k t' = Eq-A (substIndex t k t') (substIndex t₁ k t') substIndex (M-A t) k t' = M-A (substIndex t k t') substIndex (Mu-A t t₁) k t' = Mu-A (substIndex t k t') (substIndex t₁ k t') substIndex (Epsilon-A t) k t' = Epsilon-A (substIndex t k t') substIndex (Gamma-A t t₁) k t' = Gamma-A (substIndex t k t') (substIndex t₁ k t') substIndex (Ev-A m t) k t' = Ev-A m $ mapPrimMetaArgs (λ x → substIndex x k t') t substIndex (Char-A c) k t' = Char-A c substIndex (CharEq-A t t₁) k t' = CharEq-A (substIndex t k t') (substIndex t₁ k t') -- substitute the first unbound variable in t with t' {-# TERMINATING #-} substPure : PureTerm → PureTerm → PureTerm substPure t t' = decrementIndicesPure $ substIndexPure t (fromℕ 0) t' where -- substitute the k-th unbound variable in t with t' substIndexPure : PureTerm → 𝕀 → PureTerm → PureTerm substIndexPure v@(Var-P (Bound x)) k t' = if k ≣ x then incrementIndicesPureBy (suc𝕀 k) t' else v substIndexPure v@(Var-P (Free x)) k t' = v substIndexPure v@(Sort-P x) k t' = v substIndexPure v@(Const-P x) k t' = v substIndexPure (App-P t t₁) k t' = App-P (substIndexPure t k t') (substIndexPure t₁ k t') substIndexPure (Lam-P n t) k t' = Lam-P n (substIndexPure t (suc𝕀 k) t') substIndexPure (Pi-P n t t₁) k t' = Pi-P n (substIndexPure t k t') (substIndexPure t₁ (suc𝕀 k) t') substIndexPure (All-P n t t₁) k t' = All-P n (substIndexPure t k t') (substIndexPure t₁ (suc𝕀 k) t') substIndexPure (Iota-P n t t₁) k t' = Iota-P n (substIndexPure t k t') (substIndexPure t₁ (suc𝕀 k) t') substIndexPure (Eq-P t t₁) k t' = Eq-P (substIndexPure t k t') (substIndexPure t₁ k t') substIndexPure (M-P t) k t' = M-P (substIndexPure t k t') substIndexPure (Mu-P t t₁) k t' = Mu-P (substIndexPure t k t') (substIndexPure t₁ k t') substIndexPure (Epsilon-P t) k t' = Epsilon-P (substIndexPure t k t') substIndexPure (Gamma-P t t₁) k t' = Gamma-P (substIndexPure t k t') (substIndexPure t₁ k t') substIndexPure (Ev-P m t) k t' = Ev-P m $ mapPrimMetaArgs (λ x → substIndexPure x k t') t substIndexPure (Char-P c) k t' = Char-P c substIndexPure (CharEq-P t t₁) k t' = CharEq-P (substIndexPure t k t') (substIndexPure t₁ k t') stripBinder : AnnTerm → Maybe AnnTerm stripBinder (All-A _ t' t'') = just t'' stripBinder (Pi-A _ t' t'') = just t'' stripBinder (Iota-A _ t' t'') = just t'' stripBinder (Lam-A _ t' t'') = just t'' stripBinder (LamE-A _ t' t'') = just t'' {-# CATCHALL #-} stripBinder t = nothing -- something in is head normal form, if its outermost constructor is not one of the following: Var-A (if the lookup fails), App-A, AppE-A {-# TERMINATING #-} hnfNorm : Context → AnnTerm → AnnTerm hnfNorm Γ v@(Var-A x) with lookupInContext x Γ ... | just (Let x₁ x₂) = hnfNorm Γ x₁ ... | just (Axiom x₁) = v -- we cannot reduce axioms ... | nothing = v -- in case the lookup fails, we cannot reduce hnfNorm Γ (App-A t t₁) = maybe (λ t' → hnfNorm Γ $ subst t' t₁) (t ⟪$⟫ t₁) $ stripBinder (hnfNorm Γ t) hnfNorm Γ (AppE-A t t₁) = maybe (λ t' → hnfNorm Γ $ subst t' t₁) (t ⟪$⟫ t₁) $ stripBinder (hnfNorm Γ t) {-# CATCHALL #-} hnfNorm Γ v = v stripBinderPure : PureTerm → Maybe PureTerm stripBinderPure (Lam-P _ t') = just t' stripBinderPure (Pi-P _ t' t'') = just t'' stripBinderPure (All-P _ t' t'') = just t'' stripBinderPure (Iota-P _ t' t'') = just t'' {-# CATCHALL #-} stripBinderPure _ = nothing hnfNormPure normalizePure : Context → PureTerm → PureTerm {-# NON_TERMINATING #-} hnfNormPure Γ v@(Var-P x) with lookupInContext x Γ ... | just (Let x₁ x₂) = hnfNormPure Γ $ Erase x₁ ... | just (Axiom x₁) = v -- we cannot reduce axioms ... | nothing = v -- in case the lookup fails, we cannot reduce hnfNormPure Γ v@(App-P t t₁) with stripBinderPure (hnfNormPure Γ t) ... | (just t') = hnfNormPure Γ $ substPure t' t₁ ... | nothing = v hnfNormPure Γ v@(CharEq-P _ _) = normalizePure Γ v -- reduce to a bool, if possible {-# CATCHALL #-} hnfNormPure Γ v = v {-# NON_TERMINATING #-} normalizePure Γ v@(Var-P x) with efficientLookupInContext x Γ ... | just (EfficientLet x₁ x₂ x₃) = x₂ ... | just (EfficientAxiom x₁) = v -- we cannot reduce axioms ... | nothing = v -- in case the lookup fails, we cannot reduce normalizePure Γ v@(Sort-P x) = v normalizePure Γ v@(Const-P x) = v normalizePure Γ (App-P t t₁) with hnfNormPure Γ t ...| t' = case stripBinderPure t' of λ where (just t'') → normalizePure Γ (substPure t'' t₁) nothing → normalizePure Γ t' ⟪$⟫ normalizePure Γ t₁ normalizePure Γ (Lam-P n t) with normalizePure Γ t ... | t''@(App-P t' (Var-P (Bound i))) = if i ≣ (fromℕ 0) ∧ validInContext t' Γ then normalizePure Γ (decrementIndicesPure t') else Lam-P n t'' -- eta reduce here ... | t'' = Lam-P n t'' normalizePure Γ (Pi-P n t t₁) = Pi-P n (normalizePure Γ t) (normalizePure Γ t₁) normalizePure Γ (All-P n t t₁) = All-P n (normalizePure Γ t) (normalizePure Γ t₁) normalizePure Γ (Iota-P n t t₁) = Iota-P n (normalizePure Γ t) (normalizePure Γ t₁) normalizePure Γ (Eq-P t t₁) = Eq-P (normalizePure Γ t) (normalizePure Γ t₁) normalizePure Γ (M-P t) = M-P (normalizePure Γ t) normalizePure Γ (Mu-P t t₁) = Mu-P (normalizePure Γ t) (normalizePure Γ t₁) normalizePure Γ (Epsilon-P t) = Epsilon-P (normalizePure Γ t) normalizePure Γ (Gamma-P t t₁) = Gamma-P (normalizePure Γ t) (normalizePure Γ t₁) normalizePure Γ (Ev-P m args) = Ev-P m (mapPrimMetaArgs (normalizePure Γ) args) normalizePure Γ (Char-P c) = (Char-P c) normalizePure Γ (CharEq-P t t₁) with normalizePure Γ t | normalizePure Γ t₁ ... | (Char-P c) | (Char-P c') = normalizePure Γ $ FreeVar $ show (c ≣ c') {-# CATCHALL #-} ... | x | x₁ = CharEq-P x x₁ {-# TERMINATING #-} findOutermostConstructor : PureTerm → PureTerm × List PureTerm findOutermostConstructor t = outermostApp $ stripBinders t where stripBinders : PureTerm → PureTerm stripBinders t with stripBinderPure t stripBinders t | just x = stripBinders x stripBinders t | nothing = t outermostApp : PureTerm → PureTerm × List PureTerm outermostApp (App-P t t₁) = Data.Product.map id (t₁ ∷_) $ outermostApp t {-# CATCHALL #-} outermostApp t = t , [] insertInGlobalContext : GlobalName → Def → GlobalContext → String ⊎ GlobalContext insertInGlobalContext n d Γ = if is-just $ lookup n Γ then inj₁ ("The name" <+> n <+> "is already defined!") else (inj₂ $ insert n (toEfficientDef d Γ) Γ) where toEfficientDef : Def → GlobalContext → EfficientDef toEfficientDef (Let x x₁) Γ = EfficientLet x (normalizePure (globalToContext Γ) $ Erase x) x₁ toEfficientDef (Axiom x) Γ = EfficientAxiom x module CheckEquality {{_ : Monad M}} {{_ : MonadExcept M String}} (Γ : Context) where compareNames : PureTerm → PureTerm → M ⊤ compareNames (Var-P x) (Var-P x₁) = if x ≣ x₁ then return tt else throwError "Names not equal! If you see this message, this is a bug!" {-# CATCHALL #-} compareNames _ _ = throwError "Terms are not names! If you see this message, this is a bug!" {-# NON_TERMINATING #-} checkβηPure : PureTerm → PureTerm → M ⊤ checkβηPure t t' = tryElse (compareNames t t') $ compareHnfs (hnfNormPure Γ t) (hnfNormPure Γ t') -- tryElse (compareHnfs (hnfNormPure Γ t) (hnfNormPure Γ t')) $ -- pureTermBeq t t' where hnfError : PureTerm → PureTerm → M ⊤ hnfError t t' = throwError $ "The terms" <+> show t <+> "and" <+> show t' <+> "aren't equal!" compareHnfs : PureTerm → PureTerm → M ⊤ compareHnfs (Var-P x) (Var-P x₁) = beqMonadHelper x x₁ "Name" compareHnfs (Sort-P x) (Sort-P x₁) = beqMonadHelper x x₁ "Sort" compareHnfs (Const-P x) (Const-P x₁) = beqMonadHelper x x₁ "Const" compareHnfs (App-P t t₁) (App-P x x₁) = checkβηPure t x >> checkβηPure t₁ x₁ compareHnfs (Lam-P _ t) (Lam-P _ t₁) = checkβηPure t t₁ compareHnfs (Pi-P _ t t₁) (Pi-P _ x x₁) = checkβηPure t x >> checkβηPure t₁ x₁ compareHnfs (All-P _ t t₁) (All-P _ x x₁) = checkβηPure t x >> checkβηPure t₁ x₁ compareHnfs (Iota-P _ t t₁) (Iota-P _ x x₁) = checkβηPure t x >> checkβηPure t₁ x₁ compareHnfs (Eq-P t t₁) (Eq-P x x₁) = checkβηPure t x >> checkβηPure t₁ x₁ compareHnfs (M-P t) (M-P x) = checkβηPure x t compareHnfs (Mu-P t t₁) (Mu-P x x₁) = checkβηPure t x >> checkβηPure t₁ x₁ compareHnfs (Epsilon-P t) (Epsilon-P x) = checkβηPure t x compareHnfs (Gamma-P t t₁) (Gamma-P x x₁) = checkβηPure t x >> checkβηPure t₁ x₁ compareHnfs t@(Ev-P m x) t'@(Ev-P m' x') with m ≟ m' ... | yes refl = void $ primMetaArgsSequence $ primMetaArgsZipWith checkβηPure x x' ... | no _ = hnfError t t' compareHnfs (Char-P c) (Char-P c') = beqMonadHelper c c' "Char" compareHnfs (CharEq-P t t₁) (CharEq-P x x₁) = checkβηPure t x >> checkβηPure t₁ x₁ compareHnfs (Lam-P _ t) t₁ = case normalizePure Γ t of λ where t''@(App-P t' (Var-P (Bound i))) → if i ≣ (fromℕ 0) ∧ validInContext t' Γ then (compareHnfs (decrementIndicesPure t') t₁) else hnfError t'' t₁ t'' → hnfError t'' t₁ compareHnfs t (Lam-P _ t₁) = case normalizePure Γ t₁ of λ where t''@(App-P t' (Var-P (Bound i))) → if i ≣ (fromℕ 0) ∧ validInContext t' Γ then (compareHnfs t (decrementIndicesPure t')) else hnfError t t'' t'' → hnfError t t'' {-# CATCHALL #-} compareHnfs t t' = hnfError t t' checkβη : AnnTerm → AnnTerm → M ⊤ checkβη t t' = checkβηPure (Erase t) (Erase t') open CheckEquality public {-# TERMINATING #-} synthType synthType' : {{_ : Monad M}} {{_ : MonadExcept M String}} → Context → AnnTerm → M AnnTerm synthType Γ t = appendIfError (synthType' Γ t) $ "\n\nWhile synthesizing type for" <+> shortenString 1000 (show t) <+> "in context:\n" + show {{Context-Show}} Γ synthType' Γ (Var-A x) = maybeToError (typeOfDef <$> lookupInContext x Γ) ("Lookup failed:" <+> show x <+> "in context" <+> show {{Context-Show}} Γ) synthType' Γ (Sort-A ⋆) = return $ Sort-A □ synthType' Γ (Sort-A □) = throwError "Cannot synthesize type for the superkind" synthType' Γ (Const-A CharT) = return $ Sort-A ⋆ synthType' Γ (Pr1-A t) = do T ← synthType Γ t case (hnfNorm Γ T) of λ { (Iota-A _ u u₁) → return u ; _ → throwError "Term does not normalize to an iota term" } synthType' Γ (Pr2-A t) = do T ← synthType Γ t case (hnfNorm Γ T) of λ { (Iota-A _ u u₁) → return $ subst u₁ (Pr1-A t) ; _ → throwError "Term does not normalize to an iota term" } synthType' Γ (Beta-A t t₁) = do T ← synthType Γ (Eq-A t t) case (hnfNorm Γ T) of λ { (Sort-A ⋆) → return $ Eq-A t t ; _ → throwError "Equality type does not have the right type. Is this a bug?" } synthType' Γ (Delta-A t t₁) = do T ← synthType Γ t₁ case (hnfNorm Γ T) of λ { (Eq-A u u₁) → do catchError (pureTermBeq (normalizePure Γ $ Erase u) (Lam-P "" $ Lam-P "" $ BoundVar $ fromℕ 1) >> pureTermBeq (normalizePure Γ $ Erase u₁) (Lam-P "" $ Lam-P "" $ BoundVar $ fromℕ 0)) (λ e → throwError $ "This equality cannot be used for the delta term:" <+> show u <+> "=" <+> show u₁ + "\nError:" <+> e) return t ; _ → throwError "The second argument of a delta needs to be of an eq type" } synthType' Γ (Sigma-A t) = do T ← synthType Γ t case (hnfNorm Γ T) of λ { (Eq-A u u₁) → return $ Eq-A u₁ u ; _ → throwError "Sigma needs an inhabitant of an eq type as argument" } synthType' Γ (App-A t t₁) = do T ← synthType Γ t T₁ ← synthType Γ t₁ case (hnfNorm Γ T) of λ { (Pi-A _ u u₁) → do catchError (checkβη Γ T₁ u) (λ e → throwError ("Type mismatch in application, the type of" <+> show t₁ <+> ":" <+> show T₁ + " is not βη-equivalent to" <+> show u + "\nError:" <+> e)) return $ subst u₁ t₁ ; v → throwError $ "The left term in an application needs to have a pi type, while it has type" <+> show v } synthType' Γ (AppE-A t t₁) = do T ← synthType Γ t T₁ ← synthType Γ t₁ case (hnfNorm Γ T) of λ { (All-A _ u u₁) → do catchError (checkβη Γ u T₁) (λ e → throwError ("Type mismatch in erased application, the following types are not βη-equivalent:\n" + show u + "\n" + show T₁ + "\nError:\n" + e)) return $ subst u₁ t₁ ; v → throwError $ "The left term in an erased application needs to have a forall type, while it has type " + show v + "\nTest:" <+> show T } synthType' Γ (Rho-A t t₁ t₂) = do T ← synthType Γ t T₁ ← synthType Γ t₂ case (hnfNorm Γ T) of λ { (Eq-A u u₁) → do catchError (checkβη Γ (subst t₁ u₁) T₁) (λ e → throwError $ "Type mismatch in rho:" <+> show (subst t₁ u₁) <+> "should be βη-equivalent to the synthesized type of" <+> show t₂ <+> ": " + show T₁ + "\nError:\n" + e) return $ subst t₁ u ; _ → throwError "The type of the first argument of a rho needs to be an equality" } synthType' Γ (All-A _ t t₁) = do u ← synthType Γ t case (hnfNorm Γ u) of λ { (Sort-A s) → do let Γ' = pushVar t Γ u₁ ← synthType Γ' t₁ case (hnfNorm Γ' u₁) of λ { (Sort-A ⋆) → return $ Sort-A ⋆ ; v → throwError $ "The type family in forall should have type star, while it has type " + show v <+> "(" + show t₁ + ")\nContext:" <+> show {{Context-Show}} Γ' } ; _ → throwError "The type of the parameter type in forall should be star or square" } synthType' Γ (Pi-A _ t t₁) = do u ← synthType Γ t case (hnfNorm Γ u) of λ { (Sort-A s) → do let Γ' = pushVar t Γ u₁ ← synthType Γ' t₁ case (hnfNorm Γ u₁) of λ { (Sort-A s') → return $ Sort-A s' ; v → throwError $ "The type family in pi should have type star or square, while it has type" <+> show v } ; _ → throwError "The type of the parameter type in pi should be star or square" } synthType' Γ (Iota-A _ t t₁) = do u ← synthType Γ t case (hnfNorm Γ u) of λ { (Sort-A ⋆) → do let Γ' = pushVar t Γ u₁ ← synthType Γ' t₁ case (hnfNorm Γ' u₁) of λ { (Sort-A ⋆) → return $ Sort-A ⋆ ; _ → throwError "The type family in iota should have type star"} ; _ → throwError "The type of the parameter type in iota should be star" } synthType' Γ (Lam-A n t t₁) = do synthType Γ t u ← synthType (pushVar t Γ) t₁ return (Pi-A n t u) synthType' Γ (LamE-A n t t₁) = if checkFree (Bound (fromℕ 0)) (Erase t₁) then throwError "Erased arguments cannot appear bound in a term" else do synthType Γ t u ← synthType (pushVar t Γ) t₁ return $ All-A n t u synthType' Γ (Pair-A t t₁ t₂) = do catchError (checkβη Γ t t₁) (λ e → throwError $ "The terms in dependent intersection introduction have to be βη-equivalent. They normalize to:\n" + show (normalizePure Γ $ Erase t) + "\n" + show (normalizePure Γ $ Erase t₁) + "\nError:\n" + e) u ← synthType Γ t u₁ ← synthType Γ t₁ catchError (checkβη Γ (subst t₂ t) u₁) (λ e → throwError ("Type mismatch in the second argument of the dependent intersection: " + show (subst t₂ t) <+> "should be βη-equivalent to the synthesized type " + show u₁ + "\n" + e)) let res = Iota-A "" u t₂ u₂ ← synthType Γ res case (hnfNorm Γ u₂) of λ { (Sort-A ⋆) → return res ; _ → throwError "The resulting iota type of the dependent intersection doesn't have type star. Is this a Bug?" } synthType' Γ (Phi-A t t₁ t₂) = do T ← synthType Γ t case (hnfNorm Γ T) of λ { (Eq-A u u₁) → do catchError (checkβη Γ t₁ u >> checkβη Γ t₂ u₁) (λ e → throwError $ "The arguments to phi are not equivalent to the sides of the equality. Error:\n" + e) synthType Γ t₁ ; _ → throwError "The first argument to phi should be of an equality type" } synthType' Γ (Eq-A x x₁) = if validInContext (Erase x) Γ then if validInContext (Erase x₁) Γ then return $ Sort-A ⋆ else throwError ("The right term in the equality type needs to be valid in the context:" <+> show x₁) else throwError ("The left term in the equality type needs to be valid in the context:" <+> show x) synthType' Γ (M-A t) = do T ← synthType Γ t case (hnfNorm Γ T) of λ { (Sort-A ∗) → return $ Sort-A ∗ ; _ → throwError "The term M is applied to should have type ∗"} synthType' Γ (Mu-A t t₁) = do T ← synthType Γ t T' ← synthType Γ t₁ case (hnfNorm Γ T) of λ { (M-A u) → case (hnfNorm Γ T') of λ { (Pi-A _ v v₁) → do T'' ← if checkFree (Bound $ fromℕ 0) (Erase v₁) then throwError ("Index 0 is not allowed to appear in" <+> show v₁) else synthType (pushVar v Γ) v₁ case (hnfNorm Γ T'') of λ { (Sort-A ∗) → case (hnfNorm Γ v₁) of λ { (M-A v₂) → appendIfError (checkβη Γ u v) "The types in μ need to be compatible" >> return (M-A $ decrementIndices v₂) ; _ → throwError "The second term in a μ needs to have a Pi type that maps to 'M t' for some 't'" } ; _ → throwError "The second term in a μ needs to have a non-dependent Pi type" } ; _ → throwError "The second term in a μ needs to have a Pi type" } ; _ → throwError "The first term in a μ needs to have type 'M t' for some 't'" } synthType' Γ (Epsilon-A t) = M-A <$> synthType Γ t synthType' Γ (Ev-A m t) = do T ← traversePrimMetaArgs (synthType Γ) t appendIfError (primMetaArgsSequence $ primMetaArgsZipWith (checkβη Γ) T $ primMetaS m) ("The arguments for primitive" <+> show m <+> "have incorrect types!") return $ M-A $ primMetaT m t synthType' Γ (Gamma-A t t₁) = do T ← synthType Γ t T₁ ← synthType Γ t₁ case (hnfNorm Γ T) of λ { (M-A u) → do appendIfError (checkβη Γ T₁ (Pi-A "" (FreeVar "init$err") (incrementIndicesBy (fromℕ 1) $ M-A u))) ("The second term supplied to CatchErr has type" <+> show T₁ + ", while it should have type 'init$err → M" <+> show u) return $ M-A u ; _ → throwError "The first term in CatchErr needs to have type 'M t' for some 't'" } synthType' Γ (Char-A c) = return (Const-A CharT) synthType' Γ (CharEq-A t t') = do T ← synthType Γ t T' ← synthType Γ t' case (hnfNorm Γ T) of λ { (Const-A CharT) → case (hnfNorm Γ T') of λ { (Const-A CharT) → return $ FreeVar "Bool" ; _ → throwError "The second term in CharEq needs to have type Char" } ; _ → throwError "The first term in CharEq needs to have type Char" }
{ "alphanum_fraction": 0.5999168887, "avg_line_length": 41.6588594705, "ext": "agda", "hexsha": "424889d9b0c1733f4dc22f788a9ea4c42df7726d", "lang": "Agda", "max_forks_count": 2, "max_forks_repo_forks_event_max_datetime": "2021-10-20T10:46:20.000Z", "max_forks_repo_forks_event_min_datetime": "2019-06-27T23:12:48.000Z", "max_forks_repo_head_hexsha": "62fa6f36e4555360d94041113749bbb6d291691c", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "WhatisRT/meta-cedille", "max_forks_repo_path": "src/CoreTheory.agda", "max_issues_count": 10, "max_issues_repo_head_hexsha": "62fa6f36e4555360d94041113749bbb6d291691c", "max_issues_repo_issues_event_max_datetime": "2020-04-25T15:29:17.000Z", "max_issues_repo_issues_event_min_datetime": "2019-06-13T17:44:43.000Z", "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "WhatisRT/meta-cedille", "max_issues_repo_path": "src/CoreTheory.agda", "max_line_length": 137, "max_stars_count": 35, "max_stars_repo_head_hexsha": "62fa6f36e4555360d94041113749bbb6d291691c", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "WhatisRT/meta-cedille", "max_stars_repo_path": "src/CoreTheory.agda", "max_stars_repo_stars_event_max_datetime": "2021-10-12T22:59:10.000Z", "max_stars_repo_stars_event_min_datetime": "2019-06-13T07:44:50.000Z", "num_tokens": 14571, "size": 40909 }
------------------------------------------------------------------------ -- The Agda standard library -- -- Properties of n-ary products ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Product.N-ary.Properties where open import Data.Nat.Base hiding (_^_) open import Data.Product open import Data.Product.N-ary open import Data.Vec using (Vec; _∷_) open import Function.Inverse using (_↔_; inverse) open import Relation.Binary.PropositionalEquality as P open ≡-Reasoning ------------------------------------------------------------------------ -- Basic proofs module _ {a} {A : Set a} where cons-head-tail-identity : ∀ n (as : A ^ suc n) → cons n (head n as) (tail n as) ≡ as cons-head-tail-identity 0 as = P.refl cons-head-tail-identity (suc n) as = P.refl head-cons-identity : ∀ n a (as : A ^ n) → head n (cons n a as) ≡ a head-cons-identity 0 a as = P.refl head-cons-identity (suc n) a as = P.refl tail-cons-identity : ∀ n a (as : A ^ n) → tail n (cons n a as) ≡ as tail-cons-identity 0 a as = P.refl tail-cons-identity (suc n) a as = P.refl append-cons-commute : ∀ m n a (xs : A ^ m) ys → append (suc m) n (cons m a xs) ys ≡ cons (m + n) a (append m n xs ys) append-cons-commute 0 n a xs ys = P.refl append-cons-commute (suc m) n a xs ys = P.refl append-splitAt-identity : ∀ m n (as : A ^ (m + n)) → uncurry (append m n) (splitAt m n as) ≡ as append-splitAt-identity 0 n as = P.refl append-splitAt-identity (suc m) n as = begin let x = head (m + n) as in let (xs , ys) = splitAt m n (tail (m + n) as) in append (suc m) n (cons m (head (m + n) as) xs) ys ≡⟨ append-cons-commute m n x xs ys ⟩ cons (m + n) x (append m n xs ys) ≡⟨ P.cong (cons (m + n) x) (append-splitAt-identity m n (tail (m + n) as)) ⟩ cons (m + n) x (tail (m + n) as) ≡⟨ cons-head-tail-identity (m + n) as ⟩ as ∎ ------------------------------------------------------------------------ -- Conversion to and from Vec module _ {a} {A : Set a} where toVec : ∀ n → A ^ n → Vec A n toVec 0 _ = Vec.[] toVec (suc n) xs = head n xs Vec.∷ toVec n (tail n xs) fromVec : ∀ {n} → Vec A n → A ^ n fromVec Vec.[] = [] fromVec {suc n} (x Vec.∷ xs) = cons n x (fromVec xs) fromVec∘toVec : ∀ n (xs : A ^ n) → fromVec (toVec n xs) ≡ xs fromVec∘toVec 0 _ = P.refl fromVec∘toVec (suc n) xs = begin cons n (head n xs) (fromVec (toVec n (tail n xs))) ≡⟨ P.cong (cons n (head n xs)) (fromVec∘toVec n (tail n xs)) ⟩ cons n (head n xs) (tail n xs) ≡⟨ cons-head-tail-identity n xs ⟩ xs ∎ toVec∘fromVec : ∀ {n} (xs : Vec A n) → toVec n (fromVec xs) ≡ xs toVec∘fromVec Vec.[] = P.refl toVec∘fromVec {suc n} (x Vec.∷ xs) = begin head n (cons n x (fromVec xs)) Vec.∷ toVec n (tail n (cons n x (fromVec xs))) ≡⟨ P.cong₂ (λ x xs → x Vec.∷ toVec n xs) hd-prf tl-prf ⟩ x Vec.∷ toVec n (fromVec xs) ≡⟨ P.cong (x Vec.∷_) (toVec∘fromVec xs) ⟩ x Vec.∷ xs ∎ where hd-prf = head-cons-identity n x (fromVec xs) tl-prf = tail-cons-identity n x (fromVec xs) ↔Vec : ∀ n → A ^ n ↔ Vec A n ↔Vec n = inverse (toVec n) fromVec (fromVec∘toVec n) toVec∘fromVec
{ "alphanum_fraction": 0.5244818264, "avg_line_length": 36.1847826087, "ext": "agda", "hexsha": "74a7256af952b801f552b5d681f543b14ee59b6a", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "0debb886eb5dbcd38dbeebd04b34cf9d9c5e0e71", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "omega12345/agda-mode", "max_forks_repo_path": "test/asset/agda-stdlib-1.0/Data/Product/N-ary/Properties.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "0debb886eb5dbcd38dbeebd04b34cf9d9c5e0e71", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "omega12345/agda-mode", "max_issues_repo_path": "test/asset/agda-stdlib-1.0/Data/Product/N-ary/Properties.agda", "max_line_length": 97, "max_stars_count": null, "max_stars_repo_head_hexsha": "0debb886eb5dbcd38dbeebd04b34cf9d9c5e0e71", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "omega12345/agda-mode", "max_stars_repo_path": "test/asset/agda-stdlib-1.0/Data/Product/N-ary/Properties.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 1187, "size": 3329 }
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Data.Fin where open import Cubical.Data.Fin.Base public open import Cubical.Data.Fin.Properties public open import Cubical.Data.Fin.Literals public
{ "alphanum_fraction": 0.75, "avg_line_length": 28, "ext": "agda", "hexsha": "238c4dc85f56865ecf6568cdb0fde2f3ce93f403", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "fd8059ec3eed03f8280b4233753d00ad123ffce8", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "dan-iel-lee/cubical", "max_forks_repo_path": "Cubical/Data/Fin.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "fd8059ec3eed03f8280b4233753d00ad123ffce8", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "dan-iel-lee/cubical", "max_issues_repo_path": "Cubical/Data/Fin.agda", "max_line_length": 50, "max_stars_count": null, "max_stars_repo_head_hexsha": "fd8059ec3eed03f8280b4233753d00ad123ffce8", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "dan-iel-lee/cubical", "max_stars_repo_path": "Cubical/Data/Fin.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 55, "size": 224 }
{-# OPTIONS --without-K --rewriting #-} open import lib.Basics open import lib.types.FunctionSeq open import lib.types.TLevel open import lib.types.Pi open import lib.types.Pointed open import lib.types.Sigma open import lib.NType2 module lib.types.Truncation where module _ {i} where postulate -- HIT Trunc : (n : ℕ₋₂) (A : Type i) → Type i [_] : {n : ℕ₋₂} {A : Type i} → A → Trunc n A instance Trunc-level : {n : ℕ₋₂} {A : Type i} → has-level n (Trunc n A) module TruncElim {n : ℕ₋₂} {A : Type i} {j} {P : Trunc n A → Type j} {{p : (x : Trunc n A) → has-level n (P x)}} (d : (a : A) → P [ a ]) where postulate -- HIT f : Π (Trunc n A) P [_]-β : ∀ a → f [ a ] ↦ d a {-# REWRITE [_]-β #-} open TruncElim public renaming (f to Trunc-elim) module TruncRec {i j} {n : ℕ₋₂} {A : Type i} {B : Type j} {{p : has-level n B}} (d : A → B) where private module M = TruncElim {{λ x → p}} d f : Trunc n A → B f = M.f open TruncRec public renaming (f to Trunc-rec) module TruncRecType {i j} {n : ℕ₋₂} {A : Type i} (d : A → n -Type j) where open TruncRec {{n -Type-level j}} d public flattening-Trunc : Σ (Trunc (S n) A) (fst ∘ f) ≃ Trunc (S n) (Σ A (fst ∘ d)) flattening-Trunc = equiv to from to-from from-to where to-aux : (x : Trunc (S n) A) → (fst (f x) → Trunc (S n) (Σ A (fst ∘ d))) to-aux = Trunc-elim (λ a b → [ (a , b) ]) to : Σ (Trunc (S n) A) (fst ∘ f) → Trunc (S n) (Σ A (fst ∘ d)) to (x , y) = to-aux x y from-aux : Σ A (fst ∘ d) → Σ (Trunc (S n) A) (fst ∘ f) from-aux (a , b) = ([ a ] , b) from : Trunc (S n) (Σ A (fst ∘ d)) → Σ (Trunc (S n) A) (fst ∘ f) from = Trunc-rec {{Σ-level ⟨⟩ (λ x → raise-level _ (snd (f x)))}} from-aux where to-from : (x : Trunc (S n) (Σ A (fst ∘ d))) → to (from x) == x to-from = Trunc-elim (λ _ → idp) from-to-aux : (a : Trunc (S n) A) (b : fst (f a)) → from (to-aux a b) == (a , b) from-to-aux = Trunc-elim {{λ _ → Π-level (λ _ → =-preserves-level (Σ-level ⟨⟩ (λ x → raise-level _ (snd (f x)))))}} (λ a b → idp) from-to : (x : Σ (Trunc (S n) A) (fst ∘ f)) → from (to x) == x from-to (a , b) = from-to-aux a b ⊙Trunc : ∀ {i} → ℕ₋₂ → Ptd i → Ptd i ⊙Trunc n ⊙[ A , a ] = ⊙[ Trunc n A , [ a ] ] ⊙Trunc-rec : ∀ {i j} {n : ℕ₋₂} {X : Ptd i} {Y : Ptd j} {{Y-level : has-level n (de⊙ Y)}} → X ⊙→ Y → ⊙Trunc n X ⊙→ Y ⊙Trunc-rec {{Y-level}} f = Trunc-rec {{Y-level}} (fst f) , snd f ⊙Trunc-rec-post-⊙∘ : ∀ {i j k} {n : ℕ₋₂} {X : Ptd i} {Y : Ptd j} {Z : Ptd k} {{Y-level : has-level n (de⊙ Y)}} {{Z-level : has-level n (de⊙ Z)}} (g : Y ⊙→ Z) (f : X ⊙→ Y) → ⊙Trunc-rec {n = n} {{Z-level}} (g ⊙∘ f) == g ⊙∘ ⊙Trunc-rec {{Y-level}} f ⊙Trunc-rec-post-⊙∘ {{Y-level}} {{Z-level}} g f = ⊙λ=' (Trunc-elim {{λ x → =-preserves-level Z-level}} (λ x → idp)) idp module _ {i} {A : Type i} where [_]₀ : A → Trunc 0 A [_]₀ = [_] {n = 0} [_]₁ : A → Trunc 1 A [_]₁ = [_] {n = 1} [_]₂ : A → Trunc 2 A [_]₂ = [_] {n = 2} module _ {i} {n : ℕ₋₂} {A : Type i} where private Trunc= : (a b : Trunc (S n) A) → n -Type i Trunc= = Trunc-elim (λ a → Trunc-elim ((λ b → (Trunc n (a == b) , Trunc-level)))) {- t is for truncated -} _=ₜ_ : (a b : Trunc (S n) A) → Type i _=ₜ_ a b = fst (Trunc= a b) =ₜ-level : (a b : Trunc (S n) A) → has-level n (a =ₜ b) =ₜ-level a b = snd (Trunc= a b) =ₜ-refl : (a : Trunc (S n) A) → a =ₜ a =ₜ-refl = Trunc-elim {{λ x → raise-level _ (=ₜ-level x x)}} (λ a → [ idp ]) =ₜ-equiv : (a b : Trunc (S n) A) → (a == b) ≃ (a =ₜ b) =ₜ-equiv a b = to a b , to-is-equiv a b where to : (a b : Trunc (S n) A) → (a == b → a =ₜ b) to a b p = transport (λ c → a =ₜ c) p (=ₜ-refl a) from-aux : (a b : A) → a == b → [ a ] == [ b ] :> Trunc (S n) A from-aux _ _ = ap [_] from : (a b : Trunc (S n) A) → a =ₜ b → a == b from = Trunc-elim (λ a → Trunc-elim (λ b → Trunc-rec (from-aux a b))) to-from-aux : (a b : A) → (p : a == b) → to _ _ (from-aux a b p) == [ p ] to-from-aux a .a idp = idp to-from : (a b : Trunc (S n) A) (x : a =ₜ b) → to a b (from a b x) == x to-from = Trunc-elim {{λ x → Π-level (λ y → Π-level (λ _ → =-preserves-level (raise-level _ (=ₜ-level x y))))}} (λ a → Trunc-elim {{λ x → Π-level (λ _ → =-preserves-level (raise-level _ (=ₜ-level [ a ] x)))}} (λ b → Trunc-elim (to-from-aux a b))) from-to-aux : (a : Trunc (S n) A) → from a a (=ₜ-refl a) == idp from-to-aux = Trunc-elim (λ _ → idp) from-to : (a b : Trunc (S n) A) (p : a == b) → from a b (to a b p) == p from-to a .a idp = from-to-aux a adj : (ta tb : Trunc (S n) A) (p : ta == tb) → ap (to ta tb) (from-to ta tb p) == to-from ta tb (to ta tb p) adj ta .ta idp = Trunc-elim {P = λ ta → ap (to ta ta) (from-to ta ta idp) == to-from ta ta (to ta ta idp)} {{λ x → =-preserves-level $ =-preserves-level $ raise-level _ $ =ₜ-level x x}} (λ _ → idp) ta to-is-equiv : ∀ a b → is-equiv (to a b) to-is-equiv a b = record { g = from a b ; f-g = to-from a b ; g-f = from-to a b ; adj = adj a b } =ₜ-path : (a b : Trunc (S n) A) → (a == b) == (a =ₜ b) =ₜ-path a b = ua (=ₜ-equiv a b) {- Universal property -} abstract Trunc-rec-is-equiv : ∀ {i j} (n : ℕ₋₂) (A : Type i) (B : Type j) {{p : has-level n B}} → is-equiv (Trunc-rec {{p}} :> ((A → B) → (Trunc n A → B))) Trunc-rec-is-equiv n A B {{p}} = is-eq _ (λ f → f ∘ [_]) (λ f → λ= (Trunc-elim (λ a → idp))) (λ f → idp) Trunc-preserves-level : ∀ {i} {A : Type i} {n : ℕ₋₂} (m : ℕ₋₂) → has-level n A → has-level n (Trunc m A) Trunc-preserves-level {n = ⟨-2⟩} _ p = has-level-in ([ contr-center p ] , Trunc-elim (λ a → ap [_] (contr-path p a))) Trunc-preserves-level ⟨-2⟩ _ = contr-has-level Trunc-level Trunc-preserves-level {n = (S n)} (S m) c = has-level-in (λ t₁ t₂ → Trunc-elim {{λ s₁ → prop-has-level-S {A = has-level n (s₁ == t₂)} has-level-is-prop}} (λ a₁ → Trunc-elim {{λ s₂ → prop-has-level-S {A = has-level n ([ a₁ ] == s₂)} has-level-is-prop}} (λ a₂ → equiv-preserves-level ((=ₜ-equiv [ a₁ ] [ a₂ ])⁻¹) {{Trunc-preserves-level {n = n} m (has-level-apply c a₁ a₂)}}) t₂) t₁) {- an n-type is equivalent to its n-truncation -} unTrunc-equiv : ∀ {i} {n : ℕ₋₂} (A : Type i) {{_ : has-level n A}} → Trunc n A ≃ A unTrunc-equiv A = equiv f [_] (λ _ → idp) g-f where f = Trunc-rec (idf _) g-f = Trunc-elim (λ _ → idp) ⊙unTrunc-equiv : ∀ {i} {n : ℕ₋₂} (X : Ptd i) {{_ : has-level n (de⊙ X)}} → ⊙Trunc n X ⊙≃ X ⊙unTrunc-equiv {n = n} X = ≃-to-⊙≃ (unTrunc-equiv (de⊙ X)) idp -- Equivalence associated to the universal property Trunc-extend-equiv : ∀ {i j} (n : ℕ₋₂) (A : Type i) (B : Type j) {{p : has-level n B}} → (A → B) ≃ (Trunc n A → B) Trunc-extend-equiv n A B = (Trunc-rec , Trunc-rec-is-equiv n A B) Trunc-fmap : ∀ {i j} {n : ℕ₋₂} {A : Type i} {B : Type j} → ((A → B) → (Trunc n A → Trunc n B)) Trunc-fmap f = Trunc-rec ([_] ∘ f) ⊙Trunc-fmap : ∀ {i j} {n : ℕ₋₂} {X : Ptd i} {Y : Ptd j} → ((X ⊙→ Y) → (⊙Trunc n X ⊙→ ⊙Trunc n Y)) ⊙Trunc-fmap F = Trunc-fmap (fst F) , ap [_] (snd F) –>-unTrunc-equiv-natural : ∀ {i} {j} {n : ℕ₋₂} {A : Type i} {B : Type j} (f : A → B) {{_ : has-level n A}} {{_ : has-level n B}} → –> (unTrunc-equiv {n = n} B) ∘ Trunc-fmap f ∼ f ∘ –> (unTrunc-equiv {n = n} A) –>-unTrunc-equiv-natural f = Trunc-elim (λ a → idp) ⊙–>-⊙unTrunc-equiv-natural : ∀ {i} {j} {n : ℕ₋₂} {X : Ptd i} {Y : Ptd j} (f : X ⊙→ Y) {{_ : has-level n (de⊙ X)}} {{_ : has-level n (de⊙ Y)}} → ⊙–> (⊙unTrunc-equiv {n = n} Y) ⊙∘ ⊙Trunc-fmap f == f ⊙∘ ⊙–> (⊙unTrunc-equiv {n = n} X) ⊙–>-⊙unTrunc-equiv-natural (f' , idp) = ⊙λ=' (–>-unTrunc-equiv-natural f') idp ⊙–>-⊙unTrunc-equiv-natural-=⊙∘ : ∀ {i} {n : ℕ₋₂} {X Y : Ptd i} (f : X ⊙→ Y) {{_ : has-level n (de⊙ X)}} {{_ : has-level n (de⊙ Y)}} → ⊙–> (⊙unTrunc-equiv {n = n} Y) ◃⊙∘ ⊙Trunc-fmap f ◃⊙idf =⊙∘ f ◃⊙∘ ⊙–> (⊙unTrunc-equiv {n = n} X) ◃⊙idf ⊙–>-⊙unTrunc-equiv-natural-=⊙∘ f = =⊙∘-in (⊙–>-⊙unTrunc-equiv-natural f) Trunc-fmap2 : ∀ {i j k} {n : ℕ₋₂} {A : Type i} {B : Type j} {C : Type k} → ((A → B → C) → (Trunc n A → Trunc n B → Trunc n C)) Trunc-fmap2 f = Trunc-rec (λ a → Trunc-fmap (f a)) ⊙Trunc-rec-⊙Trunc-fmap : ∀ {i j k} {n : ℕ₋₂} {X : Ptd i} {Y : Ptd j} {Z : Ptd k} {{Z-level : has-level n (de⊙ Z)}} (g : Y ⊙→ Z) (f : X ⊙→ Y) → ⊙Trunc-rec {n = n} {{Z-level}} g ⊙∘ ⊙Trunc-fmap f == ⊙Trunc-rec {n = n} {{Z-level}} (g ⊙∘ f) ⊙Trunc-rec-⊙Trunc-fmap {{Z-level}} g f = ⊙λ=' (Trunc-elim {{λ tx → =-preserves-level Z-level}} (λ x → idp)) $ ap (_∙ snd g) (∘-ap (Trunc-elim (fst g)) [_] (snd f)) -- XXX What is the naming convention? Trunc-fpmap : ∀ {i j} {n : ℕ₋₂} {A : Type i} {B : Type j} {f g : A → B} → f ∼ g → Trunc-fmap {n = n} f ∼ Trunc-fmap g Trunc-fpmap h = Trunc-elim (ap [_] ∘ h) Trunc-fmap-idf : ∀ {i} {n : ℕ₋₂} {A : Type i} → ∀ x → Trunc-fmap {n = n} (idf A) x == x Trunc-fmap-idf = Trunc-elim (λ _ → idp) ⊙Trunc-fmap-⊙idf : ∀ {i} {n : ℕ₋₂} {X : Ptd i} → ⊙Trunc-fmap (⊙idf X) ⊙∼ ⊙idf (⊙Trunc n X) ⊙Trunc-fmap-⊙idf = Trunc-fmap-idf , idp transport-Trunc : ∀ {i} {n : ℕ₋₂} {A B : Type i} (p : A == B) → transport (Trunc n) p == Trunc-fmap (coe p) transport-Trunc p@idp = ! (λ= Trunc-fmap-idf) ⊙transport-⊙Trunc : ∀ {i} {n : ℕ₋₂} {X Y : Ptd i} (p : X == Y) → ⊙transport (⊙Trunc n) p == ⊙Trunc-fmap (⊙coe p) ⊙transport-⊙Trunc p@idp = ! (⊙λ= ⊙Trunc-fmap-⊙idf) Trunc-fmap-cst : ∀ {i} {j} {n : ℕ₋₂} {A : Type i} {B : Type j} → ∀ (b : B) → Trunc-fmap {n = n} {A = A} (cst b) ∼ cst [ b ] Trunc-fmap-cst b = Trunc-elim (λ a → idp) ⊙Trunc-fmap-cst : ∀ {i} {j} {n : ℕ₋₂} {X : Ptd i} {Y : Ptd j} → ⊙Trunc-fmap {n = n} (⊙cst {X = X} {Y = Y}) ⊙∼ ⊙cst ⊙Trunc-fmap-cst {Y = Y} = Trunc-fmap-cst (pt Y) , idp Trunc-fmap-∘ : ∀ {i j k} {n : ℕ₋₂} {A : Type i} {B : Type j} {C : Type k} (g : B → C) (f : A → B) → ∀ x → Trunc-fmap {n = n} g (Trunc-fmap f x) == Trunc-fmap (g ∘ f) x Trunc-fmap-∘ g f = Trunc-elim (λ _ → idp) ⊙Trunc-fmap-⊙∘ : ∀ {i j k} {n : ℕ₋₂} {A : Ptd i} {B : Ptd j} {C : Ptd k} (g : B ⊙→ C) (f : A ⊙→ B) → ⊙Trunc-fmap {n = n} g ⊙∘ ⊙Trunc-fmap f ⊙∼ ⊙Trunc-fmap (g ⊙∘ f) ⊙Trunc-fmap-⊙∘ {n = n} g f = Trunc-fmap-∘ (fst g) (fst f) , pres-pt-path where pres-pt-path : snd (⊙Trunc-fmap {n = n} g ⊙∘ ⊙Trunc-fmap f) == snd (⊙Trunc-fmap (g ⊙∘ f)) pres-pt-path = ap (Trunc-fmap (fst g)) (ap [_] (snd f)) ∙ ap [_] (snd g) =⟨ ap (_∙ ap [_] (snd g)) (∘-ap (Trunc-fmap (fst g)) [_] (snd f) ∙ ap-∘ [_] (fst g) (snd f)) ⟩ ap [_] (ap (fst g) (snd f)) ∙ ap [_] (snd g) =⟨ ∙-ap [_] (ap (fst g) (snd f)) (snd g) ⟩ ap [_] (ap (fst g) (snd f) ∙ snd g) =∎ ⊙Trunc-fmap-seq : ∀ {i} {n : ℕ₋₂} {X Y : Ptd i} → X ⊙–→ Y → ⊙Trunc n X ⊙–→ ⊙Trunc n Y ⊙Trunc-fmap-seq ⊙idf-seq = ⊙idf-seq ⊙Trunc-fmap-seq (f ◃⊙∘ fs) = ⊙Trunc-fmap f ◃⊙∘ ⊙Trunc-fmap-seq fs ⊙Trunc-fmap-seq-⊙∘ : ∀ {i} {n : ℕ₋₂} {X Y : Ptd i} (fs : X ⊙–→ Y) → ⊙Trunc-fmap {n = n} (⊙compose fs) ◃⊙idf =⊙∘ ⊙Trunc-fmap-seq fs ⊙Trunc-fmap-seq-⊙∘ ⊙idf-seq = =⊙∘-in (⊙λ= (⊙Trunc-fmap-⊙idf)) ⊙Trunc-fmap-seq-⊙∘ (f ◃⊙∘ fs) = =⊙∘-in $ ⊙Trunc-fmap (f ⊙∘ ⊙compose fs) =⟨ ! $ ⊙λ= $ ⊙Trunc-fmap-⊙∘ f (⊙compose fs) ⟩ ⊙Trunc-fmap f ⊙∘ ⊙Trunc-fmap (⊙compose fs) =⟨ ap (⊙Trunc-fmap f ⊙∘_) (=⊙∘-out (⊙Trunc-fmap-seq-⊙∘ fs)) ⟩ ⊙Trunc-fmap f ⊙∘ ⊙compose (⊙Trunc-fmap-seq fs) =∎ ⊙Trunc-fmap-seq-=⊙∘ : ∀ {i} {n : ℕ₋₂} {X Y : Ptd i} {fs gs : X ⊙–→ Y} → fs =⊙∘ gs → ⊙Trunc-fmap-seq {n = n} fs =⊙∘ ⊙Trunc-fmap-seq {n = n} gs ⊙Trunc-fmap-seq-=⊙∘ {fs = fs} {gs = gs} p = ⊙Trunc-fmap-seq fs =⊙∘⟨ !⊙∘ (⊙Trunc-fmap-seq-⊙∘ fs) ⟩ ⊙Trunc-fmap (⊙compose fs) ◃⊙idf =⊙∘₁⟨ ap ⊙Trunc-fmap (=⊙∘-out p) ⟩ ⊙Trunc-fmap (⊙compose gs) ◃⊙idf =⊙∘⟨ ⊙Trunc-fmap-seq-⊙∘ gs ⟩ ⊙Trunc-fmap-seq gs ∎⊙∘ Trunc-csmap : ∀ {i₀ i₁ j₀ j₁} {n : ℕ₋₂} {A₀ : Type i₀} {A₁ : Type i₁} {B₀ : Type j₀} {B₁ : Type j₁} {f : A₀ → B₀} {g : A₁ → B₁} {hA : A₀ → A₁} {hB : B₀ → B₁} → CommSquare f g hA hB → CommSquare (Trunc-fmap {n = n} f) (Trunc-fmap g) (Trunc-fmap hA) (Trunc-fmap hB) Trunc-csmap (comm-sqr cs) = comm-sqr $ Trunc-elim (ap [_] ∘ cs) {- Pushing concatenatation through _=ₜ_ -} module _ {i} {n : ℕ₋₂} {A : Type i} where {- concatenation in _=ₜ_ -} _∙ₜ_ : {ta tb tc : Trunc (S n) A} → ta =ₜ tb → tb =ₜ tc → ta =ₜ tc _∙ₜ_ {ta = ta} {tb = tb} {tc = tc} = Trunc-elim {P = λ ta → C ta tb tc} {{λ ta → level ta tb tc}} (λ a → Trunc-elim {P = λ tb → C [ a ] tb tc} {{λ tb → level [ a ] tb tc}} (λ b → Trunc-elim {P = λ tc → C [ a ] [ b ] tc} {{λ tc → level [ a ] [ b ] tc}} (λ c → Trunc-fmap2 _∙_) tc) tb) ta where C : (ta tb tc : Trunc (S n) A) → Type i C ta tb tc = ta =ₜ tb → tb =ₜ tc → ta =ₜ tc level : (ta tb tc : Trunc (S n) A) → has-level (S n) (C ta tb tc) level ta tb tc = raise-level _ $ Π-level $ λ _ → Π-level $ λ _ → =ₜ-level ta tc {- inversion in _=ₜ_ -} !ₜ : {ta tb : Trunc (S n) A} → ta =ₜ tb → tb =ₜ ta !ₜ {ta = ta} {tb = tb} = Trunc-elim {P = λ ta → C ta tb} {{λ ta → level ta tb}} (λ a → Trunc-elim {P = λ tb → C [ a ] tb} {{λ tb → level [ a ] tb}} (λ b → Trunc-fmap !) tb) ta where C : (ta tb : Trunc (S n) A) → Type i C ta tb = ta =ₜ tb → tb =ₜ ta level : (ta tb : Trunc (S n) A) → has-level (S n) (C ta tb) level ta tb = raise-level _ $ Π-level $ λ _ → =ₜ-level tb ta ∙ₜ-assoc : {ta tb tc td : Trunc (S n) A} (tp : ta =ₜ tb) (tq : tb =ₜ tc) (tr : tc =ₜ td) → _∙ₜ_ {ta} (_∙ₜ_ {ta} tp tq) tr == _∙ₜ_ {ta} tp (_∙ₜ_ {tb} tq tr) ∙ₜ-assoc {ta = ta} {tb = tb} {tc = tc} {td = td} = Trunc-elim {P = λ ta → C ta tb tc td} {{λ ta → C-level ta tb tc td}} (λ a → Trunc-elim {P = λ tb → C [ a ] tb tc td} {{λ tb → C-level [ a ] tb tc td}} (λ b → Trunc-elim {P = λ tc → C [ a ] [ b ] tc td} {{λ tc → C-level [ a ] [ b ] tc td}} (λ c → Trunc-elim {P = λ td → C [ a ] [ b ] [ c ] td} {{λ td → C-level [ a ] [ b ] [ c ] td}} (λ d tp tq tr → Trunc-elim {P = λ tp → D [ a ] [ b ] [ c ] [ d ] tp tq tr} {{λ tp → D-level [ a ] [ b ] [ c ] [ d ] tp tq tr}} (λ p → Trunc-elim {P = λ tq → D [ a ] [ b ] [ c ] [ d ] [ p ] tq tr} {{λ tq → D-level [ a ] [ b ] [ c ] [ d ] [ p ] tq tr}} (λ q → Trunc-elim {P = λ tr → D [ a ] [ b ] [ c ] [ d ] [ p ] [ q ] tr} {{λ tr → D-level [ a ] [ b ] [ c ] [ d ] [ p ] [ q ] tr}} (λ r → ap [_] (∙-assoc p q r)) tr) tq) tp) td) tc) tb) ta where D : (ta tb tc td : Trunc (S n) A) → ta =ₜ tb → tb =ₜ tc → tc =ₜ td → Type i D ta tb tc td tp tq tr = _∙ₜ_ {ta} (_∙ₜ_ {ta} tp tq) tr == _∙ₜ_ {ta} tp (_∙ₜ_ {tb} tq tr) C : (ta tb tc td : Trunc (S n) A) → Type i C ta tb tc td = ∀ tp tq tr → D ta tb tc td tp tq tr D-level : (ta tb tc td : Trunc (S n) A) (tp : ta =ₜ tb) (tq : tb =ₜ tc) (tr : tc =ₜ td) → has-level n (D ta tb tc td tp tq tr) D-level ta tb tc td tp tq tr = =-preserves-level (=ₜ-level ta td) C-level : (ta tb tc td : Trunc (S n) A) → has-level (S n) (C ta tb tc td) C-level ta tb tc td = raise-level _ $ Π-level $ λ tp → Π-level $ λ tq → Π-level $ λ tr → D-level ta tb tc td tp tq tr abstract ∙ₜ-assoc-pentagon : {ta tb tc td te : Trunc (S n) A} (tp : ta =ₜ tb) (tq : tb =ₜ tc) (tr : tc =ₜ td) (ts : td =ₜ te) → ∙ₜ-assoc {ta} (_∙ₜ_ {ta} tp tq) tr ts ◃∙ ∙ₜ-assoc {ta} tp tq (_∙ₜ_ {tc} tr ts) ◃∎ =ₛ ap (λ u → _∙ₜ_ {ta} u ts) (∙ₜ-assoc {ta} tp tq tr) ◃∙ ∙ₜ-assoc {ta} tp (_∙ₜ_ {tb} tq tr) ts ◃∙ ap (_∙ₜ_ {ta} tp) (∙ₜ-assoc {tb} tq tr ts) ◃∎ ∙ₜ-assoc-pentagon {ta} {tb} {tc} {td} {te} = core ta tb tc td te where P : (ta tb tc td te : Trunc (S n) A) (tp : ta =ₜ tb) (tq : tb =ₜ tc) (tr : tc =ₜ td) (ts : td =ₜ te) → Type i P ta tb tc td te tp tq tr ts = ∙ₜ-assoc {ta} (_∙ₜ_ {ta} tp tq) tr ts ◃∙ ∙ₜ-assoc {ta} tp tq (_∙ₜ_ {tc} tr ts) ◃∎ =ₛ ap (λ u → _∙ₜ_ {ta} u ts) (∙ₜ-assoc {ta} tp tq tr) ◃∙ ∙ₜ-assoc {ta} tp (_∙ₜ_ {tb} tq tr) ts ◃∙ ap (_∙ₜ_ {ta} tp) (∙ₜ-assoc {tb} tq tr ts) ◃∎ P-level : ∀ ta tb tc td te → (tp : ta =ₜ tb) (tq : tb =ₜ tc) (tr : tc =ₜ td) (ts : td =ₜ te) → has-level n (P ta tb tc td te tp tq tr ts) P-level ta tb tc td te tp tq tr ts = =ₛ-level $ raise-level _ $ raise-level _ $ =ₜ-level ta te Q : (ta tb tc td te : Trunc (S n) A) → Type i Q ta tb tc td te = ∀ tp tq tr ts → P ta tb tc td te tp tq tr ts Q-level : ∀ ta tb tc td te → has-level (S n) (Q ta tb tc td te) Q-level ta tb tc td te = raise-level n $ Π-level $ λ tp → Π-level $ λ tq → Π-level $ λ tr → Π-level $ λ ts → P-level ta tb tc td te tp tq tr ts core' : ∀ {a} {b} {c} {d} {e} p q r s → P [ a ] [ b ] [ c ] [ d ] [ e ] [ p ] [ q ] [ r ] [ s ] core' idp idp r s = =ₛ-in idp core : ∀ ta tb tc td te → Q ta tb tc td te core ta tb tc td te = Trunc-elim {P = λ ta → Q ta tb tc td te} {{λ ta → Q-level ta tb tc td te}} (λ a → Trunc-elim {P = λ tb → Q [ a ] tb tc td te} {{λ tb → Q-level [ a ] tb tc td te}} (λ b → Trunc-elim {P = λ tc → Q [ a ] [ b ] tc td te} {{λ tc → Q-level [ a ] [ b ] tc td te}} (λ c → Trunc-elim {P = λ td → Q [ a ] [ b ] [ c ] td te} {{λ td → Q-level [ a ] [ b ] [ c ] td te}} (λ d → Trunc-elim {P = λ te → Q [ a ] [ b ] [ c ] [ d ] te} {{λ te → Q-level [ a ] [ b ] [ c ] [ d ] te}} (λ e → let R = P [ a ] [ b ] [ c ] [ d ] [ e ] R-level = P-level [ a ] [ b ] [ c ] [ d ] [ e ] in λ tp tq tr ts → Trunc-elim {P = λ tp → R tp tq tr ts} {{λ tp → R-level tp tq tr ts }} (λ p → Trunc-elim {P = λ tq → R [ p ] tq tr ts} {{λ tq → R-level [ p ] tq tr ts}} (λ q → Trunc-elim {P = λ tr → R [ p ] [ q ] tr ts} {{λ tr → R-level [ p ] [ q ] tr ts}} (λ r → Trunc-elim {P = λ ts → R [ p ] [ q ] [ r ] ts} {{λ ts → R-level [ p ] [ q ] [ r ] ts}} (λ s → core' p q r s ) ts ) tr ) tq ) tp ) te ) td ) tc ) tb ) ta –>-=ₜ-equiv-pres-∙ : {ta tb tc : Trunc (S n) A} (p : ta == tb) (q : tb == tc) → –> (=ₜ-equiv ta tc) (p ∙ q) == _∙ₜ_ {ta = ta} (–> (=ₜ-equiv ta tb) p) (–> (=ₜ-equiv tb tc) q) –>-=ₜ-equiv-pres-∙ {ta = ta} idp idp = Trunc-elim {P = λ ta → –> (=ₜ-equiv ta ta) idp == _∙ₜ_ {ta = ta} (–> (=ₜ-equiv ta ta) idp) (–> (=ₜ-equiv ta ta) idp)} {{λ ta → raise-level _ $ =-preserves-level $ =ₜ-level ta ta}} (λ a → idp) ta !ₜ-=ₜ-refl : ∀ (ta : Trunc (S n) A) → !ₜ {ta = ta} (=ₜ-refl ta) == =ₜ-refl ta !ₜ-=ₜ-refl = Trunc-elim {P = λ ta → !ₜ {ta = ta} (=ₜ-refl ta) == =ₜ-refl ta} {{λ ta → raise-level _ $ =-preserves-level $ =ₜ-level ta ta}} (λ a → idp) –>-=ₜ-equiv-pres-! : {ta tb : Trunc (S n) A} (p : ta == tb) → –> (=ₜ-equiv tb ta) (! p) == !ₜ {ta = ta} (–> (=ₜ-equiv ta tb) p) –>-=ₜ-equiv-pres-! {ta = ta} p@idp = ! (!ₜ-=ₜ-refl ta) abstract –>-=ₜ-equiv-pres-∙-coh : {ta tb tc td : Trunc (S n) A} (p : ta == tb) (q : tb == tc) (r : tc == td) → –>-=ₜ-equiv-pres-∙ (p ∙ q) r ◃∙ ap (λ u → _∙ₜ_ {ta = ta} u (–> (=ₜ-equiv tc td) r)) (–>-=ₜ-equiv-pres-∙ p q) ◃∙ ∙ₜ-assoc {ta = ta} (–> (=ₜ-equiv ta tb) p) (–> (=ₜ-equiv tb tc) q) (–> (=ₜ-equiv tc td) r) ◃∎ =ₛ ap (–> (=ₜ-equiv ta td)) (∙-assoc p q r) ◃∙ –>-=ₜ-equiv-pres-∙ p (q ∙ r) ◃∙ ap (_∙ₜ_ {ta = ta} (–> (=ₜ-equiv ta tb) p)) (–>-=ₜ-equiv-pres-∙ q r) ◃∎ –>-=ₜ-equiv-pres-∙-coh {ta = ta} idp idp idp = Trunc-elim {P = λ ta → P ta ta ta ta idp idp idp} {{λ ta → =ₛ-level $ raise-level (S (S n)) $ raise-level (S n) $ raise-level n $ =ₜ-level ta ta}} (λ a → =ₛ-in idp) ta where P : (ta tb tc td : Trunc (S n) A) (p : ta == tb) (q : tb == tc) (r : tc == td) → Type i P ta tb tc td p q r = –>-=ₜ-equiv-pres-∙ (p ∙ q) r ◃∙ ap (λ u → _∙ₜ_ {ta = ta} u (–> (=ₜ-equiv tc td) r)) (–>-=ₜ-equiv-pres-∙ p q) ◃∙ ∙ₜ-assoc {ta = ta} (–> (=ₜ-equiv ta tb) p) (–> (=ₜ-equiv tb tc) q) (–> (=ₜ-equiv tc td) r) ◃∎ =ₛ ap (–> (=ₜ-equiv ta td)) (∙-assoc p q r) ◃∙ –>-=ₜ-equiv-pres-∙ p (q ∙ r) ◃∙ ap (_∙ₜ_ {ta = ta} (–> (=ₜ-equiv ta tb) p)) (–>-=ₜ-equiv-pres-∙ q r) ◃∎ {- naturality of =ₜ-equiv -} module _ {i j} {n : ℕ₋₂} {A : Type i} {B : Type j} (f : A → B) where =ₜ-fmap : ∀ (a₀ a₁ : Trunc (S n) A) → a₀ =ₜ a₁ → Trunc-fmap f a₀ =ₜ Trunc-fmap f a₁ =ₜ-fmap = Trunc-elim {P = λ a₀ → ∀ a₁ → a₀ =ₜ a₁ → Trunc-fmap f a₀ =ₜ Trunc-fmap f a₁} {{λ a₀ → Π-level λ a₁ → Π-level λ _ → raise-level _ $ =ₜ-level (Trunc-fmap f a₀) (Trunc-fmap f a₁)}} (λ a₀ → Trunc-elim {P = λ a₁ → [ a₀ ] =ₜ a₁ → [ f a₀ ] =ₜ Trunc-fmap f a₁} {{λ a₁ → Π-level λ _ → raise-level _ $ =ₜ-level [ f a₀ ] (Trunc-fmap f a₁)}} (λ a₁ → Trunc-fmap (ap f))) module _ {i j} {n : ℕ₋₂} {A : Type i} {B : Type j} (f : A → B) where =ₜ-equiv-nat : ∀ (a₀ a₁ : Trunc (S n) A) (p : a₀ == a₁) → –> (=ₜ-equiv (Trunc-fmap f a₀) (Trunc-fmap f a₁)) (ap (Trunc-fmap f) p) == =ₜ-fmap f a₀ a₁ (–> (=ₜ-equiv a₀ a₁) p) =ₜ-equiv-nat a₀ .a₀ idp = Trunc-elim {P = λ a → –> (=ₜ-equiv (Trunc-fmap f a) (Trunc-fmap f a)) idp == =ₜ-fmap f a a (–> (=ₜ-equiv a a) idp)} {{λ a → raise-level _ $ =-preserves-level $ =ₜ-level (Trunc-fmap f a) (Trunc-fmap f a)}} (λ _ → idp) a₀ {- Truncation preserves equivalences - more convenient than univalence+ap - when we need to know the forward or backward function explicitly -} module _ {i j} {n : ℕ₋₂} {A : Type i} {B : Type j} where Trunc-isemap : {f : A → B} → is-equiv f → is-equiv (Trunc-fmap {n = n} f) Trunc-isemap {f-orig} ie = is-eq f g f-g g-f where f = Trunc-fmap f-orig g = Trunc-fmap (is-equiv.g ie) f-g : ∀ tb → f (g tb) == tb f-g = Trunc-elim (ap [_] ∘ is-equiv.f-g ie) g-f : ∀ ta → g (f ta) == ta g-f = Trunc-elim (ap [_] ∘ is-equiv.g-f ie) Trunc-emap : A ≃ B → Trunc n A ≃ Trunc n B Trunc-emap (f , f-ie) = Trunc-fmap f , Trunc-isemap f-ie Trunc-csemap : ∀ {i₀ i₁ j₀ j₁} {n : ℕ₋₂} {A₀ : Type i₀} {A₁ : Type i₁} {B₀ : Type j₀} {B₁ : Type j₁} {f : A₀ → B₀} {g : A₁ → B₁} {hA : A₀ → A₁} {hB : B₀ → B₁} → CommSquareEquiv f g hA hB → CommSquareEquiv (Trunc-fmap {n = n} f) (Trunc-fmap g) (Trunc-fmap hA) (Trunc-fmap hB) Trunc-csemap (cs , hA-ise , hB-ise) = Trunc-csmap cs , Trunc-isemap hA-ise , Trunc-isemap hB-ise transport-Trunc' : ∀ {i j} {A : Type i} {n : ℕ₋₂} (P : A → Type j) {x y : A} (p : x == y) (b : P x) → transport (Trunc n ∘ P) p [ b ] == [ transport P p b ] transport-Trunc' _ idp _ = idp Trunc-fuse : ∀ {i} (A : Type i) (m n : ℕ₋₂) → Trunc m (Trunc n A) ≃ Trunc (minT m n) A Trunc-fuse A m n = equiv (Trunc-rec {{raise-level-≤T (minT≤l m n) Trunc-level}} (Trunc-rec {{raise-level-≤T (minT≤r m n) Trunc-level}} [_])) (Trunc-rec ([_] ∘ [_])) (Trunc-elim (λ _ → idp)) (Trunc-elim (Trunc-elim {{λ _ → =-preserves-level (Trunc-preserves-level _ Trunc-level)}} (λ _ → idp))) where instance l : has-level (minT m n) (Trunc m (Trunc n A)) l with (minT-out m n) l | inl p = transport (λ k → has-level k (Trunc m (Trunc n A))) (! p) Trunc-level l | inr q = Trunc-preserves-level _ (transport (λ k → has-level k (Trunc n A)) (! q) Trunc-level) Trunc-fuse-≤ : ∀ {i} (A : Type i) {m n : ℕ₋₂} (m≤n : m ≤T n) → Trunc m (Trunc n A) ≃ Trunc m A Trunc-fuse-≤ A m≤n = equiv (Trunc-rec (Trunc-rec {{raise-level-≤T m≤n Trunc-level}} [_])) (Trunc-rec ([_] ∘ [_])) (Trunc-elim (λ _ → idp)) (Trunc-elim (Trunc-elim {{λ _ → =-preserves-level (Trunc-preserves-level _ Trunc-level)}} (λ _ → idp))) {- Truncating a binary product is equivalent to truncating its components -} Trunc-×-econv : ∀ {i} {j} (n : ℕ₋₂) (A : Type i) (B : Type j) → Trunc n (A × B) ≃ Trunc n A × Trunc n B Trunc-×-econv n A B = equiv f g f-g g-f where f : Trunc n (A × B) → Trunc n A × Trunc n B f = Trunc-rec (λ {(a , b) → [ a ] , [ b ]}) g : Trunc n A × Trunc n B → Trunc n (A × B) g (ta , tb) = Trunc-rec (λ a → Trunc-rec (λ b → [ a , b ]) tb) ta f-g : ∀ p → f (g p) == p f-g (ta , tb) = Trunc-elim {P = λ ta → f (g (ta , tb)) == (ta , tb)} (λ a → Trunc-elim {P = λ tb → f (g ([ a ] , tb)) == ([ a ] , tb)} (λ b → idp) tb) ta g-f : ∀ tab → g (f tab) == tab g-f = Trunc-elim {P = λ tab → g (f tab) == tab} (λ ab → idp) Trunc-×-conv : ∀ {i} {j} (n : ℕ₋₂) (A : Type i) (B : Type j) → Trunc n (A × B) == Trunc n A × Trunc n B Trunc-×-conv n A B = ua (Trunc-×-econv n A B)
{ "alphanum_fraction": 0.460669342, "avg_line_length": 38.6551204819, "ext": "agda", "hexsha": "1e7c1be664eaf0b53cc3021bfdb52d6a0d9fca69", "lang": "Agda", "max_forks_count": 50, "max_forks_repo_forks_event_max_datetime": "2022-02-14T03:03:25.000Z", "max_forks_repo_forks_event_min_datetime": "2015-01-10T01:48:08.000Z", "max_forks_repo_head_hexsha": "1037d82edcf29b620677a311dcfd4fc2ade2faa6", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "AntoineAllioux/HoTT-Agda", "max_forks_repo_path": "core/lib/types/Truncation.agda", "max_issues_count": 31, "max_issues_repo_head_hexsha": "1037d82edcf29b620677a311dcfd4fc2ade2faa6", "max_issues_repo_issues_event_max_datetime": "2021-10-03T19:15:25.000Z", "max_issues_repo_issues_event_min_datetime": "2015-03-05T20:09:00.000Z", "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "AntoineAllioux/HoTT-Agda", "max_issues_repo_path": "core/lib/types/Truncation.agda", "max_line_length": 121, "max_stars_count": 294, "max_stars_repo_head_hexsha": "1037d82edcf29b620677a311dcfd4fc2ade2faa6", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "AntoineAllioux/HoTT-Agda", "max_stars_repo_path": "core/lib/types/Truncation.agda", "max_stars_repo_stars_event_max_datetime": "2022-03-20T13:54:45.000Z", "max_stars_repo_stars_event_min_datetime": "2015-01-09T16:23:23.000Z", "num_tokens": 11666, "size": 25667 }
{-# OPTIONS --without-K --safe #-} module Definition.Typed.Consequences.Canonicity where open import Definition.Untyped open import Definition.Typed open import Definition.Typed.Weakening open import Definition.Typed.Properties open import Definition.Typed.EqRelInstance open import Definition.LogicalRelation open import Definition.LogicalRelation.Irrelevance open import Definition.LogicalRelation.ShapeView open import Definition.LogicalRelation.Fundamental.Reducibility open import Tools.Embedding open import Tools.Empty open import Tools.Nat open import Tools.Product -- Turns a natural number into its term representation sucᵏ : Nat → Term sucᵏ 0 = zero sucᵏ (1+ n) = suc (sucᵏ n) -- Helper function for canonicity for reducible natural properties canonicity″ : ∀ {t} → Natural-prop ε t → ∃ λ k → ε ⊢ t ≡ sucᵏ k ∷ ℕ canonicity″ (sucᵣ (ℕₜ n₁ d n≡n prop)) = let a , b = canonicity″ prop in 1+ a , suc-cong (trans (subset*Term (redₜ d)) b) canonicity″ zeroᵣ = 0 , refl (zeroⱼ ε) canonicity″ (ne (neNfₜ neK ⊢k k≡k)) = ⊥-elim (noNe ⊢k neK) -- Helper function for canonicity for specific reducible natural numbers canonicity′ : ∀ {t l} → ([ℕ] : ε ⊩⟨ l ⟩ℕ ℕ) → ε ⊩⟨ l ⟩ t ∷ ℕ / ℕ-intr [ℕ] → ∃ λ k → ε ⊢ t ≡ sucᵏ k ∷ ℕ canonicity′ (noemb [ℕ]) (ιx (ℕₜ n d n≡n prop)) = let a , b = canonicity″ prop in a , trans (subset*Term (redₜ d)) b canonicity′ (emb 0<1 [ℕ]) (ιx [t]) = canonicity′ [ℕ] [t] -- Canonicity of natural numbers canonicity : ∀ {t} → ε ⊢ t ∷ ℕ → ∃ λ k → ε ⊢ t ≡ sucᵏ k ∷ ℕ canonicity ⊢t with reducibleTerm ⊢t canonicity ⊢t | [ℕ] , [t] = canonicity′ (ℕ-elim [ℕ]) (irrelevanceTerm [ℕ] (ℕ-intr (ℕ-elim [ℕ])) [t])
{ "alphanum_fraction": 0.6635459333, "avg_line_length": 32.8653846154, "ext": "agda", "hexsha": "00135b0c9bd90ecf8ac47fa4bf52923045aeeb49", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "2251b8da423be0c6fb916f2675d7bd8537e4cd96", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "loic-p/logrel-mltt", "max_forks_repo_path": "Definition/Typed/Consequences/Canonicity.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "2251b8da423be0c6fb916f2675d7bd8537e4cd96", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "loic-p/logrel-mltt", "max_issues_repo_path": "Definition/Typed/Consequences/Canonicity.agda", "max_line_length": 74, "max_stars_count": null, "max_stars_repo_head_hexsha": "2251b8da423be0c6fb916f2675d7bd8537e4cd96", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "loic-p/logrel-mltt", "max_stars_repo_path": "Definition/Typed/Consequences/Canonicity.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 628, "size": 1709 }
open import Level using (Level) open import Function using (_∘_; id; flip) open import Data.Fin as Fin using (fromℕ) open import Data.Nat as Nat using (ℕ; suc; zero; pred; _+_; _⊔_) open import Data.Nat.Properties using (≤-decTotalOrder) open import Data.List as List using (List; []; _∷_; [_]; concatMap; _++_; length; map) open import Data.Vec as Vec using (Vec; []; _∷_; _∷ʳ_; reverse; initLast; toList) open import Data.Product as Prod using (∃; _×_; _,_; proj₁; proj₂) open import Data.Maybe as Maybe using (Maybe; just; nothing; maybe) open import Data.Sum as Sum using (_⊎_; inj₁; inj₂) open import Data.Integer as Int using (ℤ; -[1+_]; +_) renaming (_≟_ to _≟-Int_) open import Relation.Nullary using (Dec; yes; no) open import Relation.Nullary.Decidable using (map′) open import Relation.Binary using (module DecTotalOrder) open import Relation.Binary.PropositionalEquality using (_≡_; refl; cong; sym) open import Reflection renaming (Term to AgTerm; _≟_ to _≟-AgTerm_) module Auto.Core where open DecTotalOrder ≤-decTotalOrder using (total) private ∃-syntax : ∀ {a b} {A : Set a} → (A → Set b) → Set (b Level.⊔ a) ∃-syntax = ∃ syntax ∃-syntax (λ x → B) = ∃[ x ] B -- define error messages that may occur when the `auto` function is -- called. data Message : Set where searchSpaceExhausted : Message unsupportedSyntax : Message -- define our own instance of the error functor based on the either -- monad, and use it to propagate one of several error messages private Error : ∀ {a} (A : Set a) → Set a Error A = Message ⊎ A _⟨$⟩_ : ∀ {a b} {A : Set a} {B : Set b} (f : A → B) → Error A → Error B f ⟨$⟩ inj₁ x = inj₁ x f ⟨$⟩ inj₂ y = inj₂ (f y) -- define term names for the term language we'll be using for proof -- search; we use standard Agda names, together with term-variables -- and Agda implications/function types. data TermName : Set₀ where name : (n : Name) → TermName var : (i : ℤ) → TermName impl : TermName tname-injective : ∀ {x y} → TermName.name x ≡ TermName.name y → x ≡ y tname-injective refl = refl tvar-injective : ∀ {i j} → TermName.var i ≡ TermName.var j → i ≡ j tvar-injective refl = refl _≟-TermName_ : (x y : TermName) → Dec (x ≡ y) (name x) ≟-TermName (name y) with x ≟-Name y (name x) ≟-TermName (name .x) | yes refl = yes refl (name x) ≟-TermName (name y) | no x≠y = no (x≠y ∘ tname-injective) (name _) ≟-TermName (var _) = no (λ ()) (name _) ≟-TermName (impl ) = no (λ ()) (var _) ≟-TermName (name _) = no (λ ()) (var i) ≟-TermName (var j) with i ≟-Int j (var i) ≟-TermName (var .i) | yes refl = yes refl (var i) ≟-TermName (var j) | no i≠j = no (i≠j ∘ tvar-injective) (var _) ≟-TermName (impl ) = no (λ ()) (impl ) ≟-TermName (name _) = no (λ ()) (impl ) ≟-TermName (var _) = no (λ ()) (impl ) ≟-TermName (impl ) = yes refl -- define rule names for the proof terms/rules that our proof search will -- return/use; we'll use standard Agda names, together with rule-variables. data RuleName : Set where name : Name → RuleName var : ℕ → RuleName name-injective : ∀ {x y} → RuleName.name x ≡ name y → x ≡ y name-injective refl = refl rvar-injective : ∀ {x y} → RuleName.var x ≡ var y → x ≡ y rvar-injective refl = refl _≟-RuleName_ : (x y : RuleName) → Dec (x ≡ y) name x ≟-RuleName name y = map′ (cong name) name-injective (x ≟-Name y) name x ≟-RuleName var y = no (λ ()) var x ≟-RuleName name y = no (λ ()) var x ≟-RuleName var y = map′ (cong var) rvar-injective (x Nat.≟ y) -- now we can load the definitions from proof search open import ProofSearch RuleName TermName _≟-TermName_ Literal _≟-Lit_ as PS public renaming (Term to PsTerm; module Extensible to PsExtensible) -- next up, converting the terms returned by Agda's reflection -- mechanism to terms in our proof search's language! -- dictionary for the treatment of variables in conversion from Agda -- terms to terms to be used in proof search. ConvertVar : Set ConvertVar = (depth index : ℕ) → ∃ PsTerm -- conversion dictionary for rule-terms, which turns every variable -- that is within the scope of the term (i.e. is defined within the -- term by lambda abstraction) into a variable, and every variable -- which is defined out of scope into a Skolem constant (which -- blocks unification). convertVar4Term : ConvertVar convertVar4Term = fromVar where fromVar : (depth index : ℕ) → ∃ PsTerm fromVar d i with total i d fromVar d i | inj₁ i≤d = (suc (Δ i≤d) , var (fromℕ (Δ i≤d))) fromVar d i | inj₂ i>d = (0 , con (var (-[1+ Δ i>d ])) []) -- conversion dictionary for goal-terms, which turns all variables -- into Skolem constants which blocks all unification. convertVar4Goal : ConvertVar convertVar4Goal = fromVar where fromVar : (depth index : ℕ) → ∃ PsTerm fromVar d i with total i d fromVar d i | inj₁ i≤d = (0 , con (var (+ Δ i≤d)) []) fromVar d i | inj₂ i>d = (0 , con (var (-[1+ Δ i>d ])) []) -- helper function for converting definitions or constructors to -- proof terms. fromDefOrCon : (s : Name) → ∃[ n ] List (PsTerm n) → ∃ PsTerm fromDefOrCon f (n , ts) = n , con (name f) ts -- specialised function to convert literals of natural numbers -- (since they have a representation using Agda names) convertℕ : ∀ {k} → ℕ → PsTerm k convertℕ zero = con (name (quote zero)) [] convertℕ (suc n) = con (name (quote suc)) (convertℕ n ∷ []) -- convert an Agda term to a term, abstracting over the treatment of -- variables with an explicit dictionary of the type `ConvertVar`--- -- passing in `ConvertVar4Term` or `ConvertVar4Goal` will result in -- rule-terms or goal-terms, respectively. convert : ConvertVar → (depth : ℕ) → AgTerm → Error (∃ PsTerm) convertChildren : ConvertVar → ℕ → List (Arg AgTerm) → Error (∃[ n ] List (PsTerm n)) convert cv d (lit (nat n)) = inj₂ (0 , convertℕ n) convert cv d (lit l) = inj₂ (0 , lit l) convert cv d (var i []) = inj₂ (cv d i) convert cv d (var i args) = inj₁ unsupportedSyntax convert cv d (con c args) = fromDefOrCon c ⟨$⟩ convertChildren cv d args convert cv d (def f args) = fromDefOrCon f ⟨$⟩ convertChildren cv d args convert cv d (pi (arg (arg-info visible _) t₁) (abs _ t₂)) with convert cv d t₁ | convert cv (suc d) t₂ ... | inj₁ msg | _ = inj₁ msg ... | _ | inj₁ msg = inj₁ msg ... | inj₂ (n₁ , p₁) | inj₂ (n₂ , p₂) with match p₁ p₂ ... | (p₁′ , p₂′) = inj₂ (n₁ ⊔ n₂ , con impl (p₁′ ∷ p₂′ ∷ [])) convert cv d (pi (arg _ _) (abs _ t₂)) = convert cv (suc d) t₂ convert cv d (lam _ _) = inj₁ unsupportedSyntax convert cv d (pat-lam _ _) = inj₁ unsupportedSyntax convert cv d (sort _) = inj₁ unsupportedSyntax convert cv d unknown = inj₁ unsupportedSyntax convert cv d (meta x args) = inj₁ unsupportedSyntax convertChildren cv d [] = inj₂ (0 , []) convertChildren cv d (arg (arg-info visible _) t ∷ ts) with convert cv d t | convertChildren cv d ts ... | inj₁ msg | _ = inj₁ msg ... | _ | inj₁ msg = inj₁ msg ... | inj₂ (m , p) | inj₂ (n , ps) with match p ps ... | (p′ , ps′) = inj₂ (m ⊔ n , p′ ∷ ps′) convertChildren cv d (arg _ _ ∷ ts) = convertChildren cv d ts -- convert an Agda term to a rule-term. agda2term : AgTerm → Error (∃ PsTerm) agda2term t = convert convertVar4Term 0 t -- split a term at every occurrence of the `impl` constructor--- -- equivalent to splitting at every occurrence of the _→_ symbol in -- an Agda term. split : ∀ {n} → PsTerm n → ∃[ k ] Vec (PsTerm n) (suc k) split (con impl (t₁ ∷ t₂ ∷ [])) = Prod.map suc (λ ts → t₁ ∷ ts) (split t₂) split t = zero , t ∷ [] -- convert an Agda term to a goal-term, together with a `HintDB` -- representing the premises of the rule---this means that for a -- term of the type `A → B` this function will generate a goal of -- type `B` and a premise of type `A`. agda2goal×premises : AgTerm → Error (∃ PsTerm × Rules) agda2goal×premises t with convert convertVar4Goal 0 t ... | inj₁ msg = inj₁ msg ... | inj₂ (n , p) with split p ... | (k , ts) with initLast ts ... | (prems , goal , _) = inj₂ ((n , goal) , toPremises (pred k) prems) where toPremises : ∀ {k} → ℕ → Vec (PsTerm n) k → Rules toPremises i [] = [] toPremises i (t ∷ ts) = (n , rule (var i) t []) ∷ toPremises (pred i) ts -- convert an Agda name to an rule-term. name2term : Name → TC (Error (∃ PsTerm)) name2term nm = bindTC (getType nm) (λ tp → returnTC (agda2term tp)) -- convert an Agda name to a rule. name2ruleHelper : Name → (Error (∃ PsTerm)) → TC (Error (∃ Rule)) name2ruleHelper nm name2term_nm with name2term_nm ... | inj₁ msg = returnTC (inj₁ msg) ... | inj₂ (n , t) with split t ... | (k , ts) with initLast ts ... | (prems , concl , _) = returnTC (inj₂ (n , rule (name nm) concl (toList prems))) -- convert an Agda name to a rule. name2rule : Name → TC (Error (∃ Rule)) name2rule nm = bindTC (name2term nm) (name2ruleHelper nm) -- function which reifies untyped proof terms (from the -- `ProofSearch` module) to untyped Agda terms. reify : Proof → TC AgTerm reifyChildren : List Proof → TC (List (Arg AgTerm)) reify (con (var i) ps) = returnTC ((var i [])) reify (con (name n) ps) = bindTC (getDefinition n) (λ { (function x) → bindTC (reifyChildren ps) (λ rc → returnTC (def n rc)) ; (data-type pars cs) → bindTC (reifyChildren ps) ((λ rc → returnTC (con n rc))) ; (record′ c _) → returnTC unknown ; (constructor′ d ) → returnTC unknown ; axiom → returnTC unknown ; primitive′ → returnTC unknown} ) reifyChildren [] = returnTC [] reifyChildren (p ∷ ps) = bindTC (reify p) (λ rp → bindTC (reifyChildren ps) (λ rcps → returnTC (toArg rp ∷ rcps))) where toArg : AgTerm → Arg AgTerm toArg = arg (arg-info visible relevant) -- data-type `Exception` which is used to unquote error messages to -- the type-level so that `auto` can generate descriptive type-errors. data Exception : Message → Set where throw : (msg : Message) → Exception msg quoteError : Message → AgTerm quoteError (searchSpaceExhausted) = quoteTerm (throw searchSpaceExhausted) quoteError (unsupportedSyntax) = quoteTerm (throw unsupportedSyntax)
{ "alphanum_fraction": 0.61673188, "avg_line_length": 39.3186813187, "ext": "agda", "hexsha": "c7c5288e328ecb1f7caeba9e77b8f227be261f82", "lang": "Agda", "max_forks_count": 2, "max_forks_repo_forks_event_max_datetime": "2019-07-07T07:37:07.000Z", "max_forks_repo_forks_event_min_datetime": "2018-07-10T10:47:30.000Z", "max_forks_repo_head_hexsha": "f384b5c236645fcf8ab93179723a7355383a8716", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "wenkokke/AutoInAgda", "max_forks_repo_path": "src/Auto/Core.agda", "max_issues_count": 1, "max_issues_repo_head_hexsha": "f384b5c236645fcf8ab93179723a7355383a8716", "max_issues_repo_issues_event_max_datetime": "2017-11-06T16:49:27.000Z", "max_issues_repo_issues_event_min_datetime": "2017-11-03T09:46:19.000Z", "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "wenkokke/AutoInAgda", "max_issues_repo_path": "src/Auto/Core.agda", "max_line_length": 105, "max_stars_count": 22, "max_stars_repo_head_hexsha": "f384b5c236645fcf8ab93179723a7355383a8716", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "wenkokke/AutoInAgda", "max_stars_repo_path": "src/Auto/Core.agda", "max_stars_repo_stars_event_max_datetime": "2021-03-20T15:04:47.000Z", "max_stars_repo_stars_event_min_datetime": "2017-07-18T18:14:09.000Z", "num_tokens": 3503, "size": 10734 }
open import Categories open import Functors open import RMonads module RMonads.RKleisli.Adjunction {a b c d}{C : Cat {a}{b}}{D : Cat {c}{d}} {J : Fun C D}(M : RMonad J) where open import Library open import RMonads.RKleisli M open import RAdjunctions open import RMonads.RKleisli.Functors M open Cat open Fun open RMonad M KlAdj : RAdj J Kl KlAdj = record{ L = RKlL; R = RKlR; left = id; right = id; lawa = λ _ → refl; lawb = λ _ → refl; natleft = lem; natright = lem} where lem = λ {X}{X'}{Y}{Y'} (f : Hom C X' X) (g : Hom D (OMap J Y) (T Y')) h → proof comp D (bind g) (comp D h (HMap J f)) ≅⟨ cong (λ h₁ → comp D (bind g) (comp D h₁ (HMap J f))) (sym law2) ⟩ comp D (bind g) (comp D (comp D (bind h) η) (HMap J f)) ≅⟨ cong (comp D (bind g)) (ass D) ⟩ comp D (bind g) (comp D (bind h) (comp D η (HMap J f))) ∎
{ "alphanum_fraction": 0.5577342048, "avg_line_length": 26.2285714286, "ext": "agda", "hexsha": "d4f3bf7fc31ae947b89843cfcb13cf8ad4ba3670", "lang": "Agda", "max_forks_count": 1, "max_forks_repo_forks_event_max_datetime": "2019-11-04T21:33:13.000Z", "max_forks_repo_forks_event_min_datetime": "2019-11-04T21:33:13.000Z", "max_forks_repo_head_hexsha": "74707d3538bf494f4bd30263d2f5515a84733865", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "jmchapman/Relative-Monads", "max_forks_repo_path": "RMonads/RKleisli/Adjunction.agda", "max_issues_count": 3, "max_issues_repo_head_hexsha": "74707d3538bf494f4bd30263d2f5515a84733865", "max_issues_repo_issues_event_max_datetime": "2019-05-29T09:50:26.000Z", "max_issues_repo_issues_event_min_datetime": "2019-01-13T13:12:33.000Z", "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "jmchapman/Relative-Monads", "max_issues_repo_path": "RMonads/RKleisli/Adjunction.agda", "max_line_length": 77, "max_stars_count": 21, "max_stars_repo_head_hexsha": "74707d3538bf494f4bd30263d2f5515a84733865", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "jmchapman/Relative-Monads", "max_stars_repo_path": "RMonads/RKleisli/Adjunction.agda", "max_stars_repo_stars_event_max_datetime": "2021-02-13T18:02:18.000Z", "max_stars_repo_stars_event_min_datetime": "2015-07-30T01:25:12.000Z", "num_tokens": 365, "size": 918 }
open import Data.ByteString using ( ByteString ; Style ; strict ; lazy ) open import Data.ByteString.Primitive using ( strict₁ ; strict₂ ; lazy₁ ; lazy₂ ) open import Data.Bool using ( Bool ) open import Data.Char using ( Char ) open import Data.Nat using ( ℕ ) open import Data.Natural using ( Natural ; % ) open import Data.Product using ( _×_ ; _,_ ) open import Data.String using ( String ) open import Data.ByteString.UTF8.Primitive module Data.ByteString.UTF8 where toString : {s : Style} → (ByteString s) → String toString {lazy} = toStringLazy toString {strict} = toStringStrict fromString : {s : Style} → String → (ByteString s) fromString {lazy} = fromStringLazy fromString {strict} = fromStringStrict length : {s : Style} → (ByteString s) → Natural length {lazy} = lengthLazy length {strict} = lengthStrict size : {s : Style} → (ByteString s) → ℕ size bs = % (length bs) span : {s : Style} → (Char → Bool) → (ByteString s) → (ByteString s × ByteString s) span {lazy} φ bs with spanLazy φ bs span {lazy} φ bs | bs² = (lazy₁ bs² , lazy₂ bs²) span {strict} φ bs with spanStrict φ bs span {strict} φ bs | bs² = (strict₁ bs² , strict₂ bs²) break : {s : Style} → (Char → Bool) → (ByteString s) → (ByteString s × ByteString s) break {lazy} φ bs with breakLazy φ bs break {lazy} φ bs | bs² = (lazy₁ bs² , lazy₂ bs²) break {strict} φ bs with breakStrict φ bs break {strict} φ bs | bs² = (strict₁ bs² , strict₂ bs²)
{ "alphanum_fraction": 0.6888888889, "avg_line_length": 35.1219512195, "ext": "agda", "hexsha": "63fa08fa40ba9f13efc549638a1ac8c14d6efa53", "lang": "Agda", "max_forks_count": 2, "max_forks_repo_forks_event_max_datetime": "2022-03-12T11:40:23.000Z", "max_forks_repo_forks_event_min_datetime": "2017-08-10T06:12:54.000Z", "max_forks_repo_head_hexsha": "d06c219c7b7afc85aae3b1d4d66951b889aa7371", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "ilya-fiveisky/agda-system-io", "max_forks_repo_path": "src/Data/ByteString/UTF8.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "d06c219c7b7afc85aae3b1d4d66951b889aa7371", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "ilya-fiveisky/agda-system-io", "max_issues_repo_path": "src/Data/ByteString/UTF8.agda", "max_line_length": 84, "max_stars_count": 10, "max_stars_repo_head_hexsha": "d06c219c7b7afc85aae3b1d4d66951b889aa7371", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "ilya-fiveisky/agda-system-io", "max_stars_repo_path": "src/Data/ByteString/UTF8.agda", "max_stars_repo_stars_event_max_datetime": "2021-09-15T04:35:41.000Z", "max_stars_repo_stars_event_min_datetime": "2015-01-04T13:45:16.000Z", "num_tokens": 426, "size": 1440 }
{-# OPTIONS --without-K #-} module hott.types.nat where open import hott.core.universe open import hott.core.equality open import hott.functions data ℕ : Type₀ where zero : ℕ succ : ℕ → ℕ {-# BUILTIN NATURAL ℕ #-} -- Addition. _+_ : ℕ → ℕ → ℕ 0 + y = y succ x + y = succ (x + y) -- Multiplication _*_ : ℕ → ℕ → ℕ zero * y = zero succ x * y = y + (x * y) -- The interated fucntion iterate : ∀{ℓ} {A : Type ℓ} → (A → A) → ℕ → A → A iterate _ zero = id iterate f (succ n) = f ∘ iterate f n
{ "alphanum_fraction": 0.572815534, "avg_line_length": 17.7586206897, "ext": "agda", "hexsha": "b671dcb00184b0846b9078718d8000a1da9b4bd4", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "876ecdcfddca1abf499e8f00db321c6dc3d5b2bc", "max_forks_repo_licenses": [ "BSD-3-Clause" ], "max_forks_repo_name": "piyush-kurur/hott", "max_forks_repo_path": "agda/hott/types/nat.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "876ecdcfddca1abf499e8f00db321c6dc3d5b2bc", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "BSD-3-Clause" ], "max_issues_repo_name": "piyush-kurur/hott", "max_issues_repo_path": "agda/hott/types/nat.agda", "max_line_length": 49, "max_stars_count": null, "max_stars_repo_head_hexsha": "876ecdcfddca1abf499e8f00db321c6dc3d5b2bc", "max_stars_repo_licenses": [ "BSD-3-Clause" ], "max_stars_repo_name": "piyush-kurur/hott", "max_stars_repo_path": "agda/hott/types/nat.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 180, "size": 515 }
-- The "intro" command manages to refine goals of type ∞ A with the -- term ♯ ?. {-# OPTIONS --universe-polymorphism #-} module IntroSharp where postulate Level : Set zero : Level suc : (i : Level) → Level _⊔_ : Level -> Level -> Level {-# BUILTIN LEVEL Level #-} {-# BUILTIN LEVELZERO zero #-} {-# BUILTIN LEVELSUC suc #-} {-# BUILTIN LEVELMAX _⊔_ #-} postulate ∞ : ∀ {a} (A : Set a) → Set a ♯_ : ∀ {a} {A : Set a} → A → ∞ A ♭ : ∀ {a} {A : Set a} → ∞ A → A {-# BUILTIN INFINITY ∞ #-} {-# BUILTIN SHARP ♯_ #-} {-# BUILTIN FLAT ♭ #-} Foo : ∞ Set Foo = ?
{ "alphanum_fraction": 0.5259631491, "avg_line_length": 19.9, "ext": "agda", "hexsha": "65bb5f5c3ceb1f54e01b2b00796eaa5c9ea1e14a", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "20596e9dd9867166a64470dd24ea68925ff380ce", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "np/agda-git-experiment", "max_forks_repo_path": "test/interaction/IntroSharp.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "20596e9dd9867166a64470dd24ea68925ff380ce", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "np/agda-git-experiment", "max_issues_repo_path": "test/interaction/IntroSharp.agda", "max_line_length": 67, "max_stars_count": 1, "max_stars_repo_head_hexsha": "aa10ae6a29dc79964fe9dec2de07b9df28b61ed5", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "asr/agda-kanso", "max_stars_repo_path": "test/interaction/IntroSharp.agda", "max_stars_repo_stars_event_max_datetime": "2019-11-27T04:41:05.000Z", "max_stars_repo_stars_event_min_datetime": "2019-11-27T04:41:05.000Z", "num_tokens": 220, "size": 597 }
data _≡_ {A : Set}(x : A) : A → Set where refl : x ≡ x data * : Set where ! : * postulate prop : ∀ x → x ≡ ! record StrictTotalOrder : Set where field compare : * open StrictTotalOrder module M (Key : StrictTotalOrder) where postulate intersection′-₁ : ∀ x → x ≡ compare Key -- Doesn't termination check, but shouldn't get __IMPOSSIBLE__ -- when termination checking! to-∈-intersection′ : * → * → Set to-∈-intersection′ x h with intersection′-₁ x to-∈-intersection′ ._ h | refl with prop h to-∈-intersection′ ._ ._ | refl | refl = to-∈-intersection′ ! !
{ "alphanum_fraction": 0.6108374384, "avg_line_length": 23.4230769231, "ext": "agda", "hexsha": "c5f861f73809644bc58f98442646c60d8aca8939", "lang": "Agda", "max_forks_count": 371, "max_forks_repo_forks_event_max_datetime": "2022-03-30T19:00:30.000Z", "max_forks_repo_forks_event_min_datetime": "2015-01-03T14:04:08.000Z", "max_forks_repo_head_hexsha": "231d6ad8e77b67ff8c4b1cb35a6c31ccd988c3e9", "max_forks_repo_licenses": [ "BSD-3-Clause" ], "max_forks_repo_name": "Agda-zh/agda", "max_forks_repo_path": "test/Fail/Issue1035.agda", "max_issues_count": 4066, "max_issues_repo_head_hexsha": "ed8ac6f4062ea8a20fa0f62d5db82d4e68278338", "max_issues_repo_issues_event_max_datetime": "2022-03-31T21:14:49.000Z", "max_issues_repo_issues_event_min_datetime": "2015-01-10T11:24:51.000Z", "max_issues_repo_licenses": [ "BSD-3-Clause" ], "max_issues_repo_name": "shlevy/agda", "max_issues_repo_path": "test/Fail/Issue1035.agda", "max_line_length": 71, "max_stars_count": 1989, "max_stars_repo_head_hexsha": "ed8ac6f4062ea8a20fa0f62d5db82d4e68278338", "max_stars_repo_licenses": [ "BSD-3-Clause" ], "max_stars_repo_name": "shlevy/agda", "max_stars_repo_path": "test/Fail/Issue1035.agda", "max_stars_repo_stars_event_max_datetime": "2022-03-30T18:20:48.000Z", "max_stars_repo_stars_event_min_datetime": "2015-01-09T23:51:16.000Z", "num_tokens": 197, "size": 609 }
{-# OPTIONS --without-K --exact-split #-} module 04-inductive-types where import 03-natural-numbers open 03-natural-numbers public -- Section 4.2 The unit type -- Definition 4.2.1 data unit : UU lzero where star : unit 𝟙 = unit ind-unit : {i : Level} {P : unit → UU i} → P star → ((x : unit) → P x) ind-unit p star = p -- Section 4.3 The empty type -- Definition 4.3.1 data empty : UU lzero where 𝟘 = empty ind-empty : {i : Level} {P : empty → UU i} → ((x : empty) → P x) ind-empty () ex-falso : {i : Level} {P : empty → UU i} → ((x : empty) → P x) ex-falso = ind-empty ex-falso' : {i : Level} {A : UU i} → empty → A ex-falso' = ex-falso -- Definition 4.3.2 ¬ : {i : Level} → UU i → UU i ¬ A = A → empty -- Section 4.4 The booleans -- Definition 4.4.1 data bool : UU lzero where true false : bool -- Example 4.4.2 neg-𝟚 : bool → bool neg-𝟚 true = false neg-𝟚 false = true conjunction-𝟚 : bool → (bool → bool) conjunction-𝟚 true true = true conjunction-𝟚 true false = false conjunction-𝟚 false true = false conjunction-𝟚 false false = false disjunction-𝟚 : bool → (bool → bool) disjunction-𝟚 true true = true disjunction-𝟚 true false = true disjunction-𝟚 false true = true disjunction-𝟚 false false = false -- Section 4.5 Coproducts and the type of integers -- Definition 4.5.1 data coprod {i j : Level} (A : UU i) (B : UU j) : UU (i ⊔ j) where inl : A → coprod A B inr : B → coprod A B ind-coprod : {i j k : Level} {A : UU i} {B : UU j} (C : coprod A B → UU k) → ((x : A) → C (inl x)) → ((y : B) → C (inr y)) → (t : coprod A B) → C t ind-coprod C f g (inl x) = f x ind-coprod C f g (inr x) = g x -- Definition 4.5.2 -- The type of integers ℤ : UU lzero ℤ = coprod ℕ (coprod unit ℕ) -- Inclusion of the negative integers in-neg : ℕ → ℤ in-neg n = inl n -- Negative one neg-one-ℤ : ℤ neg-one-ℤ = in-neg zero-ℕ -- Zero zero-ℤ : ℤ zero-ℤ = inr (inl star) -- One one-ℤ : ℤ one-ℤ = inr (inr zero-ℕ) -- Inclusion of the positive integers in-pos : ℕ → ℤ in-pos n = inr (inr n) -- Lemma 4.5.3 {- We prove an induction principle for the integers. -} ind-ℤ : {i : Level} (P : ℤ → UU i) → P neg-one-ℤ → ((n : ℕ) → P (inl n) → P (inl (succ-ℕ n))) → P zero-ℤ → P one-ℤ → ((n : ℕ) → P (inr (inr (n))) → P (inr (inr (succ-ℕ n)))) → (k : ℤ) → P k ind-ℤ P p-1 p-S p0 p1 pS (inl zero-ℕ) = p-1 ind-ℤ P p-1 p-S p0 p1 pS (inl (succ-ℕ x)) = p-S x (ind-ℤ P p-1 p-S p0 p1 pS (inl x)) ind-ℤ P p-1 p-S p0 p1 pS (inr (inl star)) = p0 ind-ℤ P p-1 p-S p0 p1 pS (inr (inr zero-ℕ)) = p1 ind-ℤ P p-1 p-S p0 p1 pS (inr (inr (succ-ℕ x))) = pS x (ind-ℤ P p-1 p-S p0 p1 pS (inr (inr (x)))) -- Definition 4.5.4 succ-ℤ : ℤ → ℤ succ-ℤ (inl zero-ℕ) = zero-ℤ succ-ℤ (inl (succ-ℕ x)) = inl x succ-ℤ (inr (inl star)) = one-ℤ succ-ℤ (inr (inr x)) = inr (inr (succ-ℕ x)) -- Section 4.6 Dependent pair types -- Definition 4.6.1 data Σ {i j : Level} (A : UU i) (B : A → UU j) : UU (i ⊔ j) where pair : (x : A) → (B x → Σ A B) ind-Σ : {i j k : Level} {A : UU i} {B : A → UU j} {C : Σ A B → UU k} → ((x : A) (y : B x) → C (pair x y)) → ((t : Σ A B) → C t) ind-Σ f (pair x y) = f x y -- Definition 4.6.2 pr1 : {i j : Level} {A : UU i} {B : A → UU j} → Σ A B → A pr1 (pair a b) = a pr2 : {i j : Level} {A : UU i} {B : A → UU j} → (t : Σ A B) → B (pr1 t) pr2 (pair a b) = b -- Section 4.7 Cartesian products -- Definition 4.7.1 prod : {i j : Level} (A : UU i) (B : UU j) → UU (i ⊔ j) prod A B = Σ A (λ a → B) pair' : {i j : Level} {A : UU i} {B : UU j} → A → B → prod A B pair' = pair _×_ : {i j : Level} (A : UU i) (B : UU j) → UU (i ⊔ j) A × B = prod A B -- Exercises -- Exercise 4.2 {- In this exercise we were asked to show that (A + ¬A) implies (¬¬A → A). In other words, we get double negation elimination for the types that are decidable. -} is-decidable : {l : Level} (A : UU l) → UU l is-decidable A = coprod A (¬ A) double-negation-elim-is-decidable : {i : Level} (A : UU i) → is-decidable A → (¬ (¬ A) → A) double-negation-elim-is-decidable A (inl x) p = x double-negation-elim-is-decidable A (inr x) p = ind-empty (p x) neg-triple-neg : {l : Level} (A : UU l) → (¬ (¬ (¬ A))) → (¬ A) neg-triple-neg A f a = f (λ g → g a) -- Exercise 4.3 exclusive-disjunction-𝟚 : bool → (bool → bool) exclusive-disjunction-𝟚 true true = false exclusive-disjunction-𝟚 true false = true exclusive-disjunction-𝟚 false true = true exclusive-disjunction-𝟚 false false = false implication-𝟚 : bool → (bool → bool) implication-𝟚 true true = true implication-𝟚 true false = false implication-𝟚 false true = true implication-𝟚 false false = true bi-implication-𝟚 : bool → (bool → bool) bi-implication-𝟚 true true = true bi-implication-𝟚 true false = false bi-implication-𝟚 false true = false bi-implication-𝟚 false false = true peirce-arrow-𝟚 : bool → (bool → bool) peirce-arrow-𝟚 true true = false peirce-arrow-𝟚 true false = false peirce-arrow-𝟚 false true = false peirce-arrow-𝟚 false false = true sheffer-stroke-𝟚 : bool → (bool → bool) sheffer-stroke-𝟚 true true = false sheffer-stroke-𝟚 true false = true sheffer-stroke-𝟚 false true = true sheffer-stroke-𝟚 false false = true -- Exercise 4.4 pred-ℤ : ℤ → ℤ pred-ℤ (inl x) = inl (succ-ℕ x) pred-ℤ (inr (inl star)) = inl zero-ℕ pred-ℤ (inr (inr zero-ℕ)) = inr (inl star) pred-ℤ (inr (inr (succ-ℕ x))) = inr (inr x) -- Exercise 4.5 -- Addition on ℤ add-ℤ : ℤ → ℤ → ℤ add-ℤ (inl zero-ℕ) l = pred-ℤ l add-ℤ (inl (succ-ℕ x)) l = pred-ℤ (add-ℤ (inl x) l) add-ℤ (inr (inl star)) l = l add-ℤ (inr (inr zero-ℕ)) l = succ-ℤ l add-ℤ (inr (inr (succ-ℕ x))) l = succ-ℤ (add-ℤ (inr (inr x)) l) -- The negative of an integer neg-ℤ : ℤ → ℤ neg-ℤ (inl x) = inr (inr x) neg-ℤ (inr (inl star)) = inr (inl star) neg-ℤ (inr (inr x)) = inl x -- Multiplication on ℤ mul-ℤ : ℤ → ℤ → ℤ mul-ℤ (inl zero-ℕ) l = neg-ℤ l mul-ℤ (inl (succ-ℕ x)) l = add-ℤ (neg-ℤ l) (mul-ℤ (inl x) l) mul-ℤ (inr (inl star)) l = zero-ℤ mul-ℤ (inr (inr zero-ℕ)) l = l mul-ℤ (inr (inr (succ-ℕ x))) l = add-ℤ l (mul-ℤ (inr (inr x)) l) -- Exercise 4.6 Fibonacci-ℤ : ℤ → ℤ Fibonacci-ℤ (inl zero-ℕ) = one-ℤ Fibonacci-ℤ (inl (succ-ℕ zero-ℕ)) = neg-one-ℤ Fibonacci-ℤ (inl (succ-ℕ (succ-ℕ x))) = add-ℤ (Fibonacci-ℤ (inl x)) (neg-ℤ (Fibonacci-ℤ (inl (succ-ℕ x)))) Fibonacci-ℤ (inr (inl star)) = zero-ℤ Fibonacci-ℤ (inr (inr zero-ℕ)) = one-ℤ Fibonacci-ℤ (inr (inr (succ-ℕ zero-ℕ))) = one-ℤ Fibonacci-ℤ (inr (inr (succ-ℕ (succ-ℕ x)))) = add-ℤ (Fibonacci-ℤ (inr (inr x))) (Fibonacci-ℤ (inr (inr (succ-ℕ x)))) -- Exercise 4.7 {- In this exercise we were asked to show that 1 + 1 satisfies the induction principle of the booleans. In other words, type theory cannot distinguish the booleans from the type 1 + 1. We will see later that they are indeed equivalent types. -} t0 : coprod unit unit t0 = inl star t1 : coprod unit unit t1 = inr star ind-coprod-unit-unit : {i : Level} {P : coprod unit unit → UU i} → P t0 → P t1 → (x : coprod unit unit) → P x ind-coprod-unit-unit p0 p1 (inl star) = p0 ind-coprod-unit-unit p0 p1 (inr star) = p1 -- Exercise 4.8 -- Exercise 4.8(a) data list {l : Level} (A : UU l) : UU l where nil : list A cons : A → list A → list A in-list : {l : Level} {A : UU l} → A → list A in-list a = cons a nil -- Exercise 4.8(b) fold-list : {l1 l2 : Level} {A : UU l1} {B : UU l2} (b : B) (μ : A → (B → B)) → list A → B fold-list b μ nil = b fold-list b μ (cons a l) = μ a (fold-list b μ l) -- Exercise 4.8(c) length-list : {l : Level} {A : UU l} → list A → ℕ length-list = fold-list zero-ℕ (λ a → succ-ℕ) -- Exercise 4.8(d) sum-list-ℕ : list ℕ → ℕ sum-list-ℕ = fold-list zero-ℕ add-ℕ -- Exercise 4.8(e) concat-list : {l : Level} {A : UU l} → list A → (list A → list A) concat-list {l} {A} = fold-list id (λ a f → (cons a) ∘ f) -- Exercise 4.8(f) flatten-list : {l : Level} {A : UU l} → list (list A) → list A flatten-list = fold-list nil concat-list -- Exercise 4.8 (g) reverse-list : {l : Level} {A : UU l} → list A → list A reverse-list nil = nil reverse-list (cons a l) = concat-list (reverse-list l) (in-list a)
{ "alphanum_fraction": 0.5957420319, "avg_line_length": 24.1927710843, "ext": "agda", "hexsha": "5317aceb5ccc415befd8124af5c1fa3c1a8c50fb", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "09c710bf9c31ba88be144cc950bd7bc19c22a934", "max_forks_repo_licenses": [ "CC-BY-4.0" ], "max_forks_repo_name": "hemangandhi/HoTT-Intro", "max_forks_repo_path": "Agda/04-inductive-types.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "09c710bf9c31ba88be144cc950bd7bc19c22a934", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "CC-BY-4.0" ], "max_issues_repo_name": "hemangandhi/HoTT-Intro", "max_issues_repo_path": "Agda/04-inductive-types.agda", "max_line_length": 189, "max_stars_count": null, "max_stars_repo_head_hexsha": "09c710bf9c31ba88be144cc950bd7bc19c22a934", "max_stars_repo_licenses": [ "CC-BY-4.0" ], "max_stars_repo_name": "hemangandhi/HoTT-Intro", "max_stars_repo_path": "Agda/04-inductive-types.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 3563, "size": 8032 }
module Category where open import Logic.Equivalence open import Logic.Relations open Equivalence using () renaming (_==_ to eq) record Cat : Set2 where field Obj : Set1 _─→_ : Obj -> Obj -> Set id : {A : Obj} -> A ─→ A _∘_ : {A B C : Obj} -> B ─→ C -> A ─→ B -> A ─→ C Eq : {A B : Obj} -> Equivalence (A ─→ B) cong : {A B C : Obj}{f₁ f₂ : B ─→ C}{g₁ g₂ : A ─→ B} -> eq Eq f₁ f₂ -> eq Eq g₁ g₂ -> eq Eq (f₁ ∘ g₁) (f₂ ∘ g₂) idLeft : {A B : Obj}{f : A ─→ B} -> eq Eq (id ∘ f) f idRight : {A B : Obj}{f : A ─→ B} -> eq Eq (f ∘ id) f assoc : {A B C D : Obj}{f : C ─→ D}{g : B ─→ C}{h : A ─→ B} -> eq Eq ((f ∘ g) ∘ h) (f ∘ (g ∘ h)) module Category (ℂ : Cat) where private module CC = Cat ℂ open CC public hiding (_─→_; _∘_) private module Eq {A B : Obj} = Equivalence (Eq {A}{B}) open Eq public hiding (_==_) infix 20 _==_ infixr 30 _─→_ infixr 90 _∘_ _─→_ = CC._─→_ _==_ : {A B : Obj} -> Rel (A ─→ B) _==_ = Eq._==_ _∘_ : {A B C : Obj} -> B ─→ C -> A ─→ B -> A ─→ C _∘_ = CC._∘_ congL : {A B C : Obj}{f₁ f₂ : B ─→ C}{g : A ─→ B} -> f₁ == f₂ -> f₁ ∘ g == f₂ ∘ g congL p = cong p refl congR : {A B C : Obj}{f : B ─→ C}{g₁ g₂ : A ─→ B} -> g₁ == g₂ -> f ∘ g₁ == f ∘ g₂ congR p = cong refl p
{ "alphanum_fraction": 0.4476262246, "avg_line_length": 26.54, "ext": "agda", "hexsha": "ac19fede027bfb2c2331f926f80ed847a179b658", "lang": "Agda", "max_forks_count": 1, "max_forks_repo_forks_event_max_datetime": "2022-03-12T11:35:18.000Z", "max_forks_repo_forks_event_min_datetime": "2022-03-12T11:35:18.000Z", "max_forks_repo_head_hexsha": "70c8a575c46f6a568c7518150a1a64fcd03aa437", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "masondesu/agda", "max_forks_repo_path": "examples/outdated-and-incorrect/AIM6/Cat/Category.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "70c8a575c46f6a568c7518150a1a64fcd03aa437", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "masondesu/agda", "max_issues_repo_path": "examples/outdated-and-incorrect/AIM6/Cat/Category.agda", "max_line_length": 69, "max_stars_count": 1, "max_stars_repo_head_hexsha": "aa10ae6a29dc79964fe9dec2de07b9df28b61ed5", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "asr/agda-kanso", "max_stars_repo_path": "examples/outdated-and-incorrect/AIM6/Cat/Category.agda", "max_stars_repo_stars_event_max_datetime": "2019-11-27T04:41:05.000Z", "max_stars_repo_stars_event_min_datetime": "2019-11-27T04:41:05.000Z", "num_tokens": 604, "size": 1327 }
{-# OPTIONS --without-K --safe #-} module Magma.Bundles where open import Algebra.Bundles open import Algebra.Core open import Magma.Structures open import Relation.Binary open import Level record IdempotentMagma c ℓ : Set (suc (c ⊔ ℓ)) where infixl 7 _∙_ infix 4 _≈_ field Carrier : Set c _≈_ : Rel Carrier ℓ _∙_ : Op₂ Carrier isIdempotentMagma : IsIdempotentMagma _≈_ _∙_ open IsIdempotentMagma isIdempotentMagma public magma : Magma c ℓ magma = record { isMagma = isMagma } open Magma magma public using (rawMagma) record AlternateMagma c ℓ : Set (suc (c ⊔ ℓ)) where infixl 7 _∙_ infix 4 _≈_ field Carrier : Set c _≈_ : Rel Carrier ℓ _∙_ : Op₂ Carrier isAlternateMagma : IsAlternateMagma _≈_ _∙_ open IsAlternateMagma isAlternateMagma public magma : Magma c ℓ magma = record { isMagma = isMagma } open Magma magma public using (rawMagma) record FlexibleMagma c ℓ : Set (suc (c ⊔ ℓ)) where infixl 7 _∙_ infix 4 _≈_ field Carrier : Set c _≈_ : Rel Carrier ℓ _∙_ : Op₂ Carrier isFlexibleMagma : IsFlexibleMagma _≈_ _∙_ open IsFlexibleMagma isFlexibleMagma public magma : Magma c ℓ magma = record { isMagma = isMagma } open Magma magma public using (rawMagma) record MedialMagma c ℓ : Set (suc (c ⊔ ℓ)) where infixl 7 _∙_ infix 4 _≈_ field Carrier : Set c _≈_ : Rel Carrier ℓ _∙_ : Op₂ Carrier isMedialMagma : IsMedialMagma _≈_ _∙_ open IsMedialMagma isMedialMagma public magma : Magma c ℓ magma = record { isMagma = isMagma } open Magma magma public using (rawMagma) record SemimedialMagma c ℓ : Set (suc (c ⊔ ℓ)) where infixl 7 _∙_ infix 4 _≈_ field Carrier : Set c _≈_ : Rel Carrier ℓ _∙_ : Op₂ Carrier isSemimedialMagma : IsSemimedialMagma _≈_ _∙_ open IsSemimedialMagma isSemimedialMagma public magma : Magma c ℓ magma = record { isMagma = isMagma } open Magma magma public using (rawMagma) record LeftUnitalMagma c ℓ : Set (suc (c ⊔ ℓ)) where infixl 7 _∙_ infix 4 _≈_ field Carrier : Set c _≈_ : Rel Carrier ℓ _∙_ : Op₂ Carrier ε : Carrier isLeftUnitalMagma : IsLeftUnitalMagma _≈_ _∙_ ε open IsLeftUnitalMagma isLeftUnitalMagma public magma : Magma c ℓ magma = record { isMagma = isMagma } open Magma magma public using (rawMagma) record RightUnitalMagma c ℓ : Set (suc (c ⊔ ℓ)) where infixl 7 _∙_ infix 4 _≈_ field Carrier : Set c _≈_ : Rel Carrier ℓ _∙_ : Op₂ Carrier ε : Carrier isRightUnitalMagma : IsRightUnitalMagma _≈_ _∙_ ε open IsRightUnitalMagma isRightUnitalMagma public magma : Magma c ℓ magma = record { isMagma = isMagma } open Magma magma public using (rawMagma)
{ "alphanum_fraction": 0.6525245442, "avg_line_length": 21.4436090226, "ext": "agda", "hexsha": "18608b8e57adf4b5a29c02ab9f26ebdea686e5b1", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "443e831e536b756acbd1afd0d6bae7bc0d288048", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "Akshobhya1234/agda-NonAssociativeAlgebra", "max_forks_repo_path": "src/Magma/Bundles.agda", "max_issues_count": 2, "max_issues_repo_head_hexsha": "443e831e536b756acbd1afd0d6bae7bc0d288048", "max_issues_repo_issues_event_max_datetime": "2021-10-09T08:24:56.000Z", "max_issues_repo_issues_event_min_datetime": "2021-10-04T05:30:30.000Z", "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "Akshobhya1234/agda-NonAssociativeAlgebra", "max_issues_repo_path": "src/Magma/Bundles.agda", "max_line_length": 54, "max_stars_count": 2, "max_stars_repo_head_hexsha": "443e831e536b756acbd1afd0d6bae7bc0d288048", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "Akshobhya1234/agda-NonAssociativeAlgebra", "max_stars_repo_path": "src/Magma/Bundles.agda", "max_stars_repo_stars_event_max_datetime": "2021-08-17T09:14:03.000Z", "max_stars_repo_stars_event_min_datetime": "2021-08-15T06:16:13.000Z", "num_tokens": 1072, "size": 2852 }
------------------------------------------------------------------------------ -- Exercises for Type Theory CM0859 (Prof. Andreas Abel). -- http://www1.eafit.edu.co/asr/courses/type-theory-CM0859/exercises.pdf ------------------------------------------------------------------------------ open import Data.PropFormula 2 public ex1 : ∀ {φ} → ∅ ⊢ φ ⊃ φ ex1 {φ} = ⊃-intro (assume {Γ = ∅} φ) ex2 : ∀ {φ ψ} → ∅ ⊢ (φ ∧ (φ ⊃ ψ)) ⊃ ψ ex2 {φ}{ψ} = ⊃-intro $ ⊃-elim (∧-proj₂ $ assume {Γ = ∅} (φ ∧ (φ ⊃ ψ))) (∧-proj₁ $ assume {Γ = ∅} (φ ∧ (φ ⊃ ψ))) ex3 : ∀ {φ ψ γ} → ∅ ⊢ (φ ∧ (ψ ∨ γ)) ⊃ ((φ ∧ ψ) ∨ (φ ∧ γ)) ex3 {φ}{ψ}{γ} = ⊃-intro $ ⊃-elim (⊃-intro $ ∨-elim {Γ = ∅ , (φ ∧ (ψ ∨ γ))} (∨-intro₁ (φ ∧ γ) $ ∧-intro (∧-proj₁ $ weaken ψ $ assume {Γ = ∅} (φ ∧ (ψ ∨ γ))) (assume {Γ = ∅ , (φ ∧ (ψ ∨ γ)) } ψ)) (∨-intro₂ (φ ∧ ψ) $ ∧-intro (∧-proj₁ $ weaken γ $ assume {Γ = ∅} (φ ∧ (ψ ∨ γ))) (assume {Γ = ∅ , (φ ∧ (ψ ∨ γ))} γ ))) (∧-proj₂ $ assume {Γ = ∅} (φ ∧ (ψ ∨ γ))) ex4 : ∀ {φ ψ} → ∅ ⊢ (¬ φ ∨ ψ) ⊃ (φ ⊃ ψ) ex4 {φ}{ψ} = ⊃-intro $ ∨-elim {Γ = ∅} (⊃-intro $ ⊥-elim {Γ = ∅ , ¬ φ , φ} ψ (¬-elim (weaken φ $ assume {Γ = ∅} (¬ φ)) (assume {Γ = ∅ , ¬ φ} φ))) (⊃-intro $ weaken φ $ assume {Γ = ∅} ψ) ex5 : ∀ {φ ψ} → ∅ ⊢ ¬ (φ ∨ ψ) ⊃ (¬ φ ∧ ¬ ψ) ex5 {φ}{ψ} = ⊃-intro $ ∧-intro (¬-intro $ ¬-elim (weaken φ $ assume {Γ = ∅} (¬ (φ ∨ ψ))) (∨-intro₁ ψ $ assume {Γ = ∅ , ¬ (φ ∨ ψ)} φ)) (¬-intro $ ¬-elim (weaken ψ $ assume {Γ = ∅} (¬ (φ ∨ ψ))) (∨-intro₂ φ $ assume {Γ = ∅ , ¬ (φ ∨ ψ)} ψ)) ¬¬EM : ∀ {Γ} {φ} → Γ ⊢ ¬ ¬ (φ ∨ ¬ φ) ¬¬EM {Γ}{φ} = ¬-intro $ ¬-elim (assume {Γ = Γ} (¬ (φ ∨ ¬ φ))) PEM RAA⊃EM : ∀ {Γ} {φ} → Γ ⊢ φ ∨ ¬ φ RAA⊃EM {Γ}{φ} = RAA (¬-elim (¬¬EM {Γ = Γ , ¬ (φ ∨ ¬ φ)} ) (assume {Γ = Γ} (¬ (φ ∨ ¬ φ)))) EM⊃Pierce : ∀ {Γ} {φ ψ} → Γ ⊢ ((φ ⊃ ψ) ⊃ φ) ⊃ φ EM⊃Pierce {Γ}{φ}{ψ} = ⊃-elim (⊃-intro (∨-elim {Γ = Γ} (⊃-intro (weaken ((φ ⊃ ψ) ⊃ φ) (assume {Γ = Γ} φ))) (⊃-intro (⊃-elim (assume {Γ = Γ , ¬ φ} ((φ ⊃ ψ) ⊃ φ)) (⊃-intro (⊥-elim ψ (¬-elim (weaken φ (weaken ((φ ⊃ ψ) ⊃ φ) (assume {Γ = Γ} (¬ φ)))) (assume {Γ = Γ , ¬ φ , (φ ⊃ ψ) ⊃ φ} φ)))) )))) PEM postulate RAA' : ∀ {Γ} {φ} → Γ ⊢ ( ¬ φ ⊃ φ) ⊃ φ RAA'⊃RAA : ∀ {Γ}{φ} → Γ ⊢ ¬ (¬ φ) ⊃ φ RAA'⊃RAA {Γ}{φ} = ⊃-intro (⊃-elim RAA' (⊃-intro (⊥-elim φ (¬-elim (weaken (¬ φ) (assume {Γ = Γ } ( ¬ (¬ φ)))) (assume {Γ = Γ , ¬ (¬ φ) } (¬ φ))) ))) postulate Pierce : ∀ {Γ} {φ} {ψ} → Γ ⊢ ((φ ⊃ ψ) ⊃ φ) ⊃ φ Pierce⊃RAA' : ∀ {Γ}{φ} → Γ ⊢ ( ¬ φ ⊃ φ ) ⊃ φ Pierce⊃RAA' {Γ}{φ} = ⊃-intro $ ⊃-elim (Pierce {Γ = Γ , ¬ φ ⊃ φ} {φ = φ} {ψ = ⊥}) (⊃-intro $ ⊃-elim (weaken (φ ⊃ ⊥) $ assume {Γ = Γ} ((¬ φ) ⊃ φ)) (¬-equiv₂ $ assume {Γ = Γ , (¬ φ) ⊃ φ} (φ ⊃ ⊥) ) )
{ "alphanum_fraction": 0.2780979827, "avg_line_length": 21.0303030303, "ext": "agda", "hexsha": "ba0b8f09cee8ff5ecaf2a03acd00879648da8c85", "lang": "Agda", "max_forks_count": 2, "max_forks_repo_forks_event_max_datetime": "2017-12-01T17:01:25.000Z", "max_forks_repo_forks_event_min_datetime": "2017-03-30T16:41:56.000Z", "max_forks_repo_head_hexsha": "a1730062a6aaced2bb74878c1071db06477044ae", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "jonaprieto/agda-prop", "max_forks_repo_path": "test/ex-andreas-abel.agda", "max_issues_count": 18, "max_issues_repo_head_hexsha": "a1730062a6aaced2bb74878c1071db06477044ae", "max_issues_repo_issues_event_max_datetime": "2017-12-18T16:34:21.000Z", "max_issues_repo_issues_event_min_datetime": "2017-03-08T14:33:10.000Z", "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "jonaprieto/agda-prop", "max_issues_repo_path": "test/ex-andreas-abel.agda", "max_line_length": 78, "max_stars_count": 13, "max_stars_repo_head_hexsha": "a1730062a6aaced2bb74878c1071db06477044ae", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "jonaprieto/agda-prop", "max_stars_repo_path": "test/ex-andreas-abel.agda", "max_stars_repo_stars_event_max_datetime": "2022-01-17T03:33:12.000Z", "max_stars_repo_stars_event_min_datetime": "2017-05-01T16:45:41.000Z", "num_tokens": 1552, "size": 3470 }
{-# OPTIONS --cubical --safe #-} module Relation.Nullary.Decidable where open import Relation.Nullary.Decidable.Base public
{ "alphanum_fraction": 0.7698412698, "avg_line_length": 21, "ext": "agda", "hexsha": "17cd2016d9a799b298eea4c2b23dc7876fb5ab1a", "lang": "Agda", "max_forks_count": 1, "max_forks_repo_forks_event_max_datetime": "2021-01-05T14:05:30.000Z", "max_forks_repo_forks_event_min_datetime": "2021-01-05T14:05:30.000Z", "max_forks_repo_head_hexsha": "3c176d4690566d81611080e9378f5a178b39b851", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "oisdk/combinatorics-paper", "max_forks_repo_path": "agda/Relation/Nullary/Decidable.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "3c176d4690566d81611080e9378f5a178b39b851", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "oisdk/combinatorics-paper", "max_issues_repo_path": "agda/Relation/Nullary/Decidable.agda", "max_line_length": 50, "max_stars_count": 4, "max_stars_repo_head_hexsha": "3c176d4690566d81611080e9378f5a178b39b851", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "oisdk/combinatorics-paper", "max_stars_repo_path": "agda/Relation/Nullary/Decidable.agda", "max_stars_repo_stars_event_max_datetime": "2021-01-05T15:32:14.000Z", "max_stars_repo_stars_event_min_datetime": "2021-01-05T14:07:44.000Z", "num_tokens": 27, "size": 126 }
module Selective.Examples.TestChannel where open import Selective.Libraries.Channel open import Prelude open import Debug open import Data.Nat.Show using (show) ℕ-ReplyMessage : MessageType ℕ-ReplyMessage = ValueType UniqueTag ∷ [ ValueType ℕ ]ˡ ℕ-Reply : InboxShape ℕ-Reply = [ ℕ-ReplyMessage ]ˡ ℕ×ℕ→ℕ-Message : MessageType ℕ×ℕ→ℕ-Message = ValueType UniqueTag ∷ ReferenceType ℕ-Reply ∷ ValueType ℕ ∷ [ ValueType ℕ ]ˡ Calculate : InboxShape Calculate = [ ℕ×ℕ→ℕ-Message ]ˡ CalculateProtocol : ChannelInitiation CalculateProtocol = record { request = Calculate ; response = record { channel-shape = ℕ-Reply ; all-tagged = (HasTag _) ∷ [] } ; request-tagged = [ HasTag+Ref _ ]ᵃ } ℕ×ℕ→ℕ-ci : ChannelInitiation ℕ×ℕ→ℕ-ci = record { request = Calculate ; response = record { channel-shape = ℕ-Reply ; all-tagged = (HasTag _) ∷ [] } ; request-tagged = (HasTag+Ref _) ∷ [] } Calculator : InboxShape Calculator = ℕ×ℕ→ℕ-Message ∷ [ ℕ×ℕ→ℕ-Message ]ˡ calculator-actor : ∀ {i} → ∞ActorM (↑ i) Calculator (Lift (lsuc lzero) ⊤) [] (λ _ → []) calculator-actor .force = receive ∞>>= λ { (Msg Z (tag ∷ _ ∷ n ∷ m ∷ [])) .force → Z ![t: Z ] (lift tag ∷ [ lift (n + m) ]ᵃ) ∞>> (do strengthen [] calculator-actor) ; (Msg (S Z) (tag ∷ _ ∷ n ∷ m ∷ [])) .force → (Z ![t: Z ] (lift tag ∷ ([ lift (n * m) ]ᵃ))) ∞>> (do (strengthen []) calculator-actor) ; (Msg (S (S ())) _) } TestBox : InboxShape TestBox = ℕ-Reply calculator-test-actor : ∀{i} → ∞ActorM i TestBox (Lift (lsuc lzero) ℕ) [] (λ _ → []) calculator-test-actor = do spawn∞ calculator-actor let add-request = (record { var = Z ; chosen-field = Z ; fields = lift 32 ∷ [ lift 10 ]ᵃ ; session = record { can-request = [ Z ]ᵐ -- Pick add method ; response-session = record { can-receive = [ Z ]ᵐ ; tag = 0 } } }) add-rs = add-request .session .response-session initiate-channel _ add-request Msg Z (_ ∷ n ∷ []) ← from-channel (CalculateProtocol .response) add-rs where Msg (S ()) _ let mult-request = (record { var = Z ; chosen-field = Z ; fields = lift n ∷ [ lift 10 ]ᵃ ; session = record { can-request = [ S Z ]ᵐ -- Pick multiply method ; response-session = record { can-receive = [ Z ]ᵐ ; tag = 1 } } }) mult-rs = add-rs = mult-request .session .response-session Msg Z (_ ∷ m ∷ []) ← from-channel (CalculateProtocol .response) mult-rs where Msg (S ()) _ debug (show m) (strengthen []) return m
{ "alphanum_fraction": 0.5597785978, "avg_line_length": 28.829787234, "ext": "agda", "hexsha": "16ecc6417da178d3809fcb8734a279e8f823454d", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "ae541df13d069df4eb1464f29fbaa9804aad439f", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "Zalastax/singly-typed-actors", "max_forks_repo_path": "src/Selective/Examples/TestChannel.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "ae541df13d069df4eb1464f29fbaa9804aad439f", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "Zalastax/singly-typed-actors", "max_issues_repo_path": "src/Selective/Examples/TestChannel.agda", "max_line_length": 92, "max_stars_count": 1, "max_stars_repo_head_hexsha": "ae541df13d069df4eb1464f29fbaa9804aad439f", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "Zalastax/thesis", "max_stars_repo_path": "src/Selective/Examples/TestChannel.agda", "max_stars_repo_stars_event_max_datetime": "2018-02-02T16:44:43.000Z", "max_stars_repo_stars_event_min_datetime": "2018-02-02T16:44:43.000Z", "num_tokens": 874, "size": 2710 }
{-# OPTIONS --safe --experimental-lossy-unification #-} module Cubical.Algebra.Polynomials.Multivariate.EquivCarac.A[X]X-A where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Function open import Cubical.Foundations.Equiv open import Cubical.Foundations.Isomorphism open import Cubical.Data.Nat open import Cubical.Data.Vec open import Cubical.Data.Sigma open import Cubical.Data.FinData open import Cubical.Algebra.DirectSum.DirectSumHIT.Base open import Cubical.Algebra.Ring open import Cubical.Algebra.CommRing open import Cubical.Algebra.CommRing.FGIdeal open import Cubical.Algebra.CommRing.QuotientRing open import Cubical.Algebra.CommRing.Instances.Int renaming (ℤCommRing to ℤCR) open import Cubical.Algebra.CommRing.Instances.Polynomials.MultivariatePoly renaming (PolyCommRing to A[X1,···,Xn] ; Poly to A[x1,···,xn]) open import Cubical.Algebra.CommRing.Instances.Polynomials.MultivariatePoly-Quotient open import Cubical.Algebra.CommRing.Instances.Polynomials.MultivariatePoly-notationZ open import Cubical.Relation.Nullary open import Cubical.HITs.SetQuotients as SQ open import Cubical.HITs.PropositionalTruncation as PT private variable ℓ : Level ----------------------------------------------------------------------------- -- Functions module Properties-Equiv-QuotientXn-A (Ar@(A , Astr) : CommRing ℓ) where private A[X] : CommRing ℓ A[X] = A[X1,···,Xn] Ar 1 A[x] : Type ℓ A[x] = A[x1,···,xn] Ar 1 A[X]/X : CommRing ℓ A[X]/X = A[X1,···,Xn]/<Xkʲ> Ar 1 0 1 A[x]/x : Type ℓ A[x]/x = A[x1,···,xn]/<xkʲ> Ar 1 0 1 open CommRingStr Astr using () renaming ( 0r to 0A ; 1r to 1A ; _+_ to _+A_ ; -_ to -A_ ; _·_ to _·A_ ; +Assoc to +AAssoc ; +IdL to +AIdL ; +IdR to +AIdR ; +InvL to +AInvL ; +InvR to +AInvR ; +Comm to +AComm ; ·Assoc to ·AAssoc ; ·IdL to ·AIdL ; ·IdR to ·AIdR ; ·DistR+ to ·ADistR+ ; ·DistL+ to ·ADistL+ ; is-set to isSetA ) open CommRingStr (snd A[X] ) using () renaming ( 0r to 0PA ; 1r to 1PA ; _+_ to _+PA_ ; -_ to -PA_ ; _·_ to _·PA_ ; +Assoc to +PAAssoc ; +IdL to +PAIdL ; +IdR to +PAIdR ; +InvL to +PAInvL ; +InvR to +PAInvR ; +Comm to +PAComm ; ·Assoc to ·PAAssoc ; ·IdL to ·PAIdL ; ·IdR to ·PAIdR ; ·Comm to ·PAComm ; ·DistR+ to ·PADistR+ ; ·DistL+ to ·PADistL+ ; is-set to isSetPA ) open CommRingStr (snd A[X]/X) using () renaming ( 0r to 0PAI ; 1r to 1PAI ; _+_ to _+PAI_ ; -_ to -PAI_ ; _·_ to _·PAI_ ; +Assoc to +PAIAssoc ; +IdL to +PAIIdL ; +IdR to +PAIIdR ; +InvL to +PAIInvL ; +InvR to +PAIInvR ; +Comm to +PAIComm ; ·Assoc to ·PAIAssoc ; ·IdL to ·PAIIdL ; ·IdR to ·PAIIdR ; ·DistR+ to ·PAIDistR+ ; ·DistL+ to ·PAIDistL+ ; is-set to isSetPAI ) open RingTheory ----------------------------------------------------------------------------- -- Direct sens A[x]→A : A[x] → A A[x]→A = DS-Rec-Set.f _ _ _ _ isSetA 0A base-trad _+A_ +AAssoc +AIdR +AComm base-neutral-eq base-add-eq where base-trad : _ base-trad (zero ∷ []) a = a base-trad (suc k ∷ []) a = 0A base-neutral-eq : _ base-neutral-eq (zero ∷ []) = refl base-neutral-eq (suc k ∷ []) = refl base-add-eq : _ base-add-eq (zero ∷ []) a b = refl base-add-eq (suc k ∷ []) a b = +AIdR _ A[x]→A-pres1 : A[x]→A 1PA ≡ 1A A[x]→A-pres1 = refl A[x]→A-pres+ : (x y : A[x]) → (A[x]→A (x +PA y)) ≡ A[x]→A x +A A[x]→A y A[x]→A-pres+ x y = refl A[x]→A-pres· : (x y : A[x]) → (A[x]→A (x ·PA y)) ≡ A[x]→A x ·A A[x]→A y A[x]→A-pres· = DS-Ind-Prop.f _ _ _ _ (λ x u v i y → isSetA _ _ (u y) (v y) i) (λ y → sym (0LeftAnnihilates (CommRing→Ring Ar) _)) (λ v a → DS-Ind-Prop.f _ _ _ _ (λ _ → isSetA _ _) (sym (0RightAnnihilates (CommRing→Ring Ar) _)) (λ v' a' → base-eq a a' v v') (λ {U V} ind-U ind-V → cong₂ _+A_ ind-U ind-V ∙ sym (·ADistR+ _ _ _))) λ {U V} ind-U ind-V y → cong₂ _+A_ (ind-U y) (ind-V y) ∙ sym (·ADistL+ _ _ _) where base-eq : (a a' : A) → (v v' : Vec ℕ 1) → (A[x]→A (base v a ·PA base v' a')) ≡ A[x]→A (base v a) ·A A[x]→A (base v' a') base-eq a a' (zero ∷ []) (zero ∷ []) = refl base-eq a a' (zero ∷ []) (suc k' ∷ []) = sym (0RightAnnihilates (CommRing→Ring Ar) _) base-eq a a' (suc k ∷ []) (k' ∷ []) = sym (0LeftAnnihilates (CommRing→Ring Ar) _) A[X]→A : CommRingHom A[X] Ar fst A[X]→A = A[x]→A snd A[X]→A = makeIsRingHom A[x]→A-pres1 A[x]→A-pres+ A[x]→A-pres· A[x]→A-cancel : (k : Fin 1) → A[x]→A (<Xkʲ> Ar 1 0 1 k) ≡ 0A A[x]→A-cancel zero = refl A[X]/X→A : CommRingHom A[X]/X Ar A[X]/X→A = Quotient-FGideal-CommRing-CommRing.inducedHom A[X] Ar A[X]→A (<Xkʲ> Ar 1 0 1) A[x]→A-cancel A[x]/x→A : A[x]/x → A A[x]/x→A = fst A[X]/X→A ----------------------------------------------------------------------------- -- Converse sens A→A[x] : A → A[x] A→A[x] a = base (0 ∷ []) a A→A[x]-pres+ : (a a' : A) → A→A[x] (a +A a') ≡ A→A[x] a +PA A→A[x] a' A→A[x]-pres+ a a' = sym (base-add (0 ∷ []) a a') A→A[x]/x : A → A[x]/x A→A[x]/x = [_] ∘ A→A[x] A→A[x]/x-pres+ : (a a' : A) → A→A[x]/x (a +A a') ≡ A→A[x]/x a +PAI A→A[x]/x a' A→A[x]/x-pres+ a a' = cong [_] (A→A[x]-pres+ a a') ----------------------------------------------------------------------------- -- Section sens e-sect : (a : A) → A[x]→A (A→A[x] a) ≡ a e-sect a = refl ----------------------------------------------------------------------------- -- Retraction sens open IsRing e-retr : (x : A[x]/x) → A→A[x]/x (A[x]/x→A x) ≡ x e-retr = SQ.elimProp (λ x → isSetPAI _ _) (DS-Ind-Prop.f _ _ _ _ (λ x → isSetPAI _ _) (cong [_] (base-neutral _)) (λ v a → base-eq a v) λ {U V} ind-U ind-V → cong [_] ((A→A[x]-pres+ _ _)) ∙ cong₂ _+PAI_ ind-U ind-V) where base-eq : (a : A) → (v : Vec ℕ 1) → A→A[x]/x (A[x]/x→A [ (base v a) ]) ≡ [ (base v a) ] base-eq a (zero ∷ []) = cong [_] refl base-eq a (suc k ∷ []) = eq/ (base (0 ∷ []) 0A) (base (suc k ∷ []) a) ∣ ((λ x → base (k ∷ []) (-A a)) , helper) ∣₁ where helper : _ helper = cong (λ X → X +PA base (suc k ∷ []) (-A a)) (base-neutral _) ∙ +PAIdL _ ∙ sym (+PAIdR _ ∙ cong₂ base (cong (λ X → X ∷ []) (+-suc _ _ ∙ +-zero _)) (·AIdR _)) module _ (Ar@(A , Astr) : CommRing ℓ) where open Iso open Properties-Equiv-QuotientXn-A Ar Equiv-A[X]/X-A : CommRingEquiv (A[X1,···,Xn]/<Xkʲ> Ar 1 0 1) Ar fst Equiv-A[X]/X-A = isoToEquiv is where is : Iso (A[x1,···,xn]/<xkʲ> Ar 1 0 1) A fun is = A[x]/x→A inv is = A→A[x]/x rightInv is = e-sect leftInv is = e-retr snd Equiv-A[X]/X-A = snd A[X]/X→A Equiv-ℤ[X]/X-ℤ : RingEquiv (CommRing→Ring ℤ[X]/X) (CommRing→Ring ℤCR) Equiv-ℤ[X]/X-ℤ = Equiv-A[X]/X-A ℤCR
{ "alphanum_fraction": 0.4793759915, "avg_line_length": 30.256, "ext": "agda", "hexsha": "691607d68a3afd7984f57e30362b27eaf1bb67e2", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "58c0b83bb0fed0dc683f3d29b1709effe51c1689", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "thomas-lamiaux/cubical", "max_forks_repo_path": "Cubical/Algebra/Polynomials/Multivariate/EquivCarac/A[X]X-A.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "58c0b83bb0fed0dc683f3d29b1709effe51c1689", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "thomas-lamiaux/cubical", "max_issues_repo_path": "Cubical/Algebra/Polynomials/Multivariate/EquivCarac/A[X]X-A.agda", "max_line_length": 131, "max_stars_count": null, "max_stars_repo_head_hexsha": "58c0b83bb0fed0dc683f3d29b1709effe51c1689", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "thomas-lamiaux/cubical", "max_stars_repo_path": "Cubical/Algebra/Polynomials/Multivariate/EquivCarac/A[X]X-A.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 2926, "size": 7564 }
open import x1-Base module x4-Nat where data ℕ : Set where zero : ℕ suc : ℕ → ℕ {-# BUILTIN NATURAL ℕ #-} data _≤_ : Rel ℕ where z≤n : ∀ {x} → zero ≤ x s≤s : ∀ {x y} → x ≤ y → suc x ≤ suc y ≤-suc : ∀ {x y} → suc x ≤ suc y → x ≤ y ≤-suc (s≤s x≤y) = x≤y _≤?_ : Decidable _≤_ zero ≤? _ = left z≤n suc _ ≤? zero = right λ() suc x ≤? suc y with x ≤? y ... | left x≤y = left (s≤s x≤y) ... | right x>y = right (λ sx≤sy → x>y (≤-suc sx≤sy)) open import x3-PropositionalEquality using (_≡_; refl; cong; equivalence) antisym : ∀ {x y} → x ≤ y → y ≤ x → x ≡ y antisym z≤n z≤n = refl antisym (s≤s x≤y) (s≤s y≤x) = cong suc (antisym x≤y y≤x) trans : ∀ {x y z} → x ≤ y → y ≤ z → x ≤ z trans z≤n _ = z≤n trans (s≤s x≤y) (s≤s y≤z) = s≤s (trans x≤y y≤z) total : ∀ x y → Either (x ≤ y) (y ≤ x) total zero _ = left z≤n total (suc x) zero = right z≤n total (suc x) (suc y) with total x y ... | left x≤y = left (s≤s x≤y) ... | right y≤x = right (s≤s y≤x) reflexive : ∀ {x y} → x ≡ y → x ≤ y reflexive {zero} refl = z≤n reflexive {suc _} refl = s≤s (reflexive refl) totalOrder : TotalOrder _≡_ _≤_ totalOrder = record { antisym = antisym ; trans = trans ; total = total ; reflexive = reflexive ; equivalence = equivalence }
{ "alphanum_fraction": 0.4970760234, "avg_line_length": 24.4285714286, "ext": "agda", "hexsha": "6cbd099bd646bad9274e6d75322d1b26e2cb3880", "lang": "Agda", "max_forks_count": 8, "max_forks_repo_forks_event_max_datetime": "2021-09-21T15:58:10.000Z", "max_forks_repo_forks_event_min_datetime": "2015-04-13T21:40:15.000Z", "max_forks_repo_head_hexsha": "3dc7abca7ad868316bb08f31c77fbba0d3910225", "max_forks_repo_licenses": [ "Unlicense" ], "max_forks_repo_name": "haroldcarr/learn-haskell-coq-ml-etc", "max_forks_repo_path": "agda/topic/order/2013-04-01-sorting-francesco-mazzo/x4-Nat.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "3dc7abca7ad868316bb08f31c77fbba0d3910225", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "Unlicense" ], "max_issues_repo_name": "haroldcarr/learn-haskell-coq-ml-etc", "max_issues_repo_path": "agda/topic/order/2013-04-01-sorting-francesco-mazzo/x4-Nat.agda", "max_line_length": 73, "max_stars_count": 36, "max_stars_repo_head_hexsha": "3dc7abca7ad868316bb08f31c77fbba0d3910225", "max_stars_repo_licenses": [ "Unlicense" ], "max_stars_repo_name": "haroldcarr/learn-haskell-coq-ml-etc", "max_stars_repo_path": "agda/topic/order/2013-04-01-sorting-francesco-mazzo/x4-Nat.agda", "max_stars_repo_stars_event_max_datetime": "2021-07-30T06:55:03.000Z", "max_stars_repo_stars_event_min_datetime": "2015-01-29T14:37:15.000Z", "num_tokens": 620, "size": 1368 }
{-# OPTIONS --cubical --safe #-} module Control.Monad.Levels.Zipping where open import Prelude open import Control.Monad.Levels.Definition open import Control.Monad.Levels.Eliminators open import Data.Bag open import Path.Reasoning open import Cubical.Foundations.HLevels using (isOfHLevelΠ) zip₂-alg : Levels-ϕ[ A ](⟅ A ⟆ → (Levels A → Levels A) → Levels A) [ zip₂-alg ]-set = isOfHLevelΠ 2 λ _ → isOfHLevelΠ 2 λ _ → trunc [ zip₂-alg ] y ∷ ys ⟨ _ ⟩ x xs = (x ∪ y) ∷ xs ys [ zip₂-alg ][] x xs = x ∷ xs [] [ zip₂-alg ]-trail i x xs = ∪-idʳ x i ∷ xs [] zip₂-alg-id : Levels-ψ[ xs ⦂ A ]≡ ((zip₂-alg ↓ xs) [] id ⊜ xs) ⟦ zip₂-alg-id ⟧≡ x ∷ xs ⟨ Pxs ⟩ = refl ⟦ zip₂-alg-id ⟧≡[] = trail zip-alg : Levels-ϕ[ A ] (Levels A → Levels A) [ zip-alg ]-set = isOfHLevelΠ 2 λ _ → trunc [ zip-alg ] x ∷ _ ⟨ k ⟩ ys = (zip₂-alg ↓ ys) x k [ zip-alg ][] ys = ys [ zip-alg ]-trail = funExt (zip₂-alg-id ⇓≡_) zip : Levels A → Levels A → Levels A zip xs = zip-alg ↓ xs zip-idʳ : Levels-ψ[ xs ⦂ A ]≡ zip xs [] ⊜ xs ⟦ zip-idʳ ⟧≡ x ∷ xs ⟨ Pxs ⟩ = cong (x ∷_) Pxs ⟦ zip-idʳ ⟧≡[] = refl mutual zip₂-comm : (x : ⟅ A ⟆) (xs : Levels A) (pxs : ∀ ys → zip xs ys ≡ zip ys xs) → Levels-ψ[ ys ⦂ A ]≡ (zip (x ∷ xs) ys ⊜ zip ys (x ∷ xs)) ⟦ zip₂-comm x xs pxs ⟧≡[] = zip-idʳ ⇓≡ (x ∷ xs) ⟦ zip₂-comm x xs pxs ⟧≡ y ∷ ys ⟨ Pys ⟩ = cong₂ _∷_ (∪-comm x y) (pxs ys) zip-comm : Levels-ψ[ xs ⦂ A ] (∀ ys → zip xs ys ≡ zip ys xs) ∥ zip-comm ∥-prop = isOfHLevelΠ 1 λ _ → trunc _ _ ∥ zip-comm ∥[] ys = sym (zip-idʳ ⇓≡ ys) ∥ zip-comm ∥ x ∷ xs ⟨ Pxs ⟩ ys = zip₂-comm x xs Pxs ⇓≡ ys zip₃-assoc : (x : ⟅ A ⟆) (xs : Levels A) (pxs : ∀ ys zs → zip (zip xs ys) zs ≡ zip xs (zip ys zs)) → (y : ⟅ A ⟆) (ys : Levels A) → Levels-ψ[ zs ⦂ A ]≡ (zip (zip (x ∷ xs) (y ∷ ys)) zs ⊜ zip (x ∷ xs) (zip (y ∷ ys) zs)) ⟦ zip₃-assoc x xs pxs y ys ⟧≡[] = (zip-idʳ ⇓≡ (zip (x ∷ xs) (y ∷ ys))) ; cong (zip (x ∷ xs)) (sym (zip-idʳ ⇓≡ (y ∷ ys))) ⟦ zip₃-assoc x xs pxs y ys ⟧≡ z ∷ zs ⟨ _ ⟩ = cong₂ _∷_ (∪-assoc x y z) (pxs ys zs) zip₂-assoc : (x : ⟅ A ⟆) (xs : Levels A) (pxs : ∀ ys zs → zip (zip xs ys) zs ≡ zip xs (zip ys zs)) → Levels-ψ[ ys ⦂ A ] (∀ zs → zip (zip (x ∷ xs) ys) zs ≡ zip (x ∷ xs) (zip ys zs)) ∥ zip₂-assoc x xs pxs ∥-prop = isOfHLevelΠ 1 λ _ → trunc _ _ ∥ zip₂-assoc x xs pxs ∥[] zs = cong (λ xs → zip xs zs) (zip-idʳ ⇓≡ (x ∷ xs)) ∥ zip₂-assoc x xs pxs ∥ y ∷ ys ⟨ _ ⟩ zs = zip₃-assoc x xs pxs y ys ⇓≡ zs zip-assoc : Levels-ψ[ xs ⦂ A ] (∀ ys zs → zip (zip xs ys) zs ≡ zip xs (zip ys zs)) ∥ zip-assoc ∥-prop = isOfHLevelΠ 1 λ _ → isOfHLevelΠ 1 λ _ → trunc _ _ ∥ zip-assoc ∥ x ∷ xs ⟨ Pxs ⟩ ys zs = ∥ zip₂-assoc x xs Pxs ∥⇓ ys zs ∥ zip-assoc ∥[] _ _ = refl open import Algebra module _ {a} {A : Type a} where levels-cmon : CommutativeMonoid a Monoid.𝑆 (CommutativeMonoid.monoid levels-cmon) = Levels A Monoid._∙_ (CommutativeMonoid.monoid levels-cmon) = zip Monoid.ε (CommutativeMonoid.monoid levels-cmon) = [] Monoid.assoc (CommutativeMonoid.monoid levels-cmon) = ∥ zip-assoc ∥⇓ Monoid.ε∙ (CommutativeMonoid.monoid levels-cmon) _ = refl Monoid.∙ε (CommutativeMonoid.monoid levels-cmon) xs = zip-idʳ ⇓≡ xs CommutativeMonoid.comm levels-cmon = ∥ zip-comm ∥⇓
{ "alphanum_fraction": 0.5745752045, "avg_line_length": 42.3733333333, "ext": "agda", "hexsha": "32cdd89613d5b94598a1dcb6f9ed574ea7863bea", "lang": "Agda", "max_forks_count": 1, "max_forks_repo_forks_event_max_datetime": "2021-11-11T12:30:21.000Z", "max_forks_repo_forks_event_min_datetime": "2021-11-11T12:30:21.000Z", "max_forks_repo_head_hexsha": "97a3aab1282b2337c5f43e2cfa3fa969a94c11b7", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "oisdk/agda-playground", "max_forks_repo_path": "Control/Monad/Levels/Zipping.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "97a3aab1282b2337c5f43e2cfa3fa969a94c11b7", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "oisdk/agda-playground", "max_issues_repo_path": "Control/Monad/Levels/Zipping.agda", "max_line_length": 137, "max_stars_count": 6, "max_stars_repo_head_hexsha": "97a3aab1282b2337c5f43e2cfa3fa969a94c11b7", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "oisdk/agda-playground", "max_stars_repo_path": "Control/Monad/Levels/Zipping.agda", "max_stars_repo_stars_event_max_datetime": "2021-11-16T08:11:34.000Z", "max_stars_repo_stars_event_min_datetime": "2020-09-11T17:45:41.000Z", "num_tokens": 1447, "size": 3178 }
{-# OPTIONS --cubical --safe #-} module Data.Binary where open import Data.Binary.Base public using (𝔹; ⟦_⇑⟧; ⟦_⇓⟧; _+_; _*_; _-_)
{ "alphanum_fraction": 0.6148148148, "avg_line_length": 19.2857142857, "ext": "agda", "hexsha": "bad2ce5e784cac88ede6ca6c4243f2b9b58a3ad4", "lang": "Agda", "max_forks_count": 1, "max_forks_repo_forks_event_max_datetime": "2021-01-05T14:05:30.000Z", "max_forks_repo_forks_event_min_datetime": "2021-01-05T14:05:30.000Z", "max_forks_repo_head_hexsha": "3c176d4690566d81611080e9378f5a178b39b851", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "oisdk/combinatorics-paper", "max_forks_repo_path": "agda/Data/Binary.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "3c176d4690566d81611080e9378f5a178b39b851", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "oisdk/combinatorics-paper", "max_issues_repo_path": "agda/Data/Binary.agda", "max_line_length": 38, "max_stars_count": 4, "max_stars_repo_head_hexsha": "3c176d4690566d81611080e9378f5a178b39b851", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "oisdk/combinatorics-paper", "max_stars_repo_path": "agda/Data/Binary.agda", "max_stars_repo_stars_event_max_datetime": "2021-01-05T15:32:14.000Z", "max_stars_repo_stars_event_min_datetime": "2021-01-05T14:07:44.000Z", "num_tokens": 55, "size": 135 }
{-# OPTIONS --warning=error --safe --without-K #-} open import Functions.Definition open import Groups.Definition open import Groups.Homomorphisms.Definition open import Setoids.Setoids open import Sets.EquivalenceRelations open import Groups.Lemmas open import Groups.QuotientGroup.Definition open import Groups.Homomorphisms.Lemmas module Groups.QuotientGroup.Lemmas {a b c d : _} {A : Set a} {B : Set b} {S : Setoid {a} {c} A} {T : Setoid {b} {d} B} {_+A_ : A → A → A} {_+B_ : B → B → B} (G : Group S _+A_) (H : Group T _+B_) {f : A → B} (fHom : GroupHom G H f) where quotientGroupLemma : {a b c d : _} {A : Set a} {B : Set b} {S : Setoid {a} {c} A} {T : Setoid {b} {d} B} {_·A_ : A → A → A} {_·B_ : B → B → B} (G : Group S _·A_) {H : Group T _·B_} → {underf : A → B} → (f : GroupHom G H underf) → {x y : A} → Setoid._∼_ T (underf x) (underf y) → Setoid._∼_ (quotientGroupSetoid G f) x y quotientGroupLemma {S = S} {T = T} G {H = H} fHom {x} {y} fx=fy = transitive (GroupHom.groupHom fHom) (transitive (Group.+WellDefined H (Equivalence.reflexive (Setoid.eq T)) (homRespectsInverse fHom)) (transferToRight'' H fx=fy)) where open Group G open Setoid T open Equivalence eq quotientGroupLemma' : {a b c d : _} {A : Set a} {B : Set b} {S : Setoid {a} {c} A} {T : Setoid {b} {d} B} {_·A_ : A → A → A} {_·B_ : B → B → B} (G : Group S _·A_) {H : Group T _·B_} → {underf : A → B} → (f : GroupHom G H underf) → {x y : A} → Setoid._∼_ (quotientGroupSetoid G f) x y → Setoid._∼_ T (underf x) (underf y) quotientGroupLemma' {S = S} {T = T} G {H = H} f fx=fy = transferToRight H (transitive (transitive (Group.+WellDefined H (Equivalence.reflexive (Setoid.eq T)) (symmetric (homRespectsInverse f))) (symmetric (GroupHom.groupHom f))) fx=fy) where open Group G open Setoid T open Equivalence eq projectionMapIsGroupHom : GroupHom G (quotientGroupByHom G fHom) id GroupHom.groupHom projectionMapIsGroupHom {x} {y} = quotientGroupLemma G fHom (Equivalence.reflexive (Setoid.eq T)) GroupHom.wellDefined projectionMapIsGroupHom x=y = quotientGroupLemma G fHom (GroupHom.wellDefined fHom x=y)
{ "alphanum_fraction": 0.6611374408, "avg_line_length": 68.064516129, "ext": "agda", "hexsha": "0a2655affb28e60a5ada668fc56ff49f4ea2e526", "lang": "Agda", "max_forks_count": 1, "max_forks_repo_forks_event_max_datetime": "2021-11-29T13:23:07.000Z", "max_forks_repo_forks_event_min_datetime": "2021-11-29T13:23:07.000Z", "max_forks_repo_head_hexsha": "0f4230011039092f58f673abcad8fb0652e6b562", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "Smaug123/agdaproofs", "max_forks_repo_path": "Groups/QuotientGroup/Lemmas.agda", "max_issues_count": 14, "max_issues_repo_head_hexsha": "0f4230011039092f58f673abcad8fb0652e6b562", "max_issues_repo_issues_event_max_datetime": "2020-04-11T11:03:39.000Z", "max_issues_repo_issues_event_min_datetime": "2019-01-06T21:11:59.000Z", "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "Smaug123/agdaproofs", "max_issues_repo_path": "Groups/QuotientGroup/Lemmas.agda", "max_line_length": 320, "max_stars_count": 4, "max_stars_repo_head_hexsha": "0f4230011039092f58f673abcad8fb0652e6b562", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "Smaug123/agdaproofs", "max_stars_repo_path": "Groups/QuotientGroup/Lemmas.agda", "max_stars_repo_stars_event_max_datetime": "2022-01-28T06:04:15.000Z", "max_stars_repo_stars_event_min_datetime": "2019-08-08T12:44:19.000Z", "num_tokens": 789, "size": 2110 }
-- {-# OPTIONS -v import:10 -v scope:10 #-} module Issue1078 where import Common.Level import Issue1078.A import Issue1078.B -- Was: weird scope error in Issue1078.B -- Should give error: -- You tried to load Issue1078/B.agda -- which defines the module Issue1078.A. However, according to the -- include path this module should be defined in Issue1078/A.agda.
{ "alphanum_fraction": 0.7417582418, "avg_line_length": 24.2666666667, "ext": "agda", "hexsha": "737cef30846ce4b2d3dcd75f14f44a8d319562c5", "lang": "Agda", "max_forks_count": 371, "max_forks_repo_forks_event_max_datetime": "2022-03-30T19:00:30.000Z", "max_forks_repo_forks_event_min_datetime": "2015-01-03T14:04:08.000Z", "max_forks_repo_head_hexsha": "7f58030124fa99dfbf8db376659416f3ad8384de", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "cruhland/agda", "max_forks_repo_path": "test/Fail/Issue1078.agda", "max_issues_count": 4066, "max_issues_repo_head_hexsha": "7f58030124fa99dfbf8db376659416f3ad8384de", "max_issues_repo_issues_event_max_datetime": "2022-03-31T21:14:49.000Z", "max_issues_repo_issues_event_min_datetime": "2015-01-10T11:24:51.000Z", "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "cruhland/agda", "max_issues_repo_path": "test/Fail/Issue1078.agda", "max_line_length": 66, "max_stars_count": 1989, "max_stars_repo_head_hexsha": "7f58030124fa99dfbf8db376659416f3ad8384de", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "cruhland/agda", "max_stars_repo_path": "test/Fail/Issue1078.agda", "max_stars_repo_stars_event_max_datetime": "2022-03-30T18:20:48.000Z", "max_stars_repo_stars_event_min_datetime": "2015-01-09T23:51:16.000Z", "num_tokens": 98, "size": 364 }
------------------------------------------------------------------------ -- Laws related to return⋆ ------------------------------------------------------------------------ module TotalParserCombinators.Laws.ReturnStar where open import Algebra open import Category.Monad open import Codata.Musical.Notation open import Data.List import Data.List.Categorical open import Data.List.Relation.Binary.BagAndSetEquality as Eq using (bag) renaming (_∼[_]_ to _List-∼[_]_) open import Function open import Level private module BagMonoid {A : Set} = CommutativeMonoid (Eq.commutativeMonoid bag A) open module ListMonad = RawMonad {f = zero} Data.List.Categorical.monad using () renaming (_⊛_ to _⊛′_; _>>=_ to _>>=′_) open import TotalParserCombinators.Derivative using (D) open import TotalParserCombinators.Congruence hiding (fail) import TotalParserCombinators.Laws.AdditiveMonoid as AdditiveMonoid open import TotalParserCombinators.Laws.Derivative open import TotalParserCombinators.Lib open import TotalParserCombinators.Parser -- return⋆ preserves equality. cong : ∀ {k Tok R} {xs₁ xs₂ : List R} → xs₁ List-∼[ k ] xs₂ → return⋆ {Tok = Tok} xs₁ ∼[ k ]P return⋆ xs₂ cong {xs₁ = xs₁} {xs₂} xs₁≈xs₂ = xs₁≈xs₂ ∷ λ t → ♯ ( D t (return⋆ xs₁) ≅⟨ D-return⋆ xs₁ ⟩ fail ≅⟨ sym $ D-return⋆ xs₂ ⟩ D t (return⋆ xs₂) ∎) -- return⋆ is homomorphic with respect to _++_/_∣_. distrib-∣ : ∀ {Tok R} (xs₁ xs₂ : List R) → return⋆ {Tok = Tok} (xs₁ ++ xs₂) ≅P return⋆ xs₁ ∣ return⋆ xs₂ distrib-∣ xs₁ xs₂ = BagMonoid.refl ∷ λ t → ♯ ( D t (return⋆ (xs₁ ++ xs₂)) ≅⟨ D-return⋆ (xs₁ ++ xs₂) ⟩ fail ≅⟨ sym $ AdditiveMonoid.left-identity fail ⟩ fail ∣ fail ≅⟨ sym $ D-return⋆ xs₁ ∣ D-return⋆ xs₂ ⟩ D t (return⋆ xs₁) ∣ D t (return⋆ xs₂) ∎) -- return⋆ is homomorphic with respect to _⊛′_/_⊛_. distrib-⊛ : ∀ {Tok R₁ R₂} (fs : List (R₁ → R₂)) xs → return⋆ {Tok = Tok} (fs ⊛′ xs) ≅P return⋆ fs ⊛ return⋆ xs distrib-⊛ fs xs = BagMonoid.refl ∷ λ t → ♯ ( D t (return⋆ (fs ⊛′ xs)) ≅⟨ D-return⋆ (fs ⊛′ xs) ⟩ fail ≅⟨ sym $ AdditiveMonoid.left-identity fail ⟩ fail ∣ fail ≅⟨ sym $ left-zero-⊛ (return⋆ xs) ∣ right-zero-⊛ (return⋆ fs) ⟩ fail ⊛ return⋆ xs ∣ return⋆ fs ⊛ fail ≅⟨ sym $ [ ○ - ○ - ○ - ○ ] D-return⋆ fs ⊛ (return⋆ xs ∎) ∣ [ ○ - ○ - ○ - ○ ] return⋆ fs ∎ ⊛ D-return⋆ xs ⟩ D t (return⋆ fs) ⊛ return⋆ xs ∣ return⋆ fs ⊛ D t (return⋆ xs) ≅⟨ sym $ D-⊛ (return⋆ fs) (return⋆ xs) ⟩ D t (return⋆ fs ⊛ return⋆ xs) ∎) -- return⋆ is homomorphic with respect to _>>=′_/_>>=_. distrib->>= : ∀ {Tok R₁ R₂} xs (f : R₁ → List R₂) → return⋆ {Tok = Tok} (xs >>=′ f) ≅P return⋆ xs >>= (return⋆ ∘ f) distrib->>= xs f = BagMonoid.refl ∷ λ t → ♯ ( D t (return⋆ (xs >>=′ f)) ≅⟨ D-return⋆ (xs >>=′ f) ⟩ fail ≅⟨ sym $ AdditiveMonoid.left-identity fail ⟩ fail ∣ fail ≅⟨ sym $ left-zero->>= (return⋆ ∘ f) ∣ right-zero->>= (return⋆ xs) ⟩ fail >>= (return⋆ ∘ f) ∣ return⋆ xs >>= (λ _ → fail) ≅⟨ sym $ [ ○ - ○ - ○ - ○ ] D-return⋆ xs >>= (λ x → return⋆ (f x) ∎) ∣ [ ○ - ○ - ○ - ○ ] return⋆ xs ∎ >>= (λ x → D-return⋆ (f x)) ⟩ D t (return⋆ xs) >>= (return⋆ ∘ f) ∣ return⋆ xs >>= (λ x → D t (return⋆ (f x))) ≅⟨ sym $ D->>= (return⋆ xs) (return⋆ ∘ f) ⟩ D t (return⋆ xs >>= (return⋆ ∘ f)) ∎)
{ "alphanum_fraction": 0.4880319149, "avg_line_length": 40, "ext": "agda", "hexsha": "22b17a03b41880725c723b0795dfa7c90256bcd0", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "76774f54f466cfe943debf2da731074fe0c33644", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "nad/parser-combinators", "max_forks_repo_path": "TotalParserCombinators/Laws/ReturnStar.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "76774f54f466cfe943debf2da731074fe0c33644", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "nad/parser-combinators", "max_issues_repo_path": "TotalParserCombinators/Laws/ReturnStar.agda", "max_line_length": 117, "max_stars_count": 1, "max_stars_repo_head_hexsha": "76774f54f466cfe943debf2da731074fe0c33644", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "nad/parser-combinators", "max_stars_repo_path": "TotalParserCombinators/Laws/ReturnStar.agda", "max_stars_repo_stars_event_max_datetime": "2020-07-03T08:56:13.000Z", "max_stars_repo_stars_event_min_datetime": "2020-07-03T08:56:13.000Z", "num_tokens": 1424, "size": 3760 }
module Esterel.Lang.CanFunction.Plug where open import Data.Nat using (_+_ ; suc) open import Function using (_∋_ ; _∘_ ; id ; _$_) open import Data.Nat.Properties.Simple using ( +-comm ; +-assoc) open import utility open import Esterel.Lang open import Esterel.Lang.Properties open import Esterel.Lang.CanFunction open import Esterel.Environment as Env open import Esterel.Context open import Esterel.Context.Properties open import Data.Product open import Data.Sum open import Data.Bool open import Data.List using ([] ; [_] ; _∷_ ; List ; _++_) open import Relation.Nullary open import Relation.Binary.PropositionalEquality using (_≡_ ; refl ; sym ; subst ; cong ; trans ; module ≡-Reasoning ; cong₂ ; subst₂ ; inspect) open import Data.Empty open import Esterel.Lang.Binding open import Data.Maybe using ( nothing ; just ) open import Data.List.Any open import Data.List.Any.Properties renaming (++⁺ˡ to ++ˡ ; ++⁺ʳ to ++ʳ ) open import Esterel.Lang.CanFunction.SetSigMonotonic open ≡-Reasoning using (_≡⟨_⟩_ ; _≡⟨⟩_ ; _∎) open import Relation.Nullary.Decidable using (⌊_⌋) open import Data.FiniteMap import Data.OrderedListMap as OMap open import Data.Nat as Nat using (ℕ) open import Esterel.Variable.Signal as Signal using (Signal ; _ₛ ; _≟ₛₜ_) open import Esterel.Variable.Shared as SharedVar using (SharedVar ; _ₛₕ) open import Esterel.Variable.Sequential as SeqVar using (SeqVar ; _ᵥ) open import Esterel.CompletionCode as Code renaming (CompletionCode to Code) open import Data.OrderedListMap Signal Signal.unwrap Signal.Status as SigM open import Data.OrderedListMap SharedVar SharedVar.unwrap (Σ SharedVar.Status (λ _ → ℕ)) as ShrM open import Data.OrderedListMap SeqVar SeqVar.unwrap ℕ as SeqM open ListSet Code._≟_ module NSet = ListSet Nat._≟_ canθₖ-plug : ∀ S' sigs → ∀ C p q → (Canₖq⊆Canₖp : ∀ θ k → k ∈ (Canₖ q θ) → k ∈ (Canₖ p θ)) → (Canₛq⊆Canₛp : ∀ θ S → S ∈ (Canₛ q θ) → S ∈ (Canₛ p θ)) → (∀ θ k → k ∈ (Canθₖ sigs S' (C ⟦ q ⟧c) θ) → k ∈ (Canθₖ sigs S' (C ⟦ p ⟧c) θ)) canθₛ-plug : ∀ S' sigs → ∀ C p q → (Canₛq⊆Canₛp : ∀ θ S → S ∈ (Canₛ q θ) → S ∈ (Canₛ p θ)) → (Canₖq⊆Canₖp : ∀ θ k → k ∈ (Canₖ q θ) → k ∈ (Canₖ p θ)) → (∀ θ k → k ∈ (Canθₛ sigs S' (C ⟦ q ⟧c) θ) → k ∈ (Canθₛ sigs S' (C ⟦ p ⟧c) θ)) canθₛₕ-plug : ∀ S' sigs → ∀ C p q → (Canₛₕq⊆Canₛₕp : ∀ θ → (Canₛₕ q θ) ⊆¹ (Canₛₕ p θ)) → (Canₛq⊆Canₛp : ∀ θ k → k ∈ (Canₖ q θ) → k ∈ (Canₖ p θ)) → (Canₖq⊆Canₖp : ∀ θ S → S ∈ (Canₛ q θ) → S ∈ (Canₛ p θ)) → (∀ θ k → k ∈ (Canθₛₕ sigs S' (C ⟦ q ⟧c) θ) → k ∈ (Canθₛₕ sigs S' (C ⟦ p ⟧c) θ)) canₛₕ-plug : ∀ C p q → (Canₛₕq⊆Canₛₕp : ∀ θ → (Canₛₕ q θ) ⊆¹ (Canₛₕ p θ)) → (∀ θ k → k ∈ (Canₖ q θ) → k ∈ (Canₖ p θ)) → (Canₛq⊆Canₛp : ∀ θ → (Canₛ q θ) ⊆¹ (Canₛ p θ)) → (∀ θ → (Canₛₕ (C ⟦ q ⟧c) θ) ⊆¹ (Canₛₕ (C ⟦ p ⟧c) θ)) canₖ-plug : ∀ C p q → (Canₖq⊆Canₖp : ∀ θ k → k ∈ (Canₖ q θ) → k ∈ (Canₖ p θ)) → (Canₛq⊆Canₛp : ∀ θ S → S ∈ (Canₛ q θ) → S ∈ (Canₛ p θ)) → (∀ θ k → k ∈ (Canₖ (C ⟦ q ⟧c) θ) → k ∈ (Canₖ (C ⟦ p ⟧c) θ)) canₛ-plug : ∀ C p q → (Canₛq⊆Canₛp : ∀ θ → (Canₛ q θ) ⊆¹ (Canₛ p θ)) → (∀ θ k → k ∈ (Canₖ q θ) → k ∈ (Canₖ p θ)) → (∀ θ → (Canₛ (C ⟦ q ⟧c) θ) ⊆¹ (Canₛ (C ⟦ p ⟧c) θ)) canθₖ-plug S' [] C p q Canₖq⊆Canₖp Canₛq⊆Canₛp = canₖ-plug C p q Canₖq⊆Canₖp Canₛq⊆Canₛp canθₖ-plug S' (just Signal.present ∷ sigs) C p q Canₖq⊆Canₖp Canₛq⊆Canₛp θ = canθₖ-plug (suc S') sigs C p q Canₖq⊆Canₖp Canₛq⊆Canₛp (θ ← _) canθₖ-plug S' (just Signal.absent ∷ sigs) C p q Canₖq⊆Canₖp Canₛq⊆Canₛp θ = canθₖ-plug (suc S') sigs C p q Canₖq⊆Canₖp Canₛq⊆Canₛp (θ ← _) canθₖ-plug S' (nothing ∷ sigs) C p q Canₖq⊆Canₖp Canₛq⊆Canₛp = canθₖ-plug (suc S') sigs C p q Canₖq⊆Canₖp Canₛq⊆Canₛp canθₖ-plug S' (just Signal.unknown ∷ sigs) C p q Canₖq⊆Canₖp Canₛq⊆Canₛp θ with any (Nat._≟_ S') (Canθₛ sigs (suc S') (C ⟦ p ⟧c) (θ ← ([S]-env (S' ₛ)))) | any (Nat._≟_ S') (Canθₛ sigs (suc S') (C ⟦ q ⟧c) (θ ← ([S]-env (S' ₛ)))) canθₖ-plug S' (just Signal.unknown ∷ sigs) C p q Canₖq⊆Canₖp Canₛq⊆Canₛp θ | yes p₁ | (yes p₂) = canθₖ-plug (suc S') sigs C p q Canₖq⊆Canₖp Canₛq⊆Canₛp (θ ← _) canθₖ-plug S' (just Signal.unknown ∷ sigs) C p q Canₖq⊆Canₖp Canₛq⊆Canₛp θ | yes p₁ | (no ¬p) with sig-←-monoʳ (S' ₛ) ([S]-env (S' ₛ)) θ (sig-∈-single (S' ₛ) Signal.unknown) ... | S'∈θ←[S]env rewrite ((θ ← [S]-env-absent (S' ₛ)) ≡ (set-sig{S' ₛ} (θ ← [S]-env (S' ₛ)) S'∈θ←[S]env Signal.absent) ∋ (θ ← [S]-env-absent (S' ₛ)) ≡⟨ cong (θ ←_) (sym (←-single-overwrite-sig (S' ₛ) Signal.unknown ([S]-env-absent (S' ₛ)) ((sig-∈-single (S' ₛ) Signal.absent)))) ⟩ (θ ← (([S]-env (S' ₛ)) ← [S]-env-absent (S' ₛ))) ≡⟨ ←-assoc θ ([S]-env (S' ₛ)) ([S]-env-absent (S' ₛ)) ⟩ ((θ ← ([S]-env (S' ₛ))) ← ([S]-env-absent (S' ₛ))) ≡⟨ sym (sig-set=← (θ ← [S]-env (S' ₛ)) (S' ₛ) Signal.absent S'∈θ←[S]env) ⟩ (set-sig{S' ₛ} (θ ← [S]-env (S' ₛ)) S'∈θ←[S]env Signal.absent) ∎) with canθₖ-set-sig-monotonic sigs (suc S') (C ⟦ q ⟧c) (S' ₛ) (θ ← [S]-env (S' ₛ)) S'∈θ←[S]env Signal.absent (trans (sig-stats-←-right-irr' (S' ₛ) θ ([S]-env (S' ₛ)) (sig-∈-single (S' ₛ) Signal.unknown) S'∈θ←[S]env) (sig-stats-1map' (S' ₛ) Signal.unknown ((sig-∈-single (S' ₛ) Signal.unknown)))) (n∉map-suc-n-+ S' (SigM.Dom' sigs)) ... | Canabsq⊂Canunq = λ k x → (canθₖ-plug (suc S') sigs C p q Canₖq⊆Canₖp Canₛq⊆Canₛp (θ ← _)) k (Canabsq⊂Canunq k x) canθₖ-plug S' (just Signal.unknown ∷ sigs) C p q Canₖq⊆Canₖp Canₛq⊆Canₛp θ | no ¬p | (yes p₁) = ⊥-elim (¬p ((canθₛ-plug (suc S') sigs C p q Canₛq⊆Canₛp Canₖq⊆Canₖp (θ ← _)) _ p₁ )) canθₖ-plug S' (just Signal.unknown ∷ sigs) C p q Canₖq⊆Canₖp Canₛq⊆Canₛp θ | no ¬p | (no ¬p₁) = canθₖ-plug (suc S') sigs C p q Canₖq⊆Canₖp Canₛq⊆Canₛp (θ ← _) canθₛ-plug S' [] C p q Canₛq⊆Canₛp Canₖq⊆Canₖp θ = canₛ-plug C p q Canₛq⊆Canₛp Canₖq⊆Canₖp θ canθₛ-plug S' (nothing ∷ sigs) C p q Canₛq⊆Canₛp Canₖq⊆Canₖp θ = canθₛ-plug (suc S') sigs C p q Canₛq⊆Canₛp Canₖq⊆Canₖp θ canθₛ-plug S' (just Signal.present ∷ sigs) C p q Canₛq⊆Canₛp Canₖq⊆Canₖp θ = canθₛ-plug (suc S') sigs C p q Canₛq⊆Canₛp Canₖq⊆Canₖp (θ ← _) canθₛ-plug S' (just Signal.absent ∷ sigs) C p q Canₛq⊆Canₛp Canₖq⊆Canₖp θ = canθₛ-plug (suc S') sigs C p q Canₛq⊆Canₛp Canₖq⊆Canₖp (θ ← _) canθₛ-plug S' (just Signal.unknown ∷ sigs) C p q Canₛq⊆Canₛp Canₖq⊆Canₖp θ with any (Nat._≟_ S') (Canθₛ sigs (suc S') (C ⟦ p ⟧c) (θ ← ([S]-env (S' ₛ)))) | any (Nat._≟_ S') (Canθₛ sigs (suc S') (C ⟦ q ⟧c) (θ ← ([S]-env (S' ₛ)))) canθₛ-plug S' (just Signal.unknown ∷ sigs) C p q Canₛq⊆Canₛp Canₖq⊆Canₖp θ | yes p₁ | (yes p₂) = canθₛ-plug (suc S') sigs C p q Canₛq⊆Canₛp Canₖq⊆Canₖp (θ ← _) canθₛ-plug S' (just Signal.unknown ∷ sigs) C p q Canₛq⊆Canₛp Canₖq⊆Canₖp θ | yes p₁ | (no ¬p) with sig-←-monoʳ (S' ₛ) ([S]-env (S' ₛ)) θ (sig-∈-single (S' ₛ) Signal.unknown) ... | S'∈θ←[S]env rewrite ((θ ← [S]-env-absent (S' ₛ)) ≡ (set-sig{S' ₛ} (θ ← [S]-env (S' ₛ)) S'∈θ←[S]env Signal.absent) ∋ (θ ← [S]-env-absent (S' ₛ)) ≡⟨ cong (θ ←_) (sym (←-single-overwrite-sig (S' ₛ) Signal.unknown ([S]-env-absent (S' ₛ)) ((sig-∈-single (S' ₛ) Signal.absent)))) ⟩ (θ ← (([S]-env (S' ₛ)) ← [S]-env-absent (S' ₛ))) ≡⟨ ←-assoc θ ([S]-env (S' ₛ)) ([S]-env-absent (S' ₛ)) ⟩ ((θ ← ([S]-env (S' ₛ))) ← ([S]-env-absent (S' ₛ))) ≡⟨ sym (sig-set=← (θ ← [S]-env (S' ₛ)) (S' ₛ) Signal.absent S'∈θ←[S]env) ⟩ (set-sig{S' ₛ} (θ ← [S]-env (S' ₛ)) S'∈θ←[S]env Signal.absent) ∎) with canθₛ-set-sig-monotonic sigs (suc S') (C ⟦ q ⟧c) (S' ₛ) (θ ← [S]-env (S' ₛ)) S'∈θ←[S]env Signal.absent (trans (sig-stats-←-right-irr' (S' ₛ) θ ([S]-env (S' ₛ)) (sig-∈-single (S' ₛ) Signal.unknown) S'∈θ←[S]env) (sig-stats-1map' (S' ₛ) Signal.unknown ((sig-∈-single (S' ₛ) Signal.unknown)))) (n∉map-suc-n-+ S' (SigM.Dom' sigs)) ... | Canabsq⊂Canunq = λ k x → (canθₛ-plug (suc S') sigs C p q Canₛq⊆Canₛp Canₖq⊆Canₖp (θ ← _)) k (Canabsq⊂Canunq k x) canθₛ-plug S' (just Signal.unknown ∷ sigs) C p q Canₛq⊆Canₛp Canₖq⊆Canₖp θ | no ¬p | (yes p₁) = ⊥-elim (¬p ((canθₛ-plug (suc S') sigs) C p q Canₛq⊆Canₛp Canₖq⊆Canₖp (θ ← _) _ p₁)) canθₛ-plug S' (just Signal.unknown ∷ sigs) C p q Canₛq⊆Canₛp Canₖq⊆Canₖp θ | no ¬p | (no ¬p₁) = canθₛ-plug (suc S') sigs C p q Canₛq⊆Canₛp Canₖq⊆Canₖp (θ ← _) canθₛₕ-plug S' [] C p q Canₛₕq⊆Canₛₕp Canₛq⊆Canₛp Canₖq⊆Canₖp θ = canₛₕ-plug C p q Canₛₕq⊆Canₛₕp Canₛq⊆Canₛp Canₖq⊆Canₖp θ canθₛₕ-plug S' (nothing ∷ sigs) C p q Canₛₕq⊆Canₛₕp Canₛq⊆Canₛp Canₖq⊆Canₖp θ = canθₛₕ-plug (suc S') sigs C p q Canₛₕq⊆Canₛₕp Canₛq⊆Canₛp Canₖq⊆Canₖp θ canθₛₕ-plug S' (just Signal.present ∷ sigs) C p q Canₛₕq⊆Canₛₕp Canₛq⊆Canₛp Canₖq⊆Canₖp θ = canθₛₕ-plug (suc S') sigs C p q Canₛₕq⊆Canₛₕp Canₛq⊆Canₛp Canₖq⊆Canₖp (θ ← _) canθₛₕ-plug S' (just Signal.absent ∷ sigs) C p q Canₛₕq⊆Canₛₕp Canₛq⊆Canₛp Canₖq⊆Canₖp θ = canθₛₕ-plug (suc S') sigs C p q Canₛₕq⊆Canₛₕp Canₛq⊆Canₛp Canₖq⊆Canₖp (θ ← _) canθₛₕ-plug S' (just Signal.unknown ∷ sigs) C p q Canₛₕq⊆Canₛₕp Canₛq⊆Canₛp Canₖq⊆Canₖp θ with any (Nat._≟_ S') (Canθₛ sigs (suc S') (C ⟦ p ⟧c) (θ ← ([S]-env (S' ₛ)))) | any (Nat._≟_ S') (Canθₛ sigs (suc S') (C ⟦ q ⟧c) (θ ← ([S]-env (S' ₛ)))) canθₛₕ-plug S' (just Signal.unknown ∷ sigs) C p q Canₛₕq⊆Canₛₕp Canₛq⊆Canₛp Canₖq⊆Canₖp θ | yes p₁ | (yes p₂) = canθₛₕ-plug (suc S') sigs C p q Canₛₕq⊆Canₛₕp Canₛq⊆Canₛp Canₖq⊆Canₖp (θ ← _) canθₛₕ-plug S' (just Signal.unknown ∷ sigs) C p q Canₛₕq⊆Canₛₕp Canₖq⊆Canₖp Canₛq⊆Canₛp θ | yes p₁ | (no ¬p) with sig-←-monoʳ (S' ₛ) ([S]-env (S' ₛ)) θ (sig-∈-single (S' ₛ) Signal.unknown) ... | S'∈θ←[S]env rewrite ((θ ← [S]-env-absent (S' ₛ)) ≡ (set-sig{S' ₛ} (θ ← [S]-env (S' ₛ)) S'∈θ←[S]env Signal.absent) ∋ (θ ← [S]-env-absent (S' ₛ)) ≡⟨ cong (θ ←_) (sym (←-single-overwrite-sig (S' ₛ) Signal.unknown ([S]-env-absent (S' ₛ)) ((sig-∈-single (S' ₛ) Signal.absent)))) ⟩ (θ ← (([S]-env (S' ₛ)) ← [S]-env-absent (S' ₛ))) ≡⟨ ←-assoc θ ([S]-env (S' ₛ)) ([S]-env-absent (S' ₛ)) ⟩ ((θ ← ([S]-env (S' ₛ))) ← ([S]-env-absent (S' ₛ))) ≡⟨ sym (sig-set=← (θ ← [S]-env (S' ₛ)) (S' ₛ) Signal.absent S'∈θ←[S]env) ⟩ (set-sig{S' ₛ} (θ ← [S]-env (S' ₛ)) S'∈θ←[S]env Signal.absent) ∎) with canθₛₕ-set-sig-monotonic sigs (suc S') (C ⟦ q ⟧c) (S' ₛ) (θ ← [S]-env (S' ₛ)) S'∈θ←[S]env Signal.absent (trans (sig-stats-←-right-irr' (S' ₛ) θ ([S]-env (S' ₛ)) (sig-∈-single (S' ₛ) Signal.unknown) S'∈θ←[S]env) (sig-stats-1map' (S' ₛ) Signal.unknown ((sig-∈-single (S' ₛ) Signal.unknown)))) (n∉map-suc-n-+ S' (SigM.Dom' sigs)) ... | Canabsq⊂Canunq = λ k x → (canθₛₕ-plug (suc S') sigs C p q Canₛₕq⊆Canₛₕp Canₖq⊆Canₖp Canₛq⊆Canₛp (θ ← _)) k (Canabsq⊂Canunq k x) canθₛₕ-plug S' (just Signal.unknown ∷ sigs) C p q Canₛₕq⊆Canₛₕp Canₛq⊆Canₛp Canₖq⊆Canₖp θ | no ¬p | (yes p₁) = ⊥-elim (¬p (canθₛ-plug (suc S') sigs C p q Canₖq⊆Canₖp Canₛq⊆Canₛp (θ ← _) _ p₁)) canθₛₕ-plug S' (just Signal.unknown ∷ sigs) C p q Canₛₕq⊆Canₛₕp Canₛq⊆Canₛp Canₖq⊆Canₖp θ | no ¬p | (no ¬p₁) = canθₛₕ-plug (suc S') sigs C p q Canₛₕq⊆Canₛₕp Canₛq⊆Canₛp Canₖq⊆Canₖp (θ ← _) canₖ-plug [] p q Canₖq⊆Canₖp _ = Canₖq⊆Canₖp canₖ-plug (ceval (epar₁ q) ∷ C) p q₁ Canₖq⊆Canₖp ⊂s θ = map-mono² Code._⊔_ (canₖ-plug C p q₁ Canₖq⊆Canₖp ⊂s θ) (λ x y → y) canₖ-plug (ceval (epar₂ p) ∷ C) p₁ q Canₖq⊆Canₖp ⊂s θ = map-mono²{xs = Canₖ p θ} Code._⊔_ (λ x y → y) (canₖ-plug C p₁ q Canₖq⊆Canₖp ⊂s θ) canₖ-plug (ceval (eloopˢ q) ∷ C) p q₁ Canₖq⊆Canₖp ⊂s θ = canₖ-plug C p q₁ Canₖq⊆Canₖp ⊂s θ canₖ-plug (ceval (eseq q) ∷ C) p q₁ Canₖq⊆Canₖp ⊂s θ with any (Code.nothin Code.≟_) (Canₖ (C ⟦ p ⟧c) θ) | any (Code.nothin Code.≟_) (Canₖ (C ⟦ q₁ ⟧c) θ) ... | yes 0∈CanC⟦p⟧ | yes 0∈CanC⟦q⟧ = codesub++both ((codesub- Code.nothin (canₖ-plug C p q₁ Canₖq⊆Canₖp ⊂s θ))) (λ x y → y) ... | yes 0∈CanC⟦p⟧ | no 0∉CanC⟦q⟧ = λ k x → ++ˡ (set-remove-not-removed{Code.nothin}{k} (λ {refl → 0∉CanC⟦q⟧ x}) (canₖ-plug C p q₁ Canₖq⊆Canₖp ⊂s θ _ x)) ... | no 0∉CanC⟦p⟧ | yes 0∈CanC⟦q⟧ = ⊥-elim (0∉CanC⟦p⟧ (canₖ-plug C p q₁ Canₖq⊆Canₖp ⊂s θ _ 0∈CanC⟦q⟧)) ... | no 0∉CanC⟦p⟧ | no 0∉CanC⟦q⟧ = canₖ-plug C p q₁ Canₖq⊆Canₖp ⊂s θ canₖ-plug (ceval (esuspend S) ∷ C) p q Canₖq⊆Canₖp ⊂s = canₖ-plug C p q Canₖq⊆Canₖp ⊂s canₖ-plug (ceval etrap ∷ C) p q Canₖq⊆Canₖp ⊂s = λ θ → map-mono Code.↓* (canₖ-plug C p q Canₖq⊆Canₖp ⊂s θ) canₖ-plug (csignl S ∷ C) p q Canₖq⊆Canₖp ⊂s θ = canθₖ-plug 0 (sig ([S]-env S)) C p q Canₖq⊆Canₖp ⊂s θ canₖ-plug (cpresent₁ S q ∷ C) p q₁ Canₖq⊆Canₖp ⊂s θ with Sig∈ S θ ... | no S∉Domθ = codesub++both (canₖ-plug C p q₁ Canₖq⊆Canₖp ⊂s θ) (λ x y → y) ... | yes S∈Domθ with (Signal.present ≟ₛₜ (sig-stats{S} θ S∈Domθ)) ... | yes _ = canₖ-plug C p q₁ Canₖq⊆Canₖp ⊂s θ ... | no _ with (Signal.absent ≟ₛₜ (sig-stats{S} θ S∈Domθ)) ... | yes _ = λ k z → z ... | no _ = codesub++both (canₖ-plug C p q₁ Canₖq⊆Canₖp ⊂s θ) (λ x y → y) canₖ-plug (cpresent₂ S p₁ ∷ C) p q Canₖq⊆Canₖp ⊂s θ with Sig∈ S θ ... | no S∉Domθ = codesub++both{a = Canₖ p₁ θ} (λ x y → y) (canₖ-plug C p q Canₖq⊆Canₖp ⊂s θ) ... | yes S∈Domθ with (Signal.present ≟ₛₜ (sig-stats{S} θ S∈Domθ)) ... | yes _ = λ x y → y ... | no _ with (Signal.absent ≟ₛₜ (sig-stats{S} θ S∈Domθ)) ... | yes _ = canₖ-plug C p q Canₖq⊆Canₖp ⊂s θ ... | no _ = codesub++both{a = Canₖ p₁ θ} (λ x y → y) (canₖ-plug C p q Canₖq⊆Canₖp ⊂s θ) canₖ-plug (cloop ∷ C) p q Canₖq⊆Canₖp ⊂s = (canₖ-plug C p q Canₖq⊆Canₖp ⊂s) canₖ-plug (cloopˢ₂ p ∷ C) p₁ q Canₖq⊆Canₖp ⊂s θ = λ k z → z canₖ-plug (cseq₂ p ∷ C) p₁ q Canₖq⊆Canₖp ⊂s θ with any (Code.nothin Code.≟_) (Canₖ p θ) ... | yes 0∈Canp = codesub++both{a = set-remove (Canₖ p θ) Code.nothin } (λ x y → y) (canₖ-plug C p₁ q Canₖq⊆Canₖp ⊂s θ) ... | no 0∉Canp = λ x y → y canₖ-plug (cshared s e ∷ C) p q Canₖq⊆Canₖp ⊂s = (canₖ-plug C p q Canₖq⊆Canₖp ⊂s) canₖ-plug (cvar x e ∷ C) p q Canₖq⊆Canₖp ⊂s = (canₖ-plug C p q Canₖq⊆Canₖp ⊂s) canₖ-plug (cif₁ x q ∷ C) p q₁ Canₖq⊆Canₖp ⊂s θ = codesub++both (canₖ-plug C p q₁ Canₖq⊆Canₖp ⊂s θ) (λ x y → y) canₖ-plug (cif₂ x p ∷ C) p₁ q Canₖq⊆Canₖp ⊂s θ = codesub++both{a = Canₖ p θ} (λ x y → y) (canₖ-plug C p₁ q Canₖq⊆Canₖp ⊂s θ) canₖ-plug (cenv θ₁ A ∷ C) p q Canₖq⊆Canₖp ⊂s θ = canθₖ-plug 0 (sig θ₁) C p q Canₖq⊆Canₖp ⊂s θ canₛ-plug [] p q Canₛq⊆Canₛp Canₖq⊆Canₖp = Canₛq⊆Canₛp canₛ-plug (ceval (epar₁ q) ∷ C) p q₁ Canₛq⊆Canₛp Canₖq⊆Canₖp θ = ∪¹-respect-⊆¹-left (canₛ-plug C p q₁ Canₛq⊆Canₛp Canₖq⊆Canₖp θ) canₛ-plug (ceval (epar₂ p) ∷ C) p₁ q Canₛq⊆Canₛp Canₖq⊆Canₖp θ = ∪¹-respect-⊆¹-right (Canₛ p θ) (canₛ-plug C p₁ q Canₛq⊆Canₛp Canₖq⊆Canₖp θ) canₛ-plug (ceval (eloopˢ q) ∷ C) p q₁ Canₛq⊆Canₛp Canₖq⊆Canₖp θ = canₛ-plug C p q₁ Canₛq⊆Canₛp Canₖq⊆Canₖp θ canₛ-plug (ceval (eseq q) ∷ C) p q₁ Canₛq⊆Canₛp Canₖq⊆Canₖp θ with any (Code.nothin Code.≟_) (Canₖ (C ⟦ p ⟧c) θ) | any (Code.nothin Code.≟_) (Canₖ (C ⟦ q₁ ⟧c) θ) ... | yes 0∈CanC⟦p⟧ | yes 0∈CanC⟦q⟧ = ∪¹-respect-⊆¹-left (canₛ-plug C p q₁ Canₛq⊆Canₛp Canₖq⊆Canₖp θ) ... | yes 0∈CanC⟦p⟧ | no 0∉CanC⟦q⟧ = λ S x → (++ˡ (canₛ-plug C p q₁ Canₛq⊆Canₛp Canₖq⊆Canₖp θ S x)) ... | no 0∉CanC⟦p⟧ | yes 0∈CanC⟦q⟧ = ⊥-elim (0∉CanC⟦p⟧ (canₖ-plug C p q₁ Canₖq⊆Canₖp Canₛq⊆Canₛp θ _ 0∈CanC⟦q⟧)) ... | no 0∉CanC⟦p⟧ | no 0∉CanC⟦q⟧ = (canₛ-plug C p q₁ Canₛq⊆Canₛp Canₖq⊆Canₖp θ) -- set-subtract-merge : ∀ {xs ys z} → z ∈ set-subtract xs ys → (z ∈ xs) × (z ∉ ys) canₛ-plug (ceval (esuspend S) ∷ C) p q Canₛq⊆Canₛp Canₖq⊆Canₖp = (canₛ-plug C p q Canₛq⊆Canₛp Canₖq⊆Canₖp) canₛ-plug (ceval etrap ∷ C) p q Canₛq⊆Canₛp Canₖq⊆Canₖp = (canₛ-plug C p q Canₛq⊆Canₛp Canₖq⊆Canₖp) canₛ-plug (csignl (S ₛ) ∷ C) p q Canₛq⊆Canₛp Canₖq⊆Canₖp θ S' S'∈CanC⟦q⟧ = NSet.set-remove-not-removed ((¬ S ≡ S') ∋ NSet.set-remove-not-eq{S'}{S}{Canθₛ (sig ([S]-env (S ₛ))) 0 (C ⟦ q ⟧c) θ} S'∈CanC⟦q⟧) ((canθₛ-plug 0 (sig ([S]-env (S ₛ))) C p q Canₛq⊆Canₛp Canₖq⊆Canₖp θ) S' ( (NSet.set-remove-mono-∈ S S'∈CanC⟦q⟧) )) canₛ-plug (cpresent₁ S q ∷ C) p q₁ Canₛq⊆Canₛp Canₖq⊆Canₖp θ with Sig∈ S θ ... | no S∉Domθ = ∪¹-respect-⊆¹-left (canₛ-plug C p q₁ Canₛq⊆Canₛp Canₖq⊆Canₖp θ) ... | yes S∈Domθ with (Signal.present ≟ₛₜ (sig-stats{S} θ S∈Domθ)) ... | yes _ = (canₛ-plug C p q₁ Canₛq⊆Canₛp Canₖq⊆Canₖp θ) ... | no _ with (Signal.absent ≟ₛₜ (sig-stats{S} θ S∈Domθ)) ... | yes _ = λ k z → z ... | no _ = ∪¹-respect-⊆¹-left (canₛ-plug C p q₁ Canₛq⊆Canₛp Canₖq⊆Canₖp θ) canₛ-plug (cpresent₂ S p₁ ∷ C) p q Canₛq⊆Canₛp Canₖq⊆Canₖp θ with Sig∈ S θ ... | no S∉Domθ = ∪¹-respect-⊆¹-right (Canₛ p₁ θ) (canₛ-plug C p q Canₛq⊆Canₛp Canₖq⊆Canₖp θ) ... | yes S∈Domθ with (Signal.present ≟ₛₜ (sig-stats{S} θ S∈Domθ)) ... | yes _ = λ x y → y ... | no _ with (Signal.absent ≟ₛₜ (sig-stats{S} θ S∈Domθ)) ... | yes _ = (canₛ-plug C p q Canₛq⊆Canₛp Canₖq⊆Canₖp θ) ... | no _ = ∪¹-respect-⊆¹-right (Canₛ p₁ θ) (canₛ-plug C p q Canₛq⊆Canₛp Canₖq⊆Canₖp θ) canₛ-plug (cloop ∷ C) p q Canₛq⊆Canₛp Canₖq⊆Canₖp = (canₛ-plug C p q Canₛq⊆Canₛp Canₖq⊆Canₖp) canₛ-plug (cloopˢ₂ p ∷ C) p₁ q Canₛq⊆Canₛp Canₖq⊆Canₖp θ = λ x z → z canₛ-plug (cseq₂ p ∷ C) p₁ q Canₛq⊆Canₛp Canₖq⊆Canₖp θ with any (Code.nothin Code.≟_) (Canₖ p θ) ... | yes 0∈Canp = ∪¹-respect-⊆¹-right (Canₛ p θ) (canₛ-plug C p₁ q Canₛq⊆Canₛp Canₖq⊆Canₖp θ) ... | no 0∉Canp = λ x y → y canₛ-plug (cshared s e ∷ C) p q Canₛq⊆Canₛp Canₖq⊆Canₖp = (canₛ-plug C p q Canₛq⊆Canₛp Canₖq⊆Canₖp) canₛ-plug (cvar x e ∷ C) p q Canₛq⊆Canₛp Canₖq⊆Canₖp = (canₛ-plug C p q Canₛq⊆Canₛp Canₖq⊆Canₖp) canₛ-plug (cif₁ x q ∷ C) p q₁ Canₛq⊆Canₛp Canₖq⊆Canₖp θ = ∪¹-respect-⊆¹-left (canₛ-plug C p q₁ Canₛq⊆Canₛp Canₖq⊆Canₖp θ) canₛ-plug (cif₂ x p ∷ C) p₁ q Canₛq⊆Canₛp Canₖq⊆Canₖp θ = ∪¹-respect-⊆¹-right (Canₛ p θ) (canₛ-plug C p₁ q Canₛq⊆Canₛp Canₖq⊆Canₖp θ) canₛ-plug (cenv θ₁ A ∷ C) p q Canₛq⊆Canₛp Canₖq⊆Canₖp θ = ⊆¹-respect-|¹ (fst $ Dom θ₁) (canθₛ-plug 0 (sig θ₁) C p q Canₛq⊆Canₛp Canₖq⊆Canₖp θ) canₛₕ-plug [] p q Canₛₕq⊆Canₛₕp Canₖₕq⊆Canₖₕp ⊂S = Canₛₕq⊆Canₛₕp canₛₕ-plug (ceval (epar₁ q) ∷ C) p q₁ Canₛₕq⊆Canₛₕp Canₖq⊆Canₖp ⊂S θ = ∪¹-respect-⊆¹-left (canₛₕ-plug C p q₁ Canₛₕq⊆Canₛₕp Canₖq⊆Canₖp ⊂S θ) canₛₕ-plug (ceval (epar₂ p) ∷ C) p₁ q Canₛₕq⊆Canₛₕp Canₖq⊆Canₖp ⊂S θ = ∪¹-respect-⊆¹-right (Canₛₕ p θ) (canₛₕ-plug C p₁ q Canₛₕq⊆Canₛₕp Canₖq⊆Canₖp ⊂S θ) canₛₕ-plug (ceval (eloopˢ q) ∷ C) p q₁ Canₛₕq⊆Canₛₕp Canₖq⊆Canₖp ⊂S θ = canₛₕ-plug C p q₁ Canₛₕq⊆Canₛₕp Canₖq⊆Canₖp ⊂S θ canₛₕ-plug (ceval (eseq q) ∷ C) p q₁ Canₛₕq⊆Canₛₕp Canₖq⊆Canₖp ⊂S θ with any (Code.nothin Code.≟_) (Canₖ (C ⟦ p ⟧c) θ) | any (Code.nothin Code.≟_) (Canₖ (C ⟦ q₁ ⟧c) θ) ... | yes 0∈CanC⟦p⟧ | yes 0∈CanC⟦q⟧ = ∪¹-respect-⊆¹-left (canₛₕ-plug C p q₁ Canₛₕq⊆Canₛₕp Canₖq⊆Canₖp ⊂S θ) ... | yes 0∈CanC⟦p⟧ | no 0∉CanC⟦q⟧ = λ S x → (++ˡ (canₛₕ-plug C p q₁ Canₛₕq⊆Canₛₕp Canₖq⊆Canₖp ⊂S θ S x)) ... | no 0∉CanC⟦p⟧ | yes 0∈CanC⟦q⟧ = ⊥-elim (0∉CanC⟦p⟧ (canₖ-plug C p q₁ Canₖq⊆Canₖp ⊂S θ _ 0∈CanC⟦q⟧)) ... | no 0∉CanC⟦p⟧ | no 0∉CanC⟦q⟧ = (canₛₕ-plug C p q₁ Canₛₕq⊆Canₛₕp Canₖq⊆Canₖp ⊂S θ) canₛₕ-plug (ceval (esuspend S) ∷ C) p q Canₛₕq⊆Canₛₕp Canₖq⊆Canₖp ⊂S = (canₛₕ-plug C p q Canₛₕq⊆Canₛₕp Canₖq⊆Canₖp ⊂S) canₛₕ-plug (ceval etrap ∷ C) p q Canₛₕq⊆Canₛₕp Canₖq⊆Canₖp ⊂S = (canₛₕ-plug C p q Canₛₕq⊆Canₛₕp Canₖq⊆Canₖp ⊂S) canₛₕ-plug (csignl S ∷ C) p q Canₛₕq⊆Canₛₕp Canₖq⊆Canₖp ⊂S θ = canθₛₕ-plug 0 (sig ([S]-env S)) C p q Canₛₕq⊆Canₛₕp Canₖq⊆Canₖp ⊂S θ canₛₕ-plug (cpresent₁ S q ∷ C) p q₁ Canₛₕq⊆Canₛₕp Canₖq⊆Canₖp ⊂S θ with Sig∈ S θ ... | no S∉Domθ = ∪¹-respect-⊆¹-left (canₛₕ-plug C p q₁ Canₛₕq⊆Canₛₕp Canₖq⊆Canₖp ⊂S θ) ... | yes S∈Domθ with (Signal.present ≟ₛₜ (sig-stats{S} θ S∈Domθ)) ... | yes _ = (canₛₕ-plug C p q₁ Canₛₕq⊆Canₛₕp Canₖq⊆Canₖp ⊂S θ) ... | no _ with (Signal.absent ≟ₛₜ (sig-stats{S} θ S∈Domθ)) ... | yes _ = λ k z → z ... | no _ = ∪¹-respect-⊆¹-left (canₛₕ-plug C p q₁ Canₛₕq⊆Canₛₕp Canₖq⊆Canₖp ⊂S θ) canₛₕ-plug (cpresent₂ S p₁ ∷ C) p q Canₛₕq⊆Canₛₕp Canₖq⊆Canₖp ⊂S θ with Sig∈ S θ ... | no S∉Domθ = ∪¹-respect-⊆¹-right (Canₛₕ p₁ θ) (canₛₕ-plug C p q Canₛₕq⊆Canₛₕp Canₖq⊆Canₖp ⊂S θ) ... | yes S∈Domθ with (Signal.present ≟ₛₜ (sig-stats{S} θ S∈Domθ)) ... | yes _ = λ x y → y ... | no _ with (Signal.absent ≟ₛₜ (sig-stats{S} θ S∈Domθ)) ... | yes _ = (canₛₕ-plug C p q Canₛₕq⊆Canₛₕp Canₖq⊆Canₖp ⊂S θ) ... | no _ = ∪¹-respect-⊆¹-right (Canₛₕ p₁ θ) (canₛₕ-plug C p q Canₛₕq⊆Canₛₕp Canₖq⊆Canₖp ⊂S θ) canₛₕ-plug (cloop ∷ C) p q Canₛₕq⊆Canₛₕp Canₖq⊆Canₖp ⊂S = (canₛₕ-plug C p q Canₛₕq⊆Canₛₕp Canₖq⊆Canₖp ⊂S) canₛₕ-plug (cloopˢ₂ p ∷ C) p₁ q Canₛₕq⊆Canₛₕp Canₖq⊆Canₖp ⊂S θ = λ x z → z canₛₕ-plug (cseq₂ p ∷ C) p₁ q Canₛₕq⊆Canₛₕp Canₖq⊆Canₖp ⊂S θ with any (Code.nothin Code.≟_) (Canₖ p θ) ... | yes 0∈Canp = ∪¹-respect-⊆¹-right (Canₛₕ p θ) (canₛₕ-plug C p₁ q Canₛₕq⊆Canₛₕp Canₖq⊆Canₖp ⊂S θ) ... | no 0∉Canp = λ x y → y canₛₕ-plug (cshared (s ₛₕ) e ∷ C) p q Canₛₕq⊆Canₛₕp Canₖq⊆Canₖp ⊂S θ s' s'∈CanC⟦q⟧ = NSet.set-remove-not-removed ((¬ s ≡ s') ∋ NSet.set-remove-not-eq{s'}{s}{Canₛₕ (C ⟦ q ⟧c) θ} s'∈CanC⟦q⟧) (canₛₕ-plug C p q Canₛₕq⊆Canₛₕp Canₖq⊆Canₖp ⊂S θ s' (NSet.set-remove-mono-∈ s s'∈CanC⟦q⟧)) canₛₕ-plug (cvar x e ∷ C) p q Canₛₕq⊆Canₛₕp Canₖq⊆Canₖp ⊂S = (canₛₕ-plug C p q Canₛₕq⊆Canₛₕp Canₖq⊆Canₖp ⊂S) canₛₕ-plug (cif₁ x q ∷ C) p q₁ Canₛₕq⊆Canₛₕp Canₖq⊆Canₖp ⊂S θ = ∪¹-respect-⊆¹-left (canₛₕ-plug C p q₁ Canₛₕq⊆Canₛₕp Canₖq⊆Canₖp ⊂S θ) canₛₕ-plug (cif₂ x p ∷ C) p₁ q Canₛₕq⊆Canₛₕp Canₖq⊆Canₖp ⊂S θ = ∪¹-respect-⊆¹-right (Canₛₕ p θ) (canₛₕ-plug C p₁ q Canₛₕq⊆Canₛₕp Canₖq⊆Canₖp ⊂S θ) canₛₕ-plug (cenv θ₁ A ∷ C) p q Canₛₕq⊆Canₛₕp Canₖq⊆Canₖp ⊂S θ = ⊆¹-respect-|¹ (snd $ Dom θ₁) (canθₛₕ-plug 0 (sig θ₁) C p q Canₛₕq⊆Canₛₕp Canₖq⊆Canₖp ⊂S θ) canθₖ-plugE : ∀ S' sigs → ∀ E p q → (Canₖq⊆Canₖp : ∀ θ k → k ∈ (Canₖ q θ) → k ∈ (Canₖ p θ)) → (Canₛq⊆Canₛp : ∀ θ S → S ∈ (Canₛ q θ) → S ∈ (Canₛ p θ)) → (∀ θ k → k ∈ (Canθₖ sigs S' (E ⟦ q ⟧e) θ) → k ∈ (Canθₖ sigs S' (E ⟦ p ⟧e) θ)) canθₖ-plugE S' sigs E p q with canθₖ-plug S' sigs (Data.List.map ceval E) p q ... | r rewrite unplugc (⟦⟧e-to-⟦⟧c (Erefl{E}{q})) | unplugc (⟦⟧e-to-⟦⟧c (Erefl{E}{p})) = r canθₛ-plugE : ∀ S' sigs → ∀ E p q → (Canₛq⊆Canₛp : ∀ θ S → S ∈ (Canₛ q θ) → S ∈ (Canₛ p θ)) → (Canₖq⊆Canₖp : ∀ θ k → k ∈ (Canₖ q θ) → k ∈ (Canₖ p θ)) → (∀ θ k → k ∈ (Canθₛ sigs S' (E ⟦ q ⟧e) θ) → k ∈ (Canθₛ sigs S' (E ⟦ p ⟧e) θ)) canθₛ-plugE S' sigs E p q with canθₛ-plug S' sigs (Data.List.map ceval E) p q ... | r rewrite unplugc (⟦⟧e-to-⟦⟧c (Erefl{E}{q})) | unplugc (⟦⟧e-to-⟦⟧c (Erefl{E}{p})) = r canθₛₕ-plugE : ∀ S' sigs → ∀ E p q → (Canₛₕq⊆Canₛₕp : ∀ θ → (Canₛₕ q θ) ⊆¹ (Canₛₕ p θ)) → (Canₛq⊆Canₛp : ∀ θ k → k ∈ (Canₖ q θ) → k ∈ (Canₖ p θ)) → (Canₖq⊆Canₖp : ∀ θ S → S ∈ (Canₛ q θ) → S ∈ (Canₛ p θ)) → (∀ θ k → k ∈ (Canθₛₕ sigs S' (E ⟦ q ⟧e) θ) → k ∈ (Canθₛₕ sigs S' (E ⟦ p ⟧e) θ)) canθₛₕ-plugE S' sigs E p q with canθₛₕ-plug S' sigs (Data.List.map ceval E) p q ... | r rewrite unplugc (⟦⟧e-to-⟦⟧c (Erefl{E}{q})) | unplugc (⟦⟧e-to-⟦⟧c (Erefl{E}{p})) = r
{ "alphanum_fraction": 0.5820255553, "avg_line_length": 71.1036585366, "ext": "agda", "hexsha": "7ede1ef623fb0f8697787c59dc26c17fa2bc5134", "lang": "Agda", "max_forks_count": 1, "max_forks_repo_forks_event_max_datetime": "2020-04-15T20:02:49.000Z", "max_forks_repo_forks_event_min_datetime": "2020-04-15T20:02:49.000Z", "max_forks_repo_head_hexsha": "4340bef3f8df42ab8167735d35a4cf56243a45cd", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "florence/esterel-calculus", "max_forks_repo_path": "agda/Esterel/Lang/CanFunction/Plug.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "4340bef3f8df42ab8167735d35a4cf56243a45cd", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "florence/esterel-calculus", "max_issues_repo_path": "agda/Esterel/Lang/CanFunction/Plug.agda", "max_line_length": 217, "max_stars_count": 3, "max_stars_repo_head_hexsha": "4340bef3f8df42ab8167735d35a4cf56243a45cd", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "florence/esterel-calculus", "max_stars_repo_path": "agda/Esterel/Lang/CanFunction/Plug.agda", "max_stars_repo_stars_event_max_datetime": "2020-07-01T03:59:31.000Z", "max_stars_repo_stars_event_min_datetime": "2020-04-16T10:58:53.000Z", "num_tokens": 13935, "size": 23322 }
open import Issue4959-2
{ "alphanum_fraction": 0.8333333333, "avg_line_length": 12, "ext": "agda", "hexsha": "94495671b4815634b76d32fc33050e218a7e09f4", "lang": "Agda", "max_forks_count": 371, "max_forks_repo_forks_event_max_datetime": "2022-03-30T19:00:30.000Z", "max_forks_repo_forks_event_min_datetime": "2015-01-03T14:04:08.000Z", "max_forks_repo_head_hexsha": "ed8ac6f4062ea8a20fa0f62d5db82d4e68278338", "max_forks_repo_licenses": [ "BSD-3-Clause" ], "max_forks_repo_name": "shlevy/agda", "max_forks_repo_path": "test/interaction/Issue4959.agda", "max_issues_count": 4066, "max_issues_repo_head_hexsha": "ed8ac6f4062ea8a20fa0f62d5db82d4e68278338", "max_issues_repo_issues_event_max_datetime": "2022-03-31T21:14:49.000Z", "max_issues_repo_issues_event_min_datetime": "2015-01-10T11:24:51.000Z", "max_issues_repo_licenses": [ "BSD-3-Clause" ], "max_issues_repo_name": "shlevy/agda", "max_issues_repo_path": "test/interaction/Issue4959.agda", "max_line_length": 23, "max_stars_count": 1989, "max_stars_repo_head_hexsha": "ed8ac6f4062ea8a20fa0f62d5db82d4e68278338", "max_stars_repo_licenses": [ "BSD-3-Clause" ], "max_stars_repo_name": "shlevy/agda", "max_stars_repo_path": "test/interaction/Issue4959.agda", "max_stars_repo_stars_event_max_datetime": "2022-03-30T18:20:48.000Z", "max_stars_repo_stars_event_min_datetime": "2015-01-09T23:51:16.000Z", "num_tokens": 8, "size": 24 }
-- Andreas, bug found 2011-12-31 {-# OPTIONS --irrelevant-projections #-} module Issue543a where open import Common.Equality data ⊥ : Set where record ⊤ : Set where constructor tt data Bool : Set where true false : Bool record Squash (A : Set) : Set where constructor squash field .unsquash : A open Squash -- ok: sqT≡sqF : squash true ≡ squash false sqT≡sqF = refl record Inhabited : Set1 where constructor inhabited field Type : Set elem : Type open Inhabited .bad1 : Inhabited bad1 = inhabited (true ≡ unsquash (squash true)) refl .bad2 : Inhabited bad2 = inhabited (unsquash (squash false) ≡ false) refl infixl 2 _∘_ _∘_ = trans -- this should not be provable!! .irrT≡F : true ≡ false irrT≡F = elem bad1 ∘ cong unsquash sqT≡sqF ∘ elem bad2 -- the rest is easy T : Bool → Set T true = ⊤ T false = ⊥ T≠F : true ≡ false → ⊥ T≠F p = subst T p tt .irr⊥ : ⊥ irr⊥ = T≠F irrT≡F rel⊥ : .⊥ → ⊥ rel⊥ () absurd : ⊥ absurd = rel⊥ irr⊥
{ "alphanum_fraction": 0.6529351184, "avg_line_length": 15.4126984127, "ext": "agda", "hexsha": "c3c4ae4f4331a29441ff4322faef14e188f45b8c", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "98c9382a59f707c2c97d75919e389fc2a783ac75", "max_forks_repo_licenses": [ "BSD-2-Clause" ], "max_forks_repo_name": "KDr2/agda", "max_forks_repo_path": "test/Fail/Issue543a.agda", "max_issues_count": 6, "max_issues_repo_head_hexsha": "98c9382a59f707c2c97d75919e389fc2a783ac75", "max_issues_repo_issues_event_max_datetime": "2021-11-24T08:31:10.000Z", "max_issues_repo_issues_event_min_datetime": "2021-10-18T08:12:24.000Z", "max_issues_repo_licenses": [ "BSD-2-Clause" ], "max_issues_repo_name": "KDr2/agda", "max_issues_repo_path": "test/Fail/Issue543a.agda", "max_line_length": 55, "max_stars_count": null, "max_stars_repo_head_hexsha": "98c9382a59f707c2c97d75919e389fc2a783ac75", "max_stars_repo_licenses": [ "BSD-2-Clause" ], "max_stars_repo_name": "KDr2/agda", "max_stars_repo_path": "test/Fail/Issue543a.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 377, "size": 971 }
{-# OPTIONS --exact-split -v tc.cover.cover:100 #-} open import Common.Bool open import Common.Equality record Unit : Set where eta-equality constructor unit f : Unit → Bool → Bool f unit true = true f u false = false -- passes without --exact-split -- All equations pass do hold definitionally: test-1 : f unit true ≡ true test-1 = refl test-2 : ∀{u : Unit} → f u false ≡ false test-2 = refl -- Error: -- Exact splitting is enabled, but not all clauses can be preserved as -- definitional equalities in the translation to a case tree -- when checking the definition of f -- Should succeed.
{ "alphanum_fraction": 0.7006578947, "avg_line_length": 21.7142857143, "ext": "agda", "hexsha": "b905a9275f03d0b8d0ba4774c94fb84403fb3fe6", "lang": "Agda", "max_forks_count": 371, "max_forks_repo_forks_event_max_datetime": "2022-03-30T19:00:30.000Z", "max_forks_repo_forks_event_min_datetime": "2015-01-03T14:04:08.000Z", "max_forks_repo_head_hexsha": "231d6ad8e77b67ff8c4b1cb35a6c31ccd988c3e9", "max_forks_repo_licenses": [ "BSD-3-Clause" ], "max_forks_repo_name": "Agda-zh/agda", "max_forks_repo_path": "test/Succeed/Issue2434.agda", "max_issues_count": 4066, "max_issues_repo_head_hexsha": "ed8ac6f4062ea8a20fa0f62d5db82d4e68278338", "max_issues_repo_issues_event_max_datetime": "2022-03-31T21:14:49.000Z", "max_issues_repo_issues_event_min_datetime": "2015-01-10T11:24:51.000Z", "max_issues_repo_licenses": [ "BSD-3-Clause" ], "max_issues_repo_name": "shlevy/agda", "max_issues_repo_path": "test/Succeed/Issue2434.agda", "max_line_length": 70, "max_stars_count": 1989, "max_stars_repo_head_hexsha": "ed8ac6f4062ea8a20fa0f62d5db82d4e68278338", "max_stars_repo_licenses": [ "BSD-3-Clause" ], "max_stars_repo_name": "shlevy/agda", "max_stars_repo_path": "test/Succeed/Issue2434.agda", "max_stars_repo_stars_event_max_datetime": "2022-03-30T18:20:48.000Z", "max_stars_repo_stars_event_min_datetime": "2015-01-09T23:51:16.000Z", "num_tokens": 161, "size": 608 }
open import Common.IO open import Common.Unit open import Common.String open import Common.Nat record Stream (A : Set) : Set where coinductive field head : A tail : Stream A open Stream public repeat : ∀ {A} → A → Stream A head (repeat x) = x tail (repeat x) = repeat x lookup : ∀ {A} → Stream A → Nat → A lookup xs zero = xs .head lookup xs (suc n) = lookup (xs .tail) n main : IO Unit main = putStr (lookup (repeat "hello") 1000000)
{ "alphanum_fraction": 0.6659292035, "avg_line_length": 18.8333333333, "ext": "agda", "hexsha": "91d760c2470771b004f944805a544c76aabc21d6", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "026a8f8473ab91f99c3f6545728e71fa847d2720", "max_forks_repo_licenses": [ "BSD-3-Clause" ], "max_forks_repo_name": "xekoukou/agda-ocaml", "max_forks_repo_path": "test/Compiler/simple/Coinduction.agda", "max_issues_count": 16, "max_issues_repo_head_hexsha": "026a8f8473ab91f99c3f6545728e71fa847d2720", "max_issues_repo_issues_event_max_datetime": "2019-09-08T13:47:04.000Z", "max_issues_repo_issues_event_min_datetime": "2018-10-08T00:32:04.000Z", "max_issues_repo_licenses": [ "BSD-3-Clause" ], "max_issues_repo_name": "xekoukou/agda-ocaml", "max_issues_repo_path": "test/Compiler/simple/Coinduction.agda", "max_line_length": 47, "max_stars_count": 7, "max_stars_repo_head_hexsha": "026a8f8473ab91f99c3f6545728e71fa847d2720", "max_stars_repo_licenses": [ "BSD-3-Clause" ], "max_stars_repo_name": "xekoukou/agda-ocaml", "max_stars_repo_path": "test/Compiler/simple/Coinduction.agda", "max_stars_repo_stars_event_max_datetime": "2018-11-06T16:38:43.000Z", "max_stars_repo_stars_event_min_datetime": "2018-11-05T22:13:36.000Z", "num_tokens": 143, "size": 452 }
------------------------------------------------------------------------ -- The Agda standard library -- -- A different interface to the Kleene lists, designed to mimic -- Data.List. ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.List.Kleene.AsList where open import Level as Level using (Level) private variable a b c : Level A : Set a B : Set b C : Set c import Data.List.Kleene.Base as Kleene ------------------------------------------------------------------------ -- Here we import half of the functions from Data.KleeneList: the half -- for possibly-empty lists. open import Data.List.Kleene.Base public using ([]) renaming ( _* to List ; foldr* to foldr ; foldl* to foldl ; _++*_ to _++_ ; map* to map ; mapMaybe* to mapMaybe ; pure* to pure ; _<*>*_ to _<*>_ ; _>>=*_ to _>>=_ ; mapAccumˡ* to mapAccumˡ ; mapAccumʳ* to mapAccumʳ ; _[_]* to _[_] ; applyUpTo* to applyUpTo ; upTo* to upTo ; zipWith* to zipWith ; unzipWith* to unzipWith ; partitionSumsWith* to partitionSumsWith ; reverse* to reverse ) ------------------------------------------------------------------------ -- A pattern which mimics Data.List._∷_ infixr 5 _∷_ pattern _∷_ x xs = Kleene.∹ x Kleene.& xs ------------------------------------------------------------------------ -- The following functions change the type of the list (from ⁺ to * or vice -- versa) in Data.KleeneList, so we reimplement them here to keep the -- type the same. scanr : (A → B → B) → B → List A → List B scanr f b xs = Kleene.∹ Kleene.scanr* f b xs scanl : (B → A → B) → B → List A → List B scanl f b xs = Kleene.∹ Kleene.scanl* f b xs tails : List A → List (List A) tails xs = foldr (λ x xs → (Kleene.∹ x) ∷ xs) ([] ∷ []) (Kleene.tails* xs)
{ "alphanum_fraction": 0.4557757371, "avg_line_length": 29.9855072464, "ext": "agda", "hexsha": "107e39e07959ea91c2f80a85579617eb7aaa222d", "lang": "Agda", "max_forks_count": 1, "max_forks_repo_forks_event_max_datetime": "2021-11-04T06:54:45.000Z", "max_forks_repo_forks_event_min_datetime": "2021-11-04T06:54:45.000Z", "max_forks_repo_head_hexsha": "fb380f2e67dcb4a94f353dbaec91624fcb5b8933", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "DreamLinuxer/popl21-artifact", "max_forks_repo_path": "agda-stdlib/src/Data/List/Kleene/AsList.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "fb380f2e67dcb4a94f353dbaec91624fcb5b8933", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "DreamLinuxer/popl21-artifact", "max_issues_repo_path": "agda-stdlib/src/Data/List/Kleene/AsList.agda", "max_line_length": 75, "max_stars_count": 5, "max_stars_repo_head_hexsha": "fb380f2e67dcb4a94f353dbaec91624fcb5b8933", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "DreamLinuxer/popl21-artifact", "max_stars_repo_path": "agda-stdlib/src/Data/List/Kleene/AsList.agda", "max_stars_repo_stars_event_max_datetime": "2020-10-10T21:41:32.000Z", "max_stars_repo_stars_event_min_datetime": "2020-10-07T12:07:53.000Z", "num_tokens": 548, "size": 2069 }
module Nat where open import Function hiding (_∘_; id) open import Level open import Basic open import Category import Functor open Category.Category open Functor.Functor record Nat {C₀ C₁ ℓ D₀ D₁ ℓ′} {C : Category C₀ C₁ ℓ} {D : Category D₀ D₁ ℓ′} (F G : Functor.Functor C D) : Set (suc (C₀ ⊔ C₁ ⊔ ℓ ⊔ D₀ ⊔ D₁ ⊔ ℓ′)) where field component : (X : Obj C) → Hom D (fobj F X) (fobj G X) field naturality : {a b : Obj C} {f : Hom C a b} → D [ D [ component b ∘ fmap F f ] ≈ D [ fmap G f ∘ component a ] ] open Nat identity : ∀{C₀ C₁ ℓ D₀ D₁ ℓ′} {C : Category C₀ C₁ ℓ} {D : Category D₀ D₁ ℓ′} → (F : Functor.Functor C D) → Nat F F identity {D = D} F = record { component = λ X → id D ; naturality = λ {a} {b} {f} → trans-hom D (leftId D) (sym-hom D (rightId D)) } compose : ∀{C₀ C₁ ℓ D₀ D₁ ℓ′} {C : Category C₀ C₁ ℓ} {D : Category D₀ D₁ ℓ′} → {F G H : Functor.Functor C D} → Nat G H → Nat F G → Nat F H compose {C = C} {D} {F} {G} {H} η ε = record { component = λ X → D [ component η X ∘ component ε X ] ; naturality = λ {a} {b} {f} → (begin⟨ D ⟩ D [ (D [ component η b ∘ component ε b ]) ∘ fmap F f ] ≈⟨ assoc D ⟩ D [ component η b ∘ (D [ component ε b ∘ fmap F f ]) ] ≈⟨ ≈-composite D (refl-hom D) (naturality ε) ⟩ D [ component η b ∘ (D [ fmap G f ∘ component ε a ]) ] ≈⟨ sym-hom D (assoc D) ⟩ D [ (D [ component η b ∘ fmap G f ]) ∘ component ε a ] ≈⟨ ≈-composite D (naturality η) (refl-hom D) ⟩ D [ (D [ fmap H f ∘ component η a ]) ∘ component ε a ] ≈⟨ assoc D ⟩ D [ fmap H f ∘ (D [ component η a ∘ component ε a ]) ] ∎) } composeNF : ∀{C₀ C₁ ℓ D₀ D₁ ℓ′ E₀ E₁ ℓ″} {C : Category C₀ C₁ ℓ} {D : Category D₀ D₁ ℓ′} {E : Category E₀ E₁ ℓ″} {A B : Functor.Functor D E} → Nat A B → (F : Functor.Functor C D) → Nat (Functor.compose A F) (Functor.compose B F) composeNF {C = C} {D} {E} {A} {B} η F = record { component = λ X → component η (fobj F X) ; naturality = λ {a} {b} {f} → naturality η } composeFN : ∀{C₀ C₁ ℓ D₀ D₁ ℓ′ E₀ E₁ ℓ″} {C : Category C₀ C₁ ℓ} {D : Category D₀ D₁ ℓ′} {E : Category E₀ E₁ ℓ″} {A B : Functor.Functor C D} (F : Functor.Functor D E) → Nat A B → Nat (Functor.compose F A) (Functor.compose F B) composeFN {C = C} {D} {E} {A} {B} F η = record { component = λ X → fmap F (component η X) ; naturality = λ {a} {b} {f} → begin⟨ E ⟩ E [ fmap F (component η b) ∘ fmap (Functor.compose F A) f ] ≈⟨ sym-hom E (preserveComp F) ⟩ fmap F (D [ component η b ∘ fmap A f ]) ≈⟨ Functor.preserveEq F (naturality η) ⟩ fmap F (D [ fmap B f ∘ component η a ]) ≈⟨ preserveComp F ⟩ E [ fmap (Functor.compose F B) f ∘ fmap F (component η a) ] ∎ } equality : ∀{C₀ C₁ ℓ D₀ D₁ ℓ′} {C : Category C₀ C₁ ℓ} {D : Category D₀ D₁ ℓ′} {F G : Functor.Functor C D} → (η τ : Nat F G) → Set _ equality {C = C} {D} η τ = ∀ {a : Obj C} → D [ component η a ≈ component τ a ] subst : ∀{C₀ C₁ ℓ D₀ D₁ ℓ′} {C : Category C₀ C₁ ℓ} {D : Category D₀ D₁ ℓ′} {F G : Functor.Functor C D} {η τ : Nat F G} → (a : Obj C) → equality η τ → D [ component η a ≈ component τ a ] subst a eq = eq {a} HomFunctor : ∀ {c₀ c₁ ℓ} (C : Category c₀ c₁ ℓ) (X : Obj C) → Functor.Functor C Setoids HomFunctor C X = record { fobj = λ x → (Homsetoid C X x) ; fmapsetoid = record { mapping = λ x → record { mapping = λ x₁ → C [ x ∘ x₁ ] ; preserveEq = ≈-composite C (refl-hom C) } ; preserveEq = λ x₁ x₂ → ≈-composite C x₁ (refl-hom C) } ; preserveId = λ x → leftId C ; preserveComp = λ x → assoc C } HomNat : ∀ {c₀ c₁ ℓ} (C : Category c₀ c₁ ℓ) {A B : Obj C} (f : Hom C A B) → Nat (HomFunctor C B) (HomFunctor C A) HomNat C {A} {B} f = record { component = component-map ; naturality = λ {a} {b} {x} → λ x₁ → begin⟨ C ⟩ Map.mapping (Setoids [ component-map b ∘ fmap (HomFunctor C B) x ]) x₁ ≈⟨ refl-hom C ⟩ C [ C [ x ∘ x₁ ] ∘ f ] ≈⟨ assoc C ⟩ C [ x ∘ C [ x₁ ∘ f ] ] ≈⟨ refl-hom C ⟩ Map.mapping (Setoids [ fmap (HomFunctor C A) x ∘ component-map a ]) x₁ ∎ } where component-map = λ X → record { mapping = λ x → C [ x ∘ f ] ; preserveEq = λ x₁ → ≈-composite C x₁ (refl-hom C) } HomFunctorOp : ∀ {c₀ c₁ ℓ} (C : Category c₀ c₁ ℓ) (X : Obj C) → Functor.Functor (op C) Setoids HomFunctorOp C X = record { fobj = λ x → (Homsetoid C x X) ; fmapsetoid = record { mapping = λ x → record { mapping = λ x₁ → C [ x₁ ∘ x ] ; preserveEq = ≈-composite (op C) (refl-hom C) } ; preserveEq = λ x₁ x₂ → ≈-composite (op C) x₁ (refl-hom C) } ; preserveId = λ x → leftId (op C) ; preserveComp = λ x → assoc (op C) } HomNatOp : ∀ {c₀ c₁ ℓ} (C : Category c₀ c₁ ℓ) {A B : Obj C} (f : Hom C A B) → Nat (HomFunctorOp C A) (HomFunctorOp C B) HomNatOp C {A} {B} f = record { component = component-map ; naturality = λ {a} {b} {x} → λ x₁ → begin⟨ C ⟩ Map.mapping (Setoids [ component-map b ∘ fmap (HomFunctorOp C A) x ]) x₁ ≈⟨ refl-hom C ⟩ C [ f ∘ C [ x₁ ∘ x ] ] ≈⟨ sym-hom C (assoc C) ⟩ C [ C [ f ∘ x₁ ] ∘ x ] ≈⟨ refl-hom C ⟩ Map.mapping (Setoids [ fmap (HomFunctorOp C B) x ∘ component-map a ]) x₁ ∎ } where component-map = λ X → record { mapping = λ x → C [ f ∘ x ] ; preserveEq = λ x₁ → ≈-composite C (refl-hom C) x₁ } FunCat : ∀{C₀ C₁ ℓ D₀ D₁ ℓ′} → (Category C₀ C₁ ℓ) → (Category D₀ D₁ ℓ′) → Category _ _ _ FunCat C D = record { Obj = Functor.Functor C D; Homsetoid = λ F G → record { Carrier = Nat F G ; _≈_ = equality ; isEquivalence = record { refl = λ {x} {a} → refl-hom D ; sym = λ x → λ {a} → sym-hom D x ; trans = λ x x₁ → λ {a} → trans-hom D x x₁ } }; comp = compose; id = λ {A} → identity A; leftId = λ {A} {B} {f} {a} → leftId D; rightId = λ {A} {B} {f} {a} → rightId D; assoc = λ {A} {B} {C₁} {D₁} {f} {g} {h} {a} → assoc D; ≈-composite = λ x x₁ → ≈-composite D x x₁ } assocNat→ : ∀{B₀ B₁ ℓ‴ C₀ C₁ ℓ D₀ D₁ ℓ′ E₀ E₁ ℓ″} {B : Category B₀ B₁ ℓ‴} {C : Category C₀ C₁ ℓ} {D : Category D₀ D₁ ℓ′} {E : Category E₀ E₁ ℓ″} {F : Functor.Functor B C} {G : Functor.Functor C D} {H : Functor.Functor D E} → Nat (Functor.compose (Functor.compose H G) F) (Functor.compose H (Functor.compose G F)) assocNat→ {C = C} {D} {E} {F} = record { component = λ X → id E ; naturality = λ {a} {b} {f} → trans-hom E (leftId E) (sym-hom E (rightId E)) } assocNat← : ∀{B₀ B₁ ℓ‴ C₀ C₁ ℓ D₀ D₁ ℓ′ E₀ E₁ ℓ″} {B : Category B₀ B₁ ℓ‴} {C : Category C₀ C₁ ℓ} {D : Category D₀ D₁ ℓ′} {E : Category E₀ E₁ ℓ″} {F : Functor.Functor B C} {G : Functor.Functor C D} {H : Functor.Functor D E} → Nat (Functor.compose H (Functor.compose G F)) (Functor.compose (Functor.compose H G) F) assocNat← {C = C} {D} {E} {F} = record { component = λ X → id E ; naturality = λ {a} {b} {f} → trans-hom E (leftId E) (sym-hom E (rightId E)) } leftIdNat→ : ∀{C₀ C₁ ℓ D₀ D₁ ℓ′} {C : Category C₀ C₁ ℓ} {D : Category D₀ D₁ ℓ′} {F : Functor.Functor C D} → Nat (Functor.compose (Functor.identity D) F) F leftIdNat→ {C = C} {D} {F} = record { component = λ X → id D ; naturality = λ {a} {b} {f} → trans-hom D (leftId D) (sym-hom D (rightId D)) } leftIdNat← : ∀{C₀ C₁ ℓ D₀ D₁ ℓ′} {C : Category C₀ C₁ ℓ} {D : Category D₀ D₁ ℓ′} {F : Functor.Functor C D} → Nat F (Functor.compose (Functor.identity D) F) leftIdNat← {C = C} {D} {F} = record { component = λ X → id D ; naturality = λ {a} {b} {f} → trans-hom D (leftId D) (sym-hom D (rightId D)) } rightIdNat→ : ∀{C₀ C₁ ℓ D₀ D₁ ℓ′} {C : Category C₀ C₁ ℓ} {D : Category D₀ D₁ ℓ′} {F : Functor.Functor C D} → Nat (Functor.compose F (Functor.identity C)) F rightIdNat→ {C = C} {D} {F} = record { component = λ X → id D ; naturality = λ {a} {b} {f} → trans-hom D (leftId D) (sym-hom D (rightId D)) } rightIdNat← : ∀{C₀ C₁ ℓ D₀ D₁ ℓ′} {C : Category C₀ C₁ ℓ} {D : Category D₀ D₁ ℓ′} {F : Functor.Functor C D} → Nat F (Functor.compose F (Functor.identity C)) rightIdNat← {C = C} {D} {F} = record { component = λ X → id D ; naturality = λ {a} {b} {f} → trans-hom D (leftId D) (sym-hom D (rightId D)) } module Export where infixl 6 _F∘N_ _N∘F_ _F∘N_ = composeFN _N∘F_ = composeNF Hom[_][_,-] = HomFunctor Hom[_][-,_] = HomFunctorOp HomNat[_][_,-] = HomNat HomNat[_][-,_] = HomNatOp [_,_] : ∀{C₀ C₁ ℓ D₀ D₁ ℓ′} (C : Category C₀ C₁ ℓ) → (D : Category D₀ D₁ ℓ′) → Category _ _ _ [_,_] = FunCat PSh[_] : ∀{C₀ C₁ ℓ} (C : Category C₀ C₁ ℓ) → Category _ _ _ PSh[_] {_} {C₁} {ℓ} C = [ op C , Setoids {C₁} {ℓ} ]
{ "alphanum_fraction": 0.5683106234, "avg_line_length": 50.2606060606, "ext": "agda", "hexsha": "35562b7d57093a1be93439cdb73567c0b7299d63", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "59004994acdbc65fb4f8abf0baa1777a8dbe758e", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "myuon/agda-cate", "max_forks_repo_path": "src/Nat.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "59004994acdbc65fb4f8abf0baa1777a8dbe758e", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "myuon/agda-cate", "max_issues_repo_path": "src/Nat.agda", "max_line_length": 312, "max_stars_count": 2, "max_stars_repo_head_hexsha": "59004994acdbc65fb4f8abf0baa1777a8dbe758e", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "myuon/agda-cate", "max_stars_repo_path": "src/Nat.agda", "max_stars_repo_stars_event_max_datetime": "2019-11-02T07:30:47.000Z", "max_stars_repo_stars_event_min_datetime": "2018-07-28T04:59:31.000Z", "num_tokens": 3583, "size": 8293 }
-- Andreas, 2016-07-28, issue #1720 record Foo (A : Set) : Set where a : A a = {!!} where a' : A a' = {!!} field f : A -- Now: better error: -- This declaration is illegal in a record before the last field -- when scope checking the declaration -- record Foo A where -- mutual -- a : A -- a = ? -- where -- a' : A -- a' = ? -- field f : A -- Ideally: should pass
{ "alphanum_fraction": 0.4931192661, "avg_line_length": 16.7692307692, "ext": "agda", "hexsha": "426bb438d271e0d47bfc22e63533abdee2ec4af1", "lang": "Agda", "max_forks_count": 371, "max_forks_repo_forks_event_max_datetime": "2022-03-30T19:00:30.000Z", "max_forks_repo_forks_event_min_datetime": "2015-01-03T14:04:08.000Z", "max_forks_repo_head_hexsha": "7f58030124fa99dfbf8db376659416f3ad8384de", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "cruhland/agda", "max_forks_repo_path": "test/Fail/Issue1720-1.agda", "max_issues_count": 4066, "max_issues_repo_head_hexsha": "7f58030124fa99dfbf8db376659416f3ad8384de", "max_issues_repo_issues_event_max_datetime": "2022-03-31T21:14:49.000Z", "max_issues_repo_issues_event_min_datetime": "2015-01-10T11:24:51.000Z", "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "cruhland/agda", "max_issues_repo_path": "test/Fail/Issue1720-1.agda", "max_line_length": 64, "max_stars_count": 1989, "max_stars_repo_head_hexsha": "7f58030124fa99dfbf8db376659416f3ad8384de", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "cruhland/agda", "max_stars_repo_path": "test/Fail/Issue1720-1.agda", "max_stars_repo_stars_event_max_datetime": "2022-03-30T18:20:48.000Z", "max_stars_repo_stars_event_min_datetime": "2015-01-09T23:51:16.000Z", "num_tokens": 137, "size": 436 }
{-# OPTIONS --without-K --safe #-} open import Categories.Category.Monoidal.Structure using (MonoidalCategory) module Categories.Category.Construction.MonoidalFunctors {o ℓ e o′ ℓ′ e′} (C : MonoidalCategory o ℓ e) (D : MonoidalCategory o′ ℓ′ e′) where -- The functor category for a given pair of monoidal categories open import Level open import Data.Product using (_,_) open import Relation.Binary.Construct.On using (isEquivalence) open import Categories.Category using (Category) open import Categories.Category.Monoidal open import Categories.Functor.Monoidal import Categories.NaturalTransformation.Monoidal as NT open import Categories.NaturalTransformation.Equivalence using (_≃_; ≃-isEquivalence) open MonoidalCategory D module Lax where MonoidalFunctors : Category (o ⊔ ℓ ⊔ e ⊔ o′ ⊔ ℓ′ ⊔ e′) (o ⊔ ℓ ⊔ ℓ′ ⊔ e′) (o ⊔ e′) MonoidalFunctors = record { Obj = MonoidalFunctor C D ; _⇒_ = MonoidalNaturalTransformation ; _≈_ = λ α β → U α ≃ U β ; id = idNT ; _∘_ = _∘ᵥ_ ; assoc = assoc ; sym-assoc = sym-assoc ; identityˡ = identityˡ ; identityʳ = identityʳ ; identity² = identity² ; equiv = isEquivalence U ≃-isEquivalence ; ∘-resp-≈ = λ α₁≈β₁ α₂≈β₂ → ∘-resp-≈ α₁≈β₁ α₂≈β₂ } where open NT.Lax renaming (id to idNT) open MonoidalNaturalTransformation using (U) module Strong where MonoidalFunctors : Category (o ⊔ ℓ ⊔ e ⊔ o′ ⊔ ℓ′ ⊔ e′) (o ⊔ ℓ ⊔ ℓ′ ⊔ e′) (o ⊔ e′) MonoidalFunctors = record { Obj = StrongMonoidalFunctor C D ; _⇒_ = MonoidalNaturalTransformation ; _≈_ = λ α β → U α ≃ U β ; id = idNT ; _∘_ = _∘ᵥ_ ; assoc = assoc ; sym-assoc = sym-assoc ; identityˡ = identityˡ ; identityʳ = identityʳ ; identity² = identity² ; equiv = isEquivalence U ≃-isEquivalence ; ∘-resp-≈ = λ α₁≈β₁ α₂≈β₂ → ∘-resp-≈ α₁≈β₁ α₂≈β₂ } where open NT.Strong renaming (id to idNT) open MonoidalNaturalTransformation using (U)
{ "alphanum_fraction": 0.635518591, "avg_line_length": 31.4461538462, "ext": "agda", "hexsha": "2596b56414508d923dfd909b19bcddfa7c0d1765", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "f8a33de12956c729c7fb00a302f166a643eb6052", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "TOTBWF/agda-categories", "max_forks_repo_path": "src/Categories/Category/Construction/MonoidalFunctors.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "f8a33de12956c729c7fb00a302f166a643eb6052", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "TOTBWF/agda-categories", "max_issues_repo_path": "src/Categories/Category/Construction/MonoidalFunctors.agda", "max_line_length": 75, "max_stars_count": null, "max_stars_repo_head_hexsha": "f8a33de12956c729c7fb00a302f166a643eb6052", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "TOTBWF/agda-categories", "max_stars_repo_path": "src/Categories/Category/Construction/MonoidalFunctors.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 701, "size": 2044 }
------------------------------------------------------------------------ -- The Agda standard library -- -- Homomorphism proofs for constants over polynomials ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Tactic.RingSolver.Core.Polynomial.Parameters module Tactic.RingSolver.Core.Polynomial.Homomorphism.Constants {r₁ r₂ r₃ r₄} (homo : Homomorphism r₁ r₂ r₃ r₄) where open Homomorphism homo open import Data.Vec.Base using (Vec) open import Tactic.RingSolver.Core.Polynomial.Base (Homomorphism.from homo) open import Tactic.RingSolver.Core.Polynomial.Semantics homo κ-hom : ∀ {n} (x : Raw.Carrier) (Ρ : Vec Carrier n) → ⟦ κ x ⟧ Ρ ≈ ⟦ x ⟧ᵣ κ-hom x _ = refl
{ "alphanum_fraction": 0.5908479139, "avg_line_length": 29.72, "ext": "agda", "hexsha": "6e8e44e6bd0bb8cebf65fb8337ce6288264eb1cf", "lang": "Agda", "max_forks_count": 1, "max_forks_repo_forks_event_max_datetime": "2021-11-04T06:54:45.000Z", "max_forks_repo_forks_event_min_datetime": "2021-11-04T06:54:45.000Z", "max_forks_repo_head_hexsha": "fb380f2e67dcb4a94f353dbaec91624fcb5b8933", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "DreamLinuxer/popl21-artifact", "max_forks_repo_path": "agda-stdlib/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Constants.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "fb380f2e67dcb4a94f353dbaec91624fcb5b8933", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "DreamLinuxer/popl21-artifact", "max_issues_repo_path": "agda-stdlib/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Constants.agda", "max_line_length": 75, "max_stars_count": 5, "max_stars_repo_head_hexsha": "fb380f2e67dcb4a94f353dbaec91624fcb5b8933", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "DreamLinuxer/popl21-artifact", "max_stars_repo_path": "agda-stdlib/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Constants.agda", "max_stars_repo_stars_event_max_datetime": "2020-10-10T21:41:32.000Z", "max_stars_repo_stars_event_min_datetime": "2020-10-07T12:07:53.000Z", "num_tokens": 193, "size": 743 }
module PublicWithoutOpen where module A where module B = A public
{ "alphanum_fraction": 0.7941176471, "avg_line_length": 11.3333333333, "ext": "agda", "hexsha": "fdc5f2fae7e9d0d6d754843da13f3e55842a8d38", "lang": "Agda", "max_forks_count": 371, "max_forks_repo_forks_event_max_datetime": "2022-03-30T19:00:30.000Z", "max_forks_repo_forks_event_min_datetime": "2015-01-03T14:04:08.000Z", "max_forks_repo_head_hexsha": "231d6ad8e77b67ff8c4b1cb35a6c31ccd988c3e9", "max_forks_repo_licenses": [ "BSD-3-Clause" ], "max_forks_repo_name": "Agda-zh/agda", "max_forks_repo_path": "test/Succeed/PublicWithoutOpen.agda", "max_issues_count": 4066, "max_issues_repo_head_hexsha": "ed8ac6f4062ea8a20fa0f62d5db82d4e68278338", "max_issues_repo_issues_event_max_datetime": "2022-03-31T21:14:49.000Z", "max_issues_repo_issues_event_min_datetime": "2015-01-10T11:24:51.000Z", "max_issues_repo_licenses": [ "BSD-3-Clause" ], "max_issues_repo_name": "shlevy/agda", "max_issues_repo_path": "test/Succeed/PublicWithoutOpen.agda", "max_line_length": 30, "max_stars_count": 1989, "max_stars_repo_head_hexsha": "ed8ac6f4062ea8a20fa0f62d5db82d4e68278338", "max_stars_repo_licenses": [ "BSD-3-Clause" ], "max_stars_repo_name": "shlevy/agda", "max_stars_repo_path": "test/Succeed/PublicWithoutOpen.agda", "max_stars_repo_stars_event_max_datetime": "2022-03-30T18:20:48.000Z", "max_stars_repo_stars_event_min_datetime": "2015-01-09T23:51:16.000Z", "num_tokens": 16, "size": 68 }
------------------------------------------------------------------------------ -- Alter: An unguarded co-recursive function ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTIONS --without-K #-} module FOT.FOTC.UnguardedCorecursion.Alter.AlterSL where open import Codata.Musical.Notation open import Codata.Musical.Stream open import Data.Bool.Base ------------------------------------------------------------------------------ -- TODO (2019-01-04): Agda doesn't accept this definition which was -- accepted by a previous version. {-# TERMINATING #-} alter : Stream Bool alter = true ∷ ♯ (false ∷ ♯ alter) {-# TERMINATING #-} alter' : Stream Bool alter' = true ∷ ♯ (map not alter')
{ "alphanum_fraction": 0.4769585253, "avg_line_length": 32.1481481481, "ext": "agda", "hexsha": "a96f50dbdd6d6e4fa64e748206eb65d04a07fa9e", "lang": "Agda", "max_forks_count": 3, "max_forks_repo_forks_event_max_datetime": "2018-03-14T08:50:00.000Z", "max_forks_repo_forks_event_min_datetime": "2016-09-19T14:18:30.000Z", "max_forks_repo_head_hexsha": "2fc9f2b81052a2e0822669f02036c5750371b72d", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "asr/fotc", "max_forks_repo_path": "notes/FOT/FOTC/UnguardedCorecursion/Alter/AlterSL.agda", "max_issues_count": 2, "max_issues_repo_head_hexsha": "2fc9f2b81052a2e0822669f02036c5750371b72d", "max_issues_repo_issues_event_max_datetime": "2017-01-01T14:34:26.000Z", "max_issues_repo_issues_event_min_datetime": "2016-10-12T17:28:16.000Z", "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "asr/fotc", "max_issues_repo_path": "notes/FOT/FOTC/UnguardedCorecursion/Alter/AlterSL.agda", "max_line_length": 78, "max_stars_count": 11, "max_stars_repo_head_hexsha": "2fc9f2b81052a2e0822669f02036c5750371b72d", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "asr/fotc", "max_stars_repo_path": "notes/FOT/FOTC/UnguardedCorecursion/Alter/AlterSL.agda", "max_stars_repo_stars_event_max_datetime": "2021-09-12T16:09:54.000Z", "max_stars_repo_stars_event_min_datetime": "2015-09-03T20:53:42.000Z", "num_tokens": 166, "size": 868 }
module Tactic.Reflection.Telescope where open import Prelude hiding (abs) open import Builtin.Reflection open import Tactic.Reflection.DeBruijn Telescope = List (String × Arg Type) telView : Type → Telescope × Type telView (pi a (abs x b)) = first (_∷_ (x , a)) (telView b) telView a = [] , a visibleArity : Type → Nat visibleArity = length ∘ filter (isVisible ∘ snd) ∘ fst ∘ telView telPi : Telescope → Type → Type telPi tel b = foldr (λ (x , a) b → pi a (abs x b)) b tel arity : Name → TC Nat arity f = length ∘ fst ∘ telView <$> getType f argTel : Name → TC Telescope argTel f = fst ∘ telView <$> getType f telePat : Telescope → List (Arg Pattern) telePat tel = zipWith (λ x (_ , a) → var x <$ a) (reverse $ from 0 for n) tel where n = length tel private teleArgs′ : Nat → List (Arg Type) → List (Arg Term) teleArgs′ (suc n) (a ∷ Γ) = (var n [] <$ a) ∷ teleArgs′ n Γ teleArgs′ _ _ = [] teleArgs : Telescope → List (Arg Term) teleArgs Γ = teleArgs′ (length Γ) (map snd Γ) conParams : Name → TC Nat conParams c = caseM getDefinition c of λ { (data-cons d) → getParameters d ; _ → pure 0 } conPat : Name → TC Pattern conPat c = do np ← conParams c con c ∘ telePat ∘ drop np <$> argTel c conTerm : Name → TC Term conTerm c = do np ← conParams c con c ∘ teleArgs ∘ drop np <$> argTel c
{ "alphanum_fraction": 0.6354862658, "avg_line_length": 25.4150943396, "ext": "agda", "hexsha": "2a996a597eed70fa51cb95433e3f61661a6b7eeb", "lang": "Agda", "max_forks_count": 24, "max_forks_repo_forks_event_max_datetime": "2021-04-22T06:10:41.000Z", "max_forks_repo_forks_event_min_datetime": "2015-03-12T18:03:45.000Z", "max_forks_repo_head_hexsha": "158d299b1b365e186f00d8ef5b8c6844235ee267", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "L-TChen/agda-prelude", "max_forks_repo_path": "src/Tactic/Reflection/Telescope.agda", "max_issues_count": 59, "max_issues_repo_head_hexsha": "158d299b1b365e186f00d8ef5b8c6844235ee267", "max_issues_repo_issues_event_max_datetime": "2022-01-14T07:32:36.000Z", "max_issues_repo_issues_event_min_datetime": "2016-02-09T05:36:44.000Z", "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "L-TChen/agda-prelude", "max_issues_repo_path": "src/Tactic/Reflection/Telescope.agda", "max_line_length": 77, "max_stars_count": 111, "max_stars_repo_head_hexsha": "158d299b1b365e186f00d8ef5b8c6844235ee267", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "L-TChen/agda-prelude", "max_stars_repo_path": "src/Tactic/Reflection/Telescope.agda", "max_stars_repo_stars_event_max_datetime": "2022-02-12T23:29:26.000Z", "max_stars_repo_stars_event_min_datetime": "2015-01-05T11:28:15.000Z", "num_tokens": 442, "size": 1347 }
-- The ATP pragma with the role <prove> can be used with postulates. module ATPConjecture where postulate D : Set _≡_ : D → D → Set postulate sym : ∀ {m n} → m ≡ n → n ≡ m {-# ATP prove sym #-}
{ "alphanum_fraction": 0.6048780488, "avg_line_length": 17.0833333333, "ext": "agda", "hexsha": "8ea3338b8fe40cf29c8e3f0bb9505b6594e8401a", "lang": "Agda", "max_forks_count": 4, "max_forks_repo_forks_event_max_datetime": "2016-08-03T03:54:55.000Z", "max_forks_repo_forks_event_min_datetime": "2016-05-10T23:06:19.000Z", "max_forks_repo_head_hexsha": "a66c5ddca2ab470539fd68c42c4fbd45f720d682", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "asr/apia", "max_forks_repo_path": "examples/ATPConjecture.agda", "max_issues_count": 121, "max_issues_repo_head_hexsha": "a66c5ddca2ab470539fd68c42c4fbd45f720d682", "max_issues_repo_issues_event_max_datetime": "2018-04-22T06:01:44.000Z", "max_issues_repo_issues_event_min_datetime": "2015-01-25T13:22:12.000Z", "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "asr/apia", "max_issues_repo_path": "examples/ATPConjecture.agda", "max_line_length": 68, "max_stars_count": 10, "max_stars_repo_head_hexsha": "a66c5ddca2ab470539fd68c42c4fbd45f720d682", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "asr/apia", "max_stars_repo_path": "examples/ATPConjecture.agda", "max_stars_repo_stars_event_max_datetime": "2019-12-03T13:44:25.000Z", "max_stars_repo_stars_event_min_datetime": "2015-09-03T20:54:16.000Z", "num_tokens": 72, "size": 205 }
{-# OPTIONS --without-K --safe #-} open import Categories.Category open import Categories.Functor hiding (id) -- Cone over a Functor F (from shape category J into category C) module Categories.Diagram.Cone {o ℓ e} {o′ ℓ′ e′} {C : Category o ℓ e} {J : Category o′ ℓ′ e′} (F : Functor J C) where open Category C open Functor F open import Level record Apex (N : Obj) : Set (ℓ′ ⊔ o′ ⊔ e ⊔ ℓ) where field ψ : (X : Category.Obj J) → (N ⇒ F₀ X) commute : ∀ {X Y} (f : J [ X , Y ]) → F₁ f ∘ ψ X ≈ ψ Y record Cone : Set (o ⊔ ℓ′ ⊔ o′ ⊔ e ⊔ ℓ) where field {N} : Obj apex : Apex N open Apex apex public open Apex open Cone record Cone⇒ (c c′ : Cone) : Set (ℓ ⊔ e ⊔ o′) where field arr : N c ⇒ N c′ commute : ∀ {X} → ψ c′ X ∘ arr ≈ ψ c X open Cone⇒
{ "alphanum_fraction": 0.5681818182, "avg_line_length": 22, "ext": "agda", "hexsha": "26e930f15e137b948b75ccca482051d5d7213706", "lang": "Agda", "max_forks_count": 64, "max_forks_repo_forks_event_max_datetime": "2022-03-14T02:00:59.000Z", "max_forks_repo_forks_event_min_datetime": "2019-06-02T16:58:15.000Z", "max_forks_repo_head_hexsha": "d9e4f578b126313058d105c61707d8c8ae987fa8", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "Code-distancing/agda-categories", "max_forks_repo_path": "src/Categories/Diagram/Cone.agda", "max_issues_count": 236, "max_issues_repo_head_hexsha": "d9e4f578b126313058d105c61707d8c8ae987fa8", "max_issues_repo_issues_event_max_datetime": "2022-03-28T14:31:43.000Z", "max_issues_repo_issues_event_min_datetime": "2019-06-01T14:53:54.000Z", "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "Code-distancing/agda-categories", "max_issues_repo_path": "src/Categories/Diagram/Cone.agda", "max_line_length": 89, "max_stars_count": 279, "max_stars_repo_head_hexsha": "d9e4f578b126313058d105c61707d8c8ae987fa8", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "Trebor-Huang/agda-categories", "max_stars_repo_path": "src/Categories/Diagram/Cone.agda", "max_stars_repo_stars_event_max_datetime": "2022-03-22T00:40:14.000Z", "max_stars_repo_stars_event_min_datetime": "2019-06-01T14:36:40.000Z", "num_tokens": 309, "size": 792 }
module Luau.Value where open import Agda.Builtin.Float using (Float) open import Luau.Addr using (Addr) open import Luau.Syntax using (Block; Expr; nil; addr; number) open import Luau.Var using (Var) data Value : Set where nil : Value addr : Addr → Value number : Float → Value val : ∀ {a} → Value → Expr a val nil = nil val (addr a) = addr a val (number x) = number x
{ "alphanum_fraction": 0.6931216931, "avg_line_length": 22.2352941176, "ext": "agda", "hexsha": "1086d39c5ab0c25a0ece2293c8a5b9a6c942c44d", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "cd18adc20ecb805b8eeb770a9e5ef8e0cd123734", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "Tr4shh/Roblox-Luau", "max_forks_repo_path": "prototyping/Luau/Value.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "cd18adc20ecb805b8eeb770a9e5ef8e0cd123734", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "Tr4shh/Roblox-Luau", "max_issues_repo_path": "prototyping/Luau/Value.agda", "max_line_length": 62, "max_stars_count": null, "max_stars_repo_head_hexsha": "cd18adc20ecb805b8eeb770a9e5ef8e0cd123734", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "Tr4shh/Roblox-Luau", "max_stars_repo_path": "prototyping/Luau/Value.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 112, "size": 378 }
------------------------------------------------------------------------ -- The Agda standard library -- -- Properties related to All ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Vec.Functional.Relation.Unary.All.Properties where open import Data.Fin.Base open import Data.Fin.Properties open import Data.Nat.Base open import Data.Product as Σ using (_×_; _,_; proj₁; proj₂; uncurry) open import Data.Sum.Base using (_⊎_; inj₁; inj₂; [_,_]) open import Data.Vec.Functional as VF hiding (map) open import Data.Vec.Functional.Relation.Unary.All open import Function open import Level using (Level) open import Relation.Unary private variable a b c p q r ℓ : Level A : Set a B : Set b C : Set c ------------------------------------------------------------------------ -- map module _ {P : Pred A p} {Q : Pred B q} {f : A → B} where map⁺ : (∀ {x} → P x → Q (f x)) → ∀ {n xs} → All P {n = n} xs → All Q (VF.map f xs) map⁺ pq ps i = pq (ps i) ------------------------------------------------------------------------ -- replicate module _ {P : Pred A p} {x : A} {n : ℕ} where replicate⁺ : P x → All P (replicate {n = n} x) replicate⁺ = const ------------------------------------------------------------------------ -- _⊛_ module _ {P : Pred A p} {Q : Pred B q} where ⊛⁺ : ∀ {n} {fs : Vector (A → B) n} {xs} → All (λ f → ∀ {x} → P x → Q (f x)) fs → All P xs → All Q (fs ⊛ xs) ⊛⁺ pqs ps i = (pqs i) (ps i) ------------------------------------------------------------------------ -- zipWith module _ {P : Pred A p} {Q : Pred B q} {R : Pred C r} where zipWith⁺ : ∀ {f} → (∀ {x y} → P x → Q y → R (f x y)) → ∀ {n xs ys} → All P xs → All Q ys → All R (zipWith f {n = n} xs ys) zipWith⁺ pqr ps qs i = pqr (ps i) (qs i) ------------------------------------------------------------------------ -- zip module _ {P : Pred A p} {Q : Pred B q} {n} {xs : Vector A n} {ys} where zip⁺ : All P xs → All Q ys → All (P ⟨×⟩ Q) (zip xs ys) zip⁺ ps qs i = ps i , qs i zip⁻ : All (P ⟨×⟩ Q) (zip xs ys) → All P xs × All Q ys zip⁻ pqs = proj₁ ∘ pqs , proj₂ ∘ pqs ------------------------------------------------------------------------ -- head head⁺ : ∀ (P : Pred A p) {n v} → All P v → P (head {n = n} v) head⁺ P ps = ps zero ------------------------------------------------------------------------ -- tail tail⁺ : ∀ (P : Pred A p) {n v} → All P v → All P (tail {n = n} v) tail⁺ P ps = ps ∘ suc ------------------------------------------------------------------------ -- ++ module _ (P : Pred A p) {m n : ℕ} {xs : Vector A m} {ys : Vector A n} where ++⁺ : All P xs → All P ys → All P (xs ++ ys) ++⁺ pxs pys i with splitAt m i ... | inj₁ i′ = pxs i′ ... | inj₂ j′ = pys j′ module _ (P : Pred A p) {m n : ℕ} (xs : Vector A m) {ys : Vector A n} where ++⁻ˡ : All P (xs ++ ys) → All P xs ++⁻ˡ ps i with ps (inject+ n i) ... | p rewrite splitAt-inject+ m n i = p ++⁻ʳ : All P (xs ++ ys) → All P ys ++⁻ʳ ps i with ps (raise m i) ... | p rewrite splitAt-raise m n i = p ++⁻ : All P (xs ++ ys) → All P xs × All P ys ++⁻ ps = ++⁻ˡ ps , ++⁻ʳ ps
{ "alphanum_fraction": 0.4111041797, "avg_line_length": 29.4128440367, "ext": "agda", "hexsha": "8b1d613500ca1dab89ffdda1138ffa9c3b2eda10", "lang": "Agda", "max_forks_count": 1, "max_forks_repo_forks_event_max_datetime": "2021-11-04T06:54:45.000Z", "max_forks_repo_forks_event_min_datetime": "2021-11-04T06:54:45.000Z", "max_forks_repo_head_hexsha": "fb380f2e67dcb4a94f353dbaec91624fcb5b8933", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "DreamLinuxer/popl21-artifact", "max_forks_repo_path": "agda-stdlib/src/Data/Vec/Functional/Relation/Unary/All/Properties.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "fb380f2e67dcb4a94f353dbaec91624fcb5b8933", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "DreamLinuxer/popl21-artifact", "max_issues_repo_path": "agda-stdlib/src/Data/Vec/Functional/Relation/Unary/All/Properties.agda", "max_line_length": 75, "max_stars_count": 5, "max_stars_repo_head_hexsha": "fb380f2e67dcb4a94f353dbaec91624fcb5b8933", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "DreamLinuxer/popl21-artifact", "max_stars_repo_path": "agda-stdlib/src/Data/Vec/Functional/Relation/Unary/All/Properties.agda", "max_stars_repo_stars_event_max_datetime": "2020-10-10T21:41:32.000Z", "max_stars_repo_stars_event_min_datetime": "2020-10-07T12:07:53.000Z", "num_tokens": 1027, "size": 3206 }
module Structure.Category.Functor.Category where open import Data.Tuple open import Function.Equals import Lvl open import Logic open import Logic.Predicate open import Structure.Setoid open import Structure.Category open import Structure.Category.Functor open import Structure.Category.NaturalTransformation open import Structure.Category.NaturalTransformation.Equiv open import Structure.Category.NaturalTransformation.NaturalTransformations open import Structure.Categorical.Properties open import Structure.Operator open import Syntax.Transitivity open import Type module _ {ℓₗₒ ℓₗₘ ℓₗₑ ℓᵣₒ ℓᵣₘ ℓᵣₑ} {catₗ : CategoryObject{ℓₗₒ}{ℓₗₘ}{ℓₗₑ}} {catᵣ : CategoryObject{ℓᵣₒ}{ℓᵣₘ}{ℓᵣₑ}} where open Category ⦃ … ⦄ open Wrapped private open module MorphismEquivₗ {x}{y} = Equiv(CategoryObject.morphism-equiv catₗ {x}{y}) using () private open module MorphismEquivᵣ {x}{y} = Equiv(CategoryObject.morphism-equiv catᵣ {x}{y}) using () private instance _ = CategoryObject.category-instance catₗ private instance _ = CategoryObject.category-instance catᵣ -- Natural transformations are morphisms on functors. functorCategory : Category{Obj = catₗ →ᶠᵘⁿᶜᵗᵒʳ catᵣ} (_→ᴺᵀ_) Category._∘_ functorCategory = _∘ᴺᵀ_ Category.id functorCategory = idᴺᵀ Dependent._⊜_.proof (BinaryOperator.congruence (Category.binaryOperator functorCategory) (Dependent.intro xy1) (Dependent.intro xy2)) = congruence₂(_∘_) xy1 xy2 Dependent._⊜_.proof (Morphism.Associativity.proof (Category.associativity functorCategory)) = Morphism.associativity(_∘_) Dependent._⊜_.proof (Morphism.Identityₗ.proof (left (Category.identity functorCategory)) {F₁} {F₂} {ηᴺᵀ}) {x} = ∃.witness (idᴺᵀ ∘ᴺᵀ ηᴺᵀ)(x) 🝖[ _≡_ ]-[] ∃.witness(idᴺᵀ{F = F₂})(x) ∘ ∃.witness ηᴺᵀ(x) 🝖[ _≡_ ]-[] id ∘ ∃.witness ηᴺᵀ(x) 🝖[ _≡_ ]-[ Morphism.identityₗ(_∘_)(id) ] ∃.witness ηᴺᵀ(x) 🝖-end Dependent._⊜_.proof (Morphism.Identityᵣ.proof (right (Category.identity functorCategory)) {F₁} {F₂} {ηᴺᵀ}) {x} = ∃.witness (ηᴺᵀ ∘ᴺᵀ idᴺᵀ)(x) 🝖[ _≡_ ]-[] ∃.witness ηᴺᵀ(x) ∘ ∃.witness(idᴺᵀ{F = F₁})(x) 🝖[ _≡_ ]-[] ∃.witness ηᴺᵀ(x) ∘ id 🝖[ _≡_ ]-[ Morphism.identityᵣ(_∘_)(id) ] ∃.witness ηᴺᵀ(x) 🝖-end
{ "alphanum_fraction": 0.6850021487, "avg_line_length": 47.4897959184, "ext": "agda", "hexsha": "bb11df88a02a842d632b50aedaec2e1d6a99b3c4", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "70f4fba849f2fd779c5aaa5af122ccb6a5b271ba", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "Lolirofle/stuff-in-agda", "max_forks_repo_path": "Structure/Category/Functor/Category.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "70f4fba849f2fd779c5aaa5af122ccb6a5b271ba", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "Lolirofle/stuff-in-agda", "max_issues_repo_path": "Structure/Category/Functor/Category.agda", "max_line_length": 162, "max_stars_count": 6, "max_stars_repo_head_hexsha": "70f4fba849f2fd779c5aaa5af122ccb6a5b271ba", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "Lolirofle/stuff-in-agda", "max_stars_repo_path": "Structure/Category/Functor/Category.agda", "max_stars_repo_stars_event_max_datetime": "2022-02-05T06:53:22.000Z", "max_stars_repo_stars_event_min_datetime": "2020-04-07T17:58:13.000Z", "num_tokens": 915, "size": 2327 }
module Avionics.Maybe where open import Function using (_∘_) open import Level using (Level) private variable a b c : Level A : Set a B : Set b C : Set c data Maybe (A : Set a) : Set a where nothing : Maybe A just : (x : A) → Maybe A maybe : ∀ {A : Set a} {B : Maybe A → Set b} → ((x : A) → B (just x)) → B nothing → (x : Maybe A) → B x maybe j n (just x) = j x maybe j n nothing = n map : (A → B) → Maybe A → Maybe B map f = maybe (just ∘ f) nothing -- Monad: bind infixl 1 _>>=_ _>>=_ : Maybe A → (A → Maybe B) → Maybe B nothing >>= f = nothing just a >>= f = f a {-# FOREIGN GHC type AgdaMaybe erase = Maybe #-} {-# COMPILE GHC Maybe = data AgdaMaybe (Nothing | Just) #-}
{ "alphanum_fraction": 0.5668523677, "avg_line_length": 21.1176470588, "ext": "agda", "hexsha": "82eb73c2f0c9c7b542b01a4c990bfb7db1969554", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "a432faf1b340cb379190a2f2b11b997b02d1cd8d", "max_forks_repo_licenses": [ "CC0-1.0" ], "max_forks_repo_name": "helq/old_code", "max_forks_repo_path": "proglangs-learning/Agda/reals-with-restrictions/Avionics/Maybe.agda", "max_issues_count": 4, "max_issues_repo_head_hexsha": "a432faf1b340cb379190a2f2b11b997b02d1cd8d", "max_issues_repo_issues_event_max_datetime": "2021-06-07T15:39:48.000Z", "max_issues_repo_issues_event_min_datetime": "2020-03-10T19:20:21.000Z", "max_issues_repo_licenses": [ "CC0-1.0" ], "max_issues_repo_name": "helq/old_code", "max_issues_repo_path": "proglangs-learning/Agda/reals-with-restrictions/Avionics/Maybe.agda", "max_line_length": 64, "max_stars_count": null, "max_stars_repo_head_hexsha": "a432faf1b340cb379190a2f2b11b997b02d1cd8d", "max_stars_repo_licenses": [ "CC0-1.0" ], "max_stars_repo_name": "helq/old_code", "max_stars_repo_path": "proglangs-learning/Agda/reals-with-restrictions/Avionics/Maybe.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 248, "size": 718 }
{- Part 3: Transport and composition - Cubical transport - Subst as a special case of cubical transport - Path induction from subst? - Homogeneous composition (hcomp) - Binary composition of paths as special case of hcomp -} {-# OPTIONS --cubical #-} module Part2 where open import Part1 public -- Transport is more complex as ≡ isn't inductively defined (so we -- can't define it by pattern-matching on p) transport : {A B : Type ℓ} → A ≡ B → A → B transport p a = transp (λ i → p i) i0 a -- This lets us define subst (which is called "transport" in the HoTT book) subst : {A : Type ℓ} (P : A → Type ℓ') {x y : A} (p : x ≡ y) → P x → P y subst P p pa = transport (λ i → P (p i)) pa -- The transp operation reduces differently for different types -- formers. For paths it reduces to another primitive operation called -- hcomp. -- We can also define the J eliminator (aka path induction) -- TODO: rewrite using subst? -- TODO: talk about ∧ J : {A : Type ℓ} {B : A → Type ℓ'} {x : A} (P : (z : A) → x ≡ z → Type ℓ'') (d : P x refl) {y : A} (p : x ≡ y) → P y p J P d p = transport (λ i → P (p i) (λ j → p (i ∧ j))) d -- So J is provable, but it doesn't satisfy computation rule -- definitionally. This is almost never a problem in practice as the -- cubical primitives satisfy many new definitional equalities.
{ "alphanum_fraction": 0.6571213263, "avg_line_length": 31.5952380952, "ext": "agda", "hexsha": "e71c40173be7240e87528ec79ef18fa7351fd6ea", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "54b18e4adf890b3533bbefda373912423be7f490", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "tomdjong/EPIT-2020", "max_forks_repo_path": "04-cubical-type-theory/material/Part2.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "54b18e4adf890b3533bbefda373912423be7f490", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "tomdjong/EPIT-2020", "max_issues_repo_path": "04-cubical-type-theory/material/Part2.agda", "max_line_length": 75, "max_stars_count": null, "max_stars_repo_head_hexsha": "54b18e4adf890b3533bbefda373912423be7f490", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "tomdjong/EPIT-2020", "max_stars_repo_path": "04-cubical-type-theory/material/Part2.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 410, "size": 1327 }
module Structure.Relator.Ordering.Lattice where import Lvl open import Functional open import Logic open import Logic.Propositional hiding (⊤ ; ⊥) open import Logic.Predicate open import Logic.Propositional.Theorems open import Structure.Relator.Ordering open import Structure.Relator.Properties hiding (antisymmetry ; asymmetry ; transitivity ; reflexivity ; irreflexivity) open import Type private variable ℓ₁ ℓ₂ ℓ₃ : Lvl.Level module _ {T : Type{ℓ₁}} where record Top (_≤_ : T → T → Stmt{ℓ₂}) (P : T → Stmt{ℓ₃}) (m : T) : Stmt{ℓ₁ Lvl.⊔ ℓ₂ Lvl.⊔ ℓ₃} where constructor intro field ⦃ membership ⦄ : P(m) proof : ∀{x : T} → ⦃ _ : P(x) ⦄ → (x ≤ m) module _ (_≤_ : T → T → Stmt{ℓ₂}) where Bottom : (P : T → Stmt{ℓ₃}) (m : T) → Stmt{ℓ₁ Lvl.⊔ ℓ₂ Lvl.⊔ ℓ₃} Bottom = Top(swap(_≤_)) module Bottom{ℓ₂}{ℓ₃}{_≤_} = Top{ℓ₂}{ℓ₃}{swap(_≤_)} record RightBound (_≤_ : T → T → Stmt{ℓ₂}) (P : T → Stmt{ℓ₃}) (b : T) : Stmt{ℓ₁ Lvl.⊔ ℓ₂ Lvl.⊔ ℓ₃} where constructor intro field proof : ∀{x : T} → ⦃ _ : P(x) ⦄ → (x ≤ b) module _ (_≤_ : T → T → Stmt{ℓ₂}) where LeftBound : (P : T → Stmt{ℓ₃}) → (b : T) → Stmt{ℓ₁ Lvl.⊔ ℓ₂ Lvl.⊔ ℓ₃} LeftBound = RightBound(swap(_≤_)) module LeftBound{ℓ₂}{ℓ₃}{_≤_} = RightBound{ℓ₂}{ℓ₃}{swap(_≤_)} record Meet (_≤_ : T → T → Stmt{ℓ₂}) (P : T → Stmt{ℓ₃}) (inf : T) : Stmt{ℓ₁ Lvl.⊔ ℓ₂ Lvl.⊔ ℓ₃} where constructor intro field bound : LeftBound(_≤_)(P) (inf) extreme : RightBound(_≤_)(LeftBound(_≤_)(P)) (inf) module _ (_≤_ : T → T → Stmt{ℓ₂}) where Join : (P : T → Stmt{ℓ₃}) → (sup : T) → Stmt{ℓ₁ Lvl.⊔ ℓ₂ Lvl.⊔ ℓ₃} Join = Meet(swap(_≤_)) module Join{ℓ₂}{ℓ₃}{_≤_} = Meet{ℓ₂}{ℓ₃}{swap(_≤_)} module Complete {ℓ₃} where record MeetSemilattice (_≤_ : T → T → Stmt{ℓ₂}) : Stmt{ℓ₁ Lvl.⊔ ℓ₂ Lvl.⊔ Lvl.𝐒(ℓ₃)} where constructor intro field proof : ∀{P : T → Stmt{ℓ₃}} → ∃(Meet(_≤_)(P)) module _ (_≤_ : T → T → Stmt{ℓ₂}) where JoinSemilattice : Stmt{ℓ₁ Lvl.⊔ ℓ₂ Lvl.⊔ Lvl.𝐒(ℓ₃)} JoinSemilattice = MeetSemilattice(swap(_≤_)) module JoinSemilattice{ℓ₂}{_≤_} = MeetSemilattice{ℓ₂}{swap(_≤_)} record Lattice (_≤_ : T → T → Stmt{ℓ₂}) : Stmt{ℓ₁ Lvl.⊔ ℓ₂ Lvl.⊔ Lvl.𝐒(ℓ₃)} where constructor intro field ⦃ meet-semilattice ⦄ : MeetSemilattice(_≤_) ⦃ join-semilattice ⦄ : JoinSemilattice(_≤_) record Bounded (_≤_ : T → T → Stmt{ℓ₂}) (⊤ : T) (⊥ : T) : Stmt{ℓ₁ Lvl.⊔ ℓ₂ Lvl.⊔ Lvl.𝐒(ℓ₃)} where constructor intro field ⦃ bottom ⦄ : Weak.Properties.Extremumₗ(_≤_)(⊥) ⦃ top ⦄ : Weak.Properties.Extremumᵣ(_≤_)(⊤) top : (_≤_ : T → T → Stmt{ℓ₂}) → (P : T → Stmt{ℓ₃}) → ⦃ _ : ∃(Top(_≤_)(P)) ⦄ → T top _ (P) ⦃ e ⦄ = [∃]-witness e bottom : (_≤_ : T → T → Stmt{ℓ₂}) → (P : T → Stmt{ℓ₃}) → ⦃ _ : ∃(Bottom(_≤_)(P)) ⦄ → T bottom(_≤_) = top(swap(_≤_)) meet : (_≤_ : T → T → Stmt{ℓ₂}) → (P : T → Stmt{ℓ₃}) → ⦃ _ : ∃(Meet(_≤_)(P)) ⦄ → T meet _ _ ⦃ e ⦄ = [∃]-witness e join : (_≤_ : T → T → Stmt{ℓ₂}) → (P : T → Stmt{ℓ₃}) → ⦃ _ : ∃(Join(_≤_)(P)) ⦄ → T join(_≤_) = meet(swap(_≤_)) module Oper where ⊥ = bottom ⊤ = top ⋁ = join ⋀ = meet -- LE is a module with synonyms when the order is interpreted as a (_≤_) (lesser than or equals) relation. module LE where Minimum = Bottom Maximum = Top LowerBound = LeftBound UpperBound = RightBound Supremum = Join Infimum = Meet module Minimum = Bottom module Maximum = Top module LowerBound = LeftBound module UpperBound = RightBound module Supremum = Join module Infimum = Meet min = bottom max = top sup = join inf = meet -- TODO: https://en.wikipedia.org/wiki/Map_of_lattices
{ "alphanum_fraction": 0.5660881175, "avg_line_length": 34.3577981651, "ext": "agda", "hexsha": "ea23b80ff16fb6b6ed0a88a0063627e87c9f1967", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "70f4fba849f2fd779c5aaa5af122ccb6a5b271ba", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "Lolirofle/stuff-in-agda", "max_forks_repo_path": "Structure/Relator/Ordering/Lattice.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "70f4fba849f2fd779c5aaa5af122ccb6a5b271ba", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "Lolirofle/stuff-in-agda", "max_issues_repo_path": "Structure/Relator/Ordering/Lattice.agda", "max_line_length": 119, "max_stars_count": 6, "max_stars_repo_head_hexsha": "70f4fba849f2fd779c5aaa5af122ccb6a5b271ba", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "Lolirofle/stuff-in-agda", "max_stars_repo_path": "Structure/Relator/Ordering/Lattice.agda", "max_stars_repo_stars_event_max_datetime": "2022-02-05T06:53:22.000Z", "max_stars_repo_stars_event_min_datetime": "2020-04-07T17:58:13.000Z", "num_tokens": 1691, "size": 3745 }
module Haskell.Prim.Enum where open import Agda.Builtin.Nat as Nat hiding (_==_; _<_; _+_; _*_; _-_) open import Agda.Builtin.Char open import Agda.Builtin.Equality open import Agda.Builtin.List open import Agda.Builtin.Unit open import Agda.Builtin.Int using (pos; negsuc) open import Haskell.Prim open import Haskell.Prim.Bool open import Haskell.Prim.Bounded open import Haskell.Prim.Either open import Haskell.Prim.Eq open import Haskell.Prim.Functor open import Haskell.Prim.Int open import Haskell.Prim.Integer open import Haskell.Prim.List open import Haskell.Prim.Maybe open import Haskell.Prim.Num open import Haskell.Prim.Ord open import Haskell.Prim.Tuple open import Haskell.Prim.Word -------------------------------------------------- -- Enum -- Assumptions: unbounded enums have no constraints on their -- operations and bounded enums should work on all values between -- minBound and maxBound. Unbounded enums do not support enumFrom -- and enumFromThen (since they return infinite lists). IfBoundedBelow : Maybe (BoundedBelow a) → (⦃ BoundedBelow a ⦄ → Set) → Set IfBoundedBelow Nothing k = ⊤ IfBoundedBelow (Just i) k = k ⦃ i ⦄ IfBoundedAbove : Maybe (BoundedAbove a) → (⦃ BoundedAbove a ⦄ → Set) → Set IfBoundedAbove Nothing k = ⊤ IfBoundedAbove (Just i) k = k ⦃ i ⦄ record Enum (a : Set) : Set₁ where field BoundedBelowEnum : Maybe (BoundedBelow a) BoundedAboveEnum : Maybe (BoundedAbove a) fromEnum : a → Int private IsBoundedBelow : Set IsBoundedBelow = maybe ⊥ (λ _ → ⊤) BoundedBelowEnum IsBoundedAbove : Set IsBoundedAbove = maybe ⊥ (λ _ → ⊤) BoundedAboveEnum TrueIfLB : (⦃ BoundedBelow a ⦄ → Bool) → Set TrueIfLB C = IfBoundedBelow BoundedBelowEnum (IsTrue C) TrueIfUB : (⦃ BoundedAbove a ⦄ → Bool) → Set TrueIfUB C = IfBoundedAbove BoundedAboveEnum (IsTrue C) FalseIfLB : (⦃ BoundedBelow a ⦄ → Bool) → Set FalseIfLB C = IfBoundedBelow BoundedBelowEnum (IsFalse C) FalseIfUB : (⦃ BoundedAbove a ⦄ → Bool) → Set FalseIfUB C = IfBoundedAbove BoundedAboveEnum (IsFalse C) minInt : ⦃ BoundedBelow a ⦄ → Int minInt ⦃ _ ⦄ = fromEnum minBound maxInt : ⦃ BoundedAbove a ⦄ → Int maxInt ⦃ _ ⦄ = fromEnum maxBound field toEnum : (n : Int) → ⦃ TrueIfLB (minInt <= n) ⦄ → ⦃ TrueIfUB (n <= maxInt) ⦄ → a succ : (x : a) → ⦃ FalseIfUB (fromEnum x == maxInt) ⦄ → a pred : (x : a) → ⦃ FalseIfLB (fromEnum x == minInt) ⦄ → a enumFrom : ⦃ IsBoundedAbove ⦄ → a → List a enumFromTo : a → a → List a -- In the Prelude Enum instances `enumFromThenTo x x y` gives the -- infinite list of `x`s. The constraint is a little bit stronger than it needs to be, -- since it rules out different x and x₁ that maps to the same Int, but this saves us -- requiring an Eq instance for `a`, and it's not a terrible limitation to not be able to -- write [0, 2^64 .. 2^66]. enumFromThenTo : (x x₁ : a) → ⦃ IsFalse (fromEnum x == fromEnum x₁) ⦄ → a → List a enumFromThen : ⦃ IsBoundedBelow ⦄ → ⦃ IsBoundedAbove ⦄ → (x x₁ : a) → ⦃ IsFalse (fromEnum x == fromEnum x₁) ⦄ → List a open Enum ⦃ ... ⦄ public private divNat : Nat → Nat → Nat divNat a 0 = 0 divNat a (suc b) = div-helper 0 b a b diff : Integer → Integer → Maybe Nat diff a b = case a - b of λ where (pos n) → Just n (negsuc _) → Nothing unsafeIntegerToNat : Integer → Nat unsafeIntegerToNat (pos n) = n unsafeIntegerToNat (negsuc _) = 0 integerFromCount : Integer → Integer → Nat → List Integer integerFromCount a step 0 = [] integerFromCount a step (suc n) = a ∷ integerFromCount (a + step) step n integerFromTo : Integer → Integer → List Integer integerFromTo a b = maybe [] (integerFromCount a 1 ∘ suc) (diff b a) integerFromThenTo : (a a₁ : Integer) → ⦃ IsFalse (integerToInt a == integerToInt a₁) ⦄ → Integer → List Integer integerFromThenTo a a₁ b = case compare a a₁ of λ where LT → maybe [] (λ d → integerFromCount a (a₁ - a) (suc (divNat d (unsafeIntegerToNat (a₁ - a))))) (diff b a) EQ → [] -- impossible GT → maybe [] (λ d → integerFromCount a (a₁ - a) (suc (divNat d (unsafeIntegerToNat (a - a₁))))) (diff a b) instance iEnumInteger : Enum Integer iEnumInteger .BoundedBelowEnum = Nothing iEnumInteger .BoundedAboveEnum = Nothing iEnumInteger .fromEnum = integerToInt iEnumInteger .toEnum n = intToInteger n iEnumInteger .succ = _+ 1 iEnumInteger .pred = _- 1 iEnumInteger .enumFromTo = integerFromTo iEnumInteger .enumFromThenTo = integerFromThenTo module _ (from : a → Integer) (to : Integer → a) where private fromTo : a → a → List a fromTo a b = map to (enumFromTo (from a) (from b)) fromThenTo : (x x₁ : a) → ⦃ IsFalse (fromEnum (from x) == fromEnum (from x₁)) ⦄ → a → List a fromThenTo a a₁ b = map to (enumFromThenTo (from a) (from a₁) (from b)) unboundedEnumViaInteger : Enum a unboundedEnumViaInteger .BoundedBelowEnum = Nothing unboundedEnumViaInteger .BoundedAboveEnum = Nothing unboundedEnumViaInteger .fromEnum = integerToInt ∘ from unboundedEnumViaInteger .toEnum n = to (intToInteger n) unboundedEnumViaInteger .succ x = to (from x + 1) unboundedEnumViaInteger .pred x = to (from x - 1) unboundedEnumViaInteger .enumFromTo a b = fromTo a b unboundedEnumViaInteger .enumFromThenTo a a₁ b = fromThenTo a a₁ b boundedBelowEnumViaInteger : ⦃ Ord a ⦄ → ⦃ BoundedBelow a ⦄ → Enum a boundedBelowEnumViaInteger .BoundedBelowEnum = Just it boundedBelowEnumViaInteger .BoundedAboveEnum = Nothing boundedBelowEnumViaInteger .fromEnum = integerToInt ∘ from boundedBelowEnumViaInteger .toEnum n = to (intToInteger n) boundedBelowEnumViaInteger .succ x = to (from x + 1) boundedBelowEnumViaInteger .pred x = to (from x - 1) boundedBelowEnumViaInteger .enumFromTo a b = fromTo a b boundedBelowEnumViaInteger .enumFromThenTo a a₁ b = fromThenTo a a₁ b boundedAboveEnumViaInteger : ⦃ Ord a ⦄ → ⦃ BoundedAbove a ⦄ → Enum a boundedAboveEnumViaInteger .BoundedBelowEnum = Nothing boundedAboveEnumViaInteger .BoundedAboveEnum = Just it boundedAboveEnumViaInteger .fromEnum = integerToInt ∘ from boundedAboveEnumViaInteger .toEnum n = to (intToInteger n) boundedAboveEnumViaInteger .succ x = to (from x + 1) boundedAboveEnumViaInteger .pred x = to (from x - 1) boundedAboveEnumViaInteger .enumFrom a = fromTo a maxBound boundedAboveEnumViaInteger .enumFromTo a b = fromTo a b boundedAboveEnumViaInteger .enumFromThenTo a a₁ b = fromThenTo a a₁ b boundedEnumViaInteger : ⦃ Ord a ⦄ → ⦃ Bounded a ⦄ → Enum a boundedEnumViaInteger .BoundedBelowEnum = Just it boundedEnumViaInteger .BoundedAboveEnum = Just it boundedEnumViaInteger .fromEnum = integerToInt ∘ from boundedEnumViaInteger .toEnum n = to (intToInteger n) boundedEnumViaInteger .succ x = to (from x + 1) boundedEnumViaInteger .pred x = to (from x - 1) boundedEnumViaInteger .enumFromTo a b = fromTo a b boundedEnumViaInteger .enumFromThenTo a a₁ b = fromThenTo a a₁ b boundedEnumViaInteger .enumFrom a = fromTo a maxBound boundedEnumViaInteger .enumFromThen a a₁ = if a < a₁ then fromThenTo a a₁ maxBound else fromThenTo a a₁ minBound instance iEnumNatural : Enum Nat iEnumNatural = boundedBelowEnumViaInteger pos unsafeIntegerToNat iEnumInt : Enum Int iEnumInt = boundedEnumViaInteger intToInteger integerToInt iEnumWord : Enum Word iEnumWord = boundedEnumViaInteger wordToInteger integerToWord iEnumBool : Enum Bool iEnumBool = boundedEnumViaInteger (if_then 1 else 0) (_/= 0) iEnumOrdering : Enum Ordering iEnumOrdering = boundedEnumViaInteger (λ where LT → 0; EQ → 1; GT → 2) (λ where (pos 0) → LT; (pos 1) → EQ; _ → GT) iEnumUnit : Enum (Tuple []) iEnumUnit = boundedEnumViaInteger (λ _ → 0) (λ _ → []) iEnumChar : Enum Char iEnumChar = boundedEnumViaInteger (pos ∘ primCharToNat) λ where (pos n) → primNatToChar n; _ → '_' -- Missing: -- Enum Double (can't go via Integer)
{ "alphanum_fraction": 0.6610129564, "avg_line_length": 40.6220095694, "ext": "agda", "hexsha": "980eed15b5514fe7cdcd4fc257767a258f1e23e4", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "4cb28f1b5032948b19b977b390fa260be292abf6", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "flupe/agda2hs", "max_forks_repo_path": "lib/Haskell/Prim/Enum.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "4cb28f1b5032948b19b977b390fa260be292abf6", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "flupe/agda2hs", "max_issues_repo_path": "lib/Haskell/Prim/Enum.agda", "max_line_length": 124, "max_stars_count": null, "max_stars_repo_head_hexsha": "4cb28f1b5032948b19b977b390fa260be292abf6", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "flupe/agda2hs", "max_stars_repo_path": "lib/Haskell/Prim/Enum.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 2695, "size": 8490 }
{-# OPTIONS --type-in-type #-} Ty : Set; Ty = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι : Ty; ι = λ _ ι _ → ι arr : Ty → Ty → Ty; arr = λ A B Ty ι arr → arr (A Ty ι arr) (B Ty ι arr) Con : Set;Con = (Con : Set) (nil : Con) (snoc : Con → Ty → Con) → Con nil : Con;nil = λ Con nil snoc → nil snoc : Con → Ty → Con;snoc = λ Γ A Con nil snoc → snoc (Γ Con nil snoc) A Var : Con → Ty → Set;Var = λ Γ A → (Var : Con → Ty → Set) (vz : (Γ : _)(A : _) → Var (snoc Γ A) A) (vs : (Γ : _)(B A : _) → Var Γ A → Var (snoc Γ B) A) → Var Γ A vz : ∀{Γ A} → Var (snoc Γ A) A;vz = λ Var vz vs → vz _ _ vs : ∀{Γ B A} → Var Γ A → Var (snoc Γ B) A;vs = λ x Var vz vs → vs _ _ _ (x Var vz vs) Tm : Con → Ty → Set;Tm = λ Γ A → (Tm : Con → Ty → Set) (var : (Γ : _) (A : _) → Var Γ A → Tm Γ A) (lam : (Γ : _) (A B : _) → Tm (snoc Γ A) B → Tm Γ (arr A B)) (app : (Γ : _) (A B : _) → Tm Γ (arr A B) → Tm Γ A → Tm Γ B) → Tm Γ A var : ∀{Γ A} → Var Γ A → Tm Γ A;var = λ x Tm var lam app → var _ _ x lam : ∀{Γ A B} → Tm (snoc Γ A) B → Tm Γ (arr A B);lam = λ t Tm var lam app → lam _ _ _ (t Tm var lam app) app : ∀{Γ A B} → Tm Γ (arr A B) → Tm Γ A → Tm Γ B;app = λ t u Tm var lam app → app _ _ _ (t Tm var lam app) (u Tm var lam app) v0 : ∀{Γ A} → Tm (snoc Γ A) A;v0 = var vz v1 : ∀{Γ A B} → Tm (snoc (snoc Γ A) B) A;v1 = var (vs vz) v2 : ∀{Γ A B C} → Tm (snoc (snoc (snoc Γ A) B) C) A;v2 = var (vs (vs vz)) v3 : ∀{Γ A B C D} → Tm (snoc (snoc (snoc (snoc Γ A) B) C) D) A;v3 = var (vs (vs (vs vz))) v4 : ∀{Γ A B C D E} → Tm (snoc (snoc (snoc (snoc (snoc Γ A) B) C) D) E) A;v4 = var (vs (vs (vs (vs vz)))) test : ∀{Γ A} → Tm Γ (arr (arr A A) (arr A A));test = lam (lam (app v1 (app v1 (app v1 (app v1 (app v1 (app v1 v0))))))) {-# OPTIONS --type-in-type #-} Ty1 : Set; Ty1 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι1 : Ty1; ι1 = λ _ ι1 _ → ι1 arr1 : Ty1 → Ty1 → Ty1; arr1 = λ A B Ty1 ι1 arr1 → arr1 (A Ty1 ι1 arr1) (B Ty1 ι1 arr1) Con1 : Set;Con1 = (Con1 : Set) (nil : Con1) (snoc : Con1 → Ty1 → Con1) → Con1 nil1 : Con1;nil1 = λ Con1 nil1 snoc → nil1 snoc1 : Con1 → Ty1 → Con1;snoc1 = λ Γ A Con1 nil1 snoc1 → snoc1 (Γ Con1 nil1 snoc1) A Var1 : Con1 → Ty1 → Set;Var1 = λ Γ A → (Var1 : Con1 → Ty1 → Set) (vz : (Γ : _)(A : _) → Var1 (snoc1 Γ A) A) (vs : (Γ : _)(B A : _) → Var1 Γ A → Var1 (snoc1 Γ B) A) → Var1 Γ A vz1 : ∀{Γ A} → Var1 (snoc1 Γ A) A;vz1 = λ Var1 vz1 vs → vz1 _ _ vs1 : ∀{Γ B A} → Var1 Γ A → Var1 (snoc1 Γ B) A;vs1 = λ x Var1 vz1 vs1 → vs1 _ _ _ (x Var1 vz1 vs1) Tm1 : Con1 → Ty1 → Set;Tm1 = λ Γ A → (Tm1 : Con1 → Ty1 → Set) (var : (Γ : _) (A : _) → Var1 Γ A → Tm1 Γ A) (lam : (Γ : _) (A B : _) → Tm1 (snoc1 Γ A) B → Tm1 Γ (arr1 A B)) (app : (Γ : _) (A B : _) → Tm1 Γ (arr1 A B) → Tm1 Γ A → Tm1 Γ B) → Tm1 Γ A var1 : ∀{Γ A} → Var1 Γ A → Tm1 Γ A;var1 = λ x Tm1 var1 lam app → var1 _ _ x lam1 : ∀{Γ A B} → Tm1 (snoc1 Γ A) B → Tm1 Γ (arr1 A B);lam1 = λ t Tm1 var1 lam1 app → lam1 _ _ _ (t Tm1 var1 lam1 app) app1 : ∀{Γ A B} → Tm1 Γ (arr1 A B) → Tm1 Γ A → Tm1 Γ B;app1 = λ t u Tm1 var1 lam1 app1 → app1 _ _ _ (t Tm1 var1 lam1 app1) (u Tm1 var1 lam1 app1) v01 : ∀{Γ A} → Tm1 (snoc1 Γ A) A;v01 = var1 vz1 v11 : ∀{Γ A B} → Tm1 (snoc1 (snoc1 Γ A) B) A;v11 = var1 (vs1 vz1) v21 : ∀{Γ A B C} → Tm1 (snoc1 (snoc1 (snoc1 Γ A) B) C) A;v21 = var1 (vs1 (vs1 vz1)) v31 : ∀{Γ A B C D} → Tm1 (snoc1 (snoc1 (snoc1 (snoc1 Γ A) B) C) D) A;v31 = var1 (vs1 (vs1 (vs1 vz1))) v41 : ∀{Γ A B C D E} → Tm1 (snoc1 (snoc1 (snoc1 (snoc1 (snoc1 Γ A) B) C) D) E) A;v41 = var1 (vs1 (vs1 (vs1 (vs1 vz1)))) test1 : ∀{Γ A} → Tm1 Γ (arr1 (arr1 A A) (arr1 A A));test1 = lam1 (lam1 (app1 v11 (app1 v11 (app1 v11 (app1 v11 (app1 v11 (app1 v11 v01))))))) {-# OPTIONS --type-in-type #-} Ty2 : Set; Ty2 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι2 : Ty2; ι2 = λ _ ι2 _ → ι2 arr2 : Ty2 → Ty2 → Ty2; arr2 = λ A B Ty2 ι2 arr2 → arr2 (A Ty2 ι2 arr2) (B Ty2 ι2 arr2) Con2 : Set;Con2 = (Con2 : Set) (nil : Con2) (snoc : Con2 → Ty2 → Con2) → Con2 nil2 : Con2;nil2 = λ Con2 nil2 snoc → nil2 snoc2 : Con2 → Ty2 → Con2;snoc2 = λ Γ A Con2 nil2 snoc2 → snoc2 (Γ Con2 nil2 snoc2) A Var2 : Con2 → Ty2 → Set;Var2 = λ Γ A → (Var2 : Con2 → Ty2 → Set) (vz : (Γ : _)(A : _) → Var2 (snoc2 Γ A) A) (vs : (Γ : _)(B A : _) → Var2 Γ A → Var2 (snoc2 Γ B) A) → Var2 Γ A vz2 : ∀{Γ A} → Var2 (snoc2 Γ A) A;vz2 = λ Var2 vz2 vs → vz2 _ _ vs2 : ∀{Γ B A} → Var2 Γ A → Var2 (snoc2 Γ B) A;vs2 = λ x Var2 vz2 vs2 → vs2 _ _ _ (x Var2 vz2 vs2) Tm2 : Con2 → Ty2 → Set;Tm2 = λ Γ A → (Tm2 : Con2 → Ty2 → Set) (var : (Γ : _) (A : _) → Var2 Γ A → Tm2 Γ A) (lam : (Γ : _) (A B : _) → Tm2 (snoc2 Γ A) B → Tm2 Γ (arr2 A B)) (app : (Γ : _) (A B : _) → Tm2 Γ (arr2 A B) → Tm2 Γ A → Tm2 Γ B) → Tm2 Γ A var2 : ∀{Γ A} → Var2 Γ A → Tm2 Γ A;var2 = λ x Tm2 var2 lam app → var2 _ _ x lam2 : ∀{Γ A B} → Tm2 (snoc2 Γ A) B → Tm2 Γ (arr2 A B);lam2 = λ t Tm2 var2 lam2 app → lam2 _ _ _ (t Tm2 var2 lam2 app) app2 : ∀{Γ A B} → Tm2 Γ (arr2 A B) → Tm2 Γ A → Tm2 Γ B;app2 = λ t u Tm2 var2 lam2 app2 → app2 _ _ _ (t Tm2 var2 lam2 app2) (u Tm2 var2 lam2 app2) v02 : ∀{Γ A} → Tm2 (snoc2 Γ A) A;v02 = var2 vz2 v12 : ∀{Γ A B} → Tm2 (snoc2 (snoc2 Γ A) B) A;v12 = var2 (vs2 vz2) v22 : ∀{Γ A B C} → Tm2 (snoc2 (snoc2 (snoc2 Γ A) B) C) A;v22 = var2 (vs2 (vs2 vz2)) v32 : ∀{Γ A B C D} → Tm2 (snoc2 (snoc2 (snoc2 (snoc2 Γ A) B) C) D) A;v32 = var2 (vs2 (vs2 (vs2 vz2))) v42 : ∀{Γ A B C D E} → Tm2 (snoc2 (snoc2 (snoc2 (snoc2 (snoc2 Γ A) B) C) D) E) A;v42 = var2 (vs2 (vs2 (vs2 (vs2 vz2)))) test2 : ∀{Γ A} → Tm2 Γ (arr2 (arr2 A A) (arr2 A A));test2 = lam2 (lam2 (app2 v12 (app2 v12 (app2 v12 (app2 v12 (app2 v12 (app2 v12 v02))))))) {-# OPTIONS --type-in-type #-} Ty3 : Set; Ty3 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι3 : Ty3; ι3 = λ _ ι3 _ → ι3 arr3 : Ty3 → Ty3 → Ty3; arr3 = λ A B Ty3 ι3 arr3 → arr3 (A Ty3 ι3 arr3) (B Ty3 ι3 arr3) Con3 : Set;Con3 = (Con3 : Set) (nil : Con3) (snoc : Con3 → Ty3 → Con3) → Con3 nil3 : Con3;nil3 = λ Con3 nil3 snoc → nil3 snoc3 : Con3 → Ty3 → Con3;snoc3 = λ Γ A Con3 nil3 snoc3 → snoc3 (Γ Con3 nil3 snoc3) A Var3 : Con3 → Ty3 → Set;Var3 = λ Γ A → (Var3 : Con3 → Ty3 → Set) (vz : (Γ : _)(A : _) → Var3 (snoc3 Γ A) A) (vs : (Γ : _)(B A : _) → Var3 Γ A → Var3 (snoc3 Γ B) A) → Var3 Γ A vz3 : ∀{Γ A} → Var3 (snoc3 Γ A) A;vz3 = λ Var3 vz3 vs → vz3 _ _ vs3 : ∀{Γ B A} → Var3 Γ A → Var3 (snoc3 Γ B) A;vs3 = λ x Var3 vz3 vs3 → vs3 _ _ _ (x Var3 vz3 vs3) Tm3 : Con3 → Ty3 → Set;Tm3 = λ Γ A → (Tm3 : Con3 → Ty3 → Set) (var : (Γ : _) (A : _) → Var3 Γ A → Tm3 Γ A) (lam : (Γ : _) (A B : _) → Tm3 (snoc3 Γ A) B → Tm3 Γ (arr3 A B)) (app : (Γ : _) (A B : _) → Tm3 Γ (arr3 A B) → Tm3 Γ A → Tm3 Γ B) → Tm3 Γ A var3 : ∀{Γ A} → Var3 Γ A → Tm3 Γ A;var3 = λ x Tm3 var3 lam app → var3 _ _ x lam3 : ∀{Γ A B} → Tm3 (snoc3 Γ A) B → Tm3 Γ (arr3 A B);lam3 = λ t Tm3 var3 lam3 app → lam3 _ _ _ (t Tm3 var3 lam3 app) app3 : ∀{Γ A B} → Tm3 Γ (arr3 A B) → Tm3 Γ A → Tm3 Γ B;app3 = λ t u Tm3 var3 lam3 app3 → app3 _ _ _ (t Tm3 var3 lam3 app3) (u Tm3 var3 lam3 app3) v03 : ∀{Γ A} → Tm3 (snoc3 Γ A) A;v03 = var3 vz3 v13 : ∀{Γ A B} → Tm3 (snoc3 (snoc3 Γ A) B) A;v13 = var3 (vs3 vz3) v23 : ∀{Γ A B C} → Tm3 (snoc3 (snoc3 (snoc3 Γ A) B) C) A;v23 = var3 (vs3 (vs3 vz3)) v33 : ∀{Γ A B C D} → Tm3 (snoc3 (snoc3 (snoc3 (snoc3 Γ A) B) C) D) A;v33 = var3 (vs3 (vs3 (vs3 vz3))) v43 : ∀{Γ A B C D E} → Tm3 (snoc3 (snoc3 (snoc3 (snoc3 (snoc3 Γ A) B) C) D) E) A;v43 = var3 (vs3 (vs3 (vs3 (vs3 vz3)))) test3 : ∀{Γ A} → Tm3 Γ (arr3 (arr3 A A) (arr3 A A));test3 = lam3 (lam3 (app3 v13 (app3 v13 (app3 v13 (app3 v13 (app3 v13 (app3 v13 v03))))))) {-# OPTIONS --type-in-type #-} Ty4 : Set; Ty4 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι4 : Ty4; ι4 = λ _ ι4 _ → ι4 arr4 : Ty4 → Ty4 → Ty4; arr4 = λ A B Ty4 ι4 arr4 → arr4 (A Ty4 ι4 arr4) (B Ty4 ι4 arr4) Con4 : Set;Con4 = (Con4 : Set) (nil : Con4) (snoc : Con4 → Ty4 → Con4) → Con4 nil4 : Con4;nil4 = λ Con4 nil4 snoc → nil4 snoc4 : Con4 → Ty4 → Con4;snoc4 = λ Γ A Con4 nil4 snoc4 → snoc4 (Γ Con4 nil4 snoc4) A Var4 : Con4 → Ty4 → Set;Var4 = λ Γ A → (Var4 : Con4 → Ty4 → Set) (vz : (Γ : _)(A : _) → Var4 (snoc4 Γ A) A) (vs : (Γ : _)(B A : _) → Var4 Γ A → Var4 (snoc4 Γ B) A) → Var4 Γ A vz4 : ∀{Γ A} → Var4 (snoc4 Γ A) A;vz4 = λ Var4 vz4 vs → vz4 _ _ vs4 : ∀{Γ B A} → Var4 Γ A → Var4 (snoc4 Γ B) A;vs4 = λ x Var4 vz4 vs4 → vs4 _ _ _ (x Var4 vz4 vs4) Tm4 : Con4 → Ty4 → Set;Tm4 = λ Γ A → (Tm4 : Con4 → Ty4 → Set) (var : (Γ : _) (A : _) → Var4 Γ A → Tm4 Γ A) (lam : (Γ : _) (A B : _) → Tm4 (snoc4 Γ A) B → Tm4 Γ (arr4 A B)) (app : (Γ : _) (A B : _) → Tm4 Γ (arr4 A B) → Tm4 Γ A → Tm4 Γ B) → Tm4 Γ A var4 : ∀{Γ A} → Var4 Γ A → Tm4 Γ A;var4 = λ x Tm4 var4 lam app → var4 _ _ x lam4 : ∀{Γ A B} → Tm4 (snoc4 Γ A) B → Tm4 Γ (arr4 A B);lam4 = λ t Tm4 var4 lam4 app → lam4 _ _ _ (t Tm4 var4 lam4 app) app4 : ∀{Γ A B} → Tm4 Γ (arr4 A B) → Tm4 Γ A → Tm4 Γ B;app4 = λ t u Tm4 var4 lam4 app4 → app4 _ _ _ (t Tm4 var4 lam4 app4) (u Tm4 var4 lam4 app4) v04 : ∀{Γ A} → Tm4 (snoc4 Γ A) A;v04 = var4 vz4 v14 : ∀{Γ A B} → Tm4 (snoc4 (snoc4 Γ A) B) A;v14 = var4 (vs4 vz4) v24 : ∀{Γ A B C} → Tm4 (snoc4 (snoc4 (snoc4 Γ A) B) C) A;v24 = var4 (vs4 (vs4 vz4)) v34 : ∀{Γ A B C D} → Tm4 (snoc4 (snoc4 (snoc4 (snoc4 Γ A) B) C) D) A;v34 = var4 (vs4 (vs4 (vs4 vz4))) v44 : ∀{Γ A B C D E} → Tm4 (snoc4 (snoc4 (snoc4 (snoc4 (snoc4 Γ A) B) C) D) E) A;v44 = var4 (vs4 (vs4 (vs4 (vs4 vz4)))) test4 : ∀{Γ A} → Tm4 Γ (arr4 (arr4 A A) (arr4 A A));test4 = lam4 (lam4 (app4 v14 (app4 v14 (app4 v14 (app4 v14 (app4 v14 (app4 v14 v04))))))) {-# OPTIONS --type-in-type #-} Ty5 : Set; Ty5 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι5 : Ty5; ι5 = λ _ ι5 _ → ι5 arr5 : Ty5 → Ty5 → Ty5; arr5 = λ A B Ty5 ι5 arr5 → arr5 (A Ty5 ι5 arr5) (B Ty5 ι5 arr5) Con5 : Set;Con5 = (Con5 : Set) (nil : Con5) (snoc : Con5 → Ty5 → Con5) → Con5 nil5 : Con5;nil5 = λ Con5 nil5 snoc → nil5 snoc5 : Con5 → Ty5 → Con5;snoc5 = λ Γ A Con5 nil5 snoc5 → snoc5 (Γ Con5 nil5 snoc5) A Var5 : Con5 → Ty5 → Set;Var5 = λ Γ A → (Var5 : Con5 → Ty5 → Set) (vz : (Γ : _)(A : _) → Var5 (snoc5 Γ A) A) (vs : (Γ : _)(B A : _) → Var5 Γ A → Var5 (snoc5 Γ B) A) → Var5 Γ A vz5 : ∀{Γ A} → Var5 (snoc5 Γ A) A;vz5 = λ Var5 vz5 vs → vz5 _ _ vs5 : ∀{Γ B A} → Var5 Γ A → Var5 (snoc5 Γ B) A;vs5 = λ x Var5 vz5 vs5 → vs5 _ _ _ (x Var5 vz5 vs5) Tm5 : Con5 → Ty5 → Set;Tm5 = λ Γ A → (Tm5 : Con5 → Ty5 → Set) (var : (Γ : _) (A : _) → Var5 Γ A → Tm5 Γ A) (lam : (Γ : _) (A B : _) → Tm5 (snoc5 Γ A) B → Tm5 Γ (arr5 A B)) (app : (Γ : _) (A B : _) → Tm5 Γ (arr5 A B) → Tm5 Γ A → Tm5 Γ B) → Tm5 Γ A var5 : ∀{Γ A} → Var5 Γ A → Tm5 Γ A;var5 = λ x Tm5 var5 lam app → var5 _ _ x lam5 : ∀{Γ A B} → Tm5 (snoc5 Γ A) B → Tm5 Γ (arr5 A B);lam5 = λ t Tm5 var5 lam5 app → lam5 _ _ _ (t Tm5 var5 lam5 app) app5 : ∀{Γ A B} → Tm5 Γ (arr5 A B) → Tm5 Γ A → Tm5 Γ B;app5 = λ t u Tm5 var5 lam5 app5 → app5 _ _ _ (t Tm5 var5 lam5 app5) (u Tm5 var5 lam5 app5) v05 : ∀{Γ A} → Tm5 (snoc5 Γ A) A;v05 = var5 vz5 v15 : ∀{Γ A B} → Tm5 (snoc5 (snoc5 Γ A) B) A;v15 = var5 (vs5 vz5) v25 : ∀{Γ A B C} → Tm5 (snoc5 (snoc5 (snoc5 Γ A) B) C) A;v25 = var5 (vs5 (vs5 vz5)) v35 : ∀{Γ A B C D} → Tm5 (snoc5 (snoc5 (snoc5 (snoc5 Γ A) B) C) D) A;v35 = var5 (vs5 (vs5 (vs5 vz5))) v45 : ∀{Γ A B C D E} → Tm5 (snoc5 (snoc5 (snoc5 (snoc5 (snoc5 Γ A) B) C) D) E) A;v45 = var5 (vs5 (vs5 (vs5 (vs5 vz5)))) test5 : ∀{Γ A} → Tm5 Γ (arr5 (arr5 A A) (arr5 A A));test5 = lam5 (lam5 (app5 v15 (app5 v15 (app5 v15 (app5 v15 (app5 v15 (app5 v15 v05))))))) {-# OPTIONS --type-in-type #-} Ty6 : Set; Ty6 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι6 : Ty6; ι6 = λ _ ι6 _ → ι6 arr6 : Ty6 → Ty6 → Ty6; arr6 = λ A B Ty6 ι6 arr6 → arr6 (A Ty6 ι6 arr6) (B Ty6 ι6 arr6) Con6 : Set;Con6 = (Con6 : Set) (nil : Con6) (snoc : Con6 → Ty6 → Con6) → Con6 nil6 : Con6;nil6 = λ Con6 nil6 snoc → nil6 snoc6 : Con6 → Ty6 → Con6;snoc6 = λ Γ A Con6 nil6 snoc6 → snoc6 (Γ Con6 nil6 snoc6) A Var6 : Con6 → Ty6 → Set;Var6 = λ Γ A → (Var6 : Con6 → Ty6 → Set) (vz : (Γ : _)(A : _) → Var6 (snoc6 Γ A) A) (vs : (Γ : _)(B A : _) → Var6 Γ A → Var6 (snoc6 Γ B) A) → Var6 Γ A vz6 : ∀{Γ A} → Var6 (snoc6 Γ A) A;vz6 = λ Var6 vz6 vs → vz6 _ _ vs6 : ∀{Γ B A} → Var6 Γ A → Var6 (snoc6 Γ B) A;vs6 = λ x Var6 vz6 vs6 → vs6 _ _ _ (x Var6 vz6 vs6) Tm6 : Con6 → Ty6 → Set;Tm6 = λ Γ A → (Tm6 : Con6 → Ty6 → Set) (var : (Γ : _) (A : _) → Var6 Γ A → Tm6 Γ A) (lam : (Γ : _) (A B : _) → Tm6 (snoc6 Γ A) B → Tm6 Γ (arr6 A B)) (app : (Γ : _) (A B : _) → Tm6 Γ (arr6 A B) → Tm6 Γ A → Tm6 Γ B) → Tm6 Γ A var6 : ∀{Γ A} → Var6 Γ A → Tm6 Γ A;var6 = λ x Tm6 var6 lam app → var6 _ _ x lam6 : ∀{Γ A B} → Tm6 (snoc6 Γ A) B → Tm6 Γ (arr6 A B);lam6 = λ t Tm6 var6 lam6 app → lam6 _ _ _ (t Tm6 var6 lam6 app) app6 : ∀{Γ A B} → Tm6 Γ (arr6 A B) → Tm6 Γ A → Tm6 Γ B;app6 = λ t u Tm6 var6 lam6 app6 → app6 _ _ _ (t Tm6 var6 lam6 app6) (u Tm6 var6 lam6 app6) v06 : ∀{Γ A} → Tm6 (snoc6 Γ A) A;v06 = var6 vz6 v16 : ∀{Γ A B} → Tm6 (snoc6 (snoc6 Γ A) B) A;v16 = var6 (vs6 vz6) v26 : ∀{Γ A B C} → Tm6 (snoc6 (snoc6 (snoc6 Γ A) B) C) A;v26 = var6 (vs6 (vs6 vz6)) v36 : ∀{Γ A B C D} → Tm6 (snoc6 (snoc6 (snoc6 (snoc6 Γ A) B) C) D) A;v36 = var6 (vs6 (vs6 (vs6 vz6))) v46 : ∀{Γ A B C D E} → Tm6 (snoc6 (snoc6 (snoc6 (snoc6 (snoc6 Γ A) B) C) D) E) A;v46 = var6 (vs6 (vs6 (vs6 (vs6 vz6)))) test6 : ∀{Γ A} → Tm6 Γ (arr6 (arr6 A A) (arr6 A A));test6 = lam6 (lam6 (app6 v16 (app6 v16 (app6 v16 (app6 v16 (app6 v16 (app6 v16 v06))))))) {-# OPTIONS --type-in-type #-} Ty7 : Set; Ty7 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι7 : Ty7; ι7 = λ _ ι7 _ → ι7 arr7 : Ty7 → Ty7 → Ty7; arr7 = λ A B Ty7 ι7 arr7 → arr7 (A Ty7 ι7 arr7) (B Ty7 ι7 arr7) Con7 : Set;Con7 = (Con7 : Set) (nil : Con7) (snoc : Con7 → Ty7 → Con7) → Con7 nil7 : Con7;nil7 = λ Con7 nil7 snoc → nil7 snoc7 : Con7 → Ty7 → Con7;snoc7 = λ Γ A Con7 nil7 snoc7 → snoc7 (Γ Con7 nil7 snoc7) A Var7 : Con7 → Ty7 → Set;Var7 = λ Γ A → (Var7 : Con7 → Ty7 → Set) (vz : (Γ : _)(A : _) → Var7 (snoc7 Γ A) A) (vs : (Γ : _)(B A : _) → Var7 Γ A → Var7 (snoc7 Γ B) A) → Var7 Γ A vz7 : ∀{Γ A} → Var7 (snoc7 Γ A) A;vz7 = λ Var7 vz7 vs → vz7 _ _ vs7 : ∀{Γ B A} → Var7 Γ A → Var7 (snoc7 Γ B) A;vs7 = λ x Var7 vz7 vs7 → vs7 _ _ _ (x Var7 vz7 vs7) Tm7 : Con7 → Ty7 → Set;Tm7 = λ Γ A → (Tm7 : Con7 → Ty7 → Set) (var : (Γ : _) (A : _) → Var7 Γ A → Tm7 Γ A) (lam : (Γ : _) (A B : _) → Tm7 (snoc7 Γ A) B → Tm7 Γ (arr7 A B)) (app : (Γ : _) (A B : _) → Tm7 Γ (arr7 A B) → Tm7 Γ A → Tm7 Γ B) → Tm7 Γ A var7 : ∀{Γ A} → Var7 Γ A → Tm7 Γ A;var7 = λ x Tm7 var7 lam app → var7 _ _ x lam7 : ∀{Γ A B} → Tm7 (snoc7 Γ A) B → Tm7 Γ (arr7 A B);lam7 = λ t Tm7 var7 lam7 app → lam7 _ _ _ (t Tm7 var7 lam7 app) app7 : ∀{Γ A B} → Tm7 Γ (arr7 A B) → Tm7 Γ A → Tm7 Γ B;app7 = λ t u Tm7 var7 lam7 app7 → app7 _ _ _ (t Tm7 var7 lam7 app7) (u Tm7 var7 lam7 app7) v07 : ∀{Γ A} → Tm7 (snoc7 Γ A) A;v07 = var7 vz7 v17 : ∀{Γ A B} → Tm7 (snoc7 (snoc7 Γ A) B) A;v17 = var7 (vs7 vz7) v27 : ∀{Γ A B C} → Tm7 (snoc7 (snoc7 (snoc7 Γ A) B) C) A;v27 = var7 (vs7 (vs7 vz7)) v37 : ∀{Γ A B C D} → Tm7 (snoc7 (snoc7 (snoc7 (snoc7 Γ A) B) C) D) A;v37 = var7 (vs7 (vs7 (vs7 vz7))) v47 : ∀{Γ A B C D E} → Tm7 (snoc7 (snoc7 (snoc7 (snoc7 (snoc7 Γ A) B) C) D) E) A;v47 = var7 (vs7 (vs7 (vs7 (vs7 vz7)))) test7 : ∀{Γ A} → Tm7 Γ (arr7 (arr7 A A) (arr7 A A));test7 = lam7 (lam7 (app7 v17 (app7 v17 (app7 v17 (app7 v17 (app7 v17 (app7 v17 v07))))))) {-# OPTIONS --type-in-type #-} Ty8 : Set; Ty8 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι8 : Ty8; ι8 = λ _ ι8 _ → ι8 arr8 : Ty8 → Ty8 → Ty8; arr8 = λ A B Ty8 ι8 arr8 → arr8 (A Ty8 ι8 arr8) (B Ty8 ι8 arr8) Con8 : Set;Con8 = (Con8 : Set) (nil : Con8) (snoc : Con8 → Ty8 → Con8) → Con8 nil8 : Con8;nil8 = λ Con8 nil8 snoc → nil8 snoc8 : Con8 → Ty8 → Con8;snoc8 = λ Γ A Con8 nil8 snoc8 → snoc8 (Γ Con8 nil8 snoc8) A Var8 : Con8 → Ty8 → Set;Var8 = λ Γ A → (Var8 : Con8 → Ty8 → Set) (vz : (Γ : _)(A : _) → Var8 (snoc8 Γ A) A) (vs : (Γ : _)(B A : _) → Var8 Γ A → Var8 (snoc8 Γ B) A) → Var8 Γ A vz8 : ∀{Γ A} → Var8 (snoc8 Γ A) A;vz8 = λ Var8 vz8 vs → vz8 _ _ vs8 : ∀{Γ B A} → Var8 Γ A → Var8 (snoc8 Γ B) A;vs8 = λ x Var8 vz8 vs8 → vs8 _ _ _ (x Var8 vz8 vs8) Tm8 : Con8 → Ty8 → Set;Tm8 = λ Γ A → (Tm8 : Con8 → Ty8 → Set) (var : (Γ : _) (A : _) → Var8 Γ A → Tm8 Γ A) (lam : (Γ : _) (A B : _) → Tm8 (snoc8 Γ A) B → Tm8 Γ (arr8 A B)) (app : (Γ : _) (A B : _) → Tm8 Γ (arr8 A B) → Tm8 Γ A → Tm8 Γ B) → Tm8 Γ A var8 : ∀{Γ A} → Var8 Γ A → Tm8 Γ A;var8 = λ x Tm8 var8 lam app → var8 _ _ x lam8 : ∀{Γ A B} → Tm8 (snoc8 Γ A) B → Tm8 Γ (arr8 A B);lam8 = λ t Tm8 var8 lam8 app → lam8 _ _ _ (t Tm8 var8 lam8 app) app8 : ∀{Γ A B} → Tm8 Γ (arr8 A B) → Tm8 Γ A → Tm8 Γ B;app8 = λ t u Tm8 var8 lam8 app8 → app8 _ _ _ (t Tm8 var8 lam8 app8) (u Tm8 var8 lam8 app8) v08 : ∀{Γ A} → Tm8 (snoc8 Γ A) A;v08 = var8 vz8 v18 : ∀{Γ A B} → Tm8 (snoc8 (snoc8 Γ A) B) A;v18 = var8 (vs8 vz8) v28 : ∀{Γ A B C} → Tm8 (snoc8 (snoc8 (snoc8 Γ A) B) C) A;v28 = var8 (vs8 (vs8 vz8)) v38 : ∀{Γ A B C D} → Tm8 (snoc8 (snoc8 (snoc8 (snoc8 Γ A) B) C) D) A;v38 = var8 (vs8 (vs8 (vs8 vz8))) v48 : ∀{Γ A B C D E} → Tm8 (snoc8 (snoc8 (snoc8 (snoc8 (snoc8 Γ A) B) C) D) E) A;v48 = var8 (vs8 (vs8 (vs8 (vs8 vz8)))) test8 : ∀{Γ A} → Tm8 Γ (arr8 (arr8 A A) (arr8 A A));test8 = lam8 (lam8 (app8 v18 (app8 v18 (app8 v18 (app8 v18 (app8 v18 (app8 v18 v08))))))) {-# OPTIONS --type-in-type #-} Ty9 : Set; Ty9 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι9 : Ty9; ι9 = λ _ ι9 _ → ι9 arr9 : Ty9 → Ty9 → Ty9; arr9 = λ A B Ty9 ι9 arr9 → arr9 (A Ty9 ι9 arr9) (B Ty9 ι9 arr9) Con9 : Set;Con9 = (Con9 : Set) (nil : Con9) (snoc : Con9 → Ty9 → Con9) → Con9 nil9 : Con9;nil9 = λ Con9 nil9 snoc → nil9 snoc9 : Con9 → Ty9 → Con9;snoc9 = λ Γ A Con9 nil9 snoc9 → snoc9 (Γ Con9 nil9 snoc9) A Var9 : Con9 → Ty9 → Set;Var9 = λ Γ A → (Var9 : Con9 → Ty9 → Set) (vz : (Γ : _)(A : _) → Var9 (snoc9 Γ A) A) (vs : (Γ : _)(B A : _) → Var9 Γ A → Var9 (snoc9 Γ B) A) → Var9 Γ A vz9 : ∀{Γ A} → Var9 (snoc9 Γ A) A;vz9 = λ Var9 vz9 vs → vz9 _ _ vs9 : ∀{Γ B A} → Var9 Γ A → Var9 (snoc9 Γ B) A;vs9 = λ x Var9 vz9 vs9 → vs9 _ _ _ (x Var9 vz9 vs9) Tm9 : Con9 → Ty9 → Set;Tm9 = λ Γ A → (Tm9 : Con9 → Ty9 → Set) (var : (Γ : _) (A : _) → Var9 Γ A → Tm9 Γ A) (lam : (Γ : _) (A B : _) → Tm9 (snoc9 Γ A) B → Tm9 Γ (arr9 A B)) (app : (Γ : _) (A B : _) → Tm9 Γ (arr9 A B) → Tm9 Γ A → Tm9 Γ B) → Tm9 Γ A var9 : ∀{Γ A} → Var9 Γ A → Tm9 Γ A;var9 = λ x Tm9 var9 lam app → var9 _ _ x lam9 : ∀{Γ A B} → Tm9 (snoc9 Γ A) B → Tm9 Γ (arr9 A B);lam9 = λ t Tm9 var9 lam9 app → lam9 _ _ _ (t Tm9 var9 lam9 app) app9 : ∀{Γ A B} → Tm9 Γ (arr9 A B) → Tm9 Γ A → Tm9 Γ B;app9 = λ t u Tm9 var9 lam9 app9 → app9 _ _ _ (t Tm9 var9 lam9 app9) (u Tm9 var9 lam9 app9) v09 : ∀{Γ A} → Tm9 (snoc9 Γ A) A;v09 = var9 vz9 v19 : ∀{Γ A B} → Tm9 (snoc9 (snoc9 Γ A) B) A;v19 = var9 (vs9 vz9) v29 : ∀{Γ A B C} → Tm9 (snoc9 (snoc9 (snoc9 Γ A) B) C) A;v29 = var9 (vs9 (vs9 vz9)) v39 : ∀{Γ A B C D} → Tm9 (snoc9 (snoc9 (snoc9 (snoc9 Γ A) B) C) D) A;v39 = var9 (vs9 (vs9 (vs9 vz9))) v49 : ∀{Γ A B C D E} → Tm9 (snoc9 (snoc9 (snoc9 (snoc9 (snoc9 Γ A) B) C) D) E) A;v49 = var9 (vs9 (vs9 (vs9 (vs9 vz9)))) test9 : ∀{Γ A} → Tm9 Γ (arr9 (arr9 A A) (arr9 A A));test9 = lam9 (lam9 (app9 v19 (app9 v19 (app9 v19 (app9 v19 (app9 v19 (app9 v19 v09))))))) {-# OPTIONS --type-in-type #-} Ty10 : Set; Ty10 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι10 : Ty10; ι10 = λ _ ι10 _ → ι10 arr10 : Ty10 → Ty10 → Ty10; arr10 = λ A B Ty10 ι10 arr10 → arr10 (A Ty10 ι10 arr10) (B Ty10 ι10 arr10) Con10 : Set;Con10 = (Con10 : Set) (nil : Con10) (snoc : Con10 → Ty10 → Con10) → Con10 nil10 : Con10;nil10 = λ Con10 nil10 snoc → nil10 snoc10 : Con10 → Ty10 → Con10;snoc10 = λ Γ A Con10 nil10 snoc10 → snoc10 (Γ Con10 nil10 snoc10) A Var10 : Con10 → Ty10 → Set;Var10 = λ Γ A → (Var10 : Con10 → Ty10 → Set) (vz : (Γ : _)(A : _) → Var10 (snoc10 Γ A) A) (vs : (Γ : _)(B A : _) → Var10 Γ A → Var10 (snoc10 Γ B) A) → Var10 Γ A vz10 : ∀{Γ A} → Var10 (snoc10 Γ A) A;vz10 = λ Var10 vz10 vs → vz10 _ _ vs10 : ∀{Γ B A} → Var10 Γ A → Var10 (snoc10 Γ B) A;vs10 = λ x Var10 vz10 vs10 → vs10 _ _ _ (x Var10 vz10 vs10) Tm10 : Con10 → Ty10 → Set;Tm10 = λ Γ A → (Tm10 : Con10 → Ty10 → Set) (var : (Γ : _) (A : _) → Var10 Γ A → Tm10 Γ A) (lam : (Γ : _) (A B : _) → Tm10 (snoc10 Γ A) B → Tm10 Γ (arr10 A B)) (app : (Γ : _) (A B : _) → Tm10 Γ (arr10 A B) → Tm10 Γ A → Tm10 Γ B) → Tm10 Γ A var10 : ∀{Γ A} → Var10 Γ A → Tm10 Γ A;var10 = λ x Tm10 var10 lam app → var10 _ _ x lam10 : ∀{Γ A B} → Tm10 (snoc10 Γ A) B → Tm10 Γ (arr10 A B);lam10 = λ t Tm10 var10 lam10 app → lam10 _ _ _ (t Tm10 var10 lam10 app) app10 : ∀{Γ A B} → Tm10 Γ (arr10 A B) → Tm10 Γ A → Tm10 Γ B;app10 = λ t u Tm10 var10 lam10 app10 → app10 _ _ _ (t Tm10 var10 lam10 app10) (u Tm10 var10 lam10 app10) v010 : ∀{Γ A} → Tm10 (snoc10 Γ A) A;v010 = var10 vz10 v110 : ∀{Γ A B} → Tm10 (snoc10 (snoc10 Γ A) B) A;v110 = var10 (vs10 vz10) v210 : ∀{Γ A B C} → Tm10 (snoc10 (snoc10 (snoc10 Γ A) B) C) A;v210 = var10 (vs10 (vs10 vz10)) v310 : ∀{Γ A B C D} → Tm10 (snoc10 (snoc10 (snoc10 (snoc10 Γ A) B) C) D) A;v310 = var10 (vs10 (vs10 (vs10 vz10))) v410 : ∀{Γ A B C D E} → Tm10 (snoc10 (snoc10 (snoc10 (snoc10 (snoc10 Γ A) B) C) D) E) A;v410 = var10 (vs10 (vs10 (vs10 (vs10 vz10)))) test10 : ∀{Γ A} → Tm10 Γ (arr10 (arr10 A A) (arr10 A A));test10 = lam10 (lam10 (app10 v110 (app10 v110 (app10 v110 (app10 v110 (app10 v110 (app10 v110 v010))))))) {-# OPTIONS --type-in-type #-} Ty11 : Set; Ty11 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι11 : Ty11; ι11 = λ _ ι11 _ → ι11 arr11 : Ty11 → Ty11 → Ty11; arr11 = λ A B Ty11 ι11 arr11 → arr11 (A Ty11 ι11 arr11) (B Ty11 ι11 arr11) Con11 : Set;Con11 = (Con11 : Set) (nil : Con11) (snoc : Con11 → Ty11 → Con11) → Con11 nil11 : Con11;nil11 = λ Con11 nil11 snoc → nil11 snoc11 : Con11 → Ty11 → Con11;snoc11 = λ Γ A Con11 nil11 snoc11 → snoc11 (Γ Con11 nil11 snoc11) A Var11 : Con11 → Ty11 → Set;Var11 = λ Γ A → (Var11 : Con11 → Ty11 → Set) (vz : (Γ : _)(A : _) → Var11 (snoc11 Γ A) A) (vs : (Γ : _)(B A : _) → Var11 Γ A → Var11 (snoc11 Γ B) A) → Var11 Γ A vz11 : ∀{Γ A} → Var11 (snoc11 Γ A) A;vz11 = λ Var11 vz11 vs → vz11 _ _ vs11 : ∀{Γ B A} → Var11 Γ A → Var11 (snoc11 Γ B) A;vs11 = λ x Var11 vz11 vs11 → vs11 _ _ _ (x Var11 vz11 vs11) Tm11 : Con11 → Ty11 → Set;Tm11 = λ Γ A → (Tm11 : Con11 → Ty11 → Set) (var : (Γ : _) (A : _) → Var11 Γ A → Tm11 Γ A) (lam : (Γ : _) (A B : _) → Tm11 (snoc11 Γ A) B → Tm11 Γ (arr11 A B)) (app : (Γ : _) (A B : _) → Tm11 Γ (arr11 A B) → Tm11 Γ A → Tm11 Γ B) → Tm11 Γ A var11 : ∀{Γ A} → Var11 Γ A → Tm11 Γ A;var11 = λ x Tm11 var11 lam app → var11 _ _ x lam11 : ∀{Γ A B} → Tm11 (snoc11 Γ A) B → Tm11 Γ (arr11 A B);lam11 = λ t Tm11 var11 lam11 app → lam11 _ _ _ (t Tm11 var11 lam11 app) app11 : ∀{Γ A B} → Tm11 Γ (arr11 A B) → Tm11 Γ A → Tm11 Γ B;app11 = λ t u Tm11 var11 lam11 app11 → app11 _ _ _ (t Tm11 var11 lam11 app11) (u Tm11 var11 lam11 app11) v011 : ∀{Γ A} → Tm11 (snoc11 Γ A) A;v011 = var11 vz11 v111 : ∀{Γ A B} → Tm11 (snoc11 (snoc11 Γ A) B) A;v111 = var11 (vs11 vz11) v211 : ∀{Γ A B C} → Tm11 (snoc11 (snoc11 (snoc11 Γ A) B) C) A;v211 = var11 (vs11 (vs11 vz11)) v311 : ∀{Γ A B C D} → Tm11 (snoc11 (snoc11 (snoc11 (snoc11 Γ A) B) C) D) A;v311 = var11 (vs11 (vs11 (vs11 vz11))) v411 : ∀{Γ A B C D E} → Tm11 (snoc11 (snoc11 (snoc11 (snoc11 (snoc11 Γ A) B) C) D) E) A;v411 = var11 (vs11 (vs11 (vs11 (vs11 vz11)))) test11 : ∀{Γ A} → Tm11 Γ (arr11 (arr11 A A) (arr11 A A));test11 = lam11 (lam11 (app11 v111 (app11 v111 (app11 v111 (app11 v111 (app11 v111 (app11 v111 v011))))))) {-# OPTIONS --type-in-type #-} Ty12 : Set; Ty12 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι12 : Ty12; ι12 = λ _ ι12 _ → ι12 arr12 : Ty12 → Ty12 → Ty12; arr12 = λ A B Ty12 ι12 arr12 → arr12 (A Ty12 ι12 arr12) (B Ty12 ι12 arr12) Con12 : Set;Con12 = (Con12 : Set) (nil : Con12) (snoc : Con12 → Ty12 → Con12) → Con12 nil12 : Con12;nil12 = λ Con12 nil12 snoc → nil12 snoc12 : Con12 → Ty12 → Con12;snoc12 = λ Γ A Con12 nil12 snoc12 → snoc12 (Γ Con12 nil12 snoc12) A Var12 : Con12 → Ty12 → Set;Var12 = λ Γ A → (Var12 : Con12 → Ty12 → Set) (vz : (Γ : _)(A : _) → Var12 (snoc12 Γ A) A) (vs : (Γ : _)(B A : _) → Var12 Γ A → Var12 (snoc12 Γ B) A) → Var12 Γ A vz12 : ∀{Γ A} → Var12 (snoc12 Γ A) A;vz12 = λ Var12 vz12 vs → vz12 _ _ vs12 : ∀{Γ B A} → Var12 Γ A → Var12 (snoc12 Γ B) A;vs12 = λ x Var12 vz12 vs12 → vs12 _ _ _ (x Var12 vz12 vs12) Tm12 : Con12 → Ty12 → Set;Tm12 = λ Γ A → (Tm12 : Con12 → Ty12 → Set) (var : (Γ : _) (A : _) → Var12 Γ A → Tm12 Γ A) (lam : (Γ : _) (A B : _) → Tm12 (snoc12 Γ A) B → Tm12 Γ (arr12 A B)) (app : (Γ : _) (A B : _) → Tm12 Γ (arr12 A B) → Tm12 Γ A → Tm12 Γ B) → Tm12 Γ A var12 : ∀{Γ A} → Var12 Γ A → Tm12 Γ A;var12 = λ x Tm12 var12 lam app → var12 _ _ x lam12 : ∀{Γ A B} → Tm12 (snoc12 Γ A) B → Tm12 Γ (arr12 A B);lam12 = λ t Tm12 var12 lam12 app → lam12 _ _ _ (t Tm12 var12 lam12 app) app12 : ∀{Γ A B} → Tm12 Γ (arr12 A B) → Tm12 Γ A → Tm12 Γ B;app12 = λ t u Tm12 var12 lam12 app12 → app12 _ _ _ (t Tm12 var12 lam12 app12) (u Tm12 var12 lam12 app12) v012 : ∀{Γ A} → Tm12 (snoc12 Γ A) A;v012 = var12 vz12 v112 : ∀{Γ A B} → Tm12 (snoc12 (snoc12 Γ A) B) A;v112 = var12 (vs12 vz12) v212 : ∀{Γ A B C} → Tm12 (snoc12 (snoc12 (snoc12 Γ A) B) C) A;v212 = var12 (vs12 (vs12 vz12)) v312 : ∀{Γ A B C D} → Tm12 (snoc12 (snoc12 (snoc12 (snoc12 Γ A) B) C) D) A;v312 = var12 (vs12 (vs12 (vs12 vz12))) v412 : ∀{Γ A B C D E} → Tm12 (snoc12 (snoc12 (snoc12 (snoc12 (snoc12 Γ A) B) C) D) E) A;v412 = var12 (vs12 (vs12 (vs12 (vs12 vz12)))) test12 : ∀{Γ A} → Tm12 Γ (arr12 (arr12 A A) (arr12 A A));test12 = lam12 (lam12 (app12 v112 (app12 v112 (app12 v112 (app12 v112 (app12 v112 (app12 v112 v012))))))) {-# OPTIONS --type-in-type #-} Ty13 : Set; Ty13 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι13 : Ty13; ι13 = λ _ ι13 _ → ι13 arr13 : Ty13 → Ty13 → Ty13; arr13 = λ A B Ty13 ι13 arr13 → arr13 (A Ty13 ι13 arr13) (B Ty13 ι13 arr13) Con13 : Set;Con13 = (Con13 : Set) (nil : Con13) (snoc : Con13 → Ty13 → Con13) → Con13 nil13 : Con13;nil13 = λ Con13 nil13 snoc → nil13 snoc13 : Con13 → Ty13 → Con13;snoc13 = λ Γ A Con13 nil13 snoc13 → snoc13 (Γ Con13 nil13 snoc13) A Var13 : Con13 → Ty13 → Set;Var13 = λ Γ A → (Var13 : Con13 → Ty13 → Set) (vz : (Γ : _)(A : _) → Var13 (snoc13 Γ A) A) (vs : (Γ : _)(B A : _) → Var13 Γ A → Var13 (snoc13 Γ B) A) → Var13 Γ A vz13 : ∀{Γ A} → Var13 (snoc13 Γ A) A;vz13 = λ Var13 vz13 vs → vz13 _ _ vs13 : ∀{Γ B A} → Var13 Γ A → Var13 (snoc13 Γ B) A;vs13 = λ x Var13 vz13 vs13 → vs13 _ _ _ (x Var13 vz13 vs13) Tm13 : Con13 → Ty13 → Set;Tm13 = λ Γ A → (Tm13 : Con13 → Ty13 → Set) (var : (Γ : _) (A : _) → Var13 Γ A → Tm13 Γ A) (lam : (Γ : _) (A B : _) → Tm13 (snoc13 Γ A) B → Tm13 Γ (arr13 A B)) (app : (Γ : _) (A B : _) → Tm13 Γ (arr13 A B) → Tm13 Γ A → Tm13 Γ B) → Tm13 Γ A var13 : ∀{Γ A} → Var13 Γ A → Tm13 Γ A;var13 = λ x Tm13 var13 lam app → var13 _ _ x lam13 : ∀{Γ A B} → Tm13 (snoc13 Γ A) B → Tm13 Γ (arr13 A B);lam13 = λ t Tm13 var13 lam13 app → lam13 _ _ _ (t Tm13 var13 lam13 app) app13 : ∀{Γ A B} → Tm13 Γ (arr13 A B) → Tm13 Γ A → Tm13 Γ B;app13 = λ t u Tm13 var13 lam13 app13 → app13 _ _ _ (t Tm13 var13 lam13 app13) (u Tm13 var13 lam13 app13) v013 : ∀{Γ A} → Tm13 (snoc13 Γ A) A;v013 = var13 vz13 v113 : ∀{Γ A B} → Tm13 (snoc13 (snoc13 Γ A) B) A;v113 = var13 (vs13 vz13) v213 : ∀{Γ A B C} → Tm13 (snoc13 (snoc13 (snoc13 Γ A) B) C) A;v213 = var13 (vs13 (vs13 vz13)) v313 : ∀{Γ A B C D} → Tm13 (snoc13 (snoc13 (snoc13 (snoc13 Γ A) B) C) D) A;v313 = var13 (vs13 (vs13 (vs13 vz13))) v413 : ∀{Γ A B C D E} → Tm13 (snoc13 (snoc13 (snoc13 (snoc13 (snoc13 Γ A) B) C) D) E) A;v413 = var13 (vs13 (vs13 (vs13 (vs13 vz13)))) test13 : ∀{Γ A} → Tm13 Γ (arr13 (arr13 A A) (arr13 A A));test13 = lam13 (lam13 (app13 v113 (app13 v113 (app13 v113 (app13 v113 (app13 v113 (app13 v113 v013))))))) {-# OPTIONS --type-in-type #-} Ty14 : Set; Ty14 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι14 : Ty14; ι14 = λ _ ι14 _ → ι14 arr14 : Ty14 → Ty14 → Ty14; arr14 = λ A B Ty14 ι14 arr14 → arr14 (A Ty14 ι14 arr14) (B Ty14 ι14 arr14) Con14 : Set;Con14 = (Con14 : Set) (nil : Con14) (snoc : Con14 → Ty14 → Con14) → Con14 nil14 : Con14;nil14 = λ Con14 nil14 snoc → nil14 snoc14 : Con14 → Ty14 → Con14;snoc14 = λ Γ A Con14 nil14 snoc14 → snoc14 (Γ Con14 nil14 snoc14) A Var14 : Con14 → Ty14 → Set;Var14 = λ Γ A → (Var14 : Con14 → Ty14 → Set) (vz : (Γ : _)(A : _) → Var14 (snoc14 Γ A) A) (vs : (Γ : _)(B A : _) → Var14 Γ A → Var14 (snoc14 Γ B) A) → Var14 Γ A vz14 : ∀{Γ A} → Var14 (snoc14 Γ A) A;vz14 = λ Var14 vz14 vs → vz14 _ _ vs14 : ∀{Γ B A} → Var14 Γ A → Var14 (snoc14 Γ B) A;vs14 = λ x Var14 vz14 vs14 → vs14 _ _ _ (x Var14 vz14 vs14) Tm14 : Con14 → Ty14 → Set;Tm14 = λ Γ A → (Tm14 : Con14 → Ty14 → Set) (var : (Γ : _) (A : _) → Var14 Γ A → Tm14 Γ A) (lam : (Γ : _) (A B : _) → Tm14 (snoc14 Γ A) B → Tm14 Γ (arr14 A B)) (app : (Γ : _) (A B : _) → Tm14 Γ (arr14 A B) → Tm14 Γ A → Tm14 Γ B) → Tm14 Γ A var14 : ∀{Γ A} → Var14 Γ A → Tm14 Γ A;var14 = λ x Tm14 var14 lam app → var14 _ _ x lam14 : ∀{Γ A B} → Tm14 (snoc14 Γ A) B → Tm14 Γ (arr14 A B);lam14 = λ t Tm14 var14 lam14 app → lam14 _ _ _ (t Tm14 var14 lam14 app) app14 : ∀{Γ A B} → Tm14 Γ (arr14 A B) → Tm14 Γ A → Tm14 Γ B;app14 = λ t u Tm14 var14 lam14 app14 → app14 _ _ _ (t Tm14 var14 lam14 app14) (u Tm14 var14 lam14 app14) v014 : ∀{Γ A} → Tm14 (snoc14 Γ A) A;v014 = var14 vz14 v114 : ∀{Γ A B} → Tm14 (snoc14 (snoc14 Γ A) B) A;v114 = var14 (vs14 vz14) v214 : ∀{Γ A B C} → Tm14 (snoc14 (snoc14 (snoc14 Γ A) B) C) A;v214 = var14 (vs14 (vs14 vz14)) v314 : ∀{Γ A B C D} → Tm14 (snoc14 (snoc14 (snoc14 (snoc14 Γ A) B) C) D) A;v314 = var14 (vs14 (vs14 (vs14 vz14))) v414 : ∀{Γ A B C D E} → Tm14 (snoc14 (snoc14 (snoc14 (snoc14 (snoc14 Γ A) B) C) D) E) A;v414 = var14 (vs14 (vs14 (vs14 (vs14 vz14)))) test14 : ∀{Γ A} → Tm14 Γ (arr14 (arr14 A A) (arr14 A A));test14 = lam14 (lam14 (app14 v114 (app14 v114 (app14 v114 (app14 v114 (app14 v114 (app14 v114 v014))))))) {-# OPTIONS --type-in-type #-} Ty15 : Set; Ty15 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι15 : Ty15; ι15 = λ _ ι15 _ → ι15 arr15 : Ty15 → Ty15 → Ty15; arr15 = λ A B Ty15 ι15 arr15 → arr15 (A Ty15 ι15 arr15) (B Ty15 ι15 arr15) Con15 : Set;Con15 = (Con15 : Set) (nil : Con15) (snoc : Con15 → Ty15 → Con15) → Con15 nil15 : Con15;nil15 = λ Con15 nil15 snoc → nil15 snoc15 : Con15 → Ty15 → Con15;snoc15 = λ Γ A Con15 nil15 snoc15 → snoc15 (Γ Con15 nil15 snoc15) A Var15 : Con15 → Ty15 → Set;Var15 = λ Γ A → (Var15 : Con15 → Ty15 → Set) (vz : (Γ : _)(A : _) → Var15 (snoc15 Γ A) A) (vs : (Γ : _)(B A : _) → Var15 Γ A → Var15 (snoc15 Γ B) A) → Var15 Γ A vz15 : ∀{Γ A} → Var15 (snoc15 Γ A) A;vz15 = λ Var15 vz15 vs → vz15 _ _ vs15 : ∀{Γ B A} → Var15 Γ A → Var15 (snoc15 Γ B) A;vs15 = λ x Var15 vz15 vs15 → vs15 _ _ _ (x Var15 vz15 vs15) Tm15 : Con15 → Ty15 → Set;Tm15 = λ Γ A → (Tm15 : Con15 → Ty15 → Set) (var : (Γ : _) (A : _) → Var15 Γ A → Tm15 Γ A) (lam : (Γ : _) (A B : _) → Tm15 (snoc15 Γ A) B → Tm15 Γ (arr15 A B)) (app : (Γ : _) (A B : _) → Tm15 Γ (arr15 A B) → Tm15 Γ A → Tm15 Γ B) → Tm15 Γ A var15 : ∀{Γ A} → Var15 Γ A → Tm15 Γ A;var15 = λ x Tm15 var15 lam app → var15 _ _ x lam15 : ∀{Γ A B} → Tm15 (snoc15 Γ A) B → Tm15 Γ (arr15 A B);lam15 = λ t Tm15 var15 lam15 app → lam15 _ _ _ (t Tm15 var15 lam15 app) app15 : ∀{Γ A B} → Tm15 Γ (arr15 A B) → Tm15 Γ A → Tm15 Γ B;app15 = λ t u Tm15 var15 lam15 app15 → app15 _ _ _ (t Tm15 var15 lam15 app15) (u Tm15 var15 lam15 app15) v015 : ∀{Γ A} → Tm15 (snoc15 Γ A) A;v015 = var15 vz15 v115 : ∀{Γ A B} → Tm15 (snoc15 (snoc15 Γ A) B) A;v115 = var15 (vs15 vz15) v215 : ∀{Γ A B C} → Tm15 (snoc15 (snoc15 (snoc15 Γ A) B) C) A;v215 = var15 (vs15 (vs15 vz15)) v315 : ∀{Γ A B C D} → Tm15 (snoc15 (snoc15 (snoc15 (snoc15 Γ A) B) C) D) A;v315 = var15 (vs15 (vs15 (vs15 vz15))) v415 : ∀{Γ A B C D E} → Tm15 (snoc15 (snoc15 (snoc15 (snoc15 (snoc15 Γ A) B) C) D) E) A;v415 = var15 (vs15 (vs15 (vs15 (vs15 vz15)))) test15 : ∀{Γ A} → Tm15 Γ (arr15 (arr15 A A) (arr15 A A));test15 = lam15 (lam15 (app15 v115 (app15 v115 (app15 v115 (app15 v115 (app15 v115 (app15 v115 v015))))))) {-# OPTIONS --type-in-type #-} Ty16 : Set; Ty16 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι16 : Ty16; ι16 = λ _ ι16 _ → ι16 arr16 : Ty16 → Ty16 → Ty16; arr16 = λ A B Ty16 ι16 arr16 → arr16 (A Ty16 ι16 arr16) (B Ty16 ι16 arr16) Con16 : Set;Con16 = (Con16 : Set) (nil : Con16) (snoc : Con16 → Ty16 → Con16) → Con16 nil16 : Con16;nil16 = λ Con16 nil16 snoc → nil16 snoc16 : Con16 → Ty16 → Con16;snoc16 = λ Γ A Con16 nil16 snoc16 → snoc16 (Γ Con16 nil16 snoc16) A Var16 : Con16 → Ty16 → Set;Var16 = λ Γ A → (Var16 : Con16 → Ty16 → Set) (vz : (Γ : _)(A : _) → Var16 (snoc16 Γ A) A) (vs : (Γ : _)(B A : _) → Var16 Γ A → Var16 (snoc16 Γ B) A) → Var16 Γ A vz16 : ∀{Γ A} → Var16 (snoc16 Γ A) A;vz16 = λ Var16 vz16 vs → vz16 _ _ vs16 : ∀{Γ B A} → Var16 Γ A → Var16 (snoc16 Γ B) A;vs16 = λ x Var16 vz16 vs16 → vs16 _ _ _ (x Var16 vz16 vs16) Tm16 : Con16 → Ty16 → Set;Tm16 = λ Γ A → (Tm16 : Con16 → Ty16 → Set) (var : (Γ : _) (A : _) → Var16 Γ A → Tm16 Γ A) (lam : (Γ : _) (A B : _) → Tm16 (snoc16 Γ A) B → Tm16 Γ (arr16 A B)) (app : (Γ : _) (A B : _) → Tm16 Γ (arr16 A B) → Tm16 Γ A → Tm16 Γ B) → Tm16 Γ A var16 : ∀{Γ A} → Var16 Γ A → Tm16 Γ A;var16 = λ x Tm16 var16 lam app → var16 _ _ x lam16 : ∀{Γ A B} → Tm16 (snoc16 Γ A) B → Tm16 Γ (arr16 A B);lam16 = λ t Tm16 var16 lam16 app → lam16 _ _ _ (t Tm16 var16 lam16 app) app16 : ∀{Γ A B} → Tm16 Γ (arr16 A B) → Tm16 Γ A → Tm16 Γ B;app16 = λ t u Tm16 var16 lam16 app16 → app16 _ _ _ (t Tm16 var16 lam16 app16) (u Tm16 var16 lam16 app16) v016 : ∀{Γ A} → Tm16 (snoc16 Γ A) A;v016 = var16 vz16 v116 : ∀{Γ A B} → Tm16 (snoc16 (snoc16 Γ A) B) A;v116 = var16 (vs16 vz16) v216 : ∀{Γ A B C} → Tm16 (snoc16 (snoc16 (snoc16 Γ A) B) C) A;v216 = var16 (vs16 (vs16 vz16)) v316 : ∀{Γ A B C D} → Tm16 (snoc16 (snoc16 (snoc16 (snoc16 Γ A) B) C) D) A;v316 = var16 (vs16 (vs16 (vs16 vz16))) v416 : ∀{Γ A B C D E} → Tm16 (snoc16 (snoc16 (snoc16 (snoc16 (snoc16 Γ A) B) C) D) E) A;v416 = var16 (vs16 (vs16 (vs16 (vs16 vz16)))) test16 : ∀{Γ A} → Tm16 Γ (arr16 (arr16 A A) (arr16 A A));test16 = lam16 (lam16 (app16 v116 (app16 v116 (app16 v116 (app16 v116 (app16 v116 (app16 v116 v016))))))) {-# OPTIONS --type-in-type #-} Ty17 : Set; Ty17 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι17 : Ty17; ι17 = λ _ ι17 _ → ι17 arr17 : Ty17 → Ty17 → Ty17; arr17 = λ A B Ty17 ι17 arr17 → arr17 (A Ty17 ι17 arr17) (B Ty17 ι17 arr17) Con17 : Set;Con17 = (Con17 : Set) (nil : Con17) (snoc : Con17 → Ty17 → Con17) → Con17 nil17 : Con17;nil17 = λ Con17 nil17 snoc → nil17 snoc17 : Con17 → Ty17 → Con17;snoc17 = λ Γ A Con17 nil17 snoc17 → snoc17 (Γ Con17 nil17 snoc17) A Var17 : Con17 → Ty17 → Set;Var17 = λ Γ A → (Var17 : Con17 → Ty17 → Set) (vz : (Γ : _)(A : _) → Var17 (snoc17 Γ A) A) (vs : (Γ : _)(B A : _) → Var17 Γ A → Var17 (snoc17 Γ B) A) → Var17 Γ A vz17 : ∀{Γ A} → Var17 (snoc17 Γ A) A;vz17 = λ Var17 vz17 vs → vz17 _ _ vs17 : ∀{Γ B A} → Var17 Γ A → Var17 (snoc17 Γ B) A;vs17 = λ x Var17 vz17 vs17 → vs17 _ _ _ (x Var17 vz17 vs17) Tm17 : Con17 → Ty17 → Set;Tm17 = λ Γ A → (Tm17 : Con17 → Ty17 → Set) (var : (Γ : _) (A : _) → Var17 Γ A → Tm17 Γ A) (lam : (Γ : _) (A B : _) → Tm17 (snoc17 Γ A) B → Tm17 Γ (arr17 A B)) (app : (Γ : _) (A B : _) → Tm17 Γ (arr17 A B) → Tm17 Γ A → Tm17 Γ B) → Tm17 Γ A var17 : ∀{Γ A} → Var17 Γ A → Tm17 Γ A;var17 = λ x Tm17 var17 lam app → var17 _ _ x lam17 : ∀{Γ A B} → Tm17 (snoc17 Γ A) B → Tm17 Γ (arr17 A B);lam17 = λ t Tm17 var17 lam17 app → lam17 _ _ _ (t Tm17 var17 lam17 app) app17 : ∀{Γ A B} → Tm17 Γ (arr17 A B) → Tm17 Γ A → Tm17 Γ B;app17 = λ t u Tm17 var17 lam17 app17 → app17 _ _ _ (t Tm17 var17 lam17 app17) (u Tm17 var17 lam17 app17) v017 : ∀{Γ A} → Tm17 (snoc17 Γ A) A;v017 = var17 vz17 v117 : ∀{Γ A B} → Tm17 (snoc17 (snoc17 Γ A) B) A;v117 = var17 (vs17 vz17) v217 : ∀{Γ A B C} → Tm17 (snoc17 (snoc17 (snoc17 Γ A) B) C) A;v217 = var17 (vs17 (vs17 vz17)) v317 : ∀{Γ A B C D} → Tm17 (snoc17 (snoc17 (snoc17 (snoc17 Γ A) B) C) D) A;v317 = var17 (vs17 (vs17 (vs17 vz17))) v417 : ∀{Γ A B C D E} → Tm17 (snoc17 (snoc17 (snoc17 (snoc17 (snoc17 Γ A) B) C) D) E) A;v417 = var17 (vs17 (vs17 (vs17 (vs17 vz17)))) test17 : ∀{Γ A} → Tm17 Γ (arr17 (arr17 A A) (arr17 A A));test17 = lam17 (lam17 (app17 v117 (app17 v117 (app17 v117 (app17 v117 (app17 v117 (app17 v117 v017))))))) {-# OPTIONS --type-in-type #-} Ty18 : Set; Ty18 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι18 : Ty18; ι18 = λ _ ι18 _ → ι18 arr18 : Ty18 → Ty18 → Ty18; arr18 = λ A B Ty18 ι18 arr18 → arr18 (A Ty18 ι18 arr18) (B Ty18 ι18 arr18) Con18 : Set;Con18 = (Con18 : Set) (nil : Con18) (snoc : Con18 → Ty18 → Con18) → Con18 nil18 : Con18;nil18 = λ Con18 nil18 snoc → nil18 snoc18 : Con18 → Ty18 → Con18;snoc18 = λ Γ A Con18 nil18 snoc18 → snoc18 (Γ Con18 nil18 snoc18) A Var18 : Con18 → Ty18 → Set;Var18 = λ Γ A → (Var18 : Con18 → Ty18 → Set) (vz : (Γ : _)(A : _) → Var18 (snoc18 Γ A) A) (vs : (Γ : _)(B A : _) → Var18 Γ A → Var18 (snoc18 Γ B) A) → Var18 Γ A vz18 : ∀{Γ A} → Var18 (snoc18 Γ A) A;vz18 = λ Var18 vz18 vs → vz18 _ _ vs18 : ∀{Γ B A} → Var18 Γ A → Var18 (snoc18 Γ B) A;vs18 = λ x Var18 vz18 vs18 → vs18 _ _ _ (x Var18 vz18 vs18) Tm18 : Con18 → Ty18 → Set;Tm18 = λ Γ A → (Tm18 : Con18 → Ty18 → Set) (var : (Γ : _) (A : _) → Var18 Γ A → Tm18 Γ A) (lam : (Γ : _) (A B : _) → Tm18 (snoc18 Γ A) B → Tm18 Γ (arr18 A B)) (app : (Γ : _) (A B : _) → Tm18 Γ (arr18 A B) → Tm18 Γ A → Tm18 Γ B) → Tm18 Γ A var18 : ∀{Γ A} → Var18 Γ A → Tm18 Γ A;var18 = λ x Tm18 var18 lam app → var18 _ _ x lam18 : ∀{Γ A B} → Tm18 (snoc18 Γ A) B → Tm18 Γ (arr18 A B);lam18 = λ t Tm18 var18 lam18 app → lam18 _ _ _ (t Tm18 var18 lam18 app) app18 : ∀{Γ A B} → Tm18 Γ (arr18 A B) → Tm18 Γ A → Tm18 Γ B;app18 = λ t u Tm18 var18 lam18 app18 → app18 _ _ _ (t Tm18 var18 lam18 app18) (u Tm18 var18 lam18 app18) v018 : ∀{Γ A} → Tm18 (snoc18 Γ A) A;v018 = var18 vz18 v118 : ∀{Γ A B} → Tm18 (snoc18 (snoc18 Γ A) B) A;v118 = var18 (vs18 vz18) v218 : ∀{Γ A B C} → Tm18 (snoc18 (snoc18 (snoc18 Γ A) B) C) A;v218 = var18 (vs18 (vs18 vz18)) v318 : ∀{Γ A B C D} → Tm18 (snoc18 (snoc18 (snoc18 (snoc18 Γ A) B) C) D) A;v318 = var18 (vs18 (vs18 (vs18 vz18))) v418 : ∀{Γ A B C D E} → Tm18 (snoc18 (snoc18 (snoc18 (snoc18 (snoc18 Γ A) B) C) D) E) A;v418 = var18 (vs18 (vs18 (vs18 (vs18 vz18)))) test18 : ∀{Γ A} → Tm18 Γ (arr18 (arr18 A A) (arr18 A A));test18 = lam18 (lam18 (app18 v118 (app18 v118 (app18 v118 (app18 v118 (app18 v118 (app18 v118 v018))))))) {-# OPTIONS --type-in-type #-} Ty19 : Set; Ty19 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι19 : Ty19; ι19 = λ _ ι19 _ → ι19 arr19 : Ty19 → Ty19 → Ty19; arr19 = λ A B Ty19 ι19 arr19 → arr19 (A Ty19 ι19 arr19) (B Ty19 ι19 arr19) Con19 : Set;Con19 = (Con19 : Set) (nil : Con19) (snoc : Con19 → Ty19 → Con19) → Con19 nil19 : Con19;nil19 = λ Con19 nil19 snoc → nil19 snoc19 : Con19 → Ty19 → Con19;snoc19 = λ Γ A Con19 nil19 snoc19 → snoc19 (Γ Con19 nil19 snoc19) A Var19 : Con19 → Ty19 → Set;Var19 = λ Γ A → (Var19 : Con19 → Ty19 → Set) (vz : (Γ : _)(A : _) → Var19 (snoc19 Γ A) A) (vs : (Γ : _)(B A : _) → Var19 Γ A → Var19 (snoc19 Γ B) A) → Var19 Γ A vz19 : ∀{Γ A} → Var19 (snoc19 Γ A) A;vz19 = λ Var19 vz19 vs → vz19 _ _ vs19 : ∀{Γ B A} → Var19 Γ A → Var19 (snoc19 Γ B) A;vs19 = λ x Var19 vz19 vs19 → vs19 _ _ _ (x Var19 vz19 vs19) Tm19 : Con19 → Ty19 → Set;Tm19 = λ Γ A → (Tm19 : Con19 → Ty19 → Set) (var : (Γ : _) (A : _) → Var19 Γ A → Tm19 Γ A) (lam : (Γ : _) (A B : _) → Tm19 (snoc19 Γ A) B → Tm19 Γ (arr19 A B)) (app : (Γ : _) (A B : _) → Tm19 Γ (arr19 A B) → Tm19 Γ A → Tm19 Γ B) → Tm19 Γ A var19 : ∀{Γ A} → Var19 Γ A → Tm19 Γ A;var19 = λ x Tm19 var19 lam app → var19 _ _ x lam19 : ∀{Γ A B} → Tm19 (snoc19 Γ A) B → Tm19 Γ (arr19 A B);lam19 = λ t Tm19 var19 lam19 app → lam19 _ _ _ (t Tm19 var19 lam19 app) app19 : ∀{Γ A B} → Tm19 Γ (arr19 A B) → Tm19 Γ A → Tm19 Γ B;app19 = λ t u Tm19 var19 lam19 app19 → app19 _ _ _ (t Tm19 var19 lam19 app19) (u Tm19 var19 lam19 app19) v019 : ∀{Γ A} → Tm19 (snoc19 Γ A) A;v019 = var19 vz19 v119 : ∀{Γ A B} → Tm19 (snoc19 (snoc19 Γ A) B) A;v119 = var19 (vs19 vz19) v219 : ∀{Γ A B C} → Tm19 (snoc19 (snoc19 (snoc19 Γ A) B) C) A;v219 = var19 (vs19 (vs19 vz19)) v319 : ∀{Γ A B C D} → Tm19 (snoc19 (snoc19 (snoc19 (snoc19 Γ A) B) C) D) A;v319 = var19 (vs19 (vs19 (vs19 vz19))) v419 : ∀{Γ A B C D E} → Tm19 (snoc19 (snoc19 (snoc19 (snoc19 (snoc19 Γ A) B) C) D) E) A;v419 = var19 (vs19 (vs19 (vs19 (vs19 vz19)))) test19 : ∀{Γ A} → Tm19 Γ (arr19 (arr19 A A) (arr19 A A));test19 = lam19 (lam19 (app19 v119 (app19 v119 (app19 v119 (app19 v119 (app19 v119 (app19 v119 v019))))))) {-# OPTIONS --type-in-type #-} Ty20 : Set; Ty20 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι20 : Ty20; ι20 = λ _ ι20 _ → ι20 arr20 : Ty20 → Ty20 → Ty20; arr20 = λ A B Ty20 ι20 arr20 → arr20 (A Ty20 ι20 arr20) (B Ty20 ι20 arr20) Con20 : Set;Con20 = (Con20 : Set) (nil : Con20) (snoc : Con20 → Ty20 → Con20) → Con20 nil20 : Con20;nil20 = λ Con20 nil20 snoc → nil20 snoc20 : Con20 → Ty20 → Con20;snoc20 = λ Γ A Con20 nil20 snoc20 → snoc20 (Γ Con20 nil20 snoc20) A Var20 : Con20 → Ty20 → Set;Var20 = λ Γ A → (Var20 : Con20 → Ty20 → Set) (vz : (Γ : _)(A : _) → Var20 (snoc20 Γ A) A) (vs : (Γ : _)(B A : _) → Var20 Γ A → Var20 (snoc20 Γ B) A) → Var20 Γ A vz20 : ∀{Γ A} → Var20 (snoc20 Γ A) A;vz20 = λ Var20 vz20 vs → vz20 _ _ vs20 : ∀{Γ B A} → Var20 Γ A → Var20 (snoc20 Γ B) A;vs20 = λ x Var20 vz20 vs20 → vs20 _ _ _ (x Var20 vz20 vs20) Tm20 : Con20 → Ty20 → Set;Tm20 = λ Γ A → (Tm20 : Con20 → Ty20 → Set) (var : (Γ : _) (A : _) → Var20 Γ A → Tm20 Γ A) (lam : (Γ : _) (A B : _) → Tm20 (snoc20 Γ A) B → Tm20 Γ (arr20 A B)) (app : (Γ : _) (A B : _) → Tm20 Γ (arr20 A B) → Tm20 Γ A → Tm20 Γ B) → Tm20 Γ A var20 : ∀{Γ A} → Var20 Γ A → Tm20 Γ A;var20 = λ x Tm20 var20 lam app → var20 _ _ x lam20 : ∀{Γ A B} → Tm20 (snoc20 Γ A) B → Tm20 Γ (arr20 A B);lam20 = λ t Tm20 var20 lam20 app → lam20 _ _ _ (t Tm20 var20 lam20 app) app20 : ∀{Γ A B} → Tm20 Γ (arr20 A B) → Tm20 Γ A → Tm20 Γ B;app20 = λ t u Tm20 var20 lam20 app20 → app20 _ _ _ (t Tm20 var20 lam20 app20) (u Tm20 var20 lam20 app20) v020 : ∀{Γ A} → Tm20 (snoc20 Γ A) A;v020 = var20 vz20 v120 : ∀{Γ A B} → Tm20 (snoc20 (snoc20 Γ A) B) A;v120 = var20 (vs20 vz20) v220 : ∀{Γ A B C} → Tm20 (snoc20 (snoc20 (snoc20 Γ A) B) C) A;v220 = var20 (vs20 (vs20 vz20)) v320 : ∀{Γ A B C D} → Tm20 (snoc20 (snoc20 (snoc20 (snoc20 Γ A) B) C) D) A;v320 = var20 (vs20 (vs20 (vs20 vz20))) v420 : ∀{Γ A B C D E} → Tm20 (snoc20 (snoc20 (snoc20 (snoc20 (snoc20 Γ A) B) C) D) E) A;v420 = var20 (vs20 (vs20 (vs20 (vs20 vz20)))) test20 : ∀{Γ A} → Tm20 Γ (arr20 (arr20 A A) (arr20 A A));test20 = lam20 (lam20 (app20 v120 (app20 v120 (app20 v120 (app20 v120 (app20 v120 (app20 v120 v020))))))) {-# OPTIONS --type-in-type #-} Ty21 : Set; Ty21 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι21 : Ty21; ι21 = λ _ ι21 _ → ι21 arr21 : Ty21 → Ty21 → Ty21; arr21 = λ A B Ty21 ι21 arr21 → arr21 (A Ty21 ι21 arr21) (B Ty21 ι21 arr21) Con21 : Set;Con21 = (Con21 : Set) (nil : Con21) (snoc : Con21 → Ty21 → Con21) → Con21 nil21 : Con21;nil21 = λ Con21 nil21 snoc → nil21 snoc21 : Con21 → Ty21 → Con21;snoc21 = λ Γ A Con21 nil21 snoc21 → snoc21 (Γ Con21 nil21 snoc21) A Var21 : Con21 → Ty21 → Set;Var21 = λ Γ A → (Var21 : Con21 → Ty21 → Set) (vz : (Γ : _)(A : _) → Var21 (snoc21 Γ A) A) (vs : (Γ : _)(B A : _) → Var21 Γ A → Var21 (snoc21 Γ B) A) → Var21 Γ A vz21 : ∀{Γ A} → Var21 (snoc21 Γ A) A;vz21 = λ Var21 vz21 vs → vz21 _ _ vs21 : ∀{Γ B A} → Var21 Γ A → Var21 (snoc21 Γ B) A;vs21 = λ x Var21 vz21 vs21 → vs21 _ _ _ (x Var21 vz21 vs21) Tm21 : Con21 → Ty21 → Set;Tm21 = λ Γ A → (Tm21 : Con21 → Ty21 → Set) (var : (Γ : _) (A : _) → Var21 Γ A → Tm21 Γ A) (lam : (Γ : _) (A B : _) → Tm21 (snoc21 Γ A) B → Tm21 Γ (arr21 A B)) (app : (Γ : _) (A B : _) → Tm21 Γ (arr21 A B) → Tm21 Γ A → Tm21 Γ B) → Tm21 Γ A var21 : ∀{Γ A} → Var21 Γ A → Tm21 Γ A;var21 = λ x Tm21 var21 lam app → var21 _ _ x lam21 : ∀{Γ A B} → Tm21 (snoc21 Γ A) B → Tm21 Γ (arr21 A B);lam21 = λ t Tm21 var21 lam21 app → lam21 _ _ _ (t Tm21 var21 lam21 app) app21 : ∀{Γ A B} → Tm21 Γ (arr21 A B) → Tm21 Γ A → Tm21 Γ B;app21 = λ t u Tm21 var21 lam21 app21 → app21 _ _ _ (t Tm21 var21 lam21 app21) (u Tm21 var21 lam21 app21) v021 : ∀{Γ A} → Tm21 (snoc21 Γ A) A;v021 = var21 vz21 v121 : ∀{Γ A B} → Tm21 (snoc21 (snoc21 Γ A) B) A;v121 = var21 (vs21 vz21) v221 : ∀{Γ A B C} → Tm21 (snoc21 (snoc21 (snoc21 Γ A) B) C) A;v221 = var21 (vs21 (vs21 vz21)) v321 : ∀{Γ A B C D} → Tm21 (snoc21 (snoc21 (snoc21 (snoc21 Γ A) B) C) D) A;v321 = var21 (vs21 (vs21 (vs21 vz21))) v421 : ∀{Γ A B C D E} → Tm21 (snoc21 (snoc21 (snoc21 (snoc21 (snoc21 Γ A) B) C) D) E) A;v421 = var21 (vs21 (vs21 (vs21 (vs21 vz21)))) test21 : ∀{Γ A} → Tm21 Γ (arr21 (arr21 A A) (arr21 A A));test21 = lam21 (lam21 (app21 v121 (app21 v121 (app21 v121 (app21 v121 (app21 v121 (app21 v121 v021))))))) {-# OPTIONS --type-in-type #-} Ty22 : Set; Ty22 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι22 : Ty22; ι22 = λ _ ι22 _ → ι22 arr22 : Ty22 → Ty22 → Ty22; arr22 = λ A B Ty22 ι22 arr22 → arr22 (A Ty22 ι22 arr22) (B Ty22 ι22 arr22) Con22 : Set;Con22 = (Con22 : Set) (nil : Con22) (snoc : Con22 → Ty22 → Con22) → Con22 nil22 : Con22;nil22 = λ Con22 nil22 snoc → nil22 snoc22 : Con22 → Ty22 → Con22;snoc22 = λ Γ A Con22 nil22 snoc22 → snoc22 (Γ Con22 nil22 snoc22) A Var22 : Con22 → Ty22 → Set;Var22 = λ Γ A → (Var22 : Con22 → Ty22 → Set) (vz : (Γ : _)(A : _) → Var22 (snoc22 Γ A) A) (vs : (Γ : _)(B A : _) → Var22 Γ A → Var22 (snoc22 Γ B) A) → Var22 Γ A vz22 : ∀{Γ A} → Var22 (snoc22 Γ A) A;vz22 = λ Var22 vz22 vs → vz22 _ _ vs22 : ∀{Γ B A} → Var22 Γ A → Var22 (snoc22 Γ B) A;vs22 = λ x Var22 vz22 vs22 → vs22 _ _ _ (x Var22 vz22 vs22) Tm22 : Con22 → Ty22 → Set;Tm22 = λ Γ A → (Tm22 : Con22 → Ty22 → Set) (var : (Γ : _) (A : _) → Var22 Γ A → Tm22 Γ A) (lam : (Γ : _) (A B : _) → Tm22 (snoc22 Γ A) B → Tm22 Γ (arr22 A B)) (app : (Γ : _) (A B : _) → Tm22 Γ (arr22 A B) → Tm22 Γ A → Tm22 Γ B) → Tm22 Γ A var22 : ∀{Γ A} → Var22 Γ A → Tm22 Γ A;var22 = λ x Tm22 var22 lam app → var22 _ _ x lam22 : ∀{Γ A B} → Tm22 (snoc22 Γ A) B → Tm22 Γ (arr22 A B);lam22 = λ t Tm22 var22 lam22 app → lam22 _ _ _ (t Tm22 var22 lam22 app) app22 : ∀{Γ A B} → Tm22 Γ (arr22 A B) → Tm22 Γ A → Tm22 Γ B;app22 = λ t u Tm22 var22 lam22 app22 → app22 _ _ _ (t Tm22 var22 lam22 app22) (u Tm22 var22 lam22 app22) v022 : ∀{Γ A} → Tm22 (snoc22 Γ A) A;v022 = var22 vz22 v122 : ∀{Γ A B} → Tm22 (snoc22 (snoc22 Γ A) B) A;v122 = var22 (vs22 vz22) v222 : ∀{Γ A B C} → Tm22 (snoc22 (snoc22 (snoc22 Γ A) B) C) A;v222 = var22 (vs22 (vs22 vz22)) v322 : ∀{Γ A B C D} → Tm22 (snoc22 (snoc22 (snoc22 (snoc22 Γ A) B) C) D) A;v322 = var22 (vs22 (vs22 (vs22 vz22))) v422 : ∀{Γ A B C D E} → Tm22 (snoc22 (snoc22 (snoc22 (snoc22 (snoc22 Γ A) B) C) D) E) A;v422 = var22 (vs22 (vs22 (vs22 (vs22 vz22)))) test22 : ∀{Γ A} → Tm22 Γ (arr22 (arr22 A A) (arr22 A A));test22 = lam22 (lam22 (app22 v122 (app22 v122 (app22 v122 (app22 v122 (app22 v122 (app22 v122 v022))))))) {-# OPTIONS --type-in-type #-} Ty23 : Set; Ty23 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι23 : Ty23; ι23 = λ _ ι23 _ → ι23 arr23 : Ty23 → Ty23 → Ty23; arr23 = λ A B Ty23 ι23 arr23 → arr23 (A Ty23 ι23 arr23) (B Ty23 ι23 arr23) Con23 : Set;Con23 = (Con23 : Set) (nil : Con23) (snoc : Con23 → Ty23 → Con23) → Con23 nil23 : Con23;nil23 = λ Con23 nil23 snoc → nil23 snoc23 : Con23 → Ty23 → Con23;snoc23 = λ Γ A Con23 nil23 snoc23 → snoc23 (Γ Con23 nil23 snoc23) A Var23 : Con23 → Ty23 → Set;Var23 = λ Γ A → (Var23 : Con23 → Ty23 → Set) (vz : (Γ : _)(A : _) → Var23 (snoc23 Γ A) A) (vs : (Γ : _)(B A : _) → Var23 Γ A → Var23 (snoc23 Γ B) A) → Var23 Γ A vz23 : ∀{Γ A} → Var23 (snoc23 Γ A) A;vz23 = λ Var23 vz23 vs → vz23 _ _ vs23 : ∀{Γ B A} → Var23 Γ A → Var23 (snoc23 Γ B) A;vs23 = λ x Var23 vz23 vs23 → vs23 _ _ _ (x Var23 vz23 vs23) Tm23 : Con23 → Ty23 → Set;Tm23 = λ Γ A → (Tm23 : Con23 → Ty23 → Set) (var : (Γ : _) (A : _) → Var23 Γ A → Tm23 Γ A) (lam : (Γ : _) (A B : _) → Tm23 (snoc23 Γ A) B → Tm23 Γ (arr23 A B)) (app : (Γ : _) (A B : _) → Tm23 Γ (arr23 A B) → Tm23 Γ A → Tm23 Γ B) → Tm23 Γ A var23 : ∀{Γ A} → Var23 Γ A → Tm23 Γ A;var23 = λ x Tm23 var23 lam app → var23 _ _ x lam23 : ∀{Γ A B} → Tm23 (snoc23 Γ A) B → Tm23 Γ (arr23 A B);lam23 = λ t Tm23 var23 lam23 app → lam23 _ _ _ (t Tm23 var23 lam23 app) app23 : ∀{Γ A B} → Tm23 Γ (arr23 A B) → Tm23 Γ A → Tm23 Γ B;app23 = λ t u Tm23 var23 lam23 app23 → app23 _ _ _ (t Tm23 var23 lam23 app23) (u Tm23 var23 lam23 app23) v023 : ∀{Γ A} → Tm23 (snoc23 Γ A) A;v023 = var23 vz23 v123 : ∀{Γ A B} → Tm23 (snoc23 (snoc23 Γ A) B) A;v123 = var23 (vs23 vz23) v223 : ∀{Γ A B C} → Tm23 (snoc23 (snoc23 (snoc23 Γ A) B) C) A;v223 = var23 (vs23 (vs23 vz23)) v323 : ∀{Γ A B C D} → Tm23 (snoc23 (snoc23 (snoc23 (snoc23 Γ A) B) C) D) A;v323 = var23 (vs23 (vs23 (vs23 vz23))) v423 : ∀{Γ A B C D E} → Tm23 (snoc23 (snoc23 (snoc23 (snoc23 (snoc23 Γ A) B) C) D) E) A;v423 = var23 (vs23 (vs23 (vs23 (vs23 vz23)))) test23 : ∀{Γ A} → Tm23 Γ (arr23 (arr23 A A) (arr23 A A));test23 = lam23 (lam23 (app23 v123 (app23 v123 (app23 v123 (app23 v123 (app23 v123 (app23 v123 v023))))))) {-# OPTIONS --type-in-type #-} Ty24 : Set; Ty24 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι24 : Ty24; ι24 = λ _ ι24 _ → ι24 arr24 : Ty24 → Ty24 → Ty24; arr24 = λ A B Ty24 ι24 arr24 → arr24 (A Ty24 ι24 arr24) (B Ty24 ι24 arr24) Con24 : Set;Con24 = (Con24 : Set) (nil : Con24) (snoc : Con24 → Ty24 → Con24) → Con24 nil24 : Con24;nil24 = λ Con24 nil24 snoc → nil24 snoc24 : Con24 → Ty24 → Con24;snoc24 = λ Γ A Con24 nil24 snoc24 → snoc24 (Γ Con24 nil24 snoc24) A Var24 : Con24 → Ty24 → Set;Var24 = λ Γ A → (Var24 : Con24 → Ty24 → Set) (vz : (Γ : _)(A : _) → Var24 (snoc24 Γ A) A) (vs : (Γ : _)(B A : _) → Var24 Γ A → Var24 (snoc24 Γ B) A) → Var24 Γ A vz24 : ∀{Γ A} → Var24 (snoc24 Γ A) A;vz24 = λ Var24 vz24 vs → vz24 _ _ vs24 : ∀{Γ B A} → Var24 Γ A → Var24 (snoc24 Γ B) A;vs24 = λ x Var24 vz24 vs24 → vs24 _ _ _ (x Var24 vz24 vs24) Tm24 : Con24 → Ty24 → Set;Tm24 = λ Γ A → (Tm24 : Con24 → Ty24 → Set) (var : (Γ : _) (A : _) → Var24 Γ A → Tm24 Γ A) (lam : (Γ : _) (A B : _) → Tm24 (snoc24 Γ A) B → Tm24 Γ (arr24 A B)) (app : (Γ : _) (A B : _) → Tm24 Γ (arr24 A B) → Tm24 Γ A → Tm24 Γ B) → Tm24 Γ A var24 : ∀{Γ A} → Var24 Γ A → Tm24 Γ A;var24 = λ x Tm24 var24 lam app → var24 _ _ x lam24 : ∀{Γ A B} → Tm24 (snoc24 Γ A) B → Tm24 Γ (arr24 A B);lam24 = λ t Tm24 var24 lam24 app → lam24 _ _ _ (t Tm24 var24 lam24 app) app24 : ∀{Γ A B} → Tm24 Γ (arr24 A B) → Tm24 Γ A → Tm24 Γ B;app24 = λ t u Tm24 var24 lam24 app24 → app24 _ _ _ (t Tm24 var24 lam24 app24) (u Tm24 var24 lam24 app24) v024 : ∀{Γ A} → Tm24 (snoc24 Γ A) A;v024 = var24 vz24 v124 : ∀{Γ A B} → Tm24 (snoc24 (snoc24 Γ A) B) A;v124 = var24 (vs24 vz24) v224 : ∀{Γ A B C} → Tm24 (snoc24 (snoc24 (snoc24 Γ A) B) C) A;v224 = var24 (vs24 (vs24 vz24)) v324 : ∀{Γ A B C D} → Tm24 (snoc24 (snoc24 (snoc24 (snoc24 Γ A) B) C) D) A;v324 = var24 (vs24 (vs24 (vs24 vz24))) v424 : ∀{Γ A B C D E} → Tm24 (snoc24 (snoc24 (snoc24 (snoc24 (snoc24 Γ A) B) C) D) E) A;v424 = var24 (vs24 (vs24 (vs24 (vs24 vz24)))) test24 : ∀{Γ A} → Tm24 Γ (arr24 (arr24 A A) (arr24 A A));test24 = lam24 (lam24 (app24 v124 (app24 v124 (app24 v124 (app24 v124 (app24 v124 (app24 v124 v024))))))) {-# OPTIONS --type-in-type #-} Ty25 : Set; Ty25 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι25 : Ty25; ι25 = λ _ ι25 _ → ι25 arr25 : Ty25 → Ty25 → Ty25; arr25 = λ A B Ty25 ι25 arr25 → arr25 (A Ty25 ι25 arr25) (B Ty25 ι25 arr25) Con25 : Set;Con25 = (Con25 : Set) (nil : Con25) (snoc : Con25 → Ty25 → Con25) → Con25 nil25 : Con25;nil25 = λ Con25 nil25 snoc → nil25 snoc25 : Con25 → Ty25 → Con25;snoc25 = λ Γ A Con25 nil25 snoc25 → snoc25 (Γ Con25 nil25 snoc25) A Var25 : Con25 → Ty25 → Set;Var25 = λ Γ A → (Var25 : Con25 → Ty25 → Set) (vz : (Γ : _)(A : _) → Var25 (snoc25 Γ A) A) (vs : (Γ : _)(B A : _) → Var25 Γ A → Var25 (snoc25 Γ B) A) → Var25 Γ A vz25 : ∀{Γ A} → Var25 (snoc25 Γ A) A;vz25 = λ Var25 vz25 vs → vz25 _ _ vs25 : ∀{Γ B A} → Var25 Γ A → Var25 (snoc25 Γ B) A;vs25 = λ x Var25 vz25 vs25 → vs25 _ _ _ (x Var25 vz25 vs25) Tm25 : Con25 → Ty25 → Set;Tm25 = λ Γ A → (Tm25 : Con25 → Ty25 → Set) (var : (Γ : _) (A : _) → Var25 Γ A → Tm25 Γ A) (lam : (Γ : _) (A B : _) → Tm25 (snoc25 Γ A) B → Tm25 Γ (arr25 A B)) (app : (Γ : _) (A B : _) → Tm25 Γ (arr25 A B) → Tm25 Γ A → Tm25 Γ B) → Tm25 Γ A var25 : ∀{Γ A} → Var25 Γ A → Tm25 Γ A;var25 = λ x Tm25 var25 lam app → var25 _ _ x lam25 : ∀{Γ A B} → Tm25 (snoc25 Γ A) B → Tm25 Γ (arr25 A B);lam25 = λ t Tm25 var25 lam25 app → lam25 _ _ _ (t Tm25 var25 lam25 app) app25 : ∀{Γ A B} → Tm25 Γ (arr25 A B) → Tm25 Γ A → Tm25 Γ B;app25 = λ t u Tm25 var25 lam25 app25 → app25 _ _ _ (t Tm25 var25 lam25 app25) (u Tm25 var25 lam25 app25) v025 : ∀{Γ A} → Tm25 (snoc25 Γ A) A;v025 = var25 vz25 v125 : ∀{Γ A B} → Tm25 (snoc25 (snoc25 Γ A) B) A;v125 = var25 (vs25 vz25) v225 : ∀{Γ A B C} → Tm25 (snoc25 (snoc25 (snoc25 Γ A) B) C) A;v225 = var25 (vs25 (vs25 vz25)) v325 : ∀{Γ A B C D} → Tm25 (snoc25 (snoc25 (snoc25 (snoc25 Γ A) B) C) D) A;v325 = var25 (vs25 (vs25 (vs25 vz25))) v425 : ∀{Γ A B C D E} → Tm25 (snoc25 (snoc25 (snoc25 (snoc25 (snoc25 Γ A) B) C) D) E) A;v425 = var25 (vs25 (vs25 (vs25 (vs25 vz25)))) test25 : ∀{Γ A} → Tm25 Γ (arr25 (arr25 A A) (arr25 A A));test25 = lam25 (lam25 (app25 v125 (app25 v125 (app25 v125 (app25 v125 (app25 v125 (app25 v125 v025))))))) {-# OPTIONS --type-in-type #-} Ty26 : Set; Ty26 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι26 : Ty26; ι26 = λ _ ι26 _ → ι26 arr26 : Ty26 → Ty26 → Ty26; arr26 = λ A B Ty26 ι26 arr26 → arr26 (A Ty26 ι26 arr26) (B Ty26 ι26 arr26) Con26 : Set;Con26 = (Con26 : Set) (nil : Con26) (snoc : Con26 → Ty26 → Con26) → Con26 nil26 : Con26;nil26 = λ Con26 nil26 snoc → nil26 snoc26 : Con26 → Ty26 → Con26;snoc26 = λ Γ A Con26 nil26 snoc26 → snoc26 (Γ Con26 nil26 snoc26) A Var26 : Con26 → Ty26 → Set;Var26 = λ Γ A → (Var26 : Con26 → Ty26 → Set) (vz : (Γ : _)(A : _) → Var26 (snoc26 Γ A) A) (vs : (Γ : _)(B A : _) → Var26 Γ A → Var26 (snoc26 Γ B) A) → Var26 Γ A vz26 : ∀{Γ A} → Var26 (snoc26 Γ A) A;vz26 = λ Var26 vz26 vs → vz26 _ _ vs26 : ∀{Γ B A} → Var26 Γ A → Var26 (snoc26 Γ B) A;vs26 = λ x Var26 vz26 vs26 → vs26 _ _ _ (x Var26 vz26 vs26) Tm26 : Con26 → Ty26 → Set;Tm26 = λ Γ A → (Tm26 : Con26 → Ty26 → Set) (var : (Γ : _) (A : _) → Var26 Γ A → Tm26 Γ A) (lam : (Γ : _) (A B : _) → Tm26 (snoc26 Γ A) B → Tm26 Γ (arr26 A B)) (app : (Γ : _) (A B : _) → Tm26 Γ (arr26 A B) → Tm26 Γ A → Tm26 Γ B) → Tm26 Γ A var26 : ∀{Γ A} → Var26 Γ A → Tm26 Γ A;var26 = λ x Tm26 var26 lam app → var26 _ _ x lam26 : ∀{Γ A B} → Tm26 (snoc26 Γ A) B → Tm26 Γ (arr26 A B);lam26 = λ t Tm26 var26 lam26 app → lam26 _ _ _ (t Tm26 var26 lam26 app) app26 : ∀{Γ A B} → Tm26 Γ (arr26 A B) → Tm26 Γ A → Tm26 Γ B;app26 = λ t u Tm26 var26 lam26 app26 → app26 _ _ _ (t Tm26 var26 lam26 app26) (u Tm26 var26 lam26 app26) v026 : ∀{Γ A} → Tm26 (snoc26 Γ A) A;v026 = var26 vz26 v126 : ∀{Γ A B} → Tm26 (snoc26 (snoc26 Γ A) B) A;v126 = var26 (vs26 vz26) v226 : ∀{Γ A B C} → Tm26 (snoc26 (snoc26 (snoc26 Γ A) B) C) A;v226 = var26 (vs26 (vs26 vz26)) v326 : ∀{Γ A B C D} → Tm26 (snoc26 (snoc26 (snoc26 (snoc26 Γ A) B) C) D) A;v326 = var26 (vs26 (vs26 (vs26 vz26))) v426 : ∀{Γ A B C D E} → Tm26 (snoc26 (snoc26 (snoc26 (snoc26 (snoc26 Γ A) B) C) D) E) A;v426 = var26 (vs26 (vs26 (vs26 (vs26 vz26)))) test26 : ∀{Γ A} → Tm26 Γ (arr26 (arr26 A A) (arr26 A A));test26 = lam26 (lam26 (app26 v126 (app26 v126 (app26 v126 (app26 v126 (app26 v126 (app26 v126 v026))))))) {-# OPTIONS --type-in-type #-} Ty27 : Set; Ty27 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι27 : Ty27; ι27 = λ _ ι27 _ → ι27 arr27 : Ty27 → Ty27 → Ty27; arr27 = λ A B Ty27 ι27 arr27 → arr27 (A Ty27 ι27 arr27) (B Ty27 ι27 arr27) Con27 : Set;Con27 = (Con27 : Set) (nil : Con27) (snoc : Con27 → Ty27 → Con27) → Con27 nil27 : Con27;nil27 = λ Con27 nil27 snoc → nil27 snoc27 : Con27 → Ty27 → Con27;snoc27 = λ Γ A Con27 nil27 snoc27 → snoc27 (Γ Con27 nil27 snoc27) A Var27 : Con27 → Ty27 → Set;Var27 = λ Γ A → (Var27 : Con27 → Ty27 → Set) (vz : (Γ : _)(A : _) → Var27 (snoc27 Γ A) A) (vs : (Γ : _)(B A : _) → Var27 Γ A → Var27 (snoc27 Γ B) A) → Var27 Γ A vz27 : ∀{Γ A} → Var27 (snoc27 Γ A) A;vz27 = λ Var27 vz27 vs → vz27 _ _ vs27 : ∀{Γ B A} → Var27 Γ A → Var27 (snoc27 Γ B) A;vs27 = λ x Var27 vz27 vs27 → vs27 _ _ _ (x Var27 vz27 vs27) Tm27 : Con27 → Ty27 → Set;Tm27 = λ Γ A → (Tm27 : Con27 → Ty27 → Set) (var : (Γ : _) (A : _) → Var27 Γ A → Tm27 Γ A) (lam : (Γ : _) (A B : _) → Tm27 (snoc27 Γ A) B → Tm27 Γ (arr27 A B)) (app : (Γ : _) (A B : _) → Tm27 Γ (arr27 A B) → Tm27 Γ A → Tm27 Γ B) → Tm27 Γ A var27 : ∀{Γ A} → Var27 Γ A → Tm27 Γ A;var27 = λ x Tm27 var27 lam app → var27 _ _ x lam27 : ∀{Γ A B} → Tm27 (snoc27 Γ A) B → Tm27 Γ (arr27 A B);lam27 = λ t Tm27 var27 lam27 app → lam27 _ _ _ (t Tm27 var27 lam27 app) app27 : ∀{Γ A B} → Tm27 Γ (arr27 A B) → Tm27 Γ A → Tm27 Γ B;app27 = λ t u Tm27 var27 lam27 app27 → app27 _ _ _ (t Tm27 var27 lam27 app27) (u Tm27 var27 lam27 app27) v027 : ∀{Γ A} → Tm27 (snoc27 Γ A) A;v027 = var27 vz27 v127 : ∀{Γ A B} → Tm27 (snoc27 (snoc27 Γ A) B) A;v127 = var27 (vs27 vz27) v227 : ∀{Γ A B C} → Tm27 (snoc27 (snoc27 (snoc27 Γ A) B) C) A;v227 = var27 (vs27 (vs27 vz27)) v327 : ∀{Γ A B C D} → Tm27 (snoc27 (snoc27 (snoc27 (snoc27 Γ A) B) C) D) A;v327 = var27 (vs27 (vs27 (vs27 vz27))) v427 : ∀{Γ A B C D E} → Tm27 (snoc27 (snoc27 (snoc27 (snoc27 (snoc27 Γ A) B) C) D) E) A;v427 = var27 (vs27 (vs27 (vs27 (vs27 vz27)))) test27 : ∀{Γ A} → Tm27 Γ (arr27 (arr27 A A) (arr27 A A));test27 = lam27 (lam27 (app27 v127 (app27 v127 (app27 v127 (app27 v127 (app27 v127 (app27 v127 v027))))))) {-# OPTIONS --type-in-type #-} Ty28 : Set; Ty28 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι28 : Ty28; ι28 = λ _ ι28 _ → ι28 arr28 : Ty28 → Ty28 → Ty28; arr28 = λ A B Ty28 ι28 arr28 → arr28 (A Ty28 ι28 arr28) (B Ty28 ι28 arr28) Con28 : Set;Con28 = (Con28 : Set) (nil : Con28) (snoc : Con28 → Ty28 → Con28) → Con28 nil28 : Con28;nil28 = λ Con28 nil28 snoc → nil28 snoc28 : Con28 → Ty28 → Con28;snoc28 = λ Γ A Con28 nil28 snoc28 → snoc28 (Γ Con28 nil28 snoc28) A Var28 : Con28 → Ty28 → Set;Var28 = λ Γ A → (Var28 : Con28 → Ty28 → Set) (vz : (Γ : _)(A : _) → Var28 (snoc28 Γ A) A) (vs : (Γ : _)(B A : _) → Var28 Γ A → Var28 (snoc28 Γ B) A) → Var28 Γ A vz28 : ∀{Γ A} → Var28 (snoc28 Γ A) A;vz28 = λ Var28 vz28 vs → vz28 _ _ vs28 : ∀{Γ B A} → Var28 Γ A → Var28 (snoc28 Γ B) A;vs28 = λ x Var28 vz28 vs28 → vs28 _ _ _ (x Var28 vz28 vs28) Tm28 : Con28 → Ty28 → Set;Tm28 = λ Γ A → (Tm28 : Con28 → Ty28 → Set) (var : (Γ : _) (A : _) → Var28 Γ A → Tm28 Γ A) (lam : (Γ : _) (A B : _) → Tm28 (snoc28 Γ A) B → Tm28 Γ (arr28 A B)) (app : (Γ : _) (A B : _) → Tm28 Γ (arr28 A B) → Tm28 Γ A → Tm28 Γ B) → Tm28 Γ A var28 : ∀{Γ A} → Var28 Γ A → Tm28 Γ A;var28 = λ x Tm28 var28 lam app → var28 _ _ x lam28 : ∀{Γ A B} → Tm28 (snoc28 Γ A) B → Tm28 Γ (arr28 A B);lam28 = λ t Tm28 var28 lam28 app → lam28 _ _ _ (t Tm28 var28 lam28 app) app28 : ∀{Γ A B} → Tm28 Γ (arr28 A B) → Tm28 Γ A → Tm28 Γ B;app28 = λ t u Tm28 var28 lam28 app28 → app28 _ _ _ (t Tm28 var28 lam28 app28) (u Tm28 var28 lam28 app28) v028 : ∀{Γ A} → Tm28 (snoc28 Γ A) A;v028 = var28 vz28 v128 : ∀{Γ A B} → Tm28 (snoc28 (snoc28 Γ A) B) A;v128 = var28 (vs28 vz28) v228 : ∀{Γ A B C} → Tm28 (snoc28 (snoc28 (snoc28 Γ A) B) C) A;v228 = var28 (vs28 (vs28 vz28)) v328 : ∀{Γ A B C D} → Tm28 (snoc28 (snoc28 (snoc28 (snoc28 Γ A) B) C) D) A;v328 = var28 (vs28 (vs28 (vs28 vz28))) v428 : ∀{Γ A B C D E} → Tm28 (snoc28 (snoc28 (snoc28 (snoc28 (snoc28 Γ A) B) C) D) E) A;v428 = var28 (vs28 (vs28 (vs28 (vs28 vz28)))) test28 : ∀{Γ A} → Tm28 Γ (arr28 (arr28 A A) (arr28 A A));test28 = lam28 (lam28 (app28 v128 (app28 v128 (app28 v128 (app28 v128 (app28 v128 (app28 v128 v028))))))) {-# OPTIONS --type-in-type #-} Ty29 : Set; Ty29 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι29 : Ty29; ι29 = λ _ ι29 _ → ι29 arr29 : Ty29 → Ty29 → Ty29; arr29 = λ A B Ty29 ι29 arr29 → arr29 (A Ty29 ι29 arr29) (B Ty29 ι29 arr29) Con29 : Set;Con29 = (Con29 : Set) (nil : Con29) (snoc : Con29 → Ty29 → Con29) → Con29 nil29 : Con29;nil29 = λ Con29 nil29 snoc → nil29 snoc29 : Con29 → Ty29 → Con29;snoc29 = λ Γ A Con29 nil29 snoc29 → snoc29 (Γ Con29 nil29 snoc29) A Var29 : Con29 → Ty29 → Set;Var29 = λ Γ A → (Var29 : Con29 → Ty29 → Set) (vz : (Γ : _)(A : _) → Var29 (snoc29 Γ A) A) (vs : (Γ : _)(B A : _) → Var29 Γ A → Var29 (snoc29 Γ B) A) → Var29 Γ A vz29 : ∀{Γ A} → Var29 (snoc29 Γ A) A;vz29 = λ Var29 vz29 vs → vz29 _ _ vs29 : ∀{Γ B A} → Var29 Γ A → Var29 (snoc29 Γ B) A;vs29 = λ x Var29 vz29 vs29 → vs29 _ _ _ (x Var29 vz29 vs29) Tm29 : Con29 → Ty29 → Set;Tm29 = λ Γ A → (Tm29 : Con29 → Ty29 → Set) (var : (Γ : _) (A : _) → Var29 Γ A → Tm29 Γ A) (lam : (Γ : _) (A B : _) → Tm29 (snoc29 Γ A) B → Tm29 Γ (arr29 A B)) (app : (Γ : _) (A B : _) → Tm29 Γ (arr29 A B) → Tm29 Γ A → Tm29 Γ B) → Tm29 Γ A var29 : ∀{Γ A} → Var29 Γ A → Tm29 Γ A;var29 = λ x Tm29 var29 lam app → var29 _ _ x lam29 : ∀{Γ A B} → Tm29 (snoc29 Γ A) B → Tm29 Γ (arr29 A B);lam29 = λ t Tm29 var29 lam29 app → lam29 _ _ _ (t Tm29 var29 lam29 app) app29 : ∀{Γ A B} → Tm29 Γ (arr29 A B) → Tm29 Γ A → Tm29 Γ B;app29 = λ t u Tm29 var29 lam29 app29 → app29 _ _ _ (t Tm29 var29 lam29 app29) (u Tm29 var29 lam29 app29) v029 : ∀{Γ A} → Tm29 (snoc29 Γ A) A;v029 = var29 vz29 v129 : ∀{Γ A B} → Tm29 (snoc29 (snoc29 Γ A) B) A;v129 = var29 (vs29 vz29) v229 : ∀{Γ A B C} → Tm29 (snoc29 (snoc29 (snoc29 Γ A) B) C) A;v229 = var29 (vs29 (vs29 vz29)) v329 : ∀{Γ A B C D} → Tm29 (snoc29 (snoc29 (snoc29 (snoc29 Γ A) B) C) D) A;v329 = var29 (vs29 (vs29 (vs29 vz29))) v429 : ∀{Γ A B C D E} → Tm29 (snoc29 (snoc29 (snoc29 (snoc29 (snoc29 Γ A) B) C) D) E) A;v429 = var29 (vs29 (vs29 (vs29 (vs29 vz29)))) test29 : ∀{Γ A} → Tm29 Γ (arr29 (arr29 A A) (arr29 A A));test29 = lam29 (lam29 (app29 v129 (app29 v129 (app29 v129 (app29 v129 (app29 v129 (app29 v129 v029))))))) {-# OPTIONS --type-in-type #-} Ty30 : Set; Ty30 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι30 : Ty30; ι30 = λ _ ι30 _ → ι30 arr30 : Ty30 → Ty30 → Ty30; arr30 = λ A B Ty30 ι30 arr30 → arr30 (A Ty30 ι30 arr30) (B Ty30 ι30 arr30) Con30 : Set;Con30 = (Con30 : Set) (nil : Con30) (snoc : Con30 → Ty30 → Con30) → Con30 nil30 : Con30;nil30 = λ Con30 nil30 snoc → nil30 snoc30 : Con30 → Ty30 → Con30;snoc30 = λ Γ A Con30 nil30 snoc30 → snoc30 (Γ Con30 nil30 snoc30) A Var30 : Con30 → Ty30 → Set;Var30 = λ Γ A → (Var30 : Con30 → Ty30 → Set) (vz : (Γ : _)(A : _) → Var30 (snoc30 Γ A) A) (vs : (Γ : _)(B A : _) → Var30 Γ A → Var30 (snoc30 Γ B) A) → Var30 Γ A vz30 : ∀{Γ A} → Var30 (snoc30 Γ A) A;vz30 = λ Var30 vz30 vs → vz30 _ _ vs30 : ∀{Γ B A} → Var30 Γ A → Var30 (snoc30 Γ B) A;vs30 = λ x Var30 vz30 vs30 → vs30 _ _ _ (x Var30 vz30 vs30) Tm30 : Con30 → Ty30 → Set;Tm30 = λ Γ A → (Tm30 : Con30 → Ty30 → Set) (var : (Γ : _) (A : _) → Var30 Γ A → Tm30 Γ A) (lam : (Γ : _) (A B : _) → Tm30 (snoc30 Γ A) B → Tm30 Γ (arr30 A B)) (app : (Γ : _) (A B : _) → Tm30 Γ (arr30 A B) → Tm30 Γ A → Tm30 Γ B) → Tm30 Γ A var30 : ∀{Γ A} → Var30 Γ A → Tm30 Γ A;var30 = λ x Tm30 var30 lam app → var30 _ _ x lam30 : ∀{Γ A B} → Tm30 (snoc30 Γ A) B → Tm30 Γ (arr30 A B);lam30 = λ t Tm30 var30 lam30 app → lam30 _ _ _ (t Tm30 var30 lam30 app) app30 : ∀{Γ A B} → Tm30 Γ (arr30 A B) → Tm30 Γ A → Tm30 Γ B;app30 = λ t u Tm30 var30 lam30 app30 → app30 _ _ _ (t Tm30 var30 lam30 app30) (u Tm30 var30 lam30 app30) v030 : ∀{Γ A} → Tm30 (snoc30 Γ A) A;v030 = var30 vz30 v130 : ∀{Γ A B} → Tm30 (snoc30 (snoc30 Γ A) B) A;v130 = var30 (vs30 vz30) v230 : ∀{Γ A B C} → Tm30 (snoc30 (snoc30 (snoc30 Γ A) B) C) A;v230 = var30 (vs30 (vs30 vz30)) v330 : ∀{Γ A B C D} → Tm30 (snoc30 (snoc30 (snoc30 (snoc30 Γ A) B) C) D) A;v330 = var30 (vs30 (vs30 (vs30 vz30))) v430 : ∀{Γ A B C D E} → Tm30 (snoc30 (snoc30 (snoc30 (snoc30 (snoc30 Γ A) B) C) D) E) A;v430 = var30 (vs30 (vs30 (vs30 (vs30 vz30)))) test30 : ∀{Γ A} → Tm30 Γ (arr30 (arr30 A A) (arr30 A A));test30 = lam30 (lam30 (app30 v130 (app30 v130 (app30 v130 (app30 v130 (app30 v130 (app30 v130 v030))))))) {-# OPTIONS --type-in-type #-} Ty31 : Set; Ty31 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι31 : Ty31; ι31 = λ _ ι31 _ → ι31 arr31 : Ty31 → Ty31 → Ty31; arr31 = λ A B Ty31 ι31 arr31 → arr31 (A Ty31 ι31 arr31) (B Ty31 ι31 arr31) Con31 : Set;Con31 = (Con31 : Set) (nil : Con31) (snoc : Con31 → Ty31 → Con31) → Con31 nil31 : Con31;nil31 = λ Con31 nil31 snoc → nil31 snoc31 : Con31 → Ty31 → Con31;snoc31 = λ Γ A Con31 nil31 snoc31 → snoc31 (Γ Con31 nil31 snoc31) A Var31 : Con31 → Ty31 → Set;Var31 = λ Γ A → (Var31 : Con31 → Ty31 → Set) (vz : (Γ : _)(A : _) → Var31 (snoc31 Γ A) A) (vs : (Γ : _)(B A : _) → Var31 Γ A → Var31 (snoc31 Γ B) A) → Var31 Γ A vz31 : ∀{Γ A} → Var31 (snoc31 Γ A) A;vz31 = λ Var31 vz31 vs → vz31 _ _ vs31 : ∀{Γ B A} → Var31 Γ A → Var31 (snoc31 Γ B) A;vs31 = λ x Var31 vz31 vs31 → vs31 _ _ _ (x Var31 vz31 vs31) Tm31 : Con31 → Ty31 → Set;Tm31 = λ Γ A → (Tm31 : Con31 → Ty31 → Set) (var : (Γ : _) (A : _) → Var31 Γ A → Tm31 Γ A) (lam : (Γ : _) (A B : _) → Tm31 (snoc31 Γ A) B → Tm31 Γ (arr31 A B)) (app : (Γ : _) (A B : _) → Tm31 Γ (arr31 A B) → Tm31 Γ A → Tm31 Γ B) → Tm31 Γ A var31 : ∀{Γ A} → Var31 Γ A → Tm31 Γ A;var31 = λ x Tm31 var31 lam app → var31 _ _ x lam31 : ∀{Γ A B} → Tm31 (snoc31 Γ A) B → Tm31 Γ (arr31 A B);lam31 = λ t Tm31 var31 lam31 app → lam31 _ _ _ (t Tm31 var31 lam31 app) app31 : ∀{Γ A B} → Tm31 Γ (arr31 A B) → Tm31 Γ A → Tm31 Γ B;app31 = λ t u Tm31 var31 lam31 app31 → app31 _ _ _ (t Tm31 var31 lam31 app31) (u Tm31 var31 lam31 app31) v031 : ∀{Γ A} → Tm31 (snoc31 Γ A) A;v031 = var31 vz31 v131 : ∀{Γ A B} → Tm31 (snoc31 (snoc31 Γ A) B) A;v131 = var31 (vs31 vz31) v231 : ∀{Γ A B C} → Tm31 (snoc31 (snoc31 (snoc31 Γ A) B) C) A;v231 = var31 (vs31 (vs31 vz31)) v331 : ∀{Γ A B C D} → Tm31 (snoc31 (snoc31 (snoc31 (snoc31 Γ A) B) C) D) A;v331 = var31 (vs31 (vs31 (vs31 vz31))) v431 : ∀{Γ A B C D E} → Tm31 (snoc31 (snoc31 (snoc31 (snoc31 (snoc31 Γ A) B) C) D) E) A;v431 = var31 (vs31 (vs31 (vs31 (vs31 vz31)))) test31 : ∀{Γ A} → Tm31 Γ (arr31 (arr31 A A) (arr31 A A));test31 = lam31 (lam31 (app31 v131 (app31 v131 (app31 v131 (app31 v131 (app31 v131 (app31 v131 v031))))))) {-# OPTIONS --type-in-type #-} Ty32 : Set; Ty32 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι32 : Ty32; ι32 = λ _ ι32 _ → ι32 arr32 : Ty32 → Ty32 → Ty32; arr32 = λ A B Ty32 ι32 arr32 → arr32 (A Ty32 ι32 arr32) (B Ty32 ι32 arr32) Con32 : Set;Con32 = (Con32 : Set) (nil : Con32) (snoc : Con32 → Ty32 → Con32) → Con32 nil32 : Con32;nil32 = λ Con32 nil32 snoc → nil32 snoc32 : Con32 → Ty32 → Con32;snoc32 = λ Γ A Con32 nil32 snoc32 → snoc32 (Γ Con32 nil32 snoc32) A Var32 : Con32 → Ty32 → Set;Var32 = λ Γ A → (Var32 : Con32 → Ty32 → Set) (vz : (Γ : _)(A : _) → Var32 (snoc32 Γ A) A) (vs : (Γ : _)(B A : _) → Var32 Γ A → Var32 (snoc32 Γ B) A) → Var32 Γ A vz32 : ∀{Γ A} → Var32 (snoc32 Γ A) A;vz32 = λ Var32 vz32 vs → vz32 _ _ vs32 : ∀{Γ B A} → Var32 Γ A → Var32 (snoc32 Γ B) A;vs32 = λ x Var32 vz32 vs32 → vs32 _ _ _ (x Var32 vz32 vs32) Tm32 : Con32 → Ty32 → Set;Tm32 = λ Γ A → (Tm32 : Con32 → Ty32 → Set) (var : (Γ : _) (A : _) → Var32 Γ A → Tm32 Γ A) (lam : (Γ : _) (A B : _) → Tm32 (snoc32 Γ A) B → Tm32 Γ (arr32 A B)) (app : (Γ : _) (A B : _) → Tm32 Γ (arr32 A B) → Tm32 Γ A → Tm32 Γ B) → Tm32 Γ A var32 : ∀{Γ A} → Var32 Γ A → Tm32 Γ A;var32 = λ x Tm32 var32 lam app → var32 _ _ x lam32 : ∀{Γ A B} → Tm32 (snoc32 Γ A) B → Tm32 Γ (arr32 A B);lam32 = λ t Tm32 var32 lam32 app → lam32 _ _ _ (t Tm32 var32 lam32 app) app32 : ∀{Γ A B} → Tm32 Γ (arr32 A B) → Tm32 Γ A → Tm32 Γ B;app32 = λ t u Tm32 var32 lam32 app32 → app32 _ _ _ (t Tm32 var32 lam32 app32) (u Tm32 var32 lam32 app32) v032 : ∀{Γ A} → Tm32 (snoc32 Γ A) A;v032 = var32 vz32 v132 : ∀{Γ A B} → Tm32 (snoc32 (snoc32 Γ A) B) A;v132 = var32 (vs32 vz32) v232 : ∀{Γ A B C} → Tm32 (snoc32 (snoc32 (snoc32 Γ A) B) C) A;v232 = var32 (vs32 (vs32 vz32)) v332 : ∀{Γ A B C D} → Tm32 (snoc32 (snoc32 (snoc32 (snoc32 Γ A) B) C) D) A;v332 = var32 (vs32 (vs32 (vs32 vz32))) v432 : ∀{Γ A B C D E} → Tm32 (snoc32 (snoc32 (snoc32 (snoc32 (snoc32 Γ A) B) C) D) E) A;v432 = var32 (vs32 (vs32 (vs32 (vs32 vz32)))) test32 : ∀{Γ A} → Tm32 Γ (arr32 (arr32 A A) (arr32 A A));test32 = lam32 (lam32 (app32 v132 (app32 v132 (app32 v132 (app32 v132 (app32 v132 (app32 v132 v032))))))) {-# OPTIONS --type-in-type #-} Ty33 : Set; Ty33 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι33 : Ty33; ι33 = λ _ ι33 _ → ι33 arr33 : Ty33 → Ty33 → Ty33; arr33 = λ A B Ty33 ι33 arr33 → arr33 (A Ty33 ι33 arr33) (B Ty33 ι33 arr33) Con33 : Set;Con33 = (Con33 : Set) (nil : Con33) (snoc : Con33 → Ty33 → Con33) → Con33 nil33 : Con33;nil33 = λ Con33 nil33 snoc → nil33 snoc33 : Con33 → Ty33 → Con33;snoc33 = λ Γ A Con33 nil33 snoc33 → snoc33 (Γ Con33 nil33 snoc33) A Var33 : Con33 → Ty33 → Set;Var33 = λ Γ A → (Var33 : Con33 → Ty33 → Set) (vz : (Γ : _)(A : _) → Var33 (snoc33 Γ A) A) (vs : (Γ : _)(B A : _) → Var33 Γ A → Var33 (snoc33 Γ B) A) → Var33 Γ A vz33 : ∀{Γ A} → Var33 (snoc33 Γ A) A;vz33 = λ Var33 vz33 vs → vz33 _ _ vs33 : ∀{Γ B A} → Var33 Γ A → Var33 (snoc33 Γ B) A;vs33 = λ x Var33 vz33 vs33 → vs33 _ _ _ (x Var33 vz33 vs33) Tm33 : Con33 → Ty33 → Set;Tm33 = λ Γ A → (Tm33 : Con33 → Ty33 → Set) (var : (Γ : _) (A : _) → Var33 Γ A → Tm33 Γ A) (lam : (Γ : _) (A B : _) → Tm33 (snoc33 Γ A) B → Tm33 Γ (arr33 A B)) (app : (Γ : _) (A B : _) → Tm33 Γ (arr33 A B) → Tm33 Γ A → Tm33 Γ B) → Tm33 Γ A var33 : ∀{Γ A} → Var33 Γ A → Tm33 Γ A;var33 = λ x Tm33 var33 lam app → var33 _ _ x lam33 : ∀{Γ A B} → Tm33 (snoc33 Γ A) B → Tm33 Γ (arr33 A B);lam33 = λ t Tm33 var33 lam33 app → lam33 _ _ _ (t Tm33 var33 lam33 app) app33 : ∀{Γ A B} → Tm33 Γ (arr33 A B) → Tm33 Γ A → Tm33 Γ B;app33 = λ t u Tm33 var33 lam33 app33 → app33 _ _ _ (t Tm33 var33 lam33 app33) (u Tm33 var33 lam33 app33) v033 : ∀{Γ A} → Tm33 (snoc33 Γ A) A;v033 = var33 vz33 v133 : ∀{Γ A B} → Tm33 (snoc33 (snoc33 Γ A) B) A;v133 = var33 (vs33 vz33) v233 : ∀{Γ A B C} → Tm33 (snoc33 (snoc33 (snoc33 Γ A) B) C) A;v233 = var33 (vs33 (vs33 vz33)) v333 : ∀{Γ A B C D} → Tm33 (snoc33 (snoc33 (snoc33 (snoc33 Γ A) B) C) D) A;v333 = var33 (vs33 (vs33 (vs33 vz33))) v433 : ∀{Γ A B C D E} → Tm33 (snoc33 (snoc33 (snoc33 (snoc33 (snoc33 Γ A) B) C) D) E) A;v433 = var33 (vs33 (vs33 (vs33 (vs33 vz33)))) test33 : ∀{Γ A} → Tm33 Γ (arr33 (arr33 A A) (arr33 A A));test33 = lam33 (lam33 (app33 v133 (app33 v133 (app33 v133 (app33 v133 (app33 v133 (app33 v133 v033))))))) {-# OPTIONS --type-in-type #-} Ty34 : Set; Ty34 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι34 : Ty34; ι34 = λ _ ι34 _ → ι34 arr34 : Ty34 → Ty34 → Ty34; arr34 = λ A B Ty34 ι34 arr34 → arr34 (A Ty34 ι34 arr34) (B Ty34 ι34 arr34) Con34 : Set;Con34 = (Con34 : Set) (nil : Con34) (snoc : Con34 → Ty34 → Con34) → Con34 nil34 : Con34;nil34 = λ Con34 nil34 snoc → nil34 snoc34 : Con34 → Ty34 → Con34;snoc34 = λ Γ A Con34 nil34 snoc34 → snoc34 (Γ Con34 nil34 snoc34) A Var34 : Con34 → Ty34 → Set;Var34 = λ Γ A → (Var34 : Con34 → Ty34 → Set) (vz : (Γ : _)(A : _) → Var34 (snoc34 Γ A) A) (vs : (Γ : _)(B A : _) → Var34 Γ A → Var34 (snoc34 Γ B) A) → Var34 Γ A vz34 : ∀{Γ A} → Var34 (snoc34 Γ A) A;vz34 = λ Var34 vz34 vs → vz34 _ _ vs34 : ∀{Γ B A} → Var34 Γ A → Var34 (snoc34 Γ B) A;vs34 = λ x Var34 vz34 vs34 → vs34 _ _ _ (x Var34 vz34 vs34) Tm34 : Con34 → Ty34 → Set;Tm34 = λ Γ A → (Tm34 : Con34 → Ty34 → Set) (var : (Γ : _) (A : _) → Var34 Γ A → Tm34 Γ A) (lam : (Γ : _) (A B : _) → Tm34 (snoc34 Γ A) B → Tm34 Γ (arr34 A B)) (app : (Γ : _) (A B : _) → Tm34 Γ (arr34 A B) → Tm34 Γ A → Tm34 Γ B) → Tm34 Γ A var34 : ∀{Γ A} → Var34 Γ A → Tm34 Γ A;var34 = λ x Tm34 var34 lam app → var34 _ _ x lam34 : ∀{Γ A B} → Tm34 (snoc34 Γ A) B → Tm34 Γ (arr34 A B);lam34 = λ t Tm34 var34 lam34 app → lam34 _ _ _ (t Tm34 var34 lam34 app) app34 : ∀{Γ A B} → Tm34 Γ (arr34 A B) → Tm34 Γ A → Tm34 Γ B;app34 = λ t u Tm34 var34 lam34 app34 → app34 _ _ _ (t Tm34 var34 lam34 app34) (u Tm34 var34 lam34 app34) v034 : ∀{Γ A} → Tm34 (snoc34 Γ A) A;v034 = var34 vz34 v134 : ∀{Γ A B} → Tm34 (snoc34 (snoc34 Γ A) B) A;v134 = var34 (vs34 vz34) v234 : ∀{Γ A B C} → Tm34 (snoc34 (snoc34 (snoc34 Γ A) B) C) A;v234 = var34 (vs34 (vs34 vz34)) v334 : ∀{Γ A B C D} → Tm34 (snoc34 (snoc34 (snoc34 (snoc34 Γ A) B) C) D) A;v334 = var34 (vs34 (vs34 (vs34 vz34))) v434 : ∀{Γ A B C D E} → Tm34 (snoc34 (snoc34 (snoc34 (snoc34 (snoc34 Γ A) B) C) D) E) A;v434 = var34 (vs34 (vs34 (vs34 (vs34 vz34)))) test34 : ∀{Γ A} → Tm34 Γ (arr34 (arr34 A A) (arr34 A A));test34 = lam34 (lam34 (app34 v134 (app34 v134 (app34 v134 (app34 v134 (app34 v134 (app34 v134 v034))))))) {-# OPTIONS --type-in-type #-} Ty35 : Set; Ty35 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι35 : Ty35; ι35 = λ _ ι35 _ → ι35 arr35 : Ty35 → Ty35 → Ty35; arr35 = λ A B Ty35 ι35 arr35 → arr35 (A Ty35 ι35 arr35) (B Ty35 ι35 arr35) Con35 : Set;Con35 = (Con35 : Set) (nil : Con35) (snoc : Con35 → Ty35 → Con35) → Con35 nil35 : Con35;nil35 = λ Con35 nil35 snoc → nil35 snoc35 : Con35 → Ty35 → Con35;snoc35 = λ Γ A Con35 nil35 snoc35 → snoc35 (Γ Con35 nil35 snoc35) A Var35 : Con35 → Ty35 → Set;Var35 = λ Γ A → (Var35 : Con35 → Ty35 → Set) (vz : (Γ : _)(A : _) → Var35 (snoc35 Γ A) A) (vs : (Γ : _)(B A : _) → Var35 Γ A → Var35 (snoc35 Γ B) A) → Var35 Γ A vz35 : ∀{Γ A} → Var35 (snoc35 Γ A) A;vz35 = λ Var35 vz35 vs → vz35 _ _ vs35 : ∀{Γ B A} → Var35 Γ A → Var35 (snoc35 Γ B) A;vs35 = λ x Var35 vz35 vs35 → vs35 _ _ _ (x Var35 vz35 vs35) Tm35 : Con35 → Ty35 → Set;Tm35 = λ Γ A → (Tm35 : Con35 → Ty35 → Set) (var : (Γ : _) (A : _) → Var35 Γ A → Tm35 Γ A) (lam : (Γ : _) (A B : _) → Tm35 (snoc35 Γ A) B → Tm35 Γ (arr35 A B)) (app : (Γ : _) (A B : _) → Tm35 Γ (arr35 A B) → Tm35 Γ A → Tm35 Γ B) → Tm35 Γ A var35 : ∀{Γ A} → Var35 Γ A → Tm35 Γ A;var35 = λ x Tm35 var35 lam app → var35 _ _ x lam35 : ∀{Γ A B} → Tm35 (snoc35 Γ A) B → Tm35 Γ (arr35 A B);lam35 = λ t Tm35 var35 lam35 app → lam35 _ _ _ (t Tm35 var35 lam35 app) app35 : ∀{Γ A B} → Tm35 Γ (arr35 A B) → Tm35 Γ A → Tm35 Γ B;app35 = λ t u Tm35 var35 lam35 app35 → app35 _ _ _ (t Tm35 var35 lam35 app35) (u Tm35 var35 lam35 app35) v035 : ∀{Γ A} → Tm35 (snoc35 Γ A) A;v035 = var35 vz35 v135 : ∀{Γ A B} → Tm35 (snoc35 (snoc35 Γ A) B) A;v135 = var35 (vs35 vz35) v235 : ∀{Γ A B C} → Tm35 (snoc35 (snoc35 (snoc35 Γ A) B) C) A;v235 = var35 (vs35 (vs35 vz35)) v335 : ∀{Γ A B C D} → Tm35 (snoc35 (snoc35 (snoc35 (snoc35 Γ A) B) C) D) A;v335 = var35 (vs35 (vs35 (vs35 vz35))) v435 : ∀{Γ A B C D E} → Tm35 (snoc35 (snoc35 (snoc35 (snoc35 (snoc35 Γ A) B) C) D) E) A;v435 = var35 (vs35 (vs35 (vs35 (vs35 vz35)))) test35 : ∀{Γ A} → Tm35 Γ (arr35 (arr35 A A) (arr35 A A));test35 = lam35 (lam35 (app35 v135 (app35 v135 (app35 v135 (app35 v135 (app35 v135 (app35 v135 v035))))))) {-# OPTIONS --type-in-type #-} Ty36 : Set; Ty36 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι36 : Ty36; ι36 = λ _ ι36 _ → ι36 arr36 : Ty36 → Ty36 → Ty36; arr36 = λ A B Ty36 ι36 arr36 → arr36 (A Ty36 ι36 arr36) (B Ty36 ι36 arr36) Con36 : Set;Con36 = (Con36 : Set) (nil : Con36) (snoc : Con36 → Ty36 → Con36) → Con36 nil36 : Con36;nil36 = λ Con36 nil36 snoc → nil36 snoc36 : Con36 → Ty36 → Con36;snoc36 = λ Γ A Con36 nil36 snoc36 → snoc36 (Γ Con36 nil36 snoc36) A Var36 : Con36 → Ty36 → Set;Var36 = λ Γ A → (Var36 : Con36 → Ty36 → Set) (vz : (Γ : _)(A : _) → Var36 (snoc36 Γ A) A) (vs : (Γ : _)(B A : _) → Var36 Γ A → Var36 (snoc36 Γ B) A) → Var36 Γ A vz36 : ∀{Γ A} → Var36 (snoc36 Γ A) A;vz36 = λ Var36 vz36 vs → vz36 _ _ vs36 : ∀{Γ B A} → Var36 Γ A → Var36 (snoc36 Γ B) A;vs36 = λ x Var36 vz36 vs36 → vs36 _ _ _ (x Var36 vz36 vs36) Tm36 : Con36 → Ty36 → Set;Tm36 = λ Γ A → (Tm36 : Con36 → Ty36 → Set) (var : (Γ : _) (A : _) → Var36 Γ A → Tm36 Γ A) (lam : (Γ : _) (A B : _) → Tm36 (snoc36 Γ A) B → Tm36 Γ (arr36 A B)) (app : (Γ : _) (A B : _) → Tm36 Γ (arr36 A B) → Tm36 Γ A → Tm36 Γ B) → Tm36 Γ A var36 : ∀{Γ A} → Var36 Γ A → Tm36 Γ A;var36 = λ x Tm36 var36 lam app → var36 _ _ x lam36 : ∀{Γ A B} → Tm36 (snoc36 Γ A) B → Tm36 Γ (arr36 A B);lam36 = λ t Tm36 var36 lam36 app → lam36 _ _ _ (t Tm36 var36 lam36 app) app36 : ∀{Γ A B} → Tm36 Γ (arr36 A B) → Tm36 Γ A → Tm36 Γ B;app36 = λ t u Tm36 var36 lam36 app36 → app36 _ _ _ (t Tm36 var36 lam36 app36) (u Tm36 var36 lam36 app36) v036 : ∀{Γ A} → Tm36 (snoc36 Γ A) A;v036 = var36 vz36 v136 : ∀{Γ A B} → Tm36 (snoc36 (snoc36 Γ A) B) A;v136 = var36 (vs36 vz36) v236 : ∀{Γ A B C} → Tm36 (snoc36 (snoc36 (snoc36 Γ A) B) C) A;v236 = var36 (vs36 (vs36 vz36)) v336 : ∀{Γ A B C D} → Tm36 (snoc36 (snoc36 (snoc36 (snoc36 Γ A) B) C) D) A;v336 = var36 (vs36 (vs36 (vs36 vz36))) v436 : ∀{Γ A B C D E} → Tm36 (snoc36 (snoc36 (snoc36 (snoc36 (snoc36 Γ A) B) C) D) E) A;v436 = var36 (vs36 (vs36 (vs36 (vs36 vz36)))) test36 : ∀{Γ A} → Tm36 Γ (arr36 (arr36 A A) (arr36 A A));test36 = lam36 (lam36 (app36 v136 (app36 v136 (app36 v136 (app36 v136 (app36 v136 (app36 v136 v036))))))) {-# OPTIONS --type-in-type #-} Ty37 : Set; Ty37 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι37 : Ty37; ι37 = λ _ ι37 _ → ι37 arr37 : Ty37 → Ty37 → Ty37; arr37 = λ A B Ty37 ι37 arr37 → arr37 (A Ty37 ι37 arr37) (B Ty37 ι37 arr37) Con37 : Set;Con37 = (Con37 : Set) (nil : Con37) (snoc : Con37 → Ty37 → Con37) → Con37 nil37 : Con37;nil37 = λ Con37 nil37 snoc → nil37 snoc37 : Con37 → Ty37 → Con37;snoc37 = λ Γ A Con37 nil37 snoc37 → snoc37 (Γ Con37 nil37 snoc37) A Var37 : Con37 → Ty37 → Set;Var37 = λ Γ A → (Var37 : Con37 → Ty37 → Set) (vz : (Γ : _)(A : _) → Var37 (snoc37 Γ A) A) (vs : (Γ : _)(B A : _) → Var37 Γ A → Var37 (snoc37 Γ B) A) → Var37 Γ A vz37 : ∀{Γ A} → Var37 (snoc37 Γ A) A;vz37 = λ Var37 vz37 vs → vz37 _ _ vs37 : ∀{Γ B A} → Var37 Γ A → Var37 (snoc37 Γ B) A;vs37 = λ x Var37 vz37 vs37 → vs37 _ _ _ (x Var37 vz37 vs37) Tm37 : Con37 → Ty37 → Set;Tm37 = λ Γ A → (Tm37 : Con37 → Ty37 → Set) (var : (Γ : _) (A : _) → Var37 Γ A → Tm37 Γ A) (lam : (Γ : _) (A B : _) → Tm37 (snoc37 Γ A) B → Tm37 Γ (arr37 A B)) (app : (Γ : _) (A B : _) → Tm37 Γ (arr37 A B) → Tm37 Γ A → Tm37 Γ B) → Tm37 Γ A var37 : ∀{Γ A} → Var37 Γ A → Tm37 Γ A;var37 = λ x Tm37 var37 lam app → var37 _ _ x lam37 : ∀{Γ A B} → Tm37 (snoc37 Γ A) B → Tm37 Γ (arr37 A B);lam37 = λ t Tm37 var37 lam37 app → lam37 _ _ _ (t Tm37 var37 lam37 app) app37 : ∀{Γ A B} → Tm37 Γ (arr37 A B) → Tm37 Γ A → Tm37 Γ B;app37 = λ t u Tm37 var37 lam37 app37 → app37 _ _ _ (t Tm37 var37 lam37 app37) (u Tm37 var37 lam37 app37) v037 : ∀{Γ A} → Tm37 (snoc37 Γ A) A;v037 = var37 vz37 v137 : ∀{Γ A B} → Tm37 (snoc37 (snoc37 Γ A) B) A;v137 = var37 (vs37 vz37) v237 : ∀{Γ A B C} → Tm37 (snoc37 (snoc37 (snoc37 Γ A) B) C) A;v237 = var37 (vs37 (vs37 vz37)) v337 : ∀{Γ A B C D} → Tm37 (snoc37 (snoc37 (snoc37 (snoc37 Γ A) B) C) D) A;v337 = var37 (vs37 (vs37 (vs37 vz37))) v437 : ∀{Γ A B C D E} → Tm37 (snoc37 (snoc37 (snoc37 (snoc37 (snoc37 Γ A) B) C) D) E) A;v437 = var37 (vs37 (vs37 (vs37 (vs37 vz37)))) test37 : ∀{Γ A} → Tm37 Γ (arr37 (arr37 A A) (arr37 A A));test37 = lam37 (lam37 (app37 v137 (app37 v137 (app37 v137 (app37 v137 (app37 v137 (app37 v137 v037))))))) {-# OPTIONS --type-in-type #-} Ty38 : Set; Ty38 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι38 : Ty38; ι38 = λ _ ι38 _ → ι38 arr38 : Ty38 → Ty38 → Ty38; arr38 = λ A B Ty38 ι38 arr38 → arr38 (A Ty38 ι38 arr38) (B Ty38 ι38 arr38) Con38 : Set;Con38 = (Con38 : Set) (nil : Con38) (snoc : Con38 → Ty38 → Con38) → Con38 nil38 : Con38;nil38 = λ Con38 nil38 snoc → nil38 snoc38 : Con38 → Ty38 → Con38;snoc38 = λ Γ A Con38 nil38 snoc38 → snoc38 (Γ Con38 nil38 snoc38) A Var38 : Con38 → Ty38 → Set;Var38 = λ Γ A → (Var38 : Con38 → Ty38 → Set) (vz : (Γ : _)(A : _) → Var38 (snoc38 Γ A) A) (vs : (Γ : _)(B A : _) → Var38 Γ A → Var38 (snoc38 Γ B) A) → Var38 Γ A vz38 : ∀{Γ A} → Var38 (snoc38 Γ A) A;vz38 = λ Var38 vz38 vs → vz38 _ _ vs38 : ∀{Γ B A} → Var38 Γ A → Var38 (snoc38 Γ B) A;vs38 = λ x Var38 vz38 vs38 → vs38 _ _ _ (x Var38 vz38 vs38) Tm38 : Con38 → Ty38 → Set;Tm38 = λ Γ A → (Tm38 : Con38 → Ty38 → Set) (var : (Γ : _) (A : _) → Var38 Γ A → Tm38 Γ A) (lam : (Γ : _) (A B : _) → Tm38 (snoc38 Γ A) B → Tm38 Γ (arr38 A B)) (app : (Γ : _) (A B : _) → Tm38 Γ (arr38 A B) → Tm38 Γ A → Tm38 Γ B) → Tm38 Γ A var38 : ∀{Γ A} → Var38 Γ A → Tm38 Γ A;var38 = λ x Tm38 var38 lam app → var38 _ _ x lam38 : ∀{Γ A B} → Tm38 (snoc38 Γ A) B → Tm38 Γ (arr38 A B);lam38 = λ t Tm38 var38 lam38 app → lam38 _ _ _ (t Tm38 var38 lam38 app) app38 : ∀{Γ A B} → Tm38 Γ (arr38 A B) → Tm38 Γ A → Tm38 Γ B;app38 = λ t u Tm38 var38 lam38 app38 → app38 _ _ _ (t Tm38 var38 lam38 app38) (u Tm38 var38 lam38 app38) v038 : ∀{Γ A} → Tm38 (snoc38 Γ A) A;v038 = var38 vz38 v138 : ∀{Γ A B} → Tm38 (snoc38 (snoc38 Γ A) B) A;v138 = var38 (vs38 vz38) v238 : ∀{Γ A B C} → Tm38 (snoc38 (snoc38 (snoc38 Γ A) B) C) A;v238 = var38 (vs38 (vs38 vz38)) v338 : ∀{Γ A B C D} → Tm38 (snoc38 (snoc38 (snoc38 (snoc38 Γ A) B) C) D) A;v338 = var38 (vs38 (vs38 (vs38 vz38))) v438 : ∀{Γ A B C D E} → Tm38 (snoc38 (snoc38 (snoc38 (snoc38 (snoc38 Γ A) B) C) D) E) A;v438 = var38 (vs38 (vs38 (vs38 (vs38 vz38)))) test38 : ∀{Γ A} → Tm38 Γ (arr38 (arr38 A A) (arr38 A A));test38 = lam38 (lam38 (app38 v138 (app38 v138 (app38 v138 (app38 v138 (app38 v138 (app38 v138 v038))))))) {-# OPTIONS --type-in-type #-} Ty39 : Set; Ty39 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι39 : Ty39; ι39 = λ _ ι39 _ → ι39 arr39 : Ty39 → Ty39 → Ty39; arr39 = λ A B Ty39 ι39 arr39 → arr39 (A Ty39 ι39 arr39) (B Ty39 ι39 arr39) Con39 : Set;Con39 = (Con39 : Set) (nil : Con39) (snoc : Con39 → Ty39 → Con39) → Con39 nil39 : Con39;nil39 = λ Con39 nil39 snoc → nil39 snoc39 : Con39 → Ty39 → Con39;snoc39 = λ Γ A Con39 nil39 snoc39 → snoc39 (Γ Con39 nil39 snoc39) A Var39 : Con39 → Ty39 → Set;Var39 = λ Γ A → (Var39 : Con39 → Ty39 → Set) (vz : (Γ : _)(A : _) → Var39 (snoc39 Γ A) A) (vs : (Γ : _)(B A : _) → Var39 Γ A → Var39 (snoc39 Γ B) A) → Var39 Γ A vz39 : ∀{Γ A} → Var39 (snoc39 Γ A) A;vz39 = λ Var39 vz39 vs → vz39 _ _ vs39 : ∀{Γ B A} → Var39 Γ A → Var39 (snoc39 Γ B) A;vs39 = λ x Var39 vz39 vs39 → vs39 _ _ _ (x Var39 vz39 vs39) Tm39 : Con39 → Ty39 → Set;Tm39 = λ Γ A → (Tm39 : Con39 → Ty39 → Set) (var : (Γ : _) (A : _) → Var39 Γ A → Tm39 Γ A) (lam : (Γ : _) (A B : _) → Tm39 (snoc39 Γ A) B → Tm39 Γ (arr39 A B)) (app : (Γ : _) (A B : _) → Tm39 Γ (arr39 A B) → Tm39 Γ A → Tm39 Γ B) → Tm39 Γ A var39 : ∀{Γ A} → Var39 Γ A → Tm39 Γ A;var39 = λ x Tm39 var39 lam app → var39 _ _ x lam39 : ∀{Γ A B} → Tm39 (snoc39 Γ A) B → Tm39 Γ (arr39 A B);lam39 = λ t Tm39 var39 lam39 app → lam39 _ _ _ (t Tm39 var39 lam39 app) app39 : ∀{Γ A B} → Tm39 Γ (arr39 A B) → Tm39 Γ A → Tm39 Γ B;app39 = λ t u Tm39 var39 lam39 app39 → app39 _ _ _ (t Tm39 var39 lam39 app39) (u Tm39 var39 lam39 app39) v039 : ∀{Γ A} → Tm39 (snoc39 Γ A) A;v039 = var39 vz39 v139 : ∀{Γ A B} → Tm39 (snoc39 (snoc39 Γ A) B) A;v139 = var39 (vs39 vz39) v239 : ∀{Γ A B C} → Tm39 (snoc39 (snoc39 (snoc39 Γ A) B) C) A;v239 = var39 (vs39 (vs39 vz39)) v339 : ∀{Γ A B C D} → Tm39 (snoc39 (snoc39 (snoc39 (snoc39 Γ A) B) C) D) A;v339 = var39 (vs39 (vs39 (vs39 vz39))) v439 : ∀{Γ A B C D E} → Tm39 (snoc39 (snoc39 (snoc39 (snoc39 (snoc39 Γ A) B) C) D) E) A;v439 = var39 (vs39 (vs39 (vs39 (vs39 vz39)))) test39 : ∀{Γ A} → Tm39 Γ (arr39 (arr39 A A) (arr39 A A));test39 = lam39 (lam39 (app39 v139 (app39 v139 (app39 v139 (app39 v139 (app39 v139 (app39 v139 v039))))))) {-# OPTIONS --type-in-type #-} Ty40 : Set; Ty40 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι40 : Ty40; ι40 = λ _ ι40 _ → ι40 arr40 : Ty40 → Ty40 → Ty40; arr40 = λ A B Ty40 ι40 arr40 → arr40 (A Ty40 ι40 arr40) (B Ty40 ι40 arr40) Con40 : Set;Con40 = (Con40 : Set) (nil : Con40) (snoc : Con40 → Ty40 → Con40) → Con40 nil40 : Con40;nil40 = λ Con40 nil40 snoc → nil40 snoc40 : Con40 → Ty40 → Con40;snoc40 = λ Γ A Con40 nil40 snoc40 → snoc40 (Γ Con40 nil40 snoc40) A Var40 : Con40 → Ty40 → Set;Var40 = λ Γ A → (Var40 : Con40 → Ty40 → Set) (vz : (Γ : _)(A : _) → Var40 (snoc40 Γ A) A) (vs : (Γ : _)(B A : _) → Var40 Γ A → Var40 (snoc40 Γ B) A) → Var40 Γ A vz40 : ∀{Γ A} → Var40 (snoc40 Γ A) A;vz40 = λ Var40 vz40 vs → vz40 _ _ vs40 : ∀{Γ B A} → Var40 Γ A → Var40 (snoc40 Γ B) A;vs40 = λ x Var40 vz40 vs40 → vs40 _ _ _ (x Var40 vz40 vs40) Tm40 : Con40 → Ty40 → Set;Tm40 = λ Γ A → (Tm40 : Con40 → Ty40 → Set) (var : (Γ : _) (A : _) → Var40 Γ A → Tm40 Γ A) (lam : (Γ : _) (A B : _) → Tm40 (snoc40 Γ A) B → Tm40 Γ (arr40 A B)) (app : (Γ : _) (A B : _) → Tm40 Γ (arr40 A B) → Tm40 Γ A → Tm40 Γ B) → Tm40 Γ A var40 : ∀{Γ A} → Var40 Γ A → Tm40 Γ A;var40 = λ x Tm40 var40 lam app → var40 _ _ x lam40 : ∀{Γ A B} → Tm40 (snoc40 Γ A) B → Tm40 Γ (arr40 A B);lam40 = λ t Tm40 var40 lam40 app → lam40 _ _ _ (t Tm40 var40 lam40 app) app40 : ∀{Γ A B} → Tm40 Γ (arr40 A B) → Tm40 Γ A → Tm40 Γ B;app40 = λ t u Tm40 var40 lam40 app40 → app40 _ _ _ (t Tm40 var40 lam40 app40) (u Tm40 var40 lam40 app40) v040 : ∀{Γ A} → Tm40 (snoc40 Γ A) A;v040 = var40 vz40 v140 : ∀{Γ A B} → Tm40 (snoc40 (snoc40 Γ A) B) A;v140 = var40 (vs40 vz40) v240 : ∀{Γ A B C} → Tm40 (snoc40 (snoc40 (snoc40 Γ A) B) C) A;v240 = var40 (vs40 (vs40 vz40)) v340 : ∀{Γ A B C D} → Tm40 (snoc40 (snoc40 (snoc40 (snoc40 Γ A) B) C) D) A;v340 = var40 (vs40 (vs40 (vs40 vz40))) v440 : ∀{Γ A B C D E} → Tm40 (snoc40 (snoc40 (snoc40 (snoc40 (snoc40 Γ A) B) C) D) E) A;v440 = var40 (vs40 (vs40 (vs40 (vs40 vz40)))) test40 : ∀{Γ A} → Tm40 Γ (arr40 (arr40 A A) (arr40 A A));test40 = lam40 (lam40 (app40 v140 (app40 v140 (app40 v140 (app40 v140 (app40 v140 (app40 v140 v040))))))) {-# OPTIONS --type-in-type #-} Ty41 : Set; Ty41 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι41 : Ty41; ι41 = λ _ ι41 _ → ι41 arr41 : Ty41 → Ty41 → Ty41; arr41 = λ A B Ty41 ι41 arr41 → arr41 (A Ty41 ι41 arr41) (B Ty41 ι41 arr41) Con41 : Set;Con41 = (Con41 : Set) (nil : Con41) (snoc : Con41 → Ty41 → Con41) → Con41 nil41 : Con41;nil41 = λ Con41 nil41 snoc → nil41 snoc41 : Con41 → Ty41 → Con41;snoc41 = λ Γ A Con41 nil41 snoc41 → snoc41 (Γ Con41 nil41 snoc41) A Var41 : Con41 → Ty41 → Set;Var41 = λ Γ A → (Var41 : Con41 → Ty41 → Set) (vz : (Γ : _)(A : _) → Var41 (snoc41 Γ A) A) (vs : (Γ : _)(B A : _) → Var41 Γ A → Var41 (snoc41 Γ B) A) → Var41 Γ A vz41 : ∀{Γ A} → Var41 (snoc41 Γ A) A;vz41 = λ Var41 vz41 vs → vz41 _ _ vs41 : ∀{Γ B A} → Var41 Γ A → Var41 (snoc41 Γ B) A;vs41 = λ x Var41 vz41 vs41 → vs41 _ _ _ (x Var41 vz41 vs41) Tm41 : Con41 → Ty41 → Set;Tm41 = λ Γ A → (Tm41 : Con41 → Ty41 → Set) (var : (Γ : _) (A : _) → Var41 Γ A → Tm41 Γ A) (lam : (Γ : _) (A B : _) → Tm41 (snoc41 Γ A) B → Tm41 Γ (arr41 A B)) (app : (Γ : _) (A B : _) → Tm41 Γ (arr41 A B) → Tm41 Γ A → Tm41 Γ B) → Tm41 Γ A var41 : ∀{Γ A} → Var41 Γ A → Tm41 Γ A;var41 = λ x Tm41 var41 lam app → var41 _ _ x lam41 : ∀{Γ A B} → Tm41 (snoc41 Γ A) B → Tm41 Γ (arr41 A B);lam41 = λ t Tm41 var41 lam41 app → lam41 _ _ _ (t Tm41 var41 lam41 app) app41 : ∀{Γ A B} → Tm41 Γ (arr41 A B) → Tm41 Γ A → Tm41 Γ B;app41 = λ t u Tm41 var41 lam41 app41 → app41 _ _ _ (t Tm41 var41 lam41 app41) (u Tm41 var41 lam41 app41) v041 : ∀{Γ A} → Tm41 (snoc41 Γ A) A;v041 = var41 vz41 v141 : ∀{Γ A B} → Tm41 (snoc41 (snoc41 Γ A) B) A;v141 = var41 (vs41 vz41) v241 : ∀{Γ A B C} → Tm41 (snoc41 (snoc41 (snoc41 Γ A) B) C) A;v241 = var41 (vs41 (vs41 vz41)) v341 : ∀{Γ A B C D} → Tm41 (snoc41 (snoc41 (snoc41 (snoc41 Γ A) B) C) D) A;v341 = var41 (vs41 (vs41 (vs41 vz41))) v441 : ∀{Γ A B C D E} → Tm41 (snoc41 (snoc41 (snoc41 (snoc41 (snoc41 Γ A) B) C) D) E) A;v441 = var41 (vs41 (vs41 (vs41 (vs41 vz41)))) test41 : ∀{Γ A} → Tm41 Γ (arr41 (arr41 A A) (arr41 A A));test41 = lam41 (lam41 (app41 v141 (app41 v141 (app41 v141 (app41 v141 (app41 v141 (app41 v141 v041))))))) {-# OPTIONS --type-in-type #-} Ty42 : Set; Ty42 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι42 : Ty42; ι42 = λ _ ι42 _ → ι42 arr42 : Ty42 → Ty42 → Ty42; arr42 = λ A B Ty42 ι42 arr42 → arr42 (A Ty42 ι42 arr42) (B Ty42 ι42 arr42) Con42 : Set;Con42 = (Con42 : Set) (nil : Con42) (snoc : Con42 → Ty42 → Con42) → Con42 nil42 : Con42;nil42 = λ Con42 nil42 snoc → nil42 snoc42 : Con42 → Ty42 → Con42;snoc42 = λ Γ A Con42 nil42 snoc42 → snoc42 (Γ Con42 nil42 snoc42) A Var42 : Con42 → Ty42 → Set;Var42 = λ Γ A → (Var42 : Con42 → Ty42 → Set) (vz : (Γ : _)(A : _) → Var42 (snoc42 Γ A) A) (vs : (Γ : _)(B A : _) → Var42 Γ A → Var42 (snoc42 Γ B) A) → Var42 Γ A vz42 : ∀{Γ A} → Var42 (snoc42 Γ A) A;vz42 = λ Var42 vz42 vs → vz42 _ _ vs42 : ∀{Γ B A} → Var42 Γ A → Var42 (snoc42 Γ B) A;vs42 = λ x Var42 vz42 vs42 → vs42 _ _ _ (x Var42 vz42 vs42) Tm42 : Con42 → Ty42 → Set;Tm42 = λ Γ A → (Tm42 : Con42 → Ty42 → Set) (var : (Γ : _) (A : _) → Var42 Γ A → Tm42 Γ A) (lam : (Γ : _) (A B : _) → Tm42 (snoc42 Γ A) B → Tm42 Γ (arr42 A B)) (app : (Γ : _) (A B : _) → Tm42 Γ (arr42 A B) → Tm42 Γ A → Tm42 Γ B) → Tm42 Γ A var42 : ∀{Γ A} → Var42 Γ A → Tm42 Γ A;var42 = λ x Tm42 var42 lam app → var42 _ _ x lam42 : ∀{Γ A B} → Tm42 (snoc42 Γ A) B → Tm42 Γ (arr42 A B);lam42 = λ t Tm42 var42 lam42 app → lam42 _ _ _ (t Tm42 var42 lam42 app) app42 : ∀{Γ A B} → Tm42 Γ (arr42 A B) → Tm42 Γ A → Tm42 Γ B;app42 = λ t u Tm42 var42 lam42 app42 → app42 _ _ _ (t Tm42 var42 lam42 app42) (u Tm42 var42 lam42 app42) v042 : ∀{Γ A} → Tm42 (snoc42 Γ A) A;v042 = var42 vz42 v142 : ∀{Γ A B} → Tm42 (snoc42 (snoc42 Γ A) B) A;v142 = var42 (vs42 vz42) v242 : ∀{Γ A B C} → Tm42 (snoc42 (snoc42 (snoc42 Γ A) B) C) A;v242 = var42 (vs42 (vs42 vz42)) v342 : ∀{Γ A B C D} → Tm42 (snoc42 (snoc42 (snoc42 (snoc42 Γ A) B) C) D) A;v342 = var42 (vs42 (vs42 (vs42 vz42))) v442 : ∀{Γ A B C D E} → Tm42 (snoc42 (snoc42 (snoc42 (snoc42 (snoc42 Γ A) B) C) D) E) A;v442 = var42 (vs42 (vs42 (vs42 (vs42 vz42)))) test42 : ∀{Γ A} → Tm42 Γ (arr42 (arr42 A A) (arr42 A A));test42 = lam42 (lam42 (app42 v142 (app42 v142 (app42 v142 (app42 v142 (app42 v142 (app42 v142 v042))))))) {-# OPTIONS --type-in-type #-} Ty43 : Set; Ty43 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι43 : Ty43; ι43 = λ _ ι43 _ → ι43 arr43 : Ty43 → Ty43 → Ty43; arr43 = λ A B Ty43 ι43 arr43 → arr43 (A Ty43 ι43 arr43) (B Ty43 ι43 arr43) Con43 : Set;Con43 = (Con43 : Set) (nil : Con43) (snoc : Con43 → Ty43 → Con43) → Con43 nil43 : Con43;nil43 = λ Con43 nil43 snoc → nil43 snoc43 : Con43 → Ty43 → Con43;snoc43 = λ Γ A Con43 nil43 snoc43 → snoc43 (Γ Con43 nil43 snoc43) A Var43 : Con43 → Ty43 → Set;Var43 = λ Γ A → (Var43 : Con43 → Ty43 → Set) (vz : (Γ : _)(A : _) → Var43 (snoc43 Γ A) A) (vs : (Γ : _)(B A : _) → Var43 Γ A → Var43 (snoc43 Γ B) A) → Var43 Γ A vz43 : ∀{Γ A} → Var43 (snoc43 Γ A) A;vz43 = λ Var43 vz43 vs → vz43 _ _ vs43 : ∀{Γ B A} → Var43 Γ A → Var43 (snoc43 Γ B) A;vs43 = λ x Var43 vz43 vs43 → vs43 _ _ _ (x Var43 vz43 vs43) Tm43 : Con43 → Ty43 → Set;Tm43 = λ Γ A → (Tm43 : Con43 → Ty43 → Set) (var : (Γ : _) (A : _) → Var43 Γ A → Tm43 Γ A) (lam : (Γ : _) (A B : _) → Tm43 (snoc43 Γ A) B → Tm43 Γ (arr43 A B)) (app : (Γ : _) (A B : _) → Tm43 Γ (arr43 A B) → Tm43 Γ A → Tm43 Γ B) → Tm43 Γ A var43 : ∀{Γ A} → Var43 Γ A → Tm43 Γ A;var43 = λ x Tm43 var43 lam app → var43 _ _ x lam43 : ∀{Γ A B} → Tm43 (snoc43 Γ A) B → Tm43 Γ (arr43 A B);lam43 = λ t Tm43 var43 lam43 app → lam43 _ _ _ (t Tm43 var43 lam43 app) app43 : ∀{Γ A B} → Tm43 Γ (arr43 A B) → Tm43 Γ A → Tm43 Γ B;app43 = λ t u Tm43 var43 lam43 app43 → app43 _ _ _ (t Tm43 var43 lam43 app43) (u Tm43 var43 lam43 app43) v043 : ∀{Γ A} → Tm43 (snoc43 Γ A) A;v043 = var43 vz43 v143 : ∀{Γ A B} → Tm43 (snoc43 (snoc43 Γ A) B) A;v143 = var43 (vs43 vz43) v243 : ∀{Γ A B C} → Tm43 (snoc43 (snoc43 (snoc43 Γ A) B) C) A;v243 = var43 (vs43 (vs43 vz43)) v343 : ∀{Γ A B C D} → Tm43 (snoc43 (snoc43 (snoc43 (snoc43 Γ A) B) C) D) A;v343 = var43 (vs43 (vs43 (vs43 vz43))) v443 : ∀{Γ A B C D E} → Tm43 (snoc43 (snoc43 (snoc43 (snoc43 (snoc43 Γ A) B) C) D) E) A;v443 = var43 (vs43 (vs43 (vs43 (vs43 vz43)))) test43 : ∀{Γ A} → Tm43 Γ (arr43 (arr43 A A) (arr43 A A));test43 = lam43 (lam43 (app43 v143 (app43 v143 (app43 v143 (app43 v143 (app43 v143 (app43 v143 v043))))))) {-# OPTIONS --type-in-type #-} Ty44 : Set; Ty44 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι44 : Ty44; ι44 = λ _ ι44 _ → ι44 arr44 : Ty44 → Ty44 → Ty44; arr44 = λ A B Ty44 ι44 arr44 → arr44 (A Ty44 ι44 arr44) (B Ty44 ι44 arr44) Con44 : Set;Con44 = (Con44 : Set) (nil : Con44) (snoc : Con44 → Ty44 → Con44) → Con44 nil44 : Con44;nil44 = λ Con44 nil44 snoc → nil44 snoc44 : Con44 → Ty44 → Con44;snoc44 = λ Γ A Con44 nil44 snoc44 → snoc44 (Γ Con44 nil44 snoc44) A Var44 : Con44 → Ty44 → Set;Var44 = λ Γ A → (Var44 : Con44 → Ty44 → Set) (vz : (Γ : _)(A : _) → Var44 (snoc44 Γ A) A) (vs : (Γ : _)(B A : _) → Var44 Γ A → Var44 (snoc44 Γ B) A) → Var44 Γ A vz44 : ∀{Γ A} → Var44 (snoc44 Γ A) A;vz44 = λ Var44 vz44 vs → vz44 _ _ vs44 : ∀{Γ B A} → Var44 Γ A → Var44 (snoc44 Γ B) A;vs44 = λ x Var44 vz44 vs44 → vs44 _ _ _ (x Var44 vz44 vs44) Tm44 : Con44 → Ty44 → Set;Tm44 = λ Γ A → (Tm44 : Con44 → Ty44 → Set) (var : (Γ : _) (A : _) → Var44 Γ A → Tm44 Γ A) (lam : (Γ : _) (A B : _) → Tm44 (snoc44 Γ A) B → Tm44 Γ (arr44 A B)) (app : (Γ : _) (A B : _) → Tm44 Γ (arr44 A B) → Tm44 Γ A → Tm44 Γ B) → Tm44 Γ A var44 : ∀{Γ A} → Var44 Γ A → Tm44 Γ A;var44 = λ x Tm44 var44 lam app → var44 _ _ x lam44 : ∀{Γ A B} → Tm44 (snoc44 Γ A) B → Tm44 Γ (arr44 A B);lam44 = λ t Tm44 var44 lam44 app → lam44 _ _ _ (t Tm44 var44 lam44 app) app44 : ∀{Γ A B} → Tm44 Γ (arr44 A B) → Tm44 Γ A → Tm44 Γ B;app44 = λ t u Tm44 var44 lam44 app44 → app44 _ _ _ (t Tm44 var44 lam44 app44) (u Tm44 var44 lam44 app44) v044 : ∀{Γ A} → Tm44 (snoc44 Γ A) A;v044 = var44 vz44 v144 : ∀{Γ A B} → Tm44 (snoc44 (snoc44 Γ A) B) A;v144 = var44 (vs44 vz44) v244 : ∀{Γ A B C} → Tm44 (snoc44 (snoc44 (snoc44 Γ A) B) C) A;v244 = var44 (vs44 (vs44 vz44)) v344 : ∀{Γ A B C D} → Tm44 (snoc44 (snoc44 (snoc44 (snoc44 Γ A) B) C) D) A;v344 = var44 (vs44 (vs44 (vs44 vz44))) v444 : ∀{Γ A B C D E} → Tm44 (snoc44 (snoc44 (snoc44 (snoc44 (snoc44 Γ A) B) C) D) E) A;v444 = var44 (vs44 (vs44 (vs44 (vs44 vz44)))) test44 : ∀{Γ A} → Tm44 Γ (arr44 (arr44 A A) (arr44 A A));test44 = lam44 (lam44 (app44 v144 (app44 v144 (app44 v144 (app44 v144 (app44 v144 (app44 v144 v044))))))) {-# OPTIONS --type-in-type #-} Ty45 : Set; Ty45 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι45 : Ty45; ι45 = λ _ ι45 _ → ι45 arr45 : Ty45 → Ty45 → Ty45; arr45 = λ A B Ty45 ι45 arr45 → arr45 (A Ty45 ι45 arr45) (B Ty45 ι45 arr45) Con45 : Set;Con45 = (Con45 : Set) (nil : Con45) (snoc : Con45 → Ty45 → Con45) → Con45 nil45 : Con45;nil45 = λ Con45 nil45 snoc → nil45 snoc45 : Con45 → Ty45 → Con45;snoc45 = λ Γ A Con45 nil45 snoc45 → snoc45 (Γ Con45 nil45 snoc45) A Var45 : Con45 → Ty45 → Set;Var45 = λ Γ A → (Var45 : Con45 → Ty45 → Set) (vz : (Γ : _)(A : _) → Var45 (snoc45 Γ A) A) (vs : (Γ : _)(B A : _) → Var45 Γ A → Var45 (snoc45 Γ B) A) → Var45 Γ A vz45 : ∀{Γ A} → Var45 (snoc45 Γ A) A;vz45 = λ Var45 vz45 vs → vz45 _ _ vs45 : ∀{Γ B A} → Var45 Γ A → Var45 (snoc45 Γ B) A;vs45 = λ x Var45 vz45 vs45 → vs45 _ _ _ (x Var45 vz45 vs45) Tm45 : Con45 → Ty45 → Set;Tm45 = λ Γ A → (Tm45 : Con45 → Ty45 → Set) (var : (Γ : _) (A : _) → Var45 Γ A → Tm45 Γ A) (lam : (Γ : _) (A B : _) → Tm45 (snoc45 Γ A) B → Tm45 Γ (arr45 A B)) (app : (Γ : _) (A B : _) → Tm45 Γ (arr45 A B) → Tm45 Γ A → Tm45 Γ B) → Tm45 Γ A var45 : ∀{Γ A} → Var45 Γ A → Tm45 Γ A;var45 = λ x Tm45 var45 lam app → var45 _ _ x lam45 : ∀{Γ A B} → Tm45 (snoc45 Γ A) B → Tm45 Γ (arr45 A B);lam45 = λ t Tm45 var45 lam45 app → lam45 _ _ _ (t Tm45 var45 lam45 app) app45 : ∀{Γ A B} → Tm45 Γ (arr45 A B) → Tm45 Γ A → Tm45 Γ B;app45 = λ t u Tm45 var45 lam45 app45 → app45 _ _ _ (t Tm45 var45 lam45 app45) (u Tm45 var45 lam45 app45) v045 : ∀{Γ A} → Tm45 (snoc45 Γ A) A;v045 = var45 vz45 v145 : ∀{Γ A B} → Tm45 (snoc45 (snoc45 Γ A) B) A;v145 = var45 (vs45 vz45) v245 : ∀{Γ A B C} → Tm45 (snoc45 (snoc45 (snoc45 Γ A) B) C) A;v245 = var45 (vs45 (vs45 vz45)) v345 : ∀{Γ A B C D} → Tm45 (snoc45 (snoc45 (snoc45 (snoc45 Γ A) B) C) D) A;v345 = var45 (vs45 (vs45 (vs45 vz45))) v445 : ∀{Γ A B C D E} → Tm45 (snoc45 (snoc45 (snoc45 (snoc45 (snoc45 Γ A) B) C) D) E) A;v445 = var45 (vs45 (vs45 (vs45 (vs45 vz45)))) test45 : ∀{Γ A} → Tm45 Γ (arr45 (arr45 A A) (arr45 A A));test45 = lam45 (lam45 (app45 v145 (app45 v145 (app45 v145 (app45 v145 (app45 v145 (app45 v145 v045))))))) {-# OPTIONS --type-in-type #-} Ty46 : Set; Ty46 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι46 : Ty46; ι46 = λ _ ι46 _ → ι46 arr46 : Ty46 → Ty46 → Ty46; arr46 = λ A B Ty46 ι46 arr46 → arr46 (A Ty46 ι46 arr46) (B Ty46 ι46 arr46) Con46 : Set;Con46 = (Con46 : Set) (nil : Con46) (snoc : Con46 → Ty46 → Con46) → Con46 nil46 : Con46;nil46 = λ Con46 nil46 snoc → nil46 snoc46 : Con46 → Ty46 → Con46;snoc46 = λ Γ A Con46 nil46 snoc46 → snoc46 (Γ Con46 nil46 snoc46) A Var46 : Con46 → Ty46 → Set;Var46 = λ Γ A → (Var46 : Con46 → Ty46 → Set) (vz : (Γ : _)(A : _) → Var46 (snoc46 Γ A) A) (vs : (Γ : _)(B A : _) → Var46 Γ A → Var46 (snoc46 Γ B) A) → Var46 Γ A vz46 : ∀{Γ A} → Var46 (snoc46 Γ A) A;vz46 = λ Var46 vz46 vs → vz46 _ _ vs46 : ∀{Γ B A} → Var46 Γ A → Var46 (snoc46 Γ B) A;vs46 = λ x Var46 vz46 vs46 → vs46 _ _ _ (x Var46 vz46 vs46) Tm46 : Con46 → Ty46 → Set;Tm46 = λ Γ A → (Tm46 : Con46 → Ty46 → Set) (var : (Γ : _) (A : _) → Var46 Γ A → Tm46 Γ A) (lam : (Γ : _) (A B : _) → Tm46 (snoc46 Γ A) B → Tm46 Γ (arr46 A B)) (app : (Γ : _) (A B : _) → Tm46 Γ (arr46 A B) → Tm46 Γ A → Tm46 Γ B) → Tm46 Γ A var46 : ∀{Γ A} → Var46 Γ A → Tm46 Γ A;var46 = λ x Tm46 var46 lam app → var46 _ _ x lam46 : ∀{Γ A B} → Tm46 (snoc46 Γ A) B → Tm46 Γ (arr46 A B);lam46 = λ t Tm46 var46 lam46 app → lam46 _ _ _ (t Tm46 var46 lam46 app) app46 : ∀{Γ A B} → Tm46 Γ (arr46 A B) → Tm46 Γ A → Tm46 Γ B;app46 = λ t u Tm46 var46 lam46 app46 → app46 _ _ _ (t Tm46 var46 lam46 app46) (u Tm46 var46 lam46 app46) v046 : ∀{Γ A} → Tm46 (snoc46 Γ A) A;v046 = var46 vz46 v146 : ∀{Γ A B} → Tm46 (snoc46 (snoc46 Γ A) B) A;v146 = var46 (vs46 vz46) v246 : ∀{Γ A B C} → Tm46 (snoc46 (snoc46 (snoc46 Γ A) B) C) A;v246 = var46 (vs46 (vs46 vz46)) v346 : ∀{Γ A B C D} → Tm46 (snoc46 (snoc46 (snoc46 (snoc46 Γ A) B) C) D) A;v346 = var46 (vs46 (vs46 (vs46 vz46))) v446 : ∀{Γ A B C D E} → Tm46 (snoc46 (snoc46 (snoc46 (snoc46 (snoc46 Γ A) B) C) D) E) A;v446 = var46 (vs46 (vs46 (vs46 (vs46 vz46)))) test46 : ∀{Γ A} → Tm46 Γ (arr46 (arr46 A A) (arr46 A A));test46 = lam46 (lam46 (app46 v146 (app46 v146 (app46 v146 (app46 v146 (app46 v146 (app46 v146 v046))))))) {-# OPTIONS --type-in-type #-} Ty47 : Set; Ty47 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι47 : Ty47; ι47 = λ _ ι47 _ → ι47 arr47 : Ty47 → Ty47 → Ty47; arr47 = λ A B Ty47 ι47 arr47 → arr47 (A Ty47 ι47 arr47) (B Ty47 ι47 arr47) Con47 : Set;Con47 = (Con47 : Set) (nil : Con47) (snoc : Con47 → Ty47 → Con47) → Con47 nil47 : Con47;nil47 = λ Con47 nil47 snoc → nil47 snoc47 : Con47 → Ty47 → Con47;snoc47 = λ Γ A Con47 nil47 snoc47 → snoc47 (Γ Con47 nil47 snoc47) A Var47 : Con47 → Ty47 → Set;Var47 = λ Γ A → (Var47 : Con47 → Ty47 → Set) (vz : (Γ : _)(A : _) → Var47 (snoc47 Γ A) A) (vs : (Γ : _)(B A : _) → Var47 Γ A → Var47 (snoc47 Γ B) A) → Var47 Γ A vz47 : ∀{Γ A} → Var47 (snoc47 Γ A) A;vz47 = λ Var47 vz47 vs → vz47 _ _ vs47 : ∀{Γ B A} → Var47 Γ A → Var47 (snoc47 Γ B) A;vs47 = λ x Var47 vz47 vs47 → vs47 _ _ _ (x Var47 vz47 vs47) Tm47 : Con47 → Ty47 → Set;Tm47 = λ Γ A → (Tm47 : Con47 → Ty47 → Set) (var : (Γ : _) (A : _) → Var47 Γ A → Tm47 Γ A) (lam : (Γ : _) (A B : _) → Tm47 (snoc47 Γ A) B → Tm47 Γ (arr47 A B)) (app : (Γ : _) (A B : _) → Tm47 Γ (arr47 A B) → Tm47 Γ A → Tm47 Γ B) → Tm47 Γ A var47 : ∀{Γ A} → Var47 Γ A → Tm47 Γ A;var47 = λ x Tm47 var47 lam app → var47 _ _ x lam47 : ∀{Γ A B} → Tm47 (snoc47 Γ A) B → Tm47 Γ (arr47 A B);lam47 = λ t Tm47 var47 lam47 app → lam47 _ _ _ (t Tm47 var47 lam47 app) app47 : ∀{Γ A B} → Tm47 Γ (arr47 A B) → Tm47 Γ A → Tm47 Γ B;app47 = λ t u Tm47 var47 lam47 app47 → app47 _ _ _ (t Tm47 var47 lam47 app47) (u Tm47 var47 lam47 app47) v047 : ∀{Γ A} → Tm47 (snoc47 Γ A) A;v047 = var47 vz47 v147 : ∀{Γ A B} → Tm47 (snoc47 (snoc47 Γ A) B) A;v147 = var47 (vs47 vz47) v247 : ∀{Γ A B C} → Tm47 (snoc47 (snoc47 (snoc47 Γ A) B) C) A;v247 = var47 (vs47 (vs47 vz47)) v347 : ∀{Γ A B C D} → Tm47 (snoc47 (snoc47 (snoc47 (snoc47 Γ A) B) C) D) A;v347 = var47 (vs47 (vs47 (vs47 vz47))) v447 : ∀{Γ A B C D E} → Tm47 (snoc47 (snoc47 (snoc47 (snoc47 (snoc47 Γ A) B) C) D) E) A;v447 = var47 (vs47 (vs47 (vs47 (vs47 vz47)))) test47 : ∀{Γ A} → Tm47 Γ (arr47 (arr47 A A) (arr47 A A));test47 = lam47 (lam47 (app47 v147 (app47 v147 (app47 v147 (app47 v147 (app47 v147 (app47 v147 v047))))))) {-# OPTIONS --type-in-type #-} Ty48 : Set; Ty48 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι48 : Ty48; ι48 = λ _ ι48 _ → ι48 arr48 : Ty48 → Ty48 → Ty48; arr48 = λ A B Ty48 ι48 arr48 → arr48 (A Ty48 ι48 arr48) (B Ty48 ι48 arr48) Con48 : Set;Con48 = (Con48 : Set) (nil : Con48) (snoc : Con48 → Ty48 → Con48) → Con48 nil48 : Con48;nil48 = λ Con48 nil48 snoc → nil48 snoc48 : Con48 → Ty48 → Con48;snoc48 = λ Γ A Con48 nil48 snoc48 → snoc48 (Γ Con48 nil48 snoc48) A Var48 : Con48 → Ty48 → Set;Var48 = λ Γ A → (Var48 : Con48 → Ty48 → Set) (vz : (Γ : _)(A : _) → Var48 (snoc48 Γ A) A) (vs : (Γ : _)(B A : _) → Var48 Γ A → Var48 (snoc48 Γ B) A) → Var48 Γ A vz48 : ∀{Γ A} → Var48 (snoc48 Γ A) A;vz48 = λ Var48 vz48 vs → vz48 _ _ vs48 : ∀{Γ B A} → Var48 Γ A → Var48 (snoc48 Γ B) A;vs48 = λ x Var48 vz48 vs48 → vs48 _ _ _ (x Var48 vz48 vs48) Tm48 : Con48 → Ty48 → Set;Tm48 = λ Γ A → (Tm48 : Con48 → Ty48 → Set) (var : (Γ : _) (A : _) → Var48 Γ A → Tm48 Γ A) (lam : (Γ : _) (A B : _) → Tm48 (snoc48 Γ A) B → Tm48 Γ (arr48 A B)) (app : (Γ : _) (A B : _) → Tm48 Γ (arr48 A B) → Tm48 Γ A → Tm48 Γ B) → Tm48 Γ A var48 : ∀{Γ A} → Var48 Γ A → Tm48 Γ A;var48 = λ x Tm48 var48 lam app → var48 _ _ x lam48 : ∀{Γ A B} → Tm48 (snoc48 Γ A) B → Tm48 Γ (arr48 A B);lam48 = λ t Tm48 var48 lam48 app → lam48 _ _ _ (t Tm48 var48 lam48 app) app48 : ∀{Γ A B} → Tm48 Γ (arr48 A B) → Tm48 Γ A → Tm48 Γ B;app48 = λ t u Tm48 var48 lam48 app48 → app48 _ _ _ (t Tm48 var48 lam48 app48) (u Tm48 var48 lam48 app48) v048 : ∀{Γ A} → Tm48 (snoc48 Γ A) A;v048 = var48 vz48 v148 : ∀{Γ A B} → Tm48 (snoc48 (snoc48 Γ A) B) A;v148 = var48 (vs48 vz48) v248 : ∀{Γ A B C} → Tm48 (snoc48 (snoc48 (snoc48 Γ A) B) C) A;v248 = var48 (vs48 (vs48 vz48)) v348 : ∀{Γ A B C D} → Tm48 (snoc48 (snoc48 (snoc48 (snoc48 Γ A) B) C) D) A;v348 = var48 (vs48 (vs48 (vs48 vz48))) v448 : ∀{Γ A B C D E} → Tm48 (snoc48 (snoc48 (snoc48 (snoc48 (snoc48 Γ A) B) C) D) E) A;v448 = var48 (vs48 (vs48 (vs48 (vs48 vz48)))) test48 : ∀{Γ A} → Tm48 Γ (arr48 (arr48 A A) (arr48 A A));test48 = lam48 (lam48 (app48 v148 (app48 v148 (app48 v148 (app48 v148 (app48 v148 (app48 v148 v048))))))) {-# OPTIONS --type-in-type #-} Ty49 : Set; Ty49 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι49 : Ty49; ι49 = λ _ ι49 _ → ι49 arr49 : Ty49 → Ty49 → Ty49; arr49 = λ A B Ty49 ι49 arr49 → arr49 (A Ty49 ι49 arr49) (B Ty49 ι49 arr49) Con49 : Set;Con49 = (Con49 : Set) (nil : Con49) (snoc : Con49 → Ty49 → Con49) → Con49 nil49 : Con49;nil49 = λ Con49 nil49 snoc → nil49 snoc49 : Con49 → Ty49 → Con49;snoc49 = λ Γ A Con49 nil49 snoc49 → snoc49 (Γ Con49 nil49 snoc49) A Var49 : Con49 → Ty49 → Set;Var49 = λ Γ A → (Var49 : Con49 → Ty49 → Set) (vz : (Γ : _)(A : _) → Var49 (snoc49 Γ A) A) (vs : (Γ : _)(B A : _) → Var49 Γ A → Var49 (snoc49 Γ B) A) → Var49 Γ A vz49 : ∀{Γ A} → Var49 (snoc49 Γ A) A;vz49 = λ Var49 vz49 vs → vz49 _ _ vs49 : ∀{Γ B A} → Var49 Γ A → Var49 (snoc49 Γ B) A;vs49 = λ x Var49 vz49 vs49 → vs49 _ _ _ (x Var49 vz49 vs49) Tm49 : Con49 → Ty49 → Set;Tm49 = λ Γ A → (Tm49 : Con49 → Ty49 → Set) (var : (Γ : _) (A : _) → Var49 Γ A → Tm49 Γ A) (lam : (Γ : _) (A B : _) → Tm49 (snoc49 Γ A) B → Tm49 Γ (arr49 A B)) (app : (Γ : _) (A B : _) → Tm49 Γ (arr49 A B) → Tm49 Γ A → Tm49 Γ B) → Tm49 Γ A var49 : ∀{Γ A} → Var49 Γ A → Tm49 Γ A;var49 = λ x Tm49 var49 lam app → var49 _ _ x lam49 : ∀{Γ A B} → Tm49 (snoc49 Γ A) B → Tm49 Γ (arr49 A B);lam49 = λ t Tm49 var49 lam49 app → lam49 _ _ _ (t Tm49 var49 lam49 app) app49 : ∀{Γ A B} → Tm49 Γ (arr49 A B) → Tm49 Γ A → Tm49 Γ B;app49 = λ t u Tm49 var49 lam49 app49 → app49 _ _ _ (t Tm49 var49 lam49 app49) (u Tm49 var49 lam49 app49) v049 : ∀{Γ A} → Tm49 (snoc49 Γ A) A;v049 = var49 vz49 v149 : ∀{Γ A B} → Tm49 (snoc49 (snoc49 Γ A) B) A;v149 = var49 (vs49 vz49) v249 : ∀{Γ A B C} → Tm49 (snoc49 (snoc49 (snoc49 Γ A) B) C) A;v249 = var49 (vs49 (vs49 vz49)) v349 : ∀{Γ A B C D} → Tm49 (snoc49 (snoc49 (snoc49 (snoc49 Γ A) B) C) D) A;v349 = var49 (vs49 (vs49 (vs49 vz49))) v449 : ∀{Γ A B C D E} → Tm49 (snoc49 (snoc49 (snoc49 (snoc49 (snoc49 Γ A) B) C) D) E) A;v449 = var49 (vs49 (vs49 (vs49 (vs49 vz49)))) test49 : ∀{Γ A} → Tm49 Γ (arr49 (arr49 A A) (arr49 A A));test49 = lam49 (lam49 (app49 v149 (app49 v149 (app49 v149 (app49 v149 (app49 v149 (app49 v149 v049))))))) {-# OPTIONS --type-in-type #-} Ty50 : Set; Ty50 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι50 : Ty50; ι50 = λ _ ι50 _ → ι50 arr50 : Ty50 → Ty50 → Ty50; arr50 = λ A B Ty50 ι50 arr50 → arr50 (A Ty50 ι50 arr50) (B Ty50 ι50 arr50) Con50 : Set;Con50 = (Con50 : Set) (nil : Con50) (snoc : Con50 → Ty50 → Con50) → Con50 nil50 : Con50;nil50 = λ Con50 nil50 snoc → nil50 snoc50 : Con50 → Ty50 → Con50;snoc50 = λ Γ A Con50 nil50 snoc50 → snoc50 (Γ Con50 nil50 snoc50) A Var50 : Con50 → Ty50 → Set;Var50 = λ Γ A → (Var50 : Con50 → Ty50 → Set) (vz : (Γ : _)(A : _) → Var50 (snoc50 Γ A) A) (vs : (Γ : _)(B A : _) → Var50 Γ A → Var50 (snoc50 Γ B) A) → Var50 Γ A vz50 : ∀{Γ A} → Var50 (snoc50 Γ A) A;vz50 = λ Var50 vz50 vs → vz50 _ _ vs50 : ∀{Γ B A} → Var50 Γ A → Var50 (snoc50 Γ B) A;vs50 = λ x Var50 vz50 vs50 → vs50 _ _ _ (x Var50 vz50 vs50) Tm50 : Con50 → Ty50 → Set;Tm50 = λ Γ A → (Tm50 : Con50 → Ty50 → Set) (var : (Γ : _) (A : _) → Var50 Γ A → Tm50 Γ A) (lam : (Γ : _) (A B : _) → Tm50 (snoc50 Γ A) B → Tm50 Γ (arr50 A B)) (app : (Γ : _) (A B : _) → Tm50 Γ (arr50 A B) → Tm50 Γ A → Tm50 Γ B) → Tm50 Γ A var50 : ∀{Γ A} → Var50 Γ A → Tm50 Γ A;var50 = λ x Tm50 var50 lam app → var50 _ _ x lam50 : ∀{Γ A B} → Tm50 (snoc50 Γ A) B → Tm50 Γ (arr50 A B);lam50 = λ t Tm50 var50 lam50 app → lam50 _ _ _ (t Tm50 var50 lam50 app) app50 : ∀{Γ A B} → Tm50 Γ (arr50 A B) → Tm50 Γ A → Tm50 Γ B;app50 = λ t u Tm50 var50 lam50 app50 → app50 _ _ _ (t Tm50 var50 lam50 app50) (u Tm50 var50 lam50 app50) v050 : ∀{Γ A} → Tm50 (snoc50 Γ A) A;v050 = var50 vz50 v150 : ∀{Γ A B} → Tm50 (snoc50 (snoc50 Γ A) B) A;v150 = var50 (vs50 vz50) v250 : ∀{Γ A B C} → Tm50 (snoc50 (snoc50 (snoc50 Γ A) B) C) A;v250 = var50 (vs50 (vs50 vz50)) v350 : ∀{Γ A B C D} → Tm50 (snoc50 (snoc50 (snoc50 (snoc50 Γ A) B) C) D) A;v350 = var50 (vs50 (vs50 (vs50 vz50))) v450 : ∀{Γ A B C D E} → Tm50 (snoc50 (snoc50 (snoc50 (snoc50 (snoc50 Γ A) B) C) D) E) A;v450 = var50 (vs50 (vs50 (vs50 (vs50 vz50)))) test50 : ∀{Γ A} → Tm50 Γ (arr50 (arr50 A A) (arr50 A A));test50 = lam50 (lam50 (app50 v150 (app50 v150 (app50 v150 (app50 v150 (app50 v150 (app50 v150 v050))))))) {-# OPTIONS --type-in-type #-} Ty51 : Set; Ty51 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι51 : Ty51; ι51 = λ _ ι51 _ → ι51 arr51 : Ty51 → Ty51 → Ty51; arr51 = λ A B Ty51 ι51 arr51 → arr51 (A Ty51 ι51 arr51) (B Ty51 ι51 arr51) Con51 : Set;Con51 = (Con51 : Set) (nil : Con51) (snoc : Con51 → Ty51 → Con51) → Con51 nil51 : Con51;nil51 = λ Con51 nil51 snoc → nil51 snoc51 : Con51 → Ty51 → Con51;snoc51 = λ Γ A Con51 nil51 snoc51 → snoc51 (Γ Con51 nil51 snoc51) A Var51 : Con51 → Ty51 → Set;Var51 = λ Γ A → (Var51 : Con51 → Ty51 → Set) (vz : (Γ : _)(A : _) → Var51 (snoc51 Γ A) A) (vs : (Γ : _)(B A : _) → Var51 Γ A → Var51 (snoc51 Γ B) A) → Var51 Γ A vz51 : ∀{Γ A} → Var51 (snoc51 Γ A) A;vz51 = λ Var51 vz51 vs → vz51 _ _ vs51 : ∀{Γ B A} → Var51 Γ A → Var51 (snoc51 Γ B) A;vs51 = λ x Var51 vz51 vs51 → vs51 _ _ _ (x Var51 vz51 vs51) Tm51 : Con51 → Ty51 → Set;Tm51 = λ Γ A → (Tm51 : Con51 → Ty51 → Set) (var : (Γ : _) (A : _) → Var51 Γ A → Tm51 Γ A) (lam : (Γ : _) (A B : _) → Tm51 (snoc51 Γ A) B → Tm51 Γ (arr51 A B)) (app : (Γ : _) (A B : _) → Tm51 Γ (arr51 A B) → Tm51 Γ A → Tm51 Γ B) → Tm51 Γ A var51 : ∀{Γ A} → Var51 Γ A → Tm51 Γ A;var51 = λ x Tm51 var51 lam app → var51 _ _ x lam51 : ∀{Γ A B} → Tm51 (snoc51 Γ A) B → Tm51 Γ (arr51 A B);lam51 = λ t Tm51 var51 lam51 app → lam51 _ _ _ (t Tm51 var51 lam51 app) app51 : ∀{Γ A B} → Tm51 Γ (arr51 A B) → Tm51 Γ A → Tm51 Γ B;app51 = λ t u Tm51 var51 lam51 app51 → app51 _ _ _ (t Tm51 var51 lam51 app51) (u Tm51 var51 lam51 app51) v051 : ∀{Γ A} → Tm51 (snoc51 Γ A) A;v051 = var51 vz51 v151 : ∀{Γ A B} → Tm51 (snoc51 (snoc51 Γ A) B) A;v151 = var51 (vs51 vz51) v251 : ∀{Γ A B C} → Tm51 (snoc51 (snoc51 (snoc51 Γ A) B) C) A;v251 = var51 (vs51 (vs51 vz51)) v351 : ∀{Γ A B C D} → Tm51 (snoc51 (snoc51 (snoc51 (snoc51 Γ A) B) C) D) A;v351 = var51 (vs51 (vs51 (vs51 vz51))) v451 : ∀{Γ A B C D E} → Tm51 (snoc51 (snoc51 (snoc51 (snoc51 (snoc51 Γ A) B) C) D) E) A;v451 = var51 (vs51 (vs51 (vs51 (vs51 vz51)))) test51 : ∀{Γ A} → Tm51 Γ (arr51 (arr51 A A) (arr51 A A));test51 = lam51 (lam51 (app51 v151 (app51 v151 (app51 v151 (app51 v151 (app51 v151 (app51 v151 v051))))))) {-# OPTIONS --type-in-type #-} Ty52 : Set; Ty52 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι52 : Ty52; ι52 = λ _ ι52 _ → ι52 arr52 : Ty52 → Ty52 → Ty52; arr52 = λ A B Ty52 ι52 arr52 → arr52 (A Ty52 ι52 arr52) (B Ty52 ι52 arr52) Con52 : Set;Con52 = (Con52 : Set) (nil : Con52) (snoc : Con52 → Ty52 → Con52) → Con52 nil52 : Con52;nil52 = λ Con52 nil52 snoc → nil52 snoc52 : Con52 → Ty52 → Con52;snoc52 = λ Γ A Con52 nil52 snoc52 → snoc52 (Γ Con52 nil52 snoc52) A Var52 : Con52 → Ty52 → Set;Var52 = λ Γ A → (Var52 : Con52 → Ty52 → Set) (vz : (Γ : _)(A : _) → Var52 (snoc52 Γ A) A) (vs : (Γ : _)(B A : _) → Var52 Γ A → Var52 (snoc52 Γ B) A) → Var52 Γ A vz52 : ∀{Γ A} → Var52 (snoc52 Γ A) A;vz52 = λ Var52 vz52 vs → vz52 _ _ vs52 : ∀{Γ B A} → Var52 Γ A → Var52 (snoc52 Γ B) A;vs52 = λ x Var52 vz52 vs52 → vs52 _ _ _ (x Var52 vz52 vs52) Tm52 : Con52 → Ty52 → Set;Tm52 = λ Γ A → (Tm52 : Con52 → Ty52 → Set) (var : (Γ : _) (A : _) → Var52 Γ A → Tm52 Γ A) (lam : (Γ : _) (A B : _) → Tm52 (snoc52 Γ A) B → Tm52 Γ (arr52 A B)) (app : (Γ : _) (A B : _) → Tm52 Γ (arr52 A B) → Tm52 Γ A → Tm52 Γ B) → Tm52 Γ A var52 : ∀{Γ A} → Var52 Γ A → Tm52 Γ A;var52 = λ x Tm52 var52 lam app → var52 _ _ x lam52 : ∀{Γ A B} → Tm52 (snoc52 Γ A) B → Tm52 Γ (arr52 A B);lam52 = λ t Tm52 var52 lam52 app → lam52 _ _ _ (t Tm52 var52 lam52 app) app52 : ∀{Γ A B} → Tm52 Γ (arr52 A B) → Tm52 Γ A → Tm52 Γ B;app52 = λ t u Tm52 var52 lam52 app52 → app52 _ _ _ (t Tm52 var52 lam52 app52) (u Tm52 var52 lam52 app52) v052 : ∀{Γ A} → Tm52 (snoc52 Γ A) A;v052 = var52 vz52 v152 : ∀{Γ A B} → Tm52 (snoc52 (snoc52 Γ A) B) A;v152 = var52 (vs52 vz52) v252 : ∀{Γ A B C} → Tm52 (snoc52 (snoc52 (snoc52 Γ A) B) C) A;v252 = var52 (vs52 (vs52 vz52)) v352 : ∀{Γ A B C D} → Tm52 (snoc52 (snoc52 (snoc52 (snoc52 Γ A) B) C) D) A;v352 = var52 (vs52 (vs52 (vs52 vz52))) v452 : ∀{Γ A B C D E} → Tm52 (snoc52 (snoc52 (snoc52 (snoc52 (snoc52 Γ A) B) C) D) E) A;v452 = var52 (vs52 (vs52 (vs52 (vs52 vz52)))) test52 : ∀{Γ A} → Tm52 Γ (arr52 (arr52 A A) (arr52 A A));test52 = lam52 (lam52 (app52 v152 (app52 v152 (app52 v152 (app52 v152 (app52 v152 (app52 v152 v052))))))) {-# OPTIONS --type-in-type #-} Ty53 : Set; Ty53 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι53 : Ty53; ι53 = λ _ ι53 _ → ι53 arr53 : Ty53 → Ty53 → Ty53; arr53 = λ A B Ty53 ι53 arr53 → arr53 (A Ty53 ι53 arr53) (B Ty53 ι53 arr53) Con53 : Set;Con53 = (Con53 : Set) (nil : Con53) (snoc : Con53 → Ty53 → Con53) → Con53 nil53 : Con53;nil53 = λ Con53 nil53 snoc → nil53 snoc53 : Con53 → Ty53 → Con53;snoc53 = λ Γ A Con53 nil53 snoc53 → snoc53 (Γ Con53 nil53 snoc53) A Var53 : Con53 → Ty53 → Set;Var53 = λ Γ A → (Var53 : Con53 → Ty53 → Set) (vz : (Γ : _)(A : _) → Var53 (snoc53 Γ A) A) (vs : (Γ : _)(B A : _) → Var53 Γ A → Var53 (snoc53 Γ B) A) → Var53 Γ A vz53 : ∀{Γ A} → Var53 (snoc53 Γ A) A;vz53 = λ Var53 vz53 vs → vz53 _ _ vs53 : ∀{Γ B A} → Var53 Γ A → Var53 (snoc53 Γ B) A;vs53 = λ x Var53 vz53 vs53 → vs53 _ _ _ (x Var53 vz53 vs53) Tm53 : Con53 → Ty53 → Set;Tm53 = λ Γ A → (Tm53 : Con53 → Ty53 → Set) (var : (Γ : _) (A : _) → Var53 Γ A → Tm53 Γ A) (lam : (Γ : _) (A B : _) → Tm53 (snoc53 Γ A) B → Tm53 Γ (arr53 A B)) (app : (Γ : _) (A B : _) → Tm53 Γ (arr53 A B) → Tm53 Γ A → Tm53 Γ B) → Tm53 Γ A var53 : ∀{Γ A} → Var53 Γ A → Tm53 Γ A;var53 = λ x Tm53 var53 lam app → var53 _ _ x lam53 : ∀{Γ A B} → Tm53 (snoc53 Γ A) B → Tm53 Γ (arr53 A B);lam53 = λ t Tm53 var53 lam53 app → lam53 _ _ _ (t Tm53 var53 lam53 app) app53 : ∀{Γ A B} → Tm53 Γ (arr53 A B) → Tm53 Γ A → Tm53 Γ B;app53 = λ t u Tm53 var53 lam53 app53 → app53 _ _ _ (t Tm53 var53 lam53 app53) (u Tm53 var53 lam53 app53) v053 : ∀{Γ A} → Tm53 (snoc53 Γ A) A;v053 = var53 vz53 v153 : ∀{Γ A B} → Tm53 (snoc53 (snoc53 Γ A) B) A;v153 = var53 (vs53 vz53) v253 : ∀{Γ A B C} → Tm53 (snoc53 (snoc53 (snoc53 Γ A) B) C) A;v253 = var53 (vs53 (vs53 vz53)) v353 : ∀{Γ A B C D} → Tm53 (snoc53 (snoc53 (snoc53 (snoc53 Γ A) B) C) D) A;v353 = var53 (vs53 (vs53 (vs53 vz53))) v453 : ∀{Γ A B C D E} → Tm53 (snoc53 (snoc53 (snoc53 (snoc53 (snoc53 Γ A) B) C) D) E) A;v453 = var53 (vs53 (vs53 (vs53 (vs53 vz53)))) test53 : ∀{Γ A} → Tm53 Γ (arr53 (arr53 A A) (arr53 A A));test53 = lam53 (lam53 (app53 v153 (app53 v153 (app53 v153 (app53 v153 (app53 v153 (app53 v153 v053))))))) {-# OPTIONS --type-in-type #-} Ty54 : Set; Ty54 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι54 : Ty54; ι54 = λ _ ι54 _ → ι54 arr54 : Ty54 → Ty54 → Ty54; arr54 = λ A B Ty54 ι54 arr54 → arr54 (A Ty54 ι54 arr54) (B Ty54 ι54 arr54) Con54 : Set;Con54 = (Con54 : Set) (nil : Con54) (snoc : Con54 → Ty54 → Con54) → Con54 nil54 : Con54;nil54 = λ Con54 nil54 snoc → nil54 snoc54 : Con54 → Ty54 → Con54;snoc54 = λ Γ A Con54 nil54 snoc54 → snoc54 (Γ Con54 nil54 snoc54) A Var54 : Con54 → Ty54 → Set;Var54 = λ Γ A → (Var54 : Con54 → Ty54 → Set) (vz : (Γ : _)(A : _) → Var54 (snoc54 Γ A) A) (vs : (Γ : _)(B A : _) → Var54 Γ A → Var54 (snoc54 Γ B) A) → Var54 Γ A vz54 : ∀{Γ A} → Var54 (snoc54 Γ A) A;vz54 = λ Var54 vz54 vs → vz54 _ _ vs54 : ∀{Γ B A} → Var54 Γ A → Var54 (snoc54 Γ B) A;vs54 = λ x Var54 vz54 vs54 → vs54 _ _ _ (x Var54 vz54 vs54) Tm54 : Con54 → Ty54 → Set;Tm54 = λ Γ A → (Tm54 : Con54 → Ty54 → Set) (var : (Γ : _) (A : _) → Var54 Γ A → Tm54 Γ A) (lam : (Γ : _) (A B : _) → Tm54 (snoc54 Γ A) B → Tm54 Γ (arr54 A B)) (app : (Γ : _) (A B : _) → Tm54 Γ (arr54 A B) → Tm54 Γ A → Tm54 Γ B) → Tm54 Γ A var54 : ∀{Γ A} → Var54 Γ A → Tm54 Γ A;var54 = λ x Tm54 var54 lam app → var54 _ _ x lam54 : ∀{Γ A B} → Tm54 (snoc54 Γ A) B → Tm54 Γ (arr54 A B);lam54 = λ t Tm54 var54 lam54 app → lam54 _ _ _ (t Tm54 var54 lam54 app) app54 : ∀{Γ A B} → Tm54 Γ (arr54 A B) → Tm54 Γ A → Tm54 Γ B;app54 = λ t u Tm54 var54 lam54 app54 → app54 _ _ _ (t Tm54 var54 lam54 app54) (u Tm54 var54 lam54 app54) v054 : ∀{Γ A} → Tm54 (snoc54 Γ A) A;v054 = var54 vz54 v154 : ∀{Γ A B} → Tm54 (snoc54 (snoc54 Γ A) B) A;v154 = var54 (vs54 vz54) v254 : ∀{Γ A B C} → Tm54 (snoc54 (snoc54 (snoc54 Γ A) B) C) A;v254 = var54 (vs54 (vs54 vz54)) v354 : ∀{Γ A B C D} → Tm54 (snoc54 (snoc54 (snoc54 (snoc54 Γ A) B) C) D) A;v354 = var54 (vs54 (vs54 (vs54 vz54))) v454 : ∀{Γ A B C D E} → Tm54 (snoc54 (snoc54 (snoc54 (snoc54 (snoc54 Γ A) B) C) D) E) A;v454 = var54 (vs54 (vs54 (vs54 (vs54 vz54)))) test54 : ∀{Γ A} → Tm54 Γ (arr54 (arr54 A A) (arr54 A A));test54 = lam54 (lam54 (app54 v154 (app54 v154 (app54 v154 (app54 v154 (app54 v154 (app54 v154 v054))))))) {-# OPTIONS --type-in-type #-} Ty55 : Set; Ty55 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι55 : Ty55; ι55 = λ _ ι55 _ → ι55 arr55 : Ty55 → Ty55 → Ty55; arr55 = λ A B Ty55 ι55 arr55 → arr55 (A Ty55 ι55 arr55) (B Ty55 ι55 arr55) Con55 : Set;Con55 = (Con55 : Set) (nil : Con55) (snoc : Con55 → Ty55 → Con55) → Con55 nil55 : Con55;nil55 = λ Con55 nil55 snoc → nil55 snoc55 : Con55 → Ty55 → Con55;snoc55 = λ Γ A Con55 nil55 snoc55 → snoc55 (Γ Con55 nil55 snoc55) A Var55 : Con55 → Ty55 → Set;Var55 = λ Γ A → (Var55 : Con55 → Ty55 → Set) (vz : (Γ : _)(A : _) → Var55 (snoc55 Γ A) A) (vs : (Γ : _)(B A : _) → Var55 Γ A → Var55 (snoc55 Γ B) A) → Var55 Γ A vz55 : ∀{Γ A} → Var55 (snoc55 Γ A) A;vz55 = λ Var55 vz55 vs → vz55 _ _ vs55 : ∀{Γ B A} → Var55 Γ A → Var55 (snoc55 Γ B) A;vs55 = λ x Var55 vz55 vs55 → vs55 _ _ _ (x Var55 vz55 vs55) Tm55 : Con55 → Ty55 → Set;Tm55 = λ Γ A → (Tm55 : Con55 → Ty55 → Set) (var : (Γ : _) (A : _) → Var55 Γ A → Tm55 Γ A) (lam : (Γ : _) (A B : _) → Tm55 (snoc55 Γ A) B → Tm55 Γ (arr55 A B)) (app : (Γ : _) (A B : _) → Tm55 Γ (arr55 A B) → Tm55 Γ A → Tm55 Γ B) → Tm55 Γ A var55 : ∀{Γ A} → Var55 Γ A → Tm55 Γ A;var55 = λ x Tm55 var55 lam app → var55 _ _ x lam55 : ∀{Γ A B} → Tm55 (snoc55 Γ A) B → Tm55 Γ (arr55 A B);lam55 = λ t Tm55 var55 lam55 app → lam55 _ _ _ (t Tm55 var55 lam55 app) app55 : ∀{Γ A B} → Tm55 Γ (arr55 A B) → Tm55 Γ A → Tm55 Γ B;app55 = λ t u Tm55 var55 lam55 app55 → app55 _ _ _ (t Tm55 var55 lam55 app55) (u Tm55 var55 lam55 app55) v055 : ∀{Γ A} → Tm55 (snoc55 Γ A) A;v055 = var55 vz55 v155 : ∀{Γ A B} → Tm55 (snoc55 (snoc55 Γ A) B) A;v155 = var55 (vs55 vz55) v255 : ∀{Γ A B C} → Tm55 (snoc55 (snoc55 (snoc55 Γ A) B) C) A;v255 = var55 (vs55 (vs55 vz55)) v355 : ∀{Γ A B C D} → Tm55 (snoc55 (snoc55 (snoc55 (snoc55 Γ A) B) C) D) A;v355 = var55 (vs55 (vs55 (vs55 vz55))) v455 : ∀{Γ A B C D E} → Tm55 (snoc55 (snoc55 (snoc55 (snoc55 (snoc55 Γ A) B) C) D) E) A;v455 = var55 (vs55 (vs55 (vs55 (vs55 vz55)))) test55 : ∀{Γ A} → Tm55 Γ (arr55 (arr55 A A) (arr55 A A));test55 = lam55 (lam55 (app55 v155 (app55 v155 (app55 v155 (app55 v155 (app55 v155 (app55 v155 v055))))))) {-# OPTIONS --type-in-type #-} Ty56 : Set; Ty56 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι56 : Ty56; ι56 = λ _ ι56 _ → ι56 arr56 : Ty56 → Ty56 → Ty56; arr56 = λ A B Ty56 ι56 arr56 → arr56 (A Ty56 ι56 arr56) (B Ty56 ι56 arr56) Con56 : Set;Con56 = (Con56 : Set) (nil : Con56) (snoc : Con56 → Ty56 → Con56) → Con56 nil56 : Con56;nil56 = λ Con56 nil56 snoc → nil56 snoc56 : Con56 → Ty56 → Con56;snoc56 = λ Γ A Con56 nil56 snoc56 → snoc56 (Γ Con56 nil56 snoc56) A Var56 : Con56 → Ty56 → Set;Var56 = λ Γ A → (Var56 : Con56 → Ty56 → Set) (vz : (Γ : _)(A : _) → Var56 (snoc56 Γ A) A) (vs : (Γ : _)(B A : _) → Var56 Γ A → Var56 (snoc56 Γ B) A) → Var56 Γ A vz56 : ∀{Γ A} → Var56 (snoc56 Γ A) A;vz56 = λ Var56 vz56 vs → vz56 _ _ vs56 : ∀{Γ B A} → Var56 Γ A → Var56 (snoc56 Γ B) A;vs56 = λ x Var56 vz56 vs56 → vs56 _ _ _ (x Var56 vz56 vs56) Tm56 : Con56 → Ty56 → Set;Tm56 = λ Γ A → (Tm56 : Con56 → Ty56 → Set) (var : (Γ : _) (A : _) → Var56 Γ A → Tm56 Γ A) (lam : (Γ : _) (A B : _) → Tm56 (snoc56 Γ A) B → Tm56 Γ (arr56 A B)) (app : (Γ : _) (A B : _) → Tm56 Γ (arr56 A B) → Tm56 Γ A → Tm56 Γ B) → Tm56 Γ A var56 : ∀{Γ A} → Var56 Γ A → Tm56 Γ A;var56 = λ x Tm56 var56 lam app → var56 _ _ x lam56 : ∀{Γ A B} → Tm56 (snoc56 Γ A) B → Tm56 Γ (arr56 A B);lam56 = λ t Tm56 var56 lam56 app → lam56 _ _ _ (t Tm56 var56 lam56 app) app56 : ∀{Γ A B} → Tm56 Γ (arr56 A B) → Tm56 Γ A → Tm56 Γ B;app56 = λ t u Tm56 var56 lam56 app56 → app56 _ _ _ (t Tm56 var56 lam56 app56) (u Tm56 var56 lam56 app56) v056 : ∀{Γ A} → Tm56 (snoc56 Γ A) A;v056 = var56 vz56 v156 : ∀{Γ A B} → Tm56 (snoc56 (snoc56 Γ A) B) A;v156 = var56 (vs56 vz56) v256 : ∀{Γ A B C} → Tm56 (snoc56 (snoc56 (snoc56 Γ A) B) C) A;v256 = var56 (vs56 (vs56 vz56)) v356 : ∀{Γ A B C D} → Tm56 (snoc56 (snoc56 (snoc56 (snoc56 Γ A) B) C) D) A;v356 = var56 (vs56 (vs56 (vs56 vz56))) v456 : ∀{Γ A B C D E} → Tm56 (snoc56 (snoc56 (snoc56 (snoc56 (snoc56 Γ A) B) C) D) E) A;v456 = var56 (vs56 (vs56 (vs56 (vs56 vz56)))) test56 : ∀{Γ A} → Tm56 Γ (arr56 (arr56 A A) (arr56 A A));test56 = lam56 (lam56 (app56 v156 (app56 v156 (app56 v156 (app56 v156 (app56 v156 (app56 v156 v056))))))) {-# OPTIONS --type-in-type #-} Ty57 : Set; Ty57 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι57 : Ty57; ι57 = λ _ ι57 _ → ι57 arr57 : Ty57 → Ty57 → Ty57; arr57 = λ A B Ty57 ι57 arr57 → arr57 (A Ty57 ι57 arr57) (B Ty57 ι57 arr57) Con57 : Set;Con57 = (Con57 : Set) (nil : Con57) (snoc : Con57 → Ty57 → Con57) → Con57 nil57 : Con57;nil57 = λ Con57 nil57 snoc → nil57 snoc57 : Con57 → Ty57 → Con57;snoc57 = λ Γ A Con57 nil57 snoc57 → snoc57 (Γ Con57 nil57 snoc57) A Var57 : Con57 → Ty57 → Set;Var57 = λ Γ A → (Var57 : Con57 → Ty57 → Set) (vz : (Γ : _)(A : _) → Var57 (snoc57 Γ A) A) (vs : (Γ : _)(B A : _) → Var57 Γ A → Var57 (snoc57 Γ B) A) → Var57 Γ A vz57 : ∀{Γ A} → Var57 (snoc57 Γ A) A;vz57 = λ Var57 vz57 vs → vz57 _ _ vs57 : ∀{Γ B A} → Var57 Γ A → Var57 (snoc57 Γ B) A;vs57 = λ x Var57 vz57 vs57 → vs57 _ _ _ (x Var57 vz57 vs57) Tm57 : Con57 → Ty57 → Set;Tm57 = λ Γ A → (Tm57 : Con57 → Ty57 → Set) (var : (Γ : _) (A : _) → Var57 Γ A → Tm57 Γ A) (lam : (Γ : _) (A B : _) → Tm57 (snoc57 Γ A) B → Tm57 Γ (arr57 A B)) (app : (Γ : _) (A B : _) → Tm57 Γ (arr57 A B) → Tm57 Γ A → Tm57 Γ B) → Tm57 Γ A var57 : ∀{Γ A} → Var57 Γ A → Tm57 Γ A;var57 = λ x Tm57 var57 lam app → var57 _ _ x lam57 : ∀{Γ A B} → Tm57 (snoc57 Γ A) B → Tm57 Γ (arr57 A B);lam57 = λ t Tm57 var57 lam57 app → lam57 _ _ _ (t Tm57 var57 lam57 app) app57 : ∀{Γ A B} → Tm57 Γ (arr57 A B) → Tm57 Γ A → Tm57 Γ B;app57 = λ t u Tm57 var57 lam57 app57 → app57 _ _ _ (t Tm57 var57 lam57 app57) (u Tm57 var57 lam57 app57) v057 : ∀{Γ A} → Tm57 (snoc57 Γ A) A;v057 = var57 vz57 v157 : ∀{Γ A B} → Tm57 (snoc57 (snoc57 Γ A) B) A;v157 = var57 (vs57 vz57) v257 : ∀{Γ A B C} → Tm57 (snoc57 (snoc57 (snoc57 Γ A) B) C) A;v257 = var57 (vs57 (vs57 vz57)) v357 : ∀{Γ A B C D} → Tm57 (snoc57 (snoc57 (snoc57 (snoc57 Γ A) B) C) D) A;v357 = var57 (vs57 (vs57 (vs57 vz57))) v457 : ∀{Γ A B C D E} → Tm57 (snoc57 (snoc57 (snoc57 (snoc57 (snoc57 Γ A) B) C) D) E) A;v457 = var57 (vs57 (vs57 (vs57 (vs57 vz57)))) test57 : ∀{Γ A} → Tm57 Γ (arr57 (arr57 A A) (arr57 A A));test57 = lam57 (lam57 (app57 v157 (app57 v157 (app57 v157 (app57 v157 (app57 v157 (app57 v157 v057))))))) {-# OPTIONS --type-in-type #-} Ty58 : Set; Ty58 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι58 : Ty58; ι58 = λ _ ι58 _ → ι58 arr58 : Ty58 → Ty58 → Ty58; arr58 = λ A B Ty58 ι58 arr58 → arr58 (A Ty58 ι58 arr58) (B Ty58 ι58 arr58) Con58 : Set;Con58 = (Con58 : Set) (nil : Con58) (snoc : Con58 → Ty58 → Con58) → Con58 nil58 : Con58;nil58 = λ Con58 nil58 snoc → nil58 snoc58 : Con58 → Ty58 → Con58;snoc58 = λ Γ A Con58 nil58 snoc58 → snoc58 (Γ Con58 nil58 snoc58) A Var58 : Con58 → Ty58 → Set;Var58 = λ Γ A → (Var58 : Con58 → Ty58 → Set) (vz : (Γ : _)(A : _) → Var58 (snoc58 Γ A) A) (vs : (Γ : _)(B A : _) → Var58 Γ A → Var58 (snoc58 Γ B) A) → Var58 Γ A vz58 : ∀{Γ A} → Var58 (snoc58 Γ A) A;vz58 = λ Var58 vz58 vs → vz58 _ _ vs58 : ∀{Γ B A} → Var58 Γ A → Var58 (snoc58 Γ B) A;vs58 = λ x Var58 vz58 vs58 → vs58 _ _ _ (x Var58 vz58 vs58) Tm58 : Con58 → Ty58 → Set;Tm58 = λ Γ A → (Tm58 : Con58 → Ty58 → Set) (var : (Γ : _) (A : _) → Var58 Γ A → Tm58 Γ A) (lam : (Γ : _) (A B : _) → Tm58 (snoc58 Γ A) B → Tm58 Γ (arr58 A B)) (app : (Γ : _) (A B : _) → Tm58 Γ (arr58 A B) → Tm58 Γ A → Tm58 Γ B) → Tm58 Γ A var58 : ∀{Γ A} → Var58 Γ A → Tm58 Γ A;var58 = λ x Tm58 var58 lam app → var58 _ _ x lam58 : ∀{Γ A B} → Tm58 (snoc58 Γ A) B → Tm58 Γ (arr58 A B);lam58 = λ t Tm58 var58 lam58 app → lam58 _ _ _ (t Tm58 var58 lam58 app) app58 : ∀{Γ A B} → Tm58 Γ (arr58 A B) → Tm58 Γ A → Tm58 Γ B;app58 = λ t u Tm58 var58 lam58 app58 → app58 _ _ _ (t Tm58 var58 lam58 app58) (u Tm58 var58 lam58 app58) v058 : ∀{Γ A} → Tm58 (snoc58 Γ A) A;v058 = var58 vz58 v158 : ∀{Γ A B} → Tm58 (snoc58 (snoc58 Γ A) B) A;v158 = var58 (vs58 vz58) v258 : ∀{Γ A B C} → Tm58 (snoc58 (snoc58 (snoc58 Γ A) B) C) A;v258 = var58 (vs58 (vs58 vz58)) v358 : ∀{Γ A B C D} → Tm58 (snoc58 (snoc58 (snoc58 (snoc58 Γ A) B) C) D) A;v358 = var58 (vs58 (vs58 (vs58 vz58))) v458 : ∀{Γ A B C D E} → Tm58 (snoc58 (snoc58 (snoc58 (snoc58 (snoc58 Γ A) B) C) D) E) A;v458 = var58 (vs58 (vs58 (vs58 (vs58 vz58)))) test58 : ∀{Γ A} → Tm58 Γ (arr58 (arr58 A A) (arr58 A A));test58 = lam58 (lam58 (app58 v158 (app58 v158 (app58 v158 (app58 v158 (app58 v158 (app58 v158 v058))))))) {-# OPTIONS --type-in-type #-} Ty59 : Set; Ty59 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι59 : Ty59; ι59 = λ _ ι59 _ → ι59 arr59 : Ty59 → Ty59 → Ty59; arr59 = λ A B Ty59 ι59 arr59 → arr59 (A Ty59 ι59 arr59) (B Ty59 ι59 arr59) Con59 : Set;Con59 = (Con59 : Set) (nil : Con59) (snoc : Con59 → Ty59 → Con59) → Con59 nil59 : Con59;nil59 = λ Con59 nil59 snoc → nil59 snoc59 : Con59 → Ty59 → Con59;snoc59 = λ Γ A Con59 nil59 snoc59 → snoc59 (Γ Con59 nil59 snoc59) A Var59 : Con59 → Ty59 → Set;Var59 = λ Γ A → (Var59 : Con59 → Ty59 → Set) (vz : (Γ : _)(A : _) → Var59 (snoc59 Γ A) A) (vs : (Γ : _)(B A : _) → Var59 Γ A → Var59 (snoc59 Γ B) A) → Var59 Γ A vz59 : ∀{Γ A} → Var59 (snoc59 Γ A) A;vz59 = λ Var59 vz59 vs → vz59 _ _ vs59 : ∀{Γ B A} → Var59 Γ A → Var59 (snoc59 Γ B) A;vs59 = λ x Var59 vz59 vs59 → vs59 _ _ _ (x Var59 vz59 vs59) Tm59 : Con59 → Ty59 → Set;Tm59 = λ Γ A → (Tm59 : Con59 → Ty59 → Set) (var : (Γ : _) (A : _) → Var59 Γ A → Tm59 Γ A) (lam : (Γ : _) (A B : _) → Tm59 (snoc59 Γ A) B → Tm59 Γ (arr59 A B)) (app : (Γ : _) (A B : _) → Tm59 Γ (arr59 A B) → Tm59 Γ A → Tm59 Γ B) → Tm59 Γ A var59 : ∀{Γ A} → Var59 Γ A → Tm59 Γ A;var59 = λ x Tm59 var59 lam app → var59 _ _ x lam59 : ∀{Γ A B} → Tm59 (snoc59 Γ A) B → Tm59 Γ (arr59 A B);lam59 = λ t Tm59 var59 lam59 app → lam59 _ _ _ (t Tm59 var59 lam59 app) app59 : ∀{Γ A B} → Tm59 Γ (arr59 A B) → Tm59 Γ A → Tm59 Γ B;app59 = λ t u Tm59 var59 lam59 app59 → app59 _ _ _ (t Tm59 var59 lam59 app59) (u Tm59 var59 lam59 app59) v059 : ∀{Γ A} → Tm59 (snoc59 Γ A) A;v059 = var59 vz59 v159 : ∀{Γ A B} → Tm59 (snoc59 (snoc59 Γ A) B) A;v159 = var59 (vs59 vz59) v259 : ∀{Γ A B C} → Tm59 (snoc59 (snoc59 (snoc59 Γ A) B) C) A;v259 = var59 (vs59 (vs59 vz59)) v359 : ∀{Γ A B C D} → Tm59 (snoc59 (snoc59 (snoc59 (snoc59 Γ A) B) C) D) A;v359 = var59 (vs59 (vs59 (vs59 vz59))) v459 : ∀{Γ A B C D E} → Tm59 (snoc59 (snoc59 (snoc59 (snoc59 (snoc59 Γ A) B) C) D) E) A;v459 = var59 (vs59 (vs59 (vs59 (vs59 vz59)))) test59 : ∀{Γ A} → Tm59 Γ (arr59 (arr59 A A) (arr59 A A));test59 = lam59 (lam59 (app59 v159 (app59 v159 (app59 v159 (app59 v159 (app59 v159 (app59 v159 v059))))))) {-# OPTIONS --type-in-type #-} Ty60 : Set; Ty60 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι60 : Ty60; ι60 = λ _ ι60 _ → ι60 arr60 : Ty60 → Ty60 → Ty60; arr60 = λ A B Ty60 ι60 arr60 → arr60 (A Ty60 ι60 arr60) (B Ty60 ι60 arr60) Con60 : Set;Con60 = (Con60 : Set) (nil : Con60) (snoc : Con60 → Ty60 → Con60) → Con60 nil60 : Con60;nil60 = λ Con60 nil60 snoc → nil60 snoc60 : Con60 → Ty60 → Con60;snoc60 = λ Γ A Con60 nil60 snoc60 → snoc60 (Γ Con60 nil60 snoc60) A Var60 : Con60 → Ty60 → Set;Var60 = λ Γ A → (Var60 : Con60 → Ty60 → Set) (vz : (Γ : _)(A : _) → Var60 (snoc60 Γ A) A) (vs : (Γ : _)(B A : _) → Var60 Γ A → Var60 (snoc60 Γ B) A) → Var60 Γ A vz60 : ∀{Γ A} → Var60 (snoc60 Γ A) A;vz60 = λ Var60 vz60 vs → vz60 _ _ vs60 : ∀{Γ B A} → Var60 Γ A → Var60 (snoc60 Γ B) A;vs60 = λ x Var60 vz60 vs60 → vs60 _ _ _ (x Var60 vz60 vs60) Tm60 : Con60 → Ty60 → Set;Tm60 = λ Γ A → (Tm60 : Con60 → Ty60 → Set) (var : (Γ : _) (A : _) → Var60 Γ A → Tm60 Γ A) (lam : (Γ : _) (A B : _) → Tm60 (snoc60 Γ A) B → Tm60 Γ (arr60 A B)) (app : (Γ : _) (A B : _) → Tm60 Γ (arr60 A B) → Tm60 Γ A → Tm60 Γ B) → Tm60 Γ A var60 : ∀{Γ A} → Var60 Γ A → Tm60 Γ A;var60 = λ x Tm60 var60 lam app → var60 _ _ x lam60 : ∀{Γ A B} → Tm60 (snoc60 Γ A) B → Tm60 Γ (arr60 A B);lam60 = λ t Tm60 var60 lam60 app → lam60 _ _ _ (t Tm60 var60 lam60 app) app60 : ∀{Γ A B} → Tm60 Γ (arr60 A B) → Tm60 Γ A → Tm60 Γ B;app60 = λ t u Tm60 var60 lam60 app60 → app60 _ _ _ (t Tm60 var60 lam60 app60) (u Tm60 var60 lam60 app60) v060 : ∀{Γ A} → Tm60 (snoc60 Γ A) A;v060 = var60 vz60 v160 : ∀{Γ A B} → Tm60 (snoc60 (snoc60 Γ A) B) A;v160 = var60 (vs60 vz60) v260 : ∀{Γ A B C} → Tm60 (snoc60 (snoc60 (snoc60 Γ A) B) C) A;v260 = var60 (vs60 (vs60 vz60)) v360 : ∀{Γ A B C D} → Tm60 (snoc60 (snoc60 (snoc60 (snoc60 Γ A) B) C) D) A;v360 = var60 (vs60 (vs60 (vs60 vz60))) v460 : ∀{Γ A B C D E} → Tm60 (snoc60 (snoc60 (snoc60 (snoc60 (snoc60 Γ A) B) C) D) E) A;v460 = var60 (vs60 (vs60 (vs60 (vs60 vz60)))) test60 : ∀{Γ A} → Tm60 Γ (arr60 (arr60 A A) (arr60 A A));test60 = lam60 (lam60 (app60 v160 (app60 v160 (app60 v160 (app60 v160 (app60 v160 (app60 v160 v060))))))) {-# OPTIONS --type-in-type #-} Ty61 : Set; Ty61 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι61 : Ty61; ι61 = λ _ ι61 _ → ι61 arr61 : Ty61 → Ty61 → Ty61; arr61 = λ A B Ty61 ι61 arr61 → arr61 (A Ty61 ι61 arr61) (B Ty61 ι61 arr61) Con61 : Set;Con61 = (Con61 : Set) (nil : Con61) (snoc : Con61 → Ty61 → Con61) → Con61 nil61 : Con61;nil61 = λ Con61 nil61 snoc → nil61 snoc61 : Con61 → Ty61 → Con61;snoc61 = λ Γ A Con61 nil61 snoc61 → snoc61 (Γ Con61 nil61 snoc61) A Var61 : Con61 → Ty61 → Set;Var61 = λ Γ A → (Var61 : Con61 → Ty61 → Set) (vz : (Γ : _)(A : _) → Var61 (snoc61 Γ A) A) (vs : (Γ : _)(B A : _) → Var61 Γ A → Var61 (snoc61 Γ B) A) → Var61 Γ A vz61 : ∀{Γ A} → Var61 (snoc61 Γ A) A;vz61 = λ Var61 vz61 vs → vz61 _ _ vs61 : ∀{Γ B A} → Var61 Γ A → Var61 (snoc61 Γ B) A;vs61 = λ x Var61 vz61 vs61 → vs61 _ _ _ (x Var61 vz61 vs61) Tm61 : Con61 → Ty61 → Set;Tm61 = λ Γ A → (Tm61 : Con61 → Ty61 → Set) (var : (Γ : _) (A : _) → Var61 Γ A → Tm61 Γ A) (lam : (Γ : _) (A B : _) → Tm61 (snoc61 Γ A) B → Tm61 Γ (arr61 A B)) (app : (Γ : _) (A B : _) → Tm61 Γ (arr61 A B) → Tm61 Γ A → Tm61 Γ B) → Tm61 Γ A var61 : ∀{Γ A} → Var61 Γ A → Tm61 Γ A;var61 = λ x Tm61 var61 lam app → var61 _ _ x lam61 : ∀{Γ A B} → Tm61 (snoc61 Γ A) B → Tm61 Γ (arr61 A B);lam61 = λ t Tm61 var61 lam61 app → lam61 _ _ _ (t Tm61 var61 lam61 app) app61 : ∀{Γ A B} → Tm61 Γ (arr61 A B) → Tm61 Γ A → Tm61 Γ B;app61 = λ t u Tm61 var61 lam61 app61 → app61 _ _ _ (t Tm61 var61 lam61 app61) (u Tm61 var61 lam61 app61) v061 : ∀{Γ A} → Tm61 (snoc61 Γ A) A;v061 = var61 vz61 v161 : ∀{Γ A B} → Tm61 (snoc61 (snoc61 Γ A) B) A;v161 = var61 (vs61 vz61) v261 : ∀{Γ A B C} → Tm61 (snoc61 (snoc61 (snoc61 Γ A) B) C) A;v261 = var61 (vs61 (vs61 vz61)) v361 : ∀{Γ A B C D} → Tm61 (snoc61 (snoc61 (snoc61 (snoc61 Γ A) B) C) D) A;v361 = var61 (vs61 (vs61 (vs61 vz61))) v461 : ∀{Γ A B C D E} → Tm61 (snoc61 (snoc61 (snoc61 (snoc61 (snoc61 Γ A) B) C) D) E) A;v461 = var61 (vs61 (vs61 (vs61 (vs61 vz61)))) test61 : ∀{Γ A} → Tm61 Γ (arr61 (arr61 A A) (arr61 A A));test61 = lam61 (lam61 (app61 v161 (app61 v161 (app61 v161 (app61 v161 (app61 v161 (app61 v161 v061))))))) {-# OPTIONS --type-in-type #-} Ty62 : Set; Ty62 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι62 : Ty62; ι62 = λ _ ι62 _ → ι62 arr62 : Ty62 → Ty62 → Ty62; arr62 = λ A B Ty62 ι62 arr62 → arr62 (A Ty62 ι62 arr62) (B Ty62 ι62 arr62) Con62 : Set;Con62 = (Con62 : Set) (nil : Con62) (snoc : Con62 → Ty62 → Con62) → Con62 nil62 : Con62;nil62 = λ Con62 nil62 snoc → nil62 snoc62 : Con62 → Ty62 → Con62;snoc62 = λ Γ A Con62 nil62 snoc62 → snoc62 (Γ Con62 nil62 snoc62) A Var62 : Con62 → Ty62 → Set;Var62 = λ Γ A → (Var62 : Con62 → Ty62 → Set) (vz : (Γ : _)(A : _) → Var62 (snoc62 Γ A) A) (vs : (Γ : _)(B A : _) → Var62 Γ A → Var62 (snoc62 Γ B) A) → Var62 Γ A vz62 : ∀{Γ A} → Var62 (snoc62 Γ A) A;vz62 = λ Var62 vz62 vs → vz62 _ _ vs62 : ∀{Γ B A} → Var62 Γ A → Var62 (snoc62 Γ B) A;vs62 = λ x Var62 vz62 vs62 → vs62 _ _ _ (x Var62 vz62 vs62) Tm62 : Con62 → Ty62 → Set;Tm62 = λ Γ A → (Tm62 : Con62 → Ty62 → Set) (var : (Γ : _) (A : _) → Var62 Γ A → Tm62 Γ A) (lam : (Γ : _) (A B : _) → Tm62 (snoc62 Γ A) B → Tm62 Γ (arr62 A B)) (app : (Γ : _) (A B : _) → Tm62 Γ (arr62 A B) → Tm62 Γ A → Tm62 Γ B) → Tm62 Γ A var62 : ∀{Γ A} → Var62 Γ A → Tm62 Γ A;var62 = λ x Tm62 var62 lam app → var62 _ _ x lam62 : ∀{Γ A B} → Tm62 (snoc62 Γ A) B → Tm62 Γ (arr62 A B);lam62 = λ t Tm62 var62 lam62 app → lam62 _ _ _ (t Tm62 var62 lam62 app) app62 : ∀{Γ A B} → Tm62 Γ (arr62 A B) → Tm62 Γ A → Tm62 Γ B;app62 = λ t u Tm62 var62 lam62 app62 → app62 _ _ _ (t Tm62 var62 lam62 app62) (u Tm62 var62 lam62 app62) v062 : ∀{Γ A} → Tm62 (snoc62 Γ A) A;v062 = var62 vz62 v162 : ∀{Γ A B} → Tm62 (snoc62 (snoc62 Γ A) B) A;v162 = var62 (vs62 vz62) v262 : ∀{Γ A B C} → Tm62 (snoc62 (snoc62 (snoc62 Γ A) B) C) A;v262 = var62 (vs62 (vs62 vz62)) v362 : ∀{Γ A B C D} → Tm62 (snoc62 (snoc62 (snoc62 (snoc62 Γ A) B) C) D) A;v362 = var62 (vs62 (vs62 (vs62 vz62))) v462 : ∀{Γ A B C D E} → Tm62 (snoc62 (snoc62 (snoc62 (snoc62 (snoc62 Γ A) B) C) D) E) A;v462 = var62 (vs62 (vs62 (vs62 (vs62 vz62)))) test62 : ∀{Γ A} → Tm62 Γ (arr62 (arr62 A A) (arr62 A A));test62 = lam62 (lam62 (app62 v162 (app62 v162 (app62 v162 (app62 v162 (app62 v162 (app62 v162 v062))))))) {-# OPTIONS --type-in-type #-} Ty63 : Set; Ty63 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι63 : Ty63; ι63 = λ _ ι63 _ → ι63 arr63 : Ty63 → Ty63 → Ty63; arr63 = λ A B Ty63 ι63 arr63 → arr63 (A Ty63 ι63 arr63) (B Ty63 ι63 arr63) Con63 : Set;Con63 = (Con63 : Set) (nil : Con63) (snoc : Con63 → Ty63 → Con63) → Con63 nil63 : Con63;nil63 = λ Con63 nil63 snoc → nil63 snoc63 : Con63 → Ty63 → Con63;snoc63 = λ Γ A Con63 nil63 snoc63 → snoc63 (Γ Con63 nil63 snoc63) A Var63 : Con63 → Ty63 → Set;Var63 = λ Γ A → (Var63 : Con63 → Ty63 → Set) (vz : (Γ : _)(A : _) → Var63 (snoc63 Γ A) A) (vs : (Γ : _)(B A : _) → Var63 Γ A → Var63 (snoc63 Γ B) A) → Var63 Γ A vz63 : ∀{Γ A} → Var63 (snoc63 Γ A) A;vz63 = λ Var63 vz63 vs → vz63 _ _ vs63 : ∀{Γ B A} → Var63 Γ A → Var63 (snoc63 Γ B) A;vs63 = λ x Var63 vz63 vs63 → vs63 _ _ _ (x Var63 vz63 vs63) Tm63 : Con63 → Ty63 → Set;Tm63 = λ Γ A → (Tm63 : Con63 → Ty63 → Set) (var : (Γ : _) (A : _) → Var63 Γ A → Tm63 Γ A) (lam : (Γ : _) (A B : _) → Tm63 (snoc63 Γ A) B → Tm63 Γ (arr63 A B)) (app : (Γ : _) (A B : _) → Tm63 Γ (arr63 A B) → Tm63 Γ A → Tm63 Γ B) → Tm63 Γ A var63 : ∀{Γ A} → Var63 Γ A → Tm63 Γ A;var63 = λ x Tm63 var63 lam app → var63 _ _ x lam63 : ∀{Γ A B} → Tm63 (snoc63 Γ A) B → Tm63 Γ (arr63 A B);lam63 = λ t Tm63 var63 lam63 app → lam63 _ _ _ (t Tm63 var63 lam63 app) app63 : ∀{Γ A B} → Tm63 Γ (arr63 A B) → Tm63 Γ A → Tm63 Γ B;app63 = λ t u Tm63 var63 lam63 app63 → app63 _ _ _ (t Tm63 var63 lam63 app63) (u Tm63 var63 lam63 app63) v063 : ∀{Γ A} → Tm63 (snoc63 Γ A) A;v063 = var63 vz63 v163 : ∀{Γ A B} → Tm63 (snoc63 (snoc63 Γ A) B) A;v163 = var63 (vs63 vz63) v263 : ∀{Γ A B C} → Tm63 (snoc63 (snoc63 (snoc63 Γ A) B) C) A;v263 = var63 (vs63 (vs63 vz63)) v363 : ∀{Γ A B C D} → Tm63 (snoc63 (snoc63 (snoc63 (snoc63 Γ A) B) C) D) A;v363 = var63 (vs63 (vs63 (vs63 vz63))) v463 : ∀{Γ A B C D E} → Tm63 (snoc63 (snoc63 (snoc63 (snoc63 (snoc63 Γ A) B) C) D) E) A;v463 = var63 (vs63 (vs63 (vs63 (vs63 vz63)))) test63 : ∀{Γ A} → Tm63 Γ (arr63 (arr63 A A) (arr63 A A));test63 = lam63 (lam63 (app63 v163 (app63 v163 (app63 v163 (app63 v163 (app63 v163 (app63 v163 v063))))))) {-# OPTIONS --type-in-type #-} Ty64 : Set; Ty64 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι64 : Ty64; ι64 = λ _ ι64 _ → ι64 arr64 : Ty64 → Ty64 → Ty64; arr64 = λ A B Ty64 ι64 arr64 → arr64 (A Ty64 ι64 arr64) (B Ty64 ι64 arr64) Con64 : Set;Con64 = (Con64 : Set) (nil : Con64) (snoc : Con64 → Ty64 → Con64) → Con64 nil64 : Con64;nil64 = λ Con64 nil64 snoc → nil64 snoc64 : Con64 → Ty64 → Con64;snoc64 = λ Γ A Con64 nil64 snoc64 → snoc64 (Γ Con64 nil64 snoc64) A Var64 : Con64 → Ty64 → Set;Var64 = λ Γ A → (Var64 : Con64 → Ty64 → Set) (vz : (Γ : _)(A : _) → Var64 (snoc64 Γ A) A) (vs : (Γ : _)(B A : _) → Var64 Γ A → Var64 (snoc64 Γ B) A) → Var64 Γ A vz64 : ∀{Γ A} → Var64 (snoc64 Γ A) A;vz64 = λ Var64 vz64 vs → vz64 _ _ vs64 : ∀{Γ B A} → Var64 Γ A → Var64 (snoc64 Γ B) A;vs64 = λ x Var64 vz64 vs64 → vs64 _ _ _ (x Var64 vz64 vs64) Tm64 : Con64 → Ty64 → Set;Tm64 = λ Γ A → (Tm64 : Con64 → Ty64 → Set) (var : (Γ : _) (A : _) → Var64 Γ A → Tm64 Γ A) (lam : (Γ : _) (A B : _) → Tm64 (snoc64 Γ A) B → Tm64 Γ (arr64 A B)) (app : (Γ : _) (A B : _) → Tm64 Γ (arr64 A B) → Tm64 Γ A → Tm64 Γ B) → Tm64 Γ A var64 : ∀{Γ A} → Var64 Γ A → Tm64 Γ A;var64 = λ x Tm64 var64 lam app → var64 _ _ x lam64 : ∀{Γ A B} → Tm64 (snoc64 Γ A) B → Tm64 Γ (arr64 A B);lam64 = λ t Tm64 var64 lam64 app → lam64 _ _ _ (t Tm64 var64 lam64 app) app64 : ∀{Γ A B} → Tm64 Γ (arr64 A B) → Tm64 Γ A → Tm64 Γ B;app64 = λ t u Tm64 var64 lam64 app64 → app64 _ _ _ (t Tm64 var64 lam64 app64) (u Tm64 var64 lam64 app64) v064 : ∀{Γ A} → Tm64 (snoc64 Γ A) A;v064 = var64 vz64 v164 : ∀{Γ A B} → Tm64 (snoc64 (snoc64 Γ A) B) A;v164 = var64 (vs64 vz64) v264 : ∀{Γ A B C} → Tm64 (snoc64 (snoc64 (snoc64 Γ A) B) C) A;v264 = var64 (vs64 (vs64 vz64)) v364 : ∀{Γ A B C D} → Tm64 (snoc64 (snoc64 (snoc64 (snoc64 Γ A) B) C) D) A;v364 = var64 (vs64 (vs64 (vs64 vz64))) v464 : ∀{Γ A B C D E} → Tm64 (snoc64 (snoc64 (snoc64 (snoc64 (snoc64 Γ A) B) C) D) E) A;v464 = var64 (vs64 (vs64 (vs64 (vs64 vz64)))) test64 : ∀{Γ A} → Tm64 Γ (arr64 (arr64 A A) (arr64 A A));test64 = lam64 (lam64 (app64 v164 (app64 v164 (app64 v164 (app64 v164 (app64 v164 (app64 v164 v064))))))) {-# OPTIONS --type-in-type #-} Ty65 : Set; Ty65 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι65 : Ty65; ι65 = λ _ ι65 _ → ι65 arr65 : Ty65 → Ty65 → Ty65; arr65 = λ A B Ty65 ι65 arr65 → arr65 (A Ty65 ι65 arr65) (B Ty65 ι65 arr65) Con65 : Set;Con65 = (Con65 : Set) (nil : Con65) (snoc : Con65 → Ty65 → Con65) → Con65 nil65 : Con65;nil65 = λ Con65 nil65 snoc → nil65 snoc65 : Con65 → Ty65 → Con65;snoc65 = λ Γ A Con65 nil65 snoc65 → snoc65 (Γ Con65 nil65 snoc65) A Var65 : Con65 → Ty65 → Set;Var65 = λ Γ A → (Var65 : Con65 → Ty65 → Set) (vz : (Γ : _)(A : _) → Var65 (snoc65 Γ A) A) (vs : (Γ : _)(B A : _) → Var65 Γ A → Var65 (snoc65 Γ B) A) → Var65 Γ A vz65 : ∀{Γ A} → Var65 (snoc65 Γ A) A;vz65 = λ Var65 vz65 vs → vz65 _ _ vs65 : ∀{Γ B A} → Var65 Γ A → Var65 (snoc65 Γ B) A;vs65 = λ x Var65 vz65 vs65 → vs65 _ _ _ (x Var65 vz65 vs65) Tm65 : Con65 → Ty65 → Set;Tm65 = λ Γ A → (Tm65 : Con65 → Ty65 → Set) (var : (Γ : _) (A : _) → Var65 Γ A → Tm65 Γ A) (lam : (Γ : _) (A B : _) → Tm65 (snoc65 Γ A) B → Tm65 Γ (arr65 A B)) (app : (Γ : _) (A B : _) → Tm65 Γ (arr65 A B) → Tm65 Γ A → Tm65 Γ B) → Tm65 Γ A var65 : ∀{Γ A} → Var65 Γ A → Tm65 Γ A;var65 = λ x Tm65 var65 lam app → var65 _ _ x lam65 : ∀{Γ A B} → Tm65 (snoc65 Γ A) B → Tm65 Γ (arr65 A B);lam65 = λ t Tm65 var65 lam65 app → lam65 _ _ _ (t Tm65 var65 lam65 app) app65 : ∀{Γ A B} → Tm65 Γ (arr65 A B) → Tm65 Γ A → Tm65 Γ B;app65 = λ t u Tm65 var65 lam65 app65 → app65 _ _ _ (t Tm65 var65 lam65 app65) (u Tm65 var65 lam65 app65) v065 : ∀{Γ A} → Tm65 (snoc65 Γ A) A;v065 = var65 vz65 v165 : ∀{Γ A B} → Tm65 (snoc65 (snoc65 Γ A) B) A;v165 = var65 (vs65 vz65) v265 : ∀{Γ A B C} → Tm65 (snoc65 (snoc65 (snoc65 Γ A) B) C) A;v265 = var65 (vs65 (vs65 vz65)) v365 : ∀{Γ A B C D} → Tm65 (snoc65 (snoc65 (snoc65 (snoc65 Γ A) B) C) D) A;v365 = var65 (vs65 (vs65 (vs65 vz65))) v465 : ∀{Γ A B C D E} → Tm65 (snoc65 (snoc65 (snoc65 (snoc65 (snoc65 Γ A) B) C) D) E) A;v465 = var65 (vs65 (vs65 (vs65 (vs65 vz65)))) test65 : ∀{Γ A} → Tm65 Γ (arr65 (arr65 A A) (arr65 A A));test65 = lam65 (lam65 (app65 v165 (app65 v165 (app65 v165 (app65 v165 (app65 v165 (app65 v165 v065))))))) {-# OPTIONS --type-in-type #-} Ty66 : Set; Ty66 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι66 : Ty66; ι66 = λ _ ι66 _ → ι66 arr66 : Ty66 → Ty66 → Ty66; arr66 = λ A B Ty66 ι66 arr66 → arr66 (A Ty66 ι66 arr66) (B Ty66 ι66 arr66) Con66 : Set;Con66 = (Con66 : Set) (nil : Con66) (snoc : Con66 → Ty66 → Con66) → Con66 nil66 : Con66;nil66 = λ Con66 nil66 snoc → nil66 snoc66 : Con66 → Ty66 → Con66;snoc66 = λ Γ A Con66 nil66 snoc66 → snoc66 (Γ Con66 nil66 snoc66) A Var66 : Con66 → Ty66 → Set;Var66 = λ Γ A → (Var66 : Con66 → Ty66 → Set) (vz : (Γ : _)(A : _) → Var66 (snoc66 Γ A) A) (vs : (Γ : _)(B A : _) → Var66 Γ A → Var66 (snoc66 Γ B) A) → Var66 Γ A vz66 : ∀{Γ A} → Var66 (snoc66 Γ A) A;vz66 = λ Var66 vz66 vs → vz66 _ _ vs66 : ∀{Γ B A} → Var66 Γ A → Var66 (snoc66 Γ B) A;vs66 = λ x Var66 vz66 vs66 → vs66 _ _ _ (x Var66 vz66 vs66) Tm66 : Con66 → Ty66 → Set;Tm66 = λ Γ A → (Tm66 : Con66 → Ty66 → Set) (var : (Γ : _) (A : _) → Var66 Γ A → Tm66 Γ A) (lam : (Γ : _) (A B : _) → Tm66 (snoc66 Γ A) B → Tm66 Γ (arr66 A B)) (app : (Γ : _) (A B : _) → Tm66 Γ (arr66 A B) → Tm66 Γ A → Tm66 Γ B) → Tm66 Γ A var66 : ∀{Γ A} → Var66 Γ A → Tm66 Γ A;var66 = λ x Tm66 var66 lam app → var66 _ _ x lam66 : ∀{Γ A B} → Tm66 (snoc66 Γ A) B → Tm66 Γ (arr66 A B);lam66 = λ t Tm66 var66 lam66 app → lam66 _ _ _ (t Tm66 var66 lam66 app) app66 : ∀{Γ A B} → Tm66 Γ (arr66 A B) → Tm66 Γ A → Tm66 Γ B;app66 = λ t u Tm66 var66 lam66 app66 → app66 _ _ _ (t Tm66 var66 lam66 app66) (u Tm66 var66 lam66 app66) v066 : ∀{Γ A} → Tm66 (snoc66 Γ A) A;v066 = var66 vz66 v166 : ∀{Γ A B} → Tm66 (snoc66 (snoc66 Γ A) B) A;v166 = var66 (vs66 vz66) v266 : ∀{Γ A B C} → Tm66 (snoc66 (snoc66 (snoc66 Γ A) B) C) A;v266 = var66 (vs66 (vs66 vz66)) v366 : ∀{Γ A B C D} → Tm66 (snoc66 (snoc66 (snoc66 (snoc66 Γ A) B) C) D) A;v366 = var66 (vs66 (vs66 (vs66 vz66))) v466 : ∀{Γ A B C D E} → Tm66 (snoc66 (snoc66 (snoc66 (snoc66 (snoc66 Γ A) B) C) D) E) A;v466 = var66 (vs66 (vs66 (vs66 (vs66 vz66)))) test66 : ∀{Γ A} → Tm66 Γ (arr66 (arr66 A A) (arr66 A A));test66 = lam66 (lam66 (app66 v166 (app66 v166 (app66 v166 (app66 v166 (app66 v166 (app66 v166 v066))))))) {-# OPTIONS --type-in-type #-} Ty67 : Set; Ty67 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι67 : Ty67; ι67 = λ _ ι67 _ → ι67 arr67 : Ty67 → Ty67 → Ty67; arr67 = λ A B Ty67 ι67 arr67 → arr67 (A Ty67 ι67 arr67) (B Ty67 ι67 arr67) Con67 : Set;Con67 = (Con67 : Set) (nil : Con67) (snoc : Con67 → Ty67 → Con67) → Con67 nil67 : Con67;nil67 = λ Con67 nil67 snoc → nil67 snoc67 : Con67 → Ty67 → Con67;snoc67 = λ Γ A Con67 nil67 snoc67 → snoc67 (Γ Con67 nil67 snoc67) A Var67 : Con67 → Ty67 → Set;Var67 = λ Γ A → (Var67 : Con67 → Ty67 → Set) (vz : (Γ : _)(A : _) → Var67 (snoc67 Γ A) A) (vs : (Γ : _)(B A : _) → Var67 Γ A → Var67 (snoc67 Γ B) A) → Var67 Γ A vz67 : ∀{Γ A} → Var67 (snoc67 Γ A) A;vz67 = λ Var67 vz67 vs → vz67 _ _ vs67 : ∀{Γ B A} → Var67 Γ A → Var67 (snoc67 Γ B) A;vs67 = λ x Var67 vz67 vs67 → vs67 _ _ _ (x Var67 vz67 vs67) Tm67 : Con67 → Ty67 → Set;Tm67 = λ Γ A → (Tm67 : Con67 → Ty67 → Set) (var : (Γ : _) (A : _) → Var67 Γ A → Tm67 Γ A) (lam : (Γ : _) (A B : _) → Tm67 (snoc67 Γ A) B → Tm67 Γ (arr67 A B)) (app : (Γ : _) (A B : _) → Tm67 Γ (arr67 A B) → Tm67 Γ A → Tm67 Γ B) → Tm67 Γ A var67 : ∀{Γ A} → Var67 Γ A → Tm67 Γ A;var67 = λ x Tm67 var67 lam app → var67 _ _ x lam67 : ∀{Γ A B} → Tm67 (snoc67 Γ A) B → Tm67 Γ (arr67 A B);lam67 = λ t Tm67 var67 lam67 app → lam67 _ _ _ (t Tm67 var67 lam67 app) app67 : ∀{Γ A B} → Tm67 Γ (arr67 A B) → Tm67 Γ A → Tm67 Γ B;app67 = λ t u Tm67 var67 lam67 app67 → app67 _ _ _ (t Tm67 var67 lam67 app67) (u Tm67 var67 lam67 app67) v067 : ∀{Γ A} → Tm67 (snoc67 Γ A) A;v067 = var67 vz67 v167 : ∀{Γ A B} → Tm67 (snoc67 (snoc67 Γ A) B) A;v167 = var67 (vs67 vz67) v267 : ∀{Γ A B C} → Tm67 (snoc67 (snoc67 (snoc67 Γ A) B) C) A;v267 = var67 (vs67 (vs67 vz67)) v367 : ∀{Γ A B C D} → Tm67 (snoc67 (snoc67 (snoc67 (snoc67 Γ A) B) C) D) A;v367 = var67 (vs67 (vs67 (vs67 vz67))) v467 : ∀{Γ A B C D E} → Tm67 (snoc67 (snoc67 (snoc67 (snoc67 (snoc67 Γ A) B) C) D) E) A;v467 = var67 (vs67 (vs67 (vs67 (vs67 vz67)))) test67 : ∀{Γ A} → Tm67 Γ (arr67 (arr67 A A) (arr67 A A));test67 = lam67 (lam67 (app67 v167 (app67 v167 (app67 v167 (app67 v167 (app67 v167 (app67 v167 v067))))))) {-# OPTIONS --type-in-type #-} Ty68 : Set; Ty68 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι68 : Ty68; ι68 = λ _ ι68 _ → ι68 arr68 : Ty68 → Ty68 → Ty68; arr68 = λ A B Ty68 ι68 arr68 → arr68 (A Ty68 ι68 arr68) (B Ty68 ι68 arr68) Con68 : Set;Con68 = (Con68 : Set) (nil : Con68) (snoc : Con68 → Ty68 → Con68) → Con68 nil68 : Con68;nil68 = λ Con68 nil68 snoc → nil68 snoc68 : Con68 → Ty68 → Con68;snoc68 = λ Γ A Con68 nil68 snoc68 → snoc68 (Γ Con68 nil68 snoc68) A Var68 : Con68 → Ty68 → Set;Var68 = λ Γ A → (Var68 : Con68 → Ty68 → Set) (vz : (Γ : _)(A : _) → Var68 (snoc68 Γ A) A) (vs : (Γ : _)(B A : _) → Var68 Γ A → Var68 (snoc68 Γ B) A) → Var68 Γ A vz68 : ∀{Γ A} → Var68 (snoc68 Γ A) A;vz68 = λ Var68 vz68 vs → vz68 _ _ vs68 : ∀{Γ B A} → Var68 Γ A → Var68 (snoc68 Γ B) A;vs68 = λ x Var68 vz68 vs68 → vs68 _ _ _ (x Var68 vz68 vs68) Tm68 : Con68 → Ty68 → Set;Tm68 = λ Γ A → (Tm68 : Con68 → Ty68 → Set) (var : (Γ : _) (A : _) → Var68 Γ A → Tm68 Γ A) (lam : (Γ : _) (A B : _) → Tm68 (snoc68 Γ A) B → Tm68 Γ (arr68 A B)) (app : (Γ : _) (A B : _) → Tm68 Γ (arr68 A B) → Tm68 Γ A → Tm68 Γ B) → Tm68 Γ A var68 : ∀{Γ A} → Var68 Γ A → Tm68 Γ A;var68 = λ x Tm68 var68 lam app → var68 _ _ x lam68 : ∀{Γ A B} → Tm68 (snoc68 Γ A) B → Tm68 Γ (arr68 A B);lam68 = λ t Tm68 var68 lam68 app → lam68 _ _ _ (t Tm68 var68 lam68 app) app68 : ∀{Γ A B} → Tm68 Γ (arr68 A B) → Tm68 Γ A → Tm68 Γ B;app68 = λ t u Tm68 var68 lam68 app68 → app68 _ _ _ (t Tm68 var68 lam68 app68) (u Tm68 var68 lam68 app68) v068 : ∀{Γ A} → Tm68 (snoc68 Γ A) A;v068 = var68 vz68 v168 : ∀{Γ A B} → Tm68 (snoc68 (snoc68 Γ A) B) A;v168 = var68 (vs68 vz68) v268 : ∀{Γ A B C} → Tm68 (snoc68 (snoc68 (snoc68 Γ A) B) C) A;v268 = var68 (vs68 (vs68 vz68)) v368 : ∀{Γ A B C D} → Tm68 (snoc68 (snoc68 (snoc68 (snoc68 Γ A) B) C) D) A;v368 = var68 (vs68 (vs68 (vs68 vz68))) v468 : ∀{Γ A B C D E} → Tm68 (snoc68 (snoc68 (snoc68 (snoc68 (snoc68 Γ A) B) C) D) E) A;v468 = var68 (vs68 (vs68 (vs68 (vs68 vz68)))) test68 : ∀{Γ A} → Tm68 Γ (arr68 (arr68 A A) (arr68 A A));test68 = lam68 (lam68 (app68 v168 (app68 v168 (app68 v168 (app68 v168 (app68 v168 (app68 v168 v068))))))) {-# OPTIONS --type-in-type #-} Ty69 : Set; Ty69 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι69 : Ty69; ι69 = λ _ ι69 _ → ι69 arr69 : Ty69 → Ty69 → Ty69; arr69 = λ A B Ty69 ι69 arr69 → arr69 (A Ty69 ι69 arr69) (B Ty69 ι69 arr69) Con69 : Set;Con69 = (Con69 : Set) (nil : Con69) (snoc : Con69 → Ty69 → Con69) → Con69 nil69 : Con69;nil69 = λ Con69 nil69 snoc → nil69 snoc69 : Con69 → Ty69 → Con69;snoc69 = λ Γ A Con69 nil69 snoc69 → snoc69 (Γ Con69 nil69 snoc69) A Var69 : Con69 → Ty69 → Set;Var69 = λ Γ A → (Var69 : Con69 → Ty69 → Set) (vz : (Γ : _)(A : _) → Var69 (snoc69 Γ A) A) (vs : (Γ : _)(B A : _) → Var69 Γ A → Var69 (snoc69 Γ B) A) → Var69 Γ A vz69 : ∀{Γ A} → Var69 (snoc69 Γ A) A;vz69 = λ Var69 vz69 vs → vz69 _ _ vs69 : ∀{Γ B A} → Var69 Γ A → Var69 (snoc69 Γ B) A;vs69 = λ x Var69 vz69 vs69 → vs69 _ _ _ (x Var69 vz69 vs69) Tm69 : Con69 → Ty69 → Set;Tm69 = λ Γ A → (Tm69 : Con69 → Ty69 → Set) (var : (Γ : _) (A : _) → Var69 Γ A → Tm69 Γ A) (lam : (Γ : _) (A B : _) → Tm69 (snoc69 Γ A) B → Tm69 Γ (arr69 A B)) (app : (Γ : _) (A B : _) → Tm69 Γ (arr69 A B) → Tm69 Γ A → Tm69 Γ B) → Tm69 Γ A var69 : ∀{Γ A} → Var69 Γ A → Tm69 Γ A;var69 = λ x Tm69 var69 lam app → var69 _ _ x lam69 : ∀{Γ A B} → Tm69 (snoc69 Γ A) B → Tm69 Γ (arr69 A B);lam69 = λ t Tm69 var69 lam69 app → lam69 _ _ _ (t Tm69 var69 lam69 app) app69 : ∀{Γ A B} → Tm69 Γ (arr69 A B) → Tm69 Γ A → Tm69 Γ B;app69 = λ t u Tm69 var69 lam69 app69 → app69 _ _ _ (t Tm69 var69 lam69 app69) (u Tm69 var69 lam69 app69) v069 : ∀{Γ A} → Tm69 (snoc69 Γ A) A;v069 = var69 vz69 v169 : ∀{Γ A B} → Tm69 (snoc69 (snoc69 Γ A) B) A;v169 = var69 (vs69 vz69) v269 : ∀{Γ A B C} → Tm69 (snoc69 (snoc69 (snoc69 Γ A) B) C) A;v269 = var69 (vs69 (vs69 vz69)) v369 : ∀{Γ A B C D} → Tm69 (snoc69 (snoc69 (snoc69 (snoc69 Γ A) B) C) D) A;v369 = var69 (vs69 (vs69 (vs69 vz69))) v469 : ∀{Γ A B C D E} → Tm69 (snoc69 (snoc69 (snoc69 (snoc69 (snoc69 Γ A) B) C) D) E) A;v469 = var69 (vs69 (vs69 (vs69 (vs69 vz69)))) test69 : ∀{Γ A} → Tm69 Γ (arr69 (arr69 A A) (arr69 A A));test69 = lam69 (lam69 (app69 v169 (app69 v169 (app69 v169 (app69 v169 (app69 v169 (app69 v169 v069))))))) {-# OPTIONS --type-in-type #-} Ty70 : Set; Ty70 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι70 : Ty70; ι70 = λ _ ι70 _ → ι70 arr70 : Ty70 → Ty70 → Ty70; arr70 = λ A B Ty70 ι70 arr70 → arr70 (A Ty70 ι70 arr70) (B Ty70 ι70 arr70) Con70 : Set;Con70 = (Con70 : Set) (nil : Con70) (snoc : Con70 → Ty70 → Con70) → Con70 nil70 : Con70;nil70 = λ Con70 nil70 snoc → nil70 snoc70 : Con70 → Ty70 → Con70;snoc70 = λ Γ A Con70 nil70 snoc70 → snoc70 (Γ Con70 nil70 snoc70) A Var70 : Con70 → Ty70 → Set;Var70 = λ Γ A → (Var70 : Con70 → Ty70 → Set) (vz : (Γ : _)(A : _) → Var70 (snoc70 Γ A) A) (vs : (Γ : _)(B A : _) → Var70 Γ A → Var70 (snoc70 Γ B) A) → Var70 Γ A vz70 : ∀{Γ A} → Var70 (snoc70 Γ A) A;vz70 = λ Var70 vz70 vs → vz70 _ _ vs70 : ∀{Γ B A} → Var70 Γ A → Var70 (snoc70 Γ B) A;vs70 = λ x Var70 vz70 vs70 → vs70 _ _ _ (x Var70 vz70 vs70) Tm70 : Con70 → Ty70 → Set;Tm70 = λ Γ A → (Tm70 : Con70 → Ty70 → Set) (var : (Γ : _) (A : _) → Var70 Γ A → Tm70 Γ A) (lam : (Γ : _) (A B : _) → Tm70 (snoc70 Γ A) B → Tm70 Γ (arr70 A B)) (app : (Γ : _) (A B : _) → Tm70 Γ (arr70 A B) → Tm70 Γ A → Tm70 Γ B) → Tm70 Γ A var70 : ∀{Γ A} → Var70 Γ A → Tm70 Γ A;var70 = λ x Tm70 var70 lam app → var70 _ _ x lam70 : ∀{Γ A B} → Tm70 (snoc70 Γ A) B → Tm70 Γ (arr70 A B);lam70 = λ t Tm70 var70 lam70 app → lam70 _ _ _ (t Tm70 var70 lam70 app) app70 : ∀{Γ A B} → Tm70 Γ (arr70 A B) → Tm70 Γ A → Tm70 Γ B;app70 = λ t u Tm70 var70 lam70 app70 → app70 _ _ _ (t Tm70 var70 lam70 app70) (u Tm70 var70 lam70 app70) v070 : ∀{Γ A} → Tm70 (snoc70 Γ A) A;v070 = var70 vz70 v170 : ∀{Γ A B} → Tm70 (snoc70 (snoc70 Γ A) B) A;v170 = var70 (vs70 vz70) v270 : ∀{Γ A B C} → Tm70 (snoc70 (snoc70 (snoc70 Γ A) B) C) A;v270 = var70 (vs70 (vs70 vz70)) v370 : ∀{Γ A B C D} → Tm70 (snoc70 (snoc70 (snoc70 (snoc70 Γ A) B) C) D) A;v370 = var70 (vs70 (vs70 (vs70 vz70))) v470 : ∀{Γ A B C D E} → Tm70 (snoc70 (snoc70 (snoc70 (snoc70 (snoc70 Γ A) B) C) D) E) A;v470 = var70 (vs70 (vs70 (vs70 (vs70 vz70)))) test70 : ∀{Γ A} → Tm70 Γ (arr70 (arr70 A A) (arr70 A A));test70 = lam70 (lam70 (app70 v170 (app70 v170 (app70 v170 (app70 v170 (app70 v170 (app70 v170 v070))))))) {-# OPTIONS --type-in-type #-} Ty71 : Set; Ty71 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι71 : Ty71; ι71 = λ _ ι71 _ → ι71 arr71 : Ty71 → Ty71 → Ty71; arr71 = λ A B Ty71 ι71 arr71 → arr71 (A Ty71 ι71 arr71) (B Ty71 ι71 arr71) Con71 : Set;Con71 = (Con71 : Set) (nil : Con71) (snoc : Con71 → Ty71 → Con71) → Con71 nil71 : Con71;nil71 = λ Con71 nil71 snoc → nil71 snoc71 : Con71 → Ty71 → Con71;snoc71 = λ Γ A Con71 nil71 snoc71 → snoc71 (Γ Con71 nil71 snoc71) A Var71 : Con71 → Ty71 → Set;Var71 = λ Γ A → (Var71 : Con71 → Ty71 → Set) (vz : (Γ : _)(A : _) → Var71 (snoc71 Γ A) A) (vs : (Γ : _)(B A : _) → Var71 Γ A → Var71 (snoc71 Γ B) A) → Var71 Γ A vz71 : ∀{Γ A} → Var71 (snoc71 Γ A) A;vz71 = λ Var71 vz71 vs → vz71 _ _ vs71 : ∀{Γ B A} → Var71 Γ A → Var71 (snoc71 Γ B) A;vs71 = λ x Var71 vz71 vs71 → vs71 _ _ _ (x Var71 vz71 vs71) Tm71 : Con71 → Ty71 → Set;Tm71 = λ Γ A → (Tm71 : Con71 → Ty71 → Set) (var : (Γ : _) (A : _) → Var71 Γ A → Tm71 Γ A) (lam : (Γ : _) (A B : _) → Tm71 (snoc71 Γ A) B → Tm71 Γ (arr71 A B)) (app : (Γ : _) (A B : _) → Tm71 Γ (arr71 A B) → Tm71 Γ A → Tm71 Γ B) → Tm71 Γ A var71 : ∀{Γ A} → Var71 Γ A → Tm71 Γ A;var71 = λ x Tm71 var71 lam app → var71 _ _ x lam71 : ∀{Γ A B} → Tm71 (snoc71 Γ A) B → Tm71 Γ (arr71 A B);lam71 = λ t Tm71 var71 lam71 app → lam71 _ _ _ (t Tm71 var71 lam71 app) app71 : ∀{Γ A B} → Tm71 Γ (arr71 A B) → Tm71 Γ A → Tm71 Γ B;app71 = λ t u Tm71 var71 lam71 app71 → app71 _ _ _ (t Tm71 var71 lam71 app71) (u Tm71 var71 lam71 app71) v071 : ∀{Γ A} → Tm71 (snoc71 Γ A) A;v071 = var71 vz71 v171 : ∀{Γ A B} → Tm71 (snoc71 (snoc71 Γ A) B) A;v171 = var71 (vs71 vz71) v271 : ∀{Γ A B C} → Tm71 (snoc71 (snoc71 (snoc71 Γ A) B) C) A;v271 = var71 (vs71 (vs71 vz71)) v371 : ∀{Γ A B C D} → Tm71 (snoc71 (snoc71 (snoc71 (snoc71 Γ A) B) C) D) A;v371 = var71 (vs71 (vs71 (vs71 vz71))) v471 : ∀{Γ A B C D E} → Tm71 (snoc71 (snoc71 (snoc71 (snoc71 (snoc71 Γ A) B) C) D) E) A;v471 = var71 (vs71 (vs71 (vs71 (vs71 vz71)))) test71 : ∀{Γ A} → Tm71 Γ (arr71 (arr71 A A) (arr71 A A));test71 = lam71 (lam71 (app71 v171 (app71 v171 (app71 v171 (app71 v171 (app71 v171 (app71 v171 v071))))))) {-# OPTIONS --type-in-type #-} Ty72 : Set; Ty72 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι72 : Ty72; ι72 = λ _ ι72 _ → ι72 arr72 : Ty72 → Ty72 → Ty72; arr72 = λ A B Ty72 ι72 arr72 → arr72 (A Ty72 ι72 arr72) (B Ty72 ι72 arr72) Con72 : Set;Con72 = (Con72 : Set) (nil : Con72) (snoc : Con72 → Ty72 → Con72) → Con72 nil72 : Con72;nil72 = λ Con72 nil72 snoc → nil72 snoc72 : Con72 → Ty72 → Con72;snoc72 = λ Γ A Con72 nil72 snoc72 → snoc72 (Γ Con72 nil72 snoc72) A Var72 : Con72 → Ty72 → Set;Var72 = λ Γ A → (Var72 : Con72 → Ty72 → Set) (vz : (Γ : _)(A : _) → Var72 (snoc72 Γ A) A) (vs : (Γ : _)(B A : _) → Var72 Γ A → Var72 (snoc72 Γ B) A) → Var72 Γ A vz72 : ∀{Γ A} → Var72 (snoc72 Γ A) A;vz72 = λ Var72 vz72 vs → vz72 _ _ vs72 : ∀{Γ B A} → Var72 Γ A → Var72 (snoc72 Γ B) A;vs72 = λ x Var72 vz72 vs72 → vs72 _ _ _ (x Var72 vz72 vs72) Tm72 : Con72 → Ty72 → Set;Tm72 = λ Γ A → (Tm72 : Con72 → Ty72 → Set) (var : (Γ : _) (A : _) → Var72 Γ A → Tm72 Γ A) (lam : (Γ : _) (A B : _) → Tm72 (snoc72 Γ A) B → Tm72 Γ (arr72 A B)) (app : (Γ : _) (A B : _) → Tm72 Γ (arr72 A B) → Tm72 Γ A → Tm72 Γ B) → Tm72 Γ A var72 : ∀{Γ A} → Var72 Γ A → Tm72 Γ A;var72 = λ x Tm72 var72 lam app → var72 _ _ x lam72 : ∀{Γ A B} → Tm72 (snoc72 Γ A) B → Tm72 Γ (arr72 A B);lam72 = λ t Tm72 var72 lam72 app → lam72 _ _ _ (t Tm72 var72 lam72 app) app72 : ∀{Γ A B} → Tm72 Γ (arr72 A B) → Tm72 Γ A → Tm72 Γ B;app72 = λ t u Tm72 var72 lam72 app72 → app72 _ _ _ (t Tm72 var72 lam72 app72) (u Tm72 var72 lam72 app72) v072 : ∀{Γ A} → Tm72 (snoc72 Γ A) A;v072 = var72 vz72 v172 : ∀{Γ A B} → Tm72 (snoc72 (snoc72 Γ A) B) A;v172 = var72 (vs72 vz72) v272 : ∀{Γ A B C} → Tm72 (snoc72 (snoc72 (snoc72 Γ A) B) C) A;v272 = var72 (vs72 (vs72 vz72)) v372 : ∀{Γ A B C D} → Tm72 (snoc72 (snoc72 (snoc72 (snoc72 Γ A) B) C) D) A;v372 = var72 (vs72 (vs72 (vs72 vz72))) v472 : ∀{Γ A B C D E} → Tm72 (snoc72 (snoc72 (snoc72 (snoc72 (snoc72 Γ A) B) C) D) E) A;v472 = var72 (vs72 (vs72 (vs72 (vs72 vz72)))) test72 : ∀{Γ A} → Tm72 Γ (arr72 (arr72 A A) (arr72 A A));test72 = lam72 (lam72 (app72 v172 (app72 v172 (app72 v172 (app72 v172 (app72 v172 (app72 v172 v072))))))) {-# OPTIONS --type-in-type #-} Ty73 : Set; Ty73 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι73 : Ty73; ι73 = λ _ ι73 _ → ι73 arr73 : Ty73 → Ty73 → Ty73; arr73 = λ A B Ty73 ι73 arr73 → arr73 (A Ty73 ι73 arr73) (B Ty73 ι73 arr73) Con73 : Set;Con73 = (Con73 : Set) (nil : Con73) (snoc : Con73 → Ty73 → Con73) → Con73 nil73 : Con73;nil73 = λ Con73 nil73 snoc → nil73 snoc73 : Con73 → Ty73 → Con73;snoc73 = λ Γ A Con73 nil73 snoc73 → snoc73 (Γ Con73 nil73 snoc73) A Var73 : Con73 → Ty73 → Set;Var73 = λ Γ A → (Var73 : Con73 → Ty73 → Set) (vz : (Γ : _)(A : _) → Var73 (snoc73 Γ A) A) (vs : (Γ : _)(B A : _) → Var73 Γ A → Var73 (snoc73 Γ B) A) → Var73 Γ A vz73 : ∀{Γ A} → Var73 (snoc73 Γ A) A;vz73 = λ Var73 vz73 vs → vz73 _ _ vs73 : ∀{Γ B A} → Var73 Γ A → Var73 (snoc73 Γ B) A;vs73 = λ x Var73 vz73 vs73 → vs73 _ _ _ (x Var73 vz73 vs73) Tm73 : Con73 → Ty73 → Set;Tm73 = λ Γ A → (Tm73 : Con73 → Ty73 → Set) (var : (Γ : _) (A : _) → Var73 Γ A → Tm73 Γ A) (lam : (Γ : _) (A B : _) → Tm73 (snoc73 Γ A) B → Tm73 Γ (arr73 A B)) (app : (Γ : _) (A B : _) → Tm73 Γ (arr73 A B) → Tm73 Γ A → Tm73 Γ B) → Tm73 Γ A var73 : ∀{Γ A} → Var73 Γ A → Tm73 Γ A;var73 = λ x Tm73 var73 lam app → var73 _ _ x lam73 : ∀{Γ A B} → Tm73 (snoc73 Γ A) B → Tm73 Γ (arr73 A B);lam73 = λ t Tm73 var73 lam73 app → lam73 _ _ _ (t Tm73 var73 lam73 app) app73 : ∀{Γ A B} → Tm73 Γ (arr73 A B) → Tm73 Γ A → Tm73 Γ B;app73 = λ t u Tm73 var73 lam73 app73 → app73 _ _ _ (t Tm73 var73 lam73 app73) (u Tm73 var73 lam73 app73) v073 : ∀{Γ A} → Tm73 (snoc73 Γ A) A;v073 = var73 vz73 v173 : ∀{Γ A B} → Tm73 (snoc73 (snoc73 Γ A) B) A;v173 = var73 (vs73 vz73) v273 : ∀{Γ A B C} → Tm73 (snoc73 (snoc73 (snoc73 Γ A) B) C) A;v273 = var73 (vs73 (vs73 vz73)) v373 : ∀{Γ A B C D} → Tm73 (snoc73 (snoc73 (snoc73 (snoc73 Γ A) B) C) D) A;v373 = var73 (vs73 (vs73 (vs73 vz73))) v473 : ∀{Γ A B C D E} → Tm73 (snoc73 (snoc73 (snoc73 (snoc73 (snoc73 Γ A) B) C) D) E) A;v473 = var73 (vs73 (vs73 (vs73 (vs73 vz73)))) test73 : ∀{Γ A} → Tm73 Γ (arr73 (arr73 A A) (arr73 A A));test73 = lam73 (lam73 (app73 v173 (app73 v173 (app73 v173 (app73 v173 (app73 v173 (app73 v173 v073))))))) {-# OPTIONS --type-in-type #-} Ty74 : Set; Ty74 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι74 : Ty74; ι74 = λ _ ι74 _ → ι74 arr74 : Ty74 → Ty74 → Ty74; arr74 = λ A B Ty74 ι74 arr74 → arr74 (A Ty74 ι74 arr74) (B Ty74 ι74 arr74) Con74 : Set;Con74 = (Con74 : Set) (nil : Con74) (snoc : Con74 → Ty74 → Con74) → Con74 nil74 : Con74;nil74 = λ Con74 nil74 snoc → nil74 snoc74 : Con74 → Ty74 → Con74;snoc74 = λ Γ A Con74 nil74 snoc74 → snoc74 (Γ Con74 nil74 snoc74) A Var74 : Con74 → Ty74 → Set;Var74 = λ Γ A → (Var74 : Con74 → Ty74 → Set) (vz : (Γ : _)(A : _) → Var74 (snoc74 Γ A) A) (vs : (Γ : _)(B A : _) → Var74 Γ A → Var74 (snoc74 Γ B) A) → Var74 Γ A vz74 : ∀{Γ A} → Var74 (snoc74 Γ A) A;vz74 = λ Var74 vz74 vs → vz74 _ _ vs74 : ∀{Γ B A} → Var74 Γ A → Var74 (snoc74 Γ B) A;vs74 = λ x Var74 vz74 vs74 → vs74 _ _ _ (x Var74 vz74 vs74) Tm74 : Con74 → Ty74 → Set;Tm74 = λ Γ A → (Tm74 : Con74 → Ty74 → Set) (var : (Γ : _) (A : _) → Var74 Γ A → Tm74 Γ A) (lam : (Γ : _) (A B : _) → Tm74 (snoc74 Γ A) B → Tm74 Γ (arr74 A B)) (app : (Γ : _) (A B : _) → Tm74 Γ (arr74 A B) → Tm74 Γ A → Tm74 Γ B) → Tm74 Γ A var74 : ∀{Γ A} → Var74 Γ A → Tm74 Γ A;var74 = λ x Tm74 var74 lam app → var74 _ _ x lam74 : ∀{Γ A B} → Tm74 (snoc74 Γ A) B → Tm74 Γ (arr74 A B);lam74 = λ t Tm74 var74 lam74 app → lam74 _ _ _ (t Tm74 var74 lam74 app) app74 : ∀{Γ A B} → Tm74 Γ (arr74 A B) → Tm74 Γ A → Tm74 Γ B;app74 = λ t u Tm74 var74 lam74 app74 → app74 _ _ _ (t Tm74 var74 lam74 app74) (u Tm74 var74 lam74 app74) v074 : ∀{Γ A} → Tm74 (snoc74 Γ A) A;v074 = var74 vz74 v174 : ∀{Γ A B} → Tm74 (snoc74 (snoc74 Γ A) B) A;v174 = var74 (vs74 vz74) v274 : ∀{Γ A B C} → Tm74 (snoc74 (snoc74 (snoc74 Γ A) B) C) A;v274 = var74 (vs74 (vs74 vz74)) v374 : ∀{Γ A B C D} → Tm74 (snoc74 (snoc74 (snoc74 (snoc74 Γ A) B) C) D) A;v374 = var74 (vs74 (vs74 (vs74 vz74))) v474 : ∀{Γ A B C D E} → Tm74 (snoc74 (snoc74 (snoc74 (snoc74 (snoc74 Γ A) B) C) D) E) A;v474 = var74 (vs74 (vs74 (vs74 (vs74 vz74)))) test74 : ∀{Γ A} → Tm74 Γ (arr74 (arr74 A A) (arr74 A A));test74 = lam74 (lam74 (app74 v174 (app74 v174 (app74 v174 (app74 v174 (app74 v174 (app74 v174 v074))))))) {-# OPTIONS --type-in-type #-} Ty75 : Set; Ty75 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι75 : Ty75; ι75 = λ _ ι75 _ → ι75 arr75 : Ty75 → Ty75 → Ty75; arr75 = λ A B Ty75 ι75 arr75 → arr75 (A Ty75 ι75 arr75) (B Ty75 ι75 arr75) Con75 : Set;Con75 = (Con75 : Set) (nil : Con75) (snoc : Con75 → Ty75 → Con75) → Con75 nil75 : Con75;nil75 = λ Con75 nil75 snoc → nil75 snoc75 : Con75 → Ty75 → Con75;snoc75 = λ Γ A Con75 nil75 snoc75 → snoc75 (Γ Con75 nil75 snoc75) A Var75 : Con75 → Ty75 → Set;Var75 = λ Γ A → (Var75 : Con75 → Ty75 → Set) (vz : (Γ : _)(A : _) → Var75 (snoc75 Γ A) A) (vs : (Γ : _)(B A : _) → Var75 Γ A → Var75 (snoc75 Γ B) A) → Var75 Γ A vz75 : ∀{Γ A} → Var75 (snoc75 Γ A) A;vz75 = λ Var75 vz75 vs → vz75 _ _ vs75 : ∀{Γ B A} → Var75 Γ A → Var75 (snoc75 Γ B) A;vs75 = λ x Var75 vz75 vs75 → vs75 _ _ _ (x Var75 vz75 vs75) Tm75 : Con75 → Ty75 → Set;Tm75 = λ Γ A → (Tm75 : Con75 → Ty75 → Set) (var : (Γ : _) (A : _) → Var75 Γ A → Tm75 Γ A) (lam : (Γ : _) (A B : _) → Tm75 (snoc75 Γ A) B → Tm75 Γ (arr75 A B)) (app : (Γ : _) (A B : _) → Tm75 Γ (arr75 A B) → Tm75 Γ A → Tm75 Γ B) → Tm75 Γ A var75 : ∀{Γ A} → Var75 Γ A → Tm75 Γ A;var75 = λ x Tm75 var75 lam app → var75 _ _ x lam75 : ∀{Γ A B} → Tm75 (snoc75 Γ A) B → Tm75 Γ (arr75 A B);lam75 = λ t Tm75 var75 lam75 app → lam75 _ _ _ (t Tm75 var75 lam75 app) app75 : ∀{Γ A B} → Tm75 Γ (arr75 A B) → Tm75 Γ A → Tm75 Γ B;app75 = λ t u Tm75 var75 lam75 app75 → app75 _ _ _ (t Tm75 var75 lam75 app75) (u Tm75 var75 lam75 app75) v075 : ∀{Γ A} → Tm75 (snoc75 Γ A) A;v075 = var75 vz75 v175 : ∀{Γ A B} → Tm75 (snoc75 (snoc75 Γ A) B) A;v175 = var75 (vs75 vz75) v275 : ∀{Γ A B C} → Tm75 (snoc75 (snoc75 (snoc75 Γ A) B) C) A;v275 = var75 (vs75 (vs75 vz75)) v375 : ∀{Γ A B C D} → Tm75 (snoc75 (snoc75 (snoc75 (snoc75 Γ A) B) C) D) A;v375 = var75 (vs75 (vs75 (vs75 vz75))) v475 : ∀{Γ A B C D E} → Tm75 (snoc75 (snoc75 (snoc75 (snoc75 (snoc75 Γ A) B) C) D) E) A;v475 = var75 (vs75 (vs75 (vs75 (vs75 vz75)))) test75 : ∀{Γ A} → Tm75 Γ (arr75 (arr75 A A) (arr75 A A));test75 = lam75 (lam75 (app75 v175 (app75 v175 (app75 v175 (app75 v175 (app75 v175 (app75 v175 v075))))))) {-# OPTIONS --type-in-type #-} Ty76 : Set; Ty76 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι76 : Ty76; ι76 = λ _ ι76 _ → ι76 arr76 : Ty76 → Ty76 → Ty76; arr76 = λ A B Ty76 ι76 arr76 → arr76 (A Ty76 ι76 arr76) (B Ty76 ι76 arr76) Con76 : Set;Con76 = (Con76 : Set) (nil : Con76) (snoc : Con76 → Ty76 → Con76) → Con76 nil76 : Con76;nil76 = λ Con76 nil76 snoc → nil76 snoc76 : Con76 → Ty76 → Con76;snoc76 = λ Γ A Con76 nil76 snoc76 → snoc76 (Γ Con76 nil76 snoc76) A Var76 : Con76 → Ty76 → Set;Var76 = λ Γ A → (Var76 : Con76 → Ty76 → Set) (vz : (Γ : _)(A : _) → Var76 (snoc76 Γ A) A) (vs : (Γ : _)(B A : _) → Var76 Γ A → Var76 (snoc76 Γ B) A) → Var76 Γ A vz76 : ∀{Γ A} → Var76 (snoc76 Γ A) A;vz76 = λ Var76 vz76 vs → vz76 _ _ vs76 : ∀{Γ B A} → Var76 Γ A → Var76 (snoc76 Γ B) A;vs76 = λ x Var76 vz76 vs76 → vs76 _ _ _ (x Var76 vz76 vs76) Tm76 : Con76 → Ty76 → Set;Tm76 = λ Γ A → (Tm76 : Con76 → Ty76 → Set) (var : (Γ : _) (A : _) → Var76 Γ A → Tm76 Γ A) (lam : (Γ : _) (A B : _) → Tm76 (snoc76 Γ A) B → Tm76 Γ (arr76 A B)) (app : (Γ : _) (A B : _) → Tm76 Γ (arr76 A B) → Tm76 Γ A → Tm76 Γ B) → Tm76 Γ A var76 : ∀{Γ A} → Var76 Γ A → Tm76 Γ A;var76 = λ x Tm76 var76 lam app → var76 _ _ x lam76 : ∀{Γ A B} → Tm76 (snoc76 Γ A) B → Tm76 Γ (arr76 A B);lam76 = λ t Tm76 var76 lam76 app → lam76 _ _ _ (t Tm76 var76 lam76 app) app76 : ∀{Γ A B} → Tm76 Γ (arr76 A B) → Tm76 Γ A → Tm76 Γ B;app76 = λ t u Tm76 var76 lam76 app76 → app76 _ _ _ (t Tm76 var76 lam76 app76) (u Tm76 var76 lam76 app76) v076 : ∀{Γ A} → Tm76 (snoc76 Γ A) A;v076 = var76 vz76 v176 : ∀{Γ A B} → Tm76 (snoc76 (snoc76 Γ A) B) A;v176 = var76 (vs76 vz76) v276 : ∀{Γ A B C} → Tm76 (snoc76 (snoc76 (snoc76 Γ A) B) C) A;v276 = var76 (vs76 (vs76 vz76)) v376 : ∀{Γ A B C D} → Tm76 (snoc76 (snoc76 (snoc76 (snoc76 Γ A) B) C) D) A;v376 = var76 (vs76 (vs76 (vs76 vz76))) v476 : ∀{Γ A B C D E} → Tm76 (snoc76 (snoc76 (snoc76 (snoc76 (snoc76 Γ A) B) C) D) E) A;v476 = var76 (vs76 (vs76 (vs76 (vs76 vz76)))) test76 : ∀{Γ A} → Tm76 Γ (arr76 (arr76 A A) (arr76 A A));test76 = lam76 (lam76 (app76 v176 (app76 v176 (app76 v176 (app76 v176 (app76 v176 (app76 v176 v076))))))) {-# OPTIONS --type-in-type #-} Ty77 : Set; Ty77 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι77 : Ty77; ι77 = λ _ ι77 _ → ι77 arr77 : Ty77 → Ty77 → Ty77; arr77 = λ A B Ty77 ι77 arr77 → arr77 (A Ty77 ι77 arr77) (B Ty77 ι77 arr77) Con77 : Set;Con77 = (Con77 : Set) (nil : Con77) (snoc : Con77 → Ty77 → Con77) → Con77 nil77 : Con77;nil77 = λ Con77 nil77 snoc → nil77 snoc77 : Con77 → Ty77 → Con77;snoc77 = λ Γ A Con77 nil77 snoc77 → snoc77 (Γ Con77 nil77 snoc77) A Var77 : Con77 → Ty77 → Set;Var77 = λ Γ A → (Var77 : Con77 → Ty77 → Set) (vz : (Γ : _)(A : _) → Var77 (snoc77 Γ A) A) (vs : (Γ : _)(B A : _) → Var77 Γ A → Var77 (snoc77 Γ B) A) → Var77 Γ A vz77 : ∀{Γ A} → Var77 (snoc77 Γ A) A;vz77 = λ Var77 vz77 vs → vz77 _ _ vs77 : ∀{Γ B A} → Var77 Γ A → Var77 (snoc77 Γ B) A;vs77 = λ x Var77 vz77 vs77 → vs77 _ _ _ (x Var77 vz77 vs77) Tm77 : Con77 → Ty77 → Set;Tm77 = λ Γ A → (Tm77 : Con77 → Ty77 → Set) (var : (Γ : _) (A : _) → Var77 Γ A → Tm77 Γ A) (lam : (Γ : _) (A B : _) → Tm77 (snoc77 Γ A) B → Tm77 Γ (arr77 A B)) (app : (Γ : _) (A B : _) → Tm77 Γ (arr77 A B) → Tm77 Γ A → Tm77 Γ B) → Tm77 Γ A var77 : ∀{Γ A} → Var77 Γ A → Tm77 Γ A;var77 = λ x Tm77 var77 lam app → var77 _ _ x lam77 : ∀{Γ A B} → Tm77 (snoc77 Γ A) B → Tm77 Γ (arr77 A B);lam77 = λ t Tm77 var77 lam77 app → lam77 _ _ _ (t Tm77 var77 lam77 app) app77 : ∀{Γ A B} → Tm77 Γ (arr77 A B) → Tm77 Γ A → Tm77 Γ B;app77 = λ t u Tm77 var77 lam77 app77 → app77 _ _ _ (t Tm77 var77 lam77 app77) (u Tm77 var77 lam77 app77) v077 : ∀{Γ A} → Tm77 (snoc77 Γ A) A;v077 = var77 vz77 v177 : ∀{Γ A B} → Tm77 (snoc77 (snoc77 Γ A) B) A;v177 = var77 (vs77 vz77) v277 : ∀{Γ A B C} → Tm77 (snoc77 (snoc77 (snoc77 Γ A) B) C) A;v277 = var77 (vs77 (vs77 vz77)) v377 : ∀{Γ A B C D} → Tm77 (snoc77 (snoc77 (snoc77 (snoc77 Γ A) B) C) D) A;v377 = var77 (vs77 (vs77 (vs77 vz77))) v477 : ∀{Γ A B C D E} → Tm77 (snoc77 (snoc77 (snoc77 (snoc77 (snoc77 Γ A) B) C) D) E) A;v477 = var77 (vs77 (vs77 (vs77 (vs77 vz77)))) test77 : ∀{Γ A} → Tm77 Γ (arr77 (arr77 A A) (arr77 A A));test77 = lam77 (lam77 (app77 v177 (app77 v177 (app77 v177 (app77 v177 (app77 v177 (app77 v177 v077))))))) {-# OPTIONS --type-in-type #-} Ty78 : Set; Ty78 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι78 : Ty78; ι78 = λ _ ι78 _ → ι78 arr78 : Ty78 → Ty78 → Ty78; arr78 = λ A B Ty78 ι78 arr78 → arr78 (A Ty78 ι78 arr78) (B Ty78 ι78 arr78) Con78 : Set;Con78 = (Con78 : Set) (nil : Con78) (snoc : Con78 → Ty78 → Con78) → Con78 nil78 : Con78;nil78 = λ Con78 nil78 snoc → nil78 snoc78 : Con78 → Ty78 → Con78;snoc78 = λ Γ A Con78 nil78 snoc78 → snoc78 (Γ Con78 nil78 snoc78) A Var78 : Con78 → Ty78 → Set;Var78 = λ Γ A → (Var78 : Con78 → Ty78 → Set) (vz : (Γ : _)(A : _) → Var78 (snoc78 Γ A) A) (vs : (Γ : _)(B A : _) → Var78 Γ A → Var78 (snoc78 Γ B) A) → Var78 Γ A vz78 : ∀{Γ A} → Var78 (snoc78 Γ A) A;vz78 = λ Var78 vz78 vs → vz78 _ _ vs78 : ∀{Γ B A} → Var78 Γ A → Var78 (snoc78 Γ B) A;vs78 = λ x Var78 vz78 vs78 → vs78 _ _ _ (x Var78 vz78 vs78) Tm78 : Con78 → Ty78 → Set;Tm78 = λ Γ A → (Tm78 : Con78 → Ty78 → Set) (var : (Γ : _) (A : _) → Var78 Γ A → Tm78 Γ A) (lam : (Γ : _) (A B : _) → Tm78 (snoc78 Γ A) B → Tm78 Γ (arr78 A B)) (app : (Γ : _) (A B : _) → Tm78 Γ (arr78 A B) → Tm78 Γ A → Tm78 Γ B) → Tm78 Γ A var78 : ∀{Γ A} → Var78 Γ A → Tm78 Γ A;var78 = λ x Tm78 var78 lam app → var78 _ _ x lam78 : ∀{Γ A B} → Tm78 (snoc78 Γ A) B → Tm78 Γ (arr78 A B);lam78 = λ t Tm78 var78 lam78 app → lam78 _ _ _ (t Tm78 var78 lam78 app) app78 : ∀{Γ A B} → Tm78 Γ (arr78 A B) → Tm78 Γ A → Tm78 Γ B;app78 = λ t u Tm78 var78 lam78 app78 → app78 _ _ _ (t Tm78 var78 lam78 app78) (u Tm78 var78 lam78 app78) v078 : ∀{Γ A} → Tm78 (snoc78 Γ A) A;v078 = var78 vz78 v178 : ∀{Γ A B} → Tm78 (snoc78 (snoc78 Γ A) B) A;v178 = var78 (vs78 vz78) v278 : ∀{Γ A B C} → Tm78 (snoc78 (snoc78 (snoc78 Γ A) B) C) A;v278 = var78 (vs78 (vs78 vz78)) v378 : ∀{Γ A B C D} → Tm78 (snoc78 (snoc78 (snoc78 (snoc78 Γ A) B) C) D) A;v378 = var78 (vs78 (vs78 (vs78 vz78))) v478 : ∀{Γ A B C D E} → Tm78 (snoc78 (snoc78 (snoc78 (snoc78 (snoc78 Γ A) B) C) D) E) A;v478 = var78 (vs78 (vs78 (vs78 (vs78 vz78)))) test78 : ∀{Γ A} → Tm78 Γ (arr78 (arr78 A A) (arr78 A A));test78 = lam78 (lam78 (app78 v178 (app78 v178 (app78 v178 (app78 v178 (app78 v178 (app78 v178 v078))))))) {-# OPTIONS --type-in-type #-} Ty79 : Set; Ty79 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι79 : Ty79; ι79 = λ _ ι79 _ → ι79 arr79 : Ty79 → Ty79 → Ty79; arr79 = λ A B Ty79 ι79 arr79 → arr79 (A Ty79 ι79 arr79) (B Ty79 ι79 arr79) Con79 : Set;Con79 = (Con79 : Set) (nil : Con79) (snoc : Con79 → Ty79 → Con79) → Con79 nil79 : Con79;nil79 = λ Con79 nil79 snoc → nil79 snoc79 : Con79 → Ty79 → Con79;snoc79 = λ Γ A Con79 nil79 snoc79 → snoc79 (Γ Con79 nil79 snoc79) A Var79 : Con79 → Ty79 → Set;Var79 = λ Γ A → (Var79 : Con79 → Ty79 → Set) (vz : (Γ : _)(A : _) → Var79 (snoc79 Γ A) A) (vs : (Γ : _)(B A : _) → Var79 Γ A → Var79 (snoc79 Γ B) A) → Var79 Γ A vz79 : ∀{Γ A} → Var79 (snoc79 Γ A) A;vz79 = λ Var79 vz79 vs → vz79 _ _ vs79 : ∀{Γ B A} → Var79 Γ A → Var79 (snoc79 Γ B) A;vs79 = λ x Var79 vz79 vs79 → vs79 _ _ _ (x Var79 vz79 vs79) Tm79 : Con79 → Ty79 → Set;Tm79 = λ Γ A → (Tm79 : Con79 → Ty79 → Set) (var : (Γ : _) (A : _) → Var79 Γ A → Tm79 Γ A) (lam : (Γ : _) (A B : _) → Tm79 (snoc79 Γ A) B → Tm79 Γ (arr79 A B)) (app : (Γ : _) (A B : _) → Tm79 Γ (arr79 A B) → Tm79 Γ A → Tm79 Γ B) → Tm79 Γ A var79 : ∀{Γ A} → Var79 Γ A → Tm79 Γ A;var79 = λ x Tm79 var79 lam app → var79 _ _ x lam79 : ∀{Γ A B} → Tm79 (snoc79 Γ A) B → Tm79 Γ (arr79 A B);lam79 = λ t Tm79 var79 lam79 app → lam79 _ _ _ (t Tm79 var79 lam79 app) app79 : ∀{Γ A B} → Tm79 Γ (arr79 A B) → Tm79 Γ A → Tm79 Γ B;app79 = λ t u Tm79 var79 lam79 app79 → app79 _ _ _ (t Tm79 var79 lam79 app79) (u Tm79 var79 lam79 app79) v079 : ∀{Γ A} → Tm79 (snoc79 Γ A) A;v079 = var79 vz79 v179 : ∀{Γ A B} → Tm79 (snoc79 (snoc79 Γ A) B) A;v179 = var79 (vs79 vz79) v279 : ∀{Γ A B C} → Tm79 (snoc79 (snoc79 (snoc79 Γ A) B) C) A;v279 = var79 (vs79 (vs79 vz79)) v379 : ∀{Γ A B C D} → Tm79 (snoc79 (snoc79 (snoc79 (snoc79 Γ A) B) C) D) A;v379 = var79 (vs79 (vs79 (vs79 vz79))) v479 : ∀{Γ A B C D E} → Tm79 (snoc79 (snoc79 (snoc79 (snoc79 (snoc79 Γ A) B) C) D) E) A;v479 = var79 (vs79 (vs79 (vs79 (vs79 vz79)))) test79 : ∀{Γ A} → Tm79 Γ (arr79 (arr79 A A) (arr79 A A));test79 = lam79 (lam79 (app79 v179 (app79 v179 (app79 v179 (app79 v179 (app79 v179 (app79 v179 v079))))))) {-# OPTIONS --type-in-type #-} Ty80 : Set; Ty80 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι80 : Ty80; ι80 = λ _ ι80 _ → ι80 arr80 : Ty80 → Ty80 → Ty80; arr80 = λ A B Ty80 ι80 arr80 → arr80 (A Ty80 ι80 arr80) (B Ty80 ι80 arr80) Con80 : Set;Con80 = (Con80 : Set) (nil : Con80) (snoc : Con80 → Ty80 → Con80) → Con80 nil80 : Con80;nil80 = λ Con80 nil80 snoc → nil80 snoc80 : Con80 → Ty80 → Con80;snoc80 = λ Γ A Con80 nil80 snoc80 → snoc80 (Γ Con80 nil80 snoc80) A Var80 : Con80 → Ty80 → Set;Var80 = λ Γ A → (Var80 : Con80 → Ty80 → Set) (vz : (Γ : _)(A : _) → Var80 (snoc80 Γ A) A) (vs : (Γ : _)(B A : _) → Var80 Γ A → Var80 (snoc80 Γ B) A) → Var80 Γ A vz80 : ∀{Γ A} → Var80 (snoc80 Γ A) A;vz80 = λ Var80 vz80 vs → vz80 _ _ vs80 : ∀{Γ B A} → Var80 Γ A → Var80 (snoc80 Γ B) A;vs80 = λ x Var80 vz80 vs80 → vs80 _ _ _ (x Var80 vz80 vs80) Tm80 : Con80 → Ty80 → Set;Tm80 = λ Γ A → (Tm80 : Con80 → Ty80 → Set) (var : (Γ : _) (A : _) → Var80 Γ A → Tm80 Γ A) (lam : (Γ : _) (A B : _) → Tm80 (snoc80 Γ A) B → Tm80 Γ (arr80 A B)) (app : (Γ : _) (A B : _) → Tm80 Γ (arr80 A B) → Tm80 Γ A → Tm80 Γ B) → Tm80 Γ A var80 : ∀{Γ A} → Var80 Γ A → Tm80 Γ A;var80 = λ x Tm80 var80 lam app → var80 _ _ x lam80 : ∀{Γ A B} → Tm80 (snoc80 Γ A) B → Tm80 Γ (arr80 A B);lam80 = λ t Tm80 var80 lam80 app → lam80 _ _ _ (t Tm80 var80 lam80 app) app80 : ∀{Γ A B} → Tm80 Γ (arr80 A B) → Tm80 Γ A → Tm80 Γ B;app80 = λ t u Tm80 var80 lam80 app80 → app80 _ _ _ (t Tm80 var80 lam80 app80) (u Tm80 var80 lam80 app80) v080 : ∀{Γ A} → Tm80 (snoc80 Γ A) A;v080 = var80 vz80 v180 : ∀{Γ A B} → Tm80 (snoc80 (snoc80 Γ A) B) A;v180 = var80 (vs80 vz80) v280 : ∀{Γ A B C} → Tm80 (snoc80 (snoc80 (snoc80 Γ A) B) C) A;v280 = var80 (vs80 (vs80 vz80)) v380 : ∀{Γ A B C D} → Tm80 (snoc80 (snoc80 (snoc80 (snoc80 Γ A) B) C) D) A;v380 = var80 (vs80 (vs80 (vs80 vz80))) v480 : ∀{Γ A B C D E} → Tm80 (snoc80 (snoc80 (snoc80 (snoc80 (snoc80 Γ A) B) C) D) E) A;v480 = var80 (vs80 (vs80 (vs80 (vs80 vz80)))) test80 : ∀{Γ A} → Tm80 Γ (arr80 (arr80 A A) (arr80 A A));test80 = lam80 (lam80 (app80 v180 (app80 v180 (app80 v180 (app80 v180 (app80 v180 (app80 v180 v080))))))) {-# OPTIONS --type-in-type #-} Ty81 : Set; Ty81 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι81 : Ty81; ι81 = λ _ ι81 _ → ι81 arr81 : Ty81 → Ty81 → Ty81; arr81 = λ A B Ty81 ι81 arr81 → arr81 (A Ty81 ι81 arr81) (B Ty81 ι81 arr81) Con81 : Set;Con81 = (Con81 : Set) (nil : Con81) (snoc : Con81 → Ty81 → Con81) → Con81 nil81 : Con81;nil81 = λ Con81 nil81 snoc → nil81 snoc81 : Con81 → Ty81 → Con81;snoc81 = λ Γ A Con81 nil81 snoc81 → snoc81 (Γ Con81 nil81 snoc81) A Var81 : Con81 → Ty81 → Set;Var81 = λ Γ A → (Var81 : Con81 → Ty81 → Set) (vz : (Γ : _)(A : _) → Var81 (snoc81 Γ A) A) (vs : (Γ : _)(B A : _) → Var81 Γ A → Var81 (snoc81 Γ B) A) → Var81 Γ A vz81 : ∀{Γ A} → Var81 (snoc81 Γ A) A;vz81 = λ Var81 vz81 vs → vz81 _ _ vs81 : ∀{Γ B A} → Var81 Γ A → Var81 (snoc81 Γ B) A;vs81 = λ x Var81 vz81 vs81 → vs81 _ _ _ (x Var81 vz81 vs81) Tm81 : Con81 → Ty81 → Set;Tm81 = λ Γ A → (Tm81 : Con81 → Ty81 → Set) (var : (Γ : _) (A : _) → Var81 Γ A → Tm81 Γ A) (lam : (Γ : _) (A B : _) → Tm81 (snoc81 Γ A) B → Tm81 Γ (arr81 A B)) (app : (Γ : _) (A B : _) → Tm81 Γ (arr81 A B) → Tm81 Γ A → Tm81 Γ B) → Tm81 Γ A var81 : ∀{Γ A} → Var81 Γ A → Tm81 Γ A;var81 = λ x Tm81 var81 lam app → var81 _ _ x lam81 : ∀{Γ A B} → Tm81 (snoc81 Γ A) B → Tm81 Γ (arr81 A B);lam81 = λ t Tm81 var81 lam81 app → lam81 _ _ _ (t Tm81 var81 lam81 app) app81 : ∀{Γ A B} → Tm81 Γ (arr81 A B) → Tm81 Γ A → Tm81 Γ B;app81 = λ t u Tm81 var81 lam81 app81 → app81 _ _ _ (t Tm81 var81 lam81 app81) (u Tm81 var81 lam81 app81) v081 : ∀{Γ A} → Tm81 (snoc81 Γ A) A;v081 = var81 vz81 v181 : ∀{Γ A B} → Tm81 (snoc81 (snoc81 Γ A) B) A;v181 = var81 (vs81 vz81) v281 : ∀{Γ A B C} → Tm81 (snoc81 (snoc81 (snoc81 Γ A) B) C) A;v281 = var81 (vs81 (vs81 vz81)) v381 : ∀{Γ A B C D} → Tm81 (snoc81 (snoc81 (snoc81 (snoc81 Γ A) B) C) D) A;v381 = var81 (vs81 (vs81 (vs81 vz81))) v481 : ∀{Γ A B C D E} → Tm81 (snoc81 (snoc81 (snoc81 (snoc81 (snoc81 Γ A) B) C) D) E) A;v481 = var81 (vs81 (vs81 (vs81 (vs81 vz81)))) test81 : ∀{Γ A} → Tm81 Γ (arr81 (arr81 A A) (arr81 A A));test81 = lam81 (lam81 (app81 v181 (app81 v181 (app81 v181 (app81 v181 (app81 v181 (app81 v181 v081))))))) {-# OPTIONS --type-in-type #-} Ty82 : Set; Ty82 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι82 : Ty82; ι82 = λ _ ι82 _ → ι82 arr82 : Ty82 → Ty82 → Ty82; arr82 = λ A B Ty82 ι82 arr82 → arr82 (A Ty82 ι82 arr82) (B Ty82 ι82 arr82) Con82 : Set;Con82 = (Con82 : Set) (nil : Con82) (snoc : Con82 → Ty82 → Con82) → Con82 nil82 : Con82;nil82 = λ Con82 nil82 snoc → nil82 snoc82 : Con82 → Ty82 → Con82;snoc82 = λ Γ A Con82 nil82 snoc82 → snoc82 (Γ Con82 nil82 snoc82) A Var82 : Con82 → Ty82 → Set;Var82 = λ Γ A → (Var82 : Con82 → Ty82 → Set) (vz : (Γ : _)(A : _) → Var82 (snoc82 Γ A) A) (vs : (Γ : _)(B A : _) → Var82 Γ A → Var82 (snoc82 Γ B) A) → Var82 Γ A vz82 : ∀{Γ A} → Var82 (snoc82 Γ A) A;vz82 = λ Var82 vz82 vs → vz82 _ _ vs82 : ∀{Γ B A} → Var82 Γ A → Var82 (snoc82 Γ B) A;vs82 = λ x Var82 vz82 vs82 → vs82 _ _ _ (x Var82 vz82 vs82) Tm82 : Con82 → Ty82 → Set;Tm82 = λ Γ A → (Tm82 : Con82 → Ty82 → Set) (var : (Γ : _) (A : _) → Var82 Γ A → Tm82 Γ A) (lam : (Γ : _) (A B : _) → Tm82 (snoc82 Γ A) B → Tm82 Γ (arr82 A B)) (app : (Γ : _) (A B : _) → Tm82 Γ (arr82 A B) → Tm82 Γ A → Tm82 Γ B) → Tm82 Γ A var82 : ∀{Γ A} → Var82 Γ A → Tm82 Γ A;var82 = λ x Tm82 var82 lam app → var82 _ _ x lam82 : ∀{Γ A B} → Tm82 (snoc82 Γ A) B → Tm82 Γ (arr82 A B);lam82 = λ t Tm82 var82 lam82 app → lam82 _ _ _ (t Tm82 var82 lam82 app) app82 : ∀{Γ A B} → Tm82 Γ (arr82 A B) → Tm82 Γ A → Tm82 Γ B;app82 = λ t u Tm82 var82 lam82 app82 → app82 _ _ _ (t Tm82 var82 lam82 app82) (u Tm82 var82 lam82 app82) v082 : ∀{Γ A} → Tm82 (snoc82 Γ A) A;v082 = var82 vz82 v182 : ∀{Γ A B} → Tm82 (snoc82 (snoc82 Γ A) B) A;v182 = var82 (vs82 vz82) v282 : ∀{Γ A B C} → Tm82 (snoc82 (snoc82 (snoc82 Γ A) B) C) A;v282 = var82 (vs82 (vs82 vz82)) v382 : ∀{Γ A B C D} → Tm82 (snoc82 (snoc82 (snoc82 (snoc82 Γ A) B) C) D) A;v382 = var82 (vs82 (vs82 (vs82 vz82))) v482 : ∀{Γ A B C D E} → Tm82 (snoc82 (snoc82 (snoc82 (snoc82 (snoc82 Γ A) B) C) D) E) A;v482 = var82 (vs82 (vs82 (vs82 (vs82 vz82)))) test82 : ∀{Γ A} → Tm82 Γ (arr82 (arr82 A A) (arr82 A A));test82 = lam82 (lam82 (app82 v182 (app82 v182 (app82 v182 (app82 v182 (app82 v182 (app82 v182 v082))))))) {-# OPTIONS --type-in-type #-} Ty83 : Set; Ty83 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι83 : Ty83; ι83 = λ _ ι83 _ → ι83 arr83 : Ty83 → Ty83 → Ty83; arr83 = λ A B Ty83 ι83 arr83 → arr83 (A Ty83 ι83 arr83) (B Ty83 ι83 arr83) Con83 : Set;Con83 = (Con83 : Set) (nil : Con83) (snoc : Con83 → Ty83 → Con83) → Con83 nil83 : Con83;nil83 = λ Con83 nil83 snoc → nil83 snoc83 : Con83 → Ty83 → Con83;snoc83 = λ Γ A Con83 nil83 snoc83 → snoc83 (Γ Con83 nil83 snoc83) A Var83 : Con83 → Ty83 → Set;Var83 = λ Γ A → (Var83 : Con83 → Ty83 → Set) (vz : (Γ : _)(A : _) → Var83 (snoc83 Γ A) A) (vs : (Γ : _)(B A : _) → Var83 Γ A → Var83 (snoc83 Γ B) A) → Var83 Γ A vz83 : ∀{Γ A} → Var83 (snoc83 Γ A) A;vz83 = λ Var83 vz83 vs → vz83 _ _ vs83 : ∀{Γ B A} → Var83 Γ A → Var83 (snoc83 Γ B) A;vs83 = λ x Var83 vz83 vs83 → vs83 _ _ _ (x Var83 vz83 vs83) Tm83 : Con83 → Ty83 → Set;Tm83 = λ Γ A → (Tm83 : Con83 → Ty83 → Set) (var : (Γ : _) (A : _) → Var83 Γ A → Tm83 Γ A) (lam : (Γ : _) (A B : _) → Tm83 (snoc83 Γ A) B → Tm83 Γ (arr83 A B)) (app : (Γ : _) (A B : _) → Tm83 Γ (arr83 A B) → Tm83 Γ A → Tm83 Γ B) → Tm83 Γ A var83 : ∀{Γ A} → Var83 Γ A → Tm83 Γ A;var83 = λ x Tm83 var83 lam app → var83 _ _ x lam83 : ∀{Γ A B} → Tm83 (snoc83 Γ A) B → Tm83 Γ (arr83 A B);lam83 = λ t Tm83 var83 lam83 app → lam83 _ _ _ (t Tm83 var83 lam83 app) app83 : ∀{Γ A B} → Tm83 Γ (arr83 A B) → Tm83 Γ A → Tm83 Γ B;app83 = λ t u Tm83 var83 lam83 app83 → app83 _ _ _ (t Tm83 var83 lam83 app83) (u Tm83 var83 lam83 app83) v083 : ∀{Γ A} → Tm83 (snoc83 Γ A) A;v083 = var83 vz83 v183 : ∀{Γ A B} → Tm83 (snoc83 (snoc83 Γ A) B) A;v183 = var83 (vs83 vz83) v283 : ∀{Γ A B C} → Tm83 (snoc83 (snoc83 (snoc83 Γ A) B) C) A;v283 = var83 (vs83 (vs83 vz83)) v383 : ∀{Γ A B C D} → Tm83 (snoc83 (snoc83 (snoc83 (snoc83 Γ A) B) C) D) A;v383 = var83 (vs83 (vs83 (vs83 vz83))) v483 : ∀{Γ A B C D E} → Tm83 (snoc83 (snoc83 (snoc83 (snoc83 (snoc83 Γ A) B) C) D) E) A;v483 = var83 (vs83 (vs83 (vs83 (vs83 vz83)))) test83 : ∀{Γ A} → Tm83 Γ (arr83 (arr83 A A) (arr83 A A));test83 = lam83 (lam83 (app83 v183 (app83 v183 (app83 v183 (app83 v183 (app83 v183 (app83 v183 v083))))))) {-# OPTIONS --type-in-type #-} Ty84 : Set; Ty84 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι84 : Ty84; ι84 = λ _ ι84 _ → ι84 arr84 : Ty84 → Ty84 → Ty84; arr84 = λ A B Ty84 ι84 arr84 → arr84 (A Ty84 ι84 arr84) (B Ty84 ι84 arr84) Con84 : Set;Con84 = (Con84 : Set) (nil : Con84) (snoc : Con84 → Ty84 → Con84) → Con84 nil84 : Con84;nil84 = λ Con84 nil84 snoc → nil84 snoc84 : Con84 → Ty84 → Con84;snoc84 = λ Γ A Con84 nil84 snoc84 → snoc84 (Γ Con84 nil84 snoc84) A Var84 : Con84 → Ty84 → Set;Var84 = λ Γ A → (Var84 : Con84 → Ty84 → Set) (vz : (Γ : _)(A : _) → Var84 (snoc84 Γ A) A) (vs : (Γ : _)(B A : _) → Var84 Γ A → Var84 (snoc84 Γ B) A) → Var84 Γ A vz84 : ∀{Γ A} → Var84 (snoc84 Γ A) A;vz84 = λ Var84 vz84 vs → vz84 _ _ vs84 : ∀{Γ B A} → Var84 Γ A → Var84 (snoc84 Γ B) A;vs84 = λ x Var84 vz84 vs84 → vs84 _ _ _ (x Var84 vz84 vs84) Tm84 : Con84 → Ty84 → Set;Tm84 = λ Γ A → (Tm84 : Con84 → Ty84 → Set) (var : (Γ : _) (A : _) → Var84 Γ A → Tm84 Γ A) (lam : (Γ : _) (A B : _) → Tm84 (snoc84 Γ A) B → Tm84 Γ (arr84 A B)) (app : (Γ : _) (A B : _) → Tm84 Γ (arr84 A B) → Tm84 Γ A → Tm84 Γ B) → Tm84 Γ A var84 : ∀{Γ A} → Var84 Γ A → Tm84 Γ A;var84 = λ x Tm84 var84 lam app → var84 _ _ x lam84 : ∀{Γ A B} → Tm84 (snoc84 Γ A) B → Tm84 Γ (arr84 A B);lam84 = λ t Tm84 var84 lam84 app → lam84 _ _ _ (t Tm84 var84 lam84 app) app84 : ∀{Γ A B} → Tm84 Γ (arr84 A B) → Tm84 Γ A → Tm84 Γ B;app84 = λ t u Tm84 var84 lam84 app84 → app84 _ _ _ (t Tm84 var84 lam84 app84) (u Tm84 var84 lam84 app84) v084 : ∀{Γ A} → Tm84 (snoc84 Γ A) A;v084 = var84 vz84 v184 : ∀{Γ A B} → Tm84 (snoc84 (snoc84 Γ A) B) A;v184 = var84 (vs84 vz84) v284 : ∀{Γ A B C} → Tm84 (snoc84 (snoc84 (snoc84 Γ A) B) C) A;v284 = var84 (vs84 (vs84 vz84)) v384 : ∀{Γ A B C D} → Tm84 (snoc84 (snoc84 (snoc84 (snoc84 Γ A) B) C) D) A;v384 = var84 (vs84 (vs84 (vs84 vz84))) v484 : ∀{Γ A B C D E} → Tm84 (snoc84 (snoc84 (snoc84 (snoc84 (snoc84 Γ A) B) C) D) E) A;v484 = var84 (vs84 (vs84 (vs84 (vs84 vz84)))) test84 : ∀{Γ A} → Tm84 Γ (arr84 (arr84 A A) (arr84 A A));test84 = lam84 (lam84 (app84 v184 (app84 v184 (app84 v184 (app84 v184 (app84 v184 (app84 v184 v084))))))) {-# OPTIONS --type-in-type #-} Ty85 : Set; Ty85 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι85 : Ty85; ι85 = λ _ ι85 _ → ι85 arr85 : Ty85 → Ty85 → Ty85; arr85 = λ A B Ty85 ι85 arr85 → arr85 (A Ty85 ι85 arr85) (B Ty85 ι85 arr85) Con85 : Set;Con85 = (Con85 : Set) (nil : Con85) (snoc : Con85 → Ty85 → Con85) → Con85 nil85 : Con85;nil85 = λ Con85 nil85 snoc → nil85 snoc85 : Con85 → Ty85 → Con85;snoc85 = λ Γ A Con85 nil85 snoc85 → snoc85 (Γ Con85 nil85 snoc85) A Var85 : Con85 → Ty85 → Set;Var85 = λ Γ A → (Var85 : Con85 → Ty85 → Set) (vz : (Γ : _)(A : _) → Var85 (snoc85 Γ A) A) (vs : (Γ : _)(B A : _) → Var85 Γ A → Var85 (snoc85 Γ B) A) → Var85 Γ A vz85 : ∀{Γ A} → Var85 (snoc85 Γ A) A;vz85 = λ Var85 vz85 vs → vz85 _ _ vs85 : ∀{Γ B A} → Var85 Γ A → Var85 (snoc85 Γ B) A;vs85 = λ x Var85 vz85 vs85 → vs85 _ _ _ (x Var85 vz85 vs85) Tm85 : Con85 → Ty85 → Set;Tm85 = λ Γ A → (Tm85 : Con85 → Ty85 → Set) (var : (Γ : _) (A : _) → Var85 Γ A → Tm85 Γ A) (lam : (Γ : _) (A B : _) → Tm85 (snoc85 Γ A) B → Tm85 Γ (arr85 A B)) (app : (Γ : _) (A B : _) → Tm85 Γ (arr85 A B) → Tm85 Γ A → Tm85 Γ B) → Tm85 Γ A var85 : ∀{Γ A} → Var85 Γ A → Tm85 Γ A;var85 = λ x Tm85 var85 lam app → var85 _ _ x lam85 : ∀{Γ A B} → Tm85 (snoc85 Γ A) B → Tm85 Γ (arr85 A B);lam85 = λ t Tm85 var85 lam85 app → lam85 _ _ _ (t Tm85 var85 lam85 app) app85 : ∀{Γ A B} → Tm85 Γ (arr85 A B) → Tm85 Γ A → Tm85 Γ B;app85 = λ t u Tm85 var85 lam85 app85 → app85 _ _ _ (t Tm85 var85 lam85 app85) (u Tm85 var85 lam85 app85) v085 : ∀{Γ A} → Tm85 (snoc85 Γ A) A;v085 = var85 vz85 v185 : ∀{Γ A B} → Tm85 (snoc85 (snoc85 Γ A) B) A;v185 = var85 (vs85 vz85) v285 : ∀{Γ A B C} → Tm85 (snoc85 (snoc85 (snoc85 Γ A) B) C) A;v285 = var85 (vs85 (vs85 vz85)) v385 : ∀{Γ A B C D} → Tm85 (snoc85 (snoc85 (snoc85 (snoc85 Γ A) B) C) D) A;v385 = var85 (vs85 (vs85 (vs85 vz85))) v485 : ∀{Γ A B C D E} → Tm85 (snoc85 (snoc85 (snoc85 (snoc85 (snoc85 Γ A) B) C) D) E) A;v485 = var85 (vs85 (vs85 (vs85 (vs85 vz85)))) test85 : ∀{Γ A} → Tm85 Γ (arr85 (arr85 A A) (arr85 A A));test85 = lam85 (lam85 (app85 v185 (app85 v185 (app85 v185 (app85 v185 (app85 v185 (app85 v185 v085))))))) {-# OPTIONS --type-in-type #-} Ty86 : Set; Ty86 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι86 : Ty86; ι86 = λ _ ι86 _ → ι86 arr86 : Ty86 → Ty86 → Ty86; arr86 = λ A B Ty86 ι86 arr86 → arr86 (A Ty86 ι86 arr86) (B Ty86 ι86 arr86) Con86 : Set;Con86 = (Con86 : Set) (nil : Con86) (snoc : Con86 → Ty86 → Con86) → Con86 nil86 : Con86;nil86 = λ Con86 nil86 snoc → nil86 snoc86 : Con86 → Ty86 → Con86;snoc86 = λ Γ A Con86 nil86 snoc86 → snoc86 (Γ Con86 nil86 snoc86) A Var86 : Con86 → Ty86 → Set;Var86 = λ Γ A → (Var86 : Con86 → Ty86 → Set) (vz : (Γ : _)(A : _) → Var86 (snoc86 Γ A) A) (vs : (Γ : _)(B A : _) → Var86 Γ A → Var86 (snoc86 Γ B) A) → Var86 Γ A vz86 : ∀{Γ A} → Var86 (snoc86 Γ A) A;vz86 = λ Var86 vz86 vs → vz86 _ _ vs86 : ∀{Γ B A} → Var86 Γ A → Var86 (snoc86 Γ B) A;vs86 = λ x Var86 vz86 vs86 → vs86 _ _ _ (x Var86 vz86 vs86) Tm86 : Con86 → Ty86 → Set;Tm86 = λ Γ A → (Tm86 : Con86 → Ty86 → Set) (var : (Γ : _) (A : _) → Var86 Γ A → Tm86 Γ A) (lam : (Γ : _) (A B : _) → Tm86 (snoc86 Γ A) B → Tm86 Γ (arr86 A B)) (app : (Γ : _) (A B : _) → Tm86 Γ (arr86 A B) → Tm86 Γ A → Tm86 Γ B) → Tm86 Γ A var86 : ∀{Γ A} → Var86 Γ A → Tm86 Γ A;var86 = λ x Tm86 var86 lam app → var86 _ _ x lam86 : ∀{Γ A B} → Tm86 (snoc86 Γ A) B → Tm86 Γ (arr86 A B);lam86 = λ t Tm86 var86 lam86 app → lam86 _ _ _ (t Tm86 var86 lam86 app) app86 : ∀{Γ A B} → Tm86 Γ (arr86 A B) → Tm86 Γ A → Tm86 Γ B;app86 = λ t u Tm86 var86 lam86 app86 → app86 _ _ _ (t Tm86 var86 lam86 app86) (u Tm86 var86 lam86 app86) v086 : ∀{Γ A} → Tm86 (snoc86 Γ A) A;v086 = var86 vz86 v186 : ∀{Γ A B} → Tm86 (snoc86 (snoc86 Γ A) B) A;v186 = var86 (vs86 vz86) v286 : ∀{Γ A B C} → Tm86 (snoc86 (snoc86 (snoc86 Γ A) B) C) A;v286 = var86 (vs86 (vs86 vz86)) v386 : ∀{Γ A B C D} → Tm86 (snoc86 (snoc86 (snoc86 (snoc86 Γ A) B) C) D) A;v386 = var86 (vs86 (vs86 (vs86 vz86))) v486 : ∀{Γ A B C D E} → Tm86 (snoc86 (snoc86 (snoc86 (snoc86 (snoc86 Γ A) B) C) D) E) A;v486 = var86 (vs86 (vs86 (vs86 (vs86 vz86)))) test86 : ∀{Γ A} → Tm86 Γ (arr86 (arr86 A A) (arr86 A A));test86 = lam86 (lam86 (app86 v186 (app86 v186 (app86 v186 (app86 v186 (app86 v186 (app86 v186 v086))))))) {-# OPTIONS --type-in-type #-} Ty87 : Set; Ty87 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι87 : Ty87; ι87 = λ _ ι87 _ → ι87 arr87 : Ty87 → Ty87 → Ty87; arr87 = λ A B Ty87 ι87 arr87 → arr87 (A Ty87 ι87 arr87) (B Ty87 ι87 arr87) Con87 : Set;Con87 = (Con87 : Set) (nil : Con87) (snoc : Con87 → Ty87 → Con87) → Con87 nil87 : Con87;nil87 = λ Con87 nil87 snoc → nil87 snoc87 : Con87 → Ty87 → Con87;snoc87 = λ Γ A Con87 nil87 snoc87 → snoc87 (Γ Con87 nil87 snoc87) A Var87 : Con87 → Ty87 → Set;Var87 = λ Γ A → (Var87 : Con87 → Ty87 → Set) (vz : (Γ : _)(A : _) → Var87 (snoc87 Γ A) A) (vs : (Γ : _)(B A : _) → Var87 Γ A → Var87 (snoc87 Γ B) A) → Var87 Γ A vz87 : ∀{Γ A} → Var87 (snoc87 Γ A) A;vz87 = λ Var87 vz87 vs → vz87 _ _ vs87 : ∀{Γ B A} → Var87 Γ A → Var87 (snoc87 Γ B) A;vs87 = λ x Var87 vz87 vs87 → vs87 _ _ _ (x Var87 vz87 vs87) Tm87 : Con87 → Ty87 → Set;Tm87 = λ Γ A → (Tm87 : Con87 → Ty87 → Set) (var : (Γ : _) (A : _) → Var87 Γ A → Tm87 Γ A) (lam : (Γ : _) (A B : _) → Tm87 (snoc87 Γ A) B → Tm87 Γ (arr87 A B)) (app : (Γ : _) (A B : _) → Tm87 Γ (arr87 A B) → Tm87 Γ A → Tm87 Γ B) → Tm87 Γ A var87 : ∀{Γ A} → Var87 Γ A → Tm87 Γ A;var87 = λ x Tm87 var87 lam app → var87 _ _ x lam87 : ∀{Γ A B} → Tm87 (snoc87 Γ A) B → Tm87 Γ (arr87 A B);lam87 = λ t Tm87 var87 lam87 app → lam87 _ _ _ (t Tm87 var87 lam87 app) app87 : ∀{Γ A B} → Tm87 Γ (arr87 A B) → Tm87 Γ A → Tm87 Γ B;app87 = λ t u Tm87 var87 lam87 app87 → app87 _ _ _ (t Tm87 var87 lam87 app87) (u Tm87 var87 lam87 app87) v087 : ∀{Γ A} → Tm87 (snoc87 Γ A) A;v087 = var87 vz87 v187 : ∀{Γ A B} → Tm87 (snoc87 (snoc87 Γ A) B) A;v187 = var87 (vs87 vz87) v287 : ∀{Γ A B C} → Tm87 (snoc87 (snoc87 (snoc87 Γ A) B) C) A;v287 = var87 (vs87 (vs87 vz87)) v387 : ∀{Γ A B C D} → Tm87 (snoc87 (snoc87 (snoc87 (snoc87 Γ A) B) C) D) A;v387 = var87 (vs87 (vs87 (vs87 vz87))) v487 : ∀{Γ A B C D E} → Tm87 (snoc87 (snoc87 (snoc87 (snoc87 (snoc87 Γ A) B) C) D) E) A;v487 = var87 (vs87 (vs87 (vs87 (vs87 vz87)))) test87 : ∀{Γ A} → Tm87 Γ (arr87 (arr87 A A) (arr87 A A));test87 = lam87 (lam87 (app87 v187 (app87 v187 (app87 v187 (app87 v187 (app87 v187 (app87 v187 v087))))))) {-# OPTIONS --type-in-type #-} Ty88 : Set; Ty88 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι88 : Ty88; ι88 = λ _ ι88 _ → ι88 arr88 : Ty88 → Ty88 → Ty88; arr88 = λ A B Ty88 ι88 arr88 → arr88 (A Ty88 ι88 arr88) (B Ty88 ι88 arr88) Con88 : Set;Con88 = (Con88 : Set) (nil : Con88) (snoc : Con88 → Ty88 → Con88) → Con88 nil88 : Con88;nil88 = λ Con88 nil88 snoc → nil88 snoc88 : Con88 → Ty88 → Con88;snoc88 = λ Γ A Con88 nil88 snoc88 → snoc88 (Γ Con88 nil88 snoc88) A Var88 : Con88 → Ty88 → Set;Var88 = λ Γ A → (Var88 : Con88 → Ty88 → Set) (vz : (Γ : _)(A : _) → Var88 (snoc88 Γ A) A) (vs : (Γ : _)(B A : _) → Var88 Γ A → Var88 (snoc88 Γ B) A) → Var88 Γ A vz88 : ∀{Γ A} → Var88 (snoc88 Γ A) A;vz88 = λ Var88 vz88 vs → vz88 _ _ vs88 : ∀{Γ B A} → Var88 Γ A → Var88 (snoc88 Γ B) A;vs88 = λ x Var88 vz88 vs88 → vs88 _ _ _ (x Var88 vz88 vs88) Tm88 : Con88 → Ty88 → Set;Tm88 = λ Γ A → (Tm88 : Con88 → Ty88 → Set) (var : (Γ : _) (A : _) → Var88 Γ A → Tm88 Γ A) (lam : (Γ : _) (A B : _) → Tm88 (snoc88 Γ A) B → Tm88 Γ (arr88 A B)) (app : (Γ : _) (A B : _) → Tm88 Γ (arr88 A B) → Tm88 Γ A → Tm88 Γ B) → Tm88 Γ A var88 : ∀{Γ A} → Var88 Γ A → Tm88 Γ A;var88 = λ x Tm88 var88 lam app → var88 _ _ x lam88 : ∀{Γ A B} → Tm88 (snoc88 Γ A) B → Tm88 Γ (arr88 A B);lam88 = λ t Tm88 var88 lam88 app → lam88 _ _ _ (t Tm88 var88 lam88 app) app88 : ∀{Γ A B} → Tm88 Γ (arr88 A B) → Tm88 Γ A → Tm88 Γ B;app88 = λ t u Tm88 var88 lam88 app88 → app88 _ _ _ (t Tm88 var88 lam88 app88) (u Tm88 var88 lam88 app88) v088 : ∀{Γ A} → Tm88 (snoc88 Γ A) A;v088 = var88 vz88 v188 : ∀{Γ A B} → Tm88 (snoc88 (snoc88 Γ A) B) A;v188 = var88 (vs88 vz88) v288 : ∀{Γ A B C} → Tm88 (snoc88 (snoc88 (snoc88 Γ A) B) C) A;v288 = var88 (vs88 (vs88 vz88)) v388 : ∀{Γ A B C D} → Tm88 (snoc88 (snoc88 (snoc88 (snoc88 Γ A) B) C) D) A;v388 = var88 (vs88 (vs88 (vs88 vz88))) v488 : ∀{Γ A B C D E} → Tm88 (snoc88 (snoc88 (snoc88 (snoc88 (snoc88 Γ A) B) C) D) E) A;v488 = var88 (vs88 (vs88 (vs88 (vs88 vz88)))) test88 : ∀{Γ A} → Tm88 Γ (arr88 (arr88 A A) (arr88 A A));test88 = lam88 (lam88 (app88 v188 (app88 v188 (app88 v188 (app88 v188 (app88 v188 (app88 v188 v088))))))) {-# OPTIONS --type-in-type #-} Ty89 : Set; Ty89 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι89 : Ty89; ι89 = λ _ ι89 _ → ι89 arr89 : Ty89 → Ty89 → Ty89; arr89 = λ A B Ty89 ι89 arr89 → arr89 (A Ty89 ι89 arr89) (B Ty89 ι89 arr89) Con89 : Set;Con89 = (Con89 : Set) (nil : Con89) (snoc : Con89 → Ty89 → Con89) → Con89 nil89 : Con89;nil89 = λ Con89 nil89 snoc → nil89 snoc89 : Con89 → Ty89 → Con89;snoc89 = λ Γ A Con89 nil89 snoc89 → snoc89 (Γ Con89 nil89 snoc89) A Var89 : Con89 → Ty89 → Set;Var89 = λ Γ A → (Var89 : Con89 → Ty89 → Set) (vz : (Γ : _)(A : _) → Var89 (snoc89 Γ A) A) (vs : (Γ : _)(B A : _) → Var89 Γ A → Var89 (snoc89 Γ B) A) → Var89 Γ A vz89 : ∀{Γ A} → Var89 (snoc89 Γ A) A;vz89 = λ Var89 vz89 vs → vz89 _ _ vs89 : ∀{Γ B A} → Var89 Γ A → Var89 (snoc89 Γ B) A;vs89 = λ x Var89 vz89 vs89 → vs89 _ _ _ (x Var89 vz89 vs89) Tm89 : Con89 → Ty89 → Set;Tm89 = λ Γ A → (Tm89 : Con89 → Ty89 → Set) (var : (Γ : _) (A : _) → Var89 Γ A → Tm89 Γ A) (lam : (Γ : _) (A B : _) → Tm89 (snoc89 Γ A) B → Tm89 Γ (arr89 A B)) (app : (Γ : _) (A B : _) → Tm89 Γ (arr89 A B) → Tm89 Γ A → Tm89 Γ B) → Tm89 Γ A var89 : ∀{Γ A} → Var89 Γ A → Tm89 Γ A;var89 = λ x Tm89 var89 lam app → var89 _ _ x lam89 : ∀{Γ A B} → Tm89 (snoc89 Γ A) B → Tm89 Γ (arr89 A B);lam89 = λ t Tm89 var89 lam89 app → lam89 _ _ _ (t Tm89 var89 lam89 app) app89 : ∀{Γ A B} → Tm89 Γ (arr89 A B) → Tm89 Γ A → Tm89 Γ B;app89 = λ t u Tm89 var89 lam89 app89 → app89 _ _ _ (t Tm89 var89 lam89 app89) (u Tm89 var89 lam89 app89) v089 : ∀{Γ A} → Tm89 (snoc89 Γ A) A;v089 = var89 vz89 v189 : ∀{Γ A B} → Tm89 (snoc89 (snoc89 Γ A) B) A;v189 = var89 (vs89 vz89) v289 : ∀{Γ A B C} → Tm89 (snoc89 (snoc89 (snoc89 Γ A) B) C) A;v289 = var89 (vs89 (vs89 vz89)) v389 : ∀{Γ A B C D} → Tm89 (snoc89 (snoc89 (snoc89 (snoc89 Γ A) B) C) D) A;v389 = var89 (vs89 (vs89 (vs89 vz89))) v489 : ∀{Γ A B C D E} → Tm89 (snoc89 (snoc89 (snoc89 (snoc89 (snoc89 Γ A) B) C) D) E) A;v489 = var89 (vs89 (vs89 (vs89 (vs89 vz89)))) test89 : ∀{Γ A} → Tm89 Γ (arr89 (arr89 A A) (arr89 A A));test89 = lam89 (lam89 (app89 v189 (app89 v189 (app89 v189 (app89 v189 (app89 v189 (app89 v189 v089))))))) {-# OPTIONS --type-in-type #-} Ty90 : Set; Ty90 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι90 : Ty90; ι90 = λ _ ι90 _ → ι90 arr90 : Ty90 → Ty90 → Ty90; arr90 = λ A B Ty90 ι90 arr90 → arr90 (A Ty90 ι90 arr90) (B Ty90 ι90 arr90) Con90 : Set;Con90 = (Con90 : Set) (nil : Con90) (snoc : Con90 → Ty90 → Con90) → Con90 nil90 : Con90;nil90 = λ Con90 nil90 snoc → nil90 snoc90 : Con90 → Ty90 → Con90;snoc90 = λ Γ A Con90 nil90 snoc90 → snoc90 (Γ Con90 nil90 snoc90) A Var90 : Con90 → Ty90 → Set;Var90 = λ Γ A → (Var90 : Con90 → Ty90 → Set) (vz : (Γ : _)(A : _) → Var90 (snoc90 Γ A) A) (vs : (Γ : _)(B A : _) → Var90 Γ A → Var90 (snoc90 Γ B) A) → Var90 Γ A vz90 : ∀{Γ A} → Var90 (snoc90 Γ A) A;vz90 = λ Var90 vz90 vs → vz90 _ _ vs90 : ∀{Γ B A} → Var90 Γ A → Var90 (snoc90 Γ B) A;vs90 = λ x Var90 vz90 vs90 → vs90 _ _ _ (x Var90 vz90 vs90) Tm90 : Con90 → Ty90 → Set;Tm90 = λ Γ A → (Tm90 : Con90 → Ty90 → Set) (var : (Γ : _) (A : _) → Var90 Γ A → Tm90 Γ A) (lam : (Γ : _) (A B : _) → Tm90 (snoc90 Γ A) B → Tm90 Γ (arr90 A B)) (app : (Γ : _) (A B : _) → Tm90 Γ (arr90 A B) → Tm90 Γ A → Tm90 Γ B) → Tm90 Γ A var90 : ∀{Γ A} → Var90 Γ A → Tm90 Γ A;var90 = λ x Tm90 var90 lam app → var90 _ _ x lam90 : ∀{Γ A B} → Tm90 (snoc90 Γ A) B → Tm90 Γ (arr90 A B);lam90 = λ t Tm90 var90 lam90 app → lam90 _ _ _ (t Tm90 var90 lam90 app) app90 : ∀{Γ A B} → Tm90 Γ (arr90 A B) → Tm90 Γ A → Tm90 Γ B;app90 = λ t u Tm90 var90 lam90 app90 → app90 _ _ _ (t Tm90 var90 lam90 app90) (u Tm90 var90 lam90 app90) v090 : ∀{Γ A} → Tm90 (snoc90 Γ A) A;v090 = var90 vz90 v190 : ∀{Γ A B} → Tm90 (snoc90 (snoc90 Γ A) B) A;v190 = var90 (vs90 vz90) v290 : ∀{Γ A B C} → Tm90 (snoc90 (snoc90 (snoc90 Γ A) B) C) A;v290 = var90 (vs90 (vs90 vz90)) v390 : ∀{Γ A B C D} → Tm90 (snoc90 (snoc90 (snoc90 (snoc90 Γ A) B) C) D) A;v390 = var90 (vs90 (vs90 (vs90 vz90))) v490 : ∀{Γ A B C D E} → Tm90 (snoc90 (snoc90 (snoc90 (snoc90 (snoc90 Γ A) B) C) D) E) A;v490 = var90 (vs90 (vs90 (vs90 (vs90 vz90)))) test90 : ∀{Γ A} → Tm90 Γ (arr90 (arr90 A A) (arr90 A A));test90 = lam90 (lam90 (app90 v190 (app90 v190 (app90 v190 (app90 v190 (app90 v190 (app90 v190 v090))))))) {-# OPTIONS --type-in-type #-} Ty91 : Set; Ty91 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι91 : Ty91; ι91 = λ _ ι91 _ → ι91 arr91 : Ty91 → Ty91 → Ty91; arr91 = λ A B Ty91 ι91 arr91 → arr91 (A Ty91 ι91 arr91) (B Ty91 ι91 arr91) Con91 : Set;Con91 = (Con91 : Set) (nil : Con91) (snoc : Con91 → Ty91 → Con91) → Con91 nil91 : Con91;nil91 = λ Con91 nil91 snoc → nil91 snoc91 : Con91 → Ty91 → Con91;snoc91 = λ Γ A Con91 nil91 snoc91 → snoc91 (Γ Con91 nil91 snoc91) A Var91 : Con91 → Ty91 → Set;Var91 = λ Γ A → (Var91 : Con91 → Ty91 → Set) (vz : (Γ : _)(A : _) → Var91 (snoc91 Γ A) A) (vs : (Γ : _)(B A : _) → Var91 Γ A → Var91 (snoc91 Γ B) A) → Var91 Γ A vz91 : ∀{Γ A} → Var91 (snoc91 Γ A) A;vz91 = λ Var91 vz91 vs → vz91 _ _ vs91 : ∀{Γ B A} → Var91 Γ A → Var91 (snoc91 Γ B) A;vs91 = λ x Var91 vz91 vs91 → vs91 _ _ _ (x Var91 vz91 vs91) Tm91 : Con91 → Ty91 → Set;Tm91 = λ Γ A → (Tm91 : Con91 → Ty91 → Set) (var : (Γ : _) (A : _) → Var91 Γ A → Tm91 Γ A) (lam : (Γ : _) (A B : _) → Tm91 (snoc91 Γ A) B → Tm91 Γ (arr91 A B)) (app : (Γ : _) (A B : _) → Tm91 Γ (arr91 A B) → Tm91 Γ A → Tm91 Γ B) → Tm91 Γ A var91 : ∀{Γ A} → Var91 Γ A → Tm91 Γ A;var91 = λ x Tm91 var91 lam app → var91 _ _ x lam91 : ∀{Γ A B} → Tm91 (snoc91 Γ A) B → Tm91 Γ (arr91 A B);lam91 = λ t Tm91 var91 lam91 app → lam91 _ _ _ (t Tm91 var91 lam91 app) app91 : ∀{Γ A B} → Tm91 Γ (arr91 A B) → Tm91 Γ A → Tm91 Γ B;app91 = λ t u Tm91 var91 lam91 app91 → app91 _ _ _ (t Tm91 var91 lam91 app91) (u Tm91 var91 lam91 app91) v091 : ∀{Γ A} → Tm91 (snoc91 Γ A) A;v091 = var91 vz91 v191 : ∀{Γ A B} → Tm91 (snoc91 (snoc91 Γ A) B) A;v191 = var91 (vs91 vz91) v291 : ∀{Γ A B C} → Tm91 (snoc91 (snoc91 (snoc91 Γ A) B) C) A;v291 = var91 (vs91 (vs91 vz91)) v391 : ∀{Γ A B C D} → Tm91 (snoc91 (snoc91 (snoc91 (snoc91 Γ A) B) C) D) A;v391 = var91 (vs91 (vs91 (vs91 vz91))) v491 : ∀{Γ A B C D E} → Tm91 (snoc91 (snoc91 (snoc91 (snoc91 (snoc91 Γ A) B) C) D) E) A;v491 = var91 (vs91 (vs91 (vs91 (vs91 vz91)))) test91 : ∀{Γ A} → Tm91 Γ (arr91 (arr91 A A) (arr91 A A));test91 = lam91 (lam91 (app91 v191 (app91 v191 (app91 v191 (app91 v191 (app91 v191 (app91 v191 v091))))))) {-# OPTIONS --type-in-type #-} Ty92 : Set; Ty92 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι92 : Ty92; ι92 = λ _ ι92 _ → ι92 arr92 : Ty92 → Ty92 → Ty92; arr92 = λ A B Ty92 ι92 arr92 → arr92 (A Ty92 ι92 arr92) (B Ty92 ι92 arr92) Con92 : Set;Con92 = (Con92 : Set) (nil : Con92) (snoc : Con92 → Ty92 → Con92) → Con92 nil92 : Con92;nil92 = λ Con92 nil92 snoc → nil92 snoc92 : Con92 → Ty92 → Con92;snoc92 = λ Γ A Con92 nil92 snoc92 → snoc92 (Γ Con92 nil92 snoc92) A Var92 : Con92 → Ty92 → Set;Var92 = λ Γ A → (Var92 : Con92 → Ty92 → Set) (vz : (Γ : _)(A : _) → Var92 (snoc92 Γ A) A) (vs : (Γ : _)(B A : _) → Var92 Γ A → Var92 (snoc92 Γ B) A) → Var92 Γ A vz92 : ∀{Γ A} → Var92 (snoc92 Γ A) A;vz92 = λ Var92 vz92 vs → vz92 _ _ vs92 : ∀{Γ B A} → Var92 Γ A → Var92 (snoc92 Γ B) A;vs92 = λ x Var92 vz92 vs92 → vs92 _ _ _ (x Var92 vz92 vs92) Tm92 : Con92 → Ty92 → Set;Tm92 = λ Γ A → (Tm92 : Con92 → Ty92 → Set) (var : (Γ : _) (A : _) → Var92 Γ A → Tm92 Γ A) (lam : (Γ : _) (A B : _) → Tm92 (snoc92 Γ A) B → Tm92 Γ (arr92 A B)) (app : (Γ : _) (A B : _) → Tm92 Γ (arr92 A B) → Tm92 Γ A → Tm92 Γ B) → Tm92 Γ A var92 : ∀{Γ A} → Var92 Γ A → Tm92 Γ A;var92 = λ x Tm92 var92 lam app → var92 _ _ x lam92 : ∀{Γ A B} → Tm92 (snoc92 Γ A) B → Tm92 Γ (arr92 A B);lam92 = λ t Tm92 var92 lam92 app → lam92 _ _ _ (t Tm92 var92 lam92 app) app92 : ∀{Γ A B} → Tm92 Γ (arr92 A B) → Tm92 Γ A → Tm92 Γ B;app92 = λ t u Tm92 var92 lam92 app92 → app92 _ _ _ (t Tm92 var92 lam92 app92) (u Tm92 var92 lam92 app92) v092 : ∀{Γ A} → Tm92 (snoc92 Γ A) A;v092 = var92 vz92 v192 : ∀{Γ A B} → Tm92 (snoc92 (snoc92 Γ A) B) A;v192 = var92 (vs92 vz92) v292 : ∀{Γ A B C} → Tm92 (snoc92 (snoc92 (snoc92 Γ A) B) C) A;v292 = var92 (vs92 (vs92 vz92)) v392 : ∀{Γ A B C D} → Tm92 (snoc92 (snoc92 (snoc92 (snoc92 Γ A) B) C) D) A;v392 = var92 (vs92 (vs92 (vs92 vz92))) v492 : ∀{Γ A B C D E} → Tm92 (snoc92 (snoc92 (snoc92 (snoc92 (snoc92 Γ A) B) C) D) E) A;v492 = var92 (vs92 (vs92 (vs92 (vs92 vz92)))) test92 : ∀{Γ A} → Tm92 Γ (arr92 (arr92 A A) (arr92 A A));test92 = lam92 (lam92 (app92 v192 (app92 v192 (app92 v192 (app92 v192 (app92 v192 (app92 v192 v092))))))) {-# OPTIONS --type-in-type #-} Ty93 : Set; Ty93 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι93 : Ty93; ι93 = λ _ ι93 _ → ι93 arr93 : Ty93 → Ty93 → Ty93; arr93 = λ A B Ty93 ι93 arr93 → arr93 (A Ty93 ι93 arr93) (B Ty93 ι93 arr93) Con93 : Set;Con93 = (Con93 : Set) (nil : Con93) (snoc : Con93 → Ty93 → Con93) → Con93 nil93 : Con93;nil93 = λ Con93 nil93 snoc → nil93 snoc93 : Con93 → Ty93 → Con93;snoc93 = λ Γ A Con93 nil93 snoc93 → snoc93 (Γ Con93 nil93 snoc93) A Var93 : Con93 → Ty93 → Set;Var93 = λ Γ A → (Var93 : Con93 → Ty93 → Set) (vz : (Γ : _)(A : _) → Var93 (snoc93 Γ A) A) (vs : (Γ : _)(B A : _) → Var93 Γ A → Var93 (snoc93 Γ B) A) → Var93 Γ A vz93 : ∀{Γ A} → Var93 (snoc93 Γ A) A;vz93 = λ Var93 vz93 vs → vz93 _ _ vs93 : ∀{Γ B A} → Var93 Γ A → Var93 (snoc93 Γ B) A;vs93 = λ x Var93 vz93 vs93 → vs93 _ _ _ (x Var93 vz93 vs93) Tm93 : Con93 → Ty93 → Set;Tm93 = λ Γ A → (Tm93 : Con93 → Ty93 → Set) (var : (Γ : _) (A : _) → Var93 Γ A → Tm93 Γ A) (lam : (Γ : _) (A B : _) → Tm93 (snoc93 Γ A) B → Tm93 Γ (arr93 A B)) (app : (Γ : _) (A B : _) → Tm93 Γ (arr93 A B) → Tm93 Γ A → Tm93 Γ B) → Tm93 Γ A var93 : ∀{Γ A} → Var93 Γ A → Tm93 Γ A;var93 = λ x Tm93 var93 lam app → var93 _ _ x lam93 : ∀{Γ A B} → Tm93 (snoc93 Γ A) B → Tm93 Γ (arr93 A B);lam93 = λ t Tm93 var93 lam93 app → lam93 _ _ _ (t Tm93 var93 lam93 app) app93 : ∀{Γ A B} → Tm93 Γ (arr93 A B) → Tm93 Γ A → Tm93 Γ B;app93 = λ t u Tm93 var93 lam93 app93 → app93 _ _ _ (t Tm93 var93 lam93 app93) (u Tm93 var93 lam93 app93) v093 : ∀{Γ A} → Tm93 (snoc93 Γ A) A;v093 = var93 vz93 v193 : ∀{Γ A B} → Tm93 (snoc93 (snoc93 Γ A) B) A;v193 = var93 (vs93 vz93) v293 : ∀{Γ A B C} → Tm93 (snoc93 (snoc93 (snoc93 Γ A) B) C) A;v293 = var93 (vs93 (vs93 vz93)) v393 : ∀{Γ A B C D} → Tm93 (snoc93 (snoc93 (snoc93 (snoc93 Γ A) B) C) D) A;v393 = var93 (vs93 (vs93 (vs93 vz93))) v493 : ∀{Γ A B C D E} → Tm93 (snoc93 (snoc93 (snoc93 (snoc93 (snoc93 Γ A) B) C) D) E) A;v493 = var93 (vs93 (vs93 (vs93 (vs93 vz93)))) test93 : ∀{Γ A} → Tm93 Γ (arr93 (arr93 A A) (arr93 A A));test93 = lam93 (lam93 (app93 v193 (app93 v193 (app93 v193 (app93 v193 (app93 v193 (app93 v193 v093))))))) {-# OPTIONS --type-in-type #-} Ty94 : Set; Ty94 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι94 : Ty94; ι94 = λ _ ι94 _ → ι94 arr94 : Ty94 → Ty94 → Ty94; arr94 = λ A B Ty94 ι94 arr94 → arr94 (A Ty94 ι94 arr94) (B Ty94 ι94 arr94) Con94 : Set;Con94 = (Con94 : Set) (nil : Con94) (snoc : Con94 → Ty94 → Con94) → Con94 nil94 : Con94;nil94 = λ Con94 nil94 snoc → nil94 snoc94 : Con94 → Ty94 → Con94;snoc94 = λ Γ A Con94 nil94 snoc94 → snoc94 (Γ Con94 nil94 snoc94) A Var94 : Con94 → Ty94 → Set;Var94 = λ Γ A → (Var94 : Con94 → Ty94 → Set) (vz : (Γ : _)(A : _) → Var94 (snoc94 Γ A) A) (vs : (Γ : _)(B A : _) → Var94 Γ A → Var94 (snoc94 Γ B) A) → Var94 Γ A vz94 : ∀{Γ A} → Var94 (snoc94 Γ A) A;vz94 = λ Var94 vz94 vs → vz94 _ _ vs94 : ∀{Γ B A} → Var94 Γ A → Var94 (snoc94 Γ B) A;vs94 = λ x Var94 vz94 vs94 → vs94 _ _ _ (x Var94 vz94 vs94) Tm94 : Con94 → Ty94 → Set;Tm94 = λ Γ A → (Tm94 : Con94 → Ty94 → Set) (var : (Γ : _) (A : _) → Var94 Γ A → Tm94 Γ A) (lam : (Γ : _) (A B : _) → Tm94 (snoc94 Γ A) B → Tm94 Γ (arr94 A B)) (app : (Γ : _) (A B : _) → Tm94 Γ (arr94 A B) → Tm94 Γ A → Tm94 Γ B) → Tm94 Γ A var94 : ∀{Γ A} → Var94 Γ A → Tm94 Γ A;var94 = λ x Tm94 var94 lam app → var94 _ _ x lam94 : ∀{Γ A B} → Tm94 (snoc94 Γ A) B → Tm94 Γ (arr94 A B);lam94 = λ t Tm94 var94 lam94 app → lam94 _ _ _ (t Tm94 var94 lam94 app) app94 : ∀{Γ A B} → Tm94 Γ (arr94 A B) → Tm94 Γ A → Tm94 Γ B;app94 = λ t u Tm94 var94 lam94 app94 → app94 _ _ _ (t Tm94 var94 lam94 app94) (u Tm94 var94 lam94 app94) v094 : ∀{Γ A} → Tm94 (snoc94 Γ A) A;v094 = var94 vz94 v194 : ∀{Γ A B} → Tm94 (snoc94 (snoc94 Γ A) B) A;v194 = var94 (vs94 vz94) v294 : ∀{Γ A B C} → Tm94 (snoc94 (snoc94 (snoc94 Γ A) B) C) A;v294 = var94 (vs94 (vs94 vz94)) v394 : ∀{Γ A B C D} → Tm94 (snoc94 (snoc94 (snoc94 (snoc94 Γ A) B) C) D) A;v394 = var94 (vs94 (vs94 (vs94 vz94))) v494 : ∀{Γ A B C D E} → Tm94 (snoc94 (snoc94 (snoc94 (snoc94 (snoc94 Γ A) B) C) D) E) A;v494 = var94 (vs94 (vs94 (vs94 (vs94 vz94)))) test94 : ∀{Γ A} → Tm94 Γ (arr94 (arr94 A A) (arr94 A A));test94 = lam94 (lam94 (app94 v194 (app94 v194 (app94 v194 (app94 v194 (app94 v194 (app94 v194 v094))))))) {-# OPTIONS --type-in-type #-} Ty95 : Set; Ty95 = (Ty : Set) (ι : Ty) (arr : Ty → Ty → Ty) → Ty ι95 : Ty95; ι95 = λ _ ι95 _ → ι95 arr95 : Ty95 → Ty95 → Ty95; arr95 = λ A B Ty95 ι95 arr95 → arr95 (A Ty95 ι95 arr95) (B Ty95 ι95 arr95) Con95 : Set;Con95 = (Con95 : Set) (nil : Con95) (snoc : Con95 → Ty95 → Con95) → Con95 nil95 : Con95;nil95 = λ Con95 nil95 snoc → nil95 snoc95 : Con95 → Ty95 → Con95;snoc95 = λ Γ A Con95 nil95 snoc95 → snoc95 (Γ Con95 nil95 snoc95) A Var95 : Con95 → Ty95 → Set;Var95 = λ Γ A → (Var95 : Con95 → Ty95 → Set) (vz : (Γ : _)(A : _) → Var95 (snoc95 Γ A) A) (vs : (Γ : _)(B A : _) → Var95 Γ A → Var95 (snoc95 Γ B) A) → Var95 Γ A vz95 : ∀{Γ A} → Var95 (snoc95 Γ A) A;vz95 = λ Var95 vz95 vs → vz95 _ _ vs95 : ∀{Γ B A} → Var95 Γ A → Var95 (snoc95 Γ B) A;vs95 = λ x Var95 vz95 vs95 → vs95 _ _ _ (x Var95 vz95 vs95) Tm95 : Con95 → Ty95 → Set;Tm95 = λ Γ A → (Tm95 : Con95 → Ty95 → Set) (var : (Γ : _) (A : _) → Var95 Γ A → Tm95 Γ A) (lam : (Γ : _) (A B : _) → Tm95 (snoc95 Γ A) B → Tm95 Γ (arr95 A B)) (app : (Γ : _) (A B : _) → Tm95 Γ (arr95 A B) → Tm95 Γ A → Tm95 Γ B) → Tm95 Γ A var95 : ∀{Γ A} → Var95 Γ A → Tm95 Γ A;var95 = λ x Tm95 var95 lam app → var95 _ _ x lam95 : ∀{Γ A B} → Tm95 (snoc95 Γ A) B → Tm95 Γ (arr95 A B);lam95 = λ t Tm95 var95 lam95 app → lam95 _ _ _ (t Tm95 var95 lam95 app) app95 : ∀{Γ A B} → Tm95 Γ (arr95 A B) → Tm95 Γ A → Tm95 Γ B;app95 = λ t u Tm95 var95 lam95 app95 → app95 _ _ _ (t Tm95 var95 lam95 app95) (u Tm95 var95 lam95 app95) v095 : ∀{Γ A} → Tm95 (snoc95 Γ A) A;v095 = var95 vz95 v195 : ∀{Γ A B} → Tm95 (snoc95 (snoc95 Γ A) B) A;v195 = var95 (vs95 vz95) v295 : ∀{Γ A B C} → Tm95 (snoc95 (snoc95 (snoc95 Γ A) B) C) A;v295 = var95 (vs95 (vs95 vz95)) v395 : ∀{Γ A B C D} → Tm95 (snoc95 (snoc95 (snoc95 (snoc95 Γ A) B) C) D) A;v395 = var95 (vs95 (vs95 (vs95 vz95))) v495 : ∀{Γ A B C D E} → Tm95 (snoc95 (snoc95 (snoc95 (snoc95 (snoc95 Γ A) B) C) D) E) A;v495 = var95 (vs95 (vs95 (vs95 (vs95 vz95)))) test95 : ∀{Γ A} → Tm95 Γ (arr95 (arr95 A A) (arr95 A A));test95 = lam95 (lam95 (app95 v195 (app95 v195 (app95 v195 (app95 v195 (app95 v195 (app95 v195 v095)))))))
{ "alphanum_fraction": 0.562504767, "avg_line_length": 30.7724805633, "ext": "agda", "hexsha": "f69aa1908844bebc6b87e659bb856c2cafefdd98", "lang": "Agda", "max_forks_count": 19, "max_forks_repo_forks_event_max_datetime": "2022-03-03T19:46:54.000Z", "max_forks_repo_forks_event_min_datetime": "2018-12-05T21:11:34.000Z", "max_forks_repo_head_hexsha": "6a87f295148bd753d2519d50c2e1011b64c859ff", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "int-index/smalltt", "max_forks_repo_path": "bench/stlc_small5k.agda", "max_issues_count": 3, "max_issues_repo_head_hexsha": "6a87f295148bd753d2519d50c2e1011b64c859ff", "max_issues_repo_issues_event_max_datetime": "2022-02-28T21:51:10.000Z", "max_issues_repo_issues_event_min_datetime": "2020-03-16T09:14:57.000Z", "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "int-index/smalltt", "max_issues_repo_path": "bench/stlc_small5k.agda", "max_line_length": 102, "max_stars_count": 377, "max_stars_repo_head_hexsha": "6a87f295148bd753d2519d50c2e1011b64c859ff", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "int-index/smalltt", "max_stars_repo_path": "bench/stlc_small5k.agda", "max_stars_repo_stars_event_max_datetime": "2022-03-19T21:31:01.000Z", "max_stars_repo_stars_event_min_datetime": "2017-11-26T16:57:16.000Z", "num_tokens": 102625, "size": 209776 }
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.HITs.Truncation.FromNegTwo.Base where open import Cubical.Foundations.Prelude open import Cubical.Foundations.HLevels open import Cubical.Data.Nat open import Cubical.Data.NatMinusOne open import Cubical.HITs.Nullification open import Cubical.HITs.Sn.Base -- For the hub-and-spoke construction discussed in the HoTT book, which doesn't work in the base case -- of contractibility, see `HITs.Truncation.Base`. The definition of truncation here contains -- two more constructors which are redundant when n ≥ 1 but give contractibility when n = 0. -- data hLevelTrunc {ℓ} (n : HLevel) (A : Type ℓ) : Type (ℓ-max ℓ ℓ') where -- -- the hub-and-spoke definition in `Truncation.Base` -- ∣_∣ : A → hLevelTrunc n A -- hub : (f : S (-1+ n) → hLevelTrunc n A) → hLevelTrunc n A -- spoke : (f : S (-1+ n) → hLevelTrunc n A) (s : S) → hub f ≡ f s -- -- two additional constructors needed to ensure that hLevelTrunc 0 A is contractible -- ≡hub : ∀ {x y} (p : S (-1+ n) → x ≡ y) → x ≡ y -- ≡spoke : ∀ {x y} (p : S (-1+ n) → x ≡ y) (s : S (-1+ n)) → ≡hub p ≡ p s hLevelTrunc : ∀ {ℓ} → HLevel → Type ℓ → Type ℓ hLevelTrunc n A = Null (S (-1+ n)) A -- Note that relative to the HoTT book, this notation is off by +2 ∥_∥_ : ∀ {ℓ} → Type ℓ → HLevel → Type ℓ ∥ A ∥ n = hLevelTrunc n A
{ "alphanum_fraction": 0.6553505535, "avg_line_length": 45.1666666667, "ext": "agda", "hexsha": "81cd67508d3685c0c020485132a63a692fe5185d", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "fd8059ec3eed03f8280b4233753d00ad123ffce8", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "dan-iel-lee/cubical", "max_forks_repo_path": "Cubical/HITs/Truncation/FromNegTwo/Base.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "fd8059ec3eed03f8280b4233753d00ad123ffce8", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "dan-iel-lee/cubical", "max_issues_repo_path": "Cubical/HITs/Truncation/FromNegTwo/Base.agda", "max_line_length": 101, "max_stars_count": null, "max_stars_repo_head_hexsha": "fd8059ec3eed03f8280b4233753d00ad123ffce8", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "dan-iel-lee/cubical", "max_stars_repo_path": "Cubical/HITs/Truncation/FromNegTwo/Base.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 486, "size": 1355 }
{-# OPTIONS --safe --warning=error --without-K #-} open import Groups.Definition open import Setoids.Setoids open import Setoids.Subset open import LogicalFormulae open import Sets.EquivalenceRelations open import Groups.Homomorphisms.Definition open import Groups.Homomorphisms.Lemmas open import Groups.Subgroups.Definition open import Groups.Lemmas open import Agda.Primitive using (Level; lzero; lsuc; _⊔_) module Groups.Homomorphisms.Image {a b c d : _} {A : Set a} {B : Set b} {S : Setoid {a} {c} A} {T : Setoid {b} {d} B} {_+A_ : A → A → A} {_+B_ : B → B → B} {G : Group S _+A_} {H : Group T _+B_} {f : A → B} (fHom : GroupHom G H f) where imageGroupPred : B → Set (a ⊔ d) imageGroupPred b = Sg A (λ a → Setoid._∼_ T (f a) b) imageGroupSubset : subset T imageGroupPred imageGroupSubset {x} {y} x=y (a , fa=x) = a , transitive fa=x x=y where open Setoid T open Equivalence eq imageGroupSubgroup : Subgroup H imageGroupPred Subgroup.isSubset imageGroupSubgroup = imageGroupSubset Subgroup.closedUnderPlus imageGroupSubgroup {x} {y} (a , fa=x) (b , fb=y) = (a +A b) , transitive (GroupHom.groupHom fHom) (Group.+WellDefined H fa=x fb=y) where open Setoid T open Equivalence eq Subgroup.containsIdentity imageGroupSubgroup = Group.0G G , imageOfIdentityIsIdentity fHom Subgroup.closedUnderInverse imageGroupSubgroup {x} (a , fa=x) = Group.inverse G a , transitive (homRespectsInverse fHom) (inverseWellDefined H fa=x) where open Setoid T open Equivalence eq
{ "alphanum_fraction": 0.7214428858, "avg_line_length": 40.4594594595, "ext": "agda", "hexsha": "230b4c5aefc1be2a34482c9dd9dc4abd1e418ca3", "lang": "Agda", "max_forks_count": 1, "max_forks_repo_forks_event_max_datetime": "2021-11-29T13:23:07.000Z", "max_forks_repo_forks_event_min_datetime": "2021-11-29T13:23:07.000Z", "max_forks_repo_head_hexsha": "0f4230011039092f58f673abcad8fb0652e6b562", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "Smaug123/agdaproofs", "max_forks_repo_path": "Groups/Homomorphisms/Image.agda", "max_issues_count": 14, "max_issues_repo_head_hexsha": "0f4230011039092f58f673abcad8fb0652e6b562", "max_issues_repo_issues_event_max_datetime": "2020-04-11T11:03:39.000Z", "max_issues_repo_issues_event_min_datetime": "2019-01-06T21:11:59.000Z", "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "Smaug123/agdaproofs", "max_issues_repo_path": "Groups/Homomorphisms/Image.agda", "max_line_length": 235, "max_stars_count": 4, "max_stars_repo_head_hexsha": "0f4230011039092f58f673abcad8fb0652e6b562", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "Smaug123/agdaproofs", "max_stars_repo_path": "Groups/Homomorphisms/Image.agda", "max_stars_repo_stars_event_max_datetime": "2022-01-28T06:04:15.000Z", "max_stars_repo_stars_event_min_datetime": "2019-08-08T12:44:19.000Z", "num_tokens": 487, "size": 1497 }
{-# OPTIONS --cubical --safe #-} module Data.Binary.Literals where open import Data.Binary.Base open import Literals.Number open import Data.Unit open import Data.Nat.Literals instance number𝔹 : Number 𝔹 Number.Constraint number𝔹 = λ _ → ⊤ Number.fromNat number𝔹 = λ n → ⟦ n ⇑⟧
{ "alphanum_fraction": 0.7197231834, "avg_line_length": 18.0625, "ext": "agda", "hexsha": "35599a9aee5e2ed4536317c5e08ddae5d4db930e", "lang": "Agda", "max_forks_count": 1, "max_forks_repo_forks_event_max_datetime": "2021-01-05T14:05:30.000Z", "max_forks_repo_forks_event_min_datetime": "2021-01-05T14:05:30.000Z", "max_forks_repo_head_hexsha": "3c176d4690566d81611080e9378f5a178b39b851", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "oisdk/combinatorics-paper", "max_forks_repo_path": "agda/Data/Binary/Literals.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "3c176d4690566d81611080e9378f5a178b39b851", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "oisdk/combinatorics-paper", "max_issues_repo_path": "agda/Data/Binary/Literals.agda", "max_line_length": 39, "max_stars_count": 4, "max_stars_repo_head_hexsha": "3c176d4690566d81611080e9378f5a178b39b851", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "oisdk/combinatorics-paper", "max_stars_repo_path": "agda/Data/Binary/Literals.agda", "max_stars_repo_stars_event_max_datetime": "2021-01-05T15:32:14.000Z", "max_stars_repo_stars_event_min_datetime": "2021-01-05T14:07:44.000Z", "num_tokens": 88, "size": 289 }