Search is not available for this dataset
text
string
meta
dict
-- Common imports and other auxiliary operations used in the library module SOAS.Common where open import Categories.Category.Instance.Sets public open import Axiom.Extensionality.Propositional using (Extensionality; ExtensionalityImplicit) open import Relation.Binary.PropositionalEquality public hiding (Extensionality) renaming (subst to ≡subst; [_] to ≡[_]) open import Categories.Category public open import Categories.Category.Helper public open import Categories.Functor public renaming (id to idF) open import Categories.NaturalTransformation public using (ntHelper) renaming (NaturalTransformation to NT; id to idN; _∘ᵥ_ to _∘N_) open import Categories.NaturalTransformation.Equivalence using (_≃_) public open import Categories.Morphism using (Iso) public open import Level as L hiding (lift) renaming (suc to lsuc) public open import Function using (flip; case_of_; _∋_) public renaming (_$_ to _$ᶠ_) open import Data.Product public using (_×_; proj₁; proj₂; _,_; Σ; module Σ; Σ-syntax; swap) open import Data.Sum public using (_⊎_ ; inj₁; inj₂) open import Data.Unit public using (tt) -- Unit type data *T : Set where * : *T -- Shorthand for first universe level 1ℓ : Level 1ℓ = lsuc 0ℓ -- Basic function extensionality postulates postulate -- Extensionality with one explicit or implicit argument ext : Extensionality 0ℓ 0ℓ iext : ExtensionalityImplicit 0ℓ 0ℓ -- Functions with two explicit arguments ext² : {A : Set} {B : A → Set}{C : (x : A) → B x → Set} {f g : (x : A) → (y : B x) → C x y} → (∀ x y → f x y ≡ g x y) → (λ x y → f x y) ≡ (λ x y → g x y) ext² p = ext (λ x → ext (λ y → p x y)) -- Functions with one implicit and one explicit argument dext : {A : Set} {B : A → Set}{C : (x : A) → B x → Set} {f g : {x : A} → (y : B x) → C x y} → (∀ {x} y → f {x} y ≡ g {x} y) → (λ {x} y → f {x} y) ≡ (λ {x} y → g {x} y) dext p = iext (ext p) -- Functions with two pairs of implicit-explicit arguments dext² : {A : Set}{B : A → Set}{C : A → A → Set} {D : (x : A) → B x → (y : A) → C x y → Set} {f g : {x : A} → (b : B x) → {y : A} → (c : C x y) → D x b y c} → (∀ {x} b {y} c → f {x} b {y} c ≡ g {x} b {y} c) → (λ {x} b {y} c → f {x} b {y} c) ≡ (λ {x} b {y} c → g {x} b {y} c) dext² p = dext (λ {x} y → dext (p {x} y)) -- Functions with one implicit and one explicit argument where the -- pointwise equality proof does not use the explicit argument dext′ : {A : Set} {B : A → Set}{C : (x : A) → B x → Set} {f g : {x : A} → (y : B x) → C x y} → (∀ {x} {y} → f {x} y ≡ g {x} y) → (λ {x} y → f {x} y) ≡ (λ {x} y → g {x} y) dext′ p = dext (λ {x} y → p {x}{y}) -- Use the naming convention for categories 𝕊ets : Category 1ℓ 0ℓ 0ℓ 𝕊ets = Sets 0ℓ module 𝕊et = Category 𝕊ets -- Make composition and the identity globally accessible open Category (Sets 0ℓ) public using (_∘_; id) -- Set isomorphism shorthands open import Categories.Morphism 𝕊ets public using () renaming ( _≅_ to _≅ₛ_ ; module ≅ to ≅ₛ ; ≅-setoid to ≅ₛ-setoid) -- Congruence with the arguments reversed -- easier to focus on the equalities -- if the congruence environment is very large congr : ∀{ℓ}{A B : Set ℓ}{x y : A} → x ≡ y → (f : A → B) → f x ≡ f y congr refl f = refl
{ "alphanum_fraction": 0.6189172749, "avg_line_length": 36.1318681319, "ext": "agda", "hexsha": "56b9b779b69b5d5bd01acfbcd97a3472a966ca37", "lang": "Agda", "max_forks_count": 4, "max_forks_repo_forks_event_max_datetime": "2022-01-24T12:49:17.000Z", "max_forks_repo_forks_event_min_datetime": "2021-11-09T20:39:59.000Z", "max_forks_repo_head_hexsha": "ff1a985a6be9b780d3ba2beff68e902394f0a9d8", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "JoeyEremondi/agda-soas", "max_forks_repo_path": "SOAS/Common.agda", "max_issues_count": 1, "max_issues_repo_head_hexsha": "ff1a985a6be9b780d3ba2beff68e902394f0a9d8", "max_issues_repo_issues_event_max_datetime": "2021-11-21T12:19:32.000Z", "max_issues_repo_issues_event_min_datetime": "2021-11-21T12:19:32.000Z", "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "JoeyEremondi/agda-soas", "max_issues_repo_path": "SOAS/Common.agda", "max_line_length": 91, "max_stars_count": 39, "max_stars_repo_head_hexsha": "ff1a985a6be9b780d3ba2beff68e902394f0a9d8", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "JoeyEremondi/agda-soas", "max_stars_repo_path": "SOAS/Common.agda", "max_stars_repo_stars_event_max_datetime": "2022-03-19T17:33:12.000Z", "max_stars_repo_stars_event_min_datetime": "2021-11-09T20:39:55.000Z", "num_tokens": 1176, "size": 3288 }
{- Joseph Eremondi Utrecht University Capita Selecta UU# 4229924 July 22, 2015 -} module SemiLin where open import Data.Vec open import Data.Nat import Data.Fin as Fin open import Data.List import Data.List.All open import Data.Bool open import Data.Char open import Data.Maybe open import Data.Product open import Relation.Binary open import Relation.Binary.PropositionalEquality open import Relation.Nullary open import Relation.Nullary.Decidable open import Relation.Binary.Core open import Category.Monad open import Data.Nat.Properties.Simple open import Data.Maybe open import Relation.Binary.PropositionalEquality open ≡-Reasoning open import Utils open import Function import RETypes open import Data.Sum import Data.Nat.Properties.Simple --The Parikh vector for a word is the count of occurrences of --each letter of our alphabet in that word. --We just represent this as a vector of Natural numbers Parikh : ℕ -> Set Parikh n = Vec ℕ n --Scalar multiplication _·ₛ_ : {n : ℕ} -> ℕ -> Parikh n -> Parikh n c ·ₛ [] = [] c ·ₛ (x ∷ vt) = (c * x) ∷ (c ·ₛ vt) --Vector addition _+v_ : {n : ℕ} -> Parikh n -> Parikh n -> Parikh n [] +v [] = [] (x ∷ ut) +v (y ∷ vt) = x + y ∷ ut +v vt --The zero vector v0 : {n : ℕ} -> Parikh n v0 {zero} = [] v0 {suc n} = 0 ∷ v0 --0 times anything is v0 scalar0ident : {n : ℕ} -> (v : Parikh n ) -> 0 ·ₛ v ≡ v0 scalar0ident [] = refl scalar0ident (x ∷ v) = cong (_∷_ zero) (scalar0ident v) --Prove that 0 is a neutral element on the left v0identLeft : {n : ℕ} -> {v : Parikh n} -> v0 +v v ≡ v v0identLeft {v = []} = refl v0identLeft {v = x ∷ v} = let subIdent = v0identLeft {v = v} in cong (λ t → x ∷ t) subIdent --Prove that vector addition is commutative v+-commut : {n : ℕ} -> (u : Parikh n) -> (v : Parikh n) -> (u +v v ≡ v +v u) v+-commut [] [] = refl v+-commut (x ∷ u) (y ∷ v) rewrite +-comm x y | v+-commut u v = refl --Prove the right-identity for vector addition with 0 --Just conbines commutativity and the left identity v0identRight : {n : ℕ} -> {v : Parikh n} -> v +v v0 ≡ v v0identRight {v = v} = begin v +v v0 ≡⟨ v+-commut v v0 ⟩ v0 +v v ≡⟨ v0identLeft ⟩ v ∎ --Prove that vector addition is associative --I couldn't figure out how to get this one working with rewrite vAssoc : {n : ℕ} -> {x : Parikh n} {y : Parikh n} {z : Parikh n} -> (x +v y) +v z ≡ x +v (y +v z) vAssoc {zero} {[]} {[]} {[]} = refl vAssoc {suc n} {xh ∷ xt} {yh ∷ yt} {zh ∷ zt} = let x = xh ∷ xt y = yh ∷ yt z = zh ∷ zt in --_≡⟨_⟩_ begin (x +v y) +v z ≡⟨ refl ⟩ (xh + yh + zh) ∷ (xt +v yt) +v zt ≡⟨ cong (λ h → h ∷ (xt +v yt) +v zt) (+-assoc xh yh zh) ⟩ xh + (yh + zh) ∷ (xt +v yt) +v zt ≡⟨ cong (λ t → xh + (yh + zh) ∷ t) vAssoc ⟩ (xh + (yh + zh) ∷ xt +v (yt +v zt)) ≡⟨ refl ⟩ x +v (y +v z) ∎ -- Wouter: here's one definition using rewrite... vAssoc2 : {n : ℕ} -> {x : Parikh n} {y : Parikh n} {z : Parikh n} -> (x +v y) +v z ≡ x +v (y +v z) vAssoc2 {x = []} {[]} {[]} = refl vAssoc2 {x = x ∷ xs} {y ∷ ys} {z ∷ zs} rewrite +-assoc x y z | vAssoc {x = xs} {y = ys} {z = zs} = refl --Prove that scalar multiplication distributes over vector addition scalarAssoc : {n : ℕ} -> (x y : ℕ ) -> (v : Parikh n) -> (x + y) ·ₛ v ≡ (x ·ₛ v) +v (y ·ₛ v) scalarAssoc x y [] = refl scalarAssoc x y (vfirst ∷ v) rewrite scalarAssoc x y v | distribʳ-*-+ vfirst x y = refl --Handy lemma, prove that 0 + anything is 0 ident0 : (x : ℕ) -> x + 0 ≡ x ident0 zero = refl ident0 (suc x) = cong suc (ident0 x) --Show that 1 is an identity for scalar multiplication scalarIdent : {n : ℕ} -> (v : Parikh n) -> (1 ·ₛ v ≡ v ) scalarIdent [] = refl scalarIdent (x ∷ v) rewrite scalarIdent v | ident0 x = refl --A linear set is defined by an offset vector b --And a set of m vectors v1 ... vm. --A vector u is in a linear set if there exists constants c1 ... cm --such that u = b + c1·v1 + ... + cm·vm -- Wouter -- do you really want to existentially quantify m? -- You could also define LinSet n m = Parikh n × Vec (Parikh n) m -- I don' think it makes a whole lot of difference, but later on in applyLinCom -- you use this anyway. -- For what it's worth, you may want to note that ∃ n . Vec a n is isomorphic to List a LinSet : ℕ -> Set LinSet n = (Parikh n) × (∃ λ (m : ℕ) → Vec (Parikh n) m ) --Given an offset vector, a set of m Parikh vectors, and a set of m constants --Return b + c1·v1 + ... + cm·vm -- Wouter: you might want to consider defining this directly by recursion over the -- cs and vset. The induction you use in this definition will determine how easy/hard -- it might be to reason about this function later. -- See the proof of sumPreserved in SemiLinRE, for instance. applyLinComb : {n : ℕ} -> Parikh n -> (m : ℕ ) -> (Vec (Parikh n) m ) -> Vec ℕ m -> Parikh n applyLinComb base .0 [] cs = base applyLinComb base (suc m) (firstVec ∷ vset) (firstConst ∷ cs) = (firstConst ·ₛ firstVec) +v (applyLinComb base m vset cs) --Show that, if all the coefficients in a linear combination are 0, that the resulting vector is the base (offset) vector v0apply : {n m : ℕ} -> (base : Parikh n) -> (vecs : Vec (Parikh n) m ) -> applyLinComb base m vecs (v0 {m}) ≡ base v0apply base [] = refl v0apply {n} {suc m} base (x ∷ vecs) rewrite scalar0ident x | v0apply base vecs = v0identLeft --A type acting as a witness that a vector is in a linear set --Is just a set of coefficients, and a proof that those coefficients --form v as a linear combination of vectors in our linear set's list LinComb : {n : ℕ} -> Parikh n -> LinSet n -> Set LinComb {n} initV (base , m , vset) = ∃ (λ (cs : Vec ℕ m) -> applyLinComb base m vset cs ≡ initV ) --Sum of each vector in a linear set i.e. L1 + L2 = {x + y | x in L1, y in L2 } --We just add the bases, and concatenate the list of vectors which can be multiplied by constants _+l_ : {n : ℕ} -> LinSet n -> LinSet n -> LinSet n (base1 , m1 , vecs1 ) +l (base2 , m2 , vecs2 ) = (base1 +v base2 , m1 + m2 , vecs1 Data.Vec.++ vecs2 ) --A semi-linear is a finite union of linear sets --We represent this using a list of linear sets SemiLinSet : ℕ -> Set SemiLinSet n = List (LinSet n) --Sum each linear set in the two semi-linear sets --We basically just do a pairwise +l for each linear set in each of the semi-linear sets _+s_ : {n : ℕ} -> SemiLinSet n -> SemiLinSet n -> SemiLinSet n s1 +s s2 = Data.List.concat (Data.List.map (λ l1 -> Data.List.map (λ l2 -> l1 +l l2 ) s2 ) s1 ) --Data type for a witness that an element is in a semiLinear set --Basically just a proof that there's some element (linear set) of the list containing the vector data InSemiLin : {n : ℕ} -> (v : Parikh n) -> (sl : SemiLinSet n) -> Set where InHead : {n : ℕ} -> (v : Parikh n) -> (sh : LinSet n) -> (st : SemiLinSet n) -> LinComb v sh -> InSemiLin v (sh ∷ st) InTail : {n : ℕ} -> (v : Parikh n) -> (sh : LinSet n) -> (st : SemiLinSet n) -> InSemiLin v st -> InSemiLin v (sh ∷ st) --Creates a vector --Which has 1 in the specified component, and 0 elsewhere basis : { n : ℕ} -> ( i : Fin.Fin n ) -> Parikh n basis Fin.zero = Data.Vec.[ suc zero ] Data.Vec.++ v0 basis (Fin.suc f) = 0 ∷ basis f --A proof that if a vector is in a SemiLinear set, then the vector is also in the --union of that SemiLinear set with another single linear set slExtend : {n : ℕ} -> (v : Parikh n) -> (sl : SemiLinSet n) -> InSemiLin v sl -> (ls : LinSet n) -> InSemiLin v (ls ∷ sl ) slExtend v sl inTail ls = InTail v ls sl inTail --the above proof, but extended to an arbitrary number of linear sets slConcatLeft : {n : ℕ} -> (v : Parikh n) -> (sl : SemiLinSet n) -> InSemiLin v sl -> (sl2 : SemiLinSet n) -> InSemiLin v (sl2 Data.List.++ sl ) slConcatLeft v sl inTail [] = inTail slConcatLeft v sl inTail (x ∷ sl2) = InTail v x (sl2 Data.List.++ sl) (slConcatLeft v sl inTail sl2) --The above proof, but the vectors are concatenated on the right slConcatRight : {n : ℕ} -> (v : Parikh n) -> (sl : SemiLinSet n) -> InSemiLin v sl -> (sl2 : SemiLinSet n) -> InSemiLin v (sl Data.List.++ sl2 ) slConcatRight v .(sh ∷ st) (InHead .v sh st x) sl2 = (InHead v sh (st Data.List.++ sl2) x) slConcatRight v .(sh ∷ st) (InTail .v sh st inTail) sl2 = slExtend v (st Data.List.++ sl2) (slConcatRight v st inTail sl2) sh --Show that, if a vector is in a linear-set, then it is in a semi-linear set containing that linear set slCons : {n : ℕ} -> (v : Parikh n) -> (sl : SemiLinSet n) -> (ls : LinSet n) -> (InSemiLin v (ls ∷ [] ) ) -> InSemiLin v (ls ∷ sl ) slCons v sl sh (InHead .v .sh .[] x) = InHead v sh sl x slCons v sl sh (InTail .v .sh .[] ()) --A linear set containing only v0 l0 : {n : ℕ} -> LinSet n l0 = (v0 , zero , [] ) --A semi-linear set containing only v0 s0 : {n : ℕ} -> SemiLinSet n s0 = (v0 , zero , [] ) ∷ [] --Show that, if a vector is in s0, then it must be v0 s0match : {n : ℕ} -> (v : Parikh n) -> InSemiLin v s0 -> v ≡ v0 s0match .v0 (InHead .v0 .(v0 , 0 , []) .[] (comb , refl)) = refl s0match v (InTail .v .(v0 , 0 , []) .[] ()) --Show that if a vector is in a semi-lin set, then it's not the empty list inSemiNonEmtpy : {n : ℕ} -> (v : Parikh n) -> (s : SemiLinSet n) -> InSemiLin v s -> ∃ λ sh -> ∃ λ st -> s ≡ sh ∷ st inSemiNonEmtpy v .(sh ∷ st) (InHead .v sh st x) = sh , st , refl inSemiNonEmtpy v .(sh ∷ st) (InTail .v sh st inSemi) = sh , st , refl -------------Functions for Star ------------------ -- Star is by far the most complicated case, so a large number of definitions and lemmas --Are dedicated to it --Given a linear set L, find another linear set --such that L = L +l (L*) --We do this by allowing the base to appear an arbitrary number of times linStar : {n : ℕ} -> LinSet n -> LinSet n linStar (base , m , vecs ) = (base , suc m , base ∷ vecs ) --Given a non-empty semi-linear set, find the sum of the star --of all linear sets it contains starSum : {n : ℕ} -> LinSet n -> SemiLinSet n -> LinSet n starSum ls [] = linStar ls starSum first (sh ∷ s) = (linStar sh) +l starSum first s --The semi-linear set for the Star of a regular expression --The semi-linear set always contains 0, since the empty string matches r* --We then union s0 with the sum of the star of each linear set --in the Parikh image of r starSemiLin : {n : ℕ} -> SemiLinSet n -> SemiLinSet n starSemiLin [] = s0 starSemiLin (first ∷ s) = s0 Data.List.++ (  starSum first s ∷ []) --Show that v0 is always in a star semi-linear set zeroInStar : {n : ℕ} -> (s ss : SemiLinSet n) -> ss ≡ (starSemiLin s) -> InSemiLin v0 ss zeroInStar [] .((v0 , 0 , []) ∷ []) refl = InHead v0 (v0 , zero , []) [] ([] , refl) zeroInStar (x ∷ s) .((v0 , 0 , []) ∷ starSum x s ∷ []) refl = InHead v0 (v0 , zero , []) (starSum x s ∷ []) ([] , refl) --Show that if we sum two linear sets, then the number of vectors that can be combined --is the sum of the number in each input set linSetLen : {n : ℕ} -> (l1 l2 l3 : LinSet n) -> l1 +l l2 ≡ l3 -> (proj₁ (proj₂ l3)) ≡ (proj₁ (proj₂ l1)) + (proj₁ (proj₂ l2)) linSetLen (proj₁ , m1 , proj₂) (proj₃ , m2 , proj₄) .(proj₁ +v proj₃ , m1 + m2 , proj₂ Data.Vec.++ proj₄) refl = refl --Useful lemma, suc x = x + 1 plusOneDef : ( x : ℕ) -> (suc x ≡ x + 1) plusOneDef zero = refl plusOneDef (suc x) = cong suc (plusOneDef x) --Show that we can "remove" part of the base vector --When making a linear combination baseSplit : {n : ℕ} (ub vb : Parikh n) (vm : ℕ) (vvecs : Vec (Parikh n) vm) (vconsts : Vec ℕ vm) -> applyLinComb (ub +v vb) vm vvecs vconsts ≡ ub +v applyLinComb vb vm vvecs vconsts baseSplit ub vb .0 [] [] = refl baseSplit ub vb (suc m) (x ∷ vvecs) (c ∷ vconsts) = begin applyLinComb (ub +v vb) (suc m) (x ∷ vvecs) (c ∷ vconsts) ≡⟨ refl ⟩ --cong {!!} (baseSplit ub vb _ vvecs vconsts) (c ·ₛ x) +v applyLinComb (ub +v vb) m vvecs vconsts ≡⟨ cong (λ x₁ → (c ·ₛ x) +v x₁) (baseSplit ub vb m vvecs vconsts) ⟩ (c ·ₛ x) +v (ub +v applyLinComb vb m vvecs vconsts) ≡⟨ sym vAssoc ⟩ ((c ·ₛ x) +v ub) +v applyLinComb vb m vvecs vconsts ≡⟨ cong (λ x₁ → x₁ +v applyLinComb vb m vvecs vconsts) (v+-commut (c ·ₛ x) ub) ⟩ (ub +v (c ·ₛ x)) +v applyLinComb vb m vvecs vconsts ≡⟨ vAssoc ⟩ (ub +v ((c ·ₛ x) +v applyLinComb vb m vvecs vconsts) ∎) --If we have two linear combinations of vectors, --That we can make it into a single combination of vectors --By adding the bases, and concatenating the vector lists, and -- concatenating the coefficient lists combSplit : {n : ℕ} (ub vb : Parikh n) (um vm : ℕ) (uvecs : Vec (Parikh n) um) (vvecs : Vec (Parikh n) vm) (uconsts : Vec ℕ um) (vconsts : Vec ℕ vm) -> (applyLinComb (ub +v vb) (um + vm) (uvecs Data.Vec.++ vvecs) (uconsts Data.Vec.++ vconsts) ≡ (applyLinComb ub um uvecs uconsts) +v (applyLinComb vb vm vvecs vconsts) ) combSplit ub vb .0 vm [] vvecs [] vconsts = baseSplit ub vb vm vvecs vconsts combSplit ub vb (suc um) vm (x ∷ uvecs) vvecs (uc ∷ uconsts) vconsts = begin applyLinComb (ub +v vb) (suc (um + vm)) (x ∷ uvecs Data.Vec.++ vvecs) ((uc ∷ uconsts) Data.Vec.++ vconsts) ≡⟨ refl ⟩ (uc ·ₛ x) +v applyLinComb (ub +v vb) (um + vm) (uvecs Data.Vec.++ vvecs) (uconsts Data.Vec.++ vconsts) ≡⟨ cong (λ x₁ → (uc ·ₛ x) +v x₁) (combSplit ub vb um vm uvecs vvecs uconsts vconsts) ⟩ (uc ·ₛ x) +v (applyLinComb ub um uvecs uconsts +v applyLinComb vb vm vvecs vconsts) ≡⟨ sym vAssoc ⟩ ((uc ·ₛ x) +v applyLinComb ub um uvecs uconsts) +v applyLinComb vb vm vvecs vconsts ≡⟨ refl ⟩ (((uc ·ₛ x) +v applyLinComb ub um uvecs uconsts) +v applyLinComb vb vm vvecs vconsts ∎) --Extend the idea of distributivity to linear combinations --Basically, the c1*v +v c2*v = (c1 +v c2 )*v, where * is element-wise product applyCombSum : {n m : ℕ} -> (vecs : Vec (Parikh n) m ) -> (uconsts vconsts : Parikh m ) -> applyLinComb v0 m vecs (uconsts +v vconsts) ≡ applyLinComb v0 m vecs uconsts +v applyLinComb v0 m vecs vconsts applyCombSum [] uconsts vconsts = sym v0identRight applyCombSum {n} {suc m} (firstVec ∷ vecs) (uc ∷ uconsts) (vc ∷ vconsts) rewrite applyCombSum vecs uconsts vconsts | scalarAssoc uc vc firstVec = begin ((uc ·ₛ firstVec) +v (vc ·ₛ firstVec)) +v (applyLinComb v0 m vecs uconsts +v applyLinComb v0 m vecs vconsts) ≡⟨ vAssoc ⟩ (uc ·ₛ firstVec) +v ((vc ·ₛ firstVec) +v (applyLinComb v0 m vecs uconsts +v applyLinComb v0 m vecs vconsts)) ≡⟨ cong (λ x → (uc ·ₛ firstVec) +v x) (v+-commut (vc ·ₛ firstVec) (applyLinComb v0 m vecs uconsts +v applyLinComb v0 m vecs vconsts)) ⟩ (uc ·ₛ firstVec) +v ((applyLinComb v0 m vecs uconsts +v applyLinComb v0 m vecs vconsts) +v (vc ·ₛ firstVec)) ≡⟨ sym vAssoc ⟩ ((uc ·ₛ firstVec) +v (applyLinComb v0 m vecs uconsts +v applyLinComb v0 m vecs vconsts)) +v (vc ·ₛ firstVec) ≡⟨ cong (λ x → x +v (vc ·ₛ firstVec)) (sym vAssoc) ⟩ (((uc ·ₛ firstVec) +v applyLinComb v0 m vecs uconsts) +v applyLinComb v0 m vecs vconsts) +v (vc ·ₛ firstVec) ≡⟨ vAssoc ⟩ ((uc ·ₛ firstVec) +v applyLinComb v0 m vecs uconsts) +v (applyLinComb v0 m vecs vconsts +v (vc ·ₛ firstVec)) ≡⟨ cong (λ x → ((uc ·ₛ firstVec) +v applyLinComb v0 m vecs uconsts) +v x) (v+-commut (applyLinComb v0 m vecs vconsts) (vc ·ₛ firstVec)) ⟩ ((uc ·ₛ firstVec) +v applyLinComb v0 m vecs uconsts) +v ((vc ·ₛ firstVec) +v applyLinComb v0 m vecs vconsts) ∎ --If a linear set has base 0, and u and v are both in that set, then u+v is as well sumEqualVecs : {n : ℕ} -> (ls : LinSet n) -> (proj₁ ls ≡ v0) -> (u v : Parikh n) -> LinComb u ls -> LinComb v ls -> LinComb (u +v v) ls sumEqualVecs (.v0 , m , vecs) refl .(applyLinComb v0 m vecs uconsts) .(applyLinComb v0 m vecs vconsts) (uconsts , refl) (vconsts , refl) = (uconsts +v vconsts) , applyCombSum vecs uconsts vconsts --applyCombSum {!!} {!!} vecs uconsts vconsts --Show that the base vector of a linear set is always in that set, just set coefficients to 0 linContainsBase : {n : ℕ} -> (base : Parikh n) -> (m : ℕ ) -> (vecs : Vec (Parikh n) m ) -> applyLinComb base m vecs v0 ≡ base linContainsBase base .0 [] = refl linContainsBase base (suc m) (x ∷ vecs) rewrite linContainsBase base m vecs = begin (zero ·ₛ x) +v base ≡⟨ cong (λ y → y +v base) (scalar0ident x) ⟩ v0 +v base ≡⟨ v0identLeft ⟩ (base ∎) --Show that applying a linear combination with the base is just --The base, plus the linear combination with v0 base --Just a useful lemma for other proofs, basically uses associativity linCombRemoveBase : {n : ℕ} -> (m : ℕ ) -> (base : Parikh n ) -> (vecs : Vec (Parikh n) m ) -> (c : Parikh m) -> applyLinComb base m vecs c ≡ base +v applyLinComb v0 m vecs c linCombRemoveBase {n} m base vecs c = begin applyLinComb base m vecs c ≡⟨ cong (λ x → applyLinComb x m vecs c) (sym v0identRight) ⟩ applyLinComb (base +v v0) m vecs c ≡⟨ baseSplit base v0 m vecs c ⟩ base +v applyLinComb v0 m vecs c ∎ --Show that only v0 is in a set with no vectors and v0 base emptyCombZero : {n : ℕ} -> (v : Parikh n ) -> LinComb v (v0 , 0 , []) -> v ≡ v0 emptyCombZero .v0 ([] , refl) = refl --Show that when we add two linear combinations of the same vectors together, --We get a linear combination of those vectors, with an extra base left-over linCombDecompBase : {n : ℕ} -> (m : ℕ ) -> (base : Parikh n ) -> (vecs : Vec (Parikh n) m ) -> (c1 : Parikh m ) -> (c2 : Parikh m) -> (applyLinComb base m vecs c1 ) +v (applyLinComb base m vecs c2 ) ≡ base +v applyLinComb base m vecs (c1 +v c2) linCombDecompBase .0 base [] c1 c2 = refl linCombDecompBase (suc m) base (vec1 ∷ vecs) (c ∷ c1) (cc ∷ c2) rewrite linCombDecompBase m base vecs c1 c2 | linCombRemoveBase m base vecs c1 | linCombRemoveBase m base vecs c2 = begin ((c ·ₛ vec1) +v (base +v applyLinComb v0 m vecs c1)) +v ((cc ·ₛ vec1) +v (base +v applyLinComb v0 m vecs c2)) ≡⟨ cong (λ x → x +v ((cc ·ₛ vec1) +v (base +v applyLinComb v0 m vecs c2))) (sym vAssoc ) ⟩ (((c ·ₛ vec1) +v base) +v applyLinComb v0 m vecs c1) +v ((cc ·ₛ vec1) +v (base +v applyLinComb v0 m vecs c2)) ≡⟨ cong (λ x → (x +v applyLinComb v0 m vecs c1) +v ((cc ·ₛ vec1) +v (base +v applyLinComb v0 m vecs c2))) (v+-commut (c ·ₛ vec1) base) ⟩ ((base +v (c ·ₛ vec1)) +v applyLinComb v0 m vecs c1) +v ((cc ·ₛ vec1) +v (base +v applyLinComb v0 m vecs c2)) ≡⟨ cong (λ x → x +v ((cc ·ₛ vec1) +v (base +v applyLinComb v0 m vecs c2))) vAssoc ⟩ (base +v ((c ·ₛ vec1) +v applyLinComb v0 m vecs c1)) +v ((cc ·ₛ vec1) +v (base +v applyLinComb v0 m vecs c2)) ≡⟨ vAssoc ⟩ base +v (((c ·ₛ vec1) +v applyLinComb v0 m vecs c1) +v ((cc ·ₛ vec1) +v (base +v applyLinComb v0 m vecs c2))) ≡⟨ cong (λ x → base +v (((c ·ₛ vec1) +v applyLinComb v0 m vecs c1) +v x)) (sym vAssoc) ⟩ base +v (((c ·ₛ vec1) +v applyLinComb v0 m vecs c1) +v (((cc ·ₛ vec1) +v base) +v applyLinComb v0 m vecs c2)) ≡⟨ cong (λ x → base +v (((c ·ₛ vec1) +v applyLinComb v0 m vecs c1) +v (x +v applyLinComb v0 m vecs c2))) (v+-commut (cc ·ₛ vec1) base) ⟩ base +v (((c ·ₛ vec1) +v applyLinComb v0 m vecs c1) +v ((base +v (cc ·ₛ vec1)) +v applyLinComb v0 m vecs c2)) ≡⟨ cong (λ x → base +v x) vAssoc ⟩ base +v ((c ·ₛ vec1) +v (applyLinComb v0 m vecs c1 +v ((base +v (cc ·ₛ vec1)) +v applyLinComb v0 m vecs c2))) ≡⟨ cong (λ x → base +v ((c ·ₛ vec1) +v x)) (sym vAssoc) ⟩ base +v ((c ·ₛ vec1) +v ((applyLinComb v0 m vecs c1 +v (base +v (cc ·ₛ vec1))) +v applyLinComb v0 m vecs c2)) ≡⟨ cong (λ x → base +v ((c ·ₛ vec1) +v (x +v applyLinComb v0 m vecs c2))) (v+-commut (applyLinComb v0 m vecs c1) (base +v (cc ·ₛ vec1))) ⟩ base +v ((c ·ₛ vec1) +v (((base +v (cc ·ₛ vec1)) +v applyLinComb v0 m vecs c1) +v applyLinComb v0 m vecs c2)) ≡⟨ cong (λ x → base +v ((c ·ₛ vec1) +v x)) vAssoc ⟩ base +v ((c ·ₛ vec1) +v ((base +v (cc ·ₛ vec1)) +v (applyLinComb v0 m vecs c1 +v applyLinComb v0 m vecs c2))) ≡⟨ cong (λ x → base +v ((c ·ₛ vec1) +v ((base +v (cc ·ₛ vec1)) +v x))) (sym (applyCombSum vecs c1 c2)) ⟩ base +v ((c ·ₛ vec1) +v ((base +v (cc ·ₛ vec1)) +v applyLinComb v0 m vecs (c1 +v c2))) ≡⟨ cong (λ x → base +v x) (sym vAssoc) ⟩ base +v (((c ·ₛ vec1) +v (base +v (cc ·ₛ vec1))) +v applyLinComb v0 m vecs (c1 +v c2)) ≡⟨ cong (λ x → base +v (x +v applyLinComb v0 m vecs (c1 +v c2))) (sym vAssoc) ⟩ base +v ((((c ·ₛ vec1) +v base) +v (cc ·ₛ vec1)) +v applyLinComb v0 m vecs (c1 +v c2)) ≡⟨ cong (λ x → base +v ((x +v (cc ·ₛ vec1)) +v applyLinComb v0 m vecs (c1 +v c2))) (v+-commut (c ·ₛ vec1) base) ⟩ base +v (((base +v (c ·ₛ vec1)) +v (cc ·ₛ vec1)) +v applyLinComb v0 m vecs (c1 +v c2)) ≡⟨ cong (λ x → base +v (x +v applyLinComb v0 m vecs (c1 +v c2))) vAssoc ⟩ base +v ((base +v ((c ·ₛ vec1) +v (cc ·ₛ vec1))) +v applyLinComb v0 m vecs (c1 +v c2)) ≡⟨ cong (λ x → base +v ((base +v x) +v applyLinComb v0 m vecs (c1 +v c2))) (sym (scalarAssoc c cc vec1)) ⟩ base +v ((base +v ((c + cc) ·ₛ vec1)) +v applyLinComb v0 m vecs (c1 +v c2)) ≡⟨ cong (λ x → base +v (x +v applyLinComb v0 m vecs (c1 +v c2))) (v+-commut base ((c + cc) ·ₛ vec1)) ⟩ base +v ((((c + cc) ·ₛ vec1) +v base) +v applyLinComb v0 m vecs (c1 +v c2)) ≡⟨ cong (λ x → base +v x) vAssoc ⟩ base +v (((c + cc) ·ₛ vec1) +v (base +v applyLinComb v0 m vecs (c1 +v c2))) ≡⟨ cong (λ x → base +v (((c + cc) ·ₛ vec1) +v x)) (sym (baseSplit base v0 m vecs (c1 +v c2))) ⟩ base +v (((c + cc) ·ₛ vec1) +v applyLinComb (base +v v0) m vecs (c1 +v c2)) ≡⟨ cong (λ x → base +v (((c + cc) ·ₛ vec1) +v applyLinComb x m vecs (c1 +v c2))) v0identRight ⟩ base +v (((c + cc) ·ₛ vec1) +v applyLinComb base m vecs (c1 +v c2)) ≡⟨ cong (λ x → base +v x) refl ⟩ (base +v (((c + cc) ·ₛ vec1) +v applyLinComb base m vecs (c1 +v c2)) ∎) --Show that, if v1 is in L, and v2 is in L*, then v1 +v v2 is in L* --Can be used to show that the sum of any vectors from L will be in L* linStarExtend : {n : ℕ} -> (v1 v2 : Parikh n ) -> (l1 ls : LinSet n ) -> ls ≡ linStar l1 -> LinComb v1 l1 -> LinComb v2 ls -> LinComb (v1 +v v2) ls linStarExtend .(applyLinComb base m vecs c1) .((c2h ·ₛ base) +v applyLinComb base m vecs c2) (base , m , vecs) .(base , suc m , base ∷ vecs) refl (c1 , refl) (c2h ∷ c2 , refl) = ((1 ∷ c1) +v (c2h ∷ c2)) , (begin (suc c2h ·ₛ base) +v applyLinComb base m vecs (c1 +v c2) ≡⟨ cong (λ x → (x ·ₛ base) +v applyLinComb base m vecs (c1 +v c2)) refl ⟩ ((1 + c2h) ·ₛ base) +v applyLinComb base m vecs (c1 +v c2) ≡⟨ cong (λ x → (x ·ₛ base) +v applyLinComb base m vecs (c1 +v c2)) (+-comm (suc zero) c2h) ⟩ ((c2h + 1) ·ₛ base) +v applyLinComb base m vecs (c1 +v c2) ≡⟨ cong (λ x → x +v applyLinComb base m vecs (c1 +v c2)) (scalarAssoc c2h 1 base) ⟩ ((c2h ·ₛ base) +v (1 ·ₛ base)) +v applyLinComb base m vecs (c1 +v c2) ≡⟨ cong (λ x → ((c2h ·ₛ base) +v x) +v applyLinComb base m vecs (c1 +v c2)) (scalarIdent base) ⟩ ((c2h ·ₛ base) +v base) +v applyLinComb base m vecs (c1 +v c2) ≡⟨ vAssoc ⟩ (c2h ·ₛ base) +v (base +v applyLinComb base m vecs (c1 +v c2)) ≡⟨ cong (λ x → (c2h ·ₛ base) +v x) (sym (linCombDecompBase m base vecs c1 c2)) ⟩ (c2h ·ₛ base) +v (applyLinComb base m vecs c1 +v applyLinComb base m vecs c2) ≡⟨ cong (λ x → (c2h ·ₛ base) +v x) (v+-commut (applyLinComb base m vecs c1) (applyLinComb base m vecs c2)) ⟩ (c2h ·ₛ base) +v (applyLinComb base m vecs c2 +v applyLinComb base m vecs c1) ≡⟨ sym vAssoc ⟩ ((c2h ·ₛ base) +v applyLinComb base m vecs c2) +v applyLinComb base m vecs c1 ≡⟨ cong (λ x → x +v applyLinComb base m vecs c1 ) refl ⟩ (applyLinComb base (suc m) (base ∷ vecs) (c2h ∷ c2)) +v applyLinComb base m vecs c1 ≡⟨ v+-commut ((c2h ·ₛ base) +v applyLinComb base m vecs c2) (applyLinComb base m vecs c1) ⟩ applyLinComb base m vecs c1 +v ((c2h ·ₛ base) +v applyLinComb base m vecs c2) ∎ ) --Show that every non-empty vector in L* for a linear-set L --Can be split into a vector from L and another in L* --Basically proves that L* contains only sums of vectors in L linStarDecomp : {n : ℕ} -> (v : Parikh n) -> (l ls : LinSet n) -> v ≢ v0 -> proj₁ (l) ≢ v0 -> ls ≡ linStar l -> LinComb v ls -> LinComb v l ⊎ (∃ λ v1 -> ∃ λ v2 -> v1 +v v2 ≡ v × LinComb v1 l × LinComb v2 ls × v1 ≢ v0 ) linStarDecomp .((0 ·ₛ base) +v applyLinComb base m vecs c) (base , m , vecs) .(base , suc m , base ∷ vecs) vnz bnz refl (zero ∷ c , refl) rewrite scalar0ident base = inj₁ (c , (sym v0identLeft)) linStarDecomp .((suc cbase ·ₛ base) +v applyLinComb base m vecs c) (base , m , vecs) .(base , suc m , base ∷ vecs) vnz bnz refl (suc cbase ∷ c , refl) = inj₂ ( base , (applyLinComb base (suc m) (base ∷ vecs) (cbase ∷ c)) , (sym (begin -- ? ≡⟨ ? ⟩ ? (suc cbase ·ₛ base) +v applyLinComb base m vecs c ≡⟨ cong (λ x → x +v applyLinComb base m vecs c) refl ⟩ ((1 + cbase) ·ₛ base) +v applyLinComb base m vecs c ≡⟨ cong (λ x → x +v applyLinComb base m vecs c) (scalarAssoc 1 cbase base) ⟩ ((suc zero ·ₛ base) +v (cbase ·ₛ base)) +v applyLinComb base m vecs c ≡⟨ cong (λ x → (x +v (cbase ·ₛ base)) +v applyLinComb base m vecs c) (scalarIdent base) ⟩ (base +v (cbase ·ₛ base)) +v applyLinComb base m vecs c ≡⟨ vAssoc ⟩ base +v ((cbase ·ₛ base) +v applyLinComb base m vecs c) ≡⟨ refl ⟩ (base +v ((cbase ·ₛ base) +v applyLinComb base m vecs c) ∎))) , (v0 , linContainsBase base m vecs) , ((cbase ∷ c) , refl) , bnz )
{ "alphanum_fraction": 0.6082417797, "avg_line_length": 41.2532258065, "ext": "agda", "hexsha": "701579711f0a559c3c97158793d6b41b5b55eb3e", "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": "1e28103ff7dd1d4f3351ef21397833aa4490b7ea", "max_forks_repo_licenses": [ "BSD-3-Clause" ], "max_forks_repo_name": "JoeyEremondi/agda-parikh", "max_forks_repo_path": "SemiLin.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "1e28103ff7dd1d4f3351ef21397833aa4490b7ea", "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": "JoeyEremondi/agda-parikh", "max_issues_repo_path": "SemiLin.agda", "max_line_length": 223, "max_stars_count": null, "max_stars_repo_head_hexsha": "1e28103ff7dd1d4f3351ef21397833aa4490b7ea", "max_stars_repo_licenses": [ "BSD-3-Clause" ], "max_stars_repo_name": "JoeyEremondi/agda-parikh", "max_stars_repo_path": "SemiLin.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 10210, "size": 25577 }
{-# OPTIONS --without-K --rewriting #-} open import HoTT open import homotopy.elims.SuspSmash open import homotopy.elims.CofPushoutSection -- Σ(X∧Y) ≃ X * Y module homotopy.SuspSmash {i j} (X : Ptd i) (Y : Ptd j) where private {- path lemmas -} private reduce-x : ∀ {i} {A : Type i} {x y z : A} (p : x == y) (q : z == y) → p ∙ ! q ∙ q ∙ ! p ∙ p == p reduce-x idp idp = idp reduce-y : ∀ {i} {A : Type i} {x y z : A} (p : x == y) (q : x == z) → p ∙ ! p ∙ q ∙ ! q ∙ p == p reduce-y idp idp = idp module Into = SuspRec {A = Smash X Y} {C = de⊙ X * de⊙ Y} (left (pt X)) (right (pt Y)) (Smash-rec (λ x y → jglue (pt X) (pt Y) ∙ ! (jglue x (pt Y)) ∙ jglue x y ∙ ! (jglue (pt X) y) ∙ jglue (pt X) (pt Y)) (jglue (pt X) (pt Y)) (jglue (pt X) (pt Y)) (λ x → reduce-x (jglue (pt X) (pt Y)) (jglue x (pt Y))) (λ y → reduce-y (jglue (pt X) (pt Y)) (jglue (pt X) y))) into = Into.f module Out = JoinRec {C = Susp (Smash X Y)} (λ _ → north) (λ _ → south) (λ x y → merid (smin x y)) out = Out.f abstract into-out : (j : de⊙ X * de⊙ Y) → into (out j) == j into-out = Join-elim (λ x → glue (pt X , pt Y) ∙ ! (glue (x , pt Y))) (λ y → ! (glue (pt X , pt Y)) ∙ glue (pt X , y)) (λ x y → ↓-∘=idf-from-square into out $ (ap (ap into) (Out.glue-β x y) ∙ Into.merid-β (smin x y)) ∙v⊡ lemma (glue (pt X , pt Y)) (glue (x , pt Y)) (glue (pt X , y)) (glue (x , y))) where lemma : ∀ {i} {A : Type i} {x y z w : A} (p : x == y) (q : z == y) (r : x == w) (s : z == w) → Square (p ∙ ! q) (p ∙ ! q ∙ s ∙ ! r ∙ p) s (! p ∙ r) lemma idp idp idp s = vert-degen-square (∙-unit-r s) out-into : (σ : Susp (Smash X Y)) → out (into σ) == σ out-into = SuspSmash-elim idp idp (λ x y → ↓-∘=idf-in' out into $ ap (ap out) (Into.merid-β (smin x y)) ∙ lemma₁ out (Out.glue-β (pt X) (pt Y)) (Out.glue-β x (pt Y)) (Out.glue-β x y) (Out.glue-β (pt X) y) (Out.glue-β (pt X) (pt Y)) ∙ lemma₂ {p = merid (smin (pt X) (pt Y))} {q = merid (smin x (pt Y))} {r = merid (smin x y)} {s = merid (smin (pt X) y)} {t = merid (smin (pt X) (pt Y))} (ap merid (smgluel (pt X) ∙ ! (smgluel x))) (ap merid (smgluer y ∙ ! (smgluer (pt Y))))) where lemma₁ : ∀ {i j} {A : Type i} {B : Type j} (f : A → B) {x y z u v w : A} {p : x == y} {q : z == y} {r : z == u} {s : v == u} {t : v == w} {p' : f x == f y} {q' : f z == f y} {r' : f z == f u} {s' : f v == f u} {t' : f v == f w} (α : ap f p == p') (β : ap f q == q') (γ : ap f r == r') (δ : ap f s == s') (ε : ap f t == t') → ap f (p ∙ ! q ∙ r ∙ ! s ∙ t) == p' ∙ ! q' ∙ r' ∙ ! s' ∙ t' lemma₁ f {p = idp} {q = idp} {r = idp} {s = idp} {t = idp} idp idp idp idp idp = idp lemma₂ : ∀ {i} {A : Type i} {x y z u : A} {p q : x == y} {r : x == z} {s t : u == z} (α : p == q) (β : s == t) → p ∙ ! q ∙ r ∙ ! s ∙ t == r lemma₂ {p = idp} {r = idp} {s = idp} idp idp = idp module SuspSmash where eq : Susp (Smash X Y) ≃ (de⊙ X * de⊙ Y) eq = equiv into out into-out out-into ⊙eq : ⊙Susp (⊙Smash X Y) ⊙≃ (X ⊙* Y) ⊙eq = ≃-to-⊙≃ eq idp
{ "alphanum_fraction": 0.4, "avg_line_length": 32.5925925926, "ext": "agda", "hexsha": "0a50238da090830a3e47c5f144a5040527194426", "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": "66f800adef943afdf08c17b8ecfba67340fead5e", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "timjb/HoTT-Agda", "max_forks_repo_path": "theorems/homotopy/SuspSmash.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "66f800adef943afdf08c17b8ecfba67340fead5e", "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": "timjb/HoTT-Agda", "max_issues_repo_path": "theorems/homotopy/SuspSmash.agda", "max_line_length": 72, "max_stars_count": null, "max_stars_repo_head_hexsha": "66f800adef943afdf08c17b8ecfba67340fead5e", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "timjb/HoTT-Agda", "max_stars_repo_path": "theorems/homotopy/SuspSmash.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 1515, "size": 3520 }
{-# OPTIONS --without-K --safe #-} module Algebra.Linear.Structures.Bundles.FiniteDimensional where open import Algebra open import Algebra.FunctionProperties open import Relation.Binary using (Rel) open import Level using (Level; suc; _⊔_) open import Algebra.Structures.Bundles.Field open import Algebra.Linear.Structures.Bundles open import Algebra.Linear.Structures.VectorSpace open import Algebra.Linear.Structures.FiniteDimensional open import Data.Nat using (ℕ) record FiniteDimensional {k ℓᵏ} (K : Field k ℓᵏ) (c ℓ : Level) (n : ℕ) : Set (suc (c ⊔ k ⊔ ℓ ⊔ ℓᵏ)) where field Carrier : Set c _≈_ : Rel Carrier ℓ _+_ : Carrier -> Carrier -> Carrier _∙_ : Field.Carrier K -> Carrier -> Carrier -_ : Carrier -> Carrier 0# : Carrier isFiniteDimensional : IsFiniteDimensional K _≈_ _+_ _∙_ -_ 0# n open IsFiniteDimensional isFiniteDimensional public vectorSpace : VectorSpace K c ℓ vectorSpace = record { isVectorSpace = isVectorSpace }
{ "alphanum_fraction": 0.6651162791, "avg_line_length": 33.59375, "ext": "agda", "hexsha": "88ae379b671a05267b4629986ba02fc053247656", "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": "d87c5a1eb5dd0569238272e67bce1899616b789a", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "felko/linear-algebra", "max_forks_repo_path": "src/Algebra/Linear/Structures/Bundles/FiniteDimensional.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "d87c5a1eb5dd0569238272e67bce1899616b789a", "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": "felko/linear-algebra", "max_issues_repo_path": "src/Algebra/Linear/Structures/Bundles/FiniteDimensional.agda", "max_line_length": 105, "max_stars_count": 15, "max_stars_repo_head_hexsha": "d87c5a1eb5dd0569238272e67bce1899616b789a", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "felko/linear-algebra", "max_stars_repo_path": "src/Algebra/Linear/Structures/Bundles/FiniteDimensional.agda", "max_stars_repo_stars_event_max_datetime": "2020-12-30T06:18:08.000Z", "max_stars_repo_stars_event_min_datetime": "2019-11-02T14:11:00.000Z", "num_tokens": 294, "size": 1075 }
module Data.Word64.Exts where open import Agda.Builtin.Nat open import Agda.Builtin.Word open import Data.Nat open import Data.Word addWord : Word64 → Word64 → Word64 addWord a b = primWord64FromNat (primWord64ToNat a + primWord64ToNat b) subWord : Word64 → Word64 → Word64 subWord a b = primWord64FromNat (primWord64ToNat a - primWord64ToNat b)
{ "alphanum_fraction": 0.787965616, "avg_line_length": 26.8461538462, "ext": "agda", "hexsha": "2b046bf3e98e69ca016f6ed9e2a675c4f709dea0", "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": "stdlib-exts/Data/Word64/Exts.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": "stdlib-exts/Data/Word64/Exts.agda", "max_line_length": 71, "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": "stdlib-exts/Data/Word64/Exts.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": 110, "size": 349 }
open import Level hiding ( suc ; zero ) open import Algebra module sym5 where open import Symmetric open import Data.Unit using (⊤ ; tt ) open import Function.Inverse as Inverse using (_↔_; Inverse; _InverseOf_) open import Function hiding (flip) open import Data.Nat hiding (_⊔_) -- using (ℕ; suc; zero) open import Data.Nat.Properties open import Relation.Nullary open import Data.Empty open import Data.Product open import Gutil open import Putil open import Solvable using (solvable) open import Relation.Binary.PropositionalEquality hiding ( [_] ) open import Data.Fin hiding (_<_ ; _≤_ ; lift ) open import Data.Fin.Permutation hiding (_∘ₚ_) infixr 200 _∘ₚ_ _∘ₚ_ = Data.Fin.Permutation._∘ₚ_ open import Data.List hiding ( [_] ) open import nat open import fin open import logic open _∧_ ¬sym5solvable : ¬ ( solvable (Symmetric 5) ) ¬sym5solvable sol = counter-example (end5 (abc 0<3 0<4 ) (dervie-any-3rot0 (dervied-length sol) 0<3 0<4 ) ) where -- -- dba 1320 d → b → a → d -- (dba)⁻¹ 3021 a → b → d → a -- aec 21430 -- (aec)⁻¹ 41032 -- [ dba , aec ] = (abd)(cea)(dba)(aec) = abc -- so commutator always contains abc, dba and aec open ≡-Reasoning open solvable open Solvable ( Symmetric 5) end5 : (x : Permutation 5 5) → deriving (dervied-length sol) x → x =p= pid end5 x der = end sol x der 0<4 : 0 < 4 0<4 = s≤s z≤n 0<3 : 0 < 3 0<3 = s≤s z≤n --- 1 ∷ 2 ∷ 0 ∷ [] abc 3rot : Permutation 3 3 3rot = pid {3} ∘ₚ pins (n≤ 2) save2 : {i j : ℕ } → (i ≤ 3 ) → ( j ≤ 4 ) → Permutation 5 5 save2 i<3 j<4 = flip (pins (s≤s i<3)) ∘ₚ flip (pins j<4) ins2 : {i j : ℕ } → Permutation 3 3 → (i ≤ 3 ) → ( j ≤ 4 ) → Permutation 5 5 ins2 abc i<3 j<4 = (save2 i<3 j<4 ∘ₚ (pprep (pprep abc))) ∘ₚ flip (save2 i<3 j<4 ) ins2cong : {i j : ℕ } → {x y : Permutation 3 3 } → {i<3 : i ≤ 3 } → {j<4 : j ≤ 4 } → x =p= y → ins2 x i<3 j<4 =p= ins2 y i<3 j<4 ins2cong {i} {j} {x} {y} {i<3} {j<4} x=y = presp {5} {save2 i<3 j<4 ∘ₚ (pprep (pprep x))} {_} {flip (save2 i<3 j<4 )} (presp {5} {save2 i<3 j<4} prefl (pprep-cong (pprep-cong x=y)) ) prefl open _=p=_ abc : {i j : ℕ } → (i ≤ 3 ) → ( j ≤ 4 ) → Permutation 5 5 abc i<3 j<4 = ins2 3rot i<3 j<4 dba : {i j : ℕ } → (i ≤ 3 ) → ( j ≤ 4 ) → Permutation 5 5 dba i<3 j<4 = ins2 (3rot ∘ₚ 3rot) i<3 j<4 counter-example : ¬ (abc 0<3 0<4 =p= pid ) counter-example eq with ←pleq _ _ eq ... | () record Triple {i j : ℕ } (i<3 : i ≤ 3) (j<4 : j ≤ 4) (rot : Permutation 3 3) : Set where field dba0<3 : Fin 4 dba1<4 : Fin 5 aec0<3 : Fin 4 aec1<4 : Fin 5 abc= : ins2 rot i<3 j<4 =p= [ ins2 (rot ∘ₚ rot) (fin≤n {3} dba0<3) (fin≤n {4} dba1<4) , ins2 (rot ∘ₚ rot) (fin≤n {3} aec0<3) (fin≤n {4} aec1<4) ] open Triple triple : {i j : ℕ } → (i<3 : i ≤ 3) (j<4 : j ≤ 4) → Triple i<3 j<4 3rot triple z≤n z≤n = record { dba0<3 = # 0 ; dba1<4 = # 4 ; aec0<3 = # 2 ; aec1<4 = # 0 ; abc= = pleq _ _ refl } triple z≤n (s≤s z≤n) = record { dba0<3 = # 0 ; dba1<4 = # 4 ; aec0<3 = # 2 ; aec1<4 = # 0 ; abc= = pleq _ _ refl } triple z≤n (s≤s (s≤s z≤n)) = record { dba0<3 = # 1 ; dba1<4 = # 0 ; aec0<3 = # 3 ; aec1<4 = # 2 ; abc= = pleq _ _ refl } triple z≤n (s≤s (s≤s (s≤s z≤n))) = record { dba0<3 = # 1 ; dba1<4 = # 3 ; aec0<3 = # 0 ; aec1<4 = # 0 ; abc= = pleq _ _ refl } triple z≤n (s≤s (s≤s (s≤s (s≤s z≤n)))) = record { dba0<3 = # 0 ; dba1<4 = # 0 ; aec0<3 = # 2 ; aec1<4 = # 4 ; abc= = pleq _ _ refl } triple (s≤s z≤n) z≤n = record { dba0<3 = # 0 ; dba1<4 = # 2 ; aec0<3 = # 3 ; aec1<4 = # 1 ; abc= = pleq _ _ refl } triple (s≤s z≤n) (s≤s z≤n) = record { dba0<3 = # 0 ; dba1<4 = # 2 ; aec0<3 = # 3 ; aec1<4 = # 1 ; abc= = pleq _ _ refl } triple (s≤s z≤n) (s≤s (s≤s z≤n)) = record { dba0<3 = # 1 ; dba1<4 = # 0 ; aec0<3 = # 3 ; aec1<4 = # 2 ; abc= = pleq _ _ refl } triple (s≤s z≤n) (s≤s (s≤s (s≤s z≤n))) = record { dba0<3 = # 0 ; dba1<4 = # 3 ; aec0<3 = # 1 ; aec1<4 = # 0 ; abc= = pleq _ _ refl } triple (s≤s z≤n) (s≤s (s≤s (s≤s (s≤s z≤n)))) = record { dba0<3 = # 2 ; dba1<4 = # 4 ; aec0<3 = # 0 ; aec1<4 = # 2 ; abc= = pleq _ _ refl } triple (s≤s (s≤s z≤n)) z≤n = record { dba0<3 = # 3 ; dba1<4 = # 0 ; aec0<3 = # 1 ; aec1<4 = # 3 ; abc= = pleq _ _ refl } triple (s≤s (s≤s z≤n)) (s≤s z≤n) = record { dba0<3 = # 3 ; dba1<4 = # 0 ; aec0<3 = # 1 ; aec1<4 = # 3 ; abc= = pleq _ _ refl } triple (s≤s (s≤s z≤n)) (s≤s (s≤s z≤n)) = record { dba0<3 = # 1 ; dba1<4 = # 3 ; aec0<3 = # 0 ; aec1<4 = # 0 ; abc= = pleq _ _ refl } triple (s≤s (s≤s z≤n)) (s≤s (s≤s (s≤s z≤n))) = record { dba0<3 = # 0 ; dba1<4 = # 3 ; aec0<3 = # 1 ; aec1<4 = # 0 ; abc= = pleq _ _ refl } triple (s≤s (s≤s z≤n)) (s≤s (s≤s (s≤s (s≤s z≤n)))) = record { dba0<3 = # 1 ; dba1<4 = # 4 ; aec0<3 = # 2 ; aec1<4 = # 2 ; abc= = pleq _ _ refl } triple (s≤s (s≤s (s≤s z≤n))) z≤n = record { dba0<3 = # 2 ; dba1<4 = # 4 ; aec0<3 = # 1 ; aec1<4 = # 0 ; abc= = pleq _ _ refl } triple (s≤s (s≤s (s≤s z≤n))) (s≤s z≤n) = record { dba0<3 = # 2 ; dba1<4 = # 4 ; aec0<3 = # 1 ; aec1<4 = # 0 ; abc= = pleq _ _ refl } triple (s≤s (s≤s (s≤s z≤n))) (s≤s (s≤s z≤n)) = record { dba0<3 = # 0 ; dba1<4 = # 0 ; aec0<3 = # 2 ; aec1<4 = # 4 ; abc= = pleq _ _ refl } triple (s≤s (s≤s (s≤s z≤n))) (s≤s (s≤s (s≤s z≤n))) = record { dba0<3 = # 2 ; dba1<4 = # 4 ; aec0<3 = # 0 ; aec1<4 = # 2 ; abc= = pleq _ _ refl } triple (s≤s (s≤s (s≤s z≤n))) (s≤s (s≤s (s≤s (s≤s z≤n)))) = record { dba0<3 = # 1 ; dba1<4 = # 4 ; aec0<3 = # 0 ; aec1<4 = # 3 ; abc= = pleq _ _ refl } _⁻¹ : {n : ℕ } ( x : Permutation n n) → Permutation n n _⁻¹ = pinv -- tt5 : (i : Fin 4) (j : Fin 5) → (z : Fin 4) → (w : Fin 5) → (x : Fin 5) (y : Fin 4) → (rot : Permutation 3 3 ) → List (List ℕ) → List (List ℕ) -- tt5 i j z w x y rot t with is-=p= (ins2 rot (fin≤n i) (fin≤n j)) -- [ ins2 (rot ∘ₚ rot) (fin≤n z) (fin≤n x) , ins2 (pinv rot) (fin≤n y) (fin≤n w) ] -- ... | yes _ = ( toℕ i ∷ toℕ j ∷ 9 ∷ toℕ z ∷ toℕ x ∷ toℕ y ∷ toℕ w ∷ [] ) ∷ t -- ... | no _ = t -- open import Relation.Binary.Definitions -- tt2 : (i : Fin 4) (j : Fin 5) → (rot : Permutation 3 3 ) → List (List ℕ) -- tt2 i j rot = tt3 (# 4) (# 3) (# 3) (# 4) [] where -- tt3 : (w : Fin 5) (z : Fin 4) (x : Fin 4) (y : Fin 5) → List (List ℕ) → List (List ℕ) -- tt3 zero zero zero zero t = ( tt5 i j zero zero zero zero rot [] ) ++ t -- tt3 (suc w) zero zero zero t = tt3 (fin+1 w) (# 3) (# 3) (# 4) ((tt5 i j zero (suc w) zero zero rot [] ) ++ t) -- tt3 w z zero (suc y) t = tt3 w z (# 3) (fin+1 y) ((tt5 i j z w (suc y) zero rot [] ) ++ t) -- tt3 w z (suc x) y t = tt3 w z (fin+1 x) y ((tt5 i j z w y (suc x) rot [] ) ++ t) -- tt3 w (suc z) zero zero t = tt3 w (fin+1 z) (# 3) (# 4) ((tt5 i j (suc z) w zero zero rot [] ) ++ t) -- tt4 : List (List (List ℕ)) -- tt4 = tt2 (# 0) (# 0) (pinv 3rot) ∷ -- tt2 (# 1) (# 0) (pinv 3rot) ∷ -- tt2 (# 2) (# 0) (pinv 3rot) ∷ -- tt2 (# 3) (# 0) (pinv 3rot) ∷ -- tt2 (# 0) (# 1) (pinv 3rot) ∷ -- tt2 (# 1) (# 1) (pinv 3rot) ∷ -- tt2 (# 2) (# 1) (pinv 3rot) ∷ -- tt2 (# 3) (# 1) (pinv 3rot) ∷ -- tt2 (# 0) (# 2) (pinv 3rot) ∷ -- tt2 (# 1) (# 2) (pinv 3rot) ∷ -- tt2 (# 2) (# 2) (pinv 3rot) ∷ -- tt2 (# 3) (# 2) (pinv 3rot) ∷ -- tt2 (# 0) (# 3) (pinv 3rot) ∷ -- tt2 (# 1) (# 3) (pinv 3rot) ∷ -- tt2 (# 2) (# 3) (pinv 3rot) ∷ -- tt2 (# 3) (# 3) (pinv 3rot) ∷ -- tt2 (# 0) (# 4) (pinv 3rot) ∷ -- tt2 (# 1) (# 4) (pinv 3rot) ∷ -- tt2 (# 2) (# 4) (pinv 3rot) ∷ -- tt2 (# 3) (# 4) (pinv 3rot) ∷ -- [] open Triple dba-triple : {i j : ℕ } → (i<3 : i ≤ 3 ) → (j<4 : j ≤ 4 ) → Triple i<3 j<4 (3rot ∘ₚ 3rot ) dba-triple z≤n z≤n = record { dba0<3 = # 0 ; dba1<4 = # 2 ; aec0<3 = # 2 ; aec1<4 = # 0 ; abc= = pleq _ _ refl } dba-triple z≤n (s≤s z≤n) = record { dba0<3 = # 0 ; dba1<4 = # 2 ; aec0<3 = # 2 ; aec1<4 = # 0 ; abc= = pleq _ _ refl } dba-triple z≤n (s≤s (s≤s z≤n)) = record { dba0<3 = # 1 ; dba1<4 = # 3 ; aec0<3 = # 3 ; aec1<4 = # 2 ; abc= = pleq _ _ refl } dba-triple z≤n (s≤s (s≤s (s≤s z≤n))) = record { dba0<3 = # 0 ; dba1<4 = # 2 ; aec0<3 = # 2 ; aec1<4 = # 4 ; abc= = pleq _ _ refl } dba-triple z≤n (s≤s (s≤s (s≤s (s≤s z≤n)))) = record { dba0<3 = # 3 ; dba1<4 = # 0 ; aec0<3 = # 0 ; aec1<4 = # 2 ; abc= = pleq _ _ refl } dba-triple (s≤s z≤n) z≤n = record { dba0<3 = # 0 ; dba1<4 = # 0 ; aec0<3 = # 1 ; aec1<4 = # 3 ; abc= = pleq _ _ refl } dba-triple (s≤s z≤n) (s≤s z≤n) = record { dba0<3 = # 0 ; dba1<4 = # 0 ; aec0<3 = # 1 ; aec1<4 = # 3 ; abc= = pleq _ _ refl } dba-triple (s≤s z≤n) (s≤s (s≤s z≤n)) = record { dba0<3 = # 1 ; dba1<4 = # 3 ; aec0<3 = # 3 ; aec1<4 = # 2 ; abc= = pleq _ _ refl } dba-triple (s≤s z≤n) (s≤s (s≤s (s≤s z≤n))) = record { dba0<3 = # 1 ; dba1<4 = # 4 ; aec0<3 = # 2 ; aec1<4 = # 0 ; abc= = pleq _ _ refl } dba-triple (s≤s z≤n) (s≤s (s≤s (s≤s (s≤s z≤n)))) = record { dba0<3 = # 1 ; dba1<4 = # 3 ; aec0<3 = # 3 ; aec1<4 = # 0 ; abc= = pleq _ _ refl } dba-triple (s≤s (s≤s z≤n)) z≤n = record { dba0<3 = # 2 ; dba1<4 = # 4 ; aec0<3 = # 0 ; aec1<4 = # 0 ; abc= = pleq _ _ refl } dba-triple (s≤s (s≤s z≤n)) (s≤s z≤n) = record { dba0<3 = # 2 ; dba1<4 = # 4 ; aec0<3 = # 0 ; aec1<4 = # 0 ; abc= = pleq _ _ refl } dba-triple (s≤s (s≤s z≤n)) (s≤s (s≤s z≤n)) = record { dba0<3 = # 0 ; dba1<4 = # 2 ; aec0<3 = # 2 ; aec1<4 = # 4 ; abc= = pleq _ _ refl } dba-triple (s≤s (s≤s z≤n)) (s≤s (s≤s (s≤s z≤n))) = record { dba0<3 = # 1 ; dba1<4 = # 4 ; aec0<3 = # 2 ; aec1<4 = # 0 ; abc= = pleq _ _ refl } dba-triple (s≤s (s≤s z≤n)) (s≤s (s≤s (s≤s (s≤s z≤n)))) = record { dba0<3 = # 2 ; dba1<4 = # 0 ; aec0<3 = # 3 ; aec1<4 = # 2 ; abc= = pleq _ _ refl } dba-triple (s≤s (s≤s (s≤s z≤n))) z≤n = record { dba0<3 = # 0 ; dba1<4 = # 4 ; aec0<3 = # 1 ; aec1<4 = # 0 ; abc= = pleq _ _ refl } dba-triple (s≤s (s≤s (s≤s z≤n))) (s≤s z≤n) = record { dba0<3 = # 0 ; dba1<4 = # 4 ; aec0<3 = # 1 ; aec1<4 = # 0 ; abc= = pleq _ _ refl } dba-triple (s≤s (s≤s (s≤s z≤n))) (s≤s (s≤s z≤n)) = record { dba0<3 = # 3 ; dba1<4 = # 0 ; aec0<3 = # 0 ; aec1<4 = # 2 ; abc= = pleq _ _ refl } dba-triple (s≤s (s≤s (s≤s z≤n))) (s≤s (s≤s (s≤s z≤n))) = record { dba0<3 = # 1 ; dba1<4 = # 3 ; aec0<3 = # 3 ; aec1<4 = # 0 ; abc= = pleq _ _ refl } dba-triple (s≤s (s≤s (s≤s z≤n))) (s≤s (s≤s (s≤s (s≤s z≤n)))) = record { dba0<3 = # 2 ; dba1<4 = # 0 ; aec0<3 = # 3 ; aec1<4 = # 2 ; abc= = pleq _ _ refl } -3=33 : pinv 3rot =p= (3rot ∘ₚ 3rot ) -3=33 = pleq _ _ refl 4=1 : (3rot ∘ₚ 3rot) ∘ₚ (3rot ∘ₚ 3rot ) =p= 3rot 4=1 = pleq _ _ refl dervie-any-3rot0 : (n : ℕ ) → {i j : ℕ } → (i<3 : i ≤ 3 ) → (j<4 : j ≤ 4 ) → deriving n (abc i<3 j<4 ) dervie-any-3rot1 : (n : ℕ ) → {i j : ℕ } → (i<3 : i ≤ 3 ) → (j<4 : j ≤ 4 ) → deriving n (dba i<3 j<4 ) commd : {n : ℕ } → (f g : Permutation 5 5) → deriving n f → deriving n g → Commutator (deriving n) [ f , g ] commd {n} f g df dg = comm {deriving n} {f} {g} df dg dervie-any-3rot0 0 i<3 j<4 = lift tt dervie-any-3rot0 (suc i) i<3 j<4 = ccong {deriving i} (psym ceq) (commd dba0 aec0 df dg )where tc = triple i<3 j<4 dba0 = dba (fin≤n {3} (dba0<3 tc)) (fin≤n {4} (dba1<4 tc)) aec0 = dba (fin≤n {3} (aec0<3 tc)) (fin≤n {4} (aec1<4 tc)) ceq : abc i<3 j<4 =p= [ dba0 , aec0 ] ceq = record { peq = peq (abc= tc) } df = dervie-any-3rot1 i (fin≤n {3} (dba0<3 tc)) (fin≤n {4} (dba1<4 tc)) dg = dervie-any-3rot1 i (fin≤n {3} (aec0<3 tc)) (fin≤n {4} (aec1<4 tc)) dervie-any-3rot1 0 i<3 j<4 = lift tt dervie-any-3rot1 (suc n) {i} {j} i<3 j<4 = ccong {deriving n} ( psym ceq ) (commd aec0 abc0 df dg ) where tdba = dba-triple i<3 j<4 aec0 = ins2 ((3rot ∘ₚ 3rot) ∘ₚ (3rot ∘ₚ 3rot )) (fin≤n {3} (dba0<3 tdba)) (fin≤n {4} (dba1<4 tdba)) abc0 = ins2 ((3rot ∘ₚ 3rot) ∘ₚ (3rot ∘ₚ 3rot )) (fin≤n {3} (aec0<3 tdba)) (fin≤n {4} (aec1<4 tdba)) ceq : dba i<3 j<4 =p= [ aec0 , abc0 ] ceq = record { peq = peq (abc= tdba) } df : deriving n (ins2 ((3rot ∘ₚ 3rot) ∘ₚ (3rot ∘ₚ 3rot )) (fin≤n {3} (dba0<3 tdba)) (fin≤n {4} (dba1<4 tdba))) df = deriving-subst (psym (ins2cong {toℕ (dba0<3 (dba-triple i<3 j<4))} {toℕ (dba1<4 (dba-triple i<3 j<4))} 4=1 )) (dervie-any-3rot0 n (fin≤n {3} (dba0<3 tdba)) (fin≤n {4} (dba1<4 tdba))) dg : deriving n (ins2 ((3rot ∘ₚ 3rot) ∘ₚ (3rot ∘ₚ 3rot )) (fin≤n {3} (aec0<3 tdba)) (fin≤n {4} (aec1<4 tdba))) dg = deriving-subst (psym (ins2cong {toℕ (aec0<3 (dba-triple i<3 j<4))} {toℕ (aec1<4 (dba-triple i<3 j<4))} 4=1 )) (dervie-any-3rot0 n (fin≤n {3} (aec0<3 tdba)) (fin≤n {4} (aec1<4 tdba)))
{ "alphanum_fraction": 0.4453672276, "avg_line_length": 62.6561085973, "ext": "agda", "hexsha": "c9c155c643265f931c55a858b7f09de4a4a055da", "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": "bf000643c139f40d5783e962bb3b63353ba3d6e4", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "shinji-kono/Galois", "max_forks_repo_path": "src/sym5.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "bf000643c139f40d5783e962bb3b63353ba3d6e4", "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": "shinji-kono/Galois", "max_issues_repo_path": "src/sym5.agda", "max_line_length": 156, "max_stars_count": 1, "max_stars_repo_head_hexsha": "bf000643c139f40d5783e962bb3b63353ba3d6e4", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "shinji-kono/Galois", "max_stars_repo_path": "src/sym5.agda", "max_stars_repo_stars_event_max_datetime": "2021-10-16T03:37:05.000Z", "max_stars_repo_stars_event_min_datetime": "2021-10-16T03:37:05.000Z", "num_tokens": 7005, "size": 13847 }
module Sandbox.PrimitiveRecursion where open import Data.Nat open import Data.Fin using (Fin) open import Data.Vec data PR : ℕ → Set where -- Constant function: The 0-ary constant function 0 is primitive recursive. K : PR 0 -- Successor function: The 1-ary successor function S, which returns the -- successor of its argument (see Peano postulates), is primitive recursive. -- That is, S(k) = k + 1. S : PR 1 -- Projection function: For every n≥1 and each i with 1≤i≤n, the n-ary -- projection function Pᵢⁿ, which returns its i-th argument, is primitive -- recursive. Proj : ∀ {n} → (i : Fin n) → PR n -- Composition: Given f, a m-ary primitive recursive function, and m n-ary -- primitive recursive functions g1,...,gm, the composition of f with -- g1,...,gk, is primitive recursive -- f( -- g₁(x₁, x₂, ..., xₙ) -- g₂(x₁, x₂, ..., xₙ) -- ... -- gₘ(x₁, x₂, ..., xₙ) -- ) Comp : ∀ {m n} → (f : PR m) → Vec (PR n) m → PR n -- Primitive recursion: Given f, a m-ary primitive recursive function, -- and g, a (m+2)-ary primitive recursive function, the (m+1)-ary function -- h is defined as the primitive recursion of f and g, i.e. the function h -- is primitive recursive when -- h(0 , x₁, x₂, .. xₘ) = f(x₁, x₂, .. xₘ) -- h(S(n), x₁, x₂, .. xₘ) = g(n, h(n, x₁, x₂, .. xₘ), x₁, x₂, .. xₘ) Rec : ∀ {n} → (f : PR {! !}) (g : PR (suc (suc n))) → PR (suc n) mutual ⟦_⟧_ : ∀ {a} → PR a → Vec ℕ a → ℕ ⟦ K ⟧ args = zero ⟦ S ⟧ args = suc zero ⟦ Proj i ⟧ args = lookup i args ⟦ Comp f gs ⟧ args = ⟦ f ⟧ (⟦ gs ⟧* args) ⟦ Rec f g ⟧ (zero ∷ args) = ⟦ f ⟧ args ⟦ Rec f g ⟧ (suc x ∷ args) = ⟦ g ⟧ (x ∷ (⟦ f ⟧ args) ∷ args) ⟦_⟧* : {m n : ℕ} (gs : Vec (PR n) m) → Vec ℕ n → Vec ℕ m ⟦ [] ⟧* args = [] ⟦ g ∷ gs ⟧* args = (⟦ g ⟧ args) ∷ ⟦ gs ⟧* args
{ "alphanum_fraction": 0.517433047, "avg_line_length": 38.0576923077, "ext": "agda", "hexsha": "a3419422170d358a7b2c5e640e5ccbb0cde24942", "lang": "Agda", "max_forks_count": 1, "max_forks_repo_forks_event_max_datetime": "2015-05-30T05:50:50.000Z", "max_forks_repo_forks_event_min_datetime": "2015-05-30T05:50:50.000Z", "max_forks_repo_head_hexsha": "aae093cc9bf21f11064e7f7b12049448cd6449f1", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "banacorn/numeral", "max_forks_repo_path": "Sandbox/PrimitiveRecursion.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "aae093cc9bf21f11064e7f7b12049448cd6449f1", "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": "banacorn/numeral", "max_issues_repo_path": "Sandbox/PrimitiveRecursion.agda", "max_line_length": 80, "max_stars_count": 1, "max_stars_repo_head_hexsha": "aae093cc9bf21f11064e7f7b12049448cd6449f1", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "banacorn/numeral", "max_stars_repo_path": "Sandbox/PrimitiveRecursion.agda", "max_stars_repo_stars_event_max_datetime": "2015-04-23T15:58:28.000Z", "max_stars_repo_stars_event_min_datetime": "2015-04-23T15:58:28.000Z", "num_tokens": 742, "size": 1979 }
open import Agda.Builtin.Nat data List (A : Set) : Set where lnil : List A lcons : A → List A → List A data Vec (A : Set) : Nat → Set where vnil : Vec A 0 vcons : ∀ {n} → A → Vec A n → Vec A (suc n) pattern [] = lnil pattern [] = vnil pattern _∷_ x xs = lcons x xs pattern _∷_ y ys = vcons y ys lmap : ∀ {A B} → (A → B) → List A → List B lmap f [] = [] lmap f (x ∷ xs) = f x ∷ lmap f xs vmap : ∀ {A B n} → (A → B) → Vec A n → Vec B n vmap f [] = [] vmap f (x ∷ xs) = f x ∷ vmap f xs
{ "alphanum_fraction": 0.5270541082, "avg_line_length": 19.96, "ext": "agda", "hexsha": "51aa357a4467aecf6ff4619162c03dee90111e90", "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/Succeed/Issue2787.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/Succeed/Issue2787.agda", "max_line_length": 46, "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/Succeed/Issue2787.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": 218, "size": 499 }
{-# OPTIONS --rewriting --prop #-} open import Agda.Builtin.Equality open import Agda.Builtin.Equality.Rewrite postulate P : Prop p : P f : P -> P g : {A : Set} -> P -> A -> A eq : ∀{A} {x : A} -> g p x ≡ x {-# REWRITE eq #-} module _ {A : Set} {x : A} {y : P} where foo : g p x ≡ x foo = refl bar : g (f y) x ≡ x bar = refl
{ "alphanum_fraction": 0.5114285714, "avg_line_length": 15.2173913043, "ext": "agda", "hexsha": "ec72231eddd18aaad373b4bcc6d67124b4f4e156", "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/Succeed/Issue4410.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/Issue4410.agda", "max_line_length": 41, "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/Issue4410.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": 141, "size": 350 }
-- MIT License -- Copyright (c) 2021 Luca Ciccone and Luca Padovani -- Permission is hereby granted, free of charge, to any person -- obtaining a copy of this software and associated documentation -- files (the "Software"), to deal in the Software without -- restriction, including without limitation the rights to use, -- copy, modify, merge, publish, distribute, sublicense, and/or sell -- copies of the Software, and to permit persons to whom the -- Software is furnished to do so, subject to the following -- conditions: -- The above copyright notice and this permission notice shall be -- included in all copies or substantial portions of the Software. -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -- OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -- OTHER DEALINGS IN THE SOFTWARE. open import Relation.Nullary open import Relation.Binary.PropositionalEquality using (_≡_; refl) open import Common module Action {ℙ : Set} (message : Message ℙ) where open Message message data Action : Set where I O : ℙ -> Action input-injective : ∀{x y} -> I x ≡ I y -> x ≡ y input-injective refl = refl output-injective : ∀{x y} -> O x ≡ O y -> x ≡ y output-injective refl = refl co-action : Action -> Action co-action (I x) = O x co-action (O x) = I x co-action-injective : ∀{x y} -> co-action x ≡ co-action y -> x ≡ y co-action-injective {I x} {I .x} refl = refl co-action-injective {O x} {O .x} refl = refl co-action-involution : (α : Action) -> co-action (co-action α) ≡ α co-action-involution (I _) = refl co-action-involution (O _) = refl action-equality-dec : (α β : Action) -> Dec (α ≡ β) action-equality-dec (I x) (I y) with x ?= y ... | yes eq rewrite eq = yes refl ... | no neq = no λ eq -> neq (input-injective eq) action-equality-dec (I x) (O y) = no λ () action-equality-dec (O x) (I y) = no λ () action-equality-dec (O x) (O y) with x ?= y ... | yes eq rewrite eq = yes refl ... | no neq = no λ eq -> neq (output-injective eq)
{ "alphanum_fraction": 0.6974425661, "avg_line_length": 34.9545454545, "ext": "agda", "hexsha": "97a0d32f732b315f1fa891104209b00b1b5c021c", "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": "c4b78e70c3caf68d509f4360b9171d9f80ecb825", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "boystrange/FairSubtypingAgda", "max_forks_repo_path": "src/Action.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "c4b78e70c3caf68d509f4360b9171d9f80ecb825", "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": "boystrange/FairSubtypingAgda", "max_issues_repo_path": "src/Action.agda", "max_line_length": 68, "max_stars_count": 4, "max_stars_repo_head_hexsha": "c4b78e70c3caf68d509f4360b9171d9f80ecb825", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "boystrange/FairSubtypingAgda", "max_stars_repo_path": "src/Action.agda", "max_stars_repo_stars_event_max_datetime": "2022-01-24T14:38:47.000Z", "max_stars_repo_stars_event_min_datetime": "2021-07-29T14:32:30.000Z", "num_tokens": 639, "size": 2307 }
module Numeral.Natural.Relation.Divisibility.Proofs.Modulo where import Lvl open import Data open import Functional open import Logic.Predicate open import Logic.Propositional open import Numeral.Natural open import Numeral.Natural.Oper open import Numeral.Natural.Oper.DivMod.Proofs open import Numeral.Natural.Oper.FlooredDivision open import Numeral.Natural.Oper.Modulo open import Numeral.Natural.Oper.Modulo.Proofs open import Numeral.Natural.Oper.Proofs open import Numeral.Natural.Relation.Divisibility open import Numeral.Natural.Relation.Divisibility.Proofs open import Relator.Equals open import Relator.Equals.Proofs.Equiv open import Structure.Function.Domain open import Structure.Operator.Properties open import Structure.Operator.Proofs.Util open import Syntax.Transitivity open import Type divides-mod : ∀{a b d} → (d ∣ 𝐒(b)) → (d ∣ a) ↔ (d ∣ a mod 𝐒(b)) divides-mod {a}{b}{d} db = [↔]-intro (l db) (r db) where l : ∀{a b d} → (d ∣ 𝐒(b)) → (d ∣ a) ← (d ∣ (a mod₀ 𝐒(b))) l {a}{b}{𝟎} db dmod with () ← [0]-only-divides-[0] db l {a}{b}{𝐒(d)} db dmod with [∃]-intro (𝐒(n)) ⦃ dnb ⦄ ← [↔]-to-[←] divides-[⋅]-existence db with [∃]-intro m ⦃ dmmod ⦄ ← [↔]-to-[←] divides-[⋅]-existence dmod = [↔]-to-[→] divides-[⋅]-existence ([∃]-intro (((a ⌊/⌋ (𝐒(d) ⋅ 𝐒(n))) ⋅ 𝐒(n)) + m) ⦃ p ⦄) where p : (𝐒(d) ⋅ (((a ⌊/⌋ (𝐒(d) ⋅ 𝐒(n))) ⋅ 𝐒(n)) + m) ≡ a) p = 𝐒(d) ⋅ (((a ⌊/⌋ (𝐒(d) ⋅ 𝐒(n))) ⋅ 𝐒(n)) + m) 🝖[ _≡_ ]-[ distributivityₗ(_⋅_)(_+_) {𝐒(d)}{(a ⌊/⌋ (𝐒(d) ⋅ 𝐒(n))) ⋅ 𝐒(n)}{m} ] (𝐒(d) ⋅ ((a ⌊/⌋ (𝐒(d) ⋅ 𝐒(n))) ⋅ 𝐒(n))) + (𝐒(d) ⋅ m) 🝖[ _≡_ ]-[ [≡]-with(_+ (𝐒(d) ⋅ m)) (One.commuteₗ-assocᵣ {a = 𝐒(d)}{a ⌊/⌋ (𝐒(d) ⋅ 𝐒(n))}{𝐒(n)}) ] ((a ⌊/⌋ (𝐒(d) ⋅ 𝐒(n))) ⋅ (𝐒(d) ⋅ 𝐒(n))) + (𝐒(d) ⋅ m) 🝖[ _≡_ ]-[ [≡]-with(((a ⌊/⌋ (𝐒(d) ⋅ 𝐒(n))) ⋅ (𝐒(d) ⋅ 𝐒(n))) +_) dmmod ] ((a ⌊/⌋ (𝐒(d) ⋅ 𝐒(n))) ⋅ (𝐒(d) ⋅ 𝐒(n))) + (a mod 𝐒(b)) 🝖[ _≡_ ]-[ [≡]-with(expr ↦ ((a ⌊/⌋ (𝐒(d) ⋅ 𝐒(n))) ⋅ (𝐒(d) ⋅ 𝐒(n))) + (a mod 𝐒(expr))) (injective(𝐒) dnb) ]-sym ((a ⌊/⌋ (𝐒(d) ⋅ 𝐒(n))) ⋅ (𝐒(d) ⋅ 𝐒(n))) + (a mod (𝐒(d) ⋅ 𝐒(n))) 🝖[ _≡_ ]-[ [⌊/⌋][mod]-is-division-with-remainder {a}{d + 𝐒(d) ⋅ n} ] a 🝖-end r : ∀{a b d} → (d ∣ 𝐒(b)) → (d ∣ a) → (d ∣ (a mod₀ 𝐒(b))) r {a}{b}{𝟎} db da with [≡]-intro ← [0]-only-divides-[0] da = Div𝟎 r {a}{b}{𝐒 d} db da with [∃]-intro n ⦃ dna ⦄ ← [↔]-to-[←] divides-[⋅]-existence da with [∃]-intro m ⦃ dmb ⦄ ← [↔]-to-[←] divides-[⋅]-existence db = [↔]-to-[→] divides-[⋅]-existence ([∃]-intro (n mod₀ m) ⦃ p ⦄) where p : (𝐒(d) ⋅ (n mod₀ m) ≡ a mod₀ 𝐒(b)) p = 𝐒(d) ⋅ (n mod₀ m) 🝖[ _≡_ ]-[ [⋅][mod]-distributivityₗ {n}{m}{𝐒(d)} ] (𝐒(d) ⋅ n) mod₀ (𝐒(d) ⋅ m) 🝖[ _≡_ ]-[ [≡]-with(\expr → ((𝐒(d) ⋅ n) mod₀ expr)) dmb ] (𝐒(d) ⋅ n) mod₀ 𝐒(b) 🝖[ _≡_ ]-[ [≡]-with(_mod₀ 𝐒(b)) dna ] a mod₀ 𝐒(b) 🝖[ _≡_ ]-end
{ "alphanum_fraction": 0.4916808149, "avg_line_length": 54.537037037, "ext": "agda", "hexsha": "0acf943a6c171c639eaaa274d510134d38d65c24", "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": "Numeral/Natural/Relation/Divisibility/Proofs/Modulo.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": "Numeral/Natural/Relation/Divisibility/Proofs/Modulo.agda", "max_line_length": 180, "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": "Numeral/Natural/Relation/Divisibility/Proofs/Modulo.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": 1538, "size": 2945 }
module Inductive where open import Level using (_⊔_) open import Data.Nat hiding (_⊔_) open import Data.Fin open import Data.List hiding (map) import Data.List as List open import Data.Vec hiding (_++_) open import Data.Product hiding (map) open import Tuple using (Tuple; []; _∷_; unfoldToFunc; apply; proof₁; proof₂) Const : Set₁ Const = List Set × List (List Set) data TupleRec (A : Set) : List (List Set) → Set where [] : TupleRec A [] _∷_ : ∀ {x xs} → ((Tuple x) → A) → TupleRec A xs → TupleRec A (x ∷ xs) data Inductive {n} (A : Vec Const n) : Set where construct : (m : Fin n) (x : Tuple (proj₁ (lookup m A))) (r : TupleRec (Inductive A) (proj₂ (lookup m A))) → Inductive A unfoldToConFunc : List (List Set) → Set → Set unfoldToConFunc [] B = B unfoldToConFunc (As ∷ As₁) B = (unfoldToFunc As B) → unfoldToConFunc As₁ B unfoldToRecFunc : List (List Set) → Set → Set → Set unfoldToRecFunc [] B C = C unfoldToRecFunc (As ∷ As₁) B C = (unfoldToFunc As B) → (unfoldToFunc As C) → unfoldToRecFunc As₁ B C proofCon : (As : List (List Set)) {B : Set} → (TupleRec B As → B) → unfoldToConFunc As B proofCon [] B₁ = B₁ [] proofCon (As ∷ As₁) B₁ x = proofCon As₁ (λ x₁ → B₁ (proof₂ As x ∷ x₁)) -- The constrution function of an inductive instance ConFunc : Set → Const → Set ConFunc A (proj₁ , proj₂) = unfoldToFunc proj₁ (unfoldToConFunc proj₂ A) -- The recursion function of an inductive instance RecFunc : Set → Set → Const → Set RecFunc A B (proj₁ , proj₂) = unfoldToFunc proj₁ (unfoldToRecFunc proj₂ A B) recapply : ∀ {n} {A : Vec Const n} {B : Set} {L : List Set} {R : List (List Set)} → RecFunc (Inductive A) B (L , R) → Tuple L → TupleRec (Inductive A) R → TupleRec B R → B recapply {L = []} {[]} f [] [] [] = f recapply {L = []} {R ∷ Rs} f [] (x ∷ x₁) (x₂ ∷ x₃) = recapply {L = []} {R = Rs} (f (proof₁ R x) (proof₁ R x₂)) [] x₁ x₃ recapply {L = _ ∷ _} f (x₁ ∷ x₂) r c = recapply (f x₁) x₂ r c rec : ∀ {n} {A : Vec Const n} {B : Set} → Tuple (toList (map (RecFunc (Inductive A) B) A)) → Inductive A → B rec {n} {A} {B} fs (construct m x r) = rec' A fs m x r where mapRec : ∀ {m} → TupleRec (Inductive A) m → TupleRec B m mapRec {m = []} [] = [] mapRec {m = _ ∷ _} (x₁ ∷ r₁) = (λ x₂ → rec fs (x₁ x₂)) ∷ mapRec r₁ rec' : ∀ {m} → (A' : Vec Const m) → Tuple (toList (map (RecFunc (Inductive A) B) A')) → (m' : Fin m) → Tuple (proj₁ (lookup m' A')) → TupleRec (Inductive A) (proj₂ (lookup m' A')) → B rec' [] fs () x r rec' (_ ∷ A') (f ∷ fs) zero x r = recapply f x r (mapRec r) rec' (_ ∷ A') (f ∷ fs) (suc m) x r = rec' A' fs m x r
{ "alphanum_fraction": 0.5625672284, "avg_line_length": 38.2054794521, "ext": "agda", "hexsha": "26f83281fce19456bc28c3d74cb6015e6d8463f2", "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": "dc157acda597a2c758e82b5637e4fd6717ccec3f", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "mr-ohman/general-induction", "max_forks_repo_path": "Inductive.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "dc157acda597a2c758e82b5637e4fd6717ccec3f", "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": "mr-ohman/general-induction", "max_issues_repo_path": "Inductive.agda", "max_line_length": 77, "max_stars_count": null, "max_stars_repo_head_hexsha": "dc157acda597a2c758e82b5637e4fd6717ccec3f", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "mr-ohman/general-induction", "max_stars_repo_path": "Inductive.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 996, "size": 2789 }
------------------------------------------------------------------------ -- The Agda standard library -- -- Results concerning function extensionality for propositional equality ------------------------------------------------------------------------ {-# OPTIONS --with-K --safe #-} module Axiom.Extensionality.Heterogeneous where import Axiom.Extensionality.Propositional as P open import Function open import Level open import Relation.Binary.HeterogeneousEquality.Core open import Relation.Binary.PropositionalEquality.Core ------------------------------------------------------------------------ -- Function extensionality states that if two functions are -- propositionally equal for every input, then the functions themselves -- must be propositionally equal. Extensionality : (a b : Level) → Set _ Extensionality a b = {A : Set a} {B₁ B₂ : A → Set b} {f₁ : (x : A) → B₁ x} {f₂ : (x : A) → B₂ x} → (∀ x → B₁ x ≡ B₂ x) → (∀ x → f₁ x ≅ f₂ x) → f₁ ≅ f₂ ------------------------------------------------------------------------ -- Properties -- This form of extensionality follows from extensionality for _≡_. ≡-ext⇒≅-ext : ∀ {ℓ₁ ℓ₂} → P.Extensionality ℓ₁ (suc ℓ₂) → Extensionality ℓ₁ ℓ₂ ≡-ext⇒≅-ext {ℓ₁} {ℓ₂} ext B₁≡B₂ f₁≅f₂ with ext B₁≡B₂ ... | refl = ≡-to-≅ $ ext′ (≅-to-≡ ∘ f₁≅f₂) where ext′ : P.Extensionality ℓ₁ ℓ₂ ext′ = P.lower-extensionality ℓ₁ (suc ℓ₂) ext
{ "alphanum_fraction": 0.5353107345, "avg_line_length": 34.5365853659, "ext": "agda", "hexsha": "0b10affb613c36472ba055500b910fd1b473634e", "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/Axiom/Extensionality/Heterogeneous.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/Axiom/Extensionality/Heterogeneous.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/Axiom/Extensionality/Heterogeneous.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": 398, "size": 1416 }
module Tactic.Nat.Less.Lemmas where open import Prelude open import Tactic.Nat.Exp open import Tactic.Nat.NF open import Tactic.Nat.Subtract.Exp open import Tactic.Nat.Auto.Lemmas open import Tactic.Nat.Simpl.Lemmas open import Tactic.Nat.Subtract.Lemmas liftNFSubLess : ∀ e₁ e₂ ρ → ⟦ normSub e₁ ⟧sn ρ < ⟦ normSub e₂ ⟧sn ρ → ⟦ e₁ ⟧se ρ < ⟦ e₂ ⟧se ρ liftNFSubLess e₁ e₂ ρ (diff k eq) = diff k (eraseEquality $ sound-sub e₂ ρ ⟨≡⟩ eq ⟨≡⟩ʳ (suc k +_) $≡ sound-sub e₁ ρ) SubExpLess : SubExp → SubExp → Env Var → Set SubExpLess e₁ e₂ ρ = ⟦ e₁ ⟧se ρ < ⟦ e₂ ⟧se ρ NFLessS : SubNF × SubNF → Env SubAtom → Set NFLessS (nf₁ , nf₂) ρ = ⟦ nf₁ ⟧ns ρ < ⟦ nf₂ ⟧ns ρ CancelSubLess : SubExp → SubExp → Env Var → Set CancelSubLess e₁ e₂ ρ = NFLessS (cancel (normSub e₁) (normSub e₂)) (atomEnvS ρ) c⟦_⟧eqn : Eqn → Env Var → Set c⟦ a :≡ b ⟧eqn = CancelSubEq a b c⟦ a :< b ⟧eqn = CancelSubLess a b simplifySubLess : ∀ e₁ e₂ (ρ : Env Var) → CancelSubLess e₁ e₂ ρ → SubExpLess e₁ e₂ ρ simplifySubLess e₁ e₂ ρ H with cancel (normSub e₁) (normSub e₂) | λ a b → cancel-sound′ a b (normSub e₁) (normSub e₂) (atomEnvS ρ) simplifySubLess e₁ e₂ ρ (diff k H) | v₁ , v₂ | sound = liftNFSubLess e₁ e₂ ρ $ diff k $ lem-eval-sn-nS (normSub e₂) ρ ⟨≡⟩ sound (suc k) 0 ((suc k +_) $≡ ns-sound v₁ (atomEnvS ρ) ʳ⟨≡⟩ H ʳ⟨≡⟩ ns-sound v₂ (atomEnvS ρ)) ʳ⟨≡⟩ʳ (suc k +_) $≡ lem-eval-sn-nS (normSub e₁) ρ complicateSubLess : ∀ e₁ e₂ ρ → SubExpLess e₁ e₂ ρ → CancelSubLess e₁ e₂ ρ complicateSubLess e₁ e₂ ρ H with cancel (normSub e₁) (normSub e₂) | λ a b → cancel-complete′ a b (normSub e₁) (normSub e₂) (atomEnvS ρ) complicateSubLess e₁ e₂ ρ (diff k H) | v₁ , v₂ | complete = diff k (eraseEquality $ ns-sound v₂ (atomEnvS ρ) ⟨≡⟩ complete (suc k) 0 ((suc k +_) $≡ lem-eval-sn-nS (normSub e₁) ρ ʳ⟨≡⟩ (suc k +_) $≡ sound-sub e₁ ρ ʳ⟨≡⟩ H ʳ⟨≡⟩ sound-sub e₂ ρ ⟨≡⟩ lem-eval-sn-nS (normSub e₂) ρ) ʳ⟨≡⟩ʳ (suc k +_) $≡ ns-sound v₁ (atomEnvS ρ))
{ "alphanum_fraction": 0.6220238095, "avg_line_length": 38.7692307692, "ext": "agda", "hexsha": "fdfb6a349b51b2748c3c201ce125d813673775f9", "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": "da4fca7744d317b8843f2bc80a923972f65548d3", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "t-more/agda-prelude", "max_forks_repo_path": "src/Tactic/Nat/Less/Lemmas.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "da4fca7744d317b8843f2bc80a923972f65548d3", "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": "t-more/agda-prelude", "max_issues_repo_path": "src/Tactic/Nat/Less/Lemmas.agda", "max_line_length": 104, "max_stars_count": null, "max_stars_repo_head_hexsha": "da4fca7744d317b8843f2bc80a923972f65548d3", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "t-more/agda-prelude", "max_stars_repo_path": "src/Tactic/Nat/Less/Lemmas.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 914, "size": 2016 }
{- Byzantine Fault Tolerant Consensus Verification in Agda, version 0.9. Copyright (c) 2020, 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.Prelude open import LibraBFT.Base.PKCS -- This module defines the types used to define a SystemModel. module LibraBFT.Yasm.Base (ℓ-EC : Level) (EpochConfig : Set ℓ-EC) (epochId : EpochConfig → ℕ) (authorsN : EpochConfig → ℕ) where EpochId : Set EpochId = ℕ Member : EpochConfig → Set Member = Fin ∘ authorsN record EpochConfigFor (eid : EpochId) : Set ℓ-EC where field epochConfig : EpochConfig forEpochId : epochId epochConfig ≡ eid -- Our system is configured through a value of type -- SystemParameters where we specify: record SystemParameters : Set (ℓ+1 0ℓ ℓ⊔ ℓ-EC) where constructor mkSysParms field PeerId : Set _≟PeerId_ : ∀ (p₁ p₂ : PeerId) → Dec (p₁ ≡ p₂) PeerState : Set initPS : PeerState -- Represents an uninitialised PeerState, about which we know nothing whatsoever Msg : Set Part : Set -- Types of interest that can be represented in Msgs -- The messages must be able to carry signatures instance Part-sig : WithSig Part -- A relation specifying what Parts are included in a Msg. _⊂Msg_ : Part → Msg → Set -- Finally, messages must carry an epoch id and might have an author part-epoch : Part → EpochId -- Initializes a potentially-empty state with an EpochConfig init : PeerId → EpochConfig → PeerState → PeerState × List Msg -- Handles a message on a previously initialized peer. handle : PeerId → Msg → PeerState → PeerState × List Msg -- TODO-3?: So far, handlers only produce messages to be sent. -- It would be reasonable to generalize this to something like -- -- data Action = Send Msg | Crash CrashMsg | Log LogMsg | ... -- -- on the system level, and have the handlers return List Action, -- rather than just ListMsg. For example, if an assertion fires, this -- could "kill the process" and make it not send any messages in the future. -- We could also then prove that the handlers do not crash, certain -- messages are logged under certain circumstances, etc. -- -- Alternatively, we could keep this outside the system model by -- defining an application-specific peerState type, for example: -- -- > libraHandle : Msg → Status × Log × LState → Status × LState × List Action -- > libraHandle _ (Crashed , l , s) = Crashed , s , [] -- i.e., crashed peers never send messages -- > -- > handle = filter isSend ∘ libraHandle
{ "alphanum_fraction": 0.6785844582, "avg_line_length": 37.0405405405, "ext": "agda", "hexsha": "60d71ddb4e493d721ad8ec2f26e0d5d33b09d77c", "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": "34e4627855fb198665d0c98f377403a906ba75d7", "max_forks_repo_licenses": [ "UPL-1.0" ], "max_forks_repo_name": "haroldcarr/bft-consensus-agda", "max_forks_repo_path": "LibraBFT/Yasm/Base.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "34e4627855fb198665d0c98f377403a906ba75d7", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "UPL-1.0" ], "max_issues_repo_name": "haroldcarr/bft-consensus-agda", "max_issues_repo_path": "LibraBFT/Yasm/Base.agda", "max_line_length": 111, "max_stars_count": null, "max_stars_repo_head_hexsha": "34e4627855fb198665d0c98f377403a906ba75d7", "max_stars_repo_licenses": [ "UPL-1.0" ], "max_stars_repo_name": "haroldcarr/bft-consensus-agda", "max_stars_repo_path": "LibraBFT/Yasm/Base.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 731, "size": 2741 }
open import FRP.JS.Level using () module FRP.JS.Primitive where -- We define the primitive types here, to avoid cyclic module dependencies data Bool : Set where true : Bool false : Bool {-# BUILTIN BOOL Bool #-} {-# BUILTIN TRUE true #-} {-# BUILTIN FALSE false #-} {-# COMPILED_JS Bool function(x,v) { if (x) { return v["true"](); } else { return v["false"](); } } #-} {-# COMPILED_JS true true #-} {-# COMPILED_JS false false #-} data ℕ : Set where zero : ℕ suc : ℕ → ℕ {-# BUILTIN NATURAL ℕ #-} {-# BUILTIN ZERO zero #-} {-# BUILTIN SUC suc #-} {-# COMPILED_JS ℕ function (x,v) { if (x < 1) { return v.zero(); } else { return v.suc(x-1); } } #-} {-# COMPILED_JS zero 0 #-} {-# COMPILED_JS suc function (x) { return x+1; } #-} postulate Char String ℝ ℤ : Set {-# BUILTIN CHAR Char #-} {-# BUILTIN STRING String #-} {-# BUILTIN FLOAT ℝ #-} {-# BUILTIN INTEGER ℤ #-}
{ "alphanum_fraction": 0.5888157895, "avg_line_length": 22.8, "ext": "agda", "hexsha": "e0838bf40d777cdddb702d3ad4caa03cc9520909", "lang": "Agda", "max_forks_count": 7, "max_forks_repo_forks_event_max_datetime": "2022-03-12T11:39:38.000Z", "max_forks_repo_forks_event_min_datetime": "2016-11-07T21:50:58.000Z", "max_forks_repo_head_hexsha": "c7ccaca624cb1fa1c982d8a8310c313fb9a7fa72", "max_forks_repo_licenses": [ "MIT", "BSD-3-Clause" ], "max_forks_repo_name": "agda/agda-frp-js", "max_forks_repo_path": "src/agda/FRP/JS/Primitive.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "c7ccaca624cb1fa1c982d8a8310c313fb9a7fa72", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT", "BSD-3-Clause" ], "max_issues_repo_name": "agda/agda-frp-js", "max_issues_repo_path": "src/agda/FRP/JS/Primitive.agda", "max_line_length": 103, "max_stars_count": 63, "max_stars_repo_head_hexsha": "c7ccaca624cb1fa1c982d8a8310c313fb9a7fa72", "max_stars_repo_licenses": [ "MIT", "BSD-3-Clause" ], "max_stars_repo_name": "agda/agda-frp-js", "max_stars_repo_path": "src/agda/FRP/JS/Primitive.agda", "max_stars_repo_stars_event_max_datetime": "2022-02-28T09:46:14.000Z", "max_stars_repo_stars_event_min_datetime": "2015-04-20T21:47:00.000Z", "num_tokens": 270, "size": 912 }
module Data.List.Relation.Pairwise.Proofs where open import Data.List import Data.List.Functions as List open import Data.List.Relation.Pairwise open import Logic import Lvl open import Type private variable ℓ ℓₗ : Lvl.Level private variable T A B : Type{ℓ} private variable x : T private variable f : A → B private variable _▫_ : T → T → Type{ℓₗ} private variable _▫₁_ : A → A → Type{ℓₗ} private variable _▫₂_ : B → B → Type{ℓₗ} AdjacentlyPairwise-map : (∀{x y} → (x ▫₁ y) → (f(x) ▫₂ f(y))) → ∀{l} → AdjacentlyPairwise(_▫₁_)(l) → AdjacentlyPairwise(_▫₂_)(List.map f(l)) AdjacentlyPairwise-map p {∅} s = AdjacentlyPairwise.empty AdjacentlyPairwise-map p {x ⊰ ∅} s = AdjacentlyPairwise.single AdjacentlyPairwise-map p {x ⊰ y ⊰ l} (AdjacentlyPairwise.step ⦃ s₁ ⦄ ⦃ s₂ ⦄) = AdjacentlyPairwise.step ⦃ p s₁ ⦄ ⦃ AdjacentlyPairwise-map p {y ⊰ l} s₂ ⦄ AdjacentlyPairwise-prepend : (∀{y} → (x ▫ y)) → ∀{l} → AdjacentlyPairwise(_▫_)(l) → AdjacentlyPairwise(_▫_)(x ⊰ l) AdjacentlyPairwise-prepend xy {∅} p = AdjacentlyPairwise.single AdjacentlyPairwise-prepend xy {_ ⊰ _} p = AdjacentlyPairwise.step ⦃ xy ⦄ ⦃ p ⦄
{ "alphanum_fraction": 0.6964285714, "avg_line_length": 43.0769230769, "ext": "agda", "hexsha": "e99f306229e3017b0a5fa5338ee4fb831fbdf1d7", "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": "Data/List/Relation/Pairwise/Proofs.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": "Data/List/Relation/Pairwise/Proofs.agda", "max_line_length": 151, "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": "Data/List/Relation/Pairwise/Proofs.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": 441, "size": 1120 }
{-# OPTIONS --rewriting #-} module JVM.Transform.Assemble where open import Agda.Builtin.Equality.Rewrite open import Data.Nat using (ℕ) open import Data.List as List open import Data.List.Properties open import Data.List.Relation.Unary.All as All open import Data.List.Membership.Propositional open import Data.List.Membership.Propositional.Properties open import Data.List.Relation.Unary.Any open import Data.Product hiding (swap) open import Relation.Unary hiding (_∈_) open import Relation.Binary.PropositionalEquality open import Relation.Ternary.Core open import Relation.Ternary.Structures.Syntax open import Relation.Ternary.Data.Bigstar open import Relation.Ternary.Data.ReflexiveTransitive as Star open import Relation.Ternary.Data.IndexedMonoid open import Relation.Ternary.Construct.Bag.Properties open import JVM.Types open import JVM.Syntax.Values open import JVM.Model StackTy open import JVM.Model.Properties open import JVM.Syntax.Labeling StackTy open import JVM.Syntax.Instructions hiding (⟨_↝_⟩; Instr) {-# REWRITE ++-assoc #-} Typing = List StackTy variable J₁ J₂ J : Typing module _ Γ where data Instr (J : Typing) : StackTy → StackTy → Set where goto : ψ₁ ∈ J → Instr J ψ₁ ψ₂ if : ∀ {as} → Comparator as → ψ₁ ∈ J → Instr J (as ++ ψ₁) ψ₂ nop : Instr J ψ₁ ψ₁ push : Const a → Instr J ψ₁ (a ∷ ψ₁) pop : Instr J (a ∷ ψ₁) ψ₁ dup : Instr J (a ∷ ψ₁) (a ∷ a ∷ ψ₁) swap : Instr J (a ∷ b ∷ ψ₁) (b ∷ a ∷ ψ₁) bop : NativeBinOp a b c → Instr J (b ∷ a ∷ ψ₁) (c ∷ ψ₁) load : a ∈ Γ → Instr J ψ₁ (a ∷ ψ₁) store : a ∈ Γ → Instr J (a ∷ ψ₁) ψ₁ ret : Instr J (a ∷ ψ₁) ψ₂ data Bytecode' (J : Typing) : Typing → StackTy → StackTy → Set where nil : Bytecode' J [] ψ₁ ψ₁ cons : ∀ {I} → Instr J ψ₁ ψ₂ → Bytecode' J I ψ₂ ψ₃ → Bytecode' J (ψ₁ ∷ I) ψ₁ ψ₃ Bytecode : Typing → StackTy → StackTy → Set Bytecode J = Bytecode' J J module _ where Addressing : Labels → Typing → Set Addressing lbs J = All (λ ψ → ψ ∈ J) lbs instr-tf : ∀ {Γ ℓs} → Addressing ℓs J → ⟨ Γ ∣ ψ₁ ↝ ψ₂ ⟩ ℓs → Instr Γ J ψ₁ ψ₂ instr-tf ρ noop = nop instr-tf ρ pop = pop instr-tf ρ (push x) = push x instr-tf ρ dup = dup instr-tf ρ swap = swap instr-tf ρ (bop x) = bop x instr-tf ρ (load x) = load x instr-tf ρ (store x) = store x instr-tf (ℓ ∷ _) (goto refl) = goto ℓ instr-tf (ℓ ∷ _) (if x refl) = if x ℓ Extractor : ∀ Γ → StackTy → StackTy → Intf → Set Extractor Γ ψ₁ ψ₂ Φ = {J₁ : Typing} → Addressing (down Φ) J₁ → ∃ λ J₂ → Bytecode' Γ (J₁ ++ J₂) J₂ ψ₁ ψ₂ × Addressing (up Φ) (J₁ ++ J₂) exec-extractor : ∀ {Γ} → Extractor Γ ψ₁ ψ₂ ε → ∃ λ J → Bytecode Γ J ψ₁ ψ₂ exec-extractor c = let _ , code , _ = c {[]} [] in -, code label-addresses : ∀ {x} → Labeling ψ₁ x → All (λ z → z ∈ J₁ ++ ψ₁ ∷ []) x label-addresses (refl ∙⟨ σ ⟩ qx) = joinAll (λ ()) σ (∈-++⁺ʳ _ (here refl) ∷ []) (addr' qx) where addr' : ∀ {x} → Bigstar (Own List.[ ψ₁ ]) x → All (λ z → z ∈ J₁ ++ ψ₁ ∷ []) x addr' emp = [] addr' (cons (refl ∙⟨ σ ⟩ qx)) = joinAll (λ ()) σ (∈-++⁺ʳ _ (here refl) ∷ []) (addr' qx) -- We can extract bytecode that does absolute addressing from the fancy -- intrinsically-typed representation. -- We do this in a single recursive pass over the bytecode, collecting a global map of instruction typings, -- and also collecting indices into that map for every defined label on the forward pass, and -- eliminating labels on the backwards pass. -- -- The interface compositions guide the way. The key lemma is `sinkᵣ` -- which says that in order to know what l imports in l ✴ r, -- it is sufficient to know what l ✴ r imports, *and* what r exports. -- -- In this setting 'l' is the head of some suffix of bytecode. -- The imports of 'l ✴ r' have been collected from the labels defined in the prefix. -- We get the exports of the tail 'r' of the suffix from the recursive call. extract : ∀ {Γ} → ∀[ ⟪ Γ ∣ ψ₁ ↝ ψ₂ ⟫ ⇒ Extractor Γ ψ₁ ψ₂ ] extract {ψ₁ = ψ₁} nil ρ = [] , nil , [] extract {ψ₁ = ψ₁} (cons (labeled (↑ ls ∙⟨ σ₁ ⟩ ↓ i) ∙⟨ σ₂ ⟩ is)) ρ = let -- addressing from ↑ ls ρ₀ = label-addresses ls -- Addresses for the labels ρ₁ = source σ₁ ρ₀ [] -- Compute addresses for the tail, -- by combining the addresses from the state with the addresses for the labels. -- We don't need everything, only what is imported in the head instruction. ρ₂ = sinkᵣ σ₂ ρ₁ (All.map (∈-++⁺ˡ {ys = List.[ ψ₁ ]}) ρ) -- Recursively extract first to get addressing for forward jumps. -- These addresses are exported by the tail. k , code , ρ′ = extract is ρ₂ -- Compute the addresses imported by i ρ₃ = sinkᵣ (∙-comm σ₂) ρ′ (All.map ∈-++⁺ˡ ρ) ρ₄ = sinkᵣ σ₁ (All.map ∈-++⁺ˡ ρ₀) ρ₃ -- Compute the exported addresses ρ₅ = source σ₂ (All.map ∈-++⁺ˡ ρ₁) ρ′ in ψ₁ ∷ k , cons (instr-tf ρ₄ i) code , ρ₅ -- Same as above, but simpler extract {ψ₁ = ψ₁} (cons (instr (↓ i) ∙⟨ σ ⟩ b)) ρ = let ρ₂ = sinkᵣ σ [] (All.map (∈-++⁺ˡ {ys = List.[ ψ₁ ]}) ρ) k , code , ρ′ = extract b ρ₂ ρ₃ = sinkᵣ (∙-comm σ) ρ′ (All.map ∈-++⁺ˡ ρ) ρ₄ = source σ [] ρ′ in ψ₁ ∷ k , cons (instr-tf ρ₃ i) code , ρ₄ module Show where open import Data.String as S hiding (show) open import Data.Integer as I open import Data.Fin as Fin open import Data.Nat.Show as NS open import Data.Bool.Show as BS showInt : ℤ → String showInt (+ n) = NS.show n showInt (-[1+ n ]) = "-" S.++ NS.show (ℕ.suc n) showFin : ∀ {n} → Fin n → String showFin f = NS.show (Fin.toℕ f) showComp : Comparator as → String showComp eq = "eq" showComp ne = "ne" showComp lt = "lt" showComp ge = "ge" showComp gt = "gt" showComp le = "le" showComp icmpge = "icmpge" showComp icmpgt = "icmpgt" showComp icmpeq = "icmpeq" showComp icmpne = "icmpne" showComp icmplt = "icmplt" showComp icmple = "icmple" showOp : NativeBinOp a b c → String showOp add = "add" showOp sub = "sub" showOp mul = "mul" showOp div = "div" showOp xor = "xor" showConst : Const a → String showConst Const.null = "null" showConst (num x) = showInt x showConst (bool x) = BS.show x showReg : ∀ {Γ} → a ∈ Γ → String showReg e = showFin (index e) showLabel : ψ ∈ J → String showLabel = λ ℓ → showFin (index ℓ) showInstr : ∀ {Γ} → Instr Γ J ψ₁ ψ₂ → String showInstr (goto ℓ) = "goto " S.++ showLabel ℓ showInstr (if c ℓ) = "if " S.++ (showComp c S.++ " " S.++ showLabel ℓ) showInstr nop = "noop" showInstr (push c) = "push " S.++ (showConst c) showInstr pop = "pop" showInstr dup = "dup" showInstr swap = "swap" showInstr (bop o) = "bop " S.++ (showOp o) showInstr (load r) = "load " S.++ (showReg r) showInstr (store r)= "store " S.++ (showReg r) showInstr ret = "ret" showTy : Ty → String showTy boolean = "bool" showTy byte = "byte" showTy short = "short" showTy int = "int" showTy long = "long" showTy char = "char" showTy (ref x) = "ref" showTy (array t) = "array" showStackTy : StackTy → String showStackTy [] = "[]" showStackTy (x ∷ ψ) = showTy x S.++ " : " S.++ showStackTy ψ showBytecode : ∀ {Γ J} → Bytecode Γ J ψ₁ ψ₂ → String showBytecode b = showBytecode' b 0 where open import Data.Nat showBytecode' : ∀ {Γ J J'} → Bytecode' Γ J J' ψ₁ ψ₂ → ℕ → String showBytecode' nil n = "" showBytecode' (cons {ψ₁ = ψ₁} {ψ₂} i b) n = NS.show n S.++ ": " S.++ showInstr i S.++ "\t⟨ " S.++ showStackTy ψ₁ S.++ " ↝ " S.++ showStackTy ψ₂ S.++ " ⟩" S.++ "\n" S.++ showBytecode' b (ℕ.suc n)
{ "alphanum_fraction": 0.5939887927, "avg_line_length": 34.59030837, "ext": "agda", "hexsha": "3c9f031d91b894b2030e36abe15938d39bf54a38", "lang": "Agda", "max_forks_count": 1, "max_forks_repo_forks_event_max_datetime": "2021-12-28T17:37:15.000Z", "max_forks_repo_forks_event_min_datetime": "2021-12-28T17:37:15.000Z", "max_forks_repo_head_hexsha": "c84bc6b834295ac140ff30bfc8e55228efbf6d2a", "max_forks_repo_licenses": [ "Apache-2.0" ], "max_forks_repo_name": "ajrouvoet/jvm.agda", "max_forks_repo_path": "src/JVM/Transform/Assemble.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "c84bc6b834295ac140ff30bfc8e55228efbf6d2a", "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": "ajrouvoet/jvm.agda", "max_issues_repo_path": "src/JVM/Transform/Assemble.agda", "max_line_length": 109, "max_stars_count": 6, "max_stars_repo_head_hexsha": "c84bc6b834295ac140ff30bfc8e55228efbf6d2a", "max_stars_repo_licenses": [ "Apache-2.0" ], "max_stars_repo_name": "ajrouvoet/jvm.agda", "max_stars_repo_path": "src/JVM/Transform/Assemble.agda", "max_stars_repo_stars_event_max_datetime": "2021-02-28T21:49:08.000Z", "max_stars_repo_stars_event_min_datetime": "2020-10-07T14:07:17.000Z", "num_tokens": 2900, "size": 7852 }
------------------------------------------------------------------------ -- The Agda standard library -- -- Subsets of finite sets ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Fin.Subset where open import Algebra open import Algebra.FunctionProperties using (Op₁; Op₂) import Algebra.Properties.BooleanAlgebra as BoolAlgProp import Algebra.Properties.BooleanAlgebra.Expression as BAExpr open import Data.Bool using (not; _∧_; _∨_; _≟_) open import Data.Fin using (Fin; zero; suc) open import Data.List.Base using (List; foldr; foldl) open import Data.Nat using (ℕ) open import Data.Product using (∃) open import Data.Vec hiding (foldr; foldl) import Data.Vec.Relation.Binary.Pointwise.Extensional as Pointwise open import Relation.Nullary ------------------------------------------------------------------------ -- Definitions -- Sides. open import Data.Bool.Base public using () renaming (Bool to Side; true to inside; false to outside) -- Partitions a finite set into two parts, the inside and the outside. Subset : ℕ → Set Subset = Vec Side ------------------------------------------------------------------------ -- Special subsets -- The empty subset ⊥ : ∀ {n} → Subset n ⊥ = replicate outside -- The full subset ⊤ : ∀ {n} → Subset n ⊤ = replicate inside -- A singleton subset, containing just the given element. ⁅_⁆ : ∀ {n} → Fin n → Subset n ⁅ zero ⁆ = inside ∷ ⊥ ⁅ suc i ⁆ = outside ∷ ⁅ i ⁆ ------------------------------------------------------------------------ -- Membership and subset predicates infix 4 _∈_ _∉_ _⊆_ _⊈_ _∈_ : ∀ {n} → Fin n → Subset n → Set x ∈ p = p [ x ]= inside _∉_ : ∀ {n} → Fin n → Subset n → Set x ∉ p = ¬ (x ∈ p) _⊆_ : ∀ {n} → Subset n → Subset n → Set p ⊆ q = ∀ {x} → x ∈ p → x ∈ q _⊈_ : ∀ {n} → Subset n → Subset n → Set p ⊈ q = ¬ (p ⊆ q) ------------------------------------------------------------------------ -- Set operations infixr 7 _∩_ infixr 6 _∪_ -- Complement ∁ : ∀ {n} → Op₁ (Subset n) ∁ p = map not p -- Intersection _∩_ : ∀ {n} → Op₂ (Subset n) p ∩ q = zipWith _∧_ p q -- Union _∪_ : ∀ {n} → Op₂ (Subset n) p ∪ q = zipWith _∨_ p q -- N-ary union ⋃ : ∀ {n} → List (Subset n) → Subset n ⋃ = foldr _∪_ ⊥ -- N-ary intersection ⋂ : ∀ {n} → List (Subset n) → Subset n ⋂ = foldr _∩_ ⊤ -- Size ∣_∣ : ∀ {n} → Subset n → ℕ ∣ p ∣ = count (_≟ inside) p ------------------------------------------------------------------------ -- Properties Nonempty : ∀ {n} (p : Subset n) → Set Nonempty p = ∃ λ f → f ∈ p Empty : ∀ {n} (p : Subset n) → Set Empty p = ¬ Nonempty p Lift : ∀ {n ℓ} → (Fin n → Set ℓ) → (Subset n → Set ℓ) Lift P p = ∀ {x} → x ∈ p → P x
{ "alphanum_fraction": 0.4998144712, "avg_line_length": 24.2792792793, "ext": "agda", "hexsha": "8d14b9fd09136a9bcf6372ca05a5eef8ea1106cb", "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/Fin/Subset.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/Fin/Subset.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/Data/Fin/Subset.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 826, "size": 2695 }
------------------------------------------------------------------------ -- The Agda standard library -- -- Operations on nullary relations (like negation and decidability) ------------------------------------------------------------------------ -- Some operations on/properties of nullary relations, i.e. sets. module Relation.Nullary where import Relation.Nullary.Core as Core ------------------------------------------------------------------------ -- Negation open Core public using (¬_) ------------------------------------------------------------------------ -- Decidable relations open Core public using (Dec; yes; no)
{ "alphanum_fraction": 0.4060031596, "avg_line_length": 28.7727272727, "ext": "agda", "hexsha": "088c99c14b03fe1130f5af605a1b1c7320462a55", "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": "9d4c43b1609d3f085636376fdca73093481ab882", "max_forks_repo_licenses": [ "Apache-2.0" ], "max_forks_repo_name": "qwe2/try-agda", "max_forks_repo_path": "agda-stdlib-0.9/src/Relation/Nullary.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "9d4c43b1609d3f085636376fdca73093481ab882", "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": "qwe2/try-agda", "max_issues_repo_path": "agda-stdlib-0.9/src/Relation/Nullary.agda", "max_line_length": 72, "max_stars_count": 1, "max_stars_repo_head_hexsha": "9d4c43b1609d3f085636376fdca73093481ab882", "max_stars_repo_licenses": [ "Apache-2.0" ], "max_stars_repo_name": "qwe2/try-agda", "max_stars_repo_path": "agda-stdlib-0.9/src/Relation/Nullary.agda", "max_stars_repo_stars_event_max_datetime": "2016-10-20T15:52:05.000Z", "max_stars_repo_stars_event_min_datetime": "2016-10-20T15:52:05.000Z", "num_tokens": 88, "size": 633 }
module Issue2858-Fresh {A : Set} (_#_ : A → A → Set) where interleaved mutual data Fresh : Set data IsFresh (a : A) : Fresh → Set -- nil is a fresh list constructor [] : Fresh #[] : IsFresh a [] -- cons is fresh as long as the new value is fresh constructor cons : (x : A) (xs : Fresh) → IsFresh x xs → Fresh #cons : ∀ {x xs p} → a # x → IsFresh a xs → IsFresh a (cons x xs p)
{ "alphanum_fraction": 0.5473441109, "avg_line_length": 25.4705882353, "ext": "agda", "hexsha": "71efd0ee489ba200c9d7262d41ae8ed84eb80dda", "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/Issue2858-Fresh.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/Issue2858-Fresh.agda", "max_line_length": 73, "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/Issue2858-Fresh.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 141, "size": 433 }
-- Andreas, 2017-11-01, issue #2824 -- Don't allow built-ins defined in parametrized modules module _ (A : Set) where data Nat : Set where zero : Nat suc : Nat → Nat {-# BUILTIN NATURAL Nat #-} -- Should fail test = 5
{ "alphanum_fraction": 0.6244725738, "avg_line_length": 18.2307692308, "ext": "agda", "hexsha": "9394f082ede7ab431662b52dcedb0688fdaeaf87", "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/Issue2824BuiltinDefinedInParametrizedModule.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/Issue2824BuiltinDefinedInParametrizedModule.agda", "max_line_length": 56, "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/Issue2824BuiltinDefinedInParametrizedModule.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": 78, "size": 237 }
module Issue231 where postulate A : Set data List : Set where _∷_ : A → List → List data Any : List → Set where there : ∀ {x xs} → Any xs → Any (x ∷ xs) postulate id : (A : Set) → A → A lemma : (xs : List) → Set → (p : Any xs) → Set lemma (x ∷ xs) A (there p) with id (Any xs) p lemma (x ∷ xs) A (there p) | p′ = {!p′!} -- Before case-split: -- lemma (x ∷ xs) A (there p) | p′ = {!p′!} -- After case-split: -- lemma (A ∷ _) _ (there p) | there y = ?
{ "alphanum_fraction": 0.5323275862, "avg_line_length": 20.1739130435, "ext": "agda", "hexsha": "3585f90dcb924c86988d03e1e556a90256e2f891", "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/Issue231.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/Issue231.agda", "max_line_length": 46, "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/Issue231.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": 183, "size": 464 }
-- Andreas, 2016-11-02, issue #2289 -- Meta should be acceptable as sort of record type. postulate F : Set → Set mutual data ⊥ : _ where -- works FBot = F ⊥ mutual record ⊤ : _ where -- should work FTop = F ⊤
{ "alphanum_fraction": 0.6150442478, "avg_line_length": 14.125, "ext": "agda", "hexsha": "a9dd463f75e63ea030f2e20732817ade173b7692", "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/Issue2289.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/Issue2289.agda", "max_line_length": 52, "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/Issue2289.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": 82, "size": 226 }
{-# OPTIONS --without-K #-} module Search.Searchable.Fun where open import Type hiding (★) open import Data.Product open import Data.Sum open import Data.One open import Data.Bits open import Function.NP open import Search.Type open import Search.Searchable open import Search.Searchable.Product open import Search.Searchable.Sum import Function.Inverse.NP as FI open FI using (_↔_; inverses; module Inverse) renaming (_$₁_ to to; _$₂_ to from) open import Function.Related.TypeIsomorphisms.NP import Relation.Binary.PropositionalEquality.NP as ≡ open ≡ using (_≡_; _≗_) private -- unused SΠΣ⁻ : ∀ {m A} {B : A → ★ _} {C : Σ A B → ★ _} → Search m ((x : A) (y : B x) → C (x , y)) → Search m (Π (Σ A B) C) SΠΣ⁻ s _∙_ f = s _∙_ (f ∘ uncurry) SΠΣ⁻-ind : ∀ {m p A} {B : A → ★ _} {C : Σ A B → ★ _} → {s : Search m ((x : A) (y : B x) → C (x , y))} → SearchInd p s → SearchInd p (SΠΣ⁻ s) SΠΣ⁻-ind ind P P∙ Pf = ind (P ∘ SΠΣ⁻) P∙ (Pf ∘ uncurry) S×⁻ : ∀ {m A B C} → Search m (A → B → C) → Search m (A × B → C) S×⁻ = SΠΣ⁻ S×⁻-ind : ∀ {m p A B C} → {s : Search m (A → B → C)} → SearchInd p s → SearchInd p (S×⁻ s) S×⁻-ind = SΠΣ⁻-ind SΠ⊎⁻ : ∀ {m A B} {C : A ⊎ B → ★ _} → Search m (Π A (C ∘ inj₁) × Π B (C ∘ inj₂)) → Search m (Π (A ⊎ B) C) SΠ⊎⁻ s _∙_ f = s _∙_ (f ∘ uncurry [_,_]) SΠ⊎⁻-ind : ∀ {m p A B} {C : A ⊎ B → ★ _} {s : Search m (Π A (C ∘ inj₁) × Π B (C ∘ inj₂))} (i : SearchInd p s) → SearchInd p (SΠ⊎⁻ {C = C} s) -- A sB) SΠ⊎⁻-ind i P P∙ Pf = i (P ∘ SΠ⊎⁻) P∙ (Pf ∘ uncurry [_,_]) {- For each A→C function and each B→C function an A⊎B→C function is yield -} S⊎⁻ : ∀ {m A B C} → Search m (A → C) → Search m (B → C) → Search m (A ⊎ B → C) S⊎⁻ sA sB = SΠ⊎⁻ (sA ×-search sB) μΠΣ⁻ : ∀ {A B}{C : Σ A B → ★₀} → Searchable ((x : A)(y : B x) → C (x , y)) → Searchable (Π (Σ A B) C) μΠΣ⁻ = μ-iso (FI.sym curried) Σ-Fun : ∀ {A B} → Funable A → Funable B → Funable (A × B) Σ-Fun (μA , μA→) FB = μΣ μA (searchable FB) , (λ x → μΠΣ⁻ (μA→ (negative FB x))) where open Funable {- μΠ⊎⁻ : ∀ {A B : ★₀}{C : A ⊎ B → ★ _} → Searchable (Π A (C ∘ inj₁) × Π B (C ∘ inj₂)) → Searchable (Π (A ⊎ B) C) μΠ⊎⁻ = μ-iso ? _⊎-Fun_ : ∀ {A B : ★₀} → Funable A → Funable B → Funable (A ⊎ B) _⊎-Fun_ (μA , μA→) (μB , μB→) = (μA ⊎-μ μB) , (λ X → μΠ⊎⁻ (μA→ X ×-μ μB→ X)) -} S𝟙 : ∀ {m A} → Search m A → Search m (𝟙 → A) S𝟙 sA _∙_ f = sA _∙_ (f ∘ const) SΠBit : ∀ {m A} → Search m (A 0b) → Search m (A 1b) → Search m (Π Bit A) SΠBit sA₀ sA₁ _∙_ f = sA₀ _∙_ λ x → sA₁ _∙_ λ y → f λ {true → y; false → x} ×-Dist : ∀ {A B} FA FB → DistFunable {A} FA → DistFunable {B} FB → DistFunable (Σ-Fun FA FB) ×-Dist FA FB FA-dist FB-dist μX c _⊙_ distrib _⊙-cong_ f = Πᴬ (λ x → Πᴮ (λ y → Σ' (f (x , y)))) ≈⟨ ⟦search⟧ (searchable FA){_≡_} ≡.refl _≈_ (λ x y → x ⊙-cong y) (λ { {x} {.x} ≡.refl → FB-dist μX c _⊙_ distrib _⊙-cong_ (curry f x)}) ⟩ Πᴬ (λ x → Σᴮ (λ fb → Πᴮ (λ y → f (x , y) (fb y)))) ≈⟨ FA-dist (negative FB μX) c _⊙_ distrib _⊙-cong_ (λ x fb → search (searchable FB) _⊙_ (λ y → f (x , y) (fb y))) ⟩ Σᴬᴮ (λ fab → Πᴬ (λ x → Πᴮ (λ y → f (x , y) (fab x y)))) ∎ where open CMon c open Funable Σ' = search μX _∙_ Πᴬ = search (searchable FA) _⊙_ Πᴮ = search (searchable FB) _⊙_ Σᴬᴮ = search (negative FA (negative FB μX)) _∙_ Σᴮ = search (negative FB μX) _∙_ {- ⊎-Dist : ∀ {A B : ★₀} FA FB → DistFunable {A} FA → DistFunable {B} FB → DistFunable (FA ⊎-Fun FB) ⊎-Dist FA FB FA-dist FB-dist μX c _◎_ distrib _◎-cong_ f = Πᴬ (Σ' ∘ f ∘ inj₁) ◎ Πᴮ (Σ' ∘ f ∘ inj₂) ≈⟨ {!FA-dist μX c _◎_ distrib _◎-cong_ (f ∘ inj₁) ◎-cong FB-dist μX c _◎_ distrib _◎-cong_ (f ∘ inj₂)!} ⟩ {- Σᴬ (λ fa → Πᴬ (λ i → f (inj₁ i) (fa i))) ◎ Σᴮ (λ fb → Πᴮ (λ i → f (inj₂ i) (fb i))) ≈⟨ sym (search-linʳ (negative FA μX) monoid _◎_ _ _ (proj₂ distrib)) ⟩ Σᴬ (λ fa → Πᴬ (λ i → f (inj₁ i) (fa i)) ◎ Σᴮ (λ fb → Πᴮ (λ i → f (inj₂ i) (fb i)))) ≈⟨ search-sg-ext (negative FA μX) semigroup (λ fa → sym (search-linˡ (negative FB μX) monoid _◎_ _ _ (proj₁ distrib))) ⟩ -} (Σᴬ λ fa → Σᴮ λ fb → Πᴬ ((f ∘ inj₁) ˢ fa) ◎ Πᴮ ((f ∘ inj₂) ˢ fb)) ∎ where open CMon c open Funable Σ' = search μX _∙_ Πᴬ = search (searchable FA) _◎_ Πᴮ = search (searchable FB) _◎_ Σᴬ = search (negative FA μX) _∙_ Σᴮ = search (negative FB μX) _∙_ -} -- -} -- -} -- -}
{ "alphanum_fraction": 0.4990181104, "avg_line_length": 34.2014925373, "ext": "agda", "hexsha": "cb228262913b20df1fa6e0daffe811c0e419724e", "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": "16bc8333503ff9c00d47d56f4ec6113b9269a43e", "max_forks_repo_licenses": [ "BSD-3-Clause" ], "max_forks_repo_name": "crypto-agda/explore", "max_forks_repo_path": "lib/Explore/Explorable/Fun.agda", "max_issues_count": 1, "max_issues_repo_head_hexsha": "16bc8333503ff9c00d47d56f4ec6113b9269a43e", "max_issues_repo_issues_event_max_datetime": "2019-03-16T14:24:04.000Z", "max_issues_repo_issues_event_min_datetime": "2019-03-16T14:24:04.000Z", "max_issues_repo_licenses": [ "BSD-3-Clause" ], "max_issues_repo_name": "crypto-agda/explore", "max_issues_repo_path": "lib/Explore/Explorable/Fun.agda", "max_line_length": 121, "max_stars_count": 2, "max_stars_repo_head_hexsha": "16bc8333503ff9c00d47d56f4ec6113b9269a43e", "max_stars_repo_licenses": [ "BSD-3-Clause" ], "max_stars_repo_name": "crypto-agda/explore", "max_stars_repo_path": "lib/Explore/Explorable/Fun.agda", "max_stars_repo_stars_event_max_datetime": "2017-06-28T19:19:29.000Z", "max_stars_repo_stars_event_min_datetime": "2016-06-05T09:25:32.000Z", "num_tokens": 2277, "size": 4583 }
------------------------------------------------------------------------ -- The Agda standard library -- -- This module is DEPRECATED. Please use -- Data.Vec.Relation.Binary.Equality.DecSetoid directly. ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Relation.Binary module Data.Vec.Relation.Equality.DecSetoid {a ℓ} (DS : DecSetoid a ℓ) where open import Data.Vec.Relation.Binary.Equality.DecSetoid public
{ "alphanum_fraction": 0.5237113402, "avg_line_length": 30.3125, "ext": "agda", "hexsha": "6dfa1adf3aa825a166f6913e00573bdf22f21089", "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/Relation/Equality/DecSetoid.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/Relation/Equality/DecSetoid.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/Data/Vec/Relation/Equality/DecSetoid.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 94, "size": 485 }
module Human.JS where open import Human.Unit open import Human.String open import Human.IO infixl 1 _>>=_ postulate return : ∀ {a} {A : Set a} → A → IO A _>>=_ : ∀ {a b} {A : Set a} {B : Set b} → IO A → (A → IO B) → IO B _>>_ : ∀ {a b} {A : Set a} {B : Set b} → IO A → IO B → IO B print : String → IO Unit {-# COMPILE JS return = a => b => c => c #-} {-# COMPILE JS _>>=_ = a => b => c => d => f => x => f(x) #-} {-# COMPILE JS _>>_ = a => b => c => d => f => x => x #-} {-# COMPILE JS print = s => console.log(s) #-}
{ "alphanum_fraction": 0.4739776952, "avg_line_length": 28.3157894737, "ext": "agda", "hexsha": "0fd3618d7b9e3db6905841012c41ce6beb1c26ee", "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": "b509eb4c4014605facfb4ee5c807cd07753d4477", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "MaisaMilena/JuiceMaker", "max_forks_repo_path": "src/Human/JS.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "b509eb4c4014605facfb4ee5c807cd07753d4477", "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": "MaisaMilena/JuiceMaker", "max_issues_repo_path": "src/Human/JS.agda", "max_line_length": 69, "max_stars_count": 6, "max_stars_repo_head_hexsha": "b509eb4c4014605facfb4ee5c807cd07753d4477", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "MaisaMilena/JuiceMaker", "max_stars_repo_path": "src/Human/JS.agda", "max_stars_repo_stars_event_max_datetime": "2020-11-28T05:46:27.000Z", "max_stars_repo_stars_event_min_datetime": "2019-03-29T17:35:20.000Z", "num_tokens": 207, "size": 538 }
---------------------------------------------------------------------------------- -- Types for parse trees ---------------------------------------------------------------------------------- module cedille-types where open import lib -- open import parse-tree open import general-util {-# FOREIGN GHC import qualified CedilleTypes #-} mutual posinfo = string var = string num = string erased? = 𝔹 minus? = 𝔹 imports = 𝕃 imprt ex-imports = 𝕃 ex-imprt params = 𝕃 param ex-params = 𝕃 ex-param ex-cmds = 𝕃 ex-cmd ex-ctrs = 𝕃 ex-ctr ctrs = 𝕃 ctr args = 𝕃 arg ex-args = 𝕃 ex-arg opacity = 𝔹 cases = 𝕃 case ex-cases = 𝕃 ex-case left-right = maybe 𝔹 rho-hnf = 𝔹 opt-public = 𝔹 is-mu = maybe term ⊎ var iota-num = 𝔹 case-args = 𝕃 case-arg tmtp = term ⊎ type tpkd = type ⊎ kind arg = term ⊎ tmtp pattern Tkt T = inj₁ T pattern Tkk k = inj₂ k pattern Ttm t = inj₁ t pattern Ttp T = inj₂ T pattern Arg t = inj₁ t pattern ArgE tT = inj₂ tT pattern ArgTp T = ArgE (Ttp T) pattern ArgEr t = ArgE (Ttm t) pattern ι1 = ff pattern ι2 = tt pattern NotErased = ff pattern Erased = tt pattern opacity-open = tt pattern opacity-closed = ff pattern EpsHanf = tt pattern EpsHnf = ff pattern EpsLeft = just ff pattern EpsRight = just tt pattern EpsBoth = nothing pattern Public = tt pattern Private = ff ctr = var × type pattern Ctr x T = x , T data param : Set where Param : erased? → var → tpkd → param pattern ParamTp x k = Param _ x (Tkk k) pattern ParamTm x T = Param ff x (Tkt T) pattern ParamEr x T = Param tt x (Tkt T) data term : Set where App : term → term → term AppE : term → tmtp → term Beta : term → term → term Delta : (do-bohm? : maybe (term × term)) → (Tᵣ : type) → (contra : term) → term Hole : posinfo → term IotaPair : term → term → var → type → term IotaProj : term → iota-num → term Lam : erased? → var → maybe tpkd → term → term LetTm : erased? → var → maybe type → term → term → term LetTp : var → kind → type → term → term Phi : term → term → term → term Rho : term → var → type → term → term Sigma : term → term Mu : is-mu → term → maybe type → datatype-info → cases → term Var : var → term pattern AppTp t T = AppE t (Ttp T) pattern AppEr t t' = AppE t (Ttm t') data case : Set where Case : var → case-args → term → 𝕃 tmtp → case data type : Set where TpAbs : erased? → var → tpkd → type → type TpIota : var → type → type → type TpApp : type → tmtp → type TpEq : term → term → type TpHole : posinfo → type TpLam : var → tpkd → type → type TpVar : var → type pattern TpAppTp T T' = TpApp T (Ttp T') pattern TpAppTm T t = TpApp T (Ttm t) data kind : Set where KdStar : kind KdHole : posinfo → kind KdAbs : var → tpkd → kind → kind data case-arg : Set where CaseArg : erased? → var → maybe tpkd → case-arg data ex-file : Set where ExModule : ex-imports → posinfo → posinfo → var → ex-params → ex-cmds → posinfo → ex-file cmds = 𝕃 cmd data file : Set where Module : var → params → cmds → file indx : Set indx = var × tpkd pattern Index x tk = x , tk indices = 𝕃 indx record encoding-defs : Set where constructor mk-enc-defs inductive field ecs : cmds -- encoding gcs : cmds -- generated Cast : type cast-in : term cast-out : term cast-is : term Functor : type functor-in : term functor-out : term Fix : type fix-in : term fix-out : term lambek1 : term lambek2 : term fix-ind : term record encoded-defs : Set where constructor mk-encd-defs field Is/D : var is/D : var to/D : var TypeF/D : var IndF/D : var fmap/D : var record datatype-info : Set where constructor mk-data-info inductive field name : var original : var asₚ : args asᵢ : 𝕃 tmtp ps : params kᵢ : kind k : kind cs : ctrs csₚₛ : ctrs eds : encoding-defs gds : encoded-defs data cmd : Set where CmdDefTerm : var → term → cmd CmdDefType : var → kind → type → cmd CmdDefKind : var → params → kind → cmd CmdDefData : encoding-defs → var → params → kind → ctrs → cmd CmdImport : imprt → cmd data imprt : Set where Import : opt-public → filepath → var → maybe var → args → imprt data ex-cmd : Set where ExCmdKind : posinfo → var → ex-params → ex-kd → posinfo → ex-cmd ExCmdDef : opacity → ex-def → posinfo → ex-cmd ExCmdData : def-datatype → posinfo → ex-cmd ExCmdImport : ex-imprt → ex-cmd data def-datatype : Set where DefDatatype : posinfo → posinfo → var → ex-params → ex-kd → ex-ctrs → def-datatype data import-as : Set where ImportAs : posinfo → var → import-as data ex-imprt : Set where ExImport : posinfo → opt-public → posinfo → filepath → maybe import-as → ex-args → posinfo → ex-imprt data ex-param : Set where ExParam : posinfo → erased? → posinfo → var → ex-tk → posinfo → ex-param data ex-ctr : Set where ExCtr : posinfo → var → ex-tp → ex-ctr data ex-arg : Set where ExTmArg : erased? → ex-tm → ex-arg ExTpArg : ex-tp → ex-arg data lterm : Set where Lterm : erased? → ex-tm → lterm data theta : Set where Abstract : theta AbstractEq : theta AbstractVars : 𝕃 var → theta data ex-def : Set where ExDefTerm : posinfo → var → maybe ex-tp → ex-tm → ex-def ExDefType : posinfo → var → ex-kd → ex-tp → ex-def data ex-guide : Set where ExGuide : posinfo → var → ex-tp → ex-guide data ex-case : Set where ExCase : posinfo → var → ex-case-args → ex-tm → ex-case ex-case-args = 𝕃 ex-case-arg data ex-case-arg-sym : Set where ExCaseArgTm : ex-case-arg-sym ExCaseArgEr : ex-case-arg-sym ExCaseArgTp : ex-case-arg-sym data ex-case-arg : Set where ExCaseArg : ex-case-arg-sym → posinfo → var → ex-case-arg data ex-tk : Set where ExTkt : ex-tp → ex-tk ExTkk : ex-kd → ex-tk data ex-tp : Set where ExTpAbs : posinfo → erased? → posinfo → var → ex-tk → ex-tp → ex-tp ExTpIota : posinfo → posinfo → var → ex-tp → ex-tp → ex-tp ExTpNoSpans : ex-tp → posinfo → ex-tp ExTpLet : posinfo → ex-def → ex-tp → ex-tp ExTpApp : ex-tp → ex-tp → ex-tp ExTpAppt : ex-tp → ex-tm → ex-tp ExTpArrow : ex-tp → erased? → ex-tp → ex-tp ExTpEq : posinfo → ex-tm → ex-tm → posinfo → ex-tp ExTpHole : posinfo → ex-tp ExTpLam : posinfo → posinfo → var → ex-tk → ex-tp → ex-tp ExTpParens : posinfo → ex-tp → posinfo → ex-tp ExTpVar : posinfo → var → ex-tp data pos-tm : Set where PosTm : ex-tm → posinfo → pos-tm data ex-is-mu : Set where ExIsMu : posinfo → var → ex-is-mu ExIsMu' : maybe ex-tm → ex-is-mu data ex-tm : Set where ExApp : ex-tm → erased? → ex-tm → ex-tm ExAppTp : ex-tm → ex-tp → ex-tm ExBeta : posinfo → maybe pos-tm → maybe pos-tm → ex-tm ExChi : posinfo → maybe ex-tp → ex-tm → ex-tm ExDelta : posinfo → maybe ex-tp → ex-tm → ex-tm ExEpsilon : posinfo → left-right → minus? → ex-tm → ex-tm ExHole : posinfo → ex-tm ExIotaPair : posinfo → ex-tm → ex-tm → maybe ex-guide → posinfo → ex-tm ExIotaProj : ex-tm → num → posinfo → ex-tm ExLam : posinfo → erased? → posinfo → var → maybe ex-tk → ex-tm → ex-tm ExLet : posinfo → erased? → ex-def → ex-tm → ex-tm ExOpen : posinfo → opacity → posinfo → var → ex-tm → ex-tm ExParens : posinfo → ex-tm → posinfo → ex-tm ExPhi : posinfo → ex-tm → ex-tm → ex-tm → posinfo → ex-tm ExRho : posinfo → rho-hnf → maybe (𝕃 num) → ex-tm → maybe ex-guide → ex-tm → ex-tm ExSigma : posinfo → ex-tm → ex-tm ExTheta : posinfo → theta → ex-tm → 𝕃 lterm → ex-tm ExMu : posinfo → ex-is-mu → ex-tm → maybe ex-tp → posinfo → ex-cases → posinfo → ex-tm ExVar : posinfo → var → ex-tm data ex-kd : Set where ExKdAbs : posinfo → posinfo → var → ex-tk → ex-kd → ex-kd ExKdArrow : ex-tk → ex-kd → ex-kd ExKdHole : posinfo → ex-kd ExKdParens : posinfo → ex-kd → posinfo → ex-kd ExKdStar : posinfo → ex-kd ExKdVar : posinfo → var → ex-args → ex-kd {-# COMPILE GHC ex-param = data CedilleTypes.Param (CedilleTypes.Param) #-} {-# COMPILE GHC ex-file = data CedilleTypes.File (CedilleTypes.Module) #-} {-# COMPILE GHC ex-cmd = data CedilleTypes.Cmd (CedilleTypes.CmdKind | CedilleTypes.CmdDef | CedilleTypes.CmdData | CedilleTypes.CmdImport) #-} {-# COMPILE GHC ex-ctr = data CedilleTypes.Ctr (CedilleTypes.Ctr) #-} {-# COMPILE GHC ex-arg = data CedilleTypes.Arg (CedilleTypes.TermArg | CedilleTypes.TypeArg) #-} {-# COMPILE GHC def-datatype = data CedilleTypes.DefDatatype (CedilleTypes.DefDatatype) #-} {-# COMPILE GHC import-as = data CedilleTypes.ImportAs (CedilleTypes.ImportAs) #-} {-# COMPILE GHC ex-imprt = data CedilleTypes.Imprt (CedilleTypes.Import) #-} {-# COMPILE GHC ex-case-arg-sym = data CedilleTypes.CaseArgSym (CedilleTypes.CaseArgTm | CedilleTypes.CaseArgEr | CedilleTypes.CaseArgTp) #-} --{-# COMPILE GHC case-arg = data CedilleTypes.CaseArg (CedilleTypes.CaseArg) #-} {-# COMPILE GHC lterm = data CedilleTypes.Lterm (CedilleTypes.Lterm) #-} {-# COMPILE GHC theta = data CedilleTypes.Theta (CedilleTypes.Abstract | CedilleTypes.AbstractEq | CedilleTypes.AbstractVars) #-} {-# COMPILE GHC ex-def = data CedilleTypes.Def (CedilleTypes.DefTerm | CedilleTypes.DefType) #-} {-# COMPILE GHC ex-guide = data CedilleTypes.Guide (CedilleTypes.Guide) #-} {-# COMPILE GHC ex-case = data CedilleTypes.Case (CedilleTypes.Case) #-} {-# COMPILE GHC ex-case-arg = data CedilleTypes.CaseArg (CedilleTypes.CaseArg) #-} {-# COMPILE GHC ex-tk = data CedilleTypes.TpKd (CedilleTypes.Tkt | CedilleTypes.Tkk) #-} {-# COMPILE GHC ex-tp = data CedilleTypes.Type (CedilleTypes.TpAbs | CedilleTypes.TpIota | CedilleTypes.TpNoSpans | CedilleTypes.TpLet | CedilleTypes.TpApp | CedilleTypes.TpAppt | CedilleTypes.TpArrow | CedilleTypes.TpEq | CedilleTypes.TpHole | CedilleTypes.TpLam | CedilleTypes.TpParens | CedilleTypes.TpVar) #-} {-# COMPILE GHC pos-tm = data CedilleTypes.PosTerm (CedilleTypes.PosTerm) #-} {-# COMPILE GHC ex-is-mu = data CedilleTypes.IsMu (CedilleTypes.IsMu | CedilleTypes.IsMu') #-} {-# COMPILE GHC ex-tm = data CedilleTypes.Term (CedilleTypes.App | CedilleTypes.AppTp | CedilleTypes.Beta | CedilleTypes.Chi | CedilleTypes.Delta | CedilleTypes.Epsilon | CedilleTypes.Hole | CedilleTypes.IotaPair | CedilleTypes.IotaProj | CedilleTypes.Lam | CedilleTypes.Let | CedilleTypes.Open | CedilleTypes.Parens | CedilleTypes.Phi | CedilleTypes.Rho | CedilleTypes.Sigma | CedilleTypes.Theta | CedilleTypes.Mu | CedilleTypes.Var) #-} {-# COMPILE GHC ex-kd = data CedilleTypes.Kind (CedilleTypes.KdAbs | CedilleTypes.KdArrow | CedilleTypes.KdHole | CedilleTypes.KdParens | CedilleTypes.KdStar | CedilleTypes.KdVar) #-}
{ "alphanum_fraction": 0.6267990527, "avg_line_length": 35.0734824281, "ext": "agda", "hexsha": "667fac2bf2f0578f60e17f037b970ce5f67eb8bc", "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": "9df4b85b55b57f97466242fdbb499adbd3bca893", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "zmthy/cedille", "max_forks_repo_path": "src/cedille-types.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "9df4b85b55b57f97466242fdbb499adbd3bca893", "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": "zmthy/cedille", "max_issues_repo_path": "src/cedille-types.agda", "max_line_length": 438, "max_stars_count": null, "max_stars_repo_head_hexsha": "9df4b85b55b57f97466242fdbb499adbd3bca893", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "zmthy/cedille", "max_stars_repo_path": "src/cedille-types.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 3674, "size": 10978 }
------------------------------------------------------------------------ -- The Agda standard library -- -- Pointwise lifting of relations over Vector ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Vec.Functional.Relation.Binary.Pointwise where open import Data.Fin.Base open import Data.Nat.Base open import Data.Vec.Functional as VF hiding (map) open import Level using (Level) open import Relation.Binary private variable a b r s ℓ : Level A : Set a B : Set b ------------------------------------------------------------------------ -- Definition Pointwise : REL A B ℓ → ∀ {n} → Vector A n → Vector B n → Set ℓ Pointwise R xs ys = ∀ i → R (xs i) (ys i) ------------------------------------------------------------------------ -- Operations module _ {R : REL A B r} {S : REL A B s} where map : R ⇒ S → ∀ {n} → Pointwise R ⇒ Pointwise S {n = n} map f rs i = f (rs i)
{ "alphanum_fraction": 0.4524793388, "avg_line_length": 26.8888888889, "ext": "agda", "hexsha": "360dc46540b3957409615ddee1b6ca2bd269230a", "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/Binary/Pointwise.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/Binary/Pointwise.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/Data/Vec/Functional/Relation/Binary/Pointwise.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": 217, "size": 968 }
module Zipper where import Derivative import Functor import Sets open Functor open Derivative open Semantics open Recursive open Sets Zipper : U -> Set Zipper F = List (⟦ ∂ F ⟧ (μ F)) -- Plugging a zipper unzip : {F : U} -> Zipper F -> μ F -> μ F unzip [] t = t unzip {F} (c :: γ) t = inn (plug-∂ F c (unzip γ t))
{ "alphanum_fraction": 0.5714285714, "avg_line_length": 16.2272727273, "ext": "agda", "hexsha": "4e855045830c762dc85d199e0d3c13bc56483ce1", "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/clowns/Zipper.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/clowns/Zipper.agda", "max_line_length": 53, "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/clowns/Zipper.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": 128, "size": 357 }
open import Data.Product using ( _×_ ; _,_ ) open import Relation.Unary using ( _∈_ ) open import Web.Semantic.DL.ABox.Interp using ( ⌊_⌋ ; ind ) open import Web.Semantic.DL.ABox.Skolemization using ( askolem ; askolem-sound ) open import Web.Semantic.DL.FOL using ( Formula ; _∧_ ) open import Web.Semantic.DL.FOL.Model using ( _⊨f_ ) open import Web.Semantic.DL.KB using ( KB ; tbox ; abox ) open import Web.Semantic.DL.KB.Model using ( _⊨_ ) open import Web.Semantic.DL.Signature using ( Signature ) open import Web.Semantic.DL.TBox.Skolemization using ( TSkolems ; tskolem ; tskolem-sound ) module Web.Semantic.DL.KB.Skolemization {Σ : Signature} {X : Set} where Skolems : Set → KB Σ X → Set Skolems Δ K = TSkolems Δ (tbox K) skolem : ∀ {Δ} → (X → Δ) → ∀ K → (Skolems Δ K) → Formula Σ Δ skolem i K Φ = tskolem (tbox K) Φ ∧ askolem i (abox K) skolem-sound : ∀ I K Φ → (⌊ I ⌋ ⊨f skolem (ind I) K Φ) → (I ⊨ K) skolem-sound I K Φ (I⊨T , I⊨A) = (tskolem-sound ⌊ I ⌋ (tbox K) Φ I⊨T , askolem-sound I (abox K) I⊨A)
{ "alphanum_fraction": 0.6735496559, "avg_line_length": 48.4285714286, "ext": "agda", "hexsha": "bdfcfe08e109693f731799aa27be88f49d399740", "lang": "Agda", "max_forks_count": 3, "max_forks_repo_forks_event_max_datetime": "2022-03-12T11:40:03.000Z", "max_forks_repo_forks_event_min_datetime": "2017-12-03T14:52:09.000Z", "max_forks_repo_head_hexsha": "38fbc3af7062ba5c3d7d289b2b4bcfb995d99057", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "bblfish/agda-web-semantic", "max_forks_repo_path": "src/Web/Semantic/DL/KB/Skolemization.agda", "max_issues_count": 4, "max_issues_repo_head_hexsha": "38fbc3af7062ba5c3d7d289b2b4bcfb995d99057", "max_issues_repo_issues_event_max_datetime": "2021-01-04T20:57:19.000Z", "max_issues_repo_issues_event_min_datetime": "2018-11-14T02:32:28.000Z", "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "bblfish/agda-web-semantic", "max_issues_repo_path": "src/Web/Semantic/DL/KB/Skolemization.agda", "max_line_length": 100, "max_stars_count": 9, "max_stars_repo_head_hexsha": "8ddbe83965a616bff6fc7a237191fa261fa78bab", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "agda/agda-web-semantic", "max_stars_repo_path": "src/Web/Semantic/DL/KB/Skolemization.agda", "max_stars_repo_stars_event_max_datetime": "2020-03-14T14:21:08.000Z", "max_stars_repo_stars_event_min_datetime": "2015-09-13T17:46:41.000Z", "num_tokens": 411, "size": 1017 }
module Issue643 where module M₁ (A : Set) where record R : Set₁ where field P : A → Set module M₂ (A : Set) where open M₁ A postulate r : R T : R → Set open R r p : ∀ x → P x p x = {!!} -- The goal was printed as "P" rather than "P x". q : T r q = {!!} -- This goal was printed as T P at an intermediate stage of fixing
{ "alphanum_fraction": 0.5388739946, "avg_line_length": 14.92, "ext": "agda", "hexsha": "135c08b178be29393f866007bd95d66780ef701a", "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/Issue643.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/Issue643.agda", "max_line_length": 83, "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/Issue643.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": 129, "size": 373 }
open import Agda.Builtin.Bool open import Agda.Builtin.Nat open import Agda.Builtin.Char renaming (primCharEquality to _==ᶜ_) open import Agda.Builtin.List open import Agda.Builtin.Equality open import Agda.Builtin.String renaming (primStringAppend to _++_) open import Agda.Builtin.IO open import Agda.Builtin.Unit variable A B C : Set map : (A → B) → List A → List B map f [] = [] map f (x ∷ xs) = f x ∷ map f xs <?> = '\xFFFD' fromCount : Nat → Nat → List Nat fromCount 0 _ = [] fromCount (suc n) a = a ∷ fromCount n (suc a) fromTo : Nat → Nat → List Nat fromTo a b = fromCount (suc b - a) a isReplaced : Nat → Bool isReplaced n = primNatToChar n ==ᶜ <?> and : List Bool → Bool and [] = true and (false ∷ _) = false and (true ∷ xs) = and xs all : (A → Bool) → List A → Bool all p xs = and (map p xs) not : Bool → Bool not false = true not true = false _∘_ : (B → C) → (A → B) → A → C f ∘ g = λ x → f (g x) postulate putStrLn : String → IO ⊤ _>>_ : IO A → IO B → IO B {-# FOREIGN GHC import qualified Data.Text.IO as Text #-} {-# COMPILE GHC putStrLn = Text.putStrLn #-} {-# COMPILE GHC _>>_ = \ _ _ -> (>>) #-} assert : String → Bool → IO ⊤ assert s true = putStrLn (s ++ " PASSED") assert s false = putStrLn (s ++ " FAILED") main : IO ⊤ main = do assert "before surrogates" (all (not ∘ isReplaced) (fromTo 0xD780 0xD7FF)) assert "surrogate range " (all isReplaced (fromTo 0xD800 0xDFFF)) assert "after surrogates " (all (not ∘ isReplaced) (fromTo 0xE000 0xE07F))
{ "alphanum_fraction": 0.6323432343, "avg_line_length": 24.435483871, "ext": "agda", "hexsha": "b9a1e31b73bf172231b45e08d695ae8d391c5595", "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": "cc026a6a97a3e517bb94bafa9d49233b067c7559", "max_forks_repo_licenses": [ "BSD-2-Clause" ], "max_forks_repo_name": "cagix/agda", "max_forks_repo_path": "test/Compiler/simple/Issue4999.agda", "max_issues_count": 4066, "max_issues_repo_head_hexsha": "cc026a6a97a3e517bb94bafa9d49233b067c7559", "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-2-Clause" ], "max_issues_repo_name": "cagix/agda", "max_issues_repo_path": "test/Compiler/simple/Issue4999.agda", "max_line_length": 76, "max_stars_count": 1989, "max_stars_repo_head_hexsha": "cc026a6a97a3e517bb94bafa9d49233b067c7559", "max_stars_repo_licenses": [ "BSD-2-Clause" ], "max_stars_repo_name": "cagix/agda", "max_stars_repo_path": "test/Compiler/simple/Issue4999.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": 527, "size": 1515 }
{-# OPTIONS --without-K #-} open import lib.Basics open import lib.types.Sigma open import Preliminaries open import Truncation_Level_Criteria open import Anonymous_Existence_CollSplit open wtrunc open with-weak-trunc module Anonymous_Existence_Populatedness where -- Definition 4.2.1 ⟪_⟫ : ∀ {i} → Type i → Type i ⟪ X ⟫ = (f : X → X) → const f → fix f -- Proposition 4.2.2 Trunc→Pop : ∀ {i} {X : Type i} → ∣∣ X ∣∣ → ⟪ X ⟫ Trunc→Pop z f c = tr-rec {P = fix f} (fixed-point f c) (to-fix f c) z -- Corollary 4.2.3: We show pairwise logical equivalence as it is easy -- (of course, some directions are redundant) coll-characterizations : ∀ {i} {X : Type i} → (coll X ↔ splitSup X) × ((coll X ↔ (⟪ X ⟫ → X)) × ((⟪ X ⟫ → X) ↔ splitSup X)) coll-characterizations {X = X} = coll↔splitSup , (coll→pop→X , reverse₁) , (pop→X→splitSup , reverse₂) where coll→pop→X : coll X → ⟪ X ⟫ → X coll→pop→X (f , c) pop = fst (pop f c) pop→X→splitSup : (⟪ X ⟫ → X) → splitSup X pop→X→splitSup g = g ∘ Trunc→Pop reverse₁ = snd coll↔splitSup ∘ pop→X→splitSup reverse₂ = coll→pop→X ∘ snd coll↔splitSup -- Addendum of Corollary 4.2.3 prop-pop : ∀ {i} {P : Type i} → is-prop P → ⟪ P ⟫ → P prop-pop {P = P} pp = snd (snd (snd coll-characterizations)) (tr-rec pp (idf _)) -- Lemma 4.2.4 module _ {i : ULevel} {X : Type i} where pop→splitSup→X : ⟪ X ⟫ → splitSup X → X pop→splitSup→X pop = λ hst → snd (snd (snd (coll-characterizations {X = X}))) hst pop use-funct : (splitSup X → X) → ∣∣ splitSup X ∣∣ → ∣∣ X ∣∣ use-funct f = trunc-functorial f tr-hst-X→pop : (∣∣ splitSup X ∣∣ → ∣∣ X ∣∣) → ⟪ X ⟫ tr-hst-X→pop g f c = tr-rec (fixed-point f c) (to-fix f c) (g ∣ coll→splitSup (f , c) ∣) -- we formulate the two logical equivalence that we will need explicitly: pop-alt : ⟪ X ⟫ ↔ (∣∣ splitSup X ∣∣ → ∣∣ X ∣∣) pop-alt = use-funct ∘ pop→splitSup→X , tr-hst-X→pop pop-alt' : ⟪ X ⟫ ↔ (splitSup X → X) pop-alt' = pop→splitSup→X , tr-hst-X→pop ∘ use-funct -- Proposition 4.2.5 pop-alt₂ : ∀ {i} {X : Type i} → ⟪ X ⟫ ↔ ((P : Type i) → (is-prop P) → (X ↔ P) → P) pop-alt₂ {i} {X} = one , two where one : ⟪ X ⟫ → (P : Type i) → is-prop P → (X ↔ P) → P one pop P pp (xp , px) = xp (fst (pop f c)) where f : X → X f = px ∘ xp c : const f c x₁ x₂ = ap px (prop-has-all-paths pp _ _) two : ((P : Type i) → is-prop P → (X ↔ P) → P) → ⟪ X ⟫ two rest f c = rest (fix f) (fixed-point f c) (to-fix f c , from-fix f) -- Proposition 4.2.6, part 1 pop-property₁ : ∀ {i} {X : Type i} → X → ⟪ X ⟫ pop-property₁ = Trunc→Pop ∘ ∣_∣ -- Proposition 4.2.6, part 2: this needs function extensionality. -- We import the library file with the consequence of funext that we need. open import lib.types.Pi pop-property₂ : ∀ {i} {X : Type i} → is-prop ⟪ X ⟫ pop-property₂ = Π-is-prop (λ f → Π-is-prop (λ c → fixed-point f c))
{ "alphanum_fraction": 0.5743081654, "avg_line_length": 32.1648351648, "ext": "agda", "hexsha": "c683595617d80b24cb6dc9983305e7a12e6131e6", "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/thesis/Anonymous_Existence_Populatedness.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/thesis/Anonymous_Existence_Populatedness.agda", "max_line_length": 91, "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/thesis/Anonymous_Existence_Populatedness.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": 1166, "size": 2927 }
------------------------------------------------------------------------ -- The Agda standard library -- -- The Cowriter type and some operations ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe --sized-types #-} -- Disabled to prevent warnings from BoundedVec {-# OPTIONS --warn=noUserWarning #-} module Codata.Cowriter where open import Size open import Level as L using (Level) open import Codata.Thunk using (Thunk; force) open import Codata.Conat open import Codata.Delay using (Delay; later; now) open import Codata.Stream as Stream using (Stream; _∷_) open import Data.Unit open import Data.List.Base using (List; []; _∷_) open import Data.List.NonEmpty using (List⁺; _∷_) open import Data.Nat.Base as Nat using (ℕ; zero; suc) open import Data.Product as Prod using (_×_; _,_) open import Data.Sum.Base as Sum using (_⊎_; inj₁; inj₂) open import Data.Vec.Base using (Vec; []; _∷_) open import Data.Vec.Bounded as Vec≤ using (Vec≤; _,_) open import Function private variable a b w x : Level A : Set a B : Set b W : Set w X : Set x ------------------------------------------------------------------------ -- Definition data Cowriter (W : Set w) (A : Set a) (i : Size) : Set (a L.⊔ w) where [_] : A → Cowriter W A i _∷_ : W → Thunk (Cowriter W A) i → Cowriter W A i ------------------------------------------------------------------------ -- Relationship to Delay. fromDelay : ∀ {i} → Delay A i → Cowriter ⊤ A i fromDelay (now a) = [ a ] fromDelay (later da) = _ ∷ λ where .force → fromDelay (da .force) toDelay : ∀ {i} → Cowriter W A i → Delay A i toDelay [ a ] = now a toDelay (_ ∷ ca) = later λ where .force → toDelay (ca .force) ------------------------------------------------------------------------ -- Basic functions. fromStream : ∀ {i} → Stream W i → Cowriter W A i fromStream (w ∷ ws) = w ∷ λ where .force → fromStream (ws .force) repeat : W → Cowriter W A ∞ repeat = fromStream ∘′ Stream.repeat length : ∀ {i} → Cowriter W A i → Conat i length [ _ ] = zero length (w ∷ cw) = suc λ where .force → length (cw .force) splitAt : ∀ (n : ℕ) → Cowriter W A ∞ → (Vec W n × Cowriter W A ∞) ⊎ (Vec≤ W n × A) splitAt zero cw = inj₁ ([] , cw) splitAt (suc n) [ a ] = inj₂ (Vec≤.[] , a) splitAt (suc n) (w ∷ cw) = Sum.map (Prod.map₁ (w ∷_)) (Prod.map₁ (w Vec≤.∷_)) $ splitAt n (cw .force) take : ∀ (n : ℕ) → Cowriter W A ∞ → Vec W n ⊎ (Vec≤ W n × A) take n = Sum.map₁ Prod.proj₁ ∘′ splitAt n infixr 5 _++_ _⁺++_ _++_ : ∀ {i} → List W → Cowriter W A i → Cowriter W A i [] ++ ca = ca (w ∷ ws) ++ ca = w ∷ λ where .force → ws ++ ca _⁺++_ : ∀ {i} → List⁺ W → Thunk (Cowriter W A) i → Cowriter W A i (w ∷ ws) ⁺++ ca = w ∷ λ where .force → ws ++ ca .force concat : ∀ {i} → Cowriter (List⁺ W) A i → Cowriter W A i concat [ a ] = [ a ] concat (w ∷ ca) = w ⁺++ λ where .force → concat (ca .force) ------------------------------------------------------------------------ -- Functor, Applicative and Monad map : ∀ {i} → (W → X) → (A → B) → Cowriter W A i → Cowriter X B i map f g [ a ] = [ g a ] map f g (w ∷ cw) = f w ∷ λ where .force → map f g (cw .force) map₁ : ∀ {i} → (W → X) → Cowriter W A i → Cowriter X A i map₁ f = map f id map₂ : ∀ {i} → (A → X) → Cowriter W A i → Cowriter W X i map₂ = map id ap : ∀ {i} → Cowriter W (A → X) i → Cowriter W A i → Cowriter W X i ap [ f ] ca = map₂ f ca ap (w ∷ cf) ca = w ∷ λ where .force → ap (cf .force) ca _>>=_ : ∀ {i} → Cowriter W A i → (A → Cowriter W X i) → Cowriter W X i [ a ] >>= f = f a (w ∷ ca) >>= f = w ∷ λ where .force → ca .force >>= f ------------------------------------------------------------------------ -- Construction. unfold : ∀ {i} → (X → (W × X) ⊎ A) → X → Cowriter W A i unfold next seed with next seed ... | inj₁ (w , seed') = w ∷ λ where .force → unfold next seed' ... | inj₂ a = [ a ] ------------------------------------------------------------------------ -- DEPRECATED NAMES ------------------------------------------------------------------------ -- Please use the new names as continuing support for the old names is -- not guaranteed. -- Version 1.3 open import Data.BoundedVec as BVec using (BoundedVec) splitAt′ : ∀ (n : ℕ) → Cowriter W A ∞ → (Vec W n × Cowriter W A ∞) ⊎ (BoundedVec W n × A) splitAt′ zero cw = inj₁ ([] , cw) splitAt′ (suc n) [ a ] = inj₂ (BVec.[] , a) splitAt′ (suc n) (w ∷ cw) = Sum.map (Prod.map₁ (w ∷_)) (Prod.map₁ (w BVec.∷_)) $ splitAt′ n (cw .force) {-# WARNING_ON_USAGE splitAt′ "Warning: splitAt′ (and Data.BoundedVec) was deprecated in v1.3. Please use splitAt (and Data.Vec.Bounded) instead." #-} take′ : ∀ (n : ℕ) → Cowriter W A ∞ → Vec W n ⊎ (BoundedVec W n × A) take′ n = Sum.map₁ Prod.proj₁ ∘′ splitAt′ n {-# WARNING_ON_USAGE take′ "Warning: take′ (and Data.BoundedVec) was deprecated in v1.3. Please use take (and Data.Vec.Bounded) instead." #-}
{ "alphanum_fraction": 0.510347599, "avg_line_length": 34.0890410959, "ext": "agda", "hexsha": "6da3be61e6a6e7b875290cb2c1459c4a2a182ad5", "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/Codata/Cowriter.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/Codata/Cowriter.agda", "max_line_length": 89, "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/Codata/Cowriter.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": 1585, "size": 4977 }
------------------------------------------------------------------------ -- INCREMENTAL λ-CALCULUS -- -- Change evaluation (Def 3.6 and Fig. 4h). ------------------------------------------------------------------------ import Parametric.Syntax.Type as Type import Parametric.Syntax.Term as Term import Parametric.Denotation.Value as Value import Parametric.Denotation.Evaluation as Evaluation import Parametric.Change.Validity as Validity module Parametric.Change.Specification {Base : Type.Structure} (Const : Term.Structure Base) (⟦_⟧Base : Value.Structure Base) (⟦_⟧Const : Evaluation.Structure Const ⟦_⟧Base) {{validity-structure : Validity.Structure ⟦_⟧Base}} where open Type.Structure Base open Term.Structure Base Const open Value.Structure Base ⟦_⟧Base open Evaluation.Structure Const ⟦_⟧Base ⟦_⟧Const open Validity.Structure ⟦_⟧Base {{validity-structure}} open import Base.Denotation.Notation open import Relation.Binary.PropositionalEquality open import Theorem.CongApp open import Postulate.Extensionality module Structure where --------------- -- Interface -- --------------- -- We provide: Derivatives of terms. ⟦_⟧Δ : ∀ {τ Γ} → (t : Term Γ τ) (ρ : ⟦ Γ ⟧) (dρ : Δ₍ Γ ₎ ρ) → Δ₍ τ ₎ (⟦ t ⟧ ρ) -- And we provide correctness proofs about the derivatives. correctness : ∀ {τ Γ} (t : Term Γ τ) → IsDerivative₍ Γ , τ ₎ ⟦ t ⟧ ⟦ t ⟧Δ -------------------- -- Implementation -- -------------------- open import Base.Change.Equivalence open import Base.Change.Equivalence.Realizers module _ {σ τ : Type} {Γ : Context} (t : Term (σ • Γ) τ) where instance cΓ : ChangeAlgebra ⟦ Γ ⟧Context cΓ = change-algebra₍ Γ ₎ cσ : ChangeAlgebra ⟦ σ ⟧Type cσ = change-algebra σ cτ : ChangeAlgebra ⟦ τ ⟧Type cτ = change-algebra τ private ⟦⟧Δλ = nil {{changeAlgebraFun {{cΓ}} {{change-algebra₍ σ ⇒ τ ₎}}}} ⟦ abs t ⟧ ⟦⟧Δλ-realizer : ∀ (ρ : ⟦ Γ ⟧) (dρ : Δ₍ Γ ₎ ρ) (v : ⟦ σ ⟧) (dv : Δ₍ σ ₎ v) → Δ₍ τ ₎ (⟦ t ⟧ (v • ρ)) ⟦⟧Δλ-realizer ρ dρ v dv = ⟦ t ⟧Δ (v • ρ) (dv • dρ) ⟦⟧Δλ-realizer-correct : equiv-hp-binary {{cΓ}} {{cσ}} {{cτ}} (⟦ abs t ⟧) ⟦⟧Δλ ⟦⟧Δλ-realizer ⟦⟧Δλ-realizer-correct ρ dρ v dv = begin ⟦ t ⟧ (v ⊞₍ σ ₎ dv • ρ ⊞₍ Γ ₎ dρ) ⊟₍ τ ₎ ⟦ t ⟧ (v • ρ) ≙⟨ equiv-cancel-2 {{change-algebra τ}} (⟦ t ⟧ (v ⊞₍ σ ₎ dv • ρ ⊞₍ Γ ₎ dρ)) (⟦ t ⟧Δ (v • ρ) (dv • dρ)) (sym (correctness t (v • ρ) (dv • dρ))) ⟩ ⟦ t ⟧Δ (v • ρ) (dv • dρ) ∎ where open ≙-Reasoning ⟦_⟧Δλ′-faster = proj₁ (equiv-raw-change-to-change-binary {{cΓ}} {{cσ}} {{cτ}} ⟦ abs t ⟧ ⟦⟧Δλ ⟦⟧Δλ-realizer ⟦⟧Δλ-realizer-correct) where open import Data.Product ⟦_⟧ΔVar : ∀ {τ Γ} → (x : Var Γ τ) → (ρ : ⟦ Γ ⟧) → Δ₍ Γ ₎ ρ → Δ₍ τ ₎ (⟦ x ⟧Var ρ) ⟦ this ⟧ΔVar (v • ρ) (dv • dρ) = dv ⟦ that x ⟧ΔVar (v • ρ) (dv • dρ) = ⟦ x ⟧ΔVar ρ dρ ⟦_⟧Δ (const {τ} c) ρ dρ = nil₍ τ ₎ (⟦ c ⟧Const) ⟦_⟧Δ (var x) ρ dρ = ⟦ x ⟧ΔVar ρ dρ ⟦_⟧Δ (app {σ} {τ} s t) ρ dρ = call-change {σ} {τ} (⟦ s ⟧Δ ρ dρ) (⟦ t ⟧ ρ) (⟦ t ⟧Δ ρ dρ) ⟦_⟧Δ (abs {σ} {τ} t) ρ dρ = apply ⟦ t ⟧Δλ′-faster ρ dρ correctVar : ∀ {τ Γ} (x : Var Γ τ) → IsDerivative₍ Γ , τ ₎ ⟦ x ⟧ ⟦ x ⟧ΔVar correctVar (this) (v • ρ) (dv • dρ) = refl correctVar (that y) (v • ρ) (dv • dρ) = correctVar y ρ dρ correctness (const {τ} c) ρ dρ = update-nil₍ τ ₎ ⟦ c ⟧Const correctness {τ} (var x) ρ dρ = correctVar {τ} x ρ dρ correctness (app {σ} {τ} s t) ρ dρ = let f₁ = ⟦ s ⟧ ρ f₂ = ⟦ s ⟧ (after-env dρ) Δf = ⟦ s ⟧Δ ρ dρ u₁ = ⟦ t ⟧ ρ u₂ = ⟦ t ⟧ (after-env dρ) Δu = ⟦ t ⟧Δ ρ dρ in begin f₁ u₁ ⊞₍ τ ₎ call-change {σ} {τ} Δf u₁ Δu ≡⟨ sym (is-valid {σ} {τ} Δf u₁ Δu) ⟩ (f₁ ⊞₍ σ ⇒ τ ₎ Δf) (u₁ ⊞₍ σ ₎ Δu) ≡⟨ correctness {σ ⇒ τ} s ρ dρ ⟨$⟩ correctness {σ} t ρ dρ ⟩ f₂ u₂ ∎ where open ≡-Reasoning correctness {σ ⇒ τ} {Γ} (abs t) ρ dρ = equiv-raw-deriv-to-deriv-binary {{change-algebra₍ Γ ₎}} {{change-algebra σ}} ⟦ abs t ⟧Term (⟦⟧Δλ-realizer t) (⟦⟧Δλ-realizer-correct t) ρ dρ -- Corollary: (f ⊞ df) (v ⊞ dv) = f v ⊞ df v dv corollary : ∀ {σ τ Γ} (s : Term Γ (σ ⇒ τ)) (t : Term Γ σ) (ρ : ⟦ Γ ⟧) (dρ : Δ₍ Γ ₎ ρ) → (⟦ s ⟧ ρ ⊞₍ σ ⇒ τ ₎ ⟦ s ⟧Δ ρ dρ) (⟦ t ⟧ ρ ⊞₍ σ ₎ ⟦ t ⟧Δ ρ dρ) ≡ (⟦ s ⟧ ρ) (⟦ t ⟧ ρ) ⊞₍ τ ₎ (call-change {σ} {τ} (⟦ s ⟧Δ ρ dρ)) (⟦ t ⟧ ρ) (⟦ t ⟧Δ ρ dρ) corollary {σ} {τ} s t ρ dρ = is-valid {σ} {τ} (⟦ s ⟧Δ ρ dρ) (⟦ t ⟧ ρ) (⟦ t ⟧Δ ρ dρ) corollary-closed : ∀ {σ τ} (t : Term ∅ (σ ⇒ τ)) (v : ⟦ σ ⟧) (dv : Δ₍ σ ₎ v) → ⟦ t ⟧ ∅ (after₍ σ ₎ dv) ≡ ⟦ t ⟧ ∅ v ⊞₍ τ ₎ call-change {σ} {τ} (⟦ t ⟧Δ ∅ ∅) v dv corollary-closed {σ} {τ} t v dv = let f = ⟦ t ⟧ ∅ Δf = ⟦ t ⟧Δ ∅ ∅ in begin f (after₍ σ ₎ dv) ≡⟨ cong (λ hole → hole (after₍ σ ₎ dv)) (sym (correctness {σ ⇒ τ} t ∅ ∅)) ⟩ (f ⊞₍ σ ⇒ τ ₎ Δf) (after₍ σ ₎ dv) ≡⟨ is-valid {σ} {τ} (⟦ t ⟧Δ ∅ ∅) v dv ⟩ f (before₍ σ ₎ dv) ⊞₍ τ ₎ call-change {σ} {τ} Δf v dv ∎ where open ≡-Reasoning
{ "alphanum_fraction": 0.4879482657, "avg_line_length": 33.7947019868, "ext": "agda", "hexsha": "707fdddb385608c92491a532ee0e83b92a516cc7", "lang": "Agda", "max_forks_count": 1, "max_forks_repo_forks_event_max_datetime": "2016-02-18T12:26:44.000Z", "max_forks_repo_forks_event_min_datetime": "2016-02-18T12:26:44.000Z", "max_forks_repo_head_hexsha": "39bb081c6f192bdb87bd58b4a89291686d2d7d03", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "inc-lc/ilc-agda", "max_forks_repo_path": "Parametric/Change/Specification.agda", "max_issues_count": 6, "max_issues_repo_head_hexsha": "39bb081c6f192bdb87bd58b4a89291686d2d7d03", "max_issues_repo_issues_event_max_datetime": "2017-05-04T13:53:59.000Z", "max_issues_repo_issues_event_min_datetime": "2015-07-01T18:09:31.000Z", "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "inc-lc/ilc-agda", "max_issues_repo_path": "Parametric/Change/Specification.agda", "max_line_length": 180, "max_stars_count": 10, "max_stars_repo_head_hexsha": "39bb081c6f192bdb87bd58b4a89291686d2d7d03", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "inc-lc/ilc-agda", "max_stars_repo_path": "Parametric/Change/Specification.agda", "max_stars_repo_stars_event_max_datetime": "2019-07-19T07:06:59.000Z", "max_stars_repo_stars_event_min_datetime": "2015-03-04T06:09:20.000Z", "num_tokens": 2384, "size": 5103 }
------------------------------------------------------------------------ -- The Agda standard library -- -- W-types ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.W where open import Level open import Function open import Data.Product hiding (map) open import Data.Container.Core hiding (map) open import Data.Container.Relation.Unary.All using (□; all) open import Relation.Nullary open import Agda.Builtin.Equality -- The family of W-types. data W {s p} (C : Container s p) : Set (s ⊔ p) where sup : ⟦ C ⟧ (W C) → W C module _ {s p} {C : Container s p} {s : Shape C} {f : Position C s → W C} where sup-injective₁ : ∀ {t g} → sup (s , f) ≡ sup (t , g) → s ≡ t sup-injective₁ refl = refl -- See also Data.W.WithK.sup-injective₂. -- Projections. module _ {s p} {C : Container s p} where head : W C → Shape C head (sup (x , f)) = x tail : (x : W C) → Position C (head x) → W C tail (sup (x , f)) = f -- map module _ {s₁ s₂ p₁ p₂} {C₁ : Container s₁ p₁} {C₂ : Container s₂ p₂} (m : C₁ ⇒ C₂) where map : W C₁ → W C₂ map (sup (x , f)) = sup (⟪ m ⟫ (x , λ p → map (f p))) -- induction module _ {s p ℓ} {C : Container s p} (P : W C → Set ℓ) (alg : ∀ {t} → □ C P t → P (sup t)) where induction : (w : W C) → P w induction (sup (s , f)) = alg $ all (induction ∘ f) module _ {s p ℓ} {C : Container s p} (open Container C) {P : Set ℓ} (alg : ⟦ C ⟧ P → P) where foldr : W C → P foldr = induction (const P) (alg ∘ -,_ ∘ □.proof) -- If Position is always inhabited, then W_C is empty. module _ {s p} {C : Container s p} where inhabited⇒empty : (∀ s → Position C s) → ¬ W C inhabited⇒empty b = foldr ((_$ b _) ∘ proj₂)
{ "alphanum_fraction": 0.5308219178, "avg_line_length": 25.3913043478, "ext": "agda", "hexsha": "f7e9e29409a8a3f58d056f45dfda484f8fe1ba0f", "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/Data/W.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/W.agda", "max_line_length": 79, "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/Data/W.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": 590, "size": 1752 }
{-# OPTIONS --show-implicit #-} -- {-# OPTIONS -v tc.meta:20 #-} module UnifyWithIrrelevantArgument where data _≡_ {A : Set}(a : A) : A -> Set where refl : a ≡ a data Bool : Set where true false : Bool -- irrelevant arguments are ignored in unification -- e.g. non linearity test : let X : Bool -> .Bool -> Bool X = _ in (x : Bool) -> X x x ≡ x test x = refl -- e.g. non-pattern tst1 : let X : Bool -> .Bool -> Bool X = _ in (x : Bool) -> X x true ≡ x tst1 x = refl
{ "alphanum_fraction": 0.5557729941, "avg_line_length": 22.2173913043, "ext": "agda", "hexsha": "fc1e042d4f5191b40b58d5cf631fa97dbed3c177", "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/UnifyWithIrrelevantArgument.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/UnifyWithIrrelevantArgument.agda", "max_line_length": 50, "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/UnifyWithIrrelevantArgument.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": 167, "size": 511 }
module ArrowIsCCC where open import Categories.Category.CartesianClosed.Canonical open import Categories.Category.Cartesian.Bundle open import Categories.Category.Core open import Categories.Category.Construction.Arrow open import Data.Product open import Function using (const) open import Level open import Relation.Binary.Core using (Rel) open import Relation.Binary.PropositionalEquality open Relation.Binary.PropositionalEquality.≡-Reasoning 𝕦 : {A : Set} → A → A 𝕦 x = x SetC : Category (suc zero) zero zero SetC = record { Obj = Set ; _⇒_ = λ x y → x → y ; _≈_ = _≡_ ; id = λ x → x ; _∘_ = λ f g a → f (g a) ; assoc = refl ; sym-assoc = refl ; identityˡ = refl ; identityʳ = refl ; identity² = refl ; equiv = record { refl = refl ; sym = sym ; trans = trans } ; ∘-resp-≈ = λ {refl refl → refl} } data t : Set where ⊤ : t !-unique-lemma : ∀ (x : t) → ⊤ ≡ x !-unique-lemma ⊤ = refl Set² : Category (suc zero) zero zero Set² = Arrow SetC arrow-cart : CartesianCategory (suc zero) zero zero arrow-cart = record { U = Set² ; cartesian = record { terminal = record { ⊤ = record { arr = 𝕦 } ; ⊤-is-terminal = record { ! = mor⇒ {! !} ; !-unique = {! !} } } ; products = record { product = λ {A} {B} → record { A×B = record { arr = λ x → {! !} } ; π₁ = mor⇒ {! !} ; π₂ = mor⇒ {! !} ; ⟨_,_⟩ = λ x x₁ → {! !} ; project₁ = {! !} , {! !} ; project₂ = {! !} , {! !} ; unique = λ x x₁ → {! !} } } } } {- _⋆_ : {A B C : Set} → (B → C) → (A → B) → (A → C) g ⋆ f = λ t → g (f t) postulate extensionality : ∀ {A B : Set} {f g : A → B} → (∀ (x : A) → f x ≡ g x) → f ≡ g data t : Set where ⊤ : t !-unique-lemma : ∀ (x : t) → ⊤ ≡ x !-unique-lemma ⊤ = refl arrow : Category (suc zero) zero zero arrow = record { Obj = Σ (Set × Set) (λ x → proj₁ x → proj₂ x) ; _⇒_ = arr ; _≈_ = _≡_ ; id = ((λ x → x) , (λ z → z)) , refl ; _∘_ = λ {A} {B} {C} f g → comp {A} {B} {C} f g ; assoc = {! !} ; sym-assoc = {! !} ; identityˡ = λ {A} {B} {f} → idl {A} {B} {f} ; identityʳ = λ {A} {B} {f} → idr {A} {B} {f} ; identity² = refl ; equiv = record { refl = refl ; sym = sym ; trans = trans } ; ∘-resp-≈ = λ {refl refl → refl} } where comm-sq : {a b c d : Set} → (a → c) × (b → d) → (f : a → b) → (g : c → d) → Set comm-sq {a} {b} {c} {d} (up , down) left right = ∀ {t : a} → down (left t) ≡ right (up t) arr : Rel (Σ (Set × Set) (λ x → proj₁ x → proj₂ x)) zero arr ((a , b) , x1) ((c , d) , y1) = Σ ((a → c) × (b → d)) λ x → comm-sq x x1 y1 trans-comm-sq : {A B C X Y Z : Set} {up : A → B} {down : X → Y} {up' : B → C} {down' : Y → Z} {left : A → X} {right : B → Y} {right' : C → Z} → (p : comm-sq (up , down) left right) → (q : comm-sq (up' , down') right right') → comm-sq (up' ⋆ up , down' ⋆ down) left right' trans-comm-sq {A} {B} {C} {X} {Y} {Z} {up} {down} {up'} {down'} {left} {right} {right'} p q {t} = begin down' (down (left t)) ≡⟨ cong down' p ⟩ down' (right (up t)) ≡⟨ q ⟩ right' (up' (up t)) ∎ {- up up' A -> B -> C ↓ ↓ ↓ X -> Y -> Z down down' -} 𝕦 : {A : Set} → A → A 𝕦 x = x comp : {A B C : Σ (Set × Set) (λ x → proj₁ x → proj₂ x)} → arr B C → arr A B → arr A C comp {(A0 , A1) , u} {(B0 , B1) , v} {(C0 , C1) , w} ((f0 , f1) , p) ((g0 , g1) , q) = ((λ x → f0 (g0 x)) , (λ z → f1 (g1 z))) , trans-comm-sq {A0} {B0} {C0} {A1} {B1} {C1} {g0} {g1} {f0} {f1} {u} {v} {w} q p idl : {A B : Σ (Set × Set) (λ x → proj₁ x → proj₂ x)} {f : arr A B} → comp {A} {B} {B} (((λ x → x) , (λ z → z)) , refl) f ≡ f idl {(A0 , A1) , u} {(B0 , B1) , v} {(f0 , f1) , p} = {! !} idr : {A B : Σ (Set × Set) (λ x → proj₁ x → proj₂ x)} {f : arr A B} → comp {A} {A} {B} f (((λ x → x) , (λ z → z)) , refl) ≡ f idr {(A0 , A1) , u} {(B0 , B1) , v} {(f0 , f1) , p} = {! !} -- trans-comm-sq {! !} {! !} open Category arrow -- just to see what happens: arrow-cart : CartesianCategory (suc zero) zero zero arrow-cart = record { U = arrow ; cartesian = record { terminal = record { ⊤ = (t , t) , (λ _ → ⊤) ; ⊤-is-terminal = record { ! = (λ _ → ⊤) , (λ _ → ⊤) ; !-unique = λ {A} → bang-uniq {A} } } ; products = record { product = λ {A} {B} → record { A×B = ((proj₁ (proj₁ A) × proj₁ (proj₁ B)) , (proj₂ (proj₁ A) × proj₂ (proj₁ B))) , λ x → (proj₂ A (proj₁ x)) , (proj₂ B) (proj₂ x) ; π₁ = proj₁ , proj₁ ; π₂ = proj₂ , proj₂ ; ⟨_,_⟩ = λ {C = C} f g → pair {C} {A} {B} f g ; project₁ = refl ; project₂ = refl ; unique = λ {refl refl → refl} } } } } where prod : Obj → Obj → Obj prod ((X , Y) , u) ((A , B) , v) = ((X × A) , (Y × B)) , λ x → (u (proj₁ x)) , (v (proj₂ x)) bang-uniq : {A : Obj} (f : (arrow Category.⇒ A) ((t , t) , (λ _ → ⊤))) → ((λ _ → ⊤) , (λ _ → ⊤)) ≡ f bang-uniq (f0 , f1) = cong₂ _,_ (extensionality λ x → !-unique-lemma (f0 x)) (extensionality (λ x → !-unique-lemma (f1 x))) pair : {C A B : Obj} → (arrow Category.⇒ C) A → (arrow Category.⇒ C) B → (arrow Category.⇒ C) (prod A B) pair {(X , Y) , u} {(A , B) , v} {(E , F) , w} (f0 , f1) (g0 , g1) = (λ x → (f0 x) , (g0 x)) , (λ x → (f1 x) , (g1 x)) arrow-ccc : CartesianClosed arrow arrow-ccc = record { ⊤ = (t , t) , (λ _ → ⊤) ; _×_ = prod ; ! = (λ _ → ⊤) , (λ _ → ⊤) ; π₁ = proj₁ , proj₁ ; π₂ = proj₂ , proj₂ ; ⟨_,_⟩ = λ {A} {B} {C} f g → pair {A} {B} {C} f g ; !-unique = λ {A} → bang-uniq {A} ; π₁-comp = refl ; π₂-comp = refl ; ⟨,⟩-unique = λ {refl refl → refl} ; _^_ = to-the ; eval = λ {B} {A} → ev {B} {A} ; curry = λ {C} {A} {B} g → cur {C} {A} {B} g ; eval-comp = refl ; curry-resp-≈ = λ {refl → refl} ; curry-unique = {! !} } where prod : Obj → Obj → Obj prod ((X , Y) , u) ((A , B) , v) = ((X × A) , (Y × B)) , λ x → (u (proj₁ x)) , (v (proj₂ x)) pair : {C A B : Obj} → (arrow Category.⇒ C) A → (arrow Category.⇒ C) B → (arrow Category.⇒ C) (prod A B) pair {(X , Y) , u} {(A , B) , v} {(E , F) , w} (f0 , f1) (g0 , g1) = (λ x → (f0 x) , (g0 x)) , (λ x → (f1 x) , (g1 x)) bang-uniq : {A : Obj} (f : (arrow Category.⇒ A) ((t , t) , (λ _ → ⊤))) → ((λ _ → ⊤) , (λ _ → ⊤)) ≡ f bang-uniq (f0 , f1) = cong₂ _,_ (extensionality λ x → !-unique-lemma (f0 x)) (extensionality (λ x → !-unique-lemma (f1 x))) to-the : Obj → Obj → Obj to-the ((B0 , B1) , u) ((A0 , A1) , v) = (p , (A1 → B1)) , λ x a1 → proj₂ (proj₁ x) a1 where p : Set p = Σ ((A0 → B0) × (A1 → B1)) λ r → (λ x → u ((proj₁ r) x)) ≡ (λ x → (proj₂ r) (v x)) -- va implementato il pullback-hom di u e v : [v,u] fitta in {- [v,u] → (A0 → B0) ↓ <- lei ↓ (A1 → B1) → (A0 → B1) -} ev : {B A : Obj} → (prod (to-the B A) A) ⇒ B ev {(B0 , B1) , u} {(A0 , A1) , v} = dis , (λ z → proj₁ z (proj₂ z)) where dis : proj₁ (proj₁ (prod (to-the ((B0 , B1) , u) ((A0 , A1) , v)) ((A0 , A1) , v))) → B0 dis (((s , t) , p) , a0) = s a0 cur : {C A B : Obj} → prod C A ⇒ B → C ⇒ to-the B A cur {(C0 , C1) , c} {(A0 , A1) , a} {(B0 , B1) , b} (fst , snd) = (λ x → ((λ y → fst (x , y)) , λ y → snd (c x , y)) , extensionality (λ y → {! !})) , (λ z z₁ → snd (z , z₁)) -}
{ "alphanum_fraction": 0.4385964912, "avg_line_length": 36.1730769231, "ext": "agda", "hexsha": "bef089a3970cff4282652f2c856481118c9c9df6", "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": "cfa6aefd3069d4db995191b458c886edcfba8294", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "tetrapharmakon/agda-categories", "max_forks_repo_path": "src/ArrowIsCCC.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "cfa6aefd3069d4db995191b458c886edcfba8294", "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": "tetrapharmakon/agda-categories", "max_issues_repo_path": "src/ArrowIsCCC.agda", "max_line_length": 148, "max_stars_count": null, "max_stars_repo_head_hexsha": "cfa6aefd3069d4db995191b458c886edcfba8294", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "tetrapharmakon/agda-categories", "max_stars_repo_path": "src/ArrowIsCCC.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 3226, "size": 7524 }
{-# OPTIONS --sized-types #-} -- --no-coverage-check #-} module DeBruijnExSubstSized where open import Data.Function -- using (_∘_) -- composition, identity open import Data.Nat open import Data.Maybe open import Relation.Binary.PropositionalEquality open ≡-Reasoning open import Size open import DeBruijn -- untyped de Bruijn terms data LamE (A : Set) : Size -> Set where varE : {ι : _} -> A -> LamE A (↑ ι) appE : {ι : _} -> LamE A ι -> LamE A ι -> LamE A (↑ ι) absE : {ι : _} -> LamE (Maybe A) ι -> LamE A (↑ ι) flatE : {ι : _} -> LamE (LamE A ι) ι -> LamE A (↑ ι) -- functoriality of LamE lamE : {A B : Set} -> (A -> B) -> {ι : _} -> LamE A ι -> LamE B ι lamE f (varE a) = varE (f a) lamE f (appE t1 t2) = appE (lamE f t1) (lamE f t2) lamE f (absE r) = absE (lamE (fmap f) r) lamE f (flatE r) = flatE (lamE (lamE f) r) eval : {ι : _} -> {A : Set} -> LamE A ι -> Lam A eval (varE a) = var a eval (appE t1 t2) = app (eval t1) (eval t2) eval (absE r) = abs (eval r) eval (flatE r) = subst (eval) (eval r) -- Theorem (naturality of eval): eval ∘ lamE f ≡ lam f ∘ eval evalNAT : {A B : Set}(f : A -> B) -> {ι : _} -> (t : LamE A ι) -> eval (lamE f t) ≡ lam f (eval t) evalNAT f (varE a) = ≡-refl evalNAT f (appE t1 t2) = begin eval (lamE f (appE t1 t2)) ≡⟨ ≡-refl ⟩ eval (appE (lamE f t1) (lamE f t2)) ≡⟨ ≡-refl ⟩ app (eval (lamE f t1)) (eval (lamE f t2)) ≡⟨ ≡-cong (\ x -> app x (eval (lamE f t2))) (evalNAT f t1) ⟩ app (lam f (eval t1)) (eval (lamE f t2)) ≡⟨ ≡-cong (\ x -> app (lam f (eval t1)) x) (evalNAT f t2) ⟩ app (lam f (eval t1)) (lam f (eval t2)) ≡⟨ ≡-refl ⟩ lam f (app (eval t1) (eval t2)) ≡⟨ ≡-refl ⟩ lam f (eval (appE t1 t2)) ∎ evalNAT f (absE r) = begin eval (lamE f (absE r)) ≡⟨ ≡-refl ⟩ eval (absE (lamE (fmap f) r)) ≡⟨ ≡-refl ⟩ abs (eval (lamE (fmap f) r)) ≡⟨ ≡-cong abs (evalNAT (fmap f) r) ⟩ abs (lam (fmap f) (eval r)) ≡⟨ ≡-refl ⟩ lam f (abs (eval r)) ≡⟨ ≡-refl ⟩ lam f (eval (absE r)) ∎ -- in the following case, one manual size annotation is needed on the RHS -- it is for the first application of the I.H. evalNAT f (flatE {ι} r) = begin eval (lamE f (flatE r)) ≡⟨ ≡-refl ⟩ eval (flatE (lamE (lamE f) r)) ≡⟨ ≡-refl ⟩ subst eval (eval (lamE (lamE f) r)) ≡⟨ ≡-cong (subst (eval {ι})) (evalNAT (lamE f) r) ⟩ subst eval (lam (lamE f) (eval r)) ≡⟨ substLaw1 (lamE f) eval (eval r) ⟩ subst (eval ∘ lamE f) (eval r) ≡⟨ substExt (evalNAT f) (eval r) ⟩ subst (lam f ∘ eval) (eval r) ≡⟨ substLaw2 f eval (eval r) ⟩ lam f (subst eval (eval r)) ≡⟨ ≡-refl ⟩ lam f (eval (flatE r)) ∎ evalNATcor : {A : Set}{ι : _}(ee : LamE (LamE A ι) ι) -> subst id (eval (lamE eval ee)) ≡ eval (flatE ee) evalNATcor ee = begin subst id (eval (lamE eval ee)) ≡⟨ ≡-cong (subst id) (evalNAT eval ee) ⟩ subst id (lam eval (eval ee)) ≡⟨ substLaw1 eval id (eval ee) ⟩ subst eval (eval ee) ≡⟨ ≡-refl ⟩ eval (flatE ee) ∎
{ "alphanum_fraction": 0.5396461337, "avg_line_length": 30.8282828283, "ext": "agda", "hexsha": "10973240effaef2d9b3ff3970769274337854b54", "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": "477c8c37f948e6038b773409358fd8f38395f827", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "larrytheliquid/agda", "max_forks_repo_path": "examples/Termination/Sized/DeBruijnExSubstSized.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "477c8c37f948e6038b773409358fd8f38395f827", "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": "larrytheliquid/agda", "max_issues_repo_path": "examples/Termination/Sized/DeBruijnExSubstSized.agda", "max_line_length": 73, "max_stars_count": null, "max_stars_repo_head_hexsha": "477c8c37f948e6038b773409358fd8f38395f827", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "larrytheliquid/agda", "max_stars_repo_path": "examples/Termination/Sized/DeBruijnExSubstSized.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 1375, "size": 3052 }
------------------------------------------------------------------------------ -- The mirror function: A function with higher-order recursion ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTIONS --without-K #-} module FOTC.Program.Mirror.Mirror where open import FOTC.Base open import FOTC.Data.List open import FOTC.Program.Mirror.Type ------------------------------------------------------------------------------ -- The mirror function. postulate mirror : D mirror-eq : ∀ d ts → mirror · node d ts ≡ node d (reverse (map mirror ts)) {-# ATP axiom mirror-eq #-}
{ "alphanum_fraction": 0.4372523118, "avg_line_length": 34.4090909091, "ext": "agda", "hexsha": "1ce6e83b8061d8b8ac47432bece93aae5534b573", "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": "src/fot/FOTC/Program/Mirror/Mirror.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": "src/fot/FOTC/Program/Mirror/Mirror.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": "src/fot/FOTC/Program/Mirror/Mirror.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": 132, "size": 757 }
module Cats.Util.Conv where open import Level open import Cats.Category.Base module _ {x} (X : Set x) where record HasObj lo la l≈ : Set (x ⊔ suc (lo ⊔ la ⊔ l≈)) where infix 90 _ᴼ field Cat : Category lo la l≈ open Category Cat field _ᴼ : X → Obj open HasObj {{...}} public using (_ᴼ) record HasArrow lo la l≈ : Set (x ⊔ suc (lo ⊔ la ⊔ l≈)) where infixr 90 _⃗ field Cat : Category lo la l≈ open Category Cat using (Obj ; _⇒_) field {A B} : X → Obj _⃗ : (x : X) → A x ⇒ B x open HasArrow {{...}} public using (_⃗)
{ "alphanum_fraction": 0.5430463576, "avg_line_length": 16.3243243243, "ext": "agda", "hexsha": "2879381b5c46bae1ecdab46f792a0990908be1df", "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": "a3b69911c4c6ec380ddf6a0f4510d3a755734b86", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "alessio-b-zak/cats", "max_forks_repo_path": "Cats/Util/Conv.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "a3b69911c4c6ec380ddf6a0f4510d3a755734b86", "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": "alessio-b-zak/cats", "max_issues_repo_path": "Cats/Util/Conv.agda", "max_line_length": 57, "max_stars_count": null, "max_stars_repo_head_hexsha": "a3b69911c4c6ec380ddf6a0f4510d3a755734b86", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "alessio-b-zak/cats", "max_stars_repo_path": "Cats/Util/Conv.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 225, "size": 604 }
{- 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.Crypto.Crypto.Hash as Hash open import LibraBFT.ImplShared.Consensus.Types open import Optics.All open import Util.KVMap as Map open import Util.PKCS open import Util.Prelude module LibraBFT.Impl.Consensus.ConsensusTypes.BlockData where ------------------------------------------------------------------------------ newGenesis : {-Instant →-} QuorumCert → BlockData ------------------------------------------------------------------------------ newGenesisFromLedgerInfo : LedgerInfo → Either ErrLog BlockData newGenesisFromLedgerInfo li = if not (li ^∙ liEndsEpoch) then Left fakeErr -- ["BlockData", "newGenesisFromLedgerInfo", "liNextEpochState == Nothing"] else let ancestor = BlockInfo∙new (li ^∙ liEpoch) {-Round-} 0 Hash.valueZero (li ^∙ liTransactionAccumulatorHash) (li ^∙ liVersion) --(li ^∙ liTimestamp) nothing genesisQuorumCert = QuorumCert∙new (VoteData∙new ancestor ancestor) (LedgerInfoWithSignatures∙new (LedgerInfo∙new ancestor Hash.valueZero) Map.empty) in pure $ newGenesis {-(li ^∙ liTimestamp)-} genesisQuorumCert newGenesis {-timestamp-} qc = BlockData∙new (qc ^∙ qcCertifiedBlock ∙ biEpoch + 1) {-Round-} 0 --timestamp qc Genesis newNil : Round → QuorumCert → BlockData newNil r qc = BlockData∙new (qc ^∙ qcCertifiedBlock ∙ biEpoch) r --(qc ^∙ qcCertifiedBlock ∙ biTimestamp) qc NilBlock newProposal : TX → Author → Round → {-Instant →-} QuorumCert → BlockData newProposal payload author round {-timestamp-} quorumCert = BlockData∙new (quorumCert ^∙ qcCertifiedBlock ∙ biEpoch) round {-timestamp-} quorumCert (Proposal payload author) isGenesisBlock : BlockData → Bool isGenesisBlock bd = bd ^∙ bdBlockType == Genesis isNilBlock : BlockData → Bool isNilBlock bd = bd ^∙ bdBlockType == NilBlock
{ "alphanum_fraction": 0.595010395, "avg_line_length": 36.4393939394, "ext": "agda", "hexsha": "0f5c03b96bf7846ce1328a686297e3297f8926b1", "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": "a4674fc473f2457fd3fe5123af48253cfb2404ef", "max_forks_repo_licenses": [ "UPL-1.0" ], "max_forks_repo_name": "LaudateCorpus1/bft-consensus-agda", "max_forks_repo_path": "src/LibraBFT/Impl/Consensus/ConsensusTypes/BlockData.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "a4674fc473f2457fd3fe5123af48253cfb2404ef", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "UPL-1.0" ], "max_issues_repo_name": "LaudateCorpus1/bft-consensus-agda", "max_issues_repo_path": "src/LibraBFT/Impl/Consensus/ConsensusTypes/BlockData.agda", "max_line_length": 111, "max_stars_count": null, "max_stars_repo_head_hexsha": "a4674fc473f2457fd3fe5123af48253cfb2404ef", "max_stars_repo_licenses": [ "UPL-1.0" ], "max_stars_repo_name": "LaudateCorpus1/bft-consensus-agda", "max_stars_repo_path": "src/LibraBFT/Impl/Consensus/ConsensusTypes/BlockData.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 602, "size": 2405 }
module Dave.Logic.Theorems where K : {A B : Set} → A → B → A K a b = a S : {A B C : Set} → (A → B → C) → (A → B) → A → C S = λ f → λ g → λ a → f a (g a)
{ "alphanum_fraction": 0.3771428571, "avg_line_length": 21.875, "ext": "agda", "hexsha": "053a0c17a98d926c22fa2e4a11d0808c1a8c5f19", "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/Logic/Theorems.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/Logic/Theorems.agda", "max_line_length": 53, "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/Logic/Theorems.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 79, "size": 175 }
open import Agda.Primitive using (lzero; lsuc; _⊔_) open import Relation.Binary.PropositionalEquality open import Relation.Binary using (Setoid) import SecondOrder.Arity import SecondOrder.Signature import SecondOrder.Metavariable module SecondOrder.Term {ℓ} {𝔸 : SecondOrder.Arity.Arity} (Σ : SecondOrder.Signature.Signature ℓ 𝔸) where open SecondOrder.Signature.Signature Σ open SecondOrder.Metavariable Σ -- The term judgement data Term (Θ : MContext) : ∀ (Γ : VContext) (A : sort) → Set ℓ Arg : ∀ (Θ : MContext) (Γ : VContext) (A : sort) (Δ : VContext) → Set ℓ Arg Θ Γ A Δ = Term Θ (Γ ,, Δ) A data Term Θ where tm-var : ∀ {Γ} {A} (x : A ∈ Γ) → Term Θ Γ A tm-meta : ∀ {Γᴹ A} {Γ} (M : [ Γᴹ , A ]∈ Θ) (ts : ∀ {B} (i : B ∈ Γᴹ) → Term Θ Γ B) → Term Θ Γ A tm-oper : ∀ {Γ} (f : oper) (es : ∀ (i : oper-arg f) → Arg Θ Γ (arg-sort f i) (arg-bind f i)) → Term Θ Γ (oper-sort f) -- Syntactic equality of terms infix 4 _≈_ data _≈_ {Θ : MContext} : ∀ {Γ : VContext} {A : sort} → Term Θ Γ A → Term Θ Γ A → Set ℓ where ≈-≡ : ∀ {Γ A} {t u : Term Θ Γ A} (ξ : t ≡ u) → t ≈ u ≈-meta : ∀ {Γ} {α A} {M : [ α , A ]∈ Θ} {ts us : ∀ {B} (i : B ∈ α) → Term Θ Γ B} (ξ : ∀ {B} i → ts {B} i ≈ us {B} i) → tm-meta M ts ≈ tm-meta M us ≈-oper : ∀ {Γ} {f : oper} {ds es : ∀ (i : oper-arg f) → Arg Θ Γ (arg-sort f i) (arg-bind f i)} (ξ : ∀ i → ds i ≈ es i) → tm-oper f ds ≈ tm-oper f es -- Syntactic equality of terms is an equivalence relation ≈-refl : ∀ {Θ Γ A} {t : Term Θ Γ A} → t ≈ t ≈-refl = ≈-≡ refl ≈-sym : ∀ {Θ Γ A} {t u : Term Θ Γ A} → t ≈ u → u ≈ t ≈-sym (≈-≡ refl) = ≈-≡ refl ≈-sym (≈-meta ξ) = ≈-meta λ i → ≈-sym (ξ i) ≈-sym (≈-oper ξ) = ≈-oper (λ i → ≈-sym (ξ i)) ≈-trans : ∀ {Θ Γ A} {t u v : Term Θ Γ A} → t ≈ u → u ≈ v → t ≈ v ≈-trans (≈-≡ refl) ξ = ξ ≈-trans (≈-meta ζ) (≈-≡ refl) = ≈-meta ζ ≈-trans (≈-meta ζ) (≈-meta ξ) = ≈-meta (λ i → ≈-trans (ζ i) (ξ i)) ≈-trans (≈-oper ζ) (≈-≡ refl) = ≈-oper ζ ≈-trans (≈-oper ζ) (≈-oper ξ) = ≈-oper (λ i → ≈-trans (ζ i) (ξ i)) Term-setoid : ∀ (Θ : MContext) (Γ : VContext) (A : sort) → Setoid ℓ ℓ Term-setoid Θ Γ A = record { Carrier = Term Θ Γ A ; _≈_ = _≈_ ; isEquivalence = record { refl = ≈-refl ; sym = ≈-sym ; trans = ≈-trans } }
{ "alphanum_fraction": 0.5048666949, "avg_line_length": 35.2686567164, "ext": "agda", "hexsha": "f32730cbd687d551eadb3a233781ee21ca4b52f6", "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/SecondOrder/Term.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/SecondOrder/Term.agda", "max_line_length": 99, "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/SecondOrder/Term.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": 1099, "size": 2363 }
module Ix where _-:>_ : {I : Set} -> (I -> Set) -> (I -> Set) -> (I -> Set) (S -:> T) i = S i -> T i infixr 4 _-:>_ [_] : {I : Set} -> (I -> Set) -> Set [ P ] = forall i -> P i Algebra : {I : Set}(F : (I -> Set) -> (I -> Set)) -> (I -> Set) -> Set Algebra F X = [ F X -:> X ]
{ "alphanum_fraction": 0.3870967742, "avg_line_length": 23.25, "ext": "agda", "hexsha": "04839eccccbadac82f5477831cead1374e2dd85e", "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": "454cdd18f56db0b0d1643a1fcf36951b5ece395c", "max_forks_repo_licenses": [ "BSD-3-Clause" ], "max_forks_repo_name": "pigworker/InteriorDesign", "max_forks_repo_path": "Ix.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "454cdd18f56db0b0d1643a1fcf36951b5ece395c", "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": "pigworker/InteriorDesign", "max_issues_repo_path": "Ix.agda", "max_line_length": 70, "max_stars_count": 6, "max_stars_repo_head_hexsha": "454cdd18f56db0b0d1643a1fcf36951b5ece395c", "max_stars_repo_licenses": [ "BSD-3-Clause" ], "max_stars_repo_name": "pigworker/InteriorDesign", "max_stars_repo_path": "Ix.agda", "max_stars_repo_stars_event_max_datetime": "2018-07-31T02:00:13.000Z", "max_stars_repo_stars_event_min_datetime": "2018-06-18T15:25:39.000Z", "num_tokens": 123, "size": 279 }
module AnonymousImport where open import Common.IO as _ open import Common.Unit as _ main : IO Unit main = putStrLn ""
{ "alphanum_fraction": 0.7603305785, "avg_line_length": 15.125, "ext": "agda", "hexsha": "b4760c0ada313272f6710b9cb7c3c6a181bcac95", "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/AnonymousImport.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/AnonymousImport.agda", "max_line_length": 28, "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/AnonymousImport.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": 26, "size": 121 }
{-# OPTIONS --safe --without-K #-} module Data.Fin.Relation.Binary.Closure where open import Data.Fin open import Data.Fin.Subset open import Data.Fin.Subset.Dec open import Data.Fin.Subset.Properties open import Data.Fin.Subset.Properties.Dec open import Data.Nat as ℕ using (ℕ) open import Relation.Binary.Construct.Closure.Transitive open import Relation.Binary.Construct.Closure.ReflexiveTransitive open import Relation.Binary.PropositionalEquality as Eq open import Relation.Binary renaming (Decidable to Dec₂) open import Function using (flip; _∘_; case_of_; _∋_) open import Data.List as List using (List; _∷_; []) open import Data.Sum import Data.List.Membership.Propositional as Mem open import Data.List.Membership.Propositional.Properties as MemP open import Data.Product open import Induction.Nat open import Data.Vec using (Vec; []; _∷_; here) open import Data.Vec.Properties open import Data.Bool.Properties as B open import Relation.Nullary open import Relation.Nullary.Negation open import Data.Nat.Properties as ℕP open import Function.Equivalence using (Equivalence) open import Function.Equality using (_⟨$⟩_) private iter : ∀ {a}{A : Set a} → (A → A) → A → ℕ → A iter f z ℕ.zero = z iter f z (ℕ.suc n) = f (iter f z n) _≟s_ : ∀ {n} → Dec₂ (_≡_{A = Subset n}) _≟s_ = ≡-dec B._≟_ p⊂q⇒∣p∣<∣q∣ : ∀ {n} {p q : Subset n} → p ⊆ q → p ≢ q → ∣ p ∣ ℕ.< ∣ q ∣ p⊂q⇒∣p∣<∣q∣ {p = []} {[]} p⊆q p≢q = contradiction refl p≢q p⊂q⇒∣p∣<∣q∣ {p = outside ∷ p} {outside ∷ q} p⊆q p≢q = p⊂q⇒∣p∣<∣q∣ (drop-∷-⊆ p⊆q) (p≢q ∘ cong (outside ∷_)) p⊂q⇒∣p∣<∣q∣ {p = outside ∷ p} {inside ∷ q} p⊆q p≢q = ℕ.s≤s (p⊆q⇒∣p∣<∣q∣ (drop-∷-⊆ p⊆q)) p⊂q⇒∣p∣<∣q∣ {p = inside ∷ p} {outside ∷ q} p⊆q p≢q = contradiction (p⊆q here) λ () p⊂q⇒∣p∣<∣q∣ {p = inside ∷ p} {inside ∷ q} p⊆q p≢q = ℕ.s≤s (p⊂q⇒∣p∣<∣q∣ (drop-∷-⊆ p⊆q) (p≢q ∘ cong (inside ∷_))) m<n⇒0<n : ∀ {m n} → m ℕ.< n → 0 ℕ.< n m<n⇒0<n (ℕ.s≤s m<n) = ℕ.s≤s ℕ.z≤n saturate : ∀ {n} → (f : Subset n → Subset n) → (∀ {s} → s ⊆ f s) → (z : Subset n) → iter f z n ≡ iter f z (ℕ.suc n) saturate {n} f p z = case rec P g n of λ { (inj₁ eq) → eq ; (inj₂ n<f) → contradiction n<f (≤⇒≯ (∣p∣≤n (f (iter f z n)))) } where open ℕP.≤-Reasoning P : ℕ → Set P n = iter f z n ≡ iter f z (ℕ.suc n) ⊎ n ℕ.< ∣ iter f z (ℕ.suc n) ∣ g : ∀ n → Rec _ P n → P n g ℕ.zero _ with z ≟s f z ... | yes eq = inj₁ eq ... | no z≢fz = inj₂ (m<n⇒0<n (p⊂q⇒∣p∣<∣q∣ p z≢fz)) g (ℕ.suc n) (inj₁ eq) = inj₁ (cong f eq) g (ℕ.suc n) (inj₂ n<f) with f (iter f z n) ≟s f (iter f z (ℕ.suc n)) ... | yes eq = inj₁ eq ... | no neq = inj₂ (begin-strict ℕ.suc n <⟨ ℕ.s≤s n<f ⟩ _ ≤⟨ p⊂q⇒∣p∣<∣q∣ p neq ⟩ _ ∎) ∈-saturate : ∀ {n}(f : Subset n → Subset n)(p : ∀ {s} → s ⊆ f s) z {i} → (∃ λ m → i ∈ iter f z m) → i ∈ iter f z n ∈-saturate {n} f p z (m , i∈fm) with n ℕP.≤? m ... | yes n≤m rewrite sym (ℕP.m∸n+n≡m n≤m) = subst (_ ∈_) (sym (lemma (m ℕ.∸ n))) i∈fm where lemma : ∀ k → iter f z n ≡ iter f z (k ℕ.+ n) lemma 0 = refl lemma (ℕ.suc k) = trans (saturate f p z) (cong f (lemma k)) ... | no n≰m rewrite sym (ℕP.m∸n+n≡m (ℕP.≰⇒> n≰m)) = lemma (n ℕ.∸ ℕ.suc m) (p i∈fm) where lemma : ∀ k {m j} → j ∈ iter f z m → j ∈ iter f z (k ℕ.+ m) lemma 0 j∈fm = j∈fm lemma (ℕ.suc k) j∈fm = p (lemma k j∈fm) module _ {n} where open import Data.List.Relation.Unary.Any ∈-⋃⁺ : ∀{s}{ss : List (Subset n)} → s Mem.∈ ss → ∀ {i} → i ∈ s → i ∈ ⋃ ss ∈-⋃⁺ {ss = []} () i∈s ∈-⋃⁺ {ss = s ∷ ss} (here refl) i∈s = x∈p∪q⁺ (inj₁ i∈s) ∈-⋃⁺ {ss = _ ∷ ss} (there s∈ss) i∈s = x∈p∪q⁺ (inj₂ (∈-⋃⁺ s∈ss i∈s)) ∈-⋃⁻ : ∀{ss : List (Subset n)}{i} → i ∈ ⋃ ss → ∃ λ s → i ∈ s × s Mem.∈ ss ∈-⋃⁻ {[]} i∈ss = contradiction i∈ss ∉⊥ ∈-⋃⁻ {s ∷ ss} i∈ss with x∈p∪q⁻ _ _ i∈ss ∈-⋃⁻ {s ∷ ss} i∈ss | inj₁ i∈s = s , i∈s , here refl ∈-⋃⁻ {_ ∷ ss} i∈ss | inj₂ i∈rest with ∈-⋃⁻ {ss} i∈rest ... | s , i∈s , s∈ss = s , i∈s , there s∈ss module _ {p n}{P : Rel (Fin n) p} where right-image : Dec₂ P → Fin n → Subset n right-image P? i = subset (P? i) left-image : Dec₂ P → Fin n → Subset n left-image P? i = subset (flip P? i) _◃_ : Subset n → Dec₂ P → Subset n s ◃ P? = ⋃ (List.map (right-image P?) (List.filter (_∈? s) (List.allFin _))) _▹_ : Dec₂ P → Subset n → Subset n P? ▹ s = ⋃ (List.map (left-image P?) (List.filter (_∈? s) (List.allFin _))) _∪▹_ : Dec₂ P → Subset n → Subset n P? ∪▹ s = s ∪ (P? ▹ s) ∪▹-monotone : (P? : Dec₂ P) → ∀ {s} → s ⊆ P? ∪▹ s ∪▹-monotone P? {s} = p⊆p∪q (P? ▹ s) ∈-▹⁺ : ∀ {i s j}(P? : Dec₂ P) → j ∈ s → P i j → i ∈ P? ▹ s ∈-▹⁺ {i}{s}{j} P? i∈s pij = ∈-⋃⁺ (∈-map⁺ (left-image P?) (∈-filter⁺ (_∈? s) (∈-allFin _) i∈s)) (∈subset⁺ (flip P? j) pij) ∈-▹⁻ : ∀ {i s}(P? : Dec₂ P) → i ∈ P? ▹ s → ∃ λ j → j ∈ s × P i j ∈-▹⁻ {i}{s} P? i∈s with ∈-⋃⁻ {ss = List.map (left-image P?) (List.filter (_∈? s) (List.allFin _))} i∈s ... | P▹s , i∈P▹s , P▹s∈ss with ∈-map⁻ _ P▹s∈ss ... | j , j∈l , eq rewrite eq with ∈-filter⁻ (_∈? s) {xs = List.allFin _} j∈l ... | _ , j∈s = j , j∈s , ∈subset⁻ (flip P? j) i∈P▹s iter-∪▹ : Subset n → (P? : Dec₂ P) → ℕ → Subset n iter-∪▹ z P? = iter (P? ∪▹_) z ▹-star : (P? : Dec₂ P) → Fin n → ℕ → Subset n ▹-star P? i = iter-∪▹ ⁅ i ⁆ P? ▹-plus : (P? : Dec₂ P) → Fin n → ℕ → Subset n ▹-plus P? j = iter-∪▹ (left-image P? j) P? ∈-▹-star⁺ : (P? : Dec₂ P) → ∀ {i j} → Star P i j → i ∈ ▹-star P? j n ∈-▹-star⁺ P? {i}{j} pij = ∈-saturate _ (∪▹-monotone P?) ⁅ j ⁆ (rec Q g (length pij) pij refl) where length : ∀ {i j} → Star P i j → ℕ length ε = 0 length (_ ◅ r) = 1 ℕ.+ length r Q : ℕ → Set _ Q m = ∀ {i j} → (r : Star P i j) → length r ≡ m → ∃ λ k → i ∈ ▹-star P? j k g : ∀ m → Rec _ Q m → Q m g .0 ih ε refl = 0 , x∈⁅x⁆ _ g .(ℕ.suc (length rkj)) ih (pik ◅ rkj) refl with ih rkj refl ... | k , i∈fk = 1 ℕ.+ k , x∈p∪q⁺ (inj₂ (∈-▹⁺ P? i∈fk pik)) ∈-▹-star⁻ : (P? : Dec₂ P) → ∀ {i j} m → i ∈ ▹-star P? j m → Star P i j ∈-▹-star⁻ P? {i} {j} ℕ.zero h rewrite x∈⁅y⁆⇒x≡y _ h = ε ∈-▹-star⁻ P? {i} {j} (ℕ.suc m) h with x∈p∪q⁻ _ _ h ... | inj₁ h₁ = ∈-▹-star⁻ P? m h₁ ... | inj₂ h₁ with ∈-▹⁻ P? h₁ ... | k , k∈s , pik = pik ◅ ∈-▹-star⁻ P? m k∈s ∈-▹-plus⁺ : (P? : Dec₂ P) → ∀ {i j} → Plus′ P i j → i ∈ ▹-plus P? j n ∈-▹-plus⁺ P? {i}{j} pij = ∈-saturate _ (∪▹-monotone P?) (left-image P? j) (rec Q g (length pij) pij refl) where length : ∀ {i j} → Plus′ P i j → ℕ length [ x∼y ] = 0 length (x∼y ∷ r) = 1 ℕ.+ length r Q : ℕ → Set _ Q m = ∀ {i j} → (r : Plus′ P i j) → length r ≡ m → ∃ λ k → i ∈ ▹-plus P? j k g : ∀ m → Rec _ Q m → Q m g ℕ.zero ih {i}{j} [ pij ] refl = 0 , ∈subset⁺ (flip P? j) pij g (ℕ.suc .(length r)) ih {i}{j} (pik ∷ r) refl with ih r refl ... | k , i∈fk = 1 ℕ.+ k , x∈p∪q⁺ (inj₂ (∈-▹⁺ P? i∈fk pik)) ∈-▹-plus⁻ : (P? : Dec₂ P) → ∀ {i j} m → i ∈ ▹-plus P? j m → Plus′ P i j ∈-▹-plus⁻ P? {i} {j} ℕ.zero h = [ ∈subset⁻ (flip P? j) h ] ∈-▹-plus⁻ P? {i} {j} (ℕ.suc m) h with x∈p∪q⁻ _ _ h ∈-▹-plus⁻ P? {i} {j} (ℕ.suc m) h | inj₁ h₁ = ∈-▹-plus⁻ P? m h₁ ∈-▹-plus⁻ P? {i} {j} (ℕ.suc m) h | inj₂ h₁ with ∈-▹⁻ P? h₁ ... | k , k∈s , pik = pik ∷ ∈-▹-plus⁻ P? m k∈s -- Derived decidability of closures dec-Star : (P? : Dec₂ P) → Dec₂ (Star P) dec-Star P? i j with i ∈? ▹-star P? j n ... | yes i∈star = yes (∈-▹-star⁻ P? n i∈star) ... | no i∉star = no λ h → contradiction (∈-▹-star⁺ P? h) i∉star dec-Plus′ : (P? : Dec₂ P) → Dec₂ (Plus′ P) dec-Plus′ P? i j with i ∈? ▹-plus P? j n ... | yes i∈plus = yes (∈-▹-plus⁻ P? n i∈plus) ... | no i∉plus = no λ h → contradiction (∈-▹-plus⁺ P? h) i∉plus dec-Plus : (P? : Dec₂ P) → Dec₂ (Plus P) dec-Plus P? i j with dec-Plus′ P? i j ... | yes pij′ = yes (Equivalence.from equivalent ⟨$⟩ pij′) ... | no ¬pij′ = no λ pij → ¬pij′ (Equivalence.to equivalent ⟨$⟩ pij)
{ "alphanum_fraction": 0.4892821535, "avg_line_length": 40.5252525253, "ext": "agda", "hexsha": "93c3f20651f2596e4cf4cba3a3587ee44f66ef28", "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": "abacd166f63582b7395d9cc10b6323c0f69649e5", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "tizmd/agda-finitary", "max_forks_repo_path": "src/Data/Fin/Relation/Binary/Closure.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "abacd166f63582b7395d9cc10b6323c0f69649e5", "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": "tizmd/agda-finitary", "max_issues_repo_path": "src/Data/Fin/Relation/Binary/Closure.agda", "max_line_length": 124, "max_stars_count": null, "max_stars_repo_head_hexsha": "abacd166f63582b7395d9cc10b6323c0f69649e5", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "tizmd/agda-finitary", "max_stars_repo_path": "src/Data/Fin/Relation/Binary/Closure.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 4052, "size": 8024 }
{-# OPTIONS --cubical --safe #-} module Data.Binary.Order where open import Prelude open import Data.Binary.Definition open import Data.Bits.Order.Reverse public -- weaken : ∀ xs ys → T (xs ≲ᴮ ys & false) → T (xs ≲ᴮ ys & true) -- weaken 0ᵇ ys xs≲ys = tt -- weaken (1ᵇ x) 0ᵇ xs≲ys = xs≲ys -- weaken (1ᵇ x) (1ᵇ x₁) xs≲ys = weaken x x₁ xs≲ys -- weaken (1ᵇ x) (2ᵇ x₁) xs≲ys = xs≲ys -- weaken (2ᵇ x) 0ᵇ xs≲ys = xs≲ys -- weaken (2ᵇ x) (1ᵇ x₁) xs≲ys = xs≲ys -- weaken (2ᵇ x) (2ᵇ x₁) xs≲ys = weaken x x₁ xs≲ys -- ≲-trans : ∀ sₒ xs ys zs s₁ s₂ → T (xs ≲ᴮ ys & s₁) → T (ys ≲ᴮ zs & s₂) → T (xs ≲ᴮ zs & (sₒ or s₁ and s₂)) -- ≲-trans true 0ᵇ ys zs s₁ s₂ xs≲ys ys≲zs = tt -- ≲-trans true (1ᵇ xs) (1ᵇ ys) (1ᵇ zs) s₁ s₂ xs≲ys ys≲zs = ≲-trans true xs ys zs s₁ s₂ xs≲ys ys≲zs -- ≲-trans true (1ᵇ xs) (1ᵇ ys) (2ᵇ zs) s₁ s₂ xs≲ys ys≲zs = ≲-trans true xs ys zs s₁ true xs≲ys ys≲zs -- ≲-trans true (1ᵇ xs) (2ᵇ ys) (1ᵇ zs) s₁ s₂ xs≲ys ys≲zs = ≲-trans true xs ys zs true false xs≲ys ys≲zs -- ≲-trans true (1ᵇ xs) (2ᵇ ys) (2ᵇ zs) s₁ s₂ xs≲ys ys≲zs = ≲-trans true xs ys zs true s₂ xs≲ys ys≲zs -- ≲-trans true (2ᵇ xs) (1ᵇ ys) (1ᵇ zs) s₁ s₂ xs≲ys ys≲zs = ≲-trans false xs ys zs false s₂ xs≲ys ys≲zs -- ≲-trans true (2ᵇ xs) (1ᵇ ys) (2ᵇ zs) s₁ s₂ xs≲ys ys≲zs = ≲-trans true xs ys zs false true xs≲ys ys≲zs -- ≲-trans true (2ᵇ xs) (2ᵇ ys) (1ᵇ zs) false s₂ xs≲ys ys≲zs = ≲-trans false xs ys zs false false xs≲ys ys≲zs -- ≲-trans true (2ᵇ xs) (2ᵇ ys) (1ᵇ zs) true s₂ xs≲ys ys≲zs = ≲-trans false xs ys zs true false xs≲ys ys≲zs -- ≲-trans true (2ᵇ xs) (2ᵇ ys) (2ᵇ zs) s₁ s₂ xs≲ys ys≲zs = ≲-trans true xs ys zs s₁ s₂ xs≲ys ys≲zs -- ≲-trans false 0ᵇ (1ᵇ ys) (1ᵇ zs) false s₂ xs≲ys ys≲zs = tt -- ≲-trans false 0ᵇ (1ᵇ ys) (2ᵇ zs) false s₂ xs≲ys ys≲zs = tt -- ≲-trans false 0ᵇ (2ᵇ ys) (1ᵇ zs) false s₂ xs≲ys ys≲zs = tt -- ≲-trans false 0ᵇ (2ᵇ ys) (2ᵇ zs) false s₂ xs≲ys ys≲zs = tt -- ≲-trans false 0ᵇ 0ᵇ zs true false xs≲ys ys≲zs = ys≲zs -- ≲-trans false 0ᵇ (1ᵇ ys) (1ᵇ zs) true false xs≲ys ys≲zs = tt -- ≲-trans false 0ᵇ (1ᵇ ys) (2ᵇ zs) true false xs≲ys ys≲zs = tt -- ≲-trans false 0ᵇ (2ᵇ ys) (1ᵇ zs) true false xs≲ys ys≲zs = tt -- ≲-trans false 0ᵇ (2ᵇ ys) (2ᵇ zs) true false xs≲ys ys≲zs = tt -- ≲-trans false 0ᵇ ys zs true true xs≲ys ys≲zs = tt -- ≲-trans false (1ᵇ xs) (1ᵇ ys) (1ᵇ zs) false s₂ xs≲ys ys≲zs = ≲-trans false xs ys zs false s₂ xs≲ys ys≲zs -- ≲-trans false (1ᵇ xs) (1ᵇ ys) (2ᵇ zs) false s₂ xs≲ys ys≲zs = ≲-trans true xs ys zs false true xs≲ys ys≲zs -- ≲-trans false (1ᵇ xs) (2ᵇ ys) (1ᵇ zs) false s₂ xs≲ys ys≲zs = ≲-trans false xs ys zs true false xs≲ys ys≲zs -- ≲-trans false (1ᵇ xs) (2ᵇ ys) (2ᵇ zs) false s₂ xs≲ys ys≲zs = ≲-trans true xs ys zs true s₂ xs≲ys ys≲zs -- ≲-trans false (1ᵇ xs) (1ᵇ ys) (1ᵇ zs) true s₂ xs≲ys ys≲zs = ≲-trans false xs ys zs true s₂ xs≲ys ys≲zs -- ≲-trans false (1ᵇ xs) (1ᵇ ys) (2ᵇ zs) true s₂ xs≲ys ys≲zs = ≲-trans true xs ys zs true true xs≲ys ys≲zs -- ≲-trans false (1ᵇ xs) (2ᵇ ys) (1ᵇ zs) true false xs≲ys ys≲zs = ≲-trans false xs ys zs true false xs≲ys ys≲zs -- ≲-trans false (1ᵇ xs) (2ᵇ ys) (1ᵇ zs) true true xs≲ys ys≲zs = ≲-trans true xs ys zs true false xs≲ys ys≲zs -- ≲-trans false (1ᵇ xs) (2ᵇ ys) (2ᵇ zs) true s₂ xs≲ys ys≲zs = ≲-trans true xs ys zs true s₂ xs≲ys ys≲zs -- ≲-trans false (2ᵇ xs) (1ᵇ ys) (1ᵇ zs) s₁ s₂ xs≲ys ys≲zs = ≲-trans false xs ys zs false s₂ xs≲ys ys≲zs -- ≲-trans false (2ᵇ xs) (1ᵇ ys) (2ᵇ zs) false s₂ xs≲ys ys≲zs = ≲-trans false xs ys zs false true xs≲ys ys≲zs -- ≲-trans false (2ᵇ xs) (1ᵇ ys) (2ᵇ zs) true false xs≲ys ys≲zs = ≲-trans false xs ys zs false true xs≲ys ys≲zs -- ≲-trans false (2ᵇ xs) (1ᵇ ys) (2ᵇ zs) true true xs≲ys ys≲zs = ≲-trans true xs ys zs false true xs≲ys ys≲zs -- ≲-trans false (2ᵇ xs) (2ᵇ ys) (1ᵇ zs) false s₂ xs≲ys ys≲zs = ≲-trans false xs ys zs false false xs≲ys ys≲zs -- ≲-trans false (2ᵇ xs) (2ᵇ ys) (1ᵇ zs) true s₂ xs≲ys ys≲zs = ≲-trans false xs ys zs true false xs≲ys ys≲zs -- ≲-trans false (2ᵇ xs) (2ᵇ ys) (2ᵇ zs) s₁ s₂ xs≲ys ys≲zs = ≲-trans false xs ys zs s₁ s₂ xs≲ys ys≲zs
{ "alphanum_fraction": 0.6083916084, "avg_line_length": 72.8, "ext": "agda", "hexsha": "edb2efed4ac23222740e0309075dfad3a5bb19aa", "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": "Data/Binary/Order.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": "Data/Binary/Order.agda", "max_line_length": 111, "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": "Data/Binary/Order.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": 2204, "size": 4004 }
------------------------------------------------------------------------------ -- Agda-Prop Library. -- Theorems of ¬ connective. ------------------------------------------------------------------------------ open import Data.Nat using ( ℕ ) module Data.PropFormula.Theorems.Negation ( n : ℕ ) where ------------------------------------------------------------------------------ open import Data.PropFormula.Properties n using ( ¬-injective ; subst ) open import Data.PropFormula.Syntax n open import Data.PropFormula.Theorems.Classical n open import Data.PropFormula.Theorems.Implication n using ( subst⊢⊃₁ ) open import Function using ( _$_ ; _∘_ ) open import Relation.Binary.PropositionalEquality using ( _≡_ ; refl ; sym ) ------------------------------------------------------------------------------ -- Theorem. ¬-equiv₁ : ∀ {Γ} {φ} → Γ ⊢ ¬ φ → Γ ⊢ φ ⊃ ⊥ ¬-to-⊃⊥ = ¬-equiv₁ -- Proof. ¬-equiv₁ {φ = φ} Γ⊢¬φ = ⊃-intro (¬-elim (weaken φ Γ⊢¬φ) (assume φ)) -------------------------------------------------------------------------- ∎ -- Theorem. ¬-equiv₂ : ∀ {Γ} {φ} → Γ ⊢ φ ⊃ ⊥ → Γ ⊢ ¬ φ ⊃⊥-to-¬ = ¬-equiv₂ -- Proof. ¬-equiv₂ {φ = φ} Γ⊢φ⊃⊥ = ¬-intro (⊃-elim (weaken φ Γ⊢φ⊃⊥) (assume φ)) -------------------------------------------------------------------------- ∎ -- Theorem. ¬¬-equiv₁ : ∀ {Γ} {φ} → Γ ⊢ ¬ (¬ φ) → Γ ⊢ φ -- Proof. ¬¬-equiv₁ {Γ}{φ} Γ⊢¬¬φ = (⊃-elim (⊃-intro $ RAA (¬-elim (weaken (¬ φ) $ assume $ ¬ (¬ φ)) (assume {Γ = Γ , ¬ (¬ φ)} $ ¬ φ))) Γ⊢¬¬φ) -------------------------------------------------------------------------- ∎ -- Theorem. ¬¬-equiv₂ : ∀ {Γ} {φ} → Γ ⊢ φ → Γ ⊢ ¬ (¬ φ) -- Proof. ¬¬-equiv₂ {Γ}{φ} Γ⊢φ = ⊃⊥-to-¬ (⊃-intro (¬-elim (assume (¬ φ)) (weaken (¬ φ) Γ⊢φ))) -------------------------------------------------------------------------- ∎ -- Theorem. ¬∨-to-⊃ : ∀ {Γ} {φ ψ} → Γ ⊢ ¬ φ ∨ ψ → Γ ⊢ φ ⊃ ψ -- Proof. ¬∨-to-⊃ {Γ}{φ}{ψ} = ⊃-elim $ ⊃-intro $ ∨-elim (⊃-intro $ ⊥-elim {Γ = Γ , ¬ φ , φ} ψ (¬-elim (weaken φ $ assume (¬ φ)) (assume {Γ = Γ , ¬ φ} φ))) (⊃-intro $ weaken φ $ assume ψ) -------------------------------------------------------------------------- ∎ -- Theorem. ¬⊤-to-⊥ : ∀ {Γ} → Γ ⊢ ¬ ⊤ → Γ ⊢ ⊥ -- Proof. ¬⊤-to-⊥ Γ⊢¬⊤ = ¬-elim Γ⊢¬⊤ ⊤-intro -------------------------------------------------------------------------- ∎ -- Theorem. ⊤-to-¬⊥ : ∀ {Γ} → Γ ⊢ ⊤ → Γ ⊢ ¬ ⊥ -- Proof. ⊤-to-¬⊥ = λ _ → ¬-intro (assume ⊥) -------------------------------------------------------------------------- ∎ -- Theorem. ¬⊥-to-⊤ : ∀ {Γ} → Γ ⊢ ¬ ⊥ → Γ ⊢ ⊤ -- Proof. ¬⊥-to-⊤ Γ⊢¬⊥ = ⊤-intro -------------------------------------------------------------------------- ∎ -- Theorem. ⊥-to-¬⊤ : ∀ {Γ} → Γ ⊢ ⊥ → Γ ⊢ ¬ ⊤ -- Proof. ⊥-to-¬⊤ = ¬-intro ∘ weaken ⊤ -------------------------------------------------------------------------- ∎ -- Theorem. ¬-inside : ∀ {Γ} {φ ψ} → φ ≡ ψ → Γ ⊢ ¬ φ → Γ ⊢ ¬ ψ ≡-¬-to-¬ = ¬-inside -- Proof. ¬-inside {φ = φ}{ψ} φ≡ψ Γ⊢¬φ = ¬-equiv₂ (⊃-intro (⊃-elim (¬-equiv₁ (weaken ψ Γ⊢¬φ)) (subst (sym φ≡ψ) (assume ψ)))) -------------------------------------------------------------------------- ∎ -- Theorem. subst⊢¬ : ∀ {Γ} {φ γ} → Γ ⊢ γ ⊃ φ → Γ ⊢ ¬ φ → Γ ⊢ ¬ γ -- Proof. subst⊢¬ Γ⊢γ⊃φ Γ⊢¬φ = ⊃⊥-to-¬ (subst⊢⊃₁ Γ⊢γ⊃φ (¬-to-⊃⊥ Γ⊢¬φ)) -------------------------------------------------------------------------- ∎ -- Theorem. ¬⇔-to-⊃¬∧⊃¬ : ∀ {Γ} {φ₁ φ₂} → Γ ⊢ ¬ (φ₁ ⇔ φ₂) → Γ ⊢ (φ₁ ⊃ ¬ φ₂) ∧ (φ₂ ⊃ ¬ φ₁) -- Proof. ¬⇔-to-⊃¬∧⊃¬ {Γ}{φ₁}{φ₂} thm = ∧-intro (⊃-intro (¬-intro (¬-elim (weaken φ₂ $ weaken φ₁ thm) (⇔-intro (weaken φ₁ $ assume {Γ = Γ , φ₁} φ₂) (weaken φ₂ $ weaken φ₂ $ assume φ₁))))) (⊃-intro (¬-intro (¬-elim (weaken φ₁ $ weaken φ₂ thm) (⇔-intro (weaken φ₁ $ weaken φ₁ $ assume φ₂) (weaken φ₂ $ assume {Γ = Γ , φ₂} φ₁))))) -------------------------------------------------------------------------- ∎
{ "alphanum_fraction": 0.2887839433, "avg_line_length": 21.175, "ext": "agda", "hexsha": "9acd121d179915930130e69f78d9425ea82a9e24", "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": "src/Data/PropFormula/Theorems/Negation.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": "src/Data/PropFormula/Theorems/Negation.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": "src/Data/PropFormula/Theorems/Negation.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": 1604, "size": 4235 }
{-# OPTIONS --without-K --safe #-} open import Categories.Category -- Lifting Properties module Categories.Morphism.Lifts {o ℓ e} (𝒞 : Category o ℓ e) where open import Level open Category 𝒞 open Definitions 𝒞 -- A pair of morphisms has the lifting property if every commutative -- square admits a diagonal filler. We say that 'i' has the left lifting -- property with respect to 'p', and that 'p' has the right lifting property -- with respect to 'i'. -- -- Graphically, the situation is as follows: -- -- f -- A ────> X -- │ ^ │ -- │ ∃ ╱ │ -- i │ ╱ │ p -- │ ╱ │ -- V ╱ V -- B ────> Y -- g -- -- Note that the filler is /not/ required to be unique. -- -- For ease of use, we define lifts in two steps: -- * 'Filler' describes the data required to fill a /particular/ commutative square. -- * 'Lifts' then quantifies over all commutative squares. record Filler {A B X Y} {i : A ⇒ B} {f : A ⇒ X} {g : B ⇒ Y} {p : X ⇒ Y} (comm : CommutativeSquare i f g p) : Set (ℓ ⊔ e) where field filler : B ⇒ X fill-commˡ : filler ∘ i ≈ f fill-commʳ : p ∘ filler ≈ g Lifts : ∀ {A B X Y} → (i : A ⇒ B) → (p : X ⇒ Y) → Set (ℓ ⊔ e) Lifts i p = ∀ {f g} → (comm : CommutativeSquare i f g p) → Filler comm -------------------------------------------------------------------------------- -- Lifings of Morphism Classes -- Shorthand for denoting a class of morphisms. MorphismClass : (p : Level) → Set (o ⊔ ℓ ⊔ suc p) MorphismClass p = ∀ {X Y} → X ⇒ Y → Set p -- A morphism 'i' is called "projective" with respect to some morphism class 'J' -- if it has the left-lifting property against every element of 'J'. Projective : ∀ {j} {A B} → MorphismClass j → (i : A ⇒ B) → Set (o ⊔ ℓ ⊔ e ⊔ j) Projective J i = ∀ {X Y} → (f : X ⇒ Y) → J f → Lifts i f -- Dually, a morphism 'i' is called "injective" with repsect to a morphism class 'J' -- if it has the right-lifting property against every element of 'J'. Injective : ∀ {j} {A B} → MorphismClass j → (i : A ⇒ B) → Set (o ⊔ ℓ ⊔ e ⊔ j) Injective J i = ∀ {X Y} → (f : X ⇒ Y) → J f → Lifts f i -- The class of J-Projective morphisms. Proj : ∀ {j} (J : MorphismClass j) → MorphismClass (o ⊔ ℓ ⊔ e ⊔ j) Proj J = Projective J -- The class of J-Injective morphisms. Inj : ∀ {j} (J : MorphismClass j) → MorphismClass (o ⊔ ℓ ⊔ e ⊔ j) Inj J = Injective J
{ "alphanum_fraction": 0.5784313725, "avg_line_length": 33.5142857143, "ext": "agda", "hexsha": "e7f6560cfc371474b008edab44d398b215bfa80c", "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": "d9e4f578b126313058d105c61707d8c8ae987fa8", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "Code-distancing/agda-categories", "max_forks_repo_path": "src/Categories/Morphism/Lifts.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "d9e4f578b126313058d105c61707d8c8ae987fa8", "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": "Code-distancing/agda-categories", "max_issues_repo_path": "src/Categories/Morphism/Lifts.agda", "max_line_length": 84, "max_stars_count": 5, "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/Morphism/Lifts.agda", "max_stars_repo_stars_event_max_datetime": "2019-05-22T03:54:24.000Z", "max_stars_repo_stars_event_min_datetime": "2019-05-21T17:07:19.000Z", "num_tokens": 813, "size": 2346 }
open import Data.Nat using (ℕ; _+_; _≤?_) open import Data.Bool using (Bool; true; false; not; _∧_) open import Data.String using (String; _≟_) open import Relation.Nullary using (¬_; yes; no) open import Relation.Nullary.Negation using (contradiction) open import Relation.Binary.PropositionalEquality using (_≡_; refl; sym) open import Function.Equivalence using (_⇔_; equivalence) open import IMP data ⦅_,_⦆⇒_ : com → state → state → Set where Skip : ∀{s} → ⦅ SKIP , s ⦆⇒ s Loc : ∀{x a s} → ⦅ x ::= a , s ⦆⇒ (s [ x ::= aval a s ]) Comp : ∀{c₁ c₂ s₁ s₂ s₃} → ⦅ c₁ , s₁ ⦆⇒ s₂ → ⦅ c₂ , s₂ ⦆⇒ s₃ → ⦅ c₁ :: c₂ , s₁ ⦆⇒ s₃ IfTrue : ∀{c₁ c₂ b s t} → bval b s ≡ true → ⦅ c₁ , s ⦆⇒ t → ⦅ IF b THEN c₁ ELSE c₂ , s ⦆⇒ t IfFalse : ∀{c₁ c₂ b s t} → bval b s ≡ false → ⦅ c₂ , s ⦆⇒ t → ⦅ IF b THEN c₁ ELSE c₂ , s ⦆⇒ t WhileFalse : ∀{c b s} → bval b s ≡ false → ⦅ WHILE b DO c , s ⦆⇒ s WhileTrue : ∀{c b s₁ s₂ s₃} → bval b s₁ ≡ true → ⦅ c , s₁ ⦆⇒ s₂ → ⦅ WHILE b DO c , s₂ ⦆⇒ s₃ → ⦅ WHILE b DO c , s₁ ⦆⇒ s₃ true≢false : ¬ (true ≡ false) true≢false = λ () deterministic : ∀{c s t t′} → ⦅ c , s ⦆⇒ t → ⦅ c , s ⦆⇒ t′ → t ≡ t′ deterministic Skip Skip = refl deterministic Loc Loc = refl deterministic (Comp r₁ r₂) (Comp r₁′ r₂′) rewrite deterministic r₁ r₁′ = deterministic r₂ r₂′ deterministic (IfTrue v r) (IfTrue v′ r′) = deterministic r r′ deterministic (IfTrue v r) (IfFalse v′ r′) rewrite v = contradiction v′ true≢false deterministic (IfFalse v r) (IfTrue v′ r′) rewrite v′ = contradiction v true≢false deterministic (IfFalse v r) (IfFalse v′ r′) = deterministic r r′ deterministic (WhileFalse v) (WhileFalse x₁) = refl deterministic (WhileFalse v) (WhileTrue x₁ r₁ r₂) rewrite x₁ = contradiction v true≢false deterministic (WhileTrue v r₁ r₂) (WhileFalse v′) rewrite v = contradiction v′ true≢false deterministic (WhileTrue v r₁ r₂) (WhileTrue v′ r₁′ r₂′) rewrite deterministic r₁ r₁′ = deterministic r₂ r₂′ lemma2-3-5 : ∀{s t} → ¬ ( ⦅ WHILE (Bc true) DO SKIP , s ⦆⇒ t ) lemma2-3-5 (WhileTrue x Skip (WhileTrue v r₁ r₂)) = lemma2-3-5 r₂ infixl 19 _∼_ _∼_ : com → com → Set c ∼ c′ = ∀{s t} → ⦅ c , s ⦆⇒ t ⇔ ⦅ c′ , s ⦆⇒ t lemma2-4-3 : ∀{b c} → (WHILE b DO c) ∼ (IF b THEN (c :: (WHILE b DO c)) ELSE SKIP) lemma2-4-3 = equivalence (λ { (WhileFalse x) → IfFalse x Skip ; (WhileTrue x r r₁) → IfTrue x (Comp r r₁) }) (λ { (IfTrue x (Comp r r₁)) → WhileTrue x r r₁ ; (IfFalse x Skip) → WhileFalse x }) data ⦅_,_⦆→⦅_,_⦆ : com → state → com → state → Set where Loc : ∀{x a s} → ⦅ x ::= a , s ⦆→⦅ SKIP , s [ x ::= aval a s ] ⦆ Comp₁ : ∀{c s} → ⦅ SKIP :: c , s ⦆→⦅ c , s ⦆ Comp₂ : ∀{c₁ c₁′ c₂ s s′} → ⦅ c₁ , s ⦆→⦅ c₁′ , s′ ⦆ → ⦅ c₁ :: c₂ , s ⦆→⦅ c₁′ :: c₂ , s′ ⦆ IfTrue : ∀{b s c₁ c₂} → bval b s ≡ true → ⦅ IF b THEN c₁ ELSE c₂ , s ⦆→⦅ c₁ , s ⦆ IfFalse : ∀{b s c₁ c₂} → bval b s ≡ false → ⦅ IF b THEN c₁ ELSE c₂ , s ⦆→⦅ c₂ , s ⦆ While : ∀{b s c} → ⦅ WHILE b DO c , s ⦆→⦅ IF b THEN (c :: (WHILE b DO c)) ELSE SKIP , s ⦆ infix 3 ⦅_,_⦆∎ infixr 2 ⦅_,_⦆→⟨_⟩_ ⦅_,_⦆→*⟨_⟩_ data ⦅_,_⦆→*⦅_,_⦆ : com → state → com → state → Set where ⦅_,_⦆∎ : ∀ c s → ⦅ c , s ⦆→*⦅ c , s ⦆ ⦅_,_⦆→⟨_⟩_ : ∀ c s {c′ c″ s′ s″} → ⦅ c , s ⦆→⦅ c′ , s′ ⦆ → ⦅ c′ , s′ ⦆→*⦅ c″ , s″ ⦆ → ⦅ c , s ⦆→*⦅ c″ , s″ ⦆ ⦅_,_⦆→*⟨_⟩_ : ∀ c s {c′ c″ s′ s″} → ⦅ c , s ⦆→*⦅ c′ , s′ ⦆ → ⦅ c′ , s′ ⦆→*⦅ c″ , s″ ⦆ → ⦅ c , s ⦆→*⦅ c″ , s″ ⦆ ⦅ c , s ⦆→*⟨ ⦅ _ , _ ⦆∎ ⟩ b = b ⦅ c , s ⦆→*⟨ ⦅ _ , _ ⦆→⟨ x ⟩ r ⟩ b = ⦅ _ , _ ⦆→⟨ x ⟩ ⦅ _ , _ ⦆→*⟨ r ⟩ b lemma2-5-6 : ∀{c₁ c₁′ c₂ s s′} → ⦅ c₁ , s ⦆→*⦅ c₁′ , s′ ⦆ → ⦅ c₁ :: c₂ , s ⦆→*⦅ c₁′ :: c₂ , s′ ⦆ lemma2-5-6 ⦅ _ , _ ⦆∎ = ⦅ _ , _ ⦆∎ lemma2-5-6 (⦅ _ , _ ⦆→⟨ x ⟩ r) = ⦅ _ , _ ⦆→⟨ Comp₂ x ⟩ lemma2-5-6 r big-small : ∀{c s t} → ⦅ c , s ⦆⇒ t → ⦅ c , s ⦆→*⦅ SKIP , t ⦆ big-small (Skip {s}) = ⦅ SKIP , s ⦆∎ big-small (Loc {x}{s}{a}) = ⦅ x ::= s , a ⦆→⟨ Loc ⟩ ⦅ SKIP , a [ x ::= aval s a ] ⦆∎ big-small (Comp {c₁}{c₂}{s}{s′}{t} r₁ r₂) = ⦅ c₁ :: c₂ , s ⦆→*⟨ lemma2-5-6 (big-small r₁) ⟩ ⦅ SKIP :: c₂ , s′ ⦆→⟨ Comp₁ ⟩ ⦅ c₂ , s′ ⦆→*⟨ big-small r₂ ⟩ ⦅ SKIP , t ⦆∎ big-small (IfTrue {c₁}{c₂}{b}{s}{t} v r₁) = ⦅ IF b THEN c₁ ELSE c₂ , s ⦆→⟨ IfTrue v ⟩ ⦅ c₁ , s ⦆→*⟨ big-small r₁ ⟩ ⦅ SKIP , t ⦆∎ big-small (IfFalse {c₁}{c₂}{b}{s}{t} v r₂) = ⦅ IF b THEN c₁ ELSE c₂ , s ⦆→⟨ IfFalse v ⟩ ⦅ c₂ , s ⦆→*⟨ big-small r₂ ⟩ ⦅ SKIP , t ⦆∎ big-small (WhileFalse {c}{b}{s} v) = ⦅ WHILE b DO c , s ⦆→⟨ While ⟩ ⦅ IF b THEN c :: (WHILE b DO c) ELSE SKIP , s ⦆→⟨ IfFalse v ⟩ ⦅ SKIP , s ⦆∎ big-small (WhileTrue {c}{b}{s}{s′}{t} v r₁ r₂) = ⦅ WHILE b DO c , s ⦆→⟨ While ⟩ ⦅ IF b THEN c :: (WHILE b DO c) ELSE SKIP , s ⦆→⟨ IfTrue v ⟩ ⦅ c :: (WHILE b DO c) , s ⦆→*⟨ lemma2-5-6 (big-small r₁) ⟩ ⦅ SKIP :: (WHILE b DO c) , s′ ⦆→⟨ Comp₁ ⟩ ⦅ WHILE b DO c , s′ ⦆→*⟨ big-small r₂ ⟩ ⦅ SKIP , t ⦆∎ lemma2-5-8 : ∀{c s c′ s′ t} → ⦅ c , s ⦆→⦅ c′ , s′ ⦆ → ⦅ c′ , s′ ⦆⇒ t → ⦅ c , s ⦆⇒ t lemma2-5-8 Loc Skip = Loc lemma2-5-8 Comp₁ r₁ = Comp Skip r₁ lemma2-5-8 (Comp₂ x) (Comp r₁ r₂) = Comp (lemma2-5-8 x r₁) r₂ lemma2-5-8 (IfTrue x) r₁ = IfTrue x r₁ lemma2-5-8 (IfFalse x) r₁ = IfFalse x r₁ lemma2-5-8 While (IfTrue x (Comp r₁ r₂)) = WhileTrue x r₁ r₂ lemma2-5-8 While (IfFalse x Skip) = WhileFalse x small-big : ∀{c s t} → ⦅ c , s ⦆→*⦅ SKIP , t ⦆ → ⦅ c , s ⦆⇒ t small-big ⦅ SKIP , s ⦆∎ = Skip small-big (⦅ c , s ⦆→⟨ x ⟩ r) = lemma2-5-8 x (small-big r)
{ "alphanum_fraction": 0.4462242563, "avg_line_length": 39.2179487179, "ext": "agda", "hexsha": "eeaef8d57642d56e7330256f2423dab35a7e148f", "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": "cb98e3b3b93362654b79152bfdf2c21eb4951fcc", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "iwilare/imp-semantics", "max_forks_repo_path": "OperationalSemantics.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "cb98e3b3b93362654b79152bfdf2c21eb4951fcc", "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": "iwilare/imp-semantics", "max_issues_repo_path": "OperationalSemantics.agda", "max_line_length": 108, "max_stars_count": 6, "max_stars_repo_head_hexsha": "cb98e3b3b93362654b79152bfdf2c21eb4951fcc", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "iwilare/imp-semantics", "max_stars_repo_path": "OperationalSemantics.agda", "max_stars_repo_stars_event_max_datetime": "2022-02-24T22:29:44.000Z", "max_stars_repo_stars_event_min_datetime": "2020-09-08T11:54:07.000Z", "num_tokens": 3059, "size": 6118 }
module Oscar.Data.Term.AlphaConversion {𝔣} (FunctionName : Set 𝔣) where open import Oscar.Data.Term FunctionName open import Oscar.Class.AlphaConversion open import Oscar.Data.Equality open import Oscar.Data.Fin open import Oscar.Data.Vec open import Oscar.Function open import Oscar.Relation import Oscar.Data.Term.AlphaConversion.internal FunctionName as ⋆ instance AlphaConversionFinTerm : AlphaConversion Fin Term AlphaConversion._◂_ AlphaConversionFinTerm = ⋆._◂_ AlphaConversion.◂-identity AlphaConversionFinTerm = ⋆.◂-identity AlphaConversion.◂-associativity AlphaConversionFinTerm = ⋆.◂-associativity AlphaConversion.◂-extensionality AlphaConversionFinTerm = ⋆.◂-extensionality instance AlphaConversionFinTerms : ∀ {N} → AlphaConversion Fin (Terms N) AlphaConversion._◂_ AlphaConversionFinTerms _ = ⋆._◂s_ _ AlphaConversion.◂-identity AlphaConversionFinTerms = ⋆.◂s-identity AlphaConversion.◂-associativity AlphaConversionFinTerms _ _ = ⋆.◂s-associativity _ _ AlphaConversion.◂-extensionality AlphaConversionFinTerms f≡̇g = ⋆.◂s-extensionality f≡̇g
{ "alphanum_fraction": 0.8174976482, "avg_line_length": 40.8846153846, "ext": "agda", "hexsha": "5de82e1272690bbae9dc7de2cca6ba92d03f6ac7", "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/Data/Term/AlphaConversion.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/Data/Term/AlphaConversion.agda", "max_line_length": 88, "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/Data/Term/AlphaConversion.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 303, "size": 1063 }
postulate A : Set variable a : A postulate B : A → Set variable b : B a postulate C : B a → Set variable c : C b postulate _==_ : {b b' : B a} → C b → C b' → Set _=='_ : {b : B a} → C b → C b → Set postulate f : (b : B a) (b' : B {!a!}) → Set g : (c : C b) (c' : C {!b!}) → c == c' → Set module _ (X : Set) where postulate h : (b' : B a) (c : C b) (c' : C b') → {!c'!} ==' c' → Set
{ "alphanum_fraction": 0.4408866995, "avg_line_length": 18.4545454545, "ext": "agda", "hexsha": "c21b0ee2e5031d4fcfacb51b08d7a63eca777887", "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/Issue3341.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/Issue3341.agda", "max_line_length": 62, "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/Issue3341.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": 189, "size": 406 }
{- Copyright © 2015 Benjamin Barenblat Licensed under the Apache License, Version 2.0 (the ‘License’); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an ‘AS IS’ BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -} module B.Prelude.Bool where open import B.Prelude.BooleanAlgebra using (BooleanAlgebra) import Data.Bool import Data.Bool.Properties open Data.Bool using (Bool; if_then_else_; T) public instance BooleanAlgebra-Bool : BooleanAlgebra _ _ BooleanAlgebra-Bool = Data.Bool.Properties.booleanAlgebra module Bool where open Data.Bool using (_xor_) public
{ "alphanum_fraction": 0.7808510638, "avg_line_length": 29.375, "ext": "agda", "hexsha": "85f3c80a7c1231b818f40fb748980e7a85f0d34f", "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": "c1fd2daa41aa1b915f74b4c09c6e62c79320e8ec", "max_forks_repo_licenses": [ "Apache-2.0" ], "max_forks_repo_name": "bbarenblat/B", "max_forks_repo_path": "Prelude/Bool.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "c1fd2daa41aa1b915f74b4c09c6e62c79320e8ec", "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": "bbarenblat/B", "max_issues_repo_path": "Prelude/Bool.agda", "max_line_length": 79, "max_stars_count": 1, "max_stars_repo_head_hexsha": "c1fd2daa41aa1b915f74b4c09c6e62c79320e8ec", "max_stars_repo_licenses": [ "Apache-2.0" ], "max_stars_repo_name": "bbarenblat/B", "max_stars_repo_path": "Prelude/Bool.agda", "max_stars_repo_stars_event_max_datetime": "2017-06-30T15:59:38.000Z", "max_stars_repo_stars_event_min_datetime": "2017-06-30T15:59:38.000Z", "num_tokens": 222, "size": 940 }
{-# OPTIONS --without-K --rewriting #-} open import HoTT open import homotopy.Bouquet open import homotopy.SphereEndomorphism open import groups.SphereEndomorphism open import groups.CoefficientExtensionality open import cw.CW open import cw.FinCW open import cw.WedgeOfCells open import cw.DegreeByProjection {lzero} module cw.FinBoundary where fdegree-last : ∀ {n} (fin-skel : FinSkeleton (S n)) → cells-last (FinSkeleton-realize fin-skel) → cells-last (cw-init (FinSkeleton-realize fin-skel)) → ℤ fdegree-last fin-skel = degree-last (FinSkeleton-realize fin-skel) (FinSkeleton-has-cells-with-dec-eq fin-skel) fdegree-nth : ∀ {m n} (Sm≤n : S m ≤ n) (fin-skel : FinSkeleton n) → cells-nth Sm≤n (FinSkeleton-realize fin-skel) → cells-last (cw-init (cw-take Sm≤n (FinSkeleton-realize fin-skel))) → ℤ fdegree-nth Sm≤n fin-skel = degree-nth Sm≤n (FinSkeleton-realize fin-skel) (FinSkeleton-has-cells-with-dec-eq fin-skel) FinSkeleton-has-degrees-with-finite-support : ∀ {n} (fin-skel : FinSkeleton n) → has-degrees-with-finite-support (FinSkeleton-realize fin-skel) (FinSkeleton-has-cells-with-dec-eq fin-skel) FinSkeleton-has-degrees-with-finite-support {n = O} _ = _ FinSkeleton-has-degrees-with-finite-support {n = S O} _ = _ , (λ _ → Fin→-has-finite-support _) FinSkeleton-has-degrees-with-finite-support {n = S (S n)} (attached-fin-skeleton skel _ _) = FinSkeleton-has-degrees-with-finite-support {n = S n} skel , (λ _ → Fin→-has-finite-support _) fboundary'-last : ∀ {n} (fin-skel : FinSkeleton (S n)) → cells-last (FinSkeleton-realize fin-skel) → FreeAbGroup.El (cells-last (cw-init (FinSkeleton-realize fin-skel))) fboundary'-last fin-skel upper = boundary'-last (FinSkeleton-realize fin-skel) (FinSkeleton-has-cells-with-dec-eq fin-skel) (FinSkeleton-has-degrees-with-finite-support fin-skel) upper fboundary-last : ∀ {n} (fin-skel : FinSkeleton (S n)) → FreeAbGroup.grp (cells-last (FinSkeleton-realize fin-skel)) →ᴳ FreeAbGroup.grp (cells-last (cw-init (FinSkeleton-realize fin-skel))) fboundary-last fin-skel = FreeAbGroup-extend (FreeAbGroup (cells-last (cw-init (FinSkeleton-realize fin-skel)))) (fboundary'-last fin-skel)
{ "alphanum_fraction": 0.7110418522, "avg_line_length": 45.8367346939, "ext": "agda", "hexsha": "db142b2848fef7863fd185be282eb9239c1b0364", "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": "66f800adef943afdf08c17b8ecfba67340fead5e", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "timjb/HoTT-Agda", "max_forks_repo_path": "theorems/cw/FinBoundary.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "66f800adef943afdf08c17b8ecfba67340fead5e", "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": "timjb/HoTT-Agda", "max_issues_repo_path": "theorems/cw/FinBoundary.agda", "max_line_length": 121, "max_stars_count": null, "max_stars_repo_head_hexsha": "66f800adef943afdf08c17b8ecfba67340fead5e", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "timjb/HoTT-Agda", "max_stars_repo_path": "theorems/cw/FinBoundary.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 697, "size": 2246 }
{-# OPTIONS --without-K --exact-split --allow-unsolved-metas #-} module 17-groups where import 16-sets open 16-sets public -- Section 12.3 Groups in univalent mathematics {- We first introduce semi-groups, and then groups. We do this because the category of groups is a full subcategory of the category of semi-groups. In particular, it is a proposition for a semi-group to be a group. Therefore this approach gives us in a straightforward way that equality of groups is equality of semi-groups. This will be useful in showing that group isomorphisms are equivalent to identifications of groups. -} has-associative-mul : {l : Level} (X : UU-Set l) → UU l has-associative-mul X = Σ ( ( type-Set X) → ( ( type-Set X) → (type-Set X))) (λ μ → ( x y z : type-Set X) → Id (μ (μ x y) z) (μ x (μ y z))) Semi-Group : (l : Level) → UU (lsuc l) Semi-Group l = Σ (UU-Set l) has-associative-mul {- Bureaucracy of semi-groups. -} set-Semi-Group : {l : Level} → Semi-Group l → UU-Set l set-Semi-Group G = pr1 G type-Semi-Group : {l : Level} → Semi-Group l → UU l type-Semi-Group G = pr1 (set-Semi-Group G) is-set-type-Semi-Group : {l : Level} (G : Semi-Group l) → is-set (type-Semi-Group G) is-set-type-Semi-Group G = pr2 (set-Semi-Group G) associative-mul-Semi-Group : {l : Level} (G : Semi-Group l) → has-associative-mul (set-Semi-Group G) associative-mul-Semi-Group G = pr2 G mul-Semi-Group : {l : Level} (G : Semi-Group l) → type-Semi-Group G → type-Semi-Group G → type-Semi-Group G mul-Semi-Group G = pr1 (associative-mul-Semi-Group G) is-associative-mul-Semi-Group : {l : Level} (G : Semi-Group l) (x y z : type-Semi-Group G) → Id ( mul-Semi-Group G (mul-Semi-Group G x y) z) ( mul-Semi-Group G x (mul-Semi-Group G y z)) is-associative-mul-Semi-Group G = pr2 (associative-mul-Semi-Group G) {- The property that a semi-group is a monoid is just that the semi-group possesses a unit that satisfies the left and right unit laws. -} is-unital : {l : Level} → Semi-Group l → UU l is-unital G = Σ ( type-Semi-Group G) ( λ e → ( (y : type-Semi-Group G) → Id (mul-Semi-Group G e y) y) × ( (x : type-Semi-Group G) → Id (mul-Semi-Group G x e) x)) {- We show that is-unital is a proposition. -} abstract is-prop-is-unital' : {l : Level} (G : Semi-Group l) → is-prop' (is-unital G) is-prop-is-unital' (pair (pair X is-set-X) (pair μ assoc-μ)) (pair e (pair left-unit-e right-unit-e)) (pair e' (pair left-unit-e' right-unit-e')) = eq-subtype ( λ e → is-prop-prod ( is-prop-Π (λ y → is-set-X (μ e y) y)) ( is-prop-Π (λ x → is-set-X (μ x e) x))) ( (inv (left-unit-e' e)) ∙ (right-unit-e e')) abstract is-prop-is-unital : {l : Level} (G : Semi-Group l) → is-prop (is-unital G) is-prop-is-unital G = is-prop-is-prop' (is-prop-is-unital' G) {- The property that a monoid is a group is just the property that the monoid that every element is invertible, i.e., it comes equipped with an inverse operation that satisfies the left and right inverse laws. -} is-group' : {l : Level} (G : Semi-Group l) → is-unital G → UU l is-group' G is-unital-G = Σ ( type-Semi-Group G → type-Semi-Group G) ( λ i → ( (x : type-Semi-Group G) → Id (mul-Semi-Group G (i x) x) (pr1 is-unital-G)) × ( (x : type-Semi-Group G) → Id (mul-Semi-Group G x (i x)) (pr1 is-unital-G))) is-group : {l : Level} (G : Semi-Group l) → UU l is-group G = Σ (is-unital G) (is-group' G) Group : (l : Level) → UU (lsuc l) Group l = Σ (Semi-Group l) is-group {- Some bureaucracy of Groups. -} semi-group-Group : {l : Level} → Group l → Semi-Group l semi-group-Group G = pr1 G set-Group : {l : Level} → Group l → UU-Set l set-Group G = pr1 (semi-group-Group G) type-Group : {l : Level} → Group l → UU l type-Group G = pr1 (set-Group G) is-set-type-Group : {l : Level} (G : Group l) → is-set (type-Group G) is-set-type-Group G = pr2 (set-Group G) associative-mul-Group : {l : Level} (G : Group l) → has-associative-mul (set-Group G) associative-mul-Group G = pr2 (semi-group-Group G) mul-Group : {l : Level} (G : Group l) → type-Group G → type-Group G → type-Group G mul-Group G = pr1 (associative-mul-Group G) is-associative-mul-Group : {l : Level} (G : Group l) (x y z : type-Group G) → Id (mul-Group G (mul-Group G x y) z) (mul-Group G x (mul-Group G y z)) is-associative-mul-Group G = pr2 (associative-mul-Group G) is-group-Group : {l : Level} (G : Group l) → is-group (semi-group-Group G) is-group-Group G = pr2 G is-unital-Group : {l : Level} (G : Group l) → is-unital (semi-group-Group G) is-unital-Group G = pr1 (is-group-Group G) unit-Group : {l : Level} (G : Group l) → type-Group G unit-Group G = pr1 (is-unital-Group G) left-unit-law-Group : {l : Level} (G : Group l) (x : type-Group G) → Id (mul-Group G (unit-Group G) x) x left-unit-law-Group G = pr1 (pr2 (is-unital-Group G)) right-unit-law-Group : {l : Level} (G : Group l) (x : type-Group G) → Id (mul-Group G x (unit-Group G)) x right-unit-law-Group G = pr2 (pr2 (is-unital-Group G)) has-inverses-Group : {l : Level} (G : Group l) → is-group' (semi-group-Group G) (is-unital-Group G) has-inverses-Group G = pr2 (is-group-Group G) inv-Group : {l : Level} (G : Group l) → type-Group G → type-Group G inv-Group G = pr1 (has-inverses-Group G) left-inverse-law-Group : {l : Level} (G : Group l) (x : type-Group G) → Id (mul-Group G (inv-Group G x) x) (unit-Group G) left-inverse-law-Group G = pr1 (pr2 (has-inverses-Group G)) right-inverse-law-Group : {l : Level} (G : Group l) (x : type-Group G) → Id (mul-Group G x (inv-Group G x)) (unit-Group G) right-inverse-law-Group G = pr2 (pr2 (has-inverses-Group G)) {- We show that being a group is a proposition. -} abstract is-prop-is-group' : {l : Level} (G : Semi-Group l) (e : is-unital G) → is-prop' (is-group' G e) is-prop-is-group' ( pair (pair G is-set-G) (pair μ assoc-G)) ( pair e (pair left-unit-G right-unit-G)) ( pair i (pair left-inv-i right-inv-i)) ( pair i' (pair left-inv-i' right-inv-i')) = eq-subtype ( λ i → is-prop-prod ( is-prop-Π (λ x → is-set-G (μ (i x) x) e)) ( is-prop-Π (λ x → is-set-G (μ x (i x)) e))) ( eq-htpy ( λ x → -- ix ( inv (left-unit-G (i x))) ∙ -- = 1·(ix) ( ( ap (λ y → μ y (i x)) (inv (left-inv-i' x))) ∙ -- = (i'x·x)·(ix) ( ( assoc-G (i' x) x (i x)) ∙ -- = (i'x)·(x·i'x) ( ( ap (μ (i' x)) (right-inv-i x)) ∙ -- = (i'x)·1 ( right-unit-G (i' x))))))) -- = i'x abstract is-prop-is-group : {l : Level} (G : Semi-Group l) → is-prop (is-group G) is-prop-is-group G = is-prop-Σ ( is-prop-is-unital G) ( λ e → is-prop-is-prop' (is-prop-is-group' G e)) {- We give two examples of groups. The first is the group ℤ of integers. The second is the loop space of a pointed 1-type. -} {- The group of integers. -} semi-group-ℤ : Semi-Group lzero semi-group-ℤ = pair set-ℤ (pair add-ℤ associative-add-ℤ) group-ℤ : Group lzero group-ℤ = pair ( semi-group-ℤ) ( pair ( pair zero-ℤ (pair left-unit-law-add-ℤ right-unit-law-add-ℤ)) ( pair neg-ℤ (pair left-inverse-law-add-ℤ right-inverse-law-add-ℤ))) {- The loop space of a 1-type as a group. -} loop-space : {l : Level} {A : UU l} → A → UU l loop-space a = Id a a set-loop-space : {l : Level} (A : UU l) (a : A) (is-set-Ω : is-set (Id a a)) → UU-Set l set-loop-space A a is-set-Ω = pair (Id a a) is-set-Ω semi-group-loop-space : {l : Level} (A : UU l) (a : A) (is-set-Ω : is-set (Id a a)) → Semi-Group l semi-group-loop-space A a is-set-Ω = pair ( set-loop-space A a is-set-Ω) ( pair (λ p q → p ∙ q) assoc) group-loop-space : {l : Level} (A : UU l) (a : A) (is-set-Ω : is-set (Id a a)) → Group l group-loop-space A a is-set-Ω = pair ( semi-group-loop-space A a is-set-Ω) ( pair ( pair refl (pair (λ q → left-unit) (λ p → right-unit))) ( pair inv (pair left-inv right-inv))) set-loop-space-1-type : {l : Level} (A : 1-type l) (a : pr1 A) → UU-Set l set-loop-space-1-type (pair A is-1-type-A) a = set-loop-space A a (is-1-type-A a a) semi-group-loop-space-1-type : {l : Level} (A : 1-type l) (a : pr1 A) → Semi-Group l semi-group-loop-space-1-type (pair A is-1-type-A) a = semi-group-loop-space A a (is-1-type-A a a) group-loop-space-1-type : {l : Level} (A : 1-type l) (a : pr1 A) → Group l group-loop-space-1-type (pair A is-1-type-A) a = group-loop-space A a (is-1-type-A a a) {- We introduce the automorphism group on a set X. -} aut-Set : {l : Level} (X : UU-Set l) → UU-Set l aut-Set X = set-equiv X X associative-comp-equiv : {l1 l2 l3 l4 : Level} {A : UU l1} {B : UU l2} {C : UU l3} {D : UU l4} → (e : A ≃ B) (f : B ≃ C) (g : C ≃ D) → Id ((g ∘e f) ∘e e) (g ∘e (f ∘e e)) associative-comp-equiv e f g = eq-htpy-equiv refl-htpy has-associative-mul-aut-Set : {l : Level} (X : UU-Set l) → has-associative-mul (aut-Set X) has-associative-mul-aut-Set X = pair ( λ e f → f ∘e e) ( λ e f g → inv (associative-comp-equiv e f g)) aut-Semi-Group : {l : Level} (X : UU-Set l) → Semi-Group l aut-Semi-Group X = pair ( aut-Set X) ( has-associative-mul-aut-Set X) left-unit-law-equiv : {l1 l2 : Level} {X : UU l1} {Y : UU l2} (e : X ≃ Y) → Id ((equiv-id Y) ∘e e) e left-unit-law-equiv e = eq-htpy-equiv refl-htpy right-unit-law-equiv : {l1 l2 : Level} {X : UU l1} {Y : UU l2} (e : X ≃ Y) → Id (e ∘e (equiv-id X)) e right-unit-law-equiv e = eq-htpy-equiv refl-htpy is-unital-aut-Semi-Group : {l : Level} (X : UU-Set l) → is-unital (aut-Semi-Group X) is-unital-aut-Semi-Group X = pair ( equiv-id (type-Set X)) ( pair ( right-unit-law-equiv) ( left-unit-law-equiv)) left-inverse-law-equiv : {l1 l2 : Level} {X : UU l1} {Y : UU l2} (e : X ≃ Y) → Id ((inv-equiv e) ∘e e) (equiv-id X) left-inverse-law-equiv e = eq-htpy-equiv (isretr-inv-is-equiv (is-equiv-map-equiv e)) right-inverse-law-equiv : {l1 l2 : Level} {X : UU l1} {Y : UU l2} (e : X ≃ Y) → Id (e ∘e (inv-equiv e)) (equiv-id Y) right-inverse-law-equiv e = eq-htpy-equiv (issec-inv-is-equiv (is-equiv-map-equiv e)) is-group-aut-Semi-Group' : {l : Level} (X : UU-Set l) → is-group' (aut-Semi-Group X) (is-unital-aut-Semi-Group X) is-group-aut-Semi-Group' X = pair ( inv-equiv) ( pair right-inverse-law-equiv left-inverse-law-equiv) aut-Group : {l : Level} → UU-Set l → Group l aut-Group X = pair ( aut-Semi-Group X) ( pair (is-unital-aut-Semi-Group X) (is-group-aut-Semi-Group' X)) {- Now we introduce homomorphisms of semi-groups. Group homomorphisms are just homomorphisms between their underlying semi-groups. -} preserves-mul : { l1 l2 : Level} (G : Semi-Group l1) (H : Semi-Group l2) → (type-Semi-Group G → type-Semi-Group H) → UU (l1 ⊔ l2) preserves-mul G H f = (x y : type-Semi-Group G) → Id (f (mul-Semi-Group G x y)) (mul-Semi-Group H (f x) (f y)) abstract is-prop-preserves-mul : { l1 l2 : Level} (G : Semi-Group l1) (H : Semi-Group l2) → ( f : type-Semi-Group G → type-Semi-Group H) → is-prop (preserves-mul G H f) is-prop-preserves-mul G (pair (pair H is-set-H) (pair μ-H assoc-H)) f = is-prop-Π (λ x → is-prop-Π (λ y → is-set-H (f (mul-Semi-Group G x y)) (μ-H (f x) (f y)))) hom-Semi-Group : { l1 l2 : Level} (G : Semi-Group l1) (H : Semi-Group l2) → UU (l1 ⊔ l2) hom-Semi-Group G H = Σ ( type-Semi-Group G → type-Semi-Group H) ( preserves-mul G H) {- Bureaucracy of homomorphisms of semi-groups. -} map-hom-Semi-Group : { l1 l2 : Level} (G : Semi-Group l1) (H : Semi-Group l2) → ( hom-Semi-Group G H) → ( type-Semi-Group G) → (type-Semi-Group H) map-hom-Semi-Group G H f = pr1 f preserves-mul-hom-Semi-Group : { l1 l2 : Level} (G : Semi-Group l1) (H : Semi-Group l2) → ( f : hom-Semi-Group G H) → preserves-mul G H (map-hom-Semi-Group G H f) preserves-mul-hom-Semi-Group G H f = pr2 f {- We characterize the identity type of the semi-group homomorphisms. -} htpy-hom-Semi-Group : { l1 l2 : Level} (G : Semi-Group l1) (H : Semi-Group l2) (f g : hom-Semi-Group G H) → UU (l1 ⊔ l2) htpy-hom-Semi-Group G H f g = (map-hom-Semi-Group G H f) ~ (map-hom-Semi-Group G H g) reflexive-htpy-hom-Semi-Group : { l1 l2 : Level} (G : Semi-Group l1) (H : Semi-Group l2) → ( f : hom-Semi-Group G H) → htpy-hom-Semi-Group G H f f reflexive-htpy-hom-Semi-Group G H f = refl-htpy htpy-hom-Semi-Group-eq : { l1 l2 : Level} (G : Semi-Group l1) (H : Semi-Group l2) → ( f g : hom-Semi-Group G H) → Id f g → htpy-hom-Semi-Group G H f g htpy-hom-Semi-Group-eq G H f .f refl = reflexive-htpy-hom-Semi-Group G H f abstract is-contr-total-htpy-hom-Semi-Group : { l1 l2 : Level} (G : Semi-Group l1) (H : Semi-Group l2) → ( f : hom-Semi-Group G H) → is-contr (Σ (hom-Semi-Group G H) (htpy-hom-Semi-Group G H f)) is-contr-total-htpy-hom-Semi-Group G H f = is-contr-total-Eq-substructure ( is-contr-total-htpy (map-hom-Semi-Group G H f)) ( is-prop-preserves-mul G H) ( map-hom-Semi-Group G H f) ( refl-htpy) ( preserves-mul-hom-Semi-Group G H f) abstract is-equiv-htpy-hom-Semi-Group-eq : { l1 l2 : Level} (G : Semi-Group l1) (H : Semi-Group l2) → ( f g : hom-Semi-Group G H) → is-equiv (htpy-hom-Semi-Group-eq G H f g) is-equiv-htpy-hom-Semi-Group-eq G H f = fundamental-theorem-id f ( reflexive-htpy-hom-Semi-Group G H f) ( is-contr-total-htpy-hom-Semi-Group G H f) ( htpy-hom-Semi-Group-eq G H f) eq-htpy-hom-Semi-Group : { l1 l2 : Level} (G : Semi-Group l1) (H : Semi-Group l2) → { f g : hom-Semi-Group G H} → htpy-hom-Semi-Group G H f g → Id f g eq-htpy-hom-Semi-Group G H {f} {g} = inv-is-equiv (is-equiv-htpy-hom-Semi-Group-eq G H f g) {- We show that the type of semi-group homomorphisms between two semi-groups is a set. -} is-set-hom-Semi-Group : { l1 l2 : Level} (G : Semi-Group l1) (H : Semi-Group l2) → is-set (hom-Semi-Group G H) is-set-hom-Semi-Group G H (pair f μ-f) (pair g μ-g) = is-prop-is-equiv ( htpy-hom-Semi-Group G H (pair f μ-f) (pair g μ-g)) ( htpy-hom-Semi-Group-eq G H (pair f μ-f) (pair g μ-g)) ( is-equiv-htpy-hom-Semi-Group-eq G H (pair f μ-f) (pair g μ-g)) ( is-prop-Π (λ x → is-set-type-Semi-Group H (f x) (g x))) {- We introduce group homomorphisms. -} hom-Group : { l1 l2 : Level} (G : Group l1) (H : Group l2) → UU (l1 ⊔ l2) hom-Group G H = hom-Semi-Group ( semi-group-Group G) ( semi-group-Group H) {- Bureaucracy of group homomorphisms. -} map-hom-Group : { l1 l2 : Level} (G : Group l1) (H : Group l2) → ( hom-Group G H) → ( type-Group G) → (type-Group H) map-hom-Group G H f = pr1 f preserves-mul-hom-Group : { l1 l2 : Level} (G : Group l1) (H : Group l2) → ( f : hom-Group G H) → preserves-mul ( semi-group-Group G) ( semi-group-Group H) ( map-hom-Group G H f) preserves-mul-hom-Group G H f = pr2 f {- We characterize the identity type of the group homomorphisms. -} htpy-hom-Group : { l1 l2 : Level} (G : Group l1) (H : Group l2) (f g : hom-Group G H) → UU (l1 ⊔ l2) htpy-hom-Group G H = htpy-hom-Semi-Group ( semi-group-Group G) ( semi-group-Group H) reflexive-htpy-hom-Group : { l1 l2 : Level} (G : Group l1) (H : Group l2) → ( f : hom-Group G H) → htpy-hom-Group G H f f reflexive-htpy-hom-Group G H = reflexive-htpy-hom-Semi-Group ( semi-group-Group G) ( semi-group-Group H) htpy-hom-Group-eq : { l1 l2 : Level} (G : Group l1) (H : Group l2) → ( f g : hom-Group G H) → Id f g → htpy-hom-Group G H f g htpy-hom-Group-eq G H = htpy-hom-Semi-Group-eq ( semi-group-Group G) ( semi-group-Group H) abstract is-contr-total-htpy-hom-Group : { l1 l2 : Level} (G : Group l1) (H : Group l2) → ( f : hom-Group G H) → is-contr (Σ (hom-Group G H) (htpy-hom-Group G H f)) is-contr-total-htpy-hom-Group G H = is-contr-total-htpy-hom-Semi-Group ( semi-group-Group G) ( semi-group-Group H) abstract is-equiv-htpy-hom-Group-eq : { l1 l2 : Level} (G : Group l1) (H : Group l2) → ( f g : hom-Group G H) → is-equiv (htpy-hom-Group-eq G H f g) is-equiv-htpy-hom-Group-eq G H = is-equiv-htpy-hom-Semi-Group-eq ( semi-group-Group G) ( semi-group-Group H) eq-htpy-hom-Group : { l1 l2 : Level} (G : Group l1) (H : Group l2) → { f g : hom-Group G H} → htpy-hom-Group G H f g → Id f g eq-htpy-hom-Group G H = eq-htpy-hom-Semi-Group (semi-group-Group G) (semi-group-Group H) {- Next, we construct the identity group homomorphism, and we show that compositions of group homomorphisms are again group homomorphisms. -} preserves-mul-id : {l : Level} (G : Semi-Group l) → preserves-mul G G id preserves-mul-id (pair (pair G is-set-G) (pair μ-G assoc-G)) x y = refl id-Semi-Group : {l : Level} (G : Semi-Group l) → hom-Semi-Group G G id-Semi-Group G = pair id (preserves-mul-id G) id-Group : {l : Level} (G : Group l) → hom-Group G G id-Group G = id-Semi-Group (semi-group-Group G) composition-Semi-Group : {l1 l2 l3 : Level} → (G : Semi-Group l1) (H : Semi-Group l2) (K : Semi-Group l3) → (hom-Semi-Group H K) → (hom-Semi-Group G H) → (hom-Semi-Group G K) composition-Semi-Group G H K (pair g μ-g) (pair f μ-f) = pair ( g ∘ f) ( λ x y → (ap g (μ-f x y)) ∙ (μ-g (f x) (f y))) composition-Group : {l1 l2 l3 : Level} (G : Group l1) (H : Group l2) (K : Group l3) → (hom-Group H K) → (hom-Group G H) → (hom-Group G K) composition-Group G H K = composition-Semi-Group ( semi-group-Group G) ( semi-group-Group H) ( semi-group-Group K) {- Next, we prove the that the laws for a category hold for group homomorphisms, i.e., we show that composition is associative and satisfies the left and right unit laws. Before we show that these laws hold, we will characterize the identity type of the types of semi-group homomorphisms and group homomorphisms. -} associative-Semi-Group : { l1 l2 l3 l4 : Level} (G : Semi-Group l1) (H : Semi-Group l2) ( K : Semi-Group l3) (L : Semi-Group l4) (h : hom-Semi-Group K L) → ( g : hom-Semi-Group H K) (f : hom-Semi-Group G H) → Id ( composition-Semi-Group G H L ( composition-Semi-Group H K L h g) f) ( composition-Semi-Group G K L h ( composition-Semi-Group G H K g f)) associative-Semi-Group G H K L (pair h μ-h) (pair g μ-g) (pair f μ-f) = eq-htpy-hom-Semi-Group G L refl-htpy left-unit-law-Semi-Group : { l1 l2 : Level} (G : Semi-Group l1) (H : Semi-Group l2) ( f : hom-Semi-Group G H) → Id ( composition-Semi-Group G H H (id-Semi-Group H) f) f left-unit-law-Semi-Group G (pair (pair H is-set-H) (pair μ-H assoc-H)) (pair f μ-f) = eq-htpy-hom-Semi-Group G ( pair (pair H is-set-H) (pair μ-H assoc-H)) ( refl-htpy) right-unit-law-Semi-Group : { l1 l2 : Level} (G : Semi-Group l1) (H : Semi-Group l2) ( f : hom-Semi-Group G H) → Id ( composition-Semi-Group G G H f (id-Semi-Group G)) f right-unit-law-Semi-Group (pair (pair G is-set-G) (pair μ-G assoc-G)) H (pair f μ-f) = eq-htpy-hom-Semi-Group ( pair (pair G is-set-G) (pair μ-G assoc-G)) H refl-htpy {- Now we introduce the notion of group isomorphism. Finally, we will show that isomorphic groups are equal. -} is-iso-Semi-Group : { l1 l2 : Level} (G : Semi-Group l1) (H : Semi-Group l2) → ( f : hom-Semi-Group G H) → UU (l1 ⊔ l2) is-iso-Semi-Group G H f = Σ ( hom-Semi-Group H G) (λ g → ( Id (composition-Semi-Group H G H f g) (id-Semi-Group H)) × ( Id (composition-Semi-Group G H G g f) (id-Semi-Group G))) iso-Semi-Group : { l1 l2 : Level} (G : Semi-Group l1) (H : Semi-Group l2) → UU (l1 ⊔ l2) iso-Semi-Group G H = Σ (hom-Semi-Group G H) (is-iso-Semi-Group G H) abstract is-prop-is-iso-Semi-Group' : { l1 l2 : Level} (G : Semi-Group l1) (H : Semi-Group l2) → ( f : hom-Semi-Group G H) → is-prop' (is-iso-Semi-Group G H f) is-prop-is-iso-Semi-Group' G H f (pair g (pair issec isretr)) (pair g' (pair issec' isretr')) = eq-subtype ( λ h → is-prop-prod ( is-set-hom-Semi-Group H H ( composition-Semi-Group H G H f h) ( id-Semi-Group H)) ( is-set-hom-Semi-Group G G ( composition-Semi-Group G H G h f) ( id-Semi-Group G))) ( ( inv (left-unit-law-Semi-Group H G g)) ∙ ( ( inv (ap (λ h → composition-Semi-Group H G G h g) isretr')) ∙ ( ( associative-Semi-Group H G H G g' f g) ∙ ( ( ap (composition-Semi-Group H H G g') issec) ∙ ( right-unit-law-Semi-Group H G g'))))) abstract is-prop-is-iso-Semi-Group : { l1 l2 : Level} (G : Semi-Group l1) (H : Semi-Group l2) → ( f : hom-Semi-Group G H) → is-prop (is-iso-Semi-Group G H f) is-prop-is-iso-Semi-Group G H f = is-prop-is-prop' (is-prop-is-iso-Semi-Group' G H f) abstract preserves-mul-inv-is-equiv-Semi-Group : { l1 l2 : Level} (G : Semi-Group l1) (H : Semi-Group l2) → ( f : hom-Semi-Group G H) ( is-equiv-f : is-equiv (map-hom-Semi-Group G H f)) → preserves-mul H G (inv-is-equiv is-equiv-f) preserves-mul-inv-is-equiv-Semi-Group ( pair (pair G is-set-G) (pair μ-G assoc-G)) ( pair (pair H is-set-H) (pair μ-H assoc-H)) ( pair f μ-f) is-equiv-f x y = inv-is-equiv ( is-emb-is-equiv f is-equiv-f ( inv-is-equiv is-equiv-f (μ-H x y)) ( μ-G (inv-is-equiv is-equiv-f x) (inv-is-equiv is-equiv-f y))) ( ( ( issec-inv-is-equiv is-equiv-f (μ-H x y)) ∙ ( ( ap (λ t → μ-H t y) (inv (issec-inv-is-equiv is-equiv-f x))) ∙ ( ap ( μ-H (f (inv-is-equiv is-equiv-f x))) ( inv (issec-inv-is-equiv is-equiv-f y))))) ∙ ( inv (μ-f (inv-is-equiv is-equiv-f x) (inv-is-equiv is-equiv-f y)))) abstract is-iso-is-equiv-hom-Semi-Group : { l1 l2 : Level} (G : Semi-Group l1) (H : Semi-Group l2) → ( f : hom-Semi-Group G H) (is-equiv-f : is-equiv (pr1 f)) → is-iso-Semi-Group G H f is-iso-is-equiv-hom-Semi-Group ( pair (pair G is-set-G) (pair μ-G assoc-G)) ( pair (pair H is-set-H) (pair μ-H assoc-H)) ( pair f μ-f) is-equiv-f = pair ( pair ( inv-is-equiv is-equiv-f) ( preserves-mul-inv-is-equiv-Semi-Group ( pair (pair G is-set-G) (pair μ-G assoc-G)) ( pair (pair H is-set-H) (pair μ-H assoc-H)) ( pair f μ-f) is-equiv-f)) ( pair ( eq-htpy-hom-Semi-Group ( pair (pair H is-set-H) (pair μ-H assoc-H)) ( pair (pair H is-set-H) (pair μ-H assoc-H)) ( issec-inv-is-equiv is-equiv-f)) ( eq-htpy-hom-Semi-Group ( pair (pair G is-set-G) (pair μ-G assoc-G)) ( pair (pair G is-set-G) (pair μ-G assoc-G)) ( isretr-inv-is-equiv is-equiv-f))) abstract is-equiv-hom-is-iso-Semi-Group : { l1 l2 : Level} (G : Semi-Group l1) (H : Semi-Group l2) → ( f : hom-Semi-Group G H) (is-iso-f : is-iso-Semi-Group G H f) → ( is-equiv (pr1 f)) is-equiv-hom-is-iso-Semi-Group ( pair (pair G is-set-G) (pair μ-G assoc-G)) ( pair (pair H is-set-H) (pair μ-H assoc-H)) ( pair f μ-f) ( pair (pair g μ-g) (pair issec isretr)) = is-equiv-has-inverse g ( htpy-eq (ap pr1 issec)) ( htpy-eq (ap pr1 isretr)) equiv-Semi-Group : { l1 l2 : Level} (G : Semi-Group l1) (H : Semi-Group l2) → UU (l1 ⊔ l2) equiv-Semi-Group G H = Σ ( type-Semi-Group G ≃ type-Semi-Group H) ( λ e → preserves-mul G H (map-equiv e)) total-is-equiv-hom-Semi-Group : { l1 l2 : Level} (G : Semi-Group l1) (H : Semi-Group l2) → UU (l1 ⊔ l2) total-is-equiv-hom-Semi-Group G H = Σ (hom-Semi-Group G H) (λ f → is-equiv (map-hom-Semi-Group G H f)) preserves-mul' : { l1 l2 : Level} (G : Semi-Group l1) (H : UU-Set l2) ( μ-H : has-associative-mul H) → ( e : (type-Semi-Group G) ≃ (type-Set H)) → UU (l1 ⊔ l2) preserves-mul' G H μ-H e = preserves-mul G (pair H μ-H) (map-equiv e) equiv-Semi-Group' : { l1 l2 : Level} (G : Semi-Group l1) (H : Semi-Group l2) → UU (l1 ⊔ l2) equiv-Semi-Group' G H = equiv-Semi-Group G (pair (pr1 H) (pr2 H)) abstract equiv-iso-Semi-Group-equiv-Semi-Group : { l1 l2 : Level} (G : Semi-Group l1) (H : Semi-Group l2) → equiv-Semi-Group' G H ≃ iso-Semi-Group G H equiv-iso-Semi-Group-equiv-Semi-Group G H = ( ( ( equiv-total-subtype ( λ f → is-subtype-is-equiv (map-hom-Semi-Group G H f)) ( is-prop-is-iso-Semi-Group G H) ( is-iso-is-equiv-hom-Semi-Group G H) ( is-equiv-hom-is-iso-Semi-Group G H)) ∘e ( ( inv-equiv ( equiv-Σ-assoc ( type-Semi-Group G → type-Semi-Group H) ( preserves-mul G H) ( λ f → is-equiv (map-hom-Semi-Group G H f)))) ∘e ( equiv-tot ( λ f → equiv-swap-prod (is-equiv f) (preserves-mul G H f))))) ∘e ( equiv-Σ-assoc ( type-Semi-Group G → type-Semi-Group H) ( is-equiv) ( λ e → preserves-mul G H (map-equiv e)))) ∘e ( equiv-tr (equiv-Semi-Group G) (η-pair H)) center-total-preserves-mul-id : { l1 : Level} (G : Semi-Group l1) → Σ (has-associative-mul (pr1 G)) (λ μ → preserves-mul G (pair (pr1 G) μ) id) center-total-preserves-mul-id (pair (pair G is-set-G) (pair μ-G assoc-G)) = pair (pair μ-G assoc-G) (λ x y → refl) contraction-total-preserves-mul-id : { l1 : Level} (G : Semi-Group l1) → ( t : Σ ( has-associative-mul (pr1 G)) ( λ μ → preserves-mul G (pair (pr1 G) μ) id)) → Id (center-total-preserves-mul-id G) t contraction-total-preserves-mul-id ( pair (pair G is-set-G) (pair μ-G assoc-G)) ( pair (pair μ-G' assoc-G') μ-id) = eq-subtype ( λ μ → is-prop-preserves-mul ( pair (pair G is-set-G) (pair μ-G assoc-G)) ( pair (pair G is-set-G) μ) id) ( eq-subtype ( λ μ → is-prop-Π (λ x → is-prop-Π (λ y → is-prop-Π (λ z → is-set-G (μ (μ x y) z) (μ x (μ y z)))))) ( eq-htpy (λ x → eq-htpy (λ y → μ-id x y)))) is-contr-total-preserves-mul-id : { l1 : Level} (G : Semi-Group l1) → is-contr (Σ (has-associative-mul (pr1 G)) (λ μ → preserves-mul G (pair (pr1 G) μ) id)) is-contr-total-preserves-mul-id G = pair ( center-total-preserves-mul-id G) ( contraction-total-preserves-mul-id G) is-contr-total-equiv-Semi-Group : { l1 : Level} (G : Semi-Group l1) → is-contr (Σ (Semi-Group l1) (λ H → equiv-Semi-Group' G H)) is-contr-total-equiv-Semi-Group {l1} G = is-contr-total-Eq-structure ( preserves-mul' G) ( is-contr-total-Eq-substructure ( is-contr-total-equiv (type-Semi-Group G)) ( is-prop-is-set) ( type-Semi-Group G) ( equiv-id (type-Semi-Group G)) ( is-set-type-Semi-Group G)) ( pair (pr1 G) (equiv-id (type-Semi-Group G))) ( is-contr-total-preserves-mul-id G) is-contr-total-iso-Semi-Group : { l1 : Level} (G : Semi-Group l1) → is-contr (Σ (Semi-Group l1) (iso-Semi-Group G)) is-contr-total-iso-Semi-Group {l1} G = is-contr-equiv' ( Σ (Semi-Group l1) (λ H → equiv-Semi-Group' G H)) ( equiv-tot (λ H → equiv-iso-Semi-Group-equiv-Semi-Group G H)) ( is-contr-total-equiv-Semi-Group G) iso-id-Semi-Group : { l1 : Level} (G : Semi-Group l1) → iso-Semi-Group G G iso-id-Semi-Group G = pair ( id-Semi-Group G) ( pair ( id-Semi-Group G) ( pair ( left-unit-law-Semi-Group G G (id-Semi-Group G)) ( right-unit-law-Semi-Group G G (id-Semi-Group G)))) iso-eq-Semi-Group : { l1 : Level} (G H : Semi-Group l1) → Id G H → iso-Semi-Group G H iso-eq-Semi-Group G .G refl = iso-id-Semi-Group G is-equiv-iso-eq-Semi-Group : { l1 : Level} (G H : Semi-Group l1) → is-equiv (iso-eq-Semi-Group G H) is-equiv-iso-eq-Semi-Group G = fundamental-theorem-id G ( iso-id-Semi-Group G) ( is-contr-total-iso-Semi-Group G) ( iso-eq-Semi-Group G) equiv-iso-eq-Semi-Group : { l1 : Level} (G H : Semi-Group l1) → Id G H ≃ iso-Semi-Group G H equiv-iso-eq-Semi-Group G H = pair (iso-eq-Semi-Group G H) (is-equiv-iso-eq-Semi-Group G H) eq-iso-Semi-Group : { l1 : Level} (G H : Semi-Group l1) → iso-Semi-Group G H → Id G H eq-iso-Semi-Group G H = inv-is-equiv (is-equiv-iso-eq-Semi-Group G H) {- Finally we show that isomorphic groups are equal. -} iso-Group : { l1 l2 : Level} (G : Group l1) (H : Group l2) → UU (l1 ⊔ l2) iso-Group G H = iso-Semi-Group ( semi-group-Group G) ( semi-group-Group H) iso-id-Group : { l1 : Level} (G : Group l1) → iso-Group G G iso-id-Group G = iso-id-Semi-Group (semi-group-Group G) iso-eq-Group : { l1 : Level} (G H : Group l1) → Id G H → iso-Group G H iso-eq-Group G .G refl = iso-id-Group G abstract equiv-iso-eq-Group' : { l1 : Level} (G H : Group l1) → Id G H ≃ iso-Group G H equiv-iso-eq-Group' G H = ( equiv-iso-eq-Semi-Group ( semi-group-Group G) ( semi-group-Group H)) ∘e ( equiv-ap-pr1-is-subtype is-prop-is-group {s = G} {t = H}) abstract is-contr-total-iso-Group : { l1 : Level} (G : Group l1) → is-contr (Σ (Group l1) (iso-Group G)) is-contr-total-iso-Group {l1} G = is-contr-equiv' ( Σ (Group l1) (Id G)) ( equiv-tot (λ H → equiv-iso-eq-Group' G H)) ( is-contr-total-path G) is-equiv-iso-eq-Group : { l1 : Level} (G H : Group l1) → is-equiv (iso-eq-Group G H) is-equiv-iso-eq-Group G = fundamental-theorem-id G ( iso-id-Group G) ( is-contr-total-iso-Group G) ( iso-eq-Group G) eq-iso-Group : { l1 : Level} (G H : Group l1) → iso-Group G H → Id G H eq-iso-Group G H = inv-is-equiv (is-equiv-iso-eq-Group G H) -- Categories underlying-type-Set : {l : Level} → UU-Set l → UU l underlying-type-Set A = pr1 A is-set-underlying-type-Set : {l : Level} (A : UU-Set l) → is-set (underlying-type-Set A) is-set-underlying-type-Set A = pr2 A associative-composition-structure : {l1 l2 : Level} (A : UU l1) (hom : A → A → UU-Set l2) → UU (l1 ⊔ l2) associative-composition-structure A hom = Σ ( (x y z : A) → underlying-type-Set (hom x y) → underlying-type-Set (hom y z) → underlying-type-Set (hom x z)) ( λ μ → (x y z w : A) (f : underlying-type-Set (hom x y)) (g : underlying-type-Set (hom y z)) (h : underlying-type-Set (hom z w)) → Id (μ x z w (μ x y z f g) h) (μ x y w f (μ y z w g h))) is-unital-composition-structure : {l1 l2 : Level} (A : UU l1) (hom : A → A → UU-Set l2) → associative-composition-structure A hom → UU _ is-unital-composition-structure A hom (pair μ assoc-μ) = Σ ( (x : A) → underlying-type-Set (hom x x)) ( λ e → ( (x y : A) (f : underlying-type-Set (hom x y)) → Id (μ x x y (e x) f) f) × ( (x y : A) (f : underlying-type-Set (hom x y)) → Id (μ x y y f (e y)) f)) is-prop-is-unital-composition-structure' : {l1 l2 : Level} (A : UU l1) (hom : A → A → UU-Set l2) → ( μ : associative-composition-structure A hom) → is-prop' (is-unital-composition-structure A hom μ) is-prop-is-unital-composition-structure' A hom ( pair μ assoc-μ) ( pair e (pair left-unit-law-e right-unit-law-e)) ( pair e' (pair left-unit-law-e' right-unit-law-e')) = eq-subtype ( λ x → is-prop-prod ( is-prop-Π ( λ a → is-prop-Π ( λ b → is-prop-Π ( λ f' → is-set-underlying-type-Set (hom a b) (μ a a b (x a) f') f')))) ( is-prop-Π ( λ a → is-prop-Π ( λ b → is-prop-Π ( λ f' → is-set-underlying-type-Set (hom a b) (μ a b b f' (x b)) f'))))) ( eq-htpy ( λ x → (inv (left-unit-law-e' x x (e x))) ∙ right-unit-law-e x x (e' x))) Precategory : (l1 l2 : Level) → UU (lsuc l1 ⊔ lsuc l2) Precategory l1 l2 = Σ ( UU l1) (λ A → Σ (A → A → UU-Set l2) (λ hom → Σ ( associative-composition-structure A hom) ( is-unital-composition-structure A hom))) obj-Precat : {l1 l2 : Level} → Precategory l1 l2 → UU l1 obj-Precat C = pr1 C hom-Set-Precat : {l1 l2 : Level} (C : Precategory l1 l2) (x y : obj-Precat C) → UU-Set l2 hom-Set-Precat C = pr1 (pr2 C) hom-Precat : {l1 l2 : Level} (C : Precategory l1 l2) (x y : obj-Precat C) → UU l2 hom-Precat C x y = pr1 (hom-Set-Precat C x y) is-set-hom-Precat : {l1 l2 : Level} (C : Precategory l1 l2) (x y : obj-Precat C) → is-set (hom-Precat C x y) is-set-hom-Precat C x y = pr2 (hom-Set-Precat C x y) associative-composition-Precat : {l1 l2 : Level} (C : Precategory l1 l2) → associative-composition-structure (obj-Precat C) (hom-Set-Precat C) associative-composition-Precat C = pr1 (pr2 (pr2 C)) composition-Precat : {l1 l2 : Level} (C : Precategory l1 l2) {x y z : obj-Precat C} → hom-Precat C x y → hom-Precat C y z → hom-Precat C x z composition-Precat C {x} {y} {z} = pr1 (associative-composition-Precat C) x y z is-associative-composition-Precat : { l1 l2 : Level} (C : Precategory l1 l2) {x y z w : obj-Precat C} → ( f : hom-Precat C x y) (g : hom-Precat C y z) (h : hom-Precat C z w) → Id (composition-Precat C (composition-Precat C f g) h) (composition-Precat C f (composition-Precat C g h)) is-associative-composition-Precat C {x} {y} {z} {w} = pr2 (associative-composition-Precat C) x y z w is-unital-Precat : { l1 l2 : Level} (C : Precategory l1 l2) → is-unital-composition-structure ( obj-Precat C) ( hom-Set-Precat C) ( associative-composition-Precat C) is-unital-Precat C = pr2 (pr2 (pr2 C)) id-Precat : { l1 l2 : Level} (C : Precategory l1 l2) {x : obj-Precat C} → hom-Precat C x x id-Precat (pair A (pair hom (pair (pair μ assoc-μ) t))) {x} = pr1 (is-unital-Precat {!!}) x -- Exercises -- Exercise {- We show that group homomorphisms preserve the unit. -} preserves-unit : { l1 l2 : Level} (G : Group l1) (H : Group l2) → ( f : hom-Semi-Group ( semi-group-Group G) ( semi-group-Group H)) → UU l2 preserves-unit G H f = Id (map-hom-Group G H f (unit-Group G)) (unit-Group H) abstract preserves-unit-group-hom : { l1 l2 : Level} (G : Group l1) (H : Group l2) → ( f : hom-Group G H) → preserves-unit G H f preserves-unit-group-hom ( pair ( pair (pair G is-set-G) (pair μ-G assoc-G)) ( pair ( pair e-G (pair left-unit-G right-unit-G)) ( pair i-G (pair left-inv-G right-inv-G)))) ( pair ( pair (pair H is-set-H) (pair μ-H assoc-H)) ( pair ( pair e-H (pair left-unit-H right-unit-H)) ( pair i-H (pair left-inv-H right-inv-H)))) ( pair f μ-f) = ( inv (left-unit-H (f e-G))) ∙ ( ( ap (λ x → μ-H x (f e-G)) (inv (left-inv-H (f e-G)))) ∙ ( ( assoc-H (i-H (f e-G)) (f e-G) (f e-G)) ∙ ( ( ap (μ-H (i-H (f e-G))) (inv (μ-f e-G e-G))) ∙ ( ( ap (λ x → μ-H (i-H (f e-G)) (f x)) (left-unit-G e-G)) ∙ ( left-inv-H (f e-G)))))) {- We show that group homomorphisms preserve inverses. -} preserves-inverses : { l1 l2 : Level} (G : Group l1) (H : Group l2) → ( f : hom-Group G H) → UU (l1 ⊔ l2) preserves-inverses G H f = ( x : type-Group G) → Id ( map-hom-Group G H f (inv-Group G x)) ( inv-Group H (map-hom-Group G H f x)) abstract preserves-inverses-group-hom' : { l1 l2 : Level} (G : Group l1) (H : Group l2) → ( f : hom-Group G H) → preserves-unit G H f → preserves-inverses G H f preserves-inverses-group-hom' ( pair ( pair (pair G is-set-G) (pair μ-G assoc-G)) ( pair ( pair e-G (pair left-unit-G right-unit-G)) ( pair i-G (pair left-inv-G right-inv-G)))) ( pair ( pair (pair H is-set-H) (pair μ-H assoc-H)) ( pair ( pair e-H (pair left-unit-H right-unit-H)) ( pair i-H (pair left-inv-H right-inv-H)))) ( pair f μ-f) preserves-unit-f x = ( inv ( right-unit-H (f (i-G x)))) ∙ ( ( ap (μ-H (f (i-G x))) (inv (right-inv-H (f x)))) ∙ ( ( inv (assoc-H (f (i-G x)) (f x) (i-H (f x)))) ∙ ( ( inv (ap (λ y → μ-H y (i-H (f x))) (μ-f (i-G x) x))) ∙ ( ( ap (λ y → μ-H (f y) (i-H (f x))) (left-inv-G x)) ∙ ( ( ap ( λ y → μ-H y (i-H (f x))) ( preserves-unit-f)) ∙ ( left-unit-H (i-H (f x)))))))) abstract preserves-inverses-group-hom : { l1 l2 : Level} (G : Group l1) (H : Group l2) → ( f : hom-Group G H) → preserves-inverses G H f preserves-inverses-group-hom G H f = preserves-inverses-group-hom' G H f (preserves-unit-group-hom G H f) hom-Group' : { l1 l2 : Level} (G : Group l1) (H : Group l2) → UU (l1 ⊔ l2) hom-Group' G H = Σ ( hom-Group G H) (λ f → ( preserves-unit G H f) × (preserves-inverses G H f)) preserves-all-hom-Group : { l1 l2 : Level} (G : Group l1) (H : Group l2) → hom-Group G H → hom-Group' G H preserves-all-hom-Group G H f = pair f ( pair ( preserves-unit-group-hom G H f) ( preserves-inverses-group-hom G H f)) -- Exercise {- hom-mul-Group : {l : Level} (G : Group l) → hom-Group G Aut -}
{ "alphanum_fraction": 0.5840388245, "avg_line_length": 34.0900735294, "ext": "agda", "hexsha": "6c777f13afd2acf3bdd9b102b782fe8db0a46e6d", "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/17-groups.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/17-groups.agda", "max_line_length": 135, "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/17-groups.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 14012, "size": 37090 }
-- Andreas Abel, 2022-06-06, issue #5944 reported by Mike Shulman -- Support rewriting with 2ltt (match SSet). {-# OPTIONS --type-in-type --rewriting --two-level #-} open import Agda.Primitive public postulate Tel : SSet ε : Tel _≡_ : {A : SSet} (a : A) → A → SSet cong : (A B : SSet) (f : A → B) {x y : A} (p : x ≡ y) → f x ≡ f y coe← : (A B : SSet) → (A ≡ B) → B → A el : Tel → SSet [] : el ε ID : (Δ : Tel) → Tel ID′ : (Δ : Tel) (Θ : el Δ → Tel) → Tel ID′ε : (Δ : Tel) → ID′ Δ (λ _ → ε) ≡ ε {-# BUILTIN REWRITE _≡_ #-} {-# REWRITE ID′ε #-} postulate ID′-CONST : (Θ : Tel) (Δ : Tel) → ID′ Θ (λ _ → Δ) ≡ ID Δ ID′-CONST-ε : (Θ : Tel) (δ₂ : el (ID ε)) → coe← (el (ID′ Θ (λ _ → ε))) (el (ID ε)) (cong Tel (SSet lzero) el (ID′-CONST Θ ε)) δ₂ ≡ [] {-# REWRITE ID′-CONST-ε #-} -- WAS: internal error when trying to make a pattern from SSet -- Should succeed now
{ "alphanum_fraction": 0.4957627119, "avg_line_length": 25.5135135135, "ext": "agda", "hexsha": "1ead1ccb4ed7fc5aba7a9560766e09c559b6c246", "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/Succeed/Issue5944.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "98c9382a59f707c2c97d75919e389fc2a783ac75", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "BSD-2-Clause" ], "max_issues_repo_name": "KDr2/agda", "max_issues_repo_path": "test/Succeed/Issue5944.agda", "max_line_length": 106, "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/Succeed/Issue5944.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 398, "size": 944 }
module ASN1.Util where open import Data.Word8 using (Word8) renaming (primWord8fromNat to to𝕎; primWord8toNat to from𝕎) open import Data.Nat using (ℕ; _+_; _*_; _≤?_) open import Data.Nat.DivMod using (_divMod_; result) open import Data.Fin using (toℕ) open import Data.List using (List; []; _∷_) open import Relation.Nullary using (Dec; yes; no) -- TODO: use WF induction {-# TERMINATING #-} base256 : ℕ → List Word8 base256 n with n ≤? 255 ... | yes _ = to𝕎 n ∷ [] ... | no _ with n divMod 256 ... | result quotient remainder _ = to𝕎 (toℕ remainder) ∷ base256 quotient fromBase256 : List Word8 → ℕ fromBase256 [] = 0 -- this should not be the case, as 0 is encoded as (0 ∷ []) fromBase256 (x ∷ ns) = from𝕎 x + 256 * fromBase256 ns {- base256-prop : ∀ n → n ≡ fromBase256 (base256 n) base256-prop n with n ≤? 255 base256-prop n | yes p = {!!} base256-prop n | no ¬p = {!!} -} {-# TERMINATING #-} base128 : ℕ → List Word8 base128 n with n ≤? 127 ... | yes _ = to𝕎 n ∷ [] ... | no _ with n divMod 128 ... | result quotient remainder _ = to𝕎 (128 + toℕ remainder) ∷ base128 quotient
{ "alphanum_fraction": 0.6596136155, "avg_line_length": 30.1944444444, "ext": "agda", "hexsha": "94d851a32d0800f01cab55e3c2cedbba581e5803", "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": "bbbeb679fa2c55a12f0cb345ad920c999c3f8fa8", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "semenov-vladyslav/asn1-agda", "max_forks_repo_path": "src/ASN1/Util.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "bbbeb679fa2c55a12f0cb345ad920c999c3f8fa8", "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/asn1-agda", "max_issues_repo_path": "src/ASN1/Util.agda", "max_line_length": 96, "max_stars_count": null, "max_stars_repo_head_hexsha": "bbbeb679fa2c55a12f0cb345ad920c999c3f8fa8", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "semenov-vladyslav/asn1-agda", "max_stars_repo_path": "src/ASN1/Util.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 375, "size": 1087 }
-- Andreas, 2014-11-08 -- This used to be a failed test case, but works now. open import Common.Prelude postulate some : Nat data D : Nat → Set where d₀ : D some d₁ : D (suc some) f : (n : Nat) → D n → Nat f .some d₀ = zero f .(suc some) d₁ = f some d₀ -- Since x < suc x for all x in the structural order, -- some < suc some is a valid descent.
{ "alphanum_fraction": 0.6174863388, "avg_line_length": 19.2631578947, "ext": "agda", "hexsha": "f97540a5718232a756f27ab86177cb2afc202c3e", "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/DotSubTermination.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/DotSubTermination.agda", "max_line_length": 55, "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/DotSubTermination.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": 128, "size": 366 }
{- Byzantine Fault Tolerant Consensus Verification in Agda, version 0.9. Copyright (c) 2020, 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 Optics.All open import LibraBFT.Prelude open import LibraBFT.Base.ByteString open import LibraBFT.Base.PKCS open import LibraBFT.Base.Types open import LibraBFT.Hash open import LibraBFT.Impl.Base.Types open import LibraBFT.Impl.Consensus.Types open import LibraBFT.Impl.Util.Crypto open import LibraBFT.Impl.Util.Util open import LibraBFT.Abstract.Types.EpochConfig UID NodeId -- This is a minimal/fake example handler that obeys the VotesOnce rule, enabling us to start -- exploring how we express the algorithm and prove properties about it. It simply sends a vote for -- 1 + its LatestVotedRound, and increments its LatestVotedRound. It is called EventProcessor for -- historical reasons, because this what a previous version of LibraBFT called its main handler; -- this will be updated when we move towards modeling a more recent implementation. module LibraBFT.Impl.Consensus.ChainedBFT.EventProcessor (hash : BitString → Hash) (hash-cr : ∀{x y} → hash x ≡ hash y → Collision hash x y ⊎ x ≡ y) where open RWST-do processCommitM : LedgerInfoWithSignatures → LBFT (List ExecutedBlock) processCommitM finalityProof = pure [] fakeAuthor : Author fakeAuthor = 0 fakeBlockInfo : EpochId → Round → ProposalMsg → BlockInfo fakeBlockInfo eid rnd pm = mkBlockInfo eid rnd (pm ^∙ pmProposal ∙ bId) fakeLedgerInfo : BlockInfo → ProposalMsg → LedgerInfo fakeLedgerInfo bi pm = mkLedgerInfo bi (pm ^∙ pmProposal ∙ bId) postulate fakeSK : SK fakeSig : Signature processProposalMsg : Instant → ProposalMsg → LBFT Unit processProposalMsg inst pm = do st ← get let 𝓔 = α-EC ((₋epEC st) , (₋epEC-correct st)) ix = EpochConfig.epochId 𝓔 ep = ₋epEC st epw = ₋epWithEC st epc = ₋epEC-correct st bt = epw ^∙ (lBlockTree 𝓔) nr = suc ((₋epEC st) ^∙ epLastVotedRound) uv = mkVote (mkVoteData (fakeBlockInfo ix nr pm) (fakeBlockInfo ix 0 pm)) fakeAuthor (fakeLedgerInfo (fakeBlockInfo ix nr pm) pm) fakeSig (₋bSignature (₋pmProposal pm)) sv = record uv { ₋vSignature = sign ⦃ sig-Vote ⦄ uv fakeSK} si = mkSyncInfo (₋btHighestQuorumCert bt) (₋btHighestCommitCert bt) ep' = ep [ epLastVotedRound := nr ] epc2 = EventProcessorEC-correct-≡ (₋epEC st) ep' refl epc st' = record st { ₋epEC = ep' ; ₋epEC-correct = epc2 ; ₋epWithEC = subst EventProcessorWithEC (α-EC-≡ ep ep' refl refl epc) epw } put st' tell1 (SendVote (mkVoteMsg sv si) (fakeAuthor ∷ [])) pure unit processVote : Instant → VoteMsg → LBFT Unit processVote now msg = pure unit
{ "alphanum_fraction": 0.6739562624, "avg_line_length": 39.1948051948, "ext": "agda", "hexsha": "09bbabd6f221b1fa4eddbc703886ad6faf6b41d9", "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": "34e4627855fb198665d0c98f377403a906ba75d7", "max_forks_repo_licenses": [ "UPL-1.0" ], "max_forks_repo_name": "haroldcarr/bft-consensus-agda", "max_forks_repo_path": "LibraBFT/Impl/Consensus/ChainedBFT/EventProcessor.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "34e4627855fb198665d0c98f377403a906ba75d7", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "UPL-1.0" ], "max_issues_repo_name": "haroldcarr/bft-consensus-agda", "max_issues_repo_path": "LibraBFT/Impl/Consensus/ChainedBFT/EventProcessor.agda", "max_line_length": 111, "max_stars_count": null, "max_stars_repo_head_hexsha": "34e4627855fb198665d0c98f377403a906ba75d7", "max_stars_repo_licenses": [ "UPL-1.0" ], "max_stars_repo_name": "haroldcarr/bft-consensus-agda", "max_stars_repo_path": "LibraBFT/Impl/Consensus/ChainedBFT/EventProcessor.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 896, "size": 3018 }
------------------------------------------------------------------------------ -- The Booleans properties ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTIONS --without-K #-} module FOTC.Data.Bool.PropertiesATP where open import FOTC.Base open import FOTC.Data.Bool open import FOTC.Data.Nat.Inequalities open import FOTC.Data.Nat.Inequalities.PropertiesATP open import FOTC.Data.Nat.Type ------------------------------------------------------------------------------ -- Basic properties &&-Bool : ∀ {a b} → Bool a → Bool b → Bool (a && b) &&-Bool {b = b} btrue Bb = prf where postulate prf : Bool (true && b) {-# ATP prove prf #-} &&-Bool {b = b} bfalse Bb = prf where postulate prf : Bool (false && b) {-# ATP prove prf #-} not-Bool : ∀ {b} → Bool b → Bool (not b) not-Bool btrue = prf where postulate prf : Bool (not true) {-# ATP prove prf #-} not-Bool bfalse = prf where postulate prf : Bool (not false) {-# ATP prove prf #-} &&-list₂-t : ∀ {a b} → Bool a → Bool b → a && b ≡ true → a ≡ true ∧ b ≡ true &&-list₂-t btrue btrue h = prf where postulate prf : true ≡ true ∧ true ≡ true {-# ATP prove prf #-} &&-list₂-t btrue bfalse h = prf where postulate prf : true ≡ true ∧ false ≡ true {-# ATP prove prf #-} &&-list₂-t bfalse btrue h = prf where postulate prf : false ≡ true ∧ true ≡ true {-# ATP prove prf #-} &&-list₂-t bfalse bfalse h = prf where postulate prf : false ≡ true ∧ false ≡ true {-# ATP prove prf #-} &&-list₂-t₁ : ∀ {a b} → Bool a → Bool b → a && b ≡ true → a ≡ true &&-list₂-t₁ {a} Ba Bb h = prf where postulate prf : a ≡ true {-# ATP prove prf &&-list₂-t #-} &&-list₂-t₂ : ∀ {a b} → Bool a → Bool b → a && b ≡ true → b ≡ true &&-list₂-t₂ {b = b} Ba Bb h = prf where postulate prf : b ≡ true {-# ATP prove prf &&-list₂-t #-} &&-list₄-t : ∀ {a b c d} → Bool a → Bool b → Bool c → Bool d → a && b && c && d ≡ true → a ≡ true ∧ b ≡ true ∧ c ≡ true ∧ d ≡ true &&-list₄-t btrue btrue btrue btrue h = prf where postulate prf : true ≡ true ∧ true ≡ true ∧ true ≡ true ∧ true ≡ true {-# ATP prove prf #-} &&-list₄-t btrue btrue btrue bfalse h = prf where postulate prf : true ≡ true ∧ true ≡ true ∧ true ≡ true ∧ false ≡ true {-# ATP prove prf #-} &&-list₄-t {d = d} btrue btrue bfalse Bd h = prf where postulate prf : true ≡ true ∧ true ≡ true ∧ false ≡ true ∧ d ≡ true {-# ATP prove prf #-} &&-list₄-t {c = c} {d} btrue bfalse Bc Bd h = prf where postulate prf : true ≡ true ∧ false ≡ true ∧ c ≡ true ∧ d ≡ true {-# ATP prove prf #-} &&-list₄-t {b = b} {c} {d} bfalse Bb Bc Bd h = prf where postulate prf : false ≡ true ∧ b ≡ true ∧ c ≡ true ∧ d ≡ true {-# ATP prove prf #-} &&-list₄-t₁ : ∀ {a b c d} → Bool a → Bool b → Bool c → Bool d → a && b && c && d ≡ true → a ≡ true &&-list₄-t₁ {a} Ba Bb Bc Bd h = prf where postulate prf : a ≡ true {-# ATP prove prf &&-list₄-t #-} &&-list₄-t₂ : ∀ {a b c d} → Bool a → Bool b → Bool c → Bool d → a && b && c && d ≡ true → b ≡ true &&-list₄-t₂ {b = b} Ba Bb Bc Bd h = prf where postulate prf : b ≡ true {-# ATP prove prf &&-list₄-t #-} &&-list₄-t₃ : ∀ {a b c d} → Bool a → Bool b → Bool c → Bool d → a && b && c && d ≡ true → c ≡ true &&-list₄-t₃ {c = c} Ba Bb Bc Bd h = prf where postulate prf : c ≡ true {-# ATP prove prf &&-list₄-t #-} &&-list₄-t₄ : ∀ {a b c d} → Bool a → Bool b → Bool c → Bool d → a && b && c && d ≡ true → d ≡ true &&-list₄-t₄ {d = d} Ba Bb Bc Bd h = prf where postulate prf : d ≡ true {-# ATP prove prf &&-list₄-t #-} x≢not-x : ∀ {b} → Bool b → b ≢ not b x≢not-x btrue h = prf where postulate prf : ⊥ {-# ATP prove prf #-} x≢not-x bfalse h = prf where postulate prf : ⊥ {-# ATP prove prf #-} not-x≢x : ∀ {b} → Bool b → not b ≢ b not-x≢x Bb h = prf where postulate prf : ⊥ {-# ATP prove prf x≢not-x #-} not-involutive : ∀ {b} → Bool b → not (not b) ≡ b not-involutive btrue = prf where postulate prf : not (not true) ≡ true {-# ATP prove prf #-} not-involutive bfalse = prf where postulate prf : not (not false) ≡ false {-# ATP prove prf #-} ------------------------------------------------------------------------------ -- Properties with inequalities lt-Bool : ∀ {m n} → N m → N n → Bool (lt m n) lt-Bool nzero nzero = prf where postulate prf : Bool (lt zero zero) {-# ATP prove prf #-} lt-Bool nzero (nsucc {n} Nn) = prf where postulate prf : Bool (lt zero (succ₁ n)) {-# ATP prove prf #-} lt-Bool (nsucc {m} Nm) nzero = prf where postulate prf : Bool (lt (succ₁ m) zero) {-# ATP prove prf #-} lt-Bool (nsucc {m} Nm) (nsucc {n} Nn) = prf (lt-Bool Nm Nn) where postulate prf : Bool (lt m n) → Bool (lt (succ₁ m) (succ₁ n)) {-# ATP prove prf #-} le-Bool : ∀ {m n} → N m → N n → Bool (le m n) le-Bool {n = n} nzero Nn = prf where postulate prf : Bool (le zero n) {-# ATP prove prf #-} le-Bool (nsucc {m} Nm) nzero = prf where postulate prf : Bool (le (succ₁ m) zero) {-# ATP prove prf Sx≰0 #-} le-Bool (nsucc {m} Nm) (nsucc {n} Nn) = prf (le-Bool Nm Nn) where postulate prf : Bool (le m n) → Bool (le (succ₁ m) (succ₁ n)) {-# ATP prove prf #-}
{ "alphanum_fraction": 0.5092424792, "avg_line_length": 36.3026315789, "ext": "agda", "hexsha": "2a565e744dd0e176a736a26fa8c090279785567b", "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": "src/fot/FOTC/Data/Bool/PropertiesATP.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": "src/fot/FOTC/Data/Bool/PropertiesATP.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": "src/fot/FOTC/Data/Bool/PropertiesATP.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": 1971, "size": 5518 }
{-# OPTIONS --safe #-} module Cubical.Algebra.CommSemiring.Base where open import Cubical.Foundations.Prelude open import Cubical.Foundations.SIP using (TypeWithStr) open import Cubical.Algebra.CommMonoid open import Cubical.Algebra.Monoid private variable ℓ ℓ' : Level record IsCommSemiring {R : Type ℓ} (0r 1r : R) (_+_ _·_ : R → R → R) : Type ℓ where field +IsCommMonoid : IsCommMonoid 0r _+_ ·IsCommMonoid : IsCommMonoid 1r _·_ ·LDist+ : (x y z : R) → x · (y + z) ≡ (x · y) + (x · z) AnnihilL : (x : R) → 0r · x ≡ 0r open IsCommMonoid +IsCommMonoid public renaming ( isSemigroup to +IsSemigroup ; isMonoid to +IsMonoid) open IsCommMonoid ·IsCommMonoid public renaming ( isSemigroup to ·IsSemigroup ; isMonoid to ·IsMonoid) hiding ( is-set ) -- We only want to export one proof of this record CommSemiringStr (A : Type ℓ) : Type (ℓ-suc ℓ) where field 0r : A 1r : A _+_ : A → A → A _·_ : A → A → A isCommSemiring : IsCommSemiring 0r 1r _+_ _·_ infixl 7 _·_ infixl 6 _+_ open IsCommSemiring isCommSemiring public CommSemiring : ∀ ℓ → Type (ℓ-suc ℓ) CommSemiring ℓ = TypeWithStr ℓ CommSemiringStr
{ "alphanum_fraction": 0.6221343874, "avg_line_length": 24.8039215686, "ext": "agda", "hexsha": "2a762b0ec1524572b63d54974d08771b5e83c7fa", "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/CommSemiring/Base.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/CommSemiring/Base.agda", "max_line_length": 66, "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/CommSemiring/Base.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 457, "size": 1265 }
{-# OPTIONS --without-K #-} open import Base open import Homotopy.Pushout module Homotopy.VanKampen {i} (d : pushout-diag i) where open pushout-diag d open import Homotopy.Truncation open import Homotopy.PathTruncation open import Homotopy.VanKampen.Guide module _ (l : legend i C) where open legend l open import Homotopy.VanKampen.Code d l open import Homotopy.VanKampen.CodeToPath d l private refl⇒code : ∀ p → code p p refl⇒code = pushout-rec (λ p → code p p) (λ _ → ⟧a refl₀) (λ _ → ⟧b refl₀) (loc-fiber-rec l (λ c → transport (λ p → code p p) (glue c) (⟧a refl₀) ≡ ⟧b refl₀) ⦃ λ _ → b-code-b-is-set _ _ _ _ ⦄ (λ n → transport (λ p → code p p) (glue $ loc n) (⟧a refl₀) ≡⟨ trans-diag code (glue $ loc n) $ ⟧a refl₀ ⟩ transport (λ p → code p (right $ g $ loc n)) (glue $ loc n) (transport (a-code (f $ loc n)) (glue $ loc n) (⟧a refl₀)) ≡⟨ ap (transport (λ p → code p (right $ g $ loc n)) (glue $ loc n)) $ trans-a-code-glue-loc n $ ⟧a refl₀ ⟩ transport (λ p → code p (right $ g $ loc n)) (glue $ loc n) (aa⇒ab n (⟧a refl₀)) ≡⟨ trans-glue-code-loc n {right $ g $ loc n} $ aa⇒ab n (⟧a refl₀) ⟩ ab⇒bb n (aa⇒ab n (⟧a refl₀)) ≡⟨ refl ⟩ ⟧b refl₀ bb⟦ n ⟧a refl₀ ba⟦ n ⟧b refl₀ ≡⟨ b-code-b-refl-refl _ _ ⟩∎ ⟧b refl₀ ∎)) path⇒code : ∀ {p₁} {p₂} (q : p₁ ≡₀ p₂) → code p₁ p₂ path⇒code {p₁} {p₂} = π₀-extend-nondep ⦃ code-is-set p₁ p₂ ⦄ (λ q → transport (code p₁) q (refl⇒code p₁)) private refl⇒code⇒path : ∀ p → code⇒path (refl⇒code p) ≡ refl₀ {a = p} refl⇒code⇒path = pushout-rec (λ p → code⇒path (refl⇒code p) ≡ refl₀) (λ _ → refl) (λ _ → refl) (λ _ → prop-has-all-paths (π₀-is-set _ _ _) _ _) path′⇒code⇒path : ∀ {p₁ p₂} (q : p₁ ≡ p₂) → code⇒path (path⇒code $ proj q) ≡ proj q path′⇒code⇒path refl = refl⇒code⇒path _ path⇒code⇒path : ∀ {p₁ p₂} (q : p₁ ≡₀ p₂) → code⇒path (path⇒code q) ≡ q path⇒code⇒path {p₁} {p₂} = π₀-extend ⦃ λ _ → ≡-is-set $ π₀-is-set (p₁ ≡ p₂) ⦄ (path′⇒code⇒path {p₁} {p₂}) private pgl : ∀ n → _≡₀_ {A = P} (left (f $ loc n)) (right (g $ loc n)) pgl n = proj (glue $ loc n) p!gl : ∀ n → _≡₀_ {A = P} (right (g $ loc n)) (left (f $ loc n)) p!gl n = proj (! (glue $ loc n)) ap₀l : ∀ {a₁ a₂} → a₁ ≡₀ a₂ → _≡₀_ {A = P} (left a₁) (left a₂) ap₀l p = ap₀ left p ap₀r : ∀ {b₁ b₂} → b₁ ≡₀ b₂ → _≡₀_ {A = P} (right b₁) (right b₂) ap₀r p = ap₀ right p private path⇒code-concat₀ : ∀ {p₁ p₂ p₃} (q : p₁ ≡₀ p₂) (r : p₂ ≡ p₃) → path⇒code (q ∘₀ proj r) ≡ transport (code p₁) r (path⇒code q) path⇒code-concat₀ q refl = ap path⇒code $ refl₀-right-unit q module _ {a₁} where ap⇒path⇒ap-split : (∀ {a₂} (co : a-code-a a₁ a₂) → path⇒code (aa⇒path co) ≡ co) × (∀ {b₂} (co : a-code-b a₁ b₂) → path⇒code (ab⇒path co) ≡ co) ap⇒path⇒ap-split = a-code-rec a₁ (λ {a₂} (co : a-code-a a₁ a₂) → path⇒code (aa⇒path co) ≡ co) ⦃ λ {a₂} _ → ≡-is-set $ a-code-a-is-set a₁ a₂ ⦄ (λ {b₂} (co : a-code-b a₁ b₂) → path⇒code (ab⇒path co) ≡ co) ⦃ λ {b₂} _ → ≡-is-set $ a-code-b-is-set a₁ b₂ ⦄ (λ {a₂} p → π₀-extend {P = λ p → path⇒code (aa⇒path $ ⟧a p) ≡ ⟧a p} ⦃ λ _ → ≡-is-set $ a-code-a-is-set a₁ a₂ ⦄ (λ p → let p′ = proj p in path⇒code (ap₀l p′) ≡⟨ refl ⟩ transport (a-code a₁) (ap left p) (path⇒code $ refl₀ {a = left a₁}) ≡⟨ trans-ap (a-code a₁) left p $ ⟧a refl₀ ⟩ transport (a-code-a a₁) p (⟧a refl₀) ≡⟨ trans-a-code-a p refl₀ ⟩∎ ⟧a proj p ∎) p) (λ {a₂} n {co} eq p → π₀-extend {P = λ p → path⇒code (aa⇒path $ co ab⟦ n ⟧a p) ≡ co ab⟦ n ⟧a p} ⦃ λ _ → ≡-is-set $ a-code-a-is-set a₁ a₂ ⦄ (λ p → let p′ = proj p in path⇒code ((ab⇒path co ∘₀ p!gl n) ∘₀ ap₀l p′) ≡⟨ path⇒code-concat₀ (ab⇒path co ∘₀ p!gl n) (ap left p) ⟩ transport (a-code a₁) (ap left p) (path⇒code (ab⇒path co ∘₀ p!gl n)) ≡⟨ trans-ap (a-code a₁) left p $ path⇒code $ ab⇒path co ∘₀ p!gl n ⟩ transport (a-code-a a₁) p (path⇒code (ab⇒path co ∘₀ p!gl n)) ≡⟨ ap (transport (a-code-a a₁) p) $ path⇒code-concat₀ (ab⇒path co) (! (glue $ loc n)) ⟩ transport (a-code-a a₁) p (transport (a-code a₁) (! (glue $ loc n)) $ path⇒code $ ab⇒path co) ≡⟨ ap (transport (a-code-a a₁) p ◯ transport (a-code a₁) (! (glue $ loc n))) eq ⟩ transport (a-code-a a₁) p (transport (a-code a₁) (! (glue $ loc n)) co) ≡⟨ ap (transport (a-code-a a₁) p) $ trans-a-code-!glue-loc n co ⟩ transport (a-code-a a₁) p (co ab⟦ n ⟧a refl₀) ≡⟨ trans-a-code-ba p n co refl₀ ⟩∎ co ab⟦ n ⟧a p′ ∎) p) (λ {b₂} n {co} eq p → π₀-extend {P = λ p → path⇒code (ab⇒path $ co aa⟦ n ⟧b p) ≡ co aa⟦ n ⟧b p} ⦃ λ _ → ≡-is-set $ a-code-b-is-set a₁ b₂ ⦄ (λ p → let p′ = proj p in path⇒code ((aa⇒path co ∘₀ pgl n) ∘₀ ap₀r p′) ≡⟨ path⇒code-concat₀ (aa⇒path co ∘₀ pgl n) (ap right p) ⟩ transport (a-code a₁) (ap right p) (path⇒code (aa⇒path co ∘₀ pgl n)) ≡⟨ trans-ap (a-code a₁) right p $ path⇒code $ aa⇒path co ∘₀ pgl n ⟩ transport (a-code-b a₁) p (path⇒code (aa⇒path co ∘₀ pgl n)) ≡⟨ ap (transport (a-code-b a₁) p) $ path⇒code-concat₀ (aa⇒path co) (glue $ loc n) ⟩ transport (a-code-b a₁) p (transport (a-code a₁) (glue $ loc n) $ path⇒code $ aa⇒path co) ≡⟨ ap (transport (a-code-b a₁) p ◯ transport (a-code a₁) (glue $ loc n)) eq ⟩ transport (a-code-b a₁) p (transport (a-code a₁) (glue $ loc n) co) ≡⟨ ap (transport (a-code-b a₁) p) $ trans-a-code-glue-loc n co ⟩ transport (a-code-b a₁) p (co aa⟦ n ⟧b refl₀) ≡⟨ trans-a-code-ab p n co refl₀ ⟩∎ co aa⟦ n ⟧b p′ ∎) p) (λ _ _ → prop-has-all-paths (a-code-a-is-set a₁ _ _ _) _ _) (λ _ _ → prop-has-all-paths (a-code-b-is-set a₁ _ _ _) _ _) (λ _ _ _ _ → prop-has-all-paths (a-code-a-is-set a₁ _ _ _) _ _) ap⇒path⇒ap : ∀ {p₂} (co : a-code a₁ p₂) → path⇒code {left a₁} {p₂} (ap⇒path co) ≡ co ap⇒path⇒ap {p₂} = pushout-rec (λ x → ∀ (co : a-code a₁ x) → path⇒code {left a₁} {x} (ap⇒path co) ≡ co) (λ _ → π₁ ap⇒path⇒ap-split) (λ _ → π₂ ap⇒path⇒ap-split) (λ _ → funext λ _ → prop-has-all-paths (a-code-b-is-set a₁ _ _ _) _ _) p₂ -- FIXME Duplicate code! -- Unless there's a way to handle type-conversion nicely -- (with definitional equality), I'd rather copy and paste. module _ {b₁} where bp⇒path⇒bp-split : (∀ {b₂} (co : b-code-b b₁ b₂) → path⇒code (bb⇒path co) ≡ co) × (∀ {a₂} (co : b-code-a b₁ a₂) → path⇒code (ba⇒path co) ≡ co) bp⇒path⇒bp-split = b-code-rec b₁ (λ {b₂} (co : b-code-b b₁ b₂) → path⇒code (bb⇒path co) ≡ co) ⦃ λ {b₂} _ → ≡-is-set $ b-code-b-is-set b₁ b₂ ⦄ (λ {a₂} (co : b-code-a b₁ a₂) → path⇒code (ba⇒path co) ≡ co) ⦃ λ {a₂} _ → ≡-is-set $ b-code-a-is-set b₁ a₂ ⦄ (λ {b₂} p → π₀-extend {P = λ p → path⇒code (bb⇒path $ ⟧b p) ≡ ⟧b p} ⦃ λ _ → ≡-is-set $ b-code-b-is-set b₁ b₂ ⦄ (λ p → let p′ = proj p in path⇒code (ap₀r p′) ≡⟨ refl ⟩ transport (b-code b₁) (ap right p) (path⇒code $ refl₀ {a = right b₁}) ≡⟨ trans-ap (b-code b₁) right p $ ⟧b refl₀ ⟩ transport (b-code-b b₁) p (⟧b refl₀) ≡⟨ trans-b-code-b p refl₀ ⟩∎ ⟧b proj p ∎) p) (λ {b₂} n {co} eq p → π₀-extend {P = λ p → path⇒code (bb⇒path $ co ba⟦ n ⟧b p) ≡ co ba⟦ n ⟧b p} ⦃ λ _ → ≡-is-set $ b-code-b-is-set b₁ b₂ ⦄ (λ p → let p′ = proj p in path⇒code ((ba⇒path co ∘₀ pgl n) ∘₀ ap₀r p′) ≡⟨ path⇒code-concat₀ (ba⇒path co ∘₀ pgl n) (ap right p) ⟩ transport (b-code b₁) (ap right p) (path⇒code (ba⇒path co ∘₀ pgl n)) ≡⟨ trans-ap (b-code b₁) right p $ path⇒code $ ba⇒path co ∘₀ pgl n ⟩ transport (b-code-b b₁) p (path⇒code (ba⇒path co ∘₀ pgl n)) ≡⟨ ap (transport (b-code-b b₁) p) $ path⇒code-concat₀ (ba⇒path co) (glue $ loc n) ⟩ transport (b-code-b b₁) p (transport (b-code b₁) (glue $ loc n) $ path⇒code $ ba⇒path co) ≡⟨ ap (transport (b-code-b b₁) p ◯ transport (b-code b₁) (glue $ loc n)) eq ⟩ transport (b-code-b b₁) p (transport (b-code b₁) (glue $ loc n) co) ≡⟨ ap (transport (b-code-b b₁) p) $ trans-b-code-glue-loc n co ⟩ transport (b-code-b b₁) p (co ba⟦ n ⟧b refl₀) ≡⟨ trans-b-code-ab p n co refl₀ ⟩∎ co ba⟦ n ⟧b p′ ∎) p) (λ {a₂} n {co} eq p → π₀-extend {P = λ p → path⇒code (ba⇒path $ co bb⟦ n ⟧a p) ≡ co bb⟦ n ⟧a p} ⦃ λ _ → ≡-is-set $ b-code-a-is-set b₁ a₂ ⦄ (λ p → let p′ = proj p in path⇒code ((bb⇒path co ∘₀ p!gl n) ∘₀ ap₀l p′) ≡⟨ path⇒code-concat₀ (bb⇒path co ∘₀ p!gl n) (ap left p) ⟩ transport (b-code b₁) (ap left p) (path⇒code (bb⇒path co ∘₀ p!gl n)) ≡⟨ trans-ap (b-code b₁) left p $ path⇒code $ bb⇒path co ∘₀ p!gl n ⟩ transport (b-code-a b₁) p (path⇒code (bb⇒path co ∘₀ p!gl n)) ≡⟨ ap (transport (b-code-a b₁) p) $ path⇒code-concat₀ (bb⇒path co) (! (glue $ loc n)) ⟩ transport (b-code-a b₁) p (transport (b-code b₁) (! (glue $ loc n)) $ path⇒code $ bb⇒path co) ≡⟨ ap (transport (b-code-a b₁) p ◯ transport (b-code b₁) (! (glue $ loc n))) eq ⟩ transport (b-code-a b₁) p (transport (b-code b₁) (! (glue $ loc n)) co) ≡⟨ ap (transport (b-code-a b₁) p) $ trans-b-code-!glue-loc n co ⟩ transport (b-code-a b₁) p (co bb⟦ n ⟧a refl₀) ≡⟨ trans-b-code-ba p n co refl₀ ⟩∎ co bb⟦ n ⟧a p′ ∎) p) (λ _ _ → prop-has-all-paths (b-code-b-is-set b₁ _ _ _) _ _) (λ _ _ → prop-has-all-paths (b-code-a-is-set b₁ _ _ _) _ _) (λ _ _ _ _ → prop-has-all-paths (b-code-b-is-set b₁ _ _ _) _ _) bp⇒path⇒bp : ∀ {p₂} (co : b-code b₁ p₂) → path⇒code {right b₁} {p₂} (bp⇒path co) ≡ co bp⇒path⇒bp {p₂} = pushout-rec (λ x → ∀ (co : b-code b₁ x) → path⇒code {right b₁} {x} (bp⇒path co) ≡ co) (λ _ → π₂ bp⇒path⇒bp-split) (λ _ → π₁ bp⇒path⇒bp-split) (λ _ → funext λ _ → prop-has-all-paths (b-code-b-is-set b₁ _ _ _) _ _) p₂ code⇒path⇒code : ∀ {p₁ p₂} (co : code p₁ p₂) → path⇒code {p₁} {p₂} (code⇒path co) ≡ co code⇒path⇒code {p₁} {p₂} = pushout-rec (λ p₁ → ∀ (co : code p₁ p₂) → path⇒code {p₁} {p₂} (code⇒path co) ≡ co) (λ a₁ → ap⇒path⇒ap {a₁} {p₂}) (λ b₁ → bp⇒path⇒bp {b₁} {p₂}) (λ c → funext λ co → prop-has-all-paths (b-code-is-set (g c) p₂ _ co) _ _) p₁ van-kampen : ∀ {p₁ p₂} → (p₁ ≡₀ p₂) ≡ code p₁ p₂ van-kampen {p₁} {p₂} = eq-to-path $ path⇒code {p₁} {p₂} , iso-is-eq (path⇒code {p₁} {p₂}) (code⇒path {p₁} {p₂}) (code⇒path⇒code {p₁} {p₂}) (path⇒code⇒path {p₁} {p₂}) module _ where open import Homotopy.VanKampen.Code d (id-legend C) naive-van-kampen : ∀ {p₁ p₂} → (p₁ ≡₀ p₂) ≡ code p₁ p₂ naive-van-kampen = van-kampen (id-legend C)
{ "alphanum_fraction": 0.4845203857, "avg_line_length": 46.7272727273, "ext": "agda", "hexsha": "44f69e41d9855f697c69110499fbfb441df70fef", "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": "939a2d83e090fcc924f69f7dfa5b65b3b79fe633", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "nicolaikraus/HoTT-Agda", "max_forks_repo_path": "old/Homotopy/VanKampen.agda", "max_issues_count": 31, "max_issues_repo_head_hexsha": "939a2d83e090fcc924f69f7dfa5b65b3b79fe633", "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": "nicolaikraus/HoTT-Agda", "max_issues_repo_path": "old/Homotopy/VanKampen.agda", "max_line_length": 97, "max_stars_count": 294, "max_stars_repo_head_hexsha": "66f800adef943afdf08c17b8ecfba67340fead5e", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "timjb/HoTT-Agda", "max_stars_repo_path": "old/Homotopy/VanKampen.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": 5150, "size": 11822 }
{- This second-order equational theory was created from the following second-order syntax description: syntax Inception | IA type L : 0-ary P : 0-ary A : 0-ary term rec : L P -> A inc : L.A P.A -> A theory (S) p : P a : P.A |> inc (l. rec (l, p[]), x. a[x]) = a[p[]] (E) a : L.A |> k : L |- inc (l. a[l], x. rec(k, x)) = a[k] (W) m : A a : P.A |> inc (l. m[], x. a[x]) = m[] (A) p : (L,L).A a : (L,P).A b : P.A |> inc (l. inc (k. p[l, k], x. a[l,x]), y. b[y]) = inc (k. inc(l. p[l,k], y.b[y]), x. inc(l. a[l,x], y.b[y])) -} module Inception.Equality where open import SOAS.Common open import SOAS.Context open import SOAS.Variable open import SOAS.Families.Core open import SOAS.Families.Build open import SOAS.ContextMaps.Inductive open import Inception.Signature open import Inception.Syntax open import SOAS.Metatheory.SecondOrder.Metasubstitution IA:Syn open import SOAS.Metatheory.SecondOrder.Equality IA:Syn private variable α β γ τ : IAT Γ Δ Π : Ctx infix 1 _▹_⊢_≋ₐ_ -- Axioms of equality data _▹_⊢_≋ₐ_ : ∀ 𝔐 Γ {α} → (𝔐 ▷ IA) α Γ → (𝔐 ▷ IA) α Γ → Set where S : ⁅ P ⁆ ⁅ P ⊩ A ⁆̣ ▹ ∅ ⊢ inc (rec x₀ 𝔞) (𝔟⟨ x₀ ⟩) ≋ₐ 𝔟⟨ 𝔞 ⟩ E : ⁅ L ⊩ A ⁆̣ ▹ ⌊ L ⌋ ⊢ inc (𝔞⟨ x₀ ⟩) (rec x₁ x₀) ≋ₐ 𝔞⟨ x₀ ⟩ W : ⁅ A ⁆ ⁅ P ⊩ A ⁆̣ ▹ ∅ ⊢ inc 𝔞 (𝔟⟨ x₀ ⟩) ≋ₐ 𝔞 A : ⁅ L · L ⊩ A ⁆ ⁅ L · P ⊩ A ⁆ ⁅ P ⊩ A ⁆̣ ▹ ∅ ⊢ inc (inc (𝔞⟨ x₁ ◂ x₀ ⟩) (𝔟⟨ x₁ ◂ x₀ ⟩)) (𝔠⟨ x₀ ⟩) ≋ₐ inc (inc (𝔞⟨ x₀ ◂ x₁ ⟩) (𝔠⟨ x₀ ⟩)) (inc (𝔟⟨ x₀ ◂ x₁ ⟩) (𝔠⟨ x₀ ⟩)) open EqLogic _▹_⊢_≋ₐ_ open ≋-Reasoning
{ "alphanum_fraction": 0.5232258065, "avg_line_length": 28.1818181818, "ext": "agda", "hexsha": "b76c9357d77b44597aa1b1a297bc8cb86ddda14d", "lang": "Agda", "max_forks_count": 4, "max_forks_repo_forks_event_max_datetime": "2022-01-24T12:49:17.000Z", "max_forks_repo_forks_event_min_datetime": "2021-11-09T20:39:59.000Z", "max_forks_repo_head_hexsha": "ff1a985a6be9b780d3ba2beff68e902394f0a9d8", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "JoeyEremondi/agda-soas", "max_forks_repo_path": "out/Inception/Equality.agda", "max_issues_count": 1, "max_issues_repo_head_hexsha": "ff1a985a6be9b780d3ba2beff68e902394f0a9d8", "max_issues_repo_issues_event_max_datetime": "2021-11-21T12:19:32.000Z", "max_issues_repo_issues_event_min_datetime": "2021-11-21T12:19:32.000Z", "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "JoeyEremondi/agda-soas", "max_issues_repo_path": "out/Inception/Equality.agda", "max_line_length": 163, "max_stars_count": 39, "max_stars_repo_head_hexsha": "ff1a985a6be9b780d3ba2beff68e902394f0a9d8", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "JoeyEremondi/agda-soas", "max_stars_repo_path": "out/Inception/Equality.agda", "max_stars_repo_stars_event_max_datetime": "2022-03-19T17:33:12.000Z", "max_stars_repo_stars_event_min_datetime": "2021-11-09T20:39:55.000Z", "num_tokens": 788, "size": 1550 }
{-# OPTIONS --cubical --no-import-sorts #-} module MoreLogic.Properties where -- hProp logic open import Agda.Primitive renaming (_⊔_ to ℓ-max; lsuc to ℓ-suc; lzero to ℓ-zero) private variable ℓ ℓ' ℓ'' : Level open import Cubical.Foundations.Everything renaming (_⁻¹ to _⁻¹ᵖ; assoc to ∙-assoc) open import Cubical.Data.Sigma renaming (_×_ to infixr 4 _×_) open import Cubical.Data.Sum.Base renaming (_⊎_ to infixr 4 _⊎_) open import Function.Base using (_∋_) open import Cubical.Relation.Nullary.Base renaming (¬_ to ¬ᵗ_) open import Cubical.Foundations.Logic renaming (inl to inlᵖ; inr to inrᵖ) open import Cubical.Data.Empty renaming (elim to ⊥-elim) renaming (⊥ to ⊥⊥) -- `⊥` and `elim` open import Cubical.HITs.PropositionalTruncation.Base -- ∣_∣ import Cubical.Data.Empty as Empty open import Cubical.Data.Unit.Base open import Utils -- lifted versions of ⊥ and ⊤ open import MoreLogic.Reasoning open import MoreLogic.Definitions isProp⊤ : isProp [ ⊤ ] isProp⊤ tt tt = refl symₚ : ∀{ℓ} → {A : Type ℓ} {x y : A} → [ x ≡ₚ y ] → [ y ≡ₚ x ] symₚ {x = x} x≡y = substₚ (λ p → p ≡ₚ x) x≡y ∣ refl ∣ ⊔-identityˡ-↑ : (P : hProp ℓ) → ⊥↑ {ℓ} ⊔ P ≡ P ⊔-identityˡ-↑ P = ⇒∶ (⊔-elim ⊥↑ P (λ _ → P) (λ ()) (λ x → x)) ⇐∶ inrᵖ ⊔-identityʳ-↑ : (P : hProp ℓ) → P ⊔ ⊥↑ {ℓ} ≡ P ⊔-identityʳ-↑ P = ⇔toPath (⊔-elim P ⊥↑ (λ _ → P) (λ x → x) λ ()) inlᵖ ⊓-identityˡ-↑ : (P : hProp ℓ) → ⊤↑ {ℓ} ⊓ P ≡ P ⊓-identityˡ-↑ _ = ⇔toPath snd λ x → lift tt , x ⊓-identityʳ-↑ : (P : hProp ℓ) → P ⊓ ⊤↑ {ℓ} ≡ P ⊓-identityʳ-↑ _ = ⇔toPath fst λ x → x , lift tt ¬↑≡¬ : ∀{ℓ} → {P : hProp ℓ} → (¬↑ P) ≡ (¬ P) ¬↑≡¬ = ⇒∶ (λ ¬↑P P → lower (¬↑P P)) ⇐∶ (λ ¬P P → lift ( ¬P P)) ¬¬-introᵗ : (P : Type ℓ) → P → ¬ᵗ ¬ᵗ P ¬¬-introᵗ _ p ¬p = ¬p p ¬¬-elimᵗ : (P : Type ℓ) → ¬ᵗ ¬ᵗ ¬ᵗ P → ¬ᵗ P ¬¬-elimᵗ _ ¬¬¬p p = ¬¬¬p (λ ¬p → ¬p p) ¬¬-intro : (P : hProp ℓ) → [ P ] → [ ¬ ¬ P ] ¬¬-intro _ p ¬p = ¬p p ¬¬-elim : (P : hProp ℓ) → [ ¬ ¬ ¬ P ] → [ ¬ P ] ¬¬-elim _ ¬¬¬p p = ¬¬¬p (λ ¬p → ¬p p) ¬¬-involutive : (P : hProp ℓ) → [ ¬ ¬ ¬ P ⇔ ¬ P ] ¬¬-involutive P .fst = ¬¬-elim P ¬¬-involutive P .snd = ¬¬-intro (¬ P) ⇔toPath' : ∀{ℓ} {P Q : hProp ℓ} → [ P ⇔ Q ] → P ≡ Q ⇔toPath' = uncurry ⇔toPath pathTo⇔ : ∀{ℓ} {P Q : hProp ℓ} → P ≡ Q → [ P ⇔ Q ] pathTo⇔ p≡q = (pathTo⇒ p≡q , pathTo⇐ p≡q) ⊓⇔⊓ : ∀{ℓ ℓ' ℓ'' ℓ'''} {P : hProp ℓ} {Q : hProp ℓ'} {R : hProp ℓ''} {S : hProp ℓ'''} → [ (P ⇔ R) ⊓ (Q ⇔ S) ] → [ (P ⊓ Q) ⇔ (R ⊓ S) ] ⊓⇔⊓ (p⇔r , q⇔s) .fst (p , q) = p⇔r .fst p , q⇔s .fst q ⊓⇔⊓ (p⇔r , q⇔s) .snd (r , s) = p⇔r .snd r , q⇔s .snd s ⊓≡⊓ : ∀{ℓ} {P Q R S : hProp ℓ} → P ≡ R → Q ≡ S → (P ⊓ Q) ≡ (R ⊓ S) ⊓≡⊓ p≡r q≡s i = p≡r i ⊓ q≡s i [path]To⇒ : (P Q : hProp ℓ) → [ P ] ≡ [ Q ] → [ P ⇒ Q ] [path]To⇒ P Q [P]≡[Q] p = transport [P]≡[Q] p [path]To⇐ : (P Q : hProp ℓ) → [ P ] ≡ [ Q ] → [ Q ⇒ P ] [path]To⇐ P Q [P]≡[Q] q = transport (sym [P]≡[Q]) q ¬¬-involutiveᵗ : (A : Type ℓ) → (¬ᵗ ¬ᵗ ¬ᵗ A) ≡ (¬ᵗ A) abstract ¬¬-involutiveᵗ A = isoToPath λ where .Iso.fun ¬¬¬a a → ¬¬¬a (λ ¬a → ¬a a) .Iso.inv ¬a ¬¬a → ¬¬a ¬a .Iso.rightInv ¬a → refl -- the following proof is `... ≡ ¬¬¬a` and uses funext to reduce this to a proof `∀ x → ... x ≡ ¬¬¬a x` -- but this does not matter, since we have `¬¬¬a x` which is `⊥` and then we can use ⊥-elim to obtain whatever is necessary -- `⊥-elim` needed a detailed hint what to produce and this might not be the most elegant way to proof this .Iso.leftInv ¬¬¬a → funExt {A = (¬ᵗ ¬ᵗ A)} {B = λ _ i → ⊥⊥} {f = (λ ¬¬a → ¬¬a (λ a → ¬¬¬a (λ ¬a → ¬a a)))} {g = ¬¬¬a} (λ x → ⊥-elim {A = λ _ → (x (λ a → ¬¬¬a (λ ¬a → ¬a a)) ≡ ¬¬¬a x)} (¬¬¬a x)) -- taken from https://ncatlab.org/nlab/show/excluded+middle#DoubleNegatedPEM -- Double-negated PEM weak-LEM : ∀(P : hProp ℓ) → [ ¬ ¬ (P ⊔ ¬ P) ] weak-LEM _ ¬[p⊔¬p] = ¬[p⊔¬p] (inrᵖ (λ p → ¬[p⊔¬p] (inlᵖ p))) weak-LEMᵗ : ∀(P : Type ℓ) → ¬ᵗ ¬ᵗ (P ⊎ (¬ᵗ P)) weak-LEMᵗ _ ¬[p⊔¬p] = ¬[p⊔¬p] (inr (λ p → ¬[p⊔¬p] (inl p))) ⊤-introᵖ : {P : hProp ℓ} → [ P ] → P ≡ ⊤↑ ⊤-introᵖ {ℓ = ℓ} {P = P} p = let P⇔⊤↑ : [ P ⇔ ⊤↑ {ℓ} ] P⇔⊤↑ = (λ _ → lift tt) , (λ _ → p) in ⇔toPath (fst P⇔⊤↑) (snd P⇔⊤↑) ⊤-elimᵖ : {P : hProp ℓ} → P ≡ ⊤↑ → [ P ] ⊤-elimᵖ {ℓ = ℓ} {P = P} p≡⊤ = ( [ ⊤↑ {ℓ} ] ⇒⟨ transport ( λ i → [ p≡⊤ (~ i) ]) ⟩ [ P ] ◼) (lift tt) contraposition : (P : hProp ℓ) (Q : hProp ℓ') → [ P ⇒ Q ] → [ ¬ Q ⇒ ¬ P ] contraposition P Q f ¬q p = ⊥-elim (¬q (f p)) instance≡ : ∀{ℓ ℓ'} {A : Type ℓ} {B : A → Type ℓ'} → ({{x : A}} → B x) ≡ ((x : A) → B x) instance≡ = isoToPath (iso (λ f a → f {{a}}) (λ f {{a}} → f a) (λ f i → f) (λ f i → f)) implicit≡ : ∀{ℓ ℓ'} {A : Type ℓ} {B : A → Type ℓ'} → ({x : A} → B x) ≡ ((x : A) → B x) implicit≡ = isoToPath (iso (λ f a → f {a}) (λ f {a} → f a) (λ f i → f) (λ f i → f)) instanceFunExt : {A : Type ℓ} {B : A → I → Type ℓ'} {f : {{x : A}} → B x i0} {g : {{x : A}} → B x i1} → ({{x : A}} → PathP (B x) (f {{x}}) (g {{x}})) → PathP (λ i → {{x : A}} → B x i) f g instanceFunExt p i {{x}} = p {{x}} i funExt-⊥ : {A : Type ℓ} (f g : A → Empty.⊥) → f ≡ g funExt-⊥ f g = funExt (λ x → ⊥-elim {A = λ _ → f x ≡ g x} (f x)) -- ⊥-elim needed a hint here -- uncurry-preserves-≡ -- : {A : Type ℓ} {B : A → Type ℓ'} {C : (a : A) → B a → Type ℓ''} -- → (f : (a : A) → (b : B a) → C a b) -- ------------------------------------------------------------- -- → ∀ a b → f a b ≡ (uncurry f) (a , b) -- uncurry-preserves-≡ f a b = refl Σ-preserves-≡ : {A : Type ℓ} {B : A → Type ℓ'} {C : (a : A) → (b : B a) → Type ℓ''} {f g : ((a , b) : Σ A B) → C a b} → ((a : A) (b : B a) → (f (a , b)) ≡ (g (a , b))) → ((ab : Σ A B) → (f ab ) ≡ (g (ab) )) Σ-preserves-≡ p (a , b) = p a b Σ-reflects-≡ : {A : Type ℓ} {B : A → Type ℓ'} {a b : Σ A B} → a ≡ b → Σ[ p ∈ (fst a ≡ fst b) ] transport (λ i → B (p i)) (snd a) ≡ snd b -- Σ[ q ∈ (fst a ≡ fst b) ] (PathP (λ i → B (q i)) (snd a) (snd b)) Σ-reflects-≡ a≡b with PathΣ→ΣPathTransport _ _ a≡b ... | fst≡fst , snd≡snd = fst≡fst , snd≡snd uncurry-reflects-≡ : {A : Type ℓ} {B : A → Type ℓ'} {C : (a : A) → B a → Type ℓ''} → (f g : (a : A) → (b : B a) → C a b) ------------------------------------------------------------- → (uncurry f ≡ uncurry g) → f ≡ g uncurry-reflects-≡ f g p = funExt (λ x → f x ≡⟨ refl ⟩ (λ y → (uncurry f) (x , y)) ≡⟨ ( λ i → λ y → (p i) (x , y)) ⟩ (λ y → (uncurry g) (x , y)) ≡⟨ refl ⟩ g x ∎) -- "constant" version of funExt funExt₂ᶜ : {A : Type ℓ} {B : A → Type ℓ'} {C : (a : A) → (b : B a) → Type ℓ''} {f g : (a : A) → (b : B a) → C a b} → ((a : A) → (b : B a) → (f a b) ≡ (g a b)) → f ≡ g funExt₂ᶜ {A = A} {B = B} {C = C} {f = f} {g = g} = ( ((a : A) (b : B a) → ( f a b) ≡ ( g a b) ) ⇒⟨ (λ z → z) ⟩ -- holds definitionally ((a : A) (b : B a) → ((uncurry f) (a , b)) ≡ ((uncurry g) (a , b))) ⇒⟨ Σ-preserves-≡ ⟩ ((ab : Σ A B) → ((uncurry f) ab ) ≡ ((uncurry g) ( ab ))) ⇒⟨ funExt ⟩ (uncurry f) ≡ (uncurry g) ⇒⟨ uncurry-reflects-≡ f g ⟩ f ≡ g ◼) funExt-⊥₂ : {A B : Type ℓ} (f g : A → B → Empty.⊥) → f ≡ g funExt-⊥₂ f g = funExt₂ᶜ λ a b → ⊥-elim {A = λ _ → f a b ≡ g a b} (g a b) -- weak deMorgan laws: only these three hold without further assumptions deMorgan₂ : (P : hProp ℓ) (Q : hProp ℓ') → [ ¬ (P ⊔ Q) ] → [ ¬ P ⊓ ¬ Q ] abstract deMorgan₂ P Q ¬[p⊔q] = (λ p → ⊥-elim (¬[p⊔q] (inlᵖ p))) , λ q → ⊥-elim (¬[p⊔q] (inrᵖ q)) deMorgan₂-back : (P : hProp ℓ) (Q : hProp ℓ') → [ ¬ P ⊓ ¬ Q ] → [ ¬ (P ⊔ Q) ] abstract deMorgan₂-back P Q (¬p , ¬q) p⊔q = ⊔-elim P Q (λ p⊔q → ⊥) ¬p ¬q p⊔q deMorgan₁-back : (P : hProp ℓ) (Q : hProp ℓ') → [ ¬ P ⊔ ¬ Q ] → [ ¬ (P ⊓ Q) ] abstract deMorgan₁-back {ℓ = ℓ} P Q [¬p⊔¬q] (p , q) = ⊔-elim (¬ P) (¬ Q) (λ [¬p⊔¬q] → ⊥) (λ ¬p → ¬p p) (λ ¬q → ¬q q) [¬p⊔¬q] ¬-⊓-distrib : (P : hProp ℓ) (Q : hProp ℓ') → [ ¬ (P ⊓ Q) ] → [ (P ⇒ ¬ Q) ⊓ (Q ⇒ ¬ P) ] ¬-⊓-distrib P Q ¬p⊓q = (λ p q → ¬p⊓q (p , q)) , (λ q p → ¬p⊓q (p , q)) implication : (P : hProp ℓ) (Q : hProp ℓ') → [ ¬ (P ⊓ Q) ] → [ P ⇒ ¬ Q ] implication {ℓ = ℓ} P Q ¬[p⊓q] p q = ⊥-elim (¬[p⊓q] (p , q)) uncurryₚ : ∀{ℓ ℓ' ℓ''} (P : hProp ℓ) (Q : hProp ℓ')(R : hProp ℓ'') → (f : [ P ] → [ Q ] → [ R ]) → [ P ⊓ Q ] → [ R ] uncurryₚ P Q R f = uncurry f ⊓¬¬⇒¬¬⊓ : ∀{ℓ ℓ'} (P : hProp ℓ) (Q : hProp ℓ') → [ ¬ ¬ P ] → [ ¬ ¬ Q ] → [ ¬ ¬ (P ⊓ Q) ] ⊓¬¬⇒¬¬⊓ P Q ¬¬p ¬¬q = contraposition (¬ (P ⊓ Q)) (P ⇒ ¬ Q) (implication P Q) λ p⇒¬q → ¬¬p (contraposition P (¬ Q) p⇒¬q ¬¬q) -- Q and P are disjoint if P ⇒ ¬ Q or equivalently Q ⇒ ¬ P abstract -- we have that (P ⇒ ¬ Q) ≡ (Q ⇒ ¬ P) -- normalizes to (P ⇒ Q ⇒ ⊥) ≡ (Q ⇒ P ⇒ ⊥) -- which is just flipping of the arguments [P⇒¬Q]≡[Q⇒¬P] : ∀{ℓ ℓ'} (P : hProp ℓ) (Q : hProp ℓ') → (P ⇒ ¬ Q) ≡ (Q ⇒ ¬ P) [P⇒¬Q]≡[Q⇒¬P] P Q = ⇒∶ flip ⇐∶ flip -- ⇒∶ (λ p⇒¬q q p → p⇒¬q p q) -- ⇐∶ (λ q⇒¬p p q → q⇒¬p q p) [P⇒¬Q]⇒[Q⇒¬P] : ∀{ℓ ℓ'} (P : hProp ℓ) (Q : hProp ℓ') → [ (P ⇒ ¬ Q) ] → [ (Q ⇒ ¬ P) ] [P⇒¬Q]⇒[Q⇒¬P] P Q = flip -- pathTo⇒ ([P⇒¬Q]≡[Q⇒¬P] P Q) [P⇒¬Q]≡¬[P⊓Q] : ∀{ℓ ℓ'} (P : hProp ℓ) (Q : hProp ℓ') → (P ⇒ ¬ Q) ≡ ¬ (P ⊓ Q) [P⇒¬Q]≡¬[P⊓Q] P Q = ⇒∶ uncurry ⇐∶ curry -- ⇒∶ (λ{ p⇒¬q (p , q) → p⇒¬q p q }) -- ⇐∶ (λ ¬[p⊓q] p q → ¬[p⊓q] (p , q) ) -- [¬P⇒Q]⇒[¬Q⇒¬¬P] -- [¬P⇒¬¬Q]≡[¬Q⇒¬¬P] -- ≡¬[¬P⊓¬Q] -- ≡¬¬[P⊔Q] -- [¬P≡Q]⇒¬[P⊓Q]≡¬[P⊓¬P] ¬[P⊓¬P] : ∀{ℓ} (P : hProp ℓ) → [ ¬ (P ⊓ ¬ P) ] ¬[P⊓¬P] P (p , ¬p) = ¬p p -- NOTE: I think that we do not have ¬ P ≡ ¬ Q → P ≡ Q -- since this might be equivalent to some LEM ? -- ¬-reflects-≡ : ∀{ℓ} (P Q : hProp ℓ) → ¬ P ≡ ¬ Q → P ≡ Q -- ¬-reflects-≡ P Q ¬p≡¬q with Σ-reflects-≡ ¬p≡¬q -- ... | fst≡fst , snd≡snd = ΣPathP ({! !} , {! !}) -- -- -- (∀ x → P x ≡ P y) → x ≡ y -- -- postulate dne : ∀{ℓ} (P : hProp ℓ) → ¬ ¬ P ≡ P -- -- ¬-isEquiv : ∀ ℓ → isEquiv (¬_ {ℓ = ℓ}) -- ¬-isEquiv ℓ = λ where -- .equiv-proof P → ((¬ P) , dne P) , λ{ (Q , ¬Q≡P) → -- let γ = {! isPropIsProp (isProp[] Q) (isProp[] Q) !} -- in {! !} } -- fst (fst (equiv-proof (¬-isEquiv ℓ) P)) = ¬ P -- snd (fst (equiv-proof (¬-isEquiv ℓ) P)) = dne P -- snd (equiv-proof (¬-isEquiv ℓ) P) (Q , ¬Q≡P) = {! !} -- ¬[P⊓¬P]≡¬[P⊓Q]⇒[¬P≡Q] : ∀{ℓ } (P Q : hProp ℓ) → [ ¬ (P ⊓ ¬ P) ] ≡ [ ¬ (P ⊓ Q) ] → [ P ] ≡ [ ¬ Q ] -- ¬[P⊓¬P]≡¬[P⊓Q]⇒[¬P≡Q] P Q p = {! [P⇒¬Q]≡¬[P⊓Q] P Q !} -- -- ¬[P⊓¬P]≡¬[P⊓Q]≡[P⇒¬Q]≡[P⇒¬¬P] -- foo : ∀{ℓ ℓ'} (P : hProp ℓ) (Q : hProp ℓ') → [ (P ⇒ ¬ Q) ] → [ (¬ Q ⇒ P) ] → P ≡ ¬ Q -- bar : ∀{ℓ} (P Q : hProp ℓ) → [ ¬ (P ⊓ Q) ] → P ≡ ¬ Q -- -- ¬-⊓-distrib P Q ¬p⊓q -- bar P Q ¬p⊓q = let r1 : [ (P ⇒ ¬ Q) ⊓ (Q ⇒ ¬ P) ] -- r1 = -- r2 : [ (Q ⇒ ¬ P) ⊓ (P ⇒ ¬ Q) ] -- r2 = -- in {! ¬-⊓-distrib Q P (transport (λ i → [ ¬ ⊓-comm P Q i ]) ¬p⊓q) !} -- more logic ⊓-⊔-distribʳ : (P : hProp ℓ) (Q : hProp ℓ')(R : hProp ℓ'') → (Q ⊔ R) ⊓ P ≡ (Q ⊓ P) ⊔ (R ⊓ P) ⊓-⊔-distribʳ P Q R = ( (Q ⊔ R) ⊓ P ≡⟨ ⊓-comm _ _ ⟩ P ⊓ (Q ⊔ R) ≡⟨ ⊓-⊔-distribˡ P Q R ⟩ (P ⊓ Q) ⊔ (P ⊓ R) ≡⟨ ( λ i → ⊓-comm P Q i ⊔ ⊓-comm P R i) ⟩ (Q ⊓ P) ⊔ (R ⊓ P) ∎) -- NOTE: this is in the standard library -- ⊓-∀-distrib : (P : A → hProp ℓ) (Q : A → hProp ℓ') -- → (∀[ a ∶ A ] P a) ⊓ (∀[ a ∶ A ] Q a) ≡ (∀[ a ∶ A ] (P a ⊓ Q a)) -- ⊓-∀-distrib P Q = -- ⇒∶ (λ {(p , q) a → p a , q a}) -- ⇐∶ λ pq → (fst ∘ pq ) , (snd ∘ pq) -- well, we do not have `∀-⊔-distrib` -- ∀-⊔-distrib : ∀{ℓ ℓ' ℓ''} {A : Type ℓ} → (P : A → hProp ℓ') → (Q : A → hProp ℓ'') -- → ((∀[ x ∶ A ] P x) ⊔ (∀[ x ∶ A ] Q x)) ≡ (∀[ x ∶ A ] (P x ⊔ Q x)) -- ∀-⊔-distrib {A = A} P Q = -- ⇒∶ (λ [∀xPx]⊔[∀xQx] x → ⊔-elim (∀[ x ] P x) (∀[ x ] Q x) (λ _ → P x ⊔ Q x) (λ ∀xPx → inlᵖ (∀xPx x)) (λ ∀xQx → inrᵖ (∀xQx x)) [∀xPx]⊔[∀xQx]) -- ⇐∶ λ ∀x[Px⊔Qx] → {! !} -- ∀-⊔-distribʳ : ∀{ℓ ℓ' ℓ''} {A : Type ℓ} → (P : hProp ℓ') → (Q : A → hProp ℓ'') -- → (P ⊔ (∀[ x ∶ A ] Q x)) ≡ (∀[ x ∶ A ] (P ⊔ Q x)) -- ∀-⊔-distribʳ {A = A} P Q = -- ⇒∶ (λ [P]⊔[∀xQx] x → ⊔-elim P (∀[ x ] Q x) (λ _ → P ⊔ Q x) (λ p → inlᵖ p) (λ ∀xQx → inrᵖ (∀xQx x)) [P]⊔[∀xQx]) -- ⇐∶ λ ∀x[P⊔Qx] → {! !} -- ∀-⊎-distribʳ : ∀{ℓ ℓ' ℓ''} (a : Type ℓ) {B : Type ℓ'} (f : B → Type ℓ'') -- → (a → ∀ b → ¬ᵗ f b) -- a implies that fb is wrong -- → (∀ b → f b → ¬ᵗ a) -- b implies that a is wrong -- → (∀ b → a ⊎ f b) -- for all b, either a holds or fb holds -- → a ⊎ (∀ b → f b) -- either a holds or fb holds forall b -- ∀-⊎-distribʳ a f a→¬fb fb→¬a g = {! !} -- hProp-union and Σ-Type-union are equivalent when the two disjuncts are disjoint such that one disproves the other and vice versa ⊎-Level : ∀{A : Type ℓ}{B : Type ℓ'} → A ⊎ B → Level ⊎-Level {ℓ = ℓ } (inl x) = ℓ ⊎-Level {ℓ' = ℓ'} (inr x) = ℓ' ⊎-Type : ∀{A : Type ℓ}{B : Type ℓ'}(x : A ⊎ B) → Type (⊎-Level x) ⊎-Type {A = A} (inl x) = A ⊎-Type {B = B} (inr x) = B ⊎-pred : ∀{A : Type ℓ}{B : Type ℓ'}(x : A ⊎ B) → ⊎-Type x ⊎-pred (inl x) = x ⊎-pred (inr x) = x ⊎-predˡ : ∀{A : Type ℓ}{B : Type ℓ'}(z : A ⊎ B) → {y : A} → z ≡ inl y → A ⊎-predˡ (inl x) {y} p = x ⊎-predˡ (inr x) {y} p = y inl-reflects-≡ : ∀{A : Type ℓ}{B : Type ℓ'} {x y : A} → ((A ⊎ B) ∋ inl x) ≡ inl y → x ≡ y inl-reflects-≡ {A = A} {B = B} {x = x} {y = y} p = cong γ p where γ : (z : A ⊎ B) → A γ (inl y) = y γ (inr y) = x inr-reflects-≡ : ∀{A : Type ℓ}{B : Type ℓ'} {x y : B} → ((A ⊎ B) ∋ inr x) ≡ inr y → x ≡ y inr-reflects-≡ {A = A} {B = B} {x = x} {y = y} p = cong γ p where γ : (z : A ⊎ B) → B γ (inl y) = x γ (inr y) = y isProp⊎ : ∀{ℓ ℓ'} {A : Type ℓ} {B : Type ℓ'} → isProp A → isProp B → (A → ¬ᵗ B) ⊎ (B → ¬ᵗ A) → isProp (A ⊎ B) isProp⊎ pA pB X⇒¬Y (inl x) (inl y) = cong inl (pA x y) isProp⊎ pA pB X⇒¬Y (inr x) (inr y) = cong inr (pB x y) isProp⊎ pA pB (inl A⇒¬B) (inl x) (inr y) = ⊥-elim (A⇒¬B x y) isProp⊎ pA pB (inr B⇒¬A) (inl x) (inr y) = ⊥-elim (B⇒¬A y x) isProp⊎ pA pB (inl A⇒¬B) (inr x) (inl y) = ⊥-elim (A⇒¬B y x) isProp⊎ pA pB (inr B⇒¬A) (inr x) (inl y) = ⊥-elim (B⇒¬A x y) module _ {ℓ ℓ'} (P : hProp ℓ) (Q : hProp ℓ') (X⇒¬Y : [ P ⇒ ¬ Q ] ⊎ [ Q ⇒ ¬ P ]) where ⊎-isProp : isProp ([ P ] ⊎ [ Q ]) ⊎-isProp = isProp⊎ (isProp[] P) (isProp[] Q) X⇒¬Y P⊎Qᵖ : hProp (ℓ-max ℓ ℓ') P⊎Qᵖ = ([ P ] ⊎ [ Q ]) , ⊎-isProp -- ⊎⇒⊔' : [ P⊎Qᵖ ] → [ P ⊔ Q ] -- ⊎⇒⊔' x = ∣ x ∣ ⊔⇒⊎ : [ P ⊔ Q ] → [ P⊎Qᵖ ] abstract ⊔⇒⊎ x = ⊔-elim P Q (λ x → ([ P ] ⊎ [ Q ]) , ⊎-isProp) (λ p → inl p) (λ q → inr q) x ⊔⊎-equiv : [ P⊎Qᵖ ⇔ P ⊔ Q ] ⊔⊎-equiv = ⊎⇒⊔ P Q , ⊔⇒⊎ ⊔⊎-≡ : P⊎Qᵖ ≡ P ⊔ Q abstract ⊔⊎-≡ with ⊔⊎-equiv ... | p , q = ⇔toPath p q
{ "alphanum_fraction": 0.4101058382, "avg_line_length": 38.6411609499, "ext": "agda", "hexsha": "42b4930b0ddc06b8007ee9f41c2ee85a24614eed", "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": "10206b5c3eaef99ece5d18bf703c9e8b2371bde4", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "mchristianl/synthetic-reals", "max_forks_repo_path": "agda/MoreLogic/Properties.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "10206b5c3eaef99ece5d18bf703c9e8b2371bde4", "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": "mchristianl/synthetic-reals", "max_issues_repo_path": "agda/MoreLogic/Properties.agda", "max_line_length": 144, "max_stars_count": 3, "max_stars_repo_head_hexsha": "10206b5c3eaef99ece5d18bf703c9e8b2371bde4", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "mchristianl/synthetic-reals", "max_stars_repo_path": "agda/MoreLogic/Properties.agda", "max_stars_repo_stars_event_max_datetime": "2022-02-19T12:15:21.000Z", "max_stars_repo_stars_event_min_datetime": "2020-07-31T18:15:26.000Z", "num_tokens": 8090, "size": 14645 }
----------------------------------------------------------------------------------- -- This file contains facts about equational reasoning pertaining to categories. -- ----------------------------------------------------------------------------------- module Category.CatEq where open import Level open import Category.Category open import Setoid.Total -- The following models the communative square: -- -- A ---f₁---> C -- | | -- f₃ f₂ -- | | ‌-- V V -- D ---f₄---> D -- -- However, as an equation. comm-square : {l : Level}{ℂ : Cat {l}}{A B D C : Obj ℂ} → el (Hom ℂ A B) → el (Hom ℂ B C) → el (Hom ℂ A D) → el (Hom ℂ D C) → Set l comm-square {ℂ = ℂ}{A}{C = C} f₁ f₂ f₃ f₄ = ⟨ Hom ℂ A C ⟩[ f₁ ○[ comp ℂ ] f₂ ≡ f₃ ○[ comp ℂ ] f₄ ]
{ "alphanum_fraction": 0.3976331361, "avg_line_length": 30.1785714286, "ext": "agda", "hexsha": "2ddce15ab9feaedd670bd7e3ed0d5ffb26c7e879", "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": "b33c6a59d664aed46cac8ef77d34313e148fecc2", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "heades/AUGL", "max_forks_repo_path": "setoid-cats/Category/CatEq.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "b33c6a59d664aed46cac8ef77d34313e148fecc2", "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": "heades/AUGL", "max_issues_repo_path": "setoid-cats/Category/CatEq.agda", "max_line_length": 98, "max_stars_count": null, "max_stars_repo_head_hexsha": "b33c6a59d664aed46cac8ef77d34313e148fecc2", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "heades/AUGL", "max_stars_repo_path": "setoid-cats/Category/CatEq.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 243, "size": 845 }
{-# OPTIONS --safe --warning=error --without-K #-} open import LogicalFormulae open import Groups.Definition open import Setoids.Setoids open import Sets.EquivalenceRelations open import Rings.Definition open import Agda.Primitive using (Level; lzero; lsuc; _⊔_) module Rings.Subrings.Definition {a b : _} {A : Set a} {S : Setoid {a} {b} A} {_+A_ _*A_ : A → A → A} (R : Ring S _+A_ _*A_) where open import Setoids.Subset S open Ring R open Group additiveGroup open import Groups.Subgroups.Definition additiveGroup open Setoid S open Equivalence eq record Subring {c : _} (pred : A → Set c) : Set (a ⊔ b ⊔ c) where field isSubgroup : Subgroup pred containsOne : pred 1R closedUnderProduct : {x y : A} → pred x → pred y → pred (x *A y) isSubset = Subgroup.isSubset isSubgroup subringMult : {c : _} {pred : A → Set c} → (s : Subring pred) → Sg A pred → Sg A pred → Sg A pred subringMult s (a , prA) (b , prB) = (a *A b) , Subring.closedUnderProduct s prA prB subringIsRing : {c : _} {pred : A → Set c} → (subring : Subring pred) → Ring (subsetSetoid (Subring.isSubset subring)) (subgroupOp (Subring.isSubgroup subring)) (subringMult subring) Ring.additiveGroup (subringIsRing sub) = subgroupIsGroup (Subring.isSubgroup sub) Ring.*WellDefined (subringIsRing sub) {r , prR} {s , prS} {t , prT} {u , prU} r=t s=u = *WellDefined r=t s=u Ring.1R (subringIsRing sub) = (1R , Subring.containsOne sub) Ring.groupIsAbelian (subringIsRing sub) {a , prA} {b , prB} = groupIsAbelian Ring.*Associative (subringIsRing sub) {a , prA} {b , prB} {c , prC} = *Associative Ring.*Commutative (subringIsRing sub) {a , prA} {b , prB} = *Commutative Ring.*DistributesOver+ (subringIsRing sub) {a , prA} {b , prB} {c , prC} = *DistributesOver+ Ring.identIsIdent (subringIsRing sub) {a , prA} = identIsIdent
{ "alphanum_fraction": 0.6960621187, "avg_line_length": 46.2307692308, "ext": "agda", "hexsha": "c6b7d4815d8dbd1bf21d29752da118437aa8431a", "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": "Rings/Subrings/Definition.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": "Rings/Subrings/Definition.agda", "max_line_length": 182, "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": "Rings/Subrings/Definition.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": 638, "size": 1803 }
module JuiceMaker where open import Human.Nat hiding (_==_) open import Human.List hiding (remove-last) open import Human.Equality open import Human.Maybe open import Human.Empty Not : (P : Set) -> Set Not P = P -> Empty -- Different from Bool, shows an evidence of why the value is "yes" or "nop" data Dec (P : Set) : Set where yes : P -> Dec P nop : Not P -> Dec P -- Define constructors of what are the types of ingredients available data Ingredient : Set where orange : Ingredient pineapple : Ingredient carrot : Ingredient apple : Ingredient beet : Ingredient cabbage : Ingredient {- Pair is a polimorfic type (as is List). Depends on two types to create a type (Pair of something). Ex: Pair Nat Nat, Pair Nat Ingredient, Pair Bool Bool -} data Pair (A B : Set) : Set where pair : A -> B -> Pair A B --Create a subset (or sigma).Receives a Set and a proof/filter to restricts what items can be part of a subset data Subset (A : Set) (IsOk : A → Set) : Set where subset : (a : A) (b : IsOk a) → Subset A IsOk ---------------------------------------------------------------- ------ Items ------- {- Restricts of which can be the pair of ingredients. Acts like a filter to create a subset of valid Pair Nat Ingredient -} data IsItem : Pair Nat Ingredient → Set where 100-orange : IsItem (pair 100 orange) 50-beet : IsItem (pair 50 beet) -- An Item is a subset of Pair Nat Ingredient that restricts its elements using IsItem filter Item : Set Item = Subset (Pair Nat Ingredient) IsItem {- n: quantity of ml in an item i: a type of ingredient p: a proof that a Pair formed by n and i passed the "filter" of IsItem item-has-ml: returns a proof that an item has n ml -} data ItemHasMl : (n : Nat) → (i : Item) → Set where item-has-ml : (n : Nat) (i : Ingredient) (p : IsItem (pair n i)) → ItemHasMl n (subset (pair n i) p) --- Items --- 100ml-orange : Item 100ml-orange = subset (pair 100 orange) 100-orange 50ml-beet : Item 50ml-beet = subset (pair 50 beet) 50-beet default-items : List Item default-items = 100ml-orange , 100ml-orange , 100ml-orange , end --- Auxiliar --- -- Quantity of ml in an item and a proof that an item has n ml get-ml-item : (i : Item) -> Subset Nat (λ n -> ItemHasMl n i) get-ml-item (subset .(pair 100 orange) 100-orange) = subset 100 (item-has-ml 100 orange 100-orange) get-ml-item (subset .(pair 50 beet) 50-beet) = subset 50 (item-has-ml 50 beet 50-beet) get-ml-item-aux : (i : Item) -> Subset Nat (λ n -> ItemHasMl n i) → Nat get-ml-item-aux i (subset a b) = a -- Get the ingredient in an Item get-ingredient-item : (i : Item) → Ingredient get-ingredient-item (subset (pair ml ing) _) = ing ---------------------------------------------------------------- ------ Juice ------- {- This function helps to proof something about the ml in a list. n: quantity of ml in a list list: list of items empty-list-has-0ml: a proof that 0ml represents an empty list append-item-adds-ml: a proof that adding an item to a list, adds its ml to the result of list's ml -} data ListHasMl : (n : Nat) (list : List Item) → Set where empty-list-has-0ml : ListHasMl 0 end -- receives ml in item, an item, ml is a list, a list. Also, a proof of ItemHasMl and ListHasMl append-item-adds-ml : ∀ it-ml it li-ml li → ItemHasMl it-ml it → ListHasMl li-ml li → ListHasMl (it-ml + li-ml) (it , li) {- Get the quantity of ml in a list by returning the proof that n is the quantity of ml in a list. Obs: the second argument in Subset is something applied to n. λ is used to represents that something (ListhasMl) is applied to n. -} get-ml-list : (list : List Item) -> Subset Nat (λ n → ListHasMl n list) get-ml-list end = subset zero empty-list-has-0ml get-ml-list (it , rest) with get-ml-item it | get-ml-list rest -- "with" acts similar to case, but opening values inside this case get-ml-list (it , rest) | subset it-ml it-ml-pf | subset rest-ml rest-ml-pf = let sum-ml = it-ml + rest-ml append-list-has-sum-ml = append-item-adds-ml it-ml it rest-ml rest it-ml-pf rest-ml-pf in subset sum-ml append-list-has-sum-ml {- IsJuice is a filter indexed in List Item (receives a list of Item), restricts what can become a juice (a proof that it have 300ml), and returns an element of IsJuice, that is, a proof that it was approved to become a juice -} data IsJuice : List Item → Set where juice : ∀ (l : List Item) → (ListHasMl 300 l) -> IsJuice l -- A Juice is a subset of List Item that restricts its elements using IsJuice filter Juice : Set Juice = Subset (List Item) IsJuice -- default-juice : Juice -- default-juice = subset default-items (juice default-items refl) ---------------------------------------------------------------- ----- Events ----- data Event : Set where pick : Item -> Event undo : Event copy : Event -- add again the last element done : Event remove-last : List Item → List Item remove-last end = end remove-last (x , l) = l copy-last : List Item → List Item copy-last end = end copy-last (x , l) = x , x , l -- Look into a list of events and return a list of items event-to-item : List Event -> List Item event-to-item end = end event-to-item (pick x , e) = x , (event-to-item e) -- add element in the list and continues to look into List of Event event-to-item (undo , e) = remove-last (event-to-item e) event-to-item (copy , e) = copy-last (event-to-item e) event-to-item (done , e) = event-to-item e -- Given a list and a proof that the list has a quantity of ml, returns the ml get-ml-list-aux : (l : List Item) → Subset Nat (λ n → ListHasMl n l) → Nat get-ml-list-aux l (subset a b) = a -- goal: Maybe (Subset (List (Subset (Pair Nat Ingredient) IsItem)) IsJuice) make : List Item -> Maybe Juice make end = nothing make (x , l) with make l ... | just m = let it-ml = (get-ml-item-aux x (get-ml-item x)) -- quantity of ml in x li-ml = (get-ml-list-aux l (get-ml-list l)) -- -- is-juice = subset l (juice l (append-item-aadds-ml it-ml x li-ml l (item-has-ml it-ml x) ? )) -- usar o get-ml-list pra provar que o suco tem 300 ml -- is-juice = subset l (juice l (get-ml-list l)) in {! !} -- just (subset l) (juice l is-juice)) ... | nothing = nothing -- pra satisfazer o chefe -- make-always : List Item -> Juice -- make-always items with make items -- ... | yes items-is-juice = subset items (juice items-is-juice) -- ... | no items = default-juice --------------- ---- Test ----- test-list : Nat test-list = (sum (1 , 2 , 3 , 4 , 5 , end)) event-list : List Event event-list = pick 100ml-orange , pick 50ml-beet , pick 50ml-beet , pick 100ml-orange , end -- qtd-juice : Nat -- qtd-juice = sum (map get-ml-item (make event-list)) -- made-juice-has-300-ml-ex : (sum (map get-ml-item (make event-list))) == 300 -- made-juice-has-300-ml-ex = refl -- For all sum of ml in the items, the result must be 300 -- a Nat (value) is different than a proof that this number will always be something -- made-juice-has-300-ml : ∀ (events : List Event) → (sum (map get-ml-item (make events))) == 300 -- made-juice-has-300-ml events = {! !} -- -- -- made-juice-has-5-items : ∀ (events : List Event) → length (map get-ingredient-item (make events)) == 5 -- made-juice-has-5-items = {! !}
{ "alphanum_fraction": 0.6392687881, "avg_line_length": 37.4873096447, "ext": "agda", "hexsha": "82604e94a42a33b5d7b493967b3fd50d7d8fd5cc", "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": "b509eb4c4014605facfb4ee5c807cd07753d4477", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "MaisaMilena/JuiceMaker", "max_forks_repo_path": "src/JuiceMaker.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "b509eb4c4014605facfb4ee5c807cd07753d4477", "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": "MaisaMilena/JuiceMaker", "max_issues_repo_path": "src/JuiceMaker.agda", "max_line_length": 130, "max_stars_count": 6, "max_stars_repo_head_hexsha": "b509eb4c4014605facfb4ee5c807cd07753d4477", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "MaisaMilena/JuiceMaker", "max_stars_repo_path": "src/JuiceMaker.agda", "max_stars_repo_stars_event_max_datetime": "2020-11-28T05:46:27.000Z", "max_stars_repo_stars_event_min_datetime": "2019-03-29T17:35:20.000Z", "num_tokens": 2211, "size": 7385 }
{-# OPTIONS --without-K #-} open import HoTT module homotopy.SuspensionJoin {i} (A : Type i) where {- To -} false, : A → Bool × A false, a = false , a true, : A → Bool × A true, a = true , a module To = SuspensionRec {i} (left false :> Bool * A) (left true) (λ a → glue (false, a) ∙ ! (glue (true, a))) to : Suspension A → (Bool * A) to = To.f {- From -} from : Bool * A → Suspension A from = From.f module _ where from-bool : Bool → Suspension A from-bool false = north from-bool true = south from-glue : (c : Bool × A) → from-bool (fst c) == south from-glue (false , a) = merid a from-glue (true , a) = idp module From = PushoutRec {d = *-span Bool A} from-bool (λ _ → south) from-glue {- ToFrom -} to-from : (c : Bool * A) → to (from c) == c to-from = Pushout-elim to-from-left (λ a → glue (true , a)) to-from-glue where to-from-left : (b : Bool) → to (from (left b)) == left b to-from-left false = idp to-from-left true = idp to-from-glue' : (b : Bool) (a : A) → ap to (ap from (glue (b , a))) ∙' glue (true , a) == to-from-left b ∙ glue (b , a) to-from-glue' true a = ap to (ap from (glue (true , a))) ∙' glue (true , a) =⟨ From.glue-β (true , a) |in-ctx (λ u → ap to u ∙' glue (true , a)) ⟩ idp ∙' glue (true , a) =⟨ ∙'-unit-l _ ⟩ glue (true , a) ∎ to-from-glue' false a = ap to (ap from (glue (false , a))) ∙' glue (true , a) =⟨ From.glue-β (false , a) |in-ctx (λ u → ap to u ∙' glue (true , a)) ⟩ ap to (merid a) ∙' glue (true , a) =⟨ To.merid-β a |in-ctx (λ u → u ∙' glue (true , a)) ⟩ (glue (false , a) ∙ ! (glue (true , a))) ∙' glue (true , a) =⟨ coh (glue (false , a)) (glue (true , a)) ⟩ glue (false , a) ∎ where coh : ∀ {i} {A : Type i} {a b c : A} (p : a == b) (q : c == b) → (p ∙ ! q) ∙' q == p coh idp idp = idp to-from-glue : (c : Bool × A) → to-from-left (fst c) == glue (true , snd c) [ (λ z → to (from z) == z) ↓ glue c ] to-from-glue c = ↓-∘=idf-in to from (uncurry to-from-glue' c) {- FromTo -} from-to : (c : Suspension A) → from (to c) == c from-to = Suspension-elim idp idp from-to-merid where from-to-merid' : (a : A) → ap from (ap to (merid a)) == merid a from-to-merid' a = ap from (ap to (merid a)) =⟨ To.merid-β a |in-ctx ap from ⟩ ap from (glue (false , a) ∙ ! (glue (true , a))) =⟨ ap-∙ from (glue (false , a)) (! (glue (true , a))) ⟩ ap from (glue (false , a)) ∙ ap from (! (glue (true , a))) =⟨ ap-! from (glue (true , a)) |in-ctx (λ u → ap from (glue (false , a)) ∙ u) ⟩ ap from (glue (false , a)) ∙ ! (ap from (glue (true , a))) =⟨ From.glue-β (false , a) |in-ctx (λ u → u ∙ ! (ap from (glue (true , a)))) ⟩ merid a ∙ ! (ap from (glue (true , a))) =⟨ From.glue-β (true , a) |in-ctx (λ u → merid a ∙ ! u) ⟩ merid a ∙ idp =⟨ ∙-unit-r _ ⟩ merid a ∎ from-to-merid : (a : A) → idp == idp [ (λ z → from (to z) == z) ↓ merid a ] from-to-merid a = ↓-∘=idf-in from to (from-to-merid' a) {- Conclusion -} e : Suspension A ≃ (Bool * A) e = equiv to from to-from from-to
{ "alphanum_fraction": 0.5166828636, "avg_line_length": 35.8953488372, "ext": "agda", "hexsha": "8b6ad690a6aa438f7597e49abf9dbc4f46191eac", "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": "bc849346a17b33e2679a5b3f2b8efbe7835dc4b6", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "cmknapp/HoTT-Agda", "max_forks_repo_path": "theorems/homotopy/SuspensionJoin.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "bc849346a17b33e2679a5b3f2b8efbe7835dc4b6", "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": "cmknapp/HoTT-Agda", "max_issues_repo_path": "theorems/homotopy/SuspensionJoin.agda", "max_line_length": 144, "max_stars_count": null, "max_stars_repo_head_hexsha": "bc849346a17b33e2679a5b3f2b8efbe7835dc4b6", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "cmknapp/HoTT-Agda", "max_stars_repo_path": "theorems/homotopy/SuspensionJoin.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 1273, "size": 3087 }
postulate A : Set₁ barb : Set₁ barb = {!(x y : A) → ?!}
{ "alphanum_fraction": 0.4915254237, "avg_line_length": 9.8333333333, "ext": "agda", "hexsha": "a6c9d5055afb44c995add0709167b1a42129e8c6", "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/Issue4268.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/Issue4268.agda", "max_line_length": 24, "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/Issue4268.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": 29, "size": 59 }
open import Functors open import Categories open import RMonads module RMonads.REM.Functors {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.REM M open Cat open Fun open RAlg open RAlgMorph open RMonad M REML : Fun C EM REML = record { OMap = λ X → record { acar = T X; astr = bind; alaw1 = sym law2; alaw2 = law3}; HMap = λ f → record { amor = bind (comp D η (HMap J f)); ahom = sym law3}; fid = RAlgMorphEq ( proof bind (comp D η (HMap J (iden C))) ≅⟨ cong (bind ∘ comp D η) (fid J) ⟩ bind (comp D η (iden D)) ≅⟨ cong bind (idr D) ⟩ bind η ≅⟨ law1 ⟩ iden D ∎); fcomp = λ{_ _ _ f g} → RAlgMorphEq ( proof bind (comp D η (HMap J (comp C f g))) ≅⟨ cong (bind ∘ comp D η) (fcomp J) ⟩ bind (comp D η (comp D (HMap J f) (HMap J g))) ≅⟨ cong bind (sym (ass D)) ⟩ bind (comp D (comp D η (HMap J f)) (HMap J g)) ≅⟨ cong (λ f₁ → bind (comp D f₁ (HMap J g))) (sym law2) ⟩ bind (comp D (comp D (bind (comp D η (HMap J f))) η) (HMap J g)) ≅⟨ cong bind (ass D) ⟩ bind (comp D (bind (comp D η (HMap J f))) (comp D η (HMap J g))) ≅⟨ law3 ⟩ comp D (bind (comp D η (HMap J f))) (bind (comp D η (HMap J g))) ∎)} REMR : Fun EM D REMR = record { OMap = acar; HMap = amor; fid = refl; fcomp = refl}
{ "alphanum_fraction": 0.5287517532, "avg_line_length": 25.0175438596, "ext": "agda", "hexsha": "29ae8f05ca9b3ba37c038091a58c8ed01a64b7fc", "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/REM/Functors.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/REM/Functors.agda", "max_line_length": 69, "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/REM/Functors.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": 596, "size": 1426 }
module Sessions.Syntax.Types where open import Level open import Function open import Data.Bool open import Data.List open import Data.List.All open import Data.List.Membership.Propositional open import Data.List.Relation.Binary.Permutation.Inductive open import Data.List.Relation.Ternary.Interleaving.Propositional as I open import Data.List.Relation.Ternary.Interleaving.Properties open import Data.List.Relation.Binary.Equality.Propositional open import Data.Product open import Data.Product.Relation.Binary.Pointwise.NonDependent open import Codata.Thunk as Thunk open import Algebra open import Algebra.FunctionProperties open import Relation.Unary hiding (_∈_; _⊢_) open import Relation.Nullary open import Relation.Nullary.Decidable as DecM open import Relation.Nullary.Product open import Relation.Binary.PropositionalEquality as P hiding ([_]) open import Relation.Ternary.Separation open import Relation.Ternary.Separation.Construct.Product open import Relation.Ternary.Separation.Construct.List {- Unrestricted-, Session- and Expression types-} module _ where mutual -- crefnel types infixr 10 _¿_ data SType : Set where _!_ _¿_ : Type → SType → SType end : SType data Type : Set where unit : Type cref : SType → Type prod : Type → Type → Type _⊸_ : Type → Type → Type LCtx = List Type -- linear contexts variable Γ Γ' Γ₁ Γ₂ Γ₃ Γ₄ : LCtx {- Some conventions -} variable a b c : Type α β γ : SType {- Duality -} module _ where infixl 1000 _⁻¹ _⁻¹ : SType → SType (a ! β) ⁻¹ = a ¿ β ⁻¹ (a ¿ β) ⁻¹ = a ! β ⁻¹ end ⁻¹ = end dual-end : ∀ {α} → α ⁻¹ ≡ end → α ≡ end dual-end {x ! α} () dual-end {x ¿ α} () dual-end {end} refl = refl dual-involutive : ∀ {α} → α ⁻¹ ⁻¹ ≡ α dual-involutive {x ! α} = cong (_!_ _) dual-involutive dual-involutive {x ¿ α} = cong (_¿_ _) dual-involutive dual-involutive {end} = refl
{ "alphanum_fraction": 0.7003089598, "avg_line_length": 26.602739726, "ext": "agda", "hexsha": "991539f8a8030abc4b80f3d67540b0086c7b5c94", "lang": "Agda", "max_forks_count": 2, "max_forks_repo_forks_event_max_datetime": "2020-05-23T00:34:36.000Z", "max_forks_repo_forks_event_min_datetime": "2020-01-30T14:15:14.000Z", "max_forks_repo_head_hexsha": "461077552d88141ac1bba044aa55b65069c3c6c0", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "laMudri/linear.agda", "max_forks_repo_path": "src/Sessions/Syntax/Types.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "461077552d88141ac1bba044aa55b65069c3c6c0", "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": "laMudri/linear.agda", "max_issues_repo_path": "src/Sessions/Syntax/Types.agda", "max_line_length": 70, "max_stars_count": 34, "max_stars_repo_head_hexsha": "461077552d88141ac1bba044aa55b65069c3c6c0", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "laMudri/linear.agda", "max_stars_repo_path": "src/Sessions/Syntax/Types.agda", "max_stars_repo_stars_event_max_datetime": "2021-02-03T15:22:33.000Z", "max_stars_repo_stars_event_min_datetime": "2019-12-20T13:57:50.000Z", "num_tokens": 592, "size": 1942 }
---------------------------------------------------------------------------------- -- Types for parse trees ---------------------------------------------------------------------------------- module cedille-types where open import lib -- open import parse-tree posinfo = string alpha = string alpha-bar-3 = string alpha-range-1 = string alpha-range-2 = string bvar = string bvar-bar-13 = string fpth = string fpth-bar-15 = string fpth-bar-16 = string fpth-bar-17 = string fpth-plus-14 = string fpth-star-18 = string kvar = string kvar-bar-19 = string kvar-star-20 = string num = string num-plus-5 = string numone = string numone-range-4 = string numpunct = string numpunct-bar-10 = string numpunct-bar-6 = string numpunct-bar-7 = string numpunct-bar-8 = string numpunct-bar-9 = string qkvar = string qvar = string var = string var-bar-11 = string var-star-12 = string {-# FOREIGN GHC import qualified CedilleTypes #-} data arg : Set args : Set opacity : Set data cmd : Set cmds : Set data decl : Set data defDatatype : Set data ctr : Set ctrs : Set data defTermOrType : Set imports : Set data imprt : Set data kind : Set data leftRight : Set data liftingType : Set data lterm : Set lterms : Set data optType : Set maybeErased : Set forceErased : Set maybeMinus : Set data nums : Set data optAs : Set data optClass : Set data optGuide : Set rhoHnf : Set data optNums : Set optPublic : Set data optTerm : Set params : Set data start : Set data term : Set data theta : Set data tk : Set data type : Set data vars : Set cases : Set data case : Set caseArgs : Set data caseArg : Set {-# COMPILE GHC arg = type CedilleTypes.Arg #-} {-# COMPILE GHC args = type CedilleTypes.Args #-} {-# COMPILE GHC opacity = type CedilleTypes.Opacity #-} {-# COMPILE GHC cmd = type CedilleTypes.Cmd #-} {-# COMPILE GHC cmds = type CedilleTypes.Cmds #-} {-# COMPILE GHC decl = type CedilleTypes.Decl #-} {-# COMPILE GHC defDatatype = type CedilleTypes.DefDatatype #-} {-# COMPILE GHC ctr = type CedilleTypes.DataCtr #-} {-# COMPILE GHC ctrs = type CedilleTypes.Ctrs #-} {-# COMPILE GHC defTermOrType = type CedilleTypes.DefTermOrType #-} {-# COMPILE GHC imports = type CedilleTypes.Imports #-} {-# COMPILE GHC imprt = type CedilleTypes.Imprt #-} {-# COMPILE GHC kind = type CedilleTypes.Kind #-} {-# COMPILE GHC leftRight = type CedilleTypes.LeftRight #-} {-# COMPILE GHC liftingType = type CedilleTypes.LiftingType #-} {-# COMPILE GHC lterm = type CedilleTypes.Lterm #-} {-# COMPILE GHC lterms = type CedilleTypes.Lterms #-} {-# COMPILE GHC optType = type CedilleTypes.OptType #-} {-# COMPILE GHC maybeErased = type CedilleTypes.MaybeErased #-} {-# COMPILE GHC forceErased = type CedilleTypes.MaybeErased #-} {-# COMPILE GHC maybeMinus = type CedilleTypes.MaybeMinus #-} {-# COMPILE GHC nums = type CedilleTypes.Nums #-} {-# COMPILE GHC optAs = type CedilleTypes.OptAs #-} {-# COMPILE GHC optClass = type CedilleTypes.OptClass #-} {-# COMPILE GHC optGuide = type CedilleTypes.OptGuide #-} {-# COMPILE GHC rhoHnf = type CedilleTypes.RhoHnf #-} {-# COMPILE GHC optNums = type CedilleTypes.OptNums #-} {-# COMPILE GHC optPublic = type CedilleTypes.OptPublic #-} {-# COMPILE GHC optTerm = type CedilleTypes.OptTerm #-} {-# COMPILE GHC params = type CedilleTypes.Params #-} {-# COMPILE GHC start = type CedilleTypes.Start #-} {-# COMPILE GHC term = type CedilleTypes.Term #-} {-# COMPILE GHC theta = type CedilleTypes.Theta #-} {-# COMPILE GHC tk = type CedilleTypes.Tk #-} {-# COMPILE GHC type = type CedilleTypes.Type #-} {-# COMPILE GHC vars = type CedilleTypes.Vars #-} {-# COMPILE GHC cases = type CedilleTypes.Cases #-} {-# COMPILE GHC case = type CedilleTypes.Case #-} {-# COMPILE GHC caseArgs = type CedilleTypes.CaseArgs #-} {-# COMPILE GHC caseArg = type CedilleTypes.CaseArg #-} data arg where TermArg : maybeErased → term → arg TypeArg : type → arg {-# COMPILE GHC arg = data CedilleTypes.Arg (CedilleTypes.TermArg | CedilleTypes.TypeArg) #-} args = 𝕃 arg opacity = 𝔹 data cmd where DefKind : posinfo → kvar → params → kind → posinfo → cmd DefTermOrType : opacity → defTermOrType → posinfo → cmd DefDatatype : defDatatype → posinfo → cmd ImportCmd : imprt → cmd {-# COMPILE GHC cmd = data CedilleTypes.Cmd (CedilleTypes.DefKind | CedilleTypes.DefTermOrType | CedilleTypes.DefDatatype |CedilleTypes.ImportCmd) #-} cmds = 𝕃 cmd data decl where Decl : posinfo → posinfo → maybeErased → bvar → tk → posinfo → decl {-# COMPILE GHC decl = data CedilleTypes.Decl (CedilleTypes.Decl) #-} data defDatatype where Datatype : posinfo → posinfo → var → params → kind → ctrs → defDatatype {-# COMPILE GHC defDatatype = data CedilleTypes.DefDatatype (CedilleTypes.Datatype) #-} data ctr where Ctr : posinfo → var → type → ctr {-# COMPILE GHC ctr = data CedilleTypes.DataCtr (CedilleTypes.Ctr) #-} ctrs = 𝕃 ctr data defTermOrType where DefTerm : posinfo → var → optType → term → defTermOrType DefType : posinfo → var → kind → type → defTermOrType {-# COMPILE GHC defTermOrType = data CedilleTypes.DefTermOrType (CedilleTypes.DefTerm | CedilleTypes.DefType) #-} imports = 𝕃 imprt data imprt where Import : posinfo → optPublic → posinfo → fpth → optAs → args → posinfo → imprt {-# COMPILE GHC imprt = data CedilleTypes.Imprt (CedilleTypes.Import) #-} data kind where KndArrow : kind → kind → kind KndParens : posinfo → kind → posinfo → kind KndPi : posinfo → posinfo → bvar → tk → kind → kind KndTpArrow : type → kind → kind KndVar : posinfo → qkvar → args → kind Star : posinfo → kind {-# COMPILE GHC kind = data CedilleTypes.Kind (CedilleTypes.KndArrow | CedilleTypes.KndParens | CedilleTypes.KndPi | CedilleTypes.KndTpArrow | CedilleTypes.KndVar | CedilleTypes.Star) #-} data leftRight where Both : leftRight Left : leftRight Right : leftRight {-# COMPILE GHC leftRight = data CedilleTypes.LeftRight (CedilleTypes.Both | CedilleTypes.Left | CedilleTypes.Right) #-} data liftingType where LiftArrow : liftingType → liftingType → liftingType LiftParens : posinfo → liftingType → posinfo → liftingType LiftPi : posinfo → bvar → type → liftingType → liftingType LiftStar : posinfo → liftingType LiftTpArrow : type → liftingType → liftingType {-# COMPILE GHC liftingType = data CedilleTypes.LiftingType (CedilleTypes.LiftArrow | CedilleTypes.LiftParens | CedilleTypes.LiftPi | CedilleTypes.LiftStar | CedilleTypes.LiftTpArrow) #-} data lterm where Lterm : maybeErased → term → lterm {-# COMPILE GHC lterm = data CedilleTypes.Lterm (CedilleTypes.MkLterm) #-} lterms = 𝕃 lterm data optType where SomeType : type → optType NoType : optType {-# COMPILE GHC optType = data CedilleTypes.OptType (CedilleTypes.SomeType | CedilleTypes.NoType) #-} maybeErased = 𝔹 forceErased = 𝔹 maybeMinus = 𝔹 data nums where NumsStart : num → nums NumsNext : num → nums → nums {-# COMPILE GHC nums = data CedilleTypes.Nums (CedilleTypes.NumsStart | CedilleTypes.NumsNext) #-} data optAs where NoOptAs : optAs SomeOptAs : posinfo → var → optAs {-# COMPILE GHC optAs = data CedilleTypes.OptAs (CedilleTypes.NoOptAs | CedilleTypes.SomeOptAs) #-} optPublic = 𝔹 data optClass where NoClass : optClass SomeClass : tk → optClass {-# COMPILE GHC optClass = data CedilleTypes.OptClass (CedilleTypes.NoClass | CedilleTypes.SomeClass) #-} data optGuide where NoGuide : optGuide Guide : posinfo → var → type → optGuide {-# COMPILE GHC optGuide = data CedilleTypes.OptGuide (CedilleTypes.NoGuide | CedilleTypes.Guide) #-} rhoHnf = 𝔹 data optNums where NoNums : optNums SomeNums : nums → optNums {-# COMPILE GHC optNums = data CedilleTypes.OptNums (CedilleTypes.NoNums | CedilleTypes.SomeNums) #-} data optTerm where NoTerm : optTerm SomeTerm : term → posinfo → optTerm {-# COMPILE GHC optTerm = data CedilleTypes.OptTerm (CedilleTypes.NoTerm | CedilleTypes.SomeTerm) #-} params = 𝕃 decl data start where File : imports → posinfo → posinfo → qvar → params → cmds → posinfo → start {-# COMPILE GHC start = data CedilleTypes.Start (CedilleTypes.File) #-} data term where App : term → maybeErased → term → term AppTp : term → type → term Beta : posinfo → optTerm → optTerm → term Chi : posinfo → optType → term → term Delta : posinfo → optType → term → term Epsilon : posinfo → leftRight → maybeMinus → term → term Hole : posinfo → term IotaPair : posinfo → term → term → optGuide → posinfo → term IotaProj : term → num → posinfo → term Lam : posinfo → maybeErased → posinfo → bvar → optClass → term → term Let : posinfo → forceErased → defTermOrType → term → term Open : posinfo → opacity → posinfo → var → term → term Parens : posinfo → term → posinfo → term Phi : posinfo → term → term → term → posinfo → term Rho : posinfo → rhoHnf → optNums → term → optGuide → term → term Sigma : posinfo → term → term Theta : posinfo → theta → term → lterms → term Mu : posinfo → posinfo → bvar → term → optType → posinfo → cases → posinfo → term Mu' : posinfo → optTerm → term → optType → posinfo → cases → posinfo → term Var : posinfo → qvar → term {-# COMPILE GHC term = data CedilleTypes.Term (CedilleTypes.App | CedilleTypes.AppTp | CedilleTypes.Beta | CedilleTypes.Chi | CedilleTypes.Delta | CedilleTypes.Epsilon | CedilleTypes.Hole | CedilleTypes.IotaPair | CedilleTypes.IotaProj | CedilleTypes.Lam | CedilleTypes.Let | CedilleTypes.Open | CedilleTypes.Parens | CedilleTypes.Phi | CedilleTypes.Rho | CedilleTypes.Sigma | CedilleTypes.Theta | CedilleTypes.Mu | CedilleTypes.Mu' | CedilleTypes.Var) #-} data case where Case : posinfo → var → caseArgs → term → case {-# COMPILE GHC case = data CedilleTypes.Case (CedilleTypes.MkCase) #-} cases = 𝕃 case data caseArg where CaseTermArg : posinfo → maybeErased → var → caseArg CaseTypeArg : posinfo → var → caseArg {-# COMPILE GHC caseArg = data CedilleTypes.CaseArg (CedilleTypes.CaseTermArg | CedilleTypes.CaseTypeArg) #-} caseArgs = 𝕃 caseArg data theta where Abstract : theta AbstractEq : theta AbstractVars : vars → theta {-# COMPILE GHC theta = data CedilleTypes.Theta (CedilleTypes.Abstract | CedilleTypes.AbstractEq | CedilleTypes.AbstractVars) #-} data tk where Tkk : kind → tk Tkt : type → tk {-# COMPILE GHC tk = data CedilleTypes.Tk (CedilleTypes.Tkk | CedilleTypes.Tkt) #-} data type where Abs : posinfo → maybeErased → posinfo → bvar → tk → type → type Iota : posinfo → posinfo → bvar → type → type → type Lft : posinfo → posinfo → var → term → liftingType → type NoSpans : type → posinfo → type TpLet : posinfo → defTermOrType → type → type TpApp : type → type → type TpAppt : type → term → type TpArrow : type → maybeErased → type → type TpEq : posinfo → term → term → posinfo → type TpHole : posinfo → type TpLambda : posinfo → posinfo → bvar → tk → type → type TpParens : posinfo → type → posinfo → type TpVar : posinfo → qvar → type {-# COMPILE GHC type = data CedilleTypes.Type (CedilleTypes.Abs | CedilleTypes.Iota | CedilleTypes.Lft | CedilleTypes.NoSpans | CedilleTypes.TpLet | CedilleTypes.TpApp | CedilleTypes.TpAppt | CedilleTypes.TpArrow | CedilleTypes.TpEq | CedilleTypes.TpHole | CedilleTypes.TpLambda | CedilleTypes.TpParens | CedilleTypes.TpVar) #-} data vars where VarsNext : var → vars → vars VarsStart : var → vars {-# COMPILE GHC vars = data CedilleTypes.Vars (CedilleTypes.VarsNext | CedilleTypes.VarsStart) #-} pattern Erased = tt pattern NotErased = ff pattern Pi = NotErased pattern All = Erased pattern OpacTrans = tt pattern OpacOpaque = ff pattern IsPublic = tt pattern NotPublic = ff pattern EpsHnf = ff pattern EpsHanf = tt pattern RhoPlain = ff pattern RhoPlus = tt -- embedded types: -- aterm = term -- atype = type -- lliftingType = liftingType -- lterm = term -- ltype = type -- pterm = term
{ "alphanum_fraction": 0.7025558292, "avg_line_length": 34.9465875371, "ext": "agda", "hexsha": "c4e586b36386604a3310fd793a2e54227a233caf", "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": "f5ce42258b7d9bc66f75cd679c785d6133b82b58", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "CarlOlson/cedille", "max_forks_repo_path": "src/cedille-types.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "f5ce42258b7d9bc66f75cd679c785d6133b82b58", "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": "CarlOlson/cedille", "max_issues_repo_path": "src/cedille-types.agda", "max_line_length": 456, "max_stars_count": null, "max_stars_repo_head_hexsha": "f5ce42258b7d9bc66f75cd679c785d6133b82b58", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "CarlOlson/cedille", "max_stars_repo_path": "src/cedille-types.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 3530, "size": 11777 }
------------------------------------------------------------------------ -- A solver for certain natural number equalities ------------------------------------------------------------------------ -- The standard library's solver is used. {-# OPTIONS --without-K --safe #-} open import Equality module Nat.Solver {reflexive} (eq : ∀ {a p} → Equality-with-J a p reflexive) where open Derived-definitions-and-properties eq import Equality.Propositional as EP open import Equality.Instances-related open import Prelude open import Bijection eq using (_↔_) open import Function-universe eq open import Data.Nat.Solver open import Data.Vec as Vec open import Data.Vec.N-ary open import Function.Equality using (_⟨$⟩_) open import Function.Equivalence using (Equivalence) import Relation.Binary.Reflection import Relation.Binary.PropositionalEquality as P open +-*-Solver public using (_:=_; _:+_; _:*_; _:^_) open +-*-Solver.Polynomial public using (con) open +-*-Solver hiding (solve) open Relation.Binary.Reflection (P.setoid _) var ⟦_⟧ ⟦_⟧↓ correct using (close) private -- Some simple lemmas. ≡↔≡ : ∀ {a} {A : Type a} {x y : A} → x ≡ y ↔ x P.≡ y ≡↔≡ = proj₁ (all-equality-types-isomorphic eq EP.equality-with-J) ≡→≡ : ∀ {a} {A : Type a} {x y : A} → x ≡ y → x P.≡ y ≡→≡ = _↔_.to ≡↔≡ ≡←≡ : ∀ {a} {A : Type a} {x y : A} → x P.≡ y → x ≡ y ≡←≡ = _↔_.from ≡↔≡ -- A variant of +-*-Solver.solve. solve : ∀ n (f : N-ary n (Polynomial n) (Polynomial n × Polynomial n)) → Eqʰ n _≡_ (curryⁿ ⟦ proj₁ (close n f) ⟧↓) (curryⁿ ⟦ proj₂ (close n f) ⟧↓) → Eq n _≡_ (curryⁿ ⟦ proj₁ (close n f) ⟧) (curryⁿ ⟦ proj₂ (close n f) ⟧) solve n f = Eqʰ n _≡_ (curryⁿ ⟦ proj₁ (close n f) ⟧↓) (curryⁿ ⟦ proj₂ (close n f) ⟧↓) ↝⟨ Eqʰ-to-Eq n _≡_ ⟩ Eq n _≡_ (curryⁿ ⟦ proj₁ (close n f) ⟧↓) (curryⁿ ⟦ proj₂ (close n f) ⟧↓) ↔⟨⟩ ∀ⁿ n (curryⁿ λ xs → (curryⁿ ⟦ proj₁ (close n f) ⟧↓ $ⁿ xs) ≡ (curryⁿ ⟦ proj₂ (close n f) ⟧↓ $ⁿ xs)) ↝⟨ Equivalence.to (uncurry-∀ⁿ n) ⟨$⟩_ ⟩ (∀ (xs : Vec _ n) → (curryⁿ λ xs → (curryⁿ ⟦ proj₁ (close n f) ⟧↓ $ⁿ xs) ≡ (curryⁿ ⟦ proj₂ (close n f) ⟧↓ $ⁿ xs)) $ⁿ xs) ↝⟨ (∀-cong _ λ xs → ≡⇒↝ _ $ ≡←≡ $ left-inverse _ xs) ⟩ (∀ (xs : Vec _ n) → (curryⁿ ⟦ proj₁ (close n f) ⟧↓ $ⁿ xs) ≡ (curryⁿ ⟦ proj₂ (close n f) ⟧↓ $ⁿ xs)) ↝⟨ (∀-cong _ λ _ → ≡→≡) ⟩ (∀ (xs : Vec _ n) → (curryⁿ ⟦ proj₁ (close n f) ⟧↓ $ⁿ xs) P.≡ (curryⁿ ⟦ proj₂ (close n f) ⟧↓ $ⁿ xs)) ↝⟨ (∀-cong _ λ xs → ≡⇒↝ _ $ sym $ ≡←≡ $ left-inverse _ xs) ⟩ (∀ (xs : Vec _ n) → (curryⁿ λ xs → (curryⁿ ⟦ proj₁ (close n f) ⟧↓ $ⁿ xs) P.≡ (curryⁿ ⟦ proj₂ (close n f) ⟧↓ $ⁿ xs)) $ⁿ xs) ↝⟨ Equivalence.from (uncurry-∀ⁿ n) ⟨$⟩_ ⟩ ∀ⁿ n (curryⁿ λ xs → (curryⁿ ⟦ proj₁ (close n f) ⟧↓ $ⁿ xs) P.≡ (curryⁿ ⟦ proj₂ (close n f) ⟧↓ $ⁿ xs)) ↔⟨⟩ Eq n P._≡_ (curryⁿ ⟦ proj₁ (close n f) ⟧↓) (curryⁿ ⟦ proj₂ (close n f) ⟧↓) ↝⟨ Eq-to-Eqʰ n P._≡_ ⟩ Eqʰ n P._≡_ (curryⁿ ⟦ proj₁ (close n f) ⟧↓) (curryⁿ ⟦ proj₂ (close n f) ⟧↓) ↝⟨ +-*-Solver.solve n f ⟩ Eq n P._≡_ (curryⁿ ⟦ proj₁ (close n f) ⟧) (curryⁿ ⟦ proj₂ (close n f) ⟧) ↔⟨⟩ ∀ⁿ n (curryⁿ λ xs → (curryⁿ ⟦ proj₁ (close n f) ⟧ $ⁿ xs) P.≡ (curryⁿ ⟦ proj₂ (close n f) ⟧ $ⁿ xs)) ↝⟨ Equivalence.to (uncurry-∀ⁿ n) ⟨$⟩_ ⟩ (∀ (xs : Vec _ n) → (curryⁿ λ xs → (curryⁿ ⟦ proj₁ (close n f) ⟧ $ⁿ xs) P.≡ (curryⁿ ⟦ proj₂ (close n f) ⟧ $ⁿ xs)) $ⁿ xs) ↝⟨ (∀-cong _ λ xs → ≡⇒↝ _ $ ≡←≡ $ left-inverse _ xs) ⟩ (∀ (xs : Vec _ n) → (curryⁿ ⟦ proj₁ (close n f) ⟧ $ⁿ xs) P.≡ (curryⁿ ⟦ proj₂ (close n f) ⟧ $ⁿ xs)) ↝⟨ (∀-cong _ λ _ → ≡←≡) ⟩ (∀ (xs : Vec _ n) → (curryⁿ ⟦ proj₁ (close n f) ⟧ $ⁿ xs) ≡ (curryⁿ ⟦ proj₂ (close n f) ⟧ $ⁿ xs)) ↝⟨ (∀-cong _ λ xs → ≡⇒↝ _ $ sym $ ≡←≡ $ left-inverse _ xs) ⟩ (∀ (xs : Vec _ n) → (curryⁿ λ xs → (curryⁿ ⟦ proj₁ (close n f) ⟧ $ⁿ xs) ≡ (curryⁿ ⟦ proj₂ (close n f) ⟧ $ⁿ xs)) $ⁿ xs) ↝⟨ Equivalence.from (uncurry-∀ⁿ n) ⟨$⟩_ ⟩ ∀ⁿ n (curryⁿ λ xs → (curryⁿ ⟦ proj₁ (close n f) ⟧ $ⁿ xs) ≡ (curryⁿ ⟦ proj₂ (close n f) ⟧ $ⁿ xs)) ↔⟨⟩ Eq n _≡_ (curryⁿ ⟦ proj₁ (close n f) ⟧) (curryⁿ ⟦ proj₂ (close n f) ⟧) □
{ "alphanum_fraction": 0.4661276224, "avg_line_length": 37.5081967213, "ext": "agda", "hexsha": "9d2d8b875ea4edfaa0f47455061b1dfe2ab9ce18", "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/Nat/Solver.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/Nat/Solver.agda", "max_line_length": 127, "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/Nat/Solver.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": 1979, "size": 4576 }
{- This second-order equational theory was created from the following second-order syntax description: syntax CommMonoid | CM type * : 0-ary term unit : * | ε add : * * -> * | _⊕_ l20 theory (εU⊕ᴸ) a |> add (unit, a) = a (εU⊕ᴿ) a |> add (a, unit) = a (⊕A) a b c |> add (add(a, b), c) = add (a, add(b, c)) (⊕C) a b |> add(a, b) = add(b, a) -} module CommMonoid.Equality where open import SOAS.Common open import SOAS.Context open import SOAS.Variable open import SOAS.Families.Core open import SOAS.Families.Build open import SOAS.ContextMaps.Inductive open import CommMonoid.Signature open import CommMonoid.Syntax open import SOAS.Metatheory.SecondOrder.Metasubstitution CM:Syn open import SOAS.Metatheory.SecondOrder.Equality CM:Syn private variable α β γ τ : *T Γ Δ Π : Ctx infix 1 _▹_⊢_≋ₐ_ -- Axioms of equality data _▹_⊢_≋ₐ_ : ∀ 𝔐 Γ {α} → (𝔐 ▷ CM) α Γ → (𝔐 ▷ CM) α Γ → Set where εU⊕ᴸ : ⁅ * ⁆̣ ▹ ∅ ⊢ ε ⊕ 𝔞 ≋ₐ 𝔞 ⊕A : ⁅ * ⁆ ⁅ * ⁆ ⁅ * ⁆̣ ▹ ∅ ⊢ (𝔞 ⊕ 𝔟) ⊕ 𝔠 ≋ₐ 𝔞 ⊕ (𝔟 ⊕ 𝔠) ⊕C : ⁅ * ⁆ ⁅ * ⁆̣ ▹ ∅ ⊢ 𝔞 ⊕ 𝔟 ≋ₐ 𝔟 ⊕ 𝔞 open EqLogic _▹_⊢_≋ₐ_ open ≋-Reasoning -- Derived equations εU⊕ᴿ : ⁅ * ⁆̣ ▹ ∅ ⊢ 𝔞 ⊕ ε ≋ 𝔞 εU⊕ᴿ = tr (ax ⊕C with《 𝔞 ◃ ε 》) (ax εU⊕ᴸ with《 𝔞 》)
{ "alphanum_fraction": 0.5769854133, "avg_line_length": 22.8518518519, "ext": "agda", "hexsha": "d5b2be5c2a02c629959668b32b6c79591365a63f", "lang": "Agda", "max_forks_count": 4, "max_forks_repo_forks_event_max_datetime": "2022-01-24T12:49:17.000Z", "max_forks_repo_forks_event_min_datetime": "2021-11-09T20:39:59.000Z", "max_forks_repo_head_hexsha": "ff1a985a6be9b780d3ba2beff68e902394f0a9d8", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "JoeyEremondi/agda-soas", "max_forks_repo_path": "out/CommMonoid/Equality.agda", "max_issues_count": 1, "max_issues_repo_head_hexsha": "ff1a985a6be9b780d3ba2beff68e902394f0a9d8", "max_issues_repo_issues_event_max_datetime": "2021-11-21T12:19:32.000Z", "max_issues_repo_issues_event_min_datetime": "2021-11-21T12:19:32.000Z", "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "JoeyEremondi/agda-soas", "max_issues_repo_path": "out/CommMonoid/Equality.agda", "max_line_length": 99, "max_stars_count": 39, "max_stars_repo_head_hexsha": "ff1a985a6be9b780d3ba2beff68e902394f0a9d8", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "JoeyEremondi/agda-soas", "max_stars_repo_path": "out/CommMonoid/Equality.agda", "max_stars_repo_stars_event_max_datetime": "2022-03-19T17:33:12.000Z", "max_stars_repo_stars_event_min_datetime": "2021-11-09T20:39:55.000Z", "num_tokens": 614, "size": 1234 }
module fizzbuzz where import Data.Nat as N import Data.Nat.DivMod as N import Data.Nat.Show as N import Data.Bool as B import Data.Fin as F import Data.Unit as U import Data.String as S open import Data.Product using (_,_ ; _×_) open import IO open import Agda.Builtin.Coinduction open import Relation.Nullary open import Function congruent : N.ℕ → N.ℕ → B.Bool congruent n N.zero = B.false congruent n (N.suc m) with N._≟_ 0 $ F.toℕ (N._mod_ n (N.suc m) {U.tt}) ... | yes _ = B.true ... | no _ = B.false _and_ : {A B : Set} → A → B → A × B _and_ = _,_ fizzbuzz : N.ℕ → S.String fizzbuzz N.zero = "fizzbuzz" fizzbuzz n with congruent n 3 and congruent n 5 ... | B.true , B.true = "fizzbuzz" ... | B.true , B.false = "fizz" ... | B.false , B.true = "buzz" ... | B.false , B.false = N.show n worker : N.ℕ → IO U.⊤ worker N.zero = putStrLn $ fizzbuzz N.zero worker (N.suc n) = ♯ worker n >> ♯ putStrLn (fizzbuzz $ N.suc n) main = run $ worker 100
{ "alphanum_fraction": 0.623, "avg_line_length": 26.3157894737, "ext": "agda", "hexsha": "d9a2ef9b0ec1a4ac525875d3af47aef3d038b69e", "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/examples-that-run/fizzbuzz/src-agda/fizzbuzz.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/examples-that-run/fizzbuzz/src-agda/fizzbuzz.agda", "max_line_length": 71, "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/examples-that-run/fizzbuzz/src-agda/fizzbuzz.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": 357, "size": 1000 }
module Ag12 where import Relation.Binary.PropositionalEquality as Eq open Eq open import Data.Nat using (ℕ; zero; suc; _+_; _*_) open import Relation.Nullary using (¬_) open import Data.Product using (_×_; proj₁; proj₂) renaming (_,_ to ⟨_,_⟩) open import Data.Sum using (_⊎_; inj₁; inj₂) open import Function open import Ag09 hiding (_∘_) -- open import Data.Product using (Σ; _,_; ∃; Σ-syntax; ∃-syntax) open import Level using (Level; _⊔_) renaming (zero to lzero; suc to lsuc) open ≡-Reasoning open ≃-Reasoning postulate funExt : ∀ {m n : Level} {A : Set m} {B : Set n} {f g : A → B} → (∀ (x : A) → f x ≡ g x) → f ≡ g lemma₀ : ∀ {A B : Set} → (a : A × B) → ⟨ proj₁ a , proj₂ a ⟩ ≡ a lemma₀ ⟨ fst , snd ⟩ = refl lemma₁ : ∀ {A : Set} {B C : A → Set} → (f : (x : A) → B x × C x) → (λ a → ⟨ proj₁ (f a) , proj₂ (f a) ⟩) ≡ f lemma₁ f = refl ∀-distrib-× : ∀ {A : Set} {B C : A → Set} → (∀ (x : A) → B x × C x) ≃ (∀ (x : A) → B x) × (∀ (x : A) → C x) ∀-distrib-× {A} {B} {C} = record { to = λ bc → ⟨ proj₁ ∘ bc , proj₂ ∘ bc ⟩ ; from = λ bc a → ⟨ proj₁ bc a , proj₂ bc a ⟩ ; from∘to = λ f → refl ; to∘from = λ f → refl } ⊎∀-implies-∀⊎ : ∀ {A : Set} {B C : A → Set} → (∀ (x : A) → B x) ⊎ (∀ (x : A) → C x) → ∀ (x : A) → B x ⊎ C x ⊎∀-implies-∀⊎ (_⊎_.inj₁ x₁) x = _⊎_.inj₁ (x₁ x) ⊎∀-implies-∀⊎ (_⊎_.inj₂ y) x = _⊎_.inj₂ (y x) data Σ (A : Set) (B : A → Set) : Set where ⟨_,_⟩ : (x : A) → B x → Σ A B Σ-syntax = Σ infix 2 Σ-syntax syntax Σ-syntax A (λ x → B) = Σ[ x ∈ A ] B ∃ : ∀ {A : Set} (B : A → Set) → Set ∃ {A} B = Σ A B ∃-syntax = ∃ syntax ∃-syntax (λ x → B) = ∃[ x ] B ∃-distrib-⊎ : ∀ {A : Set} {B C : A → Set} → ∃[ x ] (B x ⊎ C x) ≃ (∃[ x ] B x) ⊎ (∃[ x ] C x) ∃-distrib-⊎ = record { to = λ x → {!!} ; from = λ{ (inj₁ x) → ⟨ {!!} , {!!} ⟩ ; (inj₂ x) → {!!} } ; from∘to = {!!} ; to∘from = {!!} }
{ "alphanum_fraction": 0.4735169492, "avg_line_length": 29.0461538462, "ext": "agda", "hexsha": "1be3c1a9a3465def6ae50338d4424d3781087b23", "lang": "Agda", "max_forks_count": 1, "max_forks_repo_forks_event_max_datetime": "2019-12-13T04:50:46.000Z", "max_forks_repo_forks_event_min_datetime": "2019-12-13T04:50:46.000Z", "max_forks_repo_head_hexsha": "eb2cef0556efb9a4ce11783f8516789ea48cc344", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "Brethland/LEARNING-STUFF", "max_forks_repo_path": "Agda/Ag12.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "eb2cef0556efb9a4ce11783f8516789ea48cc344", "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": "Brethland/LEARNING-STUFF", "max_issues_repo_path": "Agda/Ag12.agda", "max_line_length": 74, "max_stars_count": 2, "max_stars_repo_head_hexsha": "eb2cef0556efb9a4ce11783f8516789ea48cc344", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "Brethland/LEARNING-STUFF", "max_stars_repo_path": "Agda/Ag12.agda", "max_stars_repo_stars_event_max_datetime": "2020-03-11T10:35:42.000Z", "max_stars_repo_stars_event_min_datetime": "2020-02-03T05:05:52.000Z", "num_tokens": 903, "size": 1888 }
open import IO data ℕ : Set where zero : ℕ suc : ℕ → ℕ seven = suc (suc (suc (suc (suc (suc (suc zero)))))) main = run (putStrLn "Hello, world!")
{ "alphanum_fraction": 0.5844155844, "avg_line_length": 15.4, "ext": "agda", "hexsha": "f3837eb3584cb61762eac780c0a5b56b0c51a568", "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": "115a03f08d30d8ba49f02c9692c289cbfb242358", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "raventid/coursera_learning", "max_forks_repo_path": "agda/plt/chapter1/test.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "115a03f08d30d8ba49f02c9692c289cbfb242358", "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": "raventid/coursera_learning", "max_issues_repo_path": "agda/plt/chapter1/test.agda", "max_line_length": 52, "max_stars_count": 1, "max_stars_repo_head_hexsha": "115a03f08d30d8ba49f02c9692c289cbfb242358", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "raventid/coursera_learning", "max_stars_repo_path": "agda/plt/chapter1/test.agda", "max_stars_repo_stars_event_max_datetime": "2019-11-28T09:26:00.000Z", "max_stars_repo_stars_event_min_datetime": "2019-11-28T09:26:00.000Z", "num_tokens": 58, "size": 154 }
-- Andreas, 2016-09-19, issue #2168, reported by Nisse -- {-# OPTIONS -v tc.cover:10 #-} -- {-# OPTIONS -v tc.cover.splittree:30 -v tc.cc:40 -v tc.cover.split.con:30 #-} open import Common.Equality data Three : Set where one two three : Three data Bool : Set where true false : Bool P : Bool → Bool → Three P z false = one P false = λ _ → two -- This caused internal error during clause compilation. P z true = three test-one : ∀ x → P x false ≡ one test-one true = refl test-one false = refl test-two : P false true ≡ two test-two = refl test-three : P true true ≡ three test-three = refl
{ "alphanum_fraction": 0.6639072848, "avg_line_length": 21.5714285714, "ext": "agda", "hexsha": "4be7cb29ed3cefe94f434c45a13a9405f63c0d76", "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/Succeed/Issue2168b.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/Succeed/Issue2168b.agda", "max_line_length": 80, "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/Succeed/Issue2168b.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": 185, "size": 604 }
{-# OPTIONS --without-K --safe #-} module Quasigroup.Bundles where open import Algebra.Core open import Quasigroup.Structures open import Relation.Binary open import Level open import Algebra.Bundles open import Algebra.Structures record Pique c ℓ : Set (suc (c ⊔ ℓ)) where infixl 7 _∙_ infixl 7 _\\_ infixl 7 _//_ infix 4 _≈_ field Carrier : Set c _≈_ : Rel Carrier ℓ _∙_ : Op₂ Carrier _\\_ : Op₂ Carrier _//_ : Op₂ Carrier ε : Carrier isPique : IsPique _≈_ _∙_ _\\_ _//_ ε open IsPique isPique public
{ "alphanum_fraction": 0.6473684211, "avg_line_length": 19.6551724138, "ext": "agda", "hexsha": "1923dd637390c9ea86a47261e3d01595686d9dcd", "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/Quasigroup/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/Quasigroup/Bundles.agda", "max_line_length": 42, "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/Quasigroup/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": 197, "size": 570 }
module Issue413 where data Bool : Set where data ℕ : Set where zero : ℕ data Type : (A : Set) → Set where isBool : Type Bool isℕ : Type ℕ g : (A : Set) → Type A → Type A → ℕ g .Bool isBool isBool = zero
{ "alphanum_fraction": 0.602739726, "avg_line_length": 14.6, "ext": "agda", "hexsha": "431eed9ec9b64db0c05af31bbdd43dba40dfe7b5", "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/Issue413.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/Issue413.agda", "max_line_length": 35, "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/Issue413.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": 77, "size": 219 }
module Text.Greek.SBLGNT.2Tim where open import Data.List open import Text.Greek.Bible open import Text.Greek.Script open import Text.Greek.Script.Unicode ΠΡΟΣ-ΤΙΜΟΘΕΟΝ-Β : List (Word) ΠΡΟΣ-ΤΙΜΟΘΕΟΝ-Β = word (Π ∷ α ∷ ῦ ∷ ∙λ ∷ ο ∷ ς ∷ []) "2Tim.1.1" ∷ word (ἀ ∷ π ∷ ό ∷ σ ∷ τ ∷ ο ∷ ∙λ ∷ ο ∷ ς ∷ []) "2Tim.1.1" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ο ∷ ῦ ∷ []) "2Tim.1.1" ∷ word (Ἰ ∷ η ∷ σ ∷ ο ∷ ῦ ∷ []) "2Tim.1.1" ∷ word (δ ∷ ι ∷ ὰ ∷ []) "2Tim.1.1" ∷ word (θ ∷ ε ∷ ∙λ ∷ ή ∷ μ ∷ α ∷ τ ∷ ο ∷ ς ∷ []) "2Tim.1.1" ∷ word (θ ∷ ε ∷ ο ∷ ῦ ∷ []) "2Tim.1.1" ∷ word (κ ∷ α ∷ τ ∷ []) "2Tim.1.1" ∷ word (ἐ ∷ π ∷ α ∷ γ ∷ γ ∷ ε ∷ ∙λ ∷ ί ∷ α ∷ ν ∷ []) "2Tim.1.1" ∷ word (ζ ∷ ω ∷ ῆ ∷ ς ∷ []) "2Tim.1.1" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "2Tim.1.1" ∷ word (ἐ ∷ ν ∷ []) "2Tim.1.1" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ῷ ∷ []) "2Tim.1.1" ∷ word (Ἰ ∷ η ∷ σ ∷ ο ∷ ῦ ∷ []) "2Tim.1.1" ∷ word (Τ ∷ ι ∷ μ ∷ ο ∷ θ ∷ έ ∷ ῳ ∷ []) "2Tim.1.2" ∷ word (ἀ ∷ γ ∷ α ∷ π ∷ η ∷ τ ∷ ῷ ∷ []) "2Tim.1.2" ∷ word (τ ∷ έ ∷ κ ∷ ν ∷ ῳ ∷ []) "2Tim.1.2" ∷ word (χ ∷ ά ∷ ρ ∷ ι ∷ ς ∷ []) "2Tim.1.2" ∷ word (ἔ ∷ ∙λ ∷ ε ∷ ο ∷ ς ∷ []) "2Tim.1.2" ∷ word (ε ∷ ἰ ∷ ρ ∷ ή ∷ ν ∷ η ∷ []) "2Tim.1.2" ∷ word (ἀ ∷ π ∷ ὸ ∷ []) "2Tim.1.2" ∷ word (θ ∷ ε ∷ ο ∷ ῦ ∷ []) "2Tim.1.2" ∷ word (π ∷ α ∷ τ ∷ ρ ∷ ὸ ∷ ς ∷ []) "2Tim.1.2" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.1.2" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ο ∷ ῦ ∷ []) "2Tim.1.2" ∷ word (Ἰ ∷ η ∷ σ ∷ ο ∷ ῦ ∷ []) "2Tim.1.2" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "2Tim.1.2" ∷ word (κ ∷ υ ∷ ρ ∷ ί ∷ ο ∷ υ ∷ []) "2Tim.1.2" ∷ word (ἡ ∷ μ ∷ ῶ ∷ ν ∷ []) "2Tim.1.2" ∷ word (Χ ∷ ά ∷ ρ ∷ ι ∷ ν ∷ []) "2Tim.1.3" ∷ word (ἔ ∷ χ ∷ ω ∷ []) "2Tim.1.3" ∷ word (τ ∷ ῷ ∷ []) "2Tim.1.3" ∷ word (θ ∷ ε ∷ ῷ ∷ []) "2Tim.1.3" ∷ word (ᾧ ∷ []) "2Tim.1.3" ∷ word (∙λ ∷ α ∷ τ ∷ ρ ∷ ε ∷ ύ ∷ ω ∷ []) "2Tim.1.3" ∷ word (ἀ ∷ π ∷ ὸ ∷ []) "2Tim.1.3" ∷ word (π ∷ ρ ∷ ο ∷ γ ∷ ό ∷ ν ∷ ω ∷ ν ∷ []) "2Tim.1.3" ∷ word (ἐ ∷ ν ∷ []) "2Tim.1.3" ∷ word (κ ∷ α ∷ θ ∷ α ∷ ρ ∷ ᾷ ∷ []) "2Tim.1.3" ∷ word (σ ∷ υ ∷ ν ∷ ε ∷ ι ∷ δ ∷ ή ∷ σ ∷ ε ∷ ι ∷ []) "2Tim.1.3" ∷ word (ὡ ∷ ς ∷ []) "2Tim.1.3" ∷ word (ἀ ∷ δ ∷ ι ∷ ά ∷ ∙λ ∷ ε ∷ ι ∷ π ∷ τ ∷ ο ∷ ν ∷ []) "2Tim.1.3" ∷ word (ἔ ∷ χ ∷ ω ∷ []) "2Tim.1.3" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "2Tim.1.3" ∷ word (π ∷ ε ∷ ρ ∷ ὶ ∷ []) "2Tim.1.3" ∷ word (σ ∷ ο ∷ ῦ ∷ []) "2Tim.1.3" ∷ word (μ ∷ ν ∷ ε ∷ ί ∷ α ∷ ν ∷ []) "2Tim.1.3" ∷ word (ἐ ∷ ν ∷ []) "2Tim.1.3" ∷ word (τ ∷ α ∷ ῖ ∷ ς ∷ []) "2Tim.1.3" ∷ word (δ ∷ ε ∷ ή ∷ σ ∷ ε ∷ σ ∷ ί ∷ ν ∷ []) "2Tim.1.3" ∷ word (μ ∷ ο ∷ υ ∷ []) "2Tim.1.3" ∷ word (ν ∷ υ ∷ κ ∷ τ ∷ ὸ ∷ ς ∷ []) "2Tim.1.3" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.1.3" ∷ word (ἡ ∷ μ ∷ έ ∷ ρ ∷ α ∷ ς ∷ []) "2Tim.1.3" ∷ word (ἐ ∷ π ∷ ι ∷ π ∷ ο ∷ θ ∷ ῶ ∷ ν ∷ []) "2Tim.1.4" ∷ word (σ ∷ ε ∷ []) "2Tim.1.4" ∷ word (ἰ ∷ δ ∷ ε ∷ ῖ ∷ ν ∷ []) "2Tim.1.4" ∷ word (μ ∷ ε ∷ μ ∷ ν ∷ η ∷ μ ∷ έ ∷ ν ∷ ο ∷ ς ∷ []) "2Tim.1.4" ∷ word (σ ∷ ο ∷ υ ∷ []) "2Tim.1.4" ∷ word (τ ∷ ῶ ∷ ν ∷ []) "2Tim.1.4" ∷ word (δ ∷ α ∷ κ ∷ ρ ∷ ύ ∷ ω ∷ ν ∷ []) "2Tim.1.4" ∷ word (ἵ ∷ ν ∷ α ∷ []) "2Tim.1.4" ∷ word (χ ∷ α ∷ ρ ∷ ᾶ ∷ ς ∷ []) "2Tim.1.4" ∷ word (π ∷ ∙λ ∷ η ∷ ρ ∷ ω ∷ θ ∷ ῶ ∷ []) "2Tim.1.4" ∷ word (ὑ ∷ π ∷ ό ∷ μ ∷ ν ∷ η ∷ σ ∷ ι ∷ ν ∷ []) "2Tim.1.5" ∷ word (∙λ ∷ α ∷ β ∷ ὼ ∷ ν ∷ []) "2Tim.1.5" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "2Tim.1.5" ∷ word (ἐ ∷ ν ∷ []) "2Tim.1.5" ∷ word (σ ∷ ο ∷ ὶ ∷ []) "2Tim.1.5" ∷ word (ἀ ∷ ν ∷ υ ∷ π ∷ ο ∷ κ ∷ ρ ∷ ί ∷ τ ∷ ο ∷ υ ∷ []) "2Tim.1.5" ∷ word (π ∷ ί ∷ σ ∷ τ ∷ ε ∷ ω ∷ ς ∷ []) "2Tim.1.5" ∷ word (ἥ ∷ τ ∷ ι ∷ ς ∷ []) "2Tim.1.5" ∷ word (ἐ ∷ ν ∷ ῴ ∷ κ ∷ η ∷ σ ∷ ε ∷ ν ∷ []) "2Tim.1.5" ∷ word (π ∷ ρ ∷ ῶ ∷ τ ∷ ο ∷ ν ∷ []) "2Tim.1.5" ∷ word (ἐ ∷ ν ∷ []) "2Tim.1.5" ∷ word (τ ∷ ῇ ∷ []) "2Tim.1.5" ∷ word (μ ∷ ά ∷ μ ∷ μ ∷ ῃ ∷ []) "2Tim.1.5" ∷ word (σ ∷ ο ∷ υ ∷ []) "2Tim.1.5" ∷ word (Λ ∷ ω ∷ ΐ ∷ δ ∷ ι ∷ []) "2Tim.1.5" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.1.5" ∷ word (τ ∷ ῇ ∷ []) "2Tim.1.5" ∷ word (μ ∷ η ∷ τ ∷ ρ ∷ ί ∷ []) "2Tim.1.5" ∷ word (σ ∷ ο ∷ υ ∷ []) "2Tim.1.5" ∷ word (Ε ∷ ὐ ∷ ν ∷ ί ∷ κ ∷ ῃ ∷ []) "2Tim.1.5" ∷ word (π ∷ έ ∷ π ∷ ε ∷ ι ∷ σ ∷ μ ∷ α ∷ ι ∷ []) "2Tim.1.5" ∷ word (δ ∷ ὲ ∷ []) "2Tim.1.5" ∷ word (ὅ ∷ τ ∷ ι ∷ []) "2Tim.1.5" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.1.5" ∷ word (ἐ ∷ ν ∷ []) "2Tim.1.5" ∷ word (σ ∷ ο ∷ ί ∷ []) "2Tim.1.5" ∷ word (δ ∷ ι ∷ []) "2Tim.1.6" ∷ word (ἣ ∷ ν ∷ []) "2Tim.1.6" ∷ word (α ∷ ἰ ∷ τ ∷ ί ∷ α ∷ ν ∷ []) "2Tim.1.6" ∷ word (ἀ ∷ ν ∷ α ∷ μ ∷ ι ∷ μ ∷ ν ∷ ῄ ∷ σ ∷ κ ∷ ω ∷ []) "2Tim.1.6" ∷ word (σ ∷ ε ∷ []) "2Tim.1.6" ∷ word (ἀ ∷ ν ∷ α ∷ ζ ∷ ω ∷ π ∷ υ ∷ ρ ∷ ε ∷ ῖ ∷ ν ∷ []) "2Tim.1.6" ∷ word (τ ∷ ὸ ∷ []) "2Tim.1.6" ∷ word (χ ∷ ά ∷ ρ ∷ ι ∷ σ ∷ μ ∷ α ∷ []) "2Tim.1.6" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "2Tim.1.6" ∷ word (θ ∷ ε ∷ ο ∷ ῦ ∷ []) "2Tim.1.6" ∷ word (ὅ ∷ []) "2Tim.1.6" ∷ word (ἐ ∷ σ ∷ τ ∷ ι ∷ ν ∷ []) "2Tim.1.6" ∷ word (ἐ ∷ ν ∷ []) "2Tim.1.6" ∷ word (σ ∷ ο ∷ ὶ ∷ []) "2Tim.1.6" ∷ word (δ ∷ ι ∷ ὰ ∷ []) "2Tim.1.6" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "2Tim.1.6" ∷ word (ἐ ∷ π ∷ ι ∷ θ ∷ έ ∷ σ ∷ ε ∷ ω ∷ ς ∷ []) "2Tim.1.6" ∷ word (τ ∷ ῶ ∷ ν ∷ []) "2Tim.1.6" ∷ word (χ ∷ ε ∷ ι ∷ ρ ∷ ῶ ∷ ν ∷ []) "2Tim.1.6" ∷ word (μ ∷ ο ∷ υ ∷ []) "2Tim.1.6" ∷ word (ο ∷ ὐ ∷ []) "2Tim.1.7" ∷ word (γ ∷ ὰ ∷ ρ ∷ []) "2Tim.1.7" ∷ word (ἔ ∷ δ ∷ ω ∷ κ ∷ ε ∷ ν ∷ []) "2Tim.1.7" ∷ word (ἡ ∷ μ ∷ ῖ ∷ ν ∷ []) "2Tim.1.7" ∷ word (ὁ ∷ []) "2Tim.1.7" ∷ word (θ ∷ ε ∷ ὸ ∷ ς ∷ []) "2Tim.1.7" ∷ word (π ∷ ν ∷ ε ∷ ῦ ∷ μ ∷ α ∷ []) "2Tim.1.7" ∷ word (δ ∷ ε ∷ ι ∷ ∙λ ∷ ί ∷ α ∷ ς ∷ []) "2Tim.1.7" ∷ word (ἀ ∷ ∙λ ∷ ∙λ ∷ ὰ ∷ []) "2Tim.1.7" ∷ word (δ ∷ υ ∷ ν ∷ ά ∷ μ ∷ ε ∷ ω ∷ ς ∷ []) "2Tim.1.7" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.1.7" ∷ word (ἀ ∷ γ ∷ ά ∷ π ∷ η ∷ ς ∷ []) "2Tim.1.7" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.1.7" ∷ word (σ ∷ ω ∷ φ ∷ ρ ∷ ο ∷ ν ∷ ι ∷ σ ∷ μ ∷ ο ∷ ῦ ∷ []) "2Tim.1.7" ∷ word (Μ ∷ ὴ ∷ []) "2Tim.1.8" ∷ word (ο ∷ ὖ ∷ ν ∷ []) "2Tim.1.8" ∷ word (ἐ ∷ π ∷ α ∷ ι ∷ σ ∷ χ ∷ υ ∷ ν ∷ θ ∷ ῇ ∷ ς ∷ []) "2Tim.1.8" ∷ word (τ ∷ ὸ ∷ []) "2Tim.1.8" ∷ word (μ ∷ α ∷ ρ ∷ τ ∷ ύ ∷ ρ ∷ ι ∷ ο ∷ ν ∷ []) "2Tim.1.8" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "2Tim.1.8" ∷ word (κ ∷ υ ∷ ρ ∷ ί ∷ ο ∷ υ ∷ []) "2Tim.1.8" ∷ word (ἡ ∷ μ ∷ ῶ ∷ ν ∷ []) "2Tim.1.8" ∷ word (μ ∷ η ∷ δ ∷ ὲ ∷ []) "2Tim.1.8" ∷ word (ἐ ∷ μ ∷ ὲ ∷ []) "2Tim.1.8" ∷ word (τ ∷ ὸ ∷ ν ∷ []) "2Tim.1.8" ∷ word (δ ∷ έ ∷ σ ∷ μ ∷ ι ∷ ο ∷ ν ∷ []) "2Tim.1.8" ∷ word (α ∷ ὐ ∷ τ ∷ ο ∷ ῦ ∷ []) "2Tim.1.8" ∷ word (ἀ ∷ ∙λ ∷ ∙λ ∷ ὰ ∷ []) "2Tim.1.8" ∷ word (σ ∷ υ ∷ γ ∷ κ ∷ α ∷ κ ∷ ο ∷ π ∷ ά ∷ θ ∷ η ∷ σ ∷ ο ∷ ν ∷ []) "2Tim.1.8" ∷ word (τ ∷ ῷ ∷ []) "2Tim.1.8" ∷ word (ε ∷ ὐ ∷ α ∷ γ ∷ γ ∷ ε ∷ ∙λ ∷ ί ∷ ῳ ∷ []) "2Tim.1.8" ∷ word (κ ∷ α ∷ τ ∷ ὰ ∷ []) "2Tim.1.8" ∷ word (δ ∷ ύ ∷ ν ∷ α ∷ μ ∷ ι ∷ ν ∷ []) "2Tim.1.8" ∷ word (θ ∷ ε ∷ ο ∷ ῦ ∷ []) "2Tim.1.8" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "2Tim.1.9" ∷ word (σ ∷ ώ ∷ σ ∷ α ∷ ν ∷ τ ∷ ο ∷ ς ∷ []) "2Tim.1.9" ∷ word (ἡ ∷ μ ∷ ᾶ ∷ ς ∷ []) "2Tim.1.9" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.1.9" ∷ word (κ ∷ α ∷ ∙λ ∷ έ ∷ σ ∷ α ∷ ν ∷ τ ∷ ο ∷ ς ∷ []) "2Tim.1.9" ∷ word (κ ∷ ∙λ ∷ ή ∷ σ ∷ ε ∷ ι ∷ []) "2Tim.1.9" ∷ word (ἁ ∷ γ ∷ ί ∷ ᾳ ∷ []) "2Tim.1.9" ∷ word (ο ∷ ὐ ∷ []) "2Tim.1.9" ∷ word (κ ∷ α ∷ τ ∷ ὰ ∷ []) "2Tim.1.9" ∷ word (τ ∷ ὰ ∷ []) "2Tim.1.9" ∷ word (ἔ ∷ ρ ∷ γ ∷ α ∷ []) "2Tim.1.9" ∷ word (ἡ ∷ μ ∷ ῶ ∷ ν ∷ []) "2Tim.1.9" ∷ word (ἀ ∷ ∙λ ∷ ∙λ ∷ ὰ ∷ []) "2Tim.1.9" ∷ word (κ ∷ α ∷ τ ∷ ὰ ∷ []) "2Tim.1.9" ∷ word (ἰ ∷ δ ∷ ί ∷ α ∷ ν ∷ []) "2Tim.1.9" ∷ word (π ∷ ρ ∷ ό ∷ θ ∷ ε ∷ σ ∷ ι ∷ ν ∷ []) "2Tim.1.9" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.1.9" ∷ word (χ ∷ ά ∷ ρ ∷ ι ∷ ν ∷ []) "2Tim.1.9" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "2Tim.1.9" ∷ word (δ ∷ ο ∷ θ ∷ ε ∷ ῖ ∷ σ ∷ α ∷ ν ∷ []) "2Tim.1.9" ∷ word (ἡ ∷ μ ∷ ῖ ∷ ν ∷ []) "2Tim.1.9" ∷ word (ἐ ∷ ν ∷ []) "2Tim.1.9" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ῷ ∷ []) "2Tim.1.9" ∷ word (Ἰ ∷ η ∷ σ ∷ ο ∷ ῦ ∷ []) "2Tim.1.9" ∷ word (π ∷ ρ ∷ ὸ ∷ []) "2Tim.1.9" ∷ word (χ ∷ ρ ∷ ό ∷ ν ∷ ω ∷ ν ∷ []) "2Tim.1.9" ∷ word (α ∷ ἰ ∷ ω ∷ ν ∷ ί ∷ ω ∷ ν ∷ []) "2Tim.1.9" ∷ word (φ ∷ α ∷ ν ∷ ε ∷ ρ ∷ ω ∷ θ ∷ ε ∷ ῖ ∷ σ ∷ α ∷ ν ∷ []) "2Tim.1.10" ∷ word (δ ∷ ὲ ∷ []) "2Tim.1.10" ∷ word (ν ∷ ῦ ∷ ν ∷ []) "2Tim.1.10" ∷ word (δ ∷ ι ∷ ὰ ∷ []) "2Tim.1.10" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "2Tim.1.10" ∷ word (ἐ ∷ π ∷ ι ∷ φ ∷ α ∷ ν ∷ ε ∷ ί ∷ α ∷ ς ∷ []) "2Tim.1.10" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "2Tim.1.10" ∷ word (σ ∷ ω ∷ τ ∷ ῆ ∷ ρ ∷ ο ∷ ς ∷ []) "2Tim.1.10" ∷ word (ἡ ∷ μ ∷ ῶ ∷ ν ∷ []) "2Tim.1.10" ∷ word (Ἰ ∷ η ∷ σ ∷ ο ∷ ῦ ∷ []) "2Tim.1.10" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ο ∷ ῦ ∷ []) "2Tim.1.10" ∷ word (κ ∷ α ∷ τ ∷ α ∷ ρ ∷ γ ∷ ή ∷ σ ∷ α ∷ ν ∷ τ ∷ ο ∷ ς ∷ []) "2Tim.1.10" ∷ word (μ ∷ ὲ ∷ ν ∷ []) "2Tim.1.10" ∷ word (τ ∷ ὸ ∷ ν ∷ []) "2Tim.1.10" ∷ word (θ ∷ ά ∷ ν ∷ α ∷ τ ∷ ο ∷ ν ∷ []) "2Tim.1.10" ∷ word (φ ∷ ω ∷ τ ∷ ί ∷ σ ∷ α ∷ ν ∷ τ ∷ ο ∷ ς ∷ []) "2Tim.1.10" ∷ word (δ ∷ ὲ ∷ []) "2Tim.1.10" ∷ word (ζ ∷ ω ∷ ὴ ∷ ν ∷ []) "2Tim.1.10" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.1.10" ∷ word (ἀ ∷ φ ∷ θ ∷ α ∷ ρ ∷ σ ∷ ί ∷ α ∷ ν ∷ []) "2Tim.1.10" ∷ word (δ ∷ ι ∷ ὰ ∷ []) "2Tim.1.10" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "2Tim.1.10" ∷ word (ε ∷ ὐ ∷ α ∷ γ ∷ γ ∷ ε ∷ ∙λ ∷ ί ∷ ο ∷ υ ∷ []) "2Tim.1.10" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "2Tim.1.11" ∷ word (ὃ ∷ []) "2Tim.1.11" ∷ word (ἐ ∷ τ ∷ έ ∷ θ ∷ η ∷ ν ∷ []) "2Tim.1.11" ∷ word (ἐ ∷ γ ∷ ὼ ∷ []) "2Tim.1.11" ∷ word (κ ∷ ῆ ∷ ρ ∷ υ ∷ ξ ∷ []) "2Tim.1.11" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.1.11" ∷ word (ἀ ∷ π ∷ ό ∷ σ ∷ τ ∷ ο ∷ ∙λ ∷ ο ∷ ς ∷ []) "2Tim.1.11" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.1.11" ∷ word (δ ∷ ι ∷ δ ∷ ά ∷ σ ∷ κ ∷ α ∷ ∙λ ∷ ο ∷ ς ∷ []) "2Tim.1.11" ∷ word (δ ∷ ι ∷ []) "2Tim.1.12" ∷ word (ἣ ∷ ν ∷ []) "2Tim.1.12" ∷ word (α ∷ ἰ ∷ τ ∷ ί ∷ α ∷ ν ∷ []) "2Tim.1.12" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.1.12" ∷ word (τ ∷ α ∷ ῦ ∷ τ ∷ α ∷ []) "2Tim.1.12" ∷ word (π ∷ ά ∷ σ ∷ χ ∷ ω ∷ []) "2Tim.1.12" ∷ word (ἀ ∷ ∙λ ∷ ∙λ ∷ []) "2Tim.1.12" ∷ word (ο ∷ ὐ ∷ κ ∷ []) "2Tim.1.12" ∷ word (ἐ ∷ π ∷ α ∷ ι ∷ σ ∷ χ ∷ ύ ∷ ν ∷ ο ∷ μ ∷ α ∷ ι ∷ []) "2Tim.1.12" ∷ word (ο ∷ ἶ ∷ δ ∷ α ∷ []) "2Tim.1.12" ∷ word (γ ∷ ὰ ∷ ρ ∷ []) "2Tim.1.12" ∷ word (ᾧ ∷ []) "2Tim.1.12" ∷ word (π ∷ ε ∷ π ∷ ί ∷ σ ∷ τ ∷ ε ∷ υ ∷ κ ∷ α ∷ []) "2Tim.1.12" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.1.12" ∷ word (π ∷ έ ∷ π ∷ ε ∷ ι ∷ σ ∷ μ ∷ α ∷ ι ∷ []) "2Tim.1.12" ∷ word (ὅ ∷ τ ∷ ι ∷ []) "2Tim.1.12" ∷ word (δ ∷ υ ∷ ν ∷ α ∷ τ ∷ ό ∷ ς ∷ []) "2Tim.1.12" ∷ word (ἐ ∷ σ ∷ τ ∷ ι ∷ ν ∷ []) "2Tim.1.12" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "2Tim.1.12" ∷ word (π ∷ α ∷ ρ ∷ α ∷ θ ∷ ή ∷ κ ∷ η ∷ ν ∷ []) "2Tim.1.12" ∷ word (μ ∷ ο ∷ υ ∷ []) "2Tim.1.12" ∷ word (φ ∷ υ ∷ ∙λ ∷ ά ∷ ξ ∷ α ∷ ι ∷ []) "2Tim.1.12" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "2Tim.1.12" ∷ word (ἐ ∷ κ ∷ ε ∷ ί ∷ ν ∷ η ∷ ν ∷ []) "2Tim.1.12" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "2Tim.1.12" ∷ word (ἡ ∷ μ ∷ έ ∷ ρ ∷ α ∷ ν ∷ []) "2Tim.1.12" ∷ word (ὑ ∷ π ∷ ο ∷ τ ∷ ύ ∷ π ∷ ω ∷ σ ∷ ι ∷ ν ∷ []) "2Tim.1.13" ∷ word (ἔ ∷ χ ∷ ε ∷ []) "2Tim.1.13" ∷ word (ὑ ∷ γ ∷ ι ∷ α ∷ ι ∷ ν ∷ ό ∷ ν ∷ τ ∷ ω ∷ ν ∷ []) "2Tim.1.13" ∷ word (∙λ ∷ ό ∷ γ ∷ ω ∷ ν ∷ []) "2Tim.1.13" ∷ word (ὧ ∷ ν ∷ []) "2Tim.1.13" ∷ word (π ∷ α ∷ ρ ∷ []) "2Tim.1.13" ∷ word (ἐ ∷ μ ∷ ο ∷ ῦ ∷ []) "2Tim.1.13" ∷ word (ἤ ∷ κ ∷ ο ∷ υ ∷ σ ∷ α ∷ ς ∷ []) "2Tim.1.13" ∷ word (ἐ ∷ ν ∷ []) "2Tim.1.13" ∷ word (π ∷ ί ∷ σ ∷ τ ∷ ε ∷ ι ∷ []) "2Tim.1.13" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.1.13" ∷ word (ἀ ∷ γ ∷ ά ∷ π ∷ ῃ ∷ []) "2Tim.1.13" ∷ word (τ ∷ ῇ ∷ []) "2Tim.1.13" ∷ word (ἐ ∷ ν ∷ []) "2Tim.1.13" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ῷ ∷ []) "2Tim.1.13" ∷ word (Ἰ ∷ η ∷ σ ∷ ο ∷ ῦ ∷ []) "2Tim.1.13" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "2Tim.1.14" ∷ word (κ ∷ α ∷ ∙λ ∷ ὴ ∷ ν ∷ []) "2Tim.1.14" ∷ word (π ∷ α ∷ ρ ∷ α ∷ θ ∷ ή ∷ κ ∷ η ∷ ν ∷ []) "2Tim.1.14" ∷ word (φ ∷ ύ ∷ ∙λ ∷ α ∷ ξ ∷ ο ∷ ν ∷ []) "2Tim.1.14" ∷ word (δ ∷ ι ∷ ὰ ∷ []) "2Tim.1.14" ∷ word (π ∷ ν ∷ ε ∷ ύ ∷ μ ∷ α ∷ τ ∷ ο ∷ ς ∷ []) "2Tim.1.14" ∷ word (ἁ ∷ γ ∷ ί ∷ ο ∷ υ ∷ []) "2Tim.1.14" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "2Tim.1.14" ∷ word (ἐ ∷ ν ∷ ο ∷ ι ∷ κ ∷ ο ∷ ῦ ∷ ν ∷ τ ∷ ο ∷ ς ∷ []) "2Tim.1.14" ∷ word (ἐ ∷ ν ∷ []) "2Tim.1.14" ∷ word (ἡ ∷ μ ∷ ῖ ∷ ν ∷ []) "2Tim.1.14" ∷ word (Ο ∷ ἶ ∷ δ ∷ α ∷ ς ∷ []) "2Tim.1.15" ∷ word (τ ∷ ο ∷ ῦ ∷ τ ∷ ο ∷ []) "2Tim.1.15" ∷ word (ὅ ∷ τ ∷ ι ∷ []) "2Tim.1.15" ∷ word (ἀ ∷ π ∷ ε ∷ σ ∷ τ ∷ ρ ∷ ά ∷ φ ∷ η ∷ σ ∷ ά ∷ ν ∷ []) "2Tim.1.15" ∷ word (μ ∷ ε ∷ []) "2Tim.1.15" ∷ word (π ∷ ά ∷ ν ∷ τ ∷ ε ∷ ς ∷ []) "2Tim.1.15" ∷ word (ο ∷ ἱ ∷ []) "2Tim.1.15" ∷ word (ἐ ∷ ν ∷ []) "2Tim.1.15" ∷ word (τ ∷ ῇ ∷ []) "2Tim.1.15" ∷ word (Ἀ ∷ σ ∷ ί ∷ ᾳ ∷ []) "2Tim.1.15" ∷ word (ὧ ∷ ν ∷ []) "2Tim.1.15" ∷ word (ἐ ∷ σ ∷ τ ∷ ι ∷ ν ∷ []) "2Tim.1.15" ∷ word (Φ ∷ ύ ∷ γ ∷ ε ∷ ∙λ ∷ ο ∷ ς ∷ []) "2Tim.1.15" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.1.15" ∷ word (Ἑ ∷ ρ ∷ μ ∷ ο ∷ γ ∷ έ ∷ ν ∷ η ∷ ς ∷ []) "2Tim.1.15" ∷ word (δ ∷ ῴ ∷ η ∷ []) "2Tim.1.16" ∷ word (ἔ ∷ ∙λ ∷ ε ∷ ο ∷ ς ∷ []) "2Tim.1.16" ∷ word (ὁ ∷ []) "2Tim.1.16" ∷ word (κ ∷ ύ ∷ ρ ∷ ι ∷ ο ∷ ς ∷ []) "2Tim.1.16" ∷ word (τ ∷ ῷ ∷ []) "2Tim.1.16" ∷ word (Ὀ ∷ ν ∷ η ∷ σ ∷ ι ∷ φ ∷ ό ∷ ρ ∷ ο ∷ υ ∷ []) "2Tim.1.16" ∷ word (ο ∷ ἴ ∷ κ ∷ ῳ ∷ []) "2Tim.1.16" ∷ word (ὅ ∷ τ ∷ ι ∷ []) "2Tim.1.16" ∷ word (π ∷ ο ∷ ∙λ ∷ ∙λ ∷ ά ∷ κ ∷ ι ∷ ς ∷ []) "2Tim.1.16" ∷ word (μ ∷ ε ∷ []) "2Tim.1.16" ∷ word (ἀ ∷ ν ∷ έ ∷ ψ ∷ υ ∷ ξ ∷ ε ∷ ν ∷ []) "2Tim.1.16" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.1.16" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "2Tim.1.16" ∷ word (ἅ ∷ ∙λ ∷ υ ∷ σ ∷ ί ∷ ν ∷ []) "2Tim.1.16" ∷ word (μ ∷ ο ∷ υ ∷ []) "2Tim.1.16" ∷ word (ο ∷ ὐ ∷ κ ∷ []) "2Tim.1.16" ∷ word (ἐ ∷ π ∷ α ∷ ι ∷ σ ∷ χ ∷ ύ ∷ ν ∷ θ ∷ η ∷ []) "2Tim.1.16" ∷ word (ἀ ∷ ∙λ ∷ ∙λ ∷ ὰ ∷ []) "2Tim.1.17" ∷ word (γ ∷ ε ∷ ν ∷ ό ∷ μ ∷ ε ∷ ν ∷ ο ∷ ς ∷ []) "2Tim.1.17" ∷ word (ἐ ∷ ν ∷ []) "2Tim.1.17" ∷ word (Ῥ ∷ ώ ∷ μ ∷ ῃ ∷ []) "2Tim.1.17" ∷ word (σ ∷ π ∷ ο ∷ υ ∷ δ ∷ α ∷ ί ∷ ω ∷ ς ∷ []) "2Tim.1.17" ∷ word (ἐ ∷ ζ ∷ ή ∷ τ ∷ η ∷ σ ∷ έ ∷ ν ∷ []) "2Tim.1.17" ∷ word (μ ∷ ε ∷ []) "2Tim.1.17" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.1.17" ∷ word (ε ∷ ὗ ∷ ρ ∷ ε ∷ ν ∷ []) "2Tim.1.17" ∷ word (δ ∷ ῴ ∷ η ∷ []) "2Tim.1.18" ∷ word (α ∷ ὐ ∷ τ ∷ ῷ ∷ []) "2Tim.1.18" ∷ word (ὁ ∷ []) "2Tim.1.18" ∷ word (κ ∷ ύ ∷ ρ ∷ ι ∷ ο ∷ ς ∷ []) "2Tim.1.18" ∷ word (ε ∷ ὑ ∷ ρ ∷ ε ∷ ῖ ∷ ν ∷ []) "2Tim.1.18" ∷ word (ἔ ∷ ∙λ ∷ ε ∷ ο ∷ ς ∷ []) "2Tim.1.18" ∷ word (π ∷ α ∷ ρ ∷ ὰ ∷ []) "2Tim.1.18" ∷ word (κ ∷ υ ∷ ρ ∷ ί ∷ ο ∷ υ ∷ []) "2Tim.1.18" ∷ word (ἐ ∷ ν ∷ []) "2Tim.1.18" ∷ word (ἐ ∷ κ ∷ ε ∷ ί ∷ ν ∷ ῃ ∷ []) "2Tim.1.18" ∷ word (τ ∷ ῇ ∷ []) "2Tim.1.18" ∷ word (ἡ ∷ μ ∷ έ ∷ ρ ∷ ᾳ ∷ []) "2Tim.1.18" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.1.18" ∷ word (ὅ ∷ σ ∷ α ∷ []) "2Tim.1.18" ∷ word (ἐ ∷ ν ∷ []) "2Tim.1.18" ∷ word (Ἐ ∷ φ ∷ έ ∷ σ ∷ ῳ ∷ []) "2Tim.1.18" ∷ word (δ ∷ ι ∷ η ∷ κ ∷ ό ∷ ν ∷ η ∷ σ ∷ ε ∷ ν ∷ []) "2Tim.1.18" ∷ word (β ∷ έ ∷ ∙λ ∷ τ ∷ ι ∷ ο ∷ ν ∷ []) "2Tim.1.18" ∷ word (σ ∷ ὺ ∷ []) "2Tim.1.18" ∷ word (γ ∷ ι ∷ ν ∷ ώ ∷ σ ∷ κ ∷ ε ∷ ι ∷ ς ∷ []) "2Tim.1.18" ∷ word (Σ ∷ ὺ ∷ []) "2Tim.2.1" ∷ word (ο ∷ ὖ ∷ ν ∷ []) "2Tim.2.1" ∷ word (τ ∷ έ ∷ κ ∷ ν ∷ ο ∷ ν ∷ []) "2Tim.2.1" ∷ word (μ ∷ ο ∷ υ ∷ []) "2Tim.2.1" ∷ word (ἐ ∷ ν ∷ δ ∷ υ ∷ ν ∷ α ∷ μ ∷ ο ∷ ῦ ∷ []) "2Tim.2.1" ∷ word (ἐ ∷ ν ∷ []) "2Tim.2.1" ∷ word (τ ∷ ῇ ∷ []) "2Tim.2.1" ∷ word (χ ∷ ά ∷ ρ ∷ ι ∷ τ ∷ ι ∷ []) "2Tim.2.1" ∷ word (τ ∷ ῇ ∷ []) "2Tim.2.1" ∷ word (ἐ ∷ ν ∷ []) "2Tim.2.1" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ῷ ∷ []) "2Tim.2.1" ∷ word (Ἰ ∷ η ∷ σ ∷ ο ∷ ῦ ∷ []) "2Tim.2.1" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.2.2" ∷ word (ἃ ∷ []) "2Tim.2.2" ∷ word (ἤ ∷ κ ∷ ο ∷ υ ∷ σ ∷ α ∷ ς ∷ []) "2Tim.2.2" ∷ word (π ∷ α ∷ ρ ∷ []) "2Tim.2.2" ∷ word (ἐ ∷ μ ∷ ο ∷ ῦ ∷ []) "2Tim.2.2" ∷ word (δ ∷ ι ∷ ὰ ∷ []) "2Tim.2.2" ∷ word (π ∷ ο ∷ ∙λ ∷ ∙λ ∷ ῶ ∷ ν ∷ []) "2Tim.2.2" ∷ word (μ ∷ α ∷ ρ ∷ τ ∷ ύ ∷ ρ ∷ ω ∷ ν ∷ []) "2Tim.2.2" ∷ word (τ ∷ α ∷ ῦ ∷ τ ∷ α ∷ []) "2Tim.2.2" ∷ word (π ∷ α ∷ ρ ∷ ά ∷ θ ∷ ο ∷ υ ∷ []) "2Tim.2.2" ∷ word (π ∷ ι ∷ σ ∷ τ ∷ ο ∷ ῖ ∷ ς ∷ []) "2Tim.2.2" ∷ word (ἀ ∷ ν ∷ θ ∷ ρ ∷ ώ ∷ π ∷ ο ∷ ι ∷ ς ∷ []) "2Tim.2.2" ∷ word (ο ∷ ἵ ∷ τ ∷ ι ∷ ν ∷ ε ∷ ς ∷ []) "2Tim.2.2" ∷ word (ἱ ∷ κ ∷ α ∷ ν ∷ ο ∷ ὶ ∷ []) "2Tim.2.2" ∷ word (ἔ ∷ σ ∷ ο ∷ ν ∷ τ ∷ α ∷ ι ∷ []) "2Tim.2.2" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.2.2" ∷ word (ἑ ∷ τ ∷ έ ∷ ρ ∷ ο ∷ υ ∷ ς ∷ []) "2Tim.2.2" ∷ word (δ ∷ ι ∷ δ ∷ ά ∷ ξ ∷ α ∷ ι ∷ []) "2Tim.2.2" ∷ word (σ ∷ υ ∷ γ ∷ κ ∷ α ∷ κ ∷ ο ∷ π ∷ ά ∷ θ ∷ η ∷ σ ∷ ο ∷ ν ∷ []) "2Tim.2.3" ∷ word (ὡ ∷ ς ∷ []) "2Tim.2.3" ∷ word (κ ∷ α ∷ ∙λ ∷ ὸ ∷ ς ∷ []) "2Tim.2.3" ∷ word (σ ∷ τ ∷ ρ ∷ α ∷ τ ∷ ι ∷ ώ ∷ τ ∷ η ∷ ς ∷ []) "2Tim.2.3" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ο ∷ ῦ ∷ []) "2Tim.2.3" ∷ word (Ἰ ∷ η ∷ σ ∷ ο ∷ ῦ ∷ []) "2Tim.2.3" ∷ word (ο ∷ ὐ ∷ δ ∷ ε ∷ ὶ ∷ ς ∷ []) "2Tim.2.4" ∷ word (σ ∷ τ ∷ ρ ∷ α ∷ τ ∷ ε ∷ υ ∷ ό ∷ μ ∷ ε ∷ ν ∷ ο ∷ ς ∷ []) "2Tim.2.4" ∷ word (ἐ ∷ μ ∷ π ∷ ∙λ ∷ έ ∷ κ ∷ ε ∷ τ ∷ α ∷ ι ∷ []) "2Tim.2.4" ∷ word (τ ∷ α ∷ ῖ ∷ ς ∷ []) "2Tim.2.4" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "2Tim.2.4" ∷ word (β ∷ ί ∷ ο ∷ υ ∷ []) "2Tim.2.4" ∷ word (π ∷ ρ ∷ α ∷ γ ∷ μ ∷ α ∷ τ ∷ ε ∷ ί ∷ α ∷ ι ∷ ς ∷ []) "2Tim.2.4" ∷ word (ἵ ∷ ν ∷ α ∷ []) "2Tim.2.4" ∷ word (τ ∷ ῷ ∷ []) "2Tim.2.4" ∷ word (σ ∷ τ ∷ ρ ∷ α ∷ τ ∷ ο ∷ ∙λ ∷ ο ∷ γ ∷ ή ∷ σ ∷ α ∷ ν ∷ τ ∷ ι ∷ []) "2Tim.2.4" ∷ word (ἀ ∷ ρ ∷ έ ∷ σ ∷ ῃ ∷ []) "2Tim.2.4" ∷ word (ἐ ∷ ὰ ∷ ν ∷ []) "2Tim.2.5" ∷ word (δ ∷ ὲ ∷ []) "2Tim.2.5" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.2.5" ∷ word (ἀ ∷ θ ∷ ∙λ ∷ ῇ ∷ []) "2Tim.2.5" ∷ word (τ ∷ ι ∷ ς ∷ []) "2Tim.2.5" ∷ word (ο ∷ ὐ ∷ []) "2Tim.2.5" ∷ word (σ ∷ τ ∷ ε ∷ φ ∷ α ∷ ν ∷ ο ∷ ῦ ∷ τ ∷ α ∷ ι ∷ []) "2Tim.2.5" ∷ word (ἐ ∷ ὰ ∷ ν ∷ []) "2Tim.2.5" ∷ word (μ ∷ ὴ ∷ []) "2Tim.2.5" ∷ word (ν ∷ ο ∷ μ ∷ ί ∷ μ ∷ ω ∷ ς ∷ []) "2Tim.2.5" ∷ word (ἀ ∷ θ ∷ ∙λ ∷ ή ∷ σ ∷ ῃ ∷ []) "2Tim.2.5" ∷ word (τ ∷ ὸ ∷ ν ∷ []) "2Tim.2.6" ∷ word (κ ∷ ο ∷ π ∷ ι ∷ ῶ ∷ ν ∷ τ ∷ α ∷ []) "2Tim.2.6" ∷ word (γ ∷ ε ∷ ω ∷ ρ ∷ γ ∷ ὸ ∷ ν ∷ []) "2Tim.2.6" ∷ word (δ ∷ ε ∷ ῖ ∷ []) "2Tim.2.6" ∷ word (π ∷ ρ ∷ ῶ ∷ τ ∷ ο ∷ ν ∷ []) "2Tim.2.6" ∷ word (τ ∷ ῶ ∷ ν ∷ []) "2Tim.2.6" ∷ word (κ ∷ α ∷ ρ ∷ π ∷ ῶ ∷ ν ∷ []) "2Tim.2.6" ∷ word (μ ∷ ε ∷ τ ∷ α ∷ ∙λ ∷ α ∷ μ ∷ β ∷ ά ∷ ν ∷ ε ∷ ι ∷ ν ∷ []) "2Tim.2.6" ∷ word (ν ∷ ό ∷ ε ∷ ι ∷ []) "2Tim.2.7" ∷ word (ὃ ∷ []) "2Tim.2.7" ∷ word (∙λ ∷ έ ∷ γ ∷ ω ∷ []) "2Tim.2.7" ∷ word (δ ∷ ώ ∷ σ ∷ ε ∷ ι ∷ []) "2Tim.2.7" ∷ word (γ ∷ ά ∷ ρ ∷ []) "2Tim.2.7" ∷ word (σ ∷ ο ∷ ι ∷ []) "2Tim.2.7" ∷ word (ὁ ∷ []) "2Tim.2.7" ∷ word (κ ∷ ύ ∷ ρ ∷ ι ∷ ο ∷ ς ∷ []) "2Tim.2.7" ∷ word (σ ∷ ύ ∷ ν ∷ ε ∷ σ ∷ ι ∷ ν ∷ []) "2Tim.2.7" ∷ word (ἐ ∷ ν ∷ []) "2Tim.2.7" ∷ word (π ∷ ᾶ ∷ σ ∷ ι ∷ ν ∷ []) "2Tim.2.7" ∷ word (Μ ∷ ν ∷ η ∷ μ ∷ ό ∷ ν ∷ ε ∷ υ ∷ ε ∷ []) "2Tim.2.8" ∷ word (Ἰ ∷ η ∷ σ ∷ ο ∷ ῦ ∷ ν ∷ []) "2Tim.2.8" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ὸ ∷ ν ∷ []) "2Tim.2.8" ∷ word (ἐ ∷ γ ∷ η ∷ γ ∷ ε ∷ ρ ∷ μ ∷ έ ∷ ν ∷ ο ∷ ν ∷ []) "2Tim.2.8" ∷ word (ἐ ∷ κ ∷ []) "2Tim.2.8" ∷ word (ν ∷ ε ∷ κ ∷ ρ ∷ ῶ ∷ ν ∷ []) "2Tim.2.8" ∷ word (ἐ ∷ κ ∷ []) "2Tim.2.8" ∷ word (σ ∷ π ∷ έ ∷ ρ ∷ μ ∷ α ∷ τ ∷ ο ∷ ς ∷ []) "2Tim.2.8" ∷ word (Δ ∷ α ∷ υ ∷ ί ∷ δ ∷ []) "2Tim.2.8" ∷ word (κ ∷ α ∷ τ ∷ ὰ ∷ []) "2Tim.2.8" ∷ word (τ ∷ ὸ ∷ []) "2Tim.2.8" ∷ word (ε ∷ ὐ ∷ α ∷ γ ∷ γ ∷ έ ∷ ∙λ ∷ ι ∷ ό ∷ ν ∷ []) "2Tim.2.8" ∷ word (μ ∷ ο ∷ υ ∷ []) "2Tim.2.8" ∷ word (ἐ ∷ ν ∷ []) "2Tim.2.9" ∷ word (ᾧ ∷ []) "2Tim.2.9" ∷ word (κ ∷ α ∷ κ ∷ ο ∷ π ∷ α ∷ θ ∷ ῶ ∷ []) "2Tim.2.9" ∷ word (μ ∷ έ ∷ χ ∷ ρ ∷ ι ∷ []) "2Tim.2.9" ∷ word (δ ∷ ε ∷ σ ∷ μ ∷ ῶ ∷ ν ∷ []) "2Tim.2.9" ∷ word (ὡ ∷ ς ∷ []) "2Tim.2.9" ∷ word (κ ∷ α ∷ κ ∷ ο ∷ ῦ ∷ ρ ∷ γ ∷ ο ∷ ς ∷ []) "2Tim.2.9" ∷ word (ἀ ∷ ∙λ ∷ ∙λ ∷ ὰ ∷ []) "2Tim.2.9" ∷ word (ὁ ∷ []) "2Tim.2.9" ∷ word (∙λ ∷ ό ∷ γ ∷ ο ∷ ς ∷ []) "2Tim.2.9" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "2Tim.2.9" ∷ word (θ ∷ ε ∷ ο ∷ ῦ ∷ []) "2Tim.2.9" ∷ word (ο ∷ ὐ ∷ []) "2Tim.2.9" ∷ word (δ ∷ έ ∷ δ ∷ ε ∷ τ ∷ α ∷ ι ∷ []) "2Tim.2.9" ∷ word (δ ∷ ι ∷ ὰ ∷ []) "2Tim.2.10" ∷ word (τ ∷ ο ∷ ῦ ∷ τ ∷ ο ∷ []) "2Tim.2.10" ∷ word (π ∷ ά ∷ ν ∷ τ ∷ α ∷ []) "2Tim.2.10" ∷ word (ὑ ∷ π ∷ ο ∷ μ ∷ έ ∷ ν ∷ ω ∷ []) "2Tim.2.10" ∷ word (δ ∷ ι ∷ ὰ ∷ []) "2Tim.2.10" ∷ word (τ ∷ ο ∷ ὺ ∷ ς ∷ []) "2Tim.2.10" ∷ word (ἐ ∷ κ ∷ ∙λ ∷ ε ∷ κ ∷ τ ∷ ο ∷ ύ ∷ ς ∷ []) "2Tim.2.10" ∷ word (ἵ ∷ ν ∷ α ∷ []) "2Tim.2.10" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.2.10" ∷ word (α ∷ ὐ ∷ τ ∷ ο ∷ ὶ ∷ []) "2Tim.2.10" ∷ word (σ ∷ ω ∷ τ ∷ η ∷ ρ ∷ ί ∷ α ∷ ς ∷ []) "2Tim.2.10" ∷ word (τ ∷ ύ ∷ χ ∷ ω ∷ σ ∷ ι ∷ ν ∷ []) "2Tim.2.10" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "2Tim.2.10" ∷ word (ἐ ∷ ν ∷ []) "2Tim.2.10" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ῷ ∷ []) "2Tim.2.10" ∷ word (Ἰ ∷ η ∷ σ ∷ ο ∷ ῦ ∷ []) "2Tim.2.10" ∷ word (μ ∷ ε ∷ τ ∷ ὰ ∷ []) "2Tim.2.10" ∷ word (δ ∷ ό ∷ ξ ∷ η ∷ ς ∷ []) "2Tim.2.10" ∷ word (α ∷ ἰ ∷ ω ∷ ν ∷ ί ∷ ο ∷ υ ∷ []) "2Tim.2.10" ∷ word (π ∷ ι ∷ σ ∷ τ ∷ ὸ ∷ ς ∷ []) "2Tim.2.11" ∷ word (ὁ ∷ []) "2Tim.2.11" ∷ word (∙λ ∷ ό ∷ γ ∷ ο ∷ ς ∷ []) "2Tim.2.11" ∷ word (ε ∷ ἰ ∷ []) "2Tim.2.11" ∷ word (γ ∷ ὰ ∷ ρ ∷ []) "2Tim.2.11" ∷ word (σ ∷ υ ∷ ν ∷ α ∷ π ∷ ε ∷ θ ∷ ά ∷ ν ∷ ο ∷ μ ∷ ε ∷ ν ∷ []) "2Tim.2.11" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.2.11" ∷ word (σ ∷ υ ∷ ζ ∷ ή ∷ σ ∷ ο ∷ μ ∷ ε ∷ ν ∷ []) "2Tim.2.11" ∷ word (ε ∷ ἰ ∷ []) "2Tim.2.12" ∷ word (ὑ ∷ π ∷ ο ∷ μ ∷ έ ∷ ν ∷ ο ∷ μ ∷ ε ∷ ν ∷ []) "2Tim.2.12" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.2.12" ∷ word (σ ∷ υ ∷ μ ∷ β ∷ α ∷ σ ∷ ι ∷ ∙λ ∷ ε ∷ ύ ∷ σ ∷ ο ∷ μ ∷ ε ∷ ν ∷ []) "2Tim.2.12" ∷ word (ε ∷ ἰ ∷ []) "2Tim.2.12" ∷ word (ἀ ∷ ρ ∷ ν ∷ η ∷ σ ∷ ό ∷ μ ∷ ε ∷ θ ∷ α ∷ []) "2Tim.2.12" ∷ word (κ ∷ ἀ ∷ κ ∷ ε ∷ ῖ ∷ ν ∷ ο ∷ ς ∷ []) "2Tim.2.12" ∷ word (ἀ ∷ ρ ∷ ν ∷ ή ∷ σ ∷ ε ∷ τ ∷ α ∷ ι ∷ []) "2Tim.2.12" ∷ word (ἡ ∷ μ ∷ ᾶ ∷ ς ∷ []) "2Tim.2.12" ∷ word (ε ∷ ἰ ∷ []) "2Tim.2.13" ∷ word (ἀ ∷ π ∷ ι ∷ σ ∷ τ ∷ ο ∷ ῦ ∷ μ ∷ ε ∷ ν ∷ []) "2Tim.2.13" ∷ word (ἐ ∷ κ ∷ ε ∷ ῖ ∷ ν ∷ ο ∷ ς ∷ []) "2Tim.2.13" ∷ word (π ∷ ι ∷ σ ∷ τ ∷ ὸ ∷ ς ∷ []) "2Tim.2.13" ∷ word (μ ∷ έ ∷ ν ∷ ε ∷ ι ∷ []) "2Tim.2.13" ∷ word (ἀ ∷ ρ ∷ ν ∷ ή ∷ σ ∷ α ∷ σ ∷ θ ∷ α ∷ ι ∷ []) "2Tim.2.13" ∷ word (ἑ ∷ α ∷ υ ∷ τ ∷ ὸ ∷ ν ∷ []) "2Tim.2.13" ∷ word (ο ∷ ὐ ∷ []) "2Tim.2.13" ∷ word (δ ∷ ύ ∷ ν ∷ α ∷ τ ∷ α ∷ ι ∷ []) "2Tim.2.13" ∷ word (Τ ∷ α ∷ ῦ ∷ τ ∷ α ∷ []) "2Tim.2.14" ∷ word (ὑ ∷ π ∷ ο ∷ μ ∷ ί ∷ μ ∷ ν ∷ ῃ ∷ σ ∷ κ ∷ ε ∷ []) "2Tim.2.14" ∷ word (δ ∷ ι ∷ α ∷ μ ∷ α ∷ ρ ∷ τ ∷ υ ∷ ρ ∷ ό ∷ μ ∷ ε ∷ ν ∷ ο ∷ ς ∷ []) "2Tim.2.14" ∷ word (ἐ ∷ ν ∷ ώ ∷ π ∷ ι ∷ ο ∷ ν ∷ []) "2Tim.2.14" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "2Tim.2.14" ∷ word (κ ∷ υ ∷ ρ ∷ ί ∷ ο ∷ υ ∷ []) "2Tim.2.14" ∷ word (μ ∷ ὴ ∷ []) "2Tim.2.14" ∷ word (∙λ ∷ ο ∷ γ ∷ ο ∷ μ ∷ α ∷ χ ∷ ε ∷ ῖ ∷ ν ∷ []) "2Tim.2.14" ∷ word (ἐ ∷ π ∷ []) "2Tim.2.14" ∷ word (ο ∷ ὐ ∷ δ ∷ ὲ ∷ ν ∷ []) "2Tim.2.14" ∷ word (χ ∷ ρ ∷ ή ∷ σ ∷ ι ∷ μ ∷ ο ∷ ν ∷ []) "2Tim.2.14" ∷ word (ἐ ∷ π ∷ ὶ ∷ []) "2Tim.2.14" ∷ word (κ ∷ α ∷ τ ∷ α ∷ σ ∷ τ ∷ ρ ∷ ο ∷ φ ∷ ῇ ∷ []) "2Tim.2.14" ∷ word (τ ∷ ῶ ∷ ν ∷ []) "2Tim.2.14" ∷ word (ἀ ∷ κ ∷ ο ∷ υ ∷ ό ∷ ν ∷ τ ∷ ω ∷ ν ∷ []) "2Tim.2.14" ∷ word (σ ∷ π ∷ ο ∷ ύ ∷ δ ∷ α ∷ σ ∷ ο ∷ ν ∷ []) "2Tim.2.15" ∷ word (σ ∷ ε ∷ α ∷ υ ∷ τ ∷ ὸ ∷ ν ∷ []) "2Tim.2.15" ∷ word (δ ∷ ό ∷ κ ∷ ι ∷ μ ∷ ο ∷ ν ∷ []) "2Tim.2.15" ∷ word (π ∷ α ∷ ρ ∷ α ∷ σ ∷ τ ∷ ῆ ∷ σ ∷ α ∷ ι ∷ []) "2Tim.2.15" ∷ word (τ ∷ ῷ ∷ []) "2Tim.2.15" ∷ word (θ ∷ ε ∷ ῷ ∷ []) "2Tim.2.15" ∷ word (ἐ ∷ ρ ∷ γ ∷ ά ∷ τ ∷ η ∷ ν ∷ []) "2Tim.2.15" ∷ word (ἀ ∷ ν ∷ ε ∷ π ∷ α ∷ ί ∷ σ ∷ χ ∷ υ ∷ ν ∷ τ ∷ ο ∷ ν ∷ []) "2Tim.2.15" ∷ word (ὀ ∷ ρ ∷ θ ∷ ο ∷ τ ∷ ο ∷ μ ∷ ο ∷ ῦ ∷ ν ∷ τ ∷ α ∷ []) "2Tim.2.15" ∷ word (τ ∷ ὸ ∷ ν ∷ []) "2Tim.2.15" ∷ word (∙λ ∷ ό ∷ γ ∷ ο ∷ ν ∷ []) "2Tim.2.15" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "2Tim.2.15" ∷ word (ἀ ∷ ∙λ ∷ η ∷ θ ∷ ε ∷ ί ∷ α ∷ ς ∷ []) "2Tim.2.15" ∷ word (τ ∷ ὰ ∷ ς ∷ []) "2Tim.2.16" ∷ word (δ ∷ ὲ ∷ []) "2Tim.2.16" ∷ word (β ∷ ε ∷ β ∷ ή ∷ ∙λ ∷ ο ∷ υ ∷ ς ∷ []) "2Tim.2.16" ∷ word (κ ∷ ε ∷ ν ∷ ο ∷ φ ∷ ω ∷ ν ∷ ί ∷ α ∷ ς ∷ []) "2Tim.2.16" ∷ word (π ∷ ε ∷ ρ ∷ ι ∷ ΐ ∷ σ ∷ τ ∷ α ∷ σ ∷ ο ∷ []) "2Tim.2.16" ∷ word (ἐ ∷ π ∷ ὶ ∷ []) "2Tim.2.16" ∷ word (π ∷ ∙λ ∷ ε ∷ ῖ ∷ ο ∷ ν ∷ []) "2Tim.2.16" ∷ word (γ ∷ ὰ ∷ ρ ∷ []) "2Tim.2.16" ∷ word (π ∷ ρ ∷ ο ∷ κ ∷ ό ∷ ψ ∷ ο ∷ υ ∷ σ ∷ ι ∷ ν ∷ []) "2Tim.2.16" ∷ word (ἀ ∷ σ ∷ ε ∷ β ∷ ε ∷ ί ∷ α ∷ ς ∷ []) "2Tim.2.16" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.2.17" ∷ word (ὁ ∷ []) "2Tim.2.17" ∷ word (∙λ ∷ ό ∷ γ ∷ ο ∷ ς ∷ []) "2Tim.2.17" ∷ word (α ∷ ὐ ∷ τ ∷ ῶ ∷ ν ∷ []) "2Tim.2.17" ∷ word (ὡ ∷ ς ∷ []) "2Tim.2.17" ∷ word (γ ∷ ά ∷ γ ∷ γ ∷ ρ ∷ α ∷ ι ∷ ν ∷ α ∷ []) "2Tim.2.17" ∷ word (ν ∷ ο ∷ μ ∷ ὴ ∷ ν ∷ []) "2Tim.2.17" ∷ word (ἕ ∷ ξ ∷ ε ∷ ι ∷ []) "2Tim.2.17" ∷ word (ὧ ∷ ν ∷ []) "2Tim.2.17" ∷ word (ἐ ∷ σ ∷ τ ∷ ι ∷ ν ∷ []) "2Tim.2.17" ∷ word (Ὑ ∷ μ ∷ έ ∷ ν ∷ α ∷ ι ∷ ο ∷ ς ∷ []) "2Tim.2.17" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.2.17" ∷ word (Φ ∷ ί ∷ ∙λ ∷ η ∷ τ ∷ ο ∷ ς ∷ []) "2Tim.2.17" ∷ word (ο ∷ ἵ ∷ τ ∷ ι ∷ ν ∷ ε ∷ ς ∷ []) "2Tim.2.18" ∷ word (π ∷ ε ∷ ρ ∷ ὶ ∷ []) "2Tim.2.18" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "2Tim.2.18" ∷ word (ἀ ∷ ∙λ ∷ ή ∷ θ ∷ ε ∷ ι ∷ α ∷ ν ∷ []) "2Tim.2.18" ∷ word (ἠ ∷ σ ∷ τ ∷ ό ∷ χ ∷ η ∷ σ ∷ α ∷ ν ∷ []) "2Tim.2.18" ∷ word (∙λ ∷ έ ∷ γ ∷ ο ∷ ν ∷ τ ∷ ε ∷ ς ∷ []) "2Tim.2.18" ∷ word (ἀ ∷ ν ∷ ά ∷ σ ∷ τ ∷ α ∷ σ ∷ ι ∷ ν ∷ []) "2Tim.2.18" ∷ word (ἤ ∷ δ ∷ η ∷ []) "2Tim.2.18" ∷ word (γ ∷ ε ∷ γ ∷ ο ∷ ν ∷ έ ∷ ν ∷ α ∷ ι ∷ []) "2Tim.2.18" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.2.18" ∷ word (ἀ ∷ ν ∷ α ∷ τ ∷ ρ ∷ έ ∷ π ∷ ο ∷ υ ∷ σ ∷ ι ∷ ν ∷ []) "2Tim.2.18" ∷ word (τ ∷ ή ∷ ν ∷ []) "2Tim.2.18" ∷ word (τ ∷ ι ∷ ν ∷ ω ∷ ν ∷ []) "2Tim.2.18" ∷ word (π ∷ ί ∷ σ ∷ τ ∷ ι ∷ ν ∷ []) "2Tim.2.18" ∷ word (ὁ ∷ []) "2Tim.2.19" ∷ word (μ ∷ έ ∷ ν ∷ τ ∷ ο ∷ ι ∷ []) "2Tim.2.19" ∷ word (σ ∷ τ ∷ ε ∷ ρ ∷ ε ∷ ὸ ∷ ς ∷ []) "2Tim.2.19" ∷ word (θ ∷ ε ∷ μ ∷ έ ∷ ∙λ ∷ ι ∷ ο ∷ ς ∷ []) "2Tim.2.19" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "2Tim.2.19" ∷ word (θ ∷ ε ∷ ο ∷ ῦ ∷ []) "2Tim.2.19" ∷ word (ἕ ∷ σ ∷ τ ∷ η ∷ κ ∷ ε ∷ ν ∷ []) "2Tim.2.19" ∷ word (ἔ ∷ χ ∷ ω ∷ ν ∷ []) "2Tim.2.19" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "2Tim.2.19" ∷ word (σ ∷ φ ∷ ρ ∷ α ∷ γ ∷ ῖ ∷ δ ∷ α ∷ []) "2Tim.2.19" ∷ word (τ ∷ α ∷ ύ ∷ τ ∷ η ∷ ν ∷ []) "2Tim.2.19" ∷ word (Ἔ ∷ γ ∷ ν ∷ ω ∷ []) "2Tim.2.19" ∷ word (κ ∷ ύ ∷ ρ ∷ ι ∷ ο ∷ ς ∷ []) "2Tim.2.19" ∷ word (τ ∷ ο ∷ ὺ ∷ ς ∷ []) "2Tim.2.19" ∷ word (ὄ ∷ ν ∷ τ ∷ α ∷ ς ∷ []) "2Tim.2.19" ∷ word (α ∷ ὐ ∷ τ ∷ ο ∷ ῦ ∷ []) "2Tim.2.19" ∷ word (κ ∷ α ∷ ί ∷ []) "2Tim.2.19" ∷ word (Ἀ ∷ π ∷ ο ∷ σ ∷ τ ∷ ή ∷ τ ∷ ω ∷ []) "2Tim.2.19" ∷ word (ἀ ∷ π ∷ ὸ ∷ []) "2Tim.2.19" ∷ word (ἀ ∷ δ ∷ ι ∷ κ ∷ ί ∷ α ∷ ς ∷ []) "2Tim.2.19" ∷ word (π ∷ ᾶ ∷ ς ∷ []) "2Tim.2.19" ∷ word (ὁ ∷ []) "2Tim.2.19" ∷ word (ὀ ∷ ν ∷ ο ∷ μ ∷ ά ∷ ζ ∷ ω ∷ ν ∷ []) "2Tim.2.19" ∷ word (τ ∷ ὸ ∷ []) "2Tim.2.19" ∷ word (ὄ ∷ ν ∷ ο ∷ μ ∷ α ∷ []) "2Tim.2.19" ∷ word (κ ∷ υ ∷ ρ ∷ ί ∷ ο ∷ υ ∷ []) "2Tim.2.19" ∷ word (Ἐ ∷ ν ∷ []) "2Tim.2.20" ∷ word (μ ∷ ε ∷ γ ∷ ά ∷ ∙λ ∷ ῃ ∷ []) "2Tim.2.20" ∷ word (δ ∷ ὲ ∷ []) "2Tim.2.20" ∷ word (ο ∷ ἰ ∷ κ ∷ ί ∷ ᾳ ∷ []) "2Tim.2.20" ∷ word (ο ∷ ὐ ∷ κ ∷ []) "2Tim.2.20" ∷ word (ἔ ∷ σ ∷ τ ∷ ι ∷ ν ∷ []) "2Tim.2.20" ∷ word (μ ∷ ό ∷ ν ∷ ο ∷ ν ∷ []) "2Tim.2.20" ∷ word (σ ∷ κ ∷ ε ∷ ύ ∷ η ∷ []) "2Tim.2.20" ∷ word (χ ∷ ρ ∷ υ ∷ σ ∷ ᾶ ∷ []) "2Tim.2.20" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.2.20" ∷ word (ἀ ∷ ρ ∷ γ ∷ υ ∷ ρ ∷ ᾶ ∷ []) "2Tim.2.20" ∷ word (ἀ ∷ ∙λ ∷ ∙λ ∷ ὰ ∷ []) "2Tim.2.20" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.2.20" ∷ word (ξ ∷ ύ ∷ ∙λ ∷ ι ∷ ν ∷ α ∷ []) "2Tim.2.20" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.2.20" ∷ word (ὀ ∷ σ ∷ τ ∷ ρ ∷ ά ∷ κ ∷ ι ∷ ν ∷ α ∷ []) "2Tim.2.20" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.2.20" ∷ word (ἃ ∷ []) "2Tim.2.20" ∷ word (μ ∷ ὲ ∷ ν ∷ []) "2Tim.2.20" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "2Tim.2.20" ∷ word (τ ∷ ι ∷ μ ∷ ὴ ∷ ν ∷ []) "2Tim.2.20" ∷ word (ἃ ∷ []) "2Tim.2.20" ∷ word (δ ∷ ὲ ∷ []) "2Tim.2.20" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "2Tim.2.20" ∷ word (ἀ ∷ τ ∷ ι ∷ μ ∷ ί ∷ α ∷ ν ∷ []) "2Tim.2.20" ∷ word (ἐ ∷ ὰ ∷ ν ∷ []) "2Tim.2.21" ∷ word (ο ∷ ὖ ∷ ν ∷ []) "2Tim.2.21" ∷ word (τ ∷ ι ∷ ς ∷ []) "2Tim.2.21" ∷ word (ἐ ∷ κ ∷ κ ∷ α ∷ θ ∷ ά ∷ ρ ∷ ῃ ∷ []) "2Tim.2.21" ∷ word (ἑ ∷ α ∷ υ ∷ τ ∷ ὸ ∷ ν ∷ []) "2Tim.2.21" ∷ word (ἀ ∷ π ∷ ὸ ∷ []) "2Tim.2.21" ∷ word (τ ∷ ο ∷ ύ ∷ τ ∷ ω ∷ ν ∷ []) "2Tim.2.21" ∷ word (ἔ ∷ σ ∷ τ ∷ α ∷ ι ∷ []) "2Tim.2.21" ∷ word (σ ∷ κ ∷ ε ∷ ῦ ∷ ο ∷ ς ∷ []) "2Tim.2.21" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "2Tim.2.21" ∷ word (τ ∷ ι ∷ μ ∷ ή ∷ ν ∷ []) "2Tim.2.21" ∷ word (ἡ ∷ γ ∷ ι ∷ α ∷ σ ∷ μ ∷ έ ∷ ν ∷ ο ∷ ν ∷ []) "2Tim.2.21" ∷ word (ε ∷ ὔ ∷ χ ∷ ρ ∷ η ∷ σ ∷ τ ∷ ο ∷ ν ∷ []) "2Tim.2.21" ∷ word (τ ∷ ῷ ∷ []) "2Tim.2.21" ∷ word (δ ∷ ε ∷ σ ∷ π ∷ ό ∷ τ ∷ ῃ ∷ []) "2Tim.2.21" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "2Tim.2.21" ∷ word (π ∷ ᾶ ∷ ν ∷ []) "2Tim.2.21" ∷ word (ἔ ∷ ρ ∷ γ ∷ ο ∷ ν ∷ []) "2Tim.2.21" ∷ word (ἀ ∷ γ ∷ α ∷ θ ∷ ὸ ∷ ν ∷ []) "2Tim.2.21" ∷ word (ἡ ∷ τ ∷ ο ∷ ι ∷ μ ∷ α ∷ σ ∷ μ ∷ έ ∷ ν ∷ ο ∷ ν ∷ []) "2Tim.2.21" ∷ word (τ ∷ ὰ ∷ ς ∷ []) "2Tim.2.22" ∷ word (δ ∷ ὲ ∷ []) "2Tim.2.22" ∷ word (ν ∷ ε ∷ ω ∷ τ ∷ ε ∷ ρ ∷ ι ∷ κ ∷ ὰ ∷ ς ∷ []) "2Tim.2.22" ∷ word (ἐ ∷ π ∷ ι ∷ θ ∷ υ ∷ μ ∷ ί ∷ α ∷ ς ∷ []) "2Tim.2.22" ∷ word (φ ∷ ε ∷ ῦ ∷ γ ∷ ε ∷ []) "2Tim.2.22" ∷ word (δ ∷ ί ∷ ω ∷ κ ∷ ε ∷ []) "2Tim.2.22" ∷ word (δ ∷ ὲ ∷ []) "2Tim.2.22" ∷ word (δ ∷ ι ∷ κ ∷ α ∷ ι ∷ ο ∷ σ ∷ ύ ∷ ν ∷ η ∷ ν ∷ []) "2Tim.2.22" ∷ word (π ∷ ί ∷ σ ∷ τ ∷ ι ∷ ν ∷ []) "2Tim.2.22" ∷ word (ἀ ∷ γ ∷ ά ∷ π ∷ η ∷ ν ∷ []) "2Tim.2.22" ∷ word (ε ∷ ἰ ∷ ρ ∷ ή ∷ ν ∷ η ∷ ν ∷ []) "2Tim.2.22" ∷ word (μ ∷ ε ∷ τ ∷ ὰ ∷ []) "2Tim.2.22" ∷ word (τ ∷ ῶ ∷ ν ∷ []) "2Tim.2.22" ∷ word (ἐ ∷ π ∷ ι ∷ κ ∷ α ∷ ∙λ ∷ ο ∷ υ ∷ μ ∷ έ ∷ ν ∷ ω ∷ ν ∷ []) "2Tim.2.22" ∷ word (τ ∷ ὸ ∷ ν ∷ []) "2Tim.2.22" ∷ word (κ ∷ ύ ∷ ρ ∷ ι ∷ ο ∷ ν ∷ []) "2Tim.2.22" ∷ word (ἐ ∷ κ ∷ []) "2Tim.2.22" ∷ word (κ ∷ α ∷ θ ∷ α ∷ ρ ∷ ᾶ ∷ ς ∷ []) "2Tim.2.22" ∷ word (κ ∷ α ∷ ρ ∷ δ ∷ ί ∷ α ∷ ς ∷ []) "2Tim.2.22" ∷ word (τ ∷ ὰ ∷ ς ∷ []) "2Tim.2.23" ∷ word (δ ∷ ὲ ∷ []) "2Tim.2.23" ∷ word (μ ∷ ω ∷ ρ ∷ ὰ ∷ ς ∷ []) "2Tim.2.23" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.2.23" ∷ word (ἀ ∷ π ∷ α ∷ ι ∷ δ ∷ ε ∷ ύ ∷ τ ∷ ο ∷ υ ∷ ς ∷ []) "2Tim.2.23" ∷ word (ζ ∷ η ∷ τ ∷ ή ∷ σ ∷ ε ∷ ι ∷ ς ∷ []) "2Tim.2.23" ∷ word (π ∷ α ∷ ρ ∷ α ∷ ι ∷ τ ∷ ο ∷ ῦ ∷ []) "2Tim.2.23" ∷ word (ε ∷ ἰ ∷ δ ∷ ὼ ∷ ς ∷ []) "2Tim.2.23" ∷ word (ὅ ∷ τ ∷ ι ∷ []) "2Tim.2.23" ∷ word (γ ∷ ε ∷ ν ∷ ν ∷ ῶ ∷ σ ∷ ι ∷ []) "2Tim.2.23" ∷ word (μ ∷ ά ∷ χ ∷ α ∷ ς ∷ []) "2Tim.2.23" ∷ word (δ ∷ ο ∷ ῦ ∷ ∙λ ∷ ο ∷ ν ∷ []) "2Tim.2.24" ∷ word (δ ∷ ὲ ∷ []) "2Tim.2.24" ∷ word (κ ∷ υ ∷ ρ ∷ ί ∷ ο ∷ υ ∷ []) "2Tim.2.24" ∷ word (ο ∷ ὐ ∷ []) "2Tim.2.24" ∷ word (δ ∷ ε ∷ ῖ ∷ []) "2Tim.2.24" ∷ word (μ ∷ ά ∷ χ ∷ ε ∷ σ ∷ θ ∷ α ∷ ι ∷ []) "2Tim.2.24" ∷ word (ἀ ∷ ∙λ ∷ ∙λ ∷ ὰ ∷ []) "2Tim.2.24" ∷ word (ἤ ∷ π ∷ ι ∷ ο ∷ ν ∷ []) "2Tim.2.24" ∷ word (ε ∷ ἶ ∷ ν ∷ α ∷ ι ∷ []) "2Tim.2.24" ∷ word (π ∷ ρ ∷ ὸ ∷ ς ∷ []) "2Tim.2.24" ∷ word (π ∷ ά ∷ ν ∷ τ ∷ α ∷ ς ∷ []) "2Tim.2.24" ∷ word (δ ∷ ι ∷ δ ∷ α ∷ κ ∷ τ ∷ ι ∷ κ ∷ ό ∷ ν ∷ []) "2Tim.2.24" ∷ word (ἀ ∷ ν ∷ ε ∷ ξ ∷ ί ∷ κ ∷ α ∷ κ ∷ ο ∷ ν ∷ []) "2Tim.2.24" ∷ word (ἐ ∷ ν ∷ []) "2Tim.2.25" ∷ word (π ∷ ρ ∷ α ∷ ΰ ∷ τ ∷ η ∷ τ ∷ ι ∷ []) "2Tim.2.25" ∷ word (π ∷ α ∷ ι ∷ δ ∷ ε ∷ ύ ∷ ο ∷ ν ∷ τ ∷ α ∷ []) "2Tim.2.25" ∷ word (τ ∷ ο ∷ ὺ ∷ ς ∷ []) "2Tim.2.25" ∷ word (ἀ ∷ ν ∷ τ ∷ ι ∷ δ ∷ ι ∷ α ∷ τ ∷ ι ∷ θ ∷ ε ∷ μ ∷ έ ∷ ν ∷ ο ∷ υ ∷ ς ∷ []) "2Tim.2.25" ∷ word (μ ∷ ή ∷ π ∷ ο ∷ τ ∷ ε ∷ []) "2Tim.2.25" ∷ word (δ ∷ ώ ∷ ῃ ∷ []) "2Tim.2.25" ∷ word (α ∷ ὐ ∷ τ ∷ ο ∷ ῖ ∷ ς ∷ []) "2Tim.2.25" ∷ word (ὁ ∷ []) "2Tim.2.25" ∷ word (θ ∷ ε ∷ ὸ ∷ ς ∷ []) "2Tim.2.25" ∷ word (μ ∷ ε ∷ τ ∷ ά ∷ ν ∷ ο ∷ ι ∷ α ∷ ν ∷ []) "2Tim.2.25" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "2Tim.2.25" ∷ word (ἐ ∷ π ∷ ί ∷ γ ∷ ν ∷ ω ∷ σ ∷ ι ∷ ν ∷ []) "2Tim.2.25" ∷ word (ἀ ∷ ∙λ ∷ η ∷ θ ∷ ε ∷ ί ∷ α ∷ ς ∷ []) "2Tim.2.25" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.2.26" ∷ word (ἀ ∷ ν ∷ α ∷ ν ∷ ή ∷ ψ ∷ ω ∷ σ ∷ ι ∷ ν ∷ []) "2Tim.2.26" ∷ word (ἐ ∷ κ ∷ []) "2Tim.2.26" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "2Tim.2.26" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "2Tim.2.26" ∷ word (δ ∷ ι ∷ α ∷ β ∷ ό ∷ ∙λ ∷ ο ∷ υ ∷ []) "2Tim.2.26" ∷ word (π ∷ α ∷ γ ∷ ί ∷ δ ∷ ο ∷ ς ∷ []) "2Tim.2.26" ∷ word (ἐ ∷ ζ ∷ ω ∷ γ ∷ ρ ∷ η ∷ μ ∷ έ ∷ ν ∷ ο ∷ ι ∷ []) "2Tim.2.26" ∷ word (ὑ ∷ π ∷ []) "2Tim.2.26" ∷ word (α ∷ ὐ ∷ τ ∷ ο ∷ ῦ ∷ []) "2Tim.2.26" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "2Tim.2.26" ∷ word (τ ∷ ὸ ∷ []) "2Tim.2.26" ∷ word (ἐ ∷ κ ∷ ε ∷ ί ∷ ν ∷ ο ∷ υ ∷ []) "2Tim.2.26" ∷ word (θ ∷ έ ∷ ∙λ ∷ η ∷ μ ∷ α ∷ []) "2Tim.2.26" ∷ word (Τ ∷ ο ∷ ῦ ∷ τ ∷ ο ∷ []) "2Tim.3.1" ∷ word (δ ∷ ὲ ∷ []) "2Tim.3.1" ∷ word (γ ∷ ί ∷ ν ∷ ω ∷ σ ∷ κ ∷ ε ∷ []) "2Tim.3.1" ∷ word (ὅ ∷ τ ∷ ι ∷ []) "2Tim.3.1" ∷ word (ἐ ∷ ν ∷ []) "2Tim.3.1" ∷ word (ἐ ∷ σ ∷ χ ∷ ά ∷ τ ∷ α ∷ ι ∷ ς ∷ []) "2Tim.3.1" ∷ word (ἡ ∷ μ ∷ έ ∷ ρ ∷ α ∷ ι ∷ ς ∷ []) "2Tim.3.1" ∷ word (ἐ ∷ ν ∷ σ ∷ τ ∷ ή ∷ σ ∷ ο ∷ ν ∷ τ ∷ α ∷ ι ∷ []) "2Tim.3.1" ∷ word (κ ∷ α ∷ ι ∷ ρ ∷ ο ∷ ὶ ∷ []) "2Tim.3.1" ∷ word (χ ∷ α ∷ ∙λ ∷ ε ∷ π ∷ ο ∷ ί ∷ []) "2Tim.3.1" ∷ word (ἔ ∷ σ ∷ ο ∷ ν ∷ τ ∷ α ∷ ι ∷ []) "2Tim.3.2" ∷ word (γ ∷ ὰ ∷ ρ ∷ []) "2Tim.3.2" ∷ word (ο ∷ ἱ ∷ []) "2Tim.3.2" ∷ word (ἄ ∷ ν ∷ θ ∷ ρ ∷ ω ∷ π ∷ ο ∷ ι ∷ []) "2Tim.3.2" ∷ word (φ ∷ ί ∷ ∙λ ∷ α ∷ υ ∷ τ ∷ ο ∷ ι ∷ []) "2Tim.3.2" ∷ word (φ ∷ ι ∷ ∙λ ∷ ά ∷ ρ ∷ γ ∷ υ ∷ ρ ∷ ο ∷ ι ∷ []) "2Tim.3.2" ∷ word (ἀ ∷ ∙λ ∷ α ∷ ζ ∷ ό ∷ ν ∷ ε ∷ ς ∷ []) "2Tim.3.2" ∷ word (ὑ ∷ π ∷ ε ∷ ρ ∷ ή ∷ φ ∷ α ∷ ν ∷ ο ∷ ι ∷ []) "2Tim.3.2" ∷ word (β ∷ ∙λ ∷ ά ∷ σ ∷ φ ∷ η ∷ μ ∷ ο ∷ ι ∷ []) "2Tim.3.2" ∷ word (γ ∷ ο ∷ ν ∷ ε ∷ ῦ ∷ σ ∷ ι ∷ ν ∷ []) "2Tim.3.2" ∷ word (ἀ ∷ π ∷ ε ∷ ι ∷ θ ∷ ε ∷ ῖ ∷ ς ∷ []) "2Tim.3.2" ∷ word (ἀ ∷ χ ∷ ά ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ο ∷ ι ∷ []) "2Tim.3.2" ∷ word (ἀ ∷ ν ∷ ό ∷ σ ∷ ι ∷ ο ∷ ι ∷ []) "2Tim.3.2" ∷ word (ἄ ∷ σ ∷ τ ∷ ο ∷ ρ ∷ γ ∷ ο ∷ ι ∷ []) "2Tim.3.3" ∷ word (ἄ ∷ σ ∷ π ∷ ο ∷ ν ∷ δ ∷ ο ∷ ι ∷ []) "2Tim.3.3" ∷ word (δ ∷ ι ∷ ά ∷ β ∷ ο ∷ ∙λ ∷ ο ∷ ι ∷ []) "2Tim.3.3" ∷ word (ἀ ∷ κ ∷ ρ ∷ α ∷ τ ∷ ε ∷ ῖ ∷ ς ∷ []) "2Tim.3.3" ∷ word (ἀ ∷ ν ∷ ή ∷ μ ∷ ε ∷ ρ ∷ ο ∷ ι ∷ []) "2Tim.3.3" ∷ word (ἀ ∷ φ ∷ ι ∷ ∙λ ∷ ά ∷ γ ∷ α ∷ θ ∷ ο ∷ ι ∷ []) "2Tim.3.3" ∷ word (π ∷ ρ ∷ ο ∷ δ ∷ ό ∷ τ ∷ α ∷ ι ∷ []) "2Tim.3.4" ∷ word (π ∷ ρ ∷ ο ∷ π ∷ ε ∷ τ ∷ ε ∷ ῖ ∷ ς ∷ []) "2Tim.3.4" ∷ word (τ ∷ ε ∷ τ ∷ υ ∷ φ ∷ ω ∷ μ ∷ έ ∷ ν ∷ ο ∷ ι ∷ []) "2Tim.3.4" ∷ word (φ ∷ ι ∷ ∙λ ∷ ή ∷ δ ∷ ο ∷ ν ∷ ο ∷ ι ∷ []) "2Tim.3.4" ∷ word (μ ∷ ᾶ ∷ ∙λ ∷ ∙λ ∷ ο ∷ ν ∷ []) "2Tim.3.4" ∷ word (ἢ ∷ []) "2Tim.3.4" ∷ word (φ ∷ ι ∷ ∙λ ∷ ό ∷ θ ∷ ε ∷ ο ∷ ι ∷ []) "2Tim.3.4" ∷ word (ἔ ∷ χ ∷ ο ∷ ν ∷ τ ∷ ε ∷ ς ∷ []) "2Tim.3.5" ∷ word (μ ∷ ό ∷ ρ ∷ φ ∷ ω ∷ σ ∷ ι ∷ ν ∷ []) "2Tim.3.5" ∷ word (ε ∷ ὐ ∷ σ ∷ ε ∷ β ∷ ε ∷ ί ∷ α ∷ ς ∷ []) "2Tim.3.5" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "2Tim.3.5" ∷ word (δ ∷ ὲ ∷ []) "2Tim.3.5" ∷ word (δ ∷ ύ ∷ ν ∷ α ∷ μ ∷ ι ∷ ν ∷ []) "2Tim.3.5" ∷ word (α ∷ ὐ ∷ τ ∷ ῆ ∷ ς ∷ []) "2Tim.3.5" ∷ word (ἠ ∷ ρ ∷ ν ∷ η ∷ μ ∷ έ ∷ ν ∷ ο ∷ ι ∷ []) "2Tim.3.5" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.3.5" ∷ word (τ ∷ ο ∷ ύ ∷ τ ∷ ο ∷ υ ∷ ς ∷ []) "2Tim.3.5" ∷ word (ἀ ∷ π ∷ ο ∷ τ ∷ ρ ∷ έ ∷ π ∷ ο ∷ υ ∷ []) "2Tim.3.5" ∷ word (ἐ ∷ κ ∷ []) "2Tim.3.6" ∷ word (τ ∷ ο ∷ ύ ∷ τ ∷ ω ∷ ν ∷ []) "2Tim.3.6" ∷ word (γ ∷ ά ∷ ρ ∷ []) "2Tim.3.6" ∷ word (ε ∷ ἰ ∷ σ ∷ ι ∷ ν ∷ []) "2Tim.3.6" ∷ word (ο ∷ ἱ ∷ []) "2Tim.3.6" ∷ word (ἐ ∷ ν ∷ δ ∷ ύ ∷ ν ∷ ο ∷ ν ∷ τ ∷ ε ∷ ς ∷ []) "2Tim.3.6" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "2Tim.3.6" ∷ word (τ ∷ ὰ ∷ ς ∷ []) "2Tim.3.6" ∷ word (ο ∷ ἰ ∷ κ ∷ ί ∷ α ∷ ς ∷ []) "2Tim.3.6" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.3.6" ∷ word (α ∷ ἰ ∷ χ ∷ μ ∷ α ∷ ∙λ ∷ ω ∷ τ ∷ ί ∷ ζ ∷ ο ∷ ν ∷ τ ∷ ε ∷ ς ∷ []) "2Tim.3.6" ∷ word (γ ∷ υ ∷ ν ∷ α ∷ ι ∷ κ ∷ ά ∷ ρ ∷ ι ∷ α ∷ []) "2Tim.3.6" ∷ word (σ ∷ ε ∷ σ ∷ ω ∷ ρ ∷ ε ∷ υ ∷ μ ∷ έ ∷ ν ∷ α ∷ []) "2Tim.3.6" ∷ word (ἁ ∷ μ ∷ α ∷ ρ ∷ τ ∷ ί ∷ α ∷ ι ∷ ς ∷ []) "2Tim.3.6" ∷ word (ἀ ∷ γ ∷ ό ∷ μ ∷ ε ∷ ν ∷ α ∷ []) "2Tim.3.6" ∷ word (ἐ ∷ π ∷ ι ∷ θ ∷ υ ∷ μ ∷ ί ∷ α ∷ ι ∷ ς ∷ []) "2Tim.3.6" ∷ word (π ∷ ο ∷ ι ∷ κ ∷ ί ∷ ∙λ ∷ α ∷ ι ∷ ς ∷ []) "2Tim.3.6" ∷ word (π ∷ ά ∷ ν ∷ τ ∷ ο ∷ τ ∷ ε ∷ []) "2Tim.3.7" ∷ word (μ ∷ α ∷ ν ∷ θ ∷ ά ∷ ν ∷ ο ∷ ν ∷ τ ∷ α ∷ []) "2Tim.3.7" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.3.7" ∷ word (μ ∷ η ∷ δ ∷ έ ∷ π ∷ ο ∷ τ ∷ ε ∷ []) "2Tim.3.7" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "2Tim.3.7" ∷ word (ἐ ∷ π ∷ ί ∷ γ ∷ ν ∷ ω ∷ σ ∷ ι ∷ ν ∷ []) "2Tim.3.7" ∷ word (ἀ ∷ ∙λ ∷ η ∷ θ ∷ ε ∷ ί ∷ α ∷ ς ∷ []) "2Tim.3.7" ∷ word (ἐ ∷ ∙λ ∷ θ ∷ ε ∷ ῖ ∷ ν ∷ []) "2Tim.3.7" ∷ word (δ ∷ υ ∷ ν ∷ ά ∷ μ ∷ ε ∷ ν ∷ α ∷ []) "2Tim.3.7" ∷ word (ὃ ∷ ν ∷ []) "2Tim.3.8" ∷ word (τ ∷ ρ ∷ ό ∷ π ∷ ο ∷ ν ∷ []) "2Tim.3.8" ∷ word (δ ∷ ὲ ∷ []) "2Tim.3.8" ∷ word (Ἰ ∷ ά ∷ ν ∷ ν ∷ η ∷ ς ∷ []) "2Tim.3.8" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.3.8" ∷ word (Ἰ ∷ α ∷ μ ∷ β ∷ ρ ∷ ῆ ∷ ς ∷ []) "2Tim.3.8" ∷ word (ἀ ∷ ν ∷ τ ∷ έ ∷ σ ∷ τ ∷ η ∷ σ ∷ α ∷ ν ∷ []) "2Tim.3.8" ∷ word (Μ ∷ ω ∷ ϋ ∷ σ ∷ ε ∷ ῖ ∷ []) "2Tim.3.8" ∷ word (ο ∷ ὕ ∷ τ ∷ ω ∷ ς ∷ []) "2Tim.3.8" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.3.8" ∷ word (ο ∷ ὗ ∷ τ ∷ ο ∷ ι ∷ []) "2Tim.3.8" ∷ word (ἀ ∷ ν ∷ θ ∷ ί ∷ σ ∷ τ ∷ α ∷ ν ∷ τ ∷ α ∷ ι ∷ []) "2Tim.3.8" ∷ word (τ ∷ ῇ ∷ []) "2Tim.3.8" ∷ word (ἀ ∷ ∙λ ∷ η ∷ θ ∷ ε ∷ ί ∷ ᾳ ∷ []) "2Tim.3.8" ∷ word (ἄ ∷ ν ∷ θ ∷ ρ ∷ ω ∷ π ∷ ο ∷ ι ∷ []) "2Tim.3.8" ∷ word (κ ∷ α ∷ τ ∷ ε ∷ φ ∷ θ ∷ α ∷ ρ ∷ μ ∷ έ ∷ ν ∷ ο ∷ ι ∷ []) "2Tim.3.8" ∷ word (τ ∷ ὸ ∷ ν ∷ []) "2Tim.3.8" ∷ word (ν ∷ ο ∷ ῦ ∷ ν ∷ []) "2Tim.3.8" ∷ word (ἀ ∷ δ ∷ ό ∷ κ ∷ ι ∷ μ ∷ ο ∷ ι ∷ []) "2Tim.3.8" ∷ word (π ∷ ε ∷ ρ ∷ ὶ ∷ []) "2Tim.3.8" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "2Tim.3.8" ∷ word (π ∷ ί ∷ σ ∷ τ ∷ ι ∷ ν ∷ []) "2Tim.3.8" ∷ word (ἀ ∷ ∙λ ∷ ∙λ ∷ []) "2Tim.3.9" ∷ word (ο ∷ ὐ ∷ []) "2Tim.3.9" ∷ word (π ∷ ρ ∷ ο ∷ κ ∷ ό ∷ ψ ∷ ο ∷ υ ∷ σ ∷ ι ∷ ν ∷ []) "2Tim.3.9" ∷ word (ἐ ∷ π ∷ ὶ ∷ []) "2Tim.3.9" ∷ word (π ∷ ∙λ ∷ ε ∷ ῖ ∷ ο ∷ ν ∷ []) "2Tim.3.9" ∷ word (ἡ ∷ []) "2Tim.3.9" ∷ word (γ ∷ ὰ ∷ ρ ∷ []) "2Tim.3.9" ∷ word (ἄ ∷ ν ∷ ο ∷ ι ∷ α ∷ []) "2Tim.3.9" ∷ word (α ∷ ὐ ∷ τ ∷ ῶ ∷ ν ∷ []) "2Tim.3.9" ∷ word (ἔ ∷ κ ∷ δ ∷ η ∷ ∙λ ∷ ο ∷ ς ∷ []) "2Tim.3.9" ∷ word (ἔ ∷ σ ∷ τ ∷ α ∷ ι ∷ []) "2Tim.3.9" ∷ word (π ∷ ᾶ ∷ σ ∷ ι ∷ ν ∷ []) "2Tim.3.9" ∷ word (ὡ ∷ ς ∷ []) "2Tim.3.9" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.3.9" ∷ word (ἡ ∷ []) "2Tim.3.9" ∷ word (ἐ ∷ κ ∷ ε ∷ ί ∷ ν ∷ ω ∷ ν ∷ []) "2Tim.3.9" ∷ word (ἐ ∷ γ ∷ έ ∷ ν ∷ ε ∷ τ ∷ ο ∷ []) "2Tim.3.9" ∷ word (Σ ∷ ὺ ∷ []) "2Tim.3.10" ∷ word (δ ∷ ὲ ∷ []) "2Tim.3.10" ∷ word (π ∷ α ∷ ρ ∷ η ∷ κ ∷ ο ∷ ∙λ ∷ ο ∷ ύ ∷ θ ∷ η ∷ σ ∷ ά ∷ ς ∷ []) "2Tim.3.10" ∷ word (μ ∷ ο ∷ υ ∷ []) "2Tim.3.10" ∷ word (τ ∷ ῇ ∷ []) "2Tim.3.10" ∷ word (δ ∷ ι ∷ δ ∷ α ∷ σ ∷ κ ∷ α ∷ ∙λ ∷ ί ∷ ᾳ ∷ []) "2Tim.3.10" ∷ word (τ ∷ ῇ ∷ []) "2Tim.3.10" ∷ word (ἀ ∷ γ ∷ ω ∷ γ ∷ ῇ ∷ []) "2Tim.3.10" ∷ word (τ ∷ ῇ ∷ []) "2Tim.3.10" ∷ word (π ∷ ρ ∷ ο ∷ θ ∷ έ ∷ σ ∷ ε ∷ ι ∷ []) "2Tim.3.10" ∷ word (τ ∷ ῇ ∷ []) "2Tim.3.10" ∷ word (π ∷ ί ∷ σ ∷ τ ∷ ε ∷ ι ∷ []) "2Tim.3.10" ∷ word (τ ∷ ῇ ∷ []) "2Tim.3.10" ∷ word (μ ∷ α ∷ κ ∷ ρ ∷ ο ∷ θ ∷ υ ∷ μ ∷ ί ∷ ᾳ ∷ []) "2Tim.3.10" ∷ word (τ ∷ ῇ ∷ []) "2Tim.3.10" ∷ word (ἀ ∷ γ ∷ ά ∷ π ∷ ῃ ∷ []) "2Tim.3.10" ∷ word (τ ∷ ῇ ∷ []) "2Tim.3.10" ∷ word (ὑ ∷ π ∷ ο ∷ μ ∷ ο ∷ ν ∷ ῇ ∷ []) "2Tim.3.10" ∷ word (τ ∷ ο ∷ ῖ ∷ ς ∷ []) "2Tim.3.11" ∷ word (δ ∷ ι ∷ ω ∷ γ ∷ μ ∷ ο ∷ ῖ ∷ ς ∷ []) "2Tim.3.11" ∷ word (τ ∷ ο ∷ ῖ ∷ ς ∷ []) "2Tim.3.11" ∷ word (π ∷ α ∷ θ ∷ ή ∷ μ ∷ α ∷ σ ∷ ι ∷ ν ∷ []) "2Tim.3.11" ∷ word (ο ∷ ἷ ∷ ά ∷ []) "2Tim.3.11" ∷ word (μ ∷ ο ∷ ι ∷ []) "2Tim.3.11" ∷ word (ἐ ∷ γ ∷ έ ∷ ν ∷ ε ∷ τ ∷ ο ∷ []) "2Tim.3.11" ∷ word (ἐ ∷ ν ∷ []) "2Tim.3.11" ∷ word (Ἀ ∷ ν ∷ τ ∷ ι ∷ ο ∷ χ ∷ ε ∷ ί ∷ ᾳ ∷ []) "2Tim.3.11" ∷ word (ἐ ∷ ν ∷ []) "2Tim.3.11" ∷ word (Ἰ ∷ κ ∷ ο ∷ ν ∷ ί ∷ ῳ ∷ []) "2Tim.3.11" ∷ word (ἐ ∷ ν ∷ []) "2Tim.3.11" ∷ word (Λ ∷ ύ ∷ σ ∷ τ ∷ ρ ∷ ο ∷ ι ∷ ς ∷ []) "2Tim.3.11" ∷ word (ο ∷ ἵ ∷ ο ∷ υ ∷ ς ∷ []) "2Tim.3.11" ∷ word (δ ∷ ι ∷ ω ∷ γ ∷ μ ∷ ο ∷ ὺ ∷ ς ∷ []) "2Tim.3.11" ∷ word (ὑ ∷ π ∷ ή ∷ ν ∷ ε ∷ γ ∷ κ ∷ α ∷ []) "2Tim.3.11" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.3.11" ∷ word (ἐ ∷ κ ∷ []) "2Tim.3.11" ∷ word (π ∷ ά ∷ ν ∷ τ ∷ ω ∷ ν ∷ []) "2Tim.3.11" ∷ word (μ ∷ ε ∷ []) "2Tim.3.11" ∷ word (ἐ ∷ ρ ∷ ρ ∷ ύ ∷ σ ∷ α ∷ τ ∷ ο ∷ []) "2Tim.3.11" ∷ word (ὁ ∷ []) "2Tim.3.11" ∷ word (κ ∷ ύ ∷ ρ ∷ ι ∷ ο ∷ ς ∷ []) "2Tim.3.11" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.3.12" ∷ word (π ∷ ά ∷ ν ∷ τ ∷ ε ∷ ς ∷ []) "2Tim.3.12" ∷ word (δ ∷ ὲ ∷ []) "2Tim.3.12" ∷ word (ο ∷ ἱ ∷ []) "2Tim.3.12" ∷ word (θ ∷ έ ∷ ∙λ ∷ ο ∷ ν ∷ τ ∷ ε ∷ ς ∷ []) "2Tim.3.12" ∷ word (ζ ∷ ῆ ∷ ν ∷ []) "2Tim.3.12" ∷ word (ε ∷ ὐ ∷ σ ∷ ε ∷ β ∷ ῶ ∷ ς ∷ []) "2Tim.3.12" ∷ word (ἐ ∷ ν ∷ []) "2Tim.3.12" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ῷ ∷ []) "2Tim.3.12" ∷ word (Ἰ ∷ η ∷ σ ∷ ο ∷ ῦ ∷ []) "2Tim.3.12" ∷ word (δ ∷ ι ∷ ω ∷ χ ∷ θ ∷ ή ∷ σ ∷ ο ∷ ν ∷ τ ∷ α ∷ ι ∷ []) "2Tim.3.12" ∷ word (π ∷ ο ∷ ν ∷ η ∷ ρ ∷ ο ∷ ὶ ∷ []) "2Tim.3.13" ∷ word (δ ∷ ὲ ∷ []) "2Tim.3.13" ∷ word (ἄ ∷ ν ∷ θ ∷ ρ ∷ ω ∷ π ∷ ο ∷ ι ∷ []) "2Tim.3.13" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.3.13" ∷ word (γ ∷ ό ∷ η ∷ τ ∷ ε ∷ ς ∷ []) "2Tim.3.13" ∷ word (π ∷ ρ ∷ ο ∷ κ ∷ ό ∷ ψ ∷ ο ∷ υ ∷ σ ∷ ι ∷ ν ∷ []) "2Tim.3.13" ∷ word (ἐ ∷ π ∷ ὶ ∷ []) "2Tim.3.13" ∷ word (τ ∷ ὸ ∷ []) "2Tim.3.13" ∷ word (χ ∷ ε ∷ ῖ ∷ ρ ∷ ο ∷ ν ∷ []) "2Tim.3.13" ∷ word (π ∷ ∙λ ∷ α ∷ ν ∷ ῶ ∷ ν ∷ τ ∷ ε ∷ ς ∷ []) "2Tim.3.13" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.3.13" ∷ word (π ∷ ∙λ ∷ α ∷ ν ∷ ώ ∷ μ ∷ ε ∷ ν ∷ ο ∷ ι ∷ []) "2Tim.3.13" ∷ word (σ ∷ ὺ ∷ []) "2Tim.3.14" ∷ word (δ ∷ ὲ ∷ []) "2Tim.3.14" ∷ word (μ ∷ έ ∷ ν ∷ ε ∷ []) "2Tim.3.14" ∷ word (ἐ ∷ ν ∷ []) "2Tim.3.14" ∷ word (ο ∷ ἷ ∷ ς ∷ []) "2Tim.3.14" ∷ word (ἔ ∷ μ ∷ α ∷ θ ∷ ε ∷ ς ∷ []) "2Tim.3.14" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.3.14" ∷ word (ἐ ∷ π ∷ ι ∷ σ ∷ τ ∷ ώ ∷ θ ∷ η ∷ ς ∷ []) "2Tim.3.14" ∷ word (ε ∷ ἰ ∷ δ ∷ ὼ ∷ ς ∷ []) "2Tim.3.14" ∷ word (π ∷ α ∷ ρ ∷ ὰ ∷ []) "2Tim.3.14" ∷ word (τ ∷ ί ∷ ν ∷ ω ∷ ν ∷ []) "2Tim.3.14" ∷ word (ἔ ∷ μ ∷ α ∷ θ ∷ ε ∷ ς ∷ []) "2Tim.3.14" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.3.15" ∷ word (ὅ ∷ τ ∷ ι ∷ []) "2Tim.3.15" ∷ word (ἀ ∷ π ∷ ὸ ∷ []) "2Tim.3.15" ∷ word (β ∷ ρ ∷ έ ∷ φ ∷ ο ∷ υ ∷ ς ∷ []) "2Tim.3.15" ∷ word (ἱ ∷ ε ∷ ρ ∷ ὰ ∷ []) "2Tim.3.15" ∷ word (γ ∷ ρ ∷ ά ∷ μ ∷ μ ∷ α ∷ τ ∷ α ∷ []) "2Tim.3.15" ∷ word (ο ∷ ἶ ∷ δ ∷ α ∷ ς ∷ []) "2Tim.3.15" ∷ word (τ ∷ ὰ ∷ []) "2Tim.3.15" ∷ word (δ ∷ υ ∷ ν ∷ ά ∷ μ ∷ ε ∷ ν ∷ ά ∷ []) "2Tim.3.15" ∷ word (σ ∷ ε ∷ []) "2Tim.3.15" ∷ word (σ ∷ ο ∷ φ ∷ ί ∷ σ ∷ α ∷ ι ∷ []) "2Tim.3.15" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "2Tim.3.15" ∷ word (σ ∷ ω ∷ τ ∷ η ∷ ρ ∷ ί ∷ α ∷ ν ∷ []) "2Tim.3.15" ∷ word (δ ∷ ι ∷ ὰ ∷ []) "2Tim.3.15" ∷ word (π ∷ ί ∷ σ ∷ τ ∷ ε ∷ ω ∷ ς ∷ []) "2Tim.3.15" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "2Tim.3.15" ∷ word (ἐ ∷ ν ∷ []) "2Tim.3.15" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ῷ ∷ []) "2Tim.3.15" ∷ word (Ἰ ∷ η ∷ σ ∷ ο ∷ ῦ ∷ []) "2Tim.3.15" ∷ word (π ∷ ᾶ ∷ σ ∷ α ∷ []) "2Tim.3.16" ∷ word (γ ∷ ρ ∷ α ∷ φ ∷ ὴ ∷ []) "2Tim.3.16" ∷ word (θ ∷ ε ∷ ό ∷ π ∷ ν ∷ ε ∷ υ ∷ σ ∷ τ ∷ ο ∷ ς ∷ []) "2Tim.3.16" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.3.16" ∷ word (ὠ ∷ φ ∷ έ ∷ ∙λ ∷ ι ∷ μ ∷ ο ∷ ς ∷ []) "2Tim.3.16" ∷ word (π ∷ ρ ∷ ὸ ∷ ς ∷ []) "2Tim.3.16" ∷ word (δ ∷ ι ∷ δ ∷ α ∷ σ ∷ κ ∷ α ∷ ∙λ ∷ ί ∷ α ∷ ν ∷ []) "2Tim.3.16" ∷ word (π ∷ ρ ∷ ὸ ∷ ς ∷ []) "2Tim.3.16" ∷ word (ἐ ∷ ∙λ ∷ ε ∷ γ ∷ μ ∷ ό ∷ ν ∷ []) "2Tim.3.16" ∷ word (π ∷ ρ ∷ ὸ ∷ ς ∷ []) "2Tim.3.16" ∷ word (ἐ ∷ π ∷ α ∷ ν ∷ ό ∷ ρ ∷ θ ∷ ω ∷ σ ∷ ι ∷ ν ∷ []) "2Tim.3.16" ∷ word (π ∷ ρ ∷ ὸ ∷ ς ∷ []) "2Tim.3.16" ∷ word (π ∷ α ∷ ι ∷ δ ∷ ε ∷ ί ∷ α ∷ ν ∷ []) "2Tim.3.16" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "2Tim.3.16" ∷ word (ἐ ∷ ν ∷ []) "2Tim.3.16" ∷ word (δ ∷ ι ∷ κ ∷ α ∷ ι ∷ ο ∷ σ ∷ ύ ∷ ν ∷ ῃ ∷ []) "2Tim.3.16" ∷ word (ἵ ∷ ν ∷ α ∷ []) "2Tim.3.17" ∷ word (ἄ ∷ ρ ∷ τ ∷ ι ∷ ο ∷ ς ∷ []) "2Tim.3.17" ∷ word (ᾖ ∷ []) "2Tim.3.17" ∷ word (ὁ ∷ []) "2Tim.3.17" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "2Tim.3.17" ∷ word (θ ∷ ε ∷ ο ∷ ῦ ∷ []) "2Tim.3.17" ∷ word (ἄ ∷ ν ∷ θ ∷ ρ ∷ ω ∷ π ∷ ο ∷ ς ∷ []) "2Tim.3.17" ∷ word (π ∷ ρ ∷ ὸ ∷ ς ∷ []) "2Tim.3.17" ∷ word (π ∷ ᾶ ∷ ν ∷ []) "2Tim.3.17" ∷ word (ἔ ∷ ρ ∷ γ ∷ ο ∷ ν ∷ []) "2Tim.3.17" ∷ word (ἀ ∷ γ ∷ α ∷ θ ∷ ὸ ∷ ν ∷ []) "2Tim.3.17" ∷ word (ἐ ∷ ξ ∷ η ∷ ρ ∷ τ ∷ ι ∷ σ ∷ μ ∷ έ ∷ ν ∷ ο ∷ ς ∷ []) "2Tim.3.17" ∷ word (Δ ∷ ι ∷ α ∷ μ ∷ α ∷ ρ ∷ τ ∷ ύ ∷ ρ ∷ ο ∷ μ ∷ α ∷ ι ∷ []) "2Tim.4.1" ∷ word (ἐ ∷ ν ∷ ώ ∷ π ∷ ι ∷ ο ∷ ν ∷ []) "2Tim.4.1" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "2Tim.4.1" ∷ word (θ ∷ ε ∷ ο ∷ ῦ ∷ []) "2Tim.4.1" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.4.1" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ο ∷ ῦ ∷ []) "2Tim.4.1" ∷ word (Ἰ ∷ η ∷ σ ∷ ο ∷ ῦ ∷ []) "2Tim.4.1" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "2Tim.4.1" ∷ word (μ ∷ έ ∷ ∙λ ∷ ∙λ ∷ ο ∷ ν ∷ τ ∷ ο ∷ ς ∷ []) "2Tim.4.1" ∷ word (κ ∷ ρ ∷ ί ∷ ν ∷ ε ∷ ι ∷ ν ∷ []) "2Tim.4.1" ∷ word (ζ ∷ ῶ ∷ ν ∷ τ ∷ α ∷ ς ∷ []) "2Tim.4.1" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.4.1" ∷ word (ν ∷ ε ∷ κ ∷ ρ ∷ ο ∷ ύ ∷ ς ∷ []) "2Tim.4.1" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.4.1" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "2Tim.4.1" ∷ word (ἐ ∷ π ∷ ι ∷ φ ∷ ά ∷ ν ∷ ε ∷ ι ∷ α ∷ ν ∷ []) "2Tim.4.1" ∷ word (α ∷ ὐ ∷ τ ∷ ο ∷ ῦ ∷ []) "2Tim.4.1" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.4.1" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "2Tim.4.1" ∷ word (β ∷ α ∷ σ ∷ ι ∷ ∙λ ∷ ε ∷ ί ∷ α ∷ ν ∷ []) "2Tim.4.1" ∷ word (α ∷ ὐ ∷ τ ∷ ο ∷ ῦ ∷ []) "2Tim.4.1" ∷ word (κ ∷ ή ∷ ρ ∷ υ ∷ ξ ∷ ο ∷ ν ∷ []) "2Tim.4.2" ∷ word (τ ∷ ὸ ∷ ν ∷ []) "2Tim.4.2" ∷ word (∙λ ∷ ό ∷ γ ∷ ο ∷ ν ∷ []) "2Tim.4.2" ∷ word (ἐ ∷ π ∷ ί ∷ σ ∷ τ ∷ η ∷ θ ∷ ι ∷ []) "2Tim.4.2" ∷ word (ε ∷ ὐ ∷ κ ∷ α ∷ ί ∷ ρ ∷ ω ∷ ς ∷ []) "2Tim.4.2" ∷ word (ἀ ∷ κ ∷ α ∷ ί ∷ ρ ∷ ω ∷ ς ∷ []) "2Tim.4.2" ∷ word (ἔ ∷ ∙λ ∷ ε ∷ γ ∷ ξ ∷ ο ∷ ν ∷ []) "2Tim.4.2" ∷ word (ἐ ∷ π ∷ ι ∷ τ ∷ ί ∷ μ ∷ η ∷ σ ∷ ο ∷ ν ∷ []) "2Tim.4.2" ∷ word (π ∷ α ∷ ρ ∷ α ∷ κ ∷ ά ∷ ∙λ ∷ ε ∷ σ ∷ ο ∷ ν ∷ []) "2Tim.4.2" ∷ word (ἐ ∷ ν ∷ []) "2Tim.4.2" ∷ word (π ∷ ά ∷ σ ∷ ῃ ∷ []) "2Tim.4.2" ∷ word (μ ∷ α ∷ κ ∷ ρ ∷ ο ∷ θ ∷ υ ∷ μ ∷ ί ∷ ᾳ ∷ []) "2Tim.4.2" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.4.2" ∷ word (δ ∷ ι ∷ δ ∷ α ∷ χ ∷ ῇ ∷ []) "2Tim.4.2" ∷ word (ἔ ∷ σ ∷ τ ∷ α ∷ ι ∷ []) "2Tim.4.3" ∷ word (γ ∷ ὰ ∷ ρ ∷ []) "2Tim.4.3" ∷ word (κ ∷ α ∷ ι ∷ ρ ∷ ὸ ∷ ς ∷ []) "2Tim.4.3" ∷ word (ὅ ∷ τ ∷ ε ∷ []) "2Tim.4.3" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "2Tim.4.3" ∷ word (ὑ ∷ γ ∷ ι ∷ α ∷ ι ∷ ν ∷ ο ∷ ύ ∷ σ ∷ η ∷ ς ∷ []) "2Tim.4.3" ∷ word (δ ∷ ι ∷ δ ∷ α ∷ σ ∷ κ ∷ α ∷ ∙λ ∷ ί ∷ α ∷ ς ∷ []) "2Tim.4.3" ∷ word (ο ∷ ὐ ∷ κ ∷ []) "2Tim.4.3" ∷ word (ἀ ∷ ν ∷ έ ∷ ξ ∷ ο ∷ ν ∷ τ ∷ α ∷ ι ∷ []) "2Tim.4.3" ∷ word (ἀ ∷ ∙λ ∷ ∙λ ∷ ὰ ∷ []) "2Tim.4.3" ∷ word (κ ∷ α ∷ τ ∷ ὰ ∷ []) "2Tim.4.3" ∷ word (τ ∷ ὰ ∷ ς ∷ []) "2Tim.4.3" ∷ word (ἰ ∷ δ ∷ ί ∷ α ∷ ς ∷ []) "2Tim.4.3" ∷ word (ἐ ∷ π ∷ ι ∷ θ ∷ υ ∷ μ ∷ ί ∷ α ∷ ς ∷ []) "2Tim.4.3" ∷ word (ἑ ∷ α ∷ υ ∷ τ ∷ ο ∷ ῖ ∷ ς ∷ []) "2Tim.4.3" ∷ word (ἐ ∷ π ∷ ι ∷ σ ∷ ω ∷ ρ ∷ ε ∷ ύ ∷ σ ∷ ο ∷ υ ∷ σ ∷ ι ∷ ν ∷ []) "2Tim.4.3" ∷ word (δ ∷ ι ∷ δ ∷ α ∷ σ ∷ κ ∷ ά ∷ ∙λ ∷ ο ∷ υ ∷ ς ∷ []) "2Tim.4.3" ∷ word (κ ∷ ν ∷ η ∷ θ ∷ ό ∷ μ ∷ ε ∷ ν ∷ ο ∷ ι ∷ []) "2Tim.4.3" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "2Tim.4.3" ∷ word (ἀ ∷ κ ∷ ο ∷ ή ∷ ν ∷ []) "2Tim.4.3" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.4.4" ∷ word (ἀ ∷ π ∷ ὸ ∷ []) "2Tim.4.4" ∷ word (μ ∷ ὲ ∷ ν ∷ []) "2Tim.4.4" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "2Tim.4.4" ∷ word (ἀ ∷ ∙λ ∷ η ∷ θ ∷ ε ∷ ί ∷ α ∷ ς ∷ []) "2Tim.4.4" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "2Tim.4.4" ∷ word (ἀ ∷ κ ∷ ο ∷ ὴ ∷ ν ∷ []) "2Tim.4.4" ∷ word (ἀ ∷ π ∷ ο ∷ σ ∷ τ ∷ ρ ∷ έ ∷ ψ ∷ ο ∷ υ ∷ σ ∷ ι ∷ ν ∷ []) "2Tim.4.4" ∷ word (ἐ ∷ π ∷ ὶ ∷ []) "2Tim.4.4" ∷ word (δ ∷ ὲ ∷ []) "2Tim.4.4" ∷ word (τ ∷ ο ∷ ὺ ∷ ς ∷ []) "2Tim.4.4" ∷ word (μ ∷ ύ ∷ θ ∷ ο ∷ υ ∷ ς ∷ []) "2Tim.4.4" ∷ word (ἐ ∷ κ ∷ τ ∷ ρ ∷ α ∷ π ∷ ή ∷ σ ∷ ο ∷ ν ∷ τ ∷ α ∷ ι ∷ []) "2Tim.4.4" ∷ word (σ ∷ ὺ ∷ []) "2Tim.4.5" ∷ word (δ ∷ ὲ ∷ []) "2Tim.4.5" ∷ word (ν ∷ ῆ ∷ φ ∷ ε ∷ []) "2Tim.4.5" ∷ word (ἐ ∷ ν ∷ []) "2Tim.4.5" ∷ word (π ∷ ᾶ ∷ σ ∷ ι ∷ ν ∷ []) "2Tim.4.5" ∷ word (κ ∷ α ∷ κ ∷ ο ∷ π ∷ ά ∷ θ ∷ η ∷ σ ∷ ο ∷ ν ∷ []) "2Tim.4.5" ∷ word (ἔ ∷ ρ ∷ γ ∷ ο ∷ ν ∷ []) "2Tim.4.5" ∷ word (π ∷ ο ∷ ί ∷ η ∷ σ ∷ ο ∷ ν ∷ []) "2Tim.4.5" ∷ word (ε ∷ ὐ ∷ α ∷ γ ∷ γ ∷ ε ∷ ∙λ ∷ ι ∷ σ ∷ τ ∷ ο ∷ ῦ ∷ []) "2Tim.4.5" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "2Tim.4.5" ∷ word (δ ∷ ι ∷ α ∷ κ ∷ ο ∷ ν ∷ ί ∷ α ∷ ν ∷ []) "2Tim.4.5" ∷ word (σ ∷ ο ∷ υ ∷ []) "2Tim.4.5" ∷ word (π ∷ ∙λ ∷ η ∷ ρ ∷ ο ∷ φ ∷ ό ∷ ρ ∷ η ∷ σ ∷ ο ∷ ν ∷ []) "2Tim.4.5" ∷ word (Ἐ ∷ γ ∷ ὼ ∷ []) "2Tim.4.6" ∷ word (γ ∷ ὰ ∷ ρ ∷ []) "2Tim.4.6" ∷ word (ἤ ∷ δ ∷ η ∷ []) "2Tim.4.6" ∷ word (σ ∷ π ∷ έ ∷ ν ∷ δ ∷ ο ∷ μ ∷ α ∷ ι ∷ []) "2Tim.4.6" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.4.6" ∷ word (ὁ ∷ []) "2Tim.4.6" ∷ word (κ ∷ α ∷ ι ∷ ρ ∷ ὸ ∷ ς ∷ []) "2Tim.4.6" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "2Tim.4.6" ∷ word (ἀ ∷ ν ∷ α ∷ ∙λ ∷ ύ ∷ σ ∷ ε ∷ ώ ∷ ς ∷ []) "2Tim.4.6" ∷ word (μ ∷ ο ∷ υ ∷ []) "2Tim.4.6" ∷ word (ἐ ∷ φ ∷ έ ∷ σ ∷ τ ∷ η ∷ κ ∷ ε ∷ ν ∷ []) "2Tim.4.6" ∷ word (τ ∷ ὸ ∷ ν ∷ []) "2Tim.4.7" ∷ word (κ ∷ α ∷ ∙λ ∷ ὸ ∷ ν ∷ []) "2Tim.4.7" ∷ word (ἀ ∷ γ ∷ ῶ ∷ ν ∷ α ∷ []) "2Tim.4.7" ∷ word (ἠ ∷ γ ∷ ώ ∷ ν ∷ ι ∷ σ ∷ μ ∷ α ∷ ι ∷ []) "2Tim.4.7" ∷ word (τ ∷ ὸ ∷ ν ∷ []) "2Tim.4.7" ∷ word (δ ∷ ρ ∷ ό ∷ μ ∷ ο ∷ ν ∷ []) "2Tim.4.7" ∷ word (τ ∷ ε ∷ τ ∷ έ ∷ ∙λ ∷ ε ∷ κ ∷ α ∷ []) "2Tim.4.7" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "2Tim.4.7" ∷ word (π ∷ ί ∷ σ ∷ τ ∷ ι ∷ ν ∷ []) "2Tim.4.7" ∷ word (τ ∷ ε ∷ τ ∷ ή ∷ ρ ∷ η ∷ κ ∷ α ∷ []) "2Tim.4.7" ∷ word (∙λ ∷ ο ∷ ι ∷ π ∷ ὸ ∷ ν ∷ []) "2Tim.4.8" ∷ word (ἀ ∷ π ∷ ό ∷ κ ∷ ε ∷ ι ∷ τ ∷ α ∷ ί ∷ []) "2Tim.4.8" ∷ word (μ ∷ ο ∷ ι ∷ []) "2Tim.4.8" ∷ word (ὁ ∷ []) "2Tim.4.8" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "2Tim.4.8" ∷ word (δ ∷ ι ∷ κ ∷ α ∷ ι ∷ ο ∷ σ ∷ ύ ∷ ν ∷ η ∷ ς ∷ []) "2Tim.4.8" ∷ word (σ ∷ τ ∷ έ ∷ φ ∷ α ∷ ν ∷ ο ∷ ς ∷ []) "2Tim.4.8" ∷ word (ὃ ∷ ν ∷ []) "2Tim.4.8" ∷ word (ἀ ∷ π ∷ ο ∷ δ ∷ ώ ∷ σ ∷ ε ∷ ι ∷ []) "2Tim.4.8" ∷ word (μ ∷ ο ∷ ι ∷ []) "2Tim.4.8" ∷ word (ὁ ∷ []) "2Tim.4.8" ∷ word (κ ∷ ύ ∷ ρ ∷ ι ∷ ο ∷ ς ∷ []) "2Tim.4.8" ∷ word (ἐ ∷ ν ∷ []) "2Tim.4.8" ∷ word (ἐ ∷ κ ∷ ε ∷ ί ∷ ν ∷ ῃ ∷ []) "2Tim.4.8" ∷ word (τ ∷ ῇ ∷ []) "2Tim.4.8" ∷ word (ἡ ∷ μ ∷ έ ∷ ρ ∷ ᾳ ∷ []) "2Tim.4.8" ∷ word (ὁ ∷ []) "2Tim.4.8" ∷ word (δ ∷ ί ∷ κ ∷ α ∷ ι ∷ ο ∷ ς ∷ []) "2Tim.4.8" ∷ word (κ ∷ ρ ∷ ι ∷ τ ∷ ή ∷ ς ∷ []) "2Tim.4.8" ∷ word (ο ∷ ὐ ∷ []) "2Tim.4.8" ∷ word (μ ∷ ό ∷ ν ∷ ο ∷ ν ∷ []) "2Tim.4.8" ∷ word (δ ∷ ὲ ∷ []) "2Tim.4.8" ∷ word (ἐ ∷ μ ∷ ο ∷ ὶ ∷ []) "2Tim.4.8" ∷ word (ἀ ∷ ∙λ ∷ ∙λ ∷ ὰ ∷ []) "2Tim.4.8" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.4.8" ∷ word (π ∷ ᾶ ∷ σ ∷ ι ∷ ν ∷ []) "2Tim.4.8" ∷ word (τ ∷ ο ∷ ῖ ∷ ς ∷ []) "2Tim.4.8" ∷ word (ἠ ∷ γ ∷ α ∷ π ∷ η ∷ κ ∷ ό ∷ σ ∷ ι ∷ []) "2Tim.4.8" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "2Tim.4.8" ∷ word (ἐ ∷ π ∷ ι ∷ φ ∷ ά ∷ ν ∷ ε ∷ ι ∷ α ∷ ν ∷ []) "2Tim.4.8" ∷ word (α ∷ ὐ ∷ τ ∷ ο ∷ ῦ ∷ []) "2Tim.4.8" ∷ word (Σ ∷ π ∷ ο ∷ ύ ∷ δ ∷ α ∷ σ ∷ ο ∷ ν ∷ []) "2Tim.4.9" ∷ word (ἐ ∷ ∙λ ∷ θ ∷ ε ∷ ῖ ∷ ν ∷ []) "2Tim.4.9" ∷ word (π ∷ ρ ∷ ό ∷ ς ∷ []) "2Tim.4.9" ∷ word (μ ∷ ε ∷ []) "2Tim.4.9" ∷ word (τ ∷ α ∷ χ ∷ έ ∷ ω ∷ ς ∷ []) "2Tim.4.9" ∷ word (Δ ∷ η ∷ μ ∷ ᾶ ∷ ς ∷ []) "2Tim.4.10" ∷ word (γ ∷ ά ∷ ρ ∷ []) "2Tim.4.10" ∷ word (μ ∷ ε ∷ []) "2Tim.4.10" ∷ word (ἐ ∷ γ ∷ κ ∷ α ∷ τ ∷ έ ∷ ∙λ ∷ ι ∷ π ∷ ε ∷ ν ∷ []) "2Tim.4.10" ∷ word (ἀ ∷ γ ∷ α ∷ π ∷ ή ∷ σ ∷ α ∷ ς ∷ []) "2Tim.4.10" ∷ word (τ ∷ ὸ ∷ ν ∷ []) "2Tim.4.10" ∷ word (ν ∷ ῦ ∷ ν ∷ []) "2Tim.4.10" ∷ word (α ∷ ἰ ∷ ῶ ∷ ν ∷ α ∷ []) "2Tim.4.10" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.4.10" ∷ word (ἐ ∷ π ∷ ο ∷ ρ ∷ ε ∷ ύ ∷ θ ∷ η ∷ []) "2Tim.4.10" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "2Tim.4.10" ∷ word (Θ ∷ ε ∷ σ ∷ σ ∷ α ∷ ∙λ ∷ ο ∷ ν ∷ ί ∷ κ ∷ η ∷ ν ∷ []) "2Tim.4.10" ∷ word (Κ ∷ ρ ∷ ή ∷ σ ∷ κ ∷ η ∷ ς ∷ []) "2Tim.4.10" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "2Tim.4.10" ∷ word (Γ ∷ α ∷ ∙λ ∷ α ∷ τ ∷ ί ∷ α ∷ ν ∷ []) "2Tim.4.10" ∷ word (Τ ∷ ί ∷ τ ∷ ο ∷ ς ∷ []) "2Tim.4.10" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "2Tim.4.10" ∷ word (Δ ∷ α ∷ ∙λ ∷ μ ∷ α ∷ τ ∷ ί ∷ α ∷ ν ∷ []) "2Tim.4.10" ∷ word (Λ ∷ ο ∷ υ ∷ κ ∷ ᾶ ∷ ς ∷ []) "2Tim.4.11" ∷ word (ἐ ∷ σ ∷ τ ∷ ι ∷ ν ∷ []) "2Tim.4.11" ∷ word (μ ∷ ό ∷ ν ∷ ο ∷ ς ∷ []) "2Tim.4.11" ∷ word (μ ∷ ε ∷ τ ∷ []) "2Tim.4.11" ∷ word (ἐ ∷ μ ∷ ο ∷ ῦ ∷ []) "2Tim.4.11" ∷ word (Μ ∷ ᾶ ∷ ρ ∷ κ ∷ ο ∷ ν ∷ []) "2Tim.4.11" ∷ word (ἀ ∷ ν ∷ α ∷ ∙λ ∷ α ∷ β ∷ ὼ ∷ ν ∷ []) "2Tim.4.11" ∷ word (ἄ ∷ γ ∷ ε ∷ []) "2Tim.4.11" ∷ word (μ ∷ ε ∷ τ ∷ ὰ ∷ []) "2Tim.4.11" ∷ word (σ ∷ ε ∷ α ∷ υ ∷ τ ∷ ο ∷ ῦ ∷ []) "2Tim.4.11" ∷ word (ἔ ∷ σ ∷ τ ∷ ι ∷ ν ∷ []) "2Tim.4.11" ∷ word (γ ∷ ά ∷ ρ ∷ []) "2Tim.4.11" ∷ word (μ ∷ ο ∷ ι ∷ []) "2Tim.4.11" ∷ word (ε ∷ ὔ ∷ χ ∷ ρ ∷ η ∷ σ ∷ τ ∷ ο ∷ ς ∷ []) "2Tim.4.11" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "2Tim.4.11" ∷ word (δ ∷ ι ∷ α ∷ κ ∷ ο ∷ ν ∷ ί ∷ α ∷ ν ∷ []) "2Tim.4.11" ∷ word (Τ ∷ υ ∷ χ ∷ ι ∷ κ ∷ ὸ ∷ ν ∷ []) "2Tim.4.12" ∷ word (δ ∷ ὲ ∷ []) "2Tim.4.12" ∷ word (ἀ ∷ π ∷ έ ∷ σ ∷ τ ∷ ε ∷ ι ∷ ∙λ ∷ α ∷ []) "2Tim.4.12" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "2Tim.4.12" ∷ word (Ἔ ∷ φ ∷ ε ∷ σ ∷ ο ∷ ν ∷ []) "2Tim.4.12" ∷ word (τ ∷ ὸ ∷ ν ∷ []) "2Tim.4.13" ∷ word (φ ∷ α ∷ ι ∷ ∙λ ∷ ό ∷ ν ∷ η ∷ ν ∷ []) "2Tim.4.13" ∷ word (ὃ ∷ ν ∷ []) "2Tim.4.13" ∷ word (ἀ ∷ π ∷ έ ∷ ∙λ ∷ ι ∷ π ∷ ο ∷ ν ∷ []) "2Tim.4.13" ∷ word (ἐ ∷ ν ∷ []) "2Tim.4.13" ∷ word (Τ ∷ ρ ∷ ῳ ∷ ά ∷ δ ∷ ι ∷ []) "2Tim.4.13" ∷ word (π ∷ α ∷ ρ ∷ ὰ ∷ []) "2Tim.4.13" ∷ word (Κ ∷ ά ∷ ρ ∷ π ∷ ῳ ∷ []) "2Tim.4.13" ∷ word (ἐ ∷ ρ ∷ χ ∷ ό ∷ μ ∷ ε ∷ ν ∷ ο ∷ ς ∷ []) "2Tim.4.13" ∷ word (φ ∷ έ ∷ ρ ∷ ε ∷ []) "2Tim.4.13" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.4.13" ∷ word (τ ∷ ὰ ∷ []) "2Tim.4.13" ∷ word (β ∷ ι ∷ β ∷ ∙λ ∷ ί ∷ α ∷ []) "2Tim.4.13" ∷ word (μ ∷ ά ∷ ∙λ ∷ ι ∷ σ ∷ τ ∷ α ∷ []) "2Tim.4.13" ∷ word (τ ∷ ὰ ∷ ς ∷ []) "2Tim.4.13" ∷ word (μ ∷ ε ∷ μ ∷ β ∷ ρ ∷ ά ∷ ν ∷ α ∷ ς ∷ []) "2Tim.4.13" ∷ word (Ἀ ∷ ∙λ ∷ έ ∷ ξ ∷ α ∷ ν ∷ δ ∷ ρ ∷ ο ∷ ς ∷ []) "2Tim.4.14" ∷ word (ὁ ∷ []) "2Tim.4.14" ∷ word (χ ∷ α ∷ ∙λ ∷ κ ∷ ε ∷ ὺ ∷ ς ∷ []) "2Tim.4.14" ∷ word (π ∷ ο ∷ ∙λ ∷ ∙λ ∷ ά ∷ []) "2Tim.4.14" ∷ word (μ ∷ ο ∷ ι ∷ []) "2Tim.4.14" ∷ word (κ ∷ α ∷ κ ∷ ὰ ∷ []) "2Tim.4.14" ∷ word (ἐ ∷ ν ∷ ε ∷ δ ∷ ε ∷ ί ∷ ξ ∷ α ∷ τ ∷ ο ∷ []) "2Tim.4.14" ∷ word (ἀ ∷ π ∷ ο ∷ δ ∷ ώ ∷ σ ∷ ε ∷ ι ∷ []) "2Tim.4.14" ∷ word (α ∷ ὐ ∷ τ ∷ ῷ ∷ []) "2Tim.4.14" ∷ word (ὁ ∷ []) "2Tim.4.14" ∷ word (κ ∷ ύ ∷ ρ ∷ ι ∷ ο ∷ ς ∷ []) "2Tim.4.14" ∷ word (κ ∷ α ∷ τ ∷ ὰ ∷ []) "2Tim.4.14" ∷ word (τ ∷ ὰ ∷ []) "2Tim.4.14" ∷ word (ἔ ∷ ρ ∷ γ ∷ α ∷ []) "2Tim.4.14" ∷ word (α ∷ ὐ ∷ τ ∷ ο ∷ ῦ ∷ []) "2Tim.4.14" ∷ word (ὃ ∷ ν ∷ []) "2Tim.4.15" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.4.15" ∷ word (σ ∷ ὺ ∷ []) "2Tim.4.15" ∷ word (φ ∷ υ ∷ ∙λ ∷ ά ∷ σ ∷ σ ∷ ο ∷ υ ∷ []) "2Tim.4.15" ∷ word (∙λ ∷ ί ∷ α ∷ ν ∷ []) "2Tim.4.15" ∷ word (γ ∷ ὰ ∷ ρ ∷ []) "2Tim.4.15" ∷ word (ἀ ∷ ν ∷ τ ∷ έ ∷ σ ∷ τ ∷ η ∷ []) "2Tim.4.15" ∷ word (τ ∷ ο ∷ ῖ ∷ ς ∷ []) "2Tim.4.15" ∷ word (ἡ ∷ μ ∷ ε ∷ τ ∷ έ ∷ ρ ∷ ο ∷ ι ∷ ς ∷ []) "2Tim.4.15" ∷ word (∙λ ∷ ό ∷ γ ∷ ο ∷ ι ∷ ς ∷ []) "2Tim.4.15" ∷ word (Ἐ ∷ ν ∷ []) "2Tim.4.16" ∷ word (τ ∷ ῇ ∷ []) "2Tim.4.16" ∷ word (π ∷ ρ ∷ ώ ∷ τ ∷ ῃ ∷ []) "2Tim.4.16" ∷ word (μ ∷ ο ∷ υ ∷ []) "2Tim.4.16" ∷ word (ἀ ∷ π ∷ ο ∷ ∙λ ∷ ο ∷ γ ∷ ί ∷ ᾳ ∷ []) "2Tim.4.16" ∷ word (ο ∷ ὐ ∷ δ ∷ ε ∷ ί ∷ ς ∷ []) "2Tim.4.16" ∷ word (μ ∷ ο ∷ ι ∷ []) "2Tim.4.16" ∷ word (π ∷ α ∷ ρ ∷ ε ∷ γ ∷ έ ∷ ν ∷ ε ∷ τ ∷ ο ∷ []) "2Tim.4.16" ∷ word (ἀ ∷ ∙λ ∷ ∙λ ∷ ὰ ∷ []) "2Tim.4.16" ∷ word (π ∷ ά ∷ ν ∷ τ ∷ ε ∷ ς ∷ []) "2Tim.4.16" ∷ word (μ ∷ ε ∷ []) "2Tim.4.16" ∷ word (ἐ ∷ γ ∷ κ ∷ α ∷ τ ∷ έ ∷ ∙λ ∷ ι ∷ π ∷ ο ∷ ν ∷ []) "2Tim.4.16" ∷ word (μ ∷ ὴ ∷ []) "2Tim.4.16" ∷ word (α ∷ ὐ ∷ τ ∷ ο ∷ ῖ ∷ ς ∷ []) "2Tim.4.16" ∷ word (∙λ ∷ ο ∷ γ ∷ ι ∷ σ ∷ θ ∷ ε ∷ ί ∷ η ∷ []) "2Tim.4.16" ∷ word (ὁ ∷ []) "2Tim.4.17" ∷ word (δ ∷ ὲ ∷ []) "2Tim.4.17" ∷ word (κ ∷ ύ ∷ ρ ∷ ι ∷ ό ∷ ς ∷ []) "2Tim.4.17" ∷ word (μ ∷ ο ∷ ι ∷ []) "2Tim.4.17" ∷ word (π ∷ α ∷ ρ ∷ έ ∷ σ ∷ τ ∷ η ∷ []) "2Tim.4.17" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.4.17" ∷ word (ἐ ∷ ν ∷ ε ∷ δ ∷ υ ∷ ν ∷ ά ∷ μ ∷ ω ∷ σ ∷ έ ∷ ν ∷ []) "2Tim.4.17" ∷ word (μ ∷ ε ∷ []) "2Tim.4.17" ∷ word (ἵ ∷ ν ∷ α ∷ []) "2Tim.4.17" ∷ word (δ ∷ ι ∷ []) "2Tim.4.17" ∷ word (ἐ ∷ μ ∷ ο ∷ ῦ ∷ []) "2Tim.4.17" ∷ word (τ ∷ ὸ ∷ []) "2Tim.4.17" ∷ word (κ ∷ ή ∷ ρ ∷ υ ∷ γ ∷ μ ∷ α ∷ []) "2Tim.4.17" ∷ word (π ∷ ∙λ ∷ η ∷ ρ ∷ ο ∷ φ ∷ ο ∷ ρ ∷ η ∷ θ ∷ ῇ ∷ []) "2Tim.4.17" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.4.17" ∷ word (ἀ ∷ κ ∷ ο ∷ ύ ∷ σ ∷ ω ∷ σ ∷ ι ∷ ν ∷ []) "2Tim.4.17" ∷ word (π ∷ ά ∷ ν ∷ τ ∷ α ∷ []) "2Tim.4.17" ∷ word (τ ∷ ὰ ∷ []) "2Tim.4.17" ∷ word (ἔ ∷ θ ∷ ν ∷ η ∷ []) "2Tim.4.17" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.4.17" ∷ word (ἐ ∷ ρ ∷ ρ ∷ ύ ∷ σ ∷ θ ∷ η ∷ ν ∷ []) "2Tim.4.17" ∷ word (ἐ ∷ κ ∷ []) "2Tim.4.17" ∷ word (σ ∷ τ ∷ ό ∷ μ ∷ α ∷ τ ∷ ο ∷ ς ∷ []) "2Tim.4.17" ∷ word (∙λ ∷ έ ∷ ο ∷ ν ∷ τ ∷ ο ∷ ς ∷ []) "2Tim.4.17" ∷ word (ῥ ∷ ύ ∷ σ ∷ ε ∷ τ ∷ α ∷ ί ∷ []) "2Tim.4.18" ∷ word (μ ∷ ε ∷ []) "2Tim.4.18" ∷ word (ὁ ∷ []) "2Tim.4.18" ∷ word (κ ∷ ύ ∷ ρ ∷ ι ∷ ο ∷ ς ∷ []) "2Tim.4.18" ∷ word (ἀ ∷ π ∷ ὸ ∷ []) "2Tim.4.18" ∷ word (π ∷ α ∷ ν ∷ τ ∷ ὸ ∷ ς ∷ []) "2Tim.4.18" ∷ word (ἔ ∷ ρ ∷ γ ∷ ο ∷ υ ∷ []) "2Tim.4.18" ∷ word (π ∷ ο ∷ ν ∷ η ∷ ρ ∷ ο ∷ ῦ ∷ []) "2Tim.4.18" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.4.18" ∷ word (σ ∷ ώ ∷ σ ∷ ε ∷ ι ∷ []) "2Tim.4.18" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "2Tim.4.18" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "2Tim.4.18" ∷ word (β ∷ α ∷ σ ∷ ι ∷ ∙λ ∷ ε ∷ ί ∷ α ∷ ν ∷ []) "2Tim.4.18" ∷ word (α ∷ ὐ ∷ τ ∷ ο ∷ ῦ ∷ []) "2Tim.4.18" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "2Tim.4.18" ∷ word (ἐ ∷ π ∷ ο ∷ υ ∷ ρ ∷ ά ∷ ν ∷ ι ∷ ο ∷ ν ∷ []) "2Tim.4.18" ∷ word (ᾧ ∷ []) "2Tim.4.18" ∷ word (ἡ ∷ []) "2Tim.4.18" ∷ word (δ ∷ ό ∷ ξ ∷ α ∷ []) "2Tim.4.18" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "2Tim.4.18" ∷ word (τ ∷ ο ∷ ὺ ∷ ς ∷ []) "2Tim.4.18" ∷ word (α ∷ ἰ ∷ ῶ ∷ ν ∷ α ∷ ς ∷ []) "2Tim.4.18" ∷ word (τ ∷ ῶ ∷ ν ∷ []) "2Tim.4.18" ∷ word (α ∷ ἰ ∷ ώ ∷ ν ∷ ω ∷ ν ∷ []) "2Tim.4.18" ∷ word (ἀ ∷ μ ∷ ή ∷ ν ∷ []) "2Tim.4.18" ∷ word (Ἄ ∷ σ ∷ π ∷ α ∷ σ ∷ α ∷ ι ∷ []) "2Tim.4.19" ∷ word (Π ∷ ρ ∷ ί ∷ σ ∷ κ ∷ α ∷ ν ∷ []) "2Tim.4.19" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.4.19" ∷ word (Ἀ ∷ κ ∷ ύ ∷ ∙λ ∷ α ∷ ν ∷ []) "2Tim.4.19" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.4.19" ∷ word (τ ∷ ὸ ∷ ν ∷ []) "2Tim.4.19" ∷ word (Ὀ ∷ ν ∷ η ∷ σ ∷ ι ∷ φ ∷ ό ∷ ρ ∷ ο ∷ υ ∷ []) "2Tim.4.19" ∷ word (ο ∷ ἶ ∷ κ ∷ ο ∷ ν ∷ []) "2Tim.4.19" ∷ word (Ἔ ∷ ρ ∷ α ∷ σ ∷ τ ∷ ο ∷ ς ∷ []) "2Tim.4.20" ∷ word (ἔ ∷ μ ∷ ε ∷ ι ∷ ν ∷ ε ∷ ν ∷ []) "2Tim.4.20" ∷ word (ἐ ∷ ν ∷ []) "2Tim.4.20" ∷ word (Κ ∷ ο ∷ ρ ∷ ί ∷ ν ∷ θ ∷ ῳ ∷ []) "2Tim.4.20" ∷ word (Τ ∷ ρ ∷ ό ∷ φ ∷ ι ∷ μ ∷ ο ∷ ν ∷ []) "2Tim.4.20" ∷ word (δ ∷ ὲ ∷ []) "2Tim.4.20" ∷ word (ἀ ∷ π ∷ έ ∷ ∙λ ∷ ι ∷ π ∷ ο ∷ ν ∷ []) "2Tim.4.20" ∷ word (ἐ ∷ ν ∷ []) "2Tim.4.20" ∷ word (Μ ∷ ι ∷ ∙λ ∷ ή ∷ τ ∷ ῳ ∷ []) "2Tim.4.20" ∷ word (ἀ ∷ σ ∷ θ ∷ ε ∷ ν ∷ ο ∷ ῦ ∷ ν ∷ τ ∷ α ∷ []) "2Tim.4.20" ∷ word (Σ ∷ π ∷ ο ∷ ύ ∷ δ ∷ α ∷ σ ∷ ο ∷ ν ∷ []) "2Tim.4.21" ∷ word (π ∷ ρ ∷ ὸ ∷ []) "2Tim.4.21" ∷ word (χ ∷ ε ∷ ι ∷ μ ∷ ῶ ∷ ν ∷ ο ∷ ς ∷ []) "2Tim.4.21" ∷ word (ἐ ∷ ∙λ ∷ θ ∷ ε ∷ ῖ ∷ ν ∷ []) "2Tim.4.21" ∷ word (Ἀ ∷ σ ∷ π ∷ ά ∷ ζ ∷ ε ∷ τ ∷ α ∷ ί ∷ []) "2Tim.4.21" ∷ word (σ ∷ ε ∷ []) "2Tim.4.21" ∷ word (Ε ∷ ὔ ∷ β ∷ ο ∷ υ ∷ ∙λ ∷ ο ∷ ς ∷ []) "2Tim.4.21" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.4.21" ∷ word (Π ∷ ο ∷ ύ ∷ δ ∷ η ∷ ς ∷ []) "2Tim.4.21" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.4.21" ∷ word (Λ ∷ ί ∷ ν ∷ ο ∷ ς ∷ []) "2Tim.4.21" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.4.21" ∷ word (Κ ∷ ∙λ ∷ α ∷ υ ∷ δ ∷ ί ∷ α ∷ []) "2Tim.4.21" ∷ word (κ ∷ α ∷ ὶ ∷ []) "2Tim.4.21" ∷ word (ο ∷ ἱ ∷ []) "2Tim.4.21" ∷ word (ἀ ∷ δ ∷ ε ∷ ∙λ ∷ φ ∷ ο ∷ ὶ ∷ []) "2Tim.4.21" ∷ word (π ∷ ά ∷ ν ∷ τ ∷ ε ∷ ς ∷ []) "2Tim.4.21" ∷ word (Ὁ ∷ []) "2Tim.4.22" ∷ word (κ ∷ ύ ∷ ρ ∷ ι ∷ ο ∷ ς ∷ []) "2Tim.4.22" ∷ word (μ ∷ ε ∷ τ ∷ ὰ ∷ []) "2Tim.4.22" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "2Tim.4.22" ∷ word (π ∷ ν ∷ ε ∷ ύ ∷ μ ∷ α ∷ τ ∷ ό ∷ ς ∷ []) "2Tim.4.22" ∷ word (σ ∷ ο ∷ υ ∷ []) "2Tim.4.22" ∷ word (ἡ ∷ []) "2Tim.4.22" ∷ word (χ ∷ ά ∷ ρ ∷ ι ∷ ς ∷ []) "2Tim.4.22" ∷ word (μ ∷ ε ∷ θ ∷ []) "2Tim.4.22" ∷ word (ὑ ∷ μ ∷ ῶ ∷ ν ∷ []) "2Tim.4.22" ∷ []
{ "alphanum_fraction": 0.3402209316, "avg_line_length": 46.5706260032, "ext": "agda", "hexsha": "5757092dd683ca58f6a3306039168b5fd1e0e5ea", "lang": "Agda", "max_forks_count": 5, "max_forks_repo_forks_event_max_datetime": "2017-06-11T11:25:09.000Z", "max_forks_repo_forks_event_min_datetime": "2015-02-27T22:34:13.000Z", "max_forks_repo_head_hexsha": "915c46c27c7f8aad5907474d8484f2685a4cd6a7", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "scott-fleischman/GreekGrammar", "max_forks_repo_path": "agda/Text/Greek/SBLGNT/2Tim.agda", "max_issues_count": 13, "max_issues_repo_head_hexsha": "915c46c27c7f8aad5907474d8484f2685a4cd6a7", "max_issues_repo_issues_event_max_datetime": "2020-09-07T11:58:38.000Z", "max_issues_repo_issues_event_min_datetime": "2015-05-28T20:04:08.000Z", "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "scott-fleischman/GreekGrammar", "max_issues_repo_path": "agda/Text/Greek/SBLGNT/2Tim.agda", "max_line_length": 93, "max_stars_count": 44, "max_stars_repo_head_hexsha": "915c46c27c7f8aad5907474d8484f2685a4cd6a7", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "scott-fleischman/GreekGrammar", "max_stars_repo_path": "agda/Text/Greek/SBLGNT/2Tim.agda", "max_stars_repo_stars_event_max_datetime": "2022-03-06T15:41:57.000Z", "max_stars_repo_stars_event_min_datetime": "2015-05-29T14:48:51.000Z", "num_tokens": 41596, "size": 58027 }
-- There was a bug with module application in a let in a -- parameterised module. module Issue155 (A : Set) where module M (Y : Set) where postulate F : Set → Set Foo : Set₁ Foo = let module M′ = M A in (B : Set) → M′.F B record R : Set₁ where open M A field B : Set C : F A
{ "alphanum_fraction": 0.6198630137, "avg_line_length": 18.25, "ext": "agda", "hexsha": "1d80e50517c60a72585d58151bfe9f3b345ee36c", "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/Succeed/Issue155.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/Succeed/Issue155.agda", "max_line_length": 56, "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/Succeed/Issue155.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": 100, "size": 292 }
------------------------------------------------------------------------ -- Validity of declarative typing and kinding of Fω with interval kinds ------------------------------------------------------------------------ {-# OPTIONS --safe --without-K #-} module FOmegaInt.Typing.Validity where open import Data.Fin using (Fin; suc; zero) open import Data.Fin.Substitution open import Data.Fin.Substitution.Lemmas open import Data.Fin.Substitution.ExtraLemmas open import Data.Product as Prod using (∃; _,_; _×_; proj₁; proj₂) open import Data.Vec as Vec using ([]; _∷_) import Data.Vec.Relation.Binary.Pointwise.Inductive as Pointwise open import Function using (_∘_) open import Relation.Binary.Construct.Closure.ReflexiveTransitive using (ε; _◅_) open import Relation.Binary.PropositionalEquality hiding ([_]) open import Relation.Binary.TransReasoning open import Relation.Nullary using (¬_) open import Relation.Nullary.Negation using (contradiction) open import FOmegaInt.Syntax open import FOmegaInt.Typing open import FOmegaInt.Kinding.Declarative.Equivalence open import FOmegaInt.Reduction.Full import FOmegaInt.Kinding.Declarative import FOmegaInt.Kinding.Declarative.Validity -- Extended kinding module E where open FOmegaInt.Kinding.Declarative public open FOmegaInt.Kinding.Declarative.Validity public open KindedSubstitution public ------------------------------------------------------------------------ -- Validity of declarative kinding, typing, subkinding and subtyping open Syntax open Substitution hiding (subst) open TermCtx open Typing open TypedSubstitution open WfCtxOps using (lookup-tp) -- Validity of kinding: the kinds of well-kinded types are well-formed. Tp∈-valid : ∀ {n} {Γ : Ctx n} {a k} → Γ ⊢Tp a ∈ k → Γ ⊢ k kd Tp∈-valid = sound-kd ∘ E.Tp∈-valid ∘ complete-Tp∈ -- Validity of subkinding: subkinds are well-formed. <∷-valid : ∀ {n} {Γ : Ctx n} {j k} → Γ ⊢ j <∷ k → Γ ⊢ j kd × Γ ⊢ k kd <∷-valid = Prod.map sound-kd sound-kd ∘ E.<∷-valid ∘ complete-<∷ -- Validity of subtyping: subtypes that are related in some kind `k' -- inhabit `k'. <:-valid : ∀ {n} {Γ : Ctx n} {a b k} → Γ ⊢ a <: b ∈ k → Γ ⊢Tp a ∈ k × Γ ⊢Tp b ∈ k <:-valid = Prod.map sound-Tp∈ sound-Tp∈ ∘ E.<:-valid ∘ complete-<: -- A corollary. <:-valid-kd : ∀ {n} {Γ : Ctx n} {a b k} → Γ ⊢ a <: b ∈ k → Γ ⊢ k kd <:-valid-kd a<:b∈k = Tp∈-valid (proj₁ (<:-valid a<:b∈k)) -- Validity of type equality: types that are equal in some kind `k' -- inhabit `k'. ≃-valid : ∀ {n} {Γ : Ctx n} {a b k} → Γ ⊢ a ≃ b ∈ k → Γ ⊢Tp a ∈ k × Γ ⊢Tp b ∈ k ≃-valid = Prod.map sound-Tp∈ sound-Tp∈ ∘ E.≃-valid ∘ complete-≃ -- Validity of kind equality: equal kinds are well-formed. ≅-valid : ∀ {n} {Γ : Ctx n} {j k} → Γ ⊢ j ≅ k → Γ ⊢ j kd × Γ ⊢ k kd ≅-valid (<∷-antisym j<∷k k<∷j) = <∷-valid j<∷k -- Validity of combined kind and type equality: equal ascriptions are -- well-formed. ≃wf-valid : ∀ {n} {Γ : Ctx n} {a b} → Γ ⊢ a ≃ b wf → Γ ⊢ a wf × Γ ⊢ b wf ≃wf-valid (≃wf-≅ j≅k) = Prod.map wf-kd wf-kd (≅-valid j≅k) ≃wf-valid (≃wf-≃ a≃b∈k) = Prod.map wf-tp wf-tp (≃-valid a≃b∈k) -- Validity of typing: the types of well-typed terms are well-kinded. Tm∈-valid : ∀ {n} {Γ : Ctx n} {a b} → Γ ⊢Tm a ∈ b → Γ ⊢Tp b ∈ * Tm∈-valid (∈-var x Γ-ctx Γ[x]≡tp-a) = lookup-tp x Γ-ctx Γ[x]≡tp-a Tm∈-valid (∈-∀-i k-kd a∈b) = ∈-∀-f k-kd (Tm∈-valid a∈b) Tm∈-valid (∈-→-i a∈* b∈c c∈*) = ∈-→-f a∈* c∈* Tm∈-valid (∈-∀-e a∈∀kc b∈k) = let k-kd , c∈* = Tp∈-∀-inv (Tm∈-valid a∈∀kc) in Tp∈-[] c∈* (∈-tp b∈k) Tm∈-valid (∈-→-e a∈c⇒d b∈c) = let c∈* , d∈* = Tp∈-→-inv (Tm∈-valid a∈c⇒d) in d∈* Tm∈-valid (∈-⇑ a∈b b<:c) = proj₂ (<:-valid b<:c) -- Subtypes inhabiting interval kinds are proper types. <:-⋯-* : ∀ {n} {Γ : Ctx n} {a b c d} → Γ ⊢ a <: b ∈ c ⋯ d → Γ ⊢ a <: b ∈ * <:-⋯-* a<:b∈c⋯d = let a∈c⋯d , b∈c⋯d = <:-valid a<:b∈c⋯d in <:-⇑ (<:-⋯-i a<:b∈c⋯d) (<∷-⋯ (<:-⊥ a∈c⋯d) (<:-⊤ b∈c⋯d)) -- An admissible rule for kinding η-expanded type operators. Tp∈-η : ∀ {n} {Γ : Ctx n} {a j k} → Γ ⊢Tp a ∈ Π j k → Γ ⊢Tp Λ j (weaken a · var zero) ∈ Π j k Tp∈-η a∈Πjk with complete-Tp∈ a∈Πjk Tp∈-η a∈Πjk | a∈Πjk′ with E.Tp∈-valid a∈Πjk′ ... | E.Kinding.kd-Π j-kd k-kd = sound-Tp∈ (E.Tp∈-η a∈Πjk′ j-kd k-kd) -- Operations on well-formed context equality that require weakening -- and validity of ascription equality. module CtxEqOps where open Pointwise using (Pointwise; []; _∷_; map⁺) -- Convert a context equation to its All₂ representation. ≃ctx-toAll : ∀ {m} {Γ Δ : Ctx m} → Γ ≃ Δ ctx → Pointwise (Γ ⊢_≃_wf) (toVec Γ) (toVec Δ) ≃ctx-toAll ≃-[] = [] ≃ctx-toAll (≃-∷ a≃b Γ≃Δ) = let a-wf , _ = ≃wf-valid a≃b in ≃wf-weaken a-wf a≃b ∷ map⁺ (≃wf-weaken a-wf) (≃ctx-toAll Γ≃Δ) -- Ascriptions looked up in equal contexts are equal. lookup-≃ : ∀ {m} {Γ Δ : Ctx m} x → Γ ≃ Δ ctx → Γ ⊢ lookup Γ x ≃ lookup Δ x wf lookup-≃ x Γ≃Δ = Pointwise.lookup (≃ctx-toAll Γ≃Δ) x lookup-≃-kd : ∀ {m} {Γ Δ : Ctx m} {j k} x → Γ ≃ Δ ctx → lookup Γ x ≡ kd j → lookup Δ x ≡ kd k → Γ ⊢ j ≅ k lookup-≃-kd x Γ≃Δ Γ[x]≡kd-j Δ[x]≡kd-k = ≃wf-kd-inv (subst₂ (_ ⊢_≃_wf) Γ[x]≡kd-j Δ[x]≡kd-k (lookup-≃ x Γ≃Δ)) ---------------------------------------------------------------------- -- Context narrowing (strong version) -- -- NOTE. We could have proven a *weak* variant of context narrowing -- for the (original) declarative judgments directly in the Typing -- module (before establishing validity). But since we did not need -- (weak or strong) context narrowing of the original judgments until -- now, it is easier to instead prove the strengthened version here -- via context narrowing and equivalence of the extended rules. module TypedNarrowing where -- Narrowing the kind of the first type variable preserves -- well-formedness of kinds. ⇓-kd : ∀ {n} {Γ : Ctx n} {j₁ j₂ k} → Γ ⊢ j₁ <∷ j₂ → kd j₂ ∷ Γ ⊢ k kd → kd j₁ ∷ Γ ⊢ k kd ⇓-kd j₁<∷j₂ k-kd = let j₁<∷j₂′ = complete-<∷ j₁<∷j₂ j₁-kd , _ = E.<∷-valid j₁<∷j₂′ in sound-kd (E.⇓-kd j₁-kd j₁<∷j₂′ (complete-kd k-kd)) -- Narrowing the kind of the first type variable preserves -- well-kindedness. ⇓-Tp∈ : ∀ {n} {Γ : Ctx n} {j₁ j₂ a k} → Γ ⊢ j₁ <∷ j₂ → kd j₂ ∷ Γ ⊢Tp a ∈ k → kd j₁ ∷ Γ ⊢Tp a ∈ k ⇓-Tp∈ j₁<∷j₂ a∈k = let j₁<∷j₂′ = complete-<∷ j₁<∷j₂ j₁-kd , _ = E.<∷-valid j₁<∷j₂′ in sound-Tp∈ (E.⇓-Tp∈ j₁-kd j₁<∷j₂′ (complete-Tp∈ a∈k)) -- Narrowing the kind of the first type variable preserves -- subkinding and subtyping. ⇓-<∷ : ∀ {n} {Γ : Ctx n} {j₁ j₂ k₁ k₂} → Γ ⊢ j₁ <∷ j₂ → kd j₂ ∷ Γ ⊢ k₁ <∷ k₂ → kd j₁ ∷ Γ ⊢ k₁ <∷ k₂ ⇓-<∷ j₁<∷j₂ k₁<∷k₂ = let j₁<∷j₂′ = complete-<∷ j₁<∷j₂ j₁-kd , _ = E.<∷-valid j₁<∷j₂′ in sound-<∷ (E.⇓-<∷ j₁-kd j₁<∷j₂′ (complete-<∷ k₁<∷k₂)) ⇓-<: : ∀ {n} {Γ : Ctx n} {j₁ j₂ a₁ a₂ k} → Γ ⊢ j₁ <∷ j₂ → kd j₂ ∷ Γ ⊢ a₁ <: a₂ ∈ k → kd j₁ ∷ Γ ⊢ a₁ <: a₂ ∈ k ⇓-<: j₁<∷j₂ a₁<:a₂∈k = let j₁<∷j₂′ = complete-<∷ j₁<∷j₂ j₁-kd , _ = E.<∷-valid j₁<∷j₂′ in sound-<: (E.⇓-<: j₁-kd j₁<∷j₂′ (complete-<: a₁<:a₂∈k)) open TypedNarrowing -- Transitivity of subkinding and kind equality. -- -- NOTE. We could have proven admissibility of these rules directly in -- the Typing module (before establishing validity) but this would -- have required a proof of (weak) context narrowing for the -- (original) declarative rules. As we do not need these transitivity -- properties until we prove subject reduction (below), we go with an -- indirect proof instead. <∷-trans : ∀ {n} {Γ : Ctx n} {j k l} → Γ ⊢ j <∷ k → Γ ⊢ k <∷ l → Γ ⊢ j <∷ l <∷-trans k₁<∷k₂ k₂<∷k₃ = sound-<∷ (E.<∷-trans (complete-<∷ k₁<∷k₂) (complete-<∷ k₂<∷k₃)) ≅-trans : ∀ {n} {Γ : Ctx n} {j k l} → Γ ⊢ j ≅ k → Γ ⊢ k ≅ l → Γ ⊢ j ≅ l ≅-trans k₁≅k₂ k₂≅k₃ = sound-≅ (E.≅-trans (complete-≅ k₁≅k₂) (complete-≅ k₂≅k₃)) -- Relational reasoning for kind and type equality. -- -- NOTE. Even though the equalities are technically preorders, we have -- to use the weaker reasoning designed for transitive relations here. -- This is because reflexivity proofs in typed relations are typically -- also typed, i.e. given some context `Γ' and some raw kind or term -- `x` we cannot, in general, conclude that `Γ ⊢ x ∼ x` without an -- additional well-formedness proof `Γ ⊢ x' of some sort. module ≅-Reasoning where ≅-reasoning : TransCtxTermRelReasoning _⊢_≅_ ≅-reasoning = record { ∼-trans = ≅-trans } open TransCtxTermRelReasoning ≅-reasoning public renaming (_∼⟨_⟩_ to _≅⟨_⟩_) module ≃-Reasoning where ≃-reasoning : TypedTransRelReasoning _⊢_≃_∈_ ≃-reasoning = record { ∼-trans = ≃-trans } open TypedTransRelReasoning ≃-reasoning public renaming (_∼⟨_⟩_ to _≃⟨_⟩_) ---------------------------------------------------------------------- -- Generation lemmas for abstractions -- A generation lemma for kinding of type operator abstractions. Tp∈-Λ-inv : ∀ {n} {Γ : Ctx n} {l a j k} → Γ ⊢Tp Λ l a ∈ Π j k → Γ ⊢ l kd × kd j ∷ Γ ⊢Tp a ∈ k Tp∈-Λ-inv (∈-Π-i l-kd a∈k) = l-kd , a∈k Tp∈-Λ-inv (∈-⇑ Λl∈Πj₁k₁ (<∷-Π j₂<∷j₁ k₁<∷k₂ Πj₁k₁-kd)) = let l-kd , a∈k₁ = Tp∈-Λ-inv Λl∈Πj₁k₁ in l-kd , ∈-⇑ (⇓-Tp∈ j₂<∷j₁ a∈k₁) k₁<∷k₂ -- Term abstractions are not types. Tp∈-¬λ : ∀ {n} {Γ : Ctx n} {a b k} → ¬ Γ ⊢Tp ƛ a b ∈ k Tp∈-¬λ (∈-s-i λab∈c⋯d) = Tp∈-¬λ λab∈c⋯d Tp∈-¬λ (∈-⇑ λab∈j j<∷k) = Tp∈-¬λ λab∈j ---------------------------------------------------------------------- -- Admissible kind and type equality rules. -- Functionality of kind formation (strong version). kd-[≃] : ∀ {n} {Γ : Ctx n} {a b j k} → kd j ∷ Γ ⊢ k kd → Γ ⊢ a ≃ b ∈ j → Γ ⊢ k Kind[ a ] ≅ k Kind[ b ] kd-[≃] k-kd a≃b∈j = sound-≅ (E.kd-[≃] (complete-kd k-kd) (complete-≃ a≃b∈j)) -- Functionality of kinding (strong version). Tp∈-[≃] : ∀ {n} {Γ : Ctx n} {a b c j k} → kd j ∷ Γ ⊢Tp a ∈ k → Γ ⊢ b ≃ c ∈ j → Γ ⊢ a [ b ] ≃ a [ c ] ∈ k Kind[ b ] Tp∈-[≃] a∈k b≃c∈j = sound-≃ (E.Tp∈-[≃] (complete-Tp∈ a∈k) (complete-≃ b≃c∈j)) -- An admissible congruence rule for kind equality w.r.t. dependent -- arrow formation. ≅-Π : ∀ {n} {Γ : Ctx n} {j₁ j₂ k₁ k₂} → Γ ⊢ j₁ ≅ j₂ → kd j₁ ∷ Γ ⊢ k₁ ≅ k₂ → Γ ⊢ Π j₁ k₁ ≅ Π j₂ k₂ ≅-Π (<∷-antisym j₁<∷j₂ j₂<∷j₁) (<∷-antisym k₁<∷k₂ k₂<∷k₁) = let j₁-kd , j₂-kd = <∷-valid j₁<∷j₂ k₁-kd , k₂-kd = <∷-valid k₁<∷k₂ in <∷-antisym (<∷-Π j₂<∷j₁ (⇓-<∷ j₂<∷j₁ k₁<∷k₂) (kd-Π j₁-kd k₁-kd)) (<∷-Π j₁<∷j₂ k₂<∷k₁ (kd-Π j₂-kd (⇓-kd j₂<∷j₁ k₂-kd))) -- Equal types inhabiting interval kinds are proper types. ≃-⋯-* : ∀ {n} {Γ : Ctx n} {a b c d} → Γ ⊢ a ≃ b ∈ c ⋯ d → Γ ⊢ a ≃ b ∈ * ≃-⋯-* (<:-antisym a<:b∈c⋯d b<:a∈c⋯d) = let a<:b∈* = <:-⋯-* a<:b∈c⋯d b<:a∈* = <:-⋯-* b<:a∈c⋯d in <:-antisym a<:b∈* b<:a∈* -- An admissible congruence rule for type equality w.r.t. formation of -- universal types. ≃-∀ : ∀ {n} {Γ : Ctx n} {k₁ k₂ a₁ a₂} → Γ ⊢ k₁ ≅ k₂ → kd k₁ ∷ Γ ⊢ a₁ ≃ a₂ ∈ * → Γ ⊢ Π k₁ a₁ ≃ Π k₂ a₂ ∈ * ≃-∀ (<∷-antisym k₁<∷k₂ k₂<∷k₁) (<:-antisym a₁<:a₂∈* a₂<:a₁∈*) = let k₁-kd , k₂-kd = <∷-valid k₁<∷k₂ a₁∈* , a₂∈* = <:-valid a₁<:a₂∈* in <:-antisym (<:-∀ k₂<∷k₁ (⇓-<: k₂<∷k₁ a₁<:a₂∈*) (∈-∀-f k₁-kd a₁∈*)) (<:-∀ k₁<∷k₂ a₂<:a₁∈* (∈-∀-f k₂-kd (⇓-Tp∈ k₂<∷k₁ a₂∈*))) -- Another, weaker congruence lemma for type equality w.r.t. type -- operator abstraction. ≃-λ′ : ∀ {n} {Γ : Ctx n} {j₁ j₂ a₁ a₂ k} → Γ ⊢ j₁ ≅ j₂ → kd j₁ ∷ Γ ⊢ a₁ ≃ a₂ ∈ k → Γ ⊢ Λ j₁ a₁ ≃ Λ j₂ a₂ ∈ Π j₁ k ≃-λ′ (<∷-antisym j₁<∷j₂ j₂<∷j₁) (<:-antisym a₁<:a₂∈k a₂<:a₁∈k) = let j₁-kd , j₂-kd = <∷-valid j₁<∷j₂ a₁∈k , a₂∈k = <:-valid a₁<:a₂∈k k-kd = Tp∈-valid a₁∈k k-kd′ = ⇓-kd j₂<∷j₁ k-kd Πj₂k<∷j₁k = <∷-Π j₁<∷j₂ (<∷-refl k-kd) (kd-Π j₂-kd k-kd′) Λj₁a₁∈Πj₁k = ∈-Π-i j₁-kd a₁∈k Λj₂a₂∈Πj₁k = ∈-⇑ (∈-Π-i j₂-kd (⇓-Tp∈ j₂<∷j₁ a₂∈k)) Πj₂k<∷j₁k in <:-antisym (<:-λ a₁<:a₂∈k Λj₁a₁∈Πj₁k Λj₂a₂∈Πj₁k) (<:-λ a₂<:a₁∈k Λj₂a₂∈Πj₁k Λj₁a₁∈Πj₁k) -- An admissible congruence rule for type equality w.r.t. type -- application. ≃-· : ∀ {n} {Γ : Ctx n} {a₁ a₂ b₁ b₂ j k} → Γ ⊢ a₁ ≃ a₂ ∈ Π j k → Γ ⊢ b₁ ≃ b₂ ∈ j → Γ ⊢ a₁ · b₁ ≃ a₂ · b₂ ∈ k Kind[ b₁ ] ≃-· (<:-antisym a₁<:a₂∈Πjk a₂<:a₁∈Πjk) b₁≃b₂∈j with <:-valid-kd a₁<:a₂∈Πjk ... | (kd-Π j-kd k-kd) = <:-antisym (<:-· a₁<:a₂∈Πjk b₁≃b₂∈j) (<:-⇑ (<:-· a₂<:a₁∈Πjk (≃-sym b₁≃b₂∈j)) (≅⇒<∷ (kd-[≃] k-kd (≃-sym b₁≃b₂∈j)))) -- An admissible, more flexible β-rule for type equality. ≃-β′ : ∀ {n} {Γ : Ctx n} {a b j k l} → kd j ∷ Γ ⊢Tp a ∈ k → Γ ⊢Tp b ∈ j → Γ ⊢Tp Λ l a ∈ Π j k → Γ ⊢ (Λ l a) · b ≃ a [ b ] ∈ k Kind[ b ] ≃-β′ a∈k b∈j Λla∈Πjk = let j-kd = Tp∈-valid b∈j in ≃-trans (≃-· (≃-λ (≃-refl a∈k) Λla∈Πjk (∈-Π-i j-kd a∈k)) (≃-refl b∈j)) (≃-β a∈k b∈j) -- An admissible singleton-introduction rule for type equality. ≃-s-i : ∀ {n} {Γ : Ctx n} {a b c d} → Γ ⊢ a ≃ b ∈ c ⋯ d → Γ ⊢ a ≃ b ∈ a ⋯ a ≃-s-i (<:-antisym a<:b∈c⋯d b<:a∈c⋯d) = let a<:b∈* = <:-⋯-* a<:b∈c⋯d b<:a∈* = <:-⋯-* b<:a∈c⋯d a∈* , _ = <:-valid a<:b∈* a<:a∈* = <:-refl a∈* in <:-antisym (<:-⇑ (<:-⋯-i a<:b∈c⋯d) (<∷-⋯ a<:a∈* b<:a∈*)) (<:-⇑ (<:-⋯-i b<:a∈c⋯d) (<∷-⋯ a<:b∈* a<:a∈*)) ------------------------------------------------------------------------ -- Subject reduction for kinding. -- A variant of subject reduction for kinding: untyped β-reduction of -- kinds and types is included in kind resp. type equality. mutual kd-→β-≅ : ∀ {n} {Γ : Ctx n} {j k} → Γ ⊢ j kd → j Kd→β k → Γ ⊢ j ≅ k kd-→β-≅ (kd-⋯ a∈* b∈*) (a→a′ ⋯₁ b) = ≅-⋯ (Tp∈-→β-≃ a∈* a→a′) (≃-refl b∈*) kd-→β-≅ (kd-⋯ a∈* b∈*) (a ⋯₂ b→b′) = ≅-⋯ (≃-refl a∈*) (Tp∈-→β-≃ b∈* b→b′) kd-→β-≅ (kd-Π j-kd k-kd) (Π₁ j→j′ k) = ≅-Π (kd-→β-≅ j-kd j→j′) (≅-refl k-kd) kd-→β-≅ (kd-Π j-kd k-kd) (Π₂ j k→k′) = ≅-Π (≅-refl j-kd) (kd-→β-≅ k-kd k→k′) Tp∈-→β-≃ : ∀ {n} {Γ : Ctx n} {a b k} → Γ ⊢Tp a ∈ k → a →β b → Γ ⊢ a ≃ b ∈ k Tp∈-→β-≃ (∈-var x Γ-ctx Γ[x]≡kd-k) ⌈ () ⌉ Tp∈-→β-≃ (∈-⊥-f Γ-ctx) ⌈ () ⌉ Tp∈-→β-≃ (∈-⊤-f Γ-ctx) ⌈ () ⌉ Tp∈-→β-≃ (∈-∀-f k-kd a∈*) ⌈ () ⌉ Tp∈-→β-≃ (∈-∀-f k-kd a∈*) (Π₁ k→k′ a) = ≃-∀ (kd-→β-≅ k-kd k→k′) (≃-refl a∈*) Tp∈-→β-≃ (∈-∀-f k-kd a∈*) (Π₂ k a→a′) = ≃-∀ (≅-refl k-kd) (Tp∈-→β-≃ a∈* a→a′) Tp∈-→β-≃ (∈-→-f a∈* b∈*) ⌈ () ⌉ Tp∈-→β-≃ (∈-→-f a∈* b∈*) (a→a′ ⇒₁ b) = ≃-→ (Tp∈-→β-≃ a∈* a→a′) (≃-refl b∈*) Tp∈-→β-≃ (∈-→-f a∈* b∈*) (a ⇒₂ b→b′) = ≃-→ (≃-refl a∈*) (Tp∈-→β-≃ b∈* b→b′) Tp∈-→β-≃ (∈-Π-i j-kd a∈k) ⌈ () ⌉ Tp∈-→β-≃ (∈-Π-i j-kd a∈k) (Λ₁ j→j′ a) = ≃-λ′ (kd-→β-≅ j-kd j→j′) (≃-refl a∈k) Tp∈-→β-≃ (∈-Π-i j-kd a∈k) (Λ₂ j a→a′) = ≃-λ′ (≅-refl j-kd) (Tp∈-→β-≃ a∈k a→a′) Tp∈-→β-≃ (∈-Π-e a∈Πjk b∈j) ⌈ cont-Tp· l a b ⌉ = let l-kd , a∈k = Tp∈-Λ-inv a∈Πjk in ≃-β′ a∈k b∈j a∈Πjk Tp∈-→β-≃ (∈-Π-e a∈Πjk b∈j) ⌈ cont-Tm· a b c ⌉ = contradiction a∈Πjk Tp∈-¬λ Tp∈-→β-≃ (∈-Π-e a∈Πjk b∈j) (a→a′ ·₁ b) = ≃-· (Tp∈-→β-≃ a∈Πjk a→a′) (≃-refl b∈j) Tp∈-→β-≃ (∈-Π-e a∈Πjk b∈j) (a ·₂ b→b′) = ≃-· (≃-refl a∈Πjk) (Tp∈-→β-≃ b∈j b→b′) Tp∈-→β-≃ (∈-s-i a∈k) a→b = ≃-s-i (Tp∈-→β-≃ a∈k a→b) Tp∈-→β-≃ (∈-⇑ a∈j j<∷k) a→b = ≃-⇑ (Tp∈-→β-≃ a∈j a→b) j<∷k kd-→β*-≅ : ∀ {n} {Γ : Ctx n} {j k} → Γ ⊢ j kd → j Kd→β* k → Γ ⊢ j ≅ k kd-→β*-≅ j-kd ε = ≅-refl j-kd kd-→β*-≅ j-kd (j→k ◅ k→*l) = let j≅k = kd-→β-≅ j-kd j→k k-kd = proj₂ (≅-valid j≅k) in ≅-trans j≅k (kd-→β*-≅ k-kd k→*l) Tp∈-→β*-≃ : ∀ {n} {Γ : Ctx n} {a b k} → Γ ⊢Tp a ∈ k → a →β* b → Γ ⊢ a ≃ b ∈ k Tp∈-→β*-≃ a∈k ε = ≃-refl a∈k Tp∈-→β*-≃ a∈k (a→b ◅ b→*c) = let a≃b∈k = Tp∈-→β-≃ a∈k a→b b∈k = proj₂ (≃-valid a≃b∈k) in ≃-trans a≃b∈k (Tp∈-→β*-≃ b∈k b→*c) -- A corollary: subject reduction for kinding, aka preservation of -- kinding under (full) β-reduction. pres-Tp∈-→β* : ∀ {n} {Γ : Ctx n} {a b k} → Γ ⊢Tp a ∈ k → a →β* b → Γ ⊢Tp b ∈ k pres-Tp∈-→β* a∈k a→b = proj₂ (≃-valid (Tp∈-→β*-≃ a∈k a→b))
{ "alphanum_fraction": 0.5093779602, "avg_line_length": 40.4987212276, "ext": "agda", "hexsha": "da9cdedd3e5c2f9e16e5dba909c7d5d5f3a43409", "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": "ae20dac2a5e0c18dff2afda4c19954e24d73a24f", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "Blaisorblade/f-omega-int-agda", "max_forks_repo_path": "src/FOmegaInt/Typing/Validity.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "ae20dac2a5e0c18dff2afda4c19954e24d73a24f", "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": "Blaisorblade/f-omega-int-agda", "max_issues_repo_path": "src/FOmegaInt/Typing/Validity.agda", "max_line_length": 80, "max_stars_count": null, "max_stars_repo_head_hexsha": "ae20dac2a5e0c18dff2afda4c19954e24d73a24f", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "Blaisorblade/f-omega-int-agda", "max_stars_repo_path": "src/FOmegaInt/Typing/Validity.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 8207, "size": 15835 }
module Foundation.Semigroup where open import Foundation.Primitive open import Foundation.Equivalence open import Agda.Primitive record IsAssociative {a} {A : Set a} {ℓ} ⦃ _ : Equivalence A ℓ ⦄ (_∙_ : A → A → A) : ℞ a ⊔ ℓ where field associativity : ∀ x y z → ((x ∙ y) ∙ z) ≈ (x ∙ (y ∙ z)) open IsAssociative ⦃ … ⦄ record Semigroup {c} (A : Set c) ℓ : Set (c ⊔ ⟰ ℓ) where field ⦃ equivalence ⦄ : Equivalence A ℓ _∙_ : A → A → A isAssociative : IsAssociative _∙_ open Semigroup ⦃ … ⦄ record Monoid {a} (A : Set a) ℓ : Set (a ⊔ ⟰ ℓ) where field ⦃ semigroup ⦄ : Semigroup A ℓ ε : A left-identity : ∀ x → ε ∙ x ≈ x right-identity : ∀ x → x ∙ ε ≈ x open Monoid ⦃ … ⦄ open import Relation.Binary.Core open import Algebra.FunctionProperties.Core PowerRightIdentity : ∀ {a ℓ} {A : Set a} → Rel A ℓ → ∀ {b} {B : Set b} → B → (B → A → A) → Set _ PowerRightIdentity _≈_ e _◃_ = ∀ x → (e ◃ x) ≈ x PowerAssociative : ∀ {a b ℓ} {A : Set a} {B : Set b} → (A → A → Set ℓ) → (B → A → A) → (B → B → B) → Set _ PowerAssociative _≈_ _◃_ _∙_ = ∀ x a b → ((b ∙ a) ◃ x) ≈ (b ◃ (a ◃ x)) _over_ : ∀ {f} {F : Set f} {g} → (F → F → Set g) → ∀ {i} {I : Set i} {a} {A : Set a} → (A → I → F) → A → A → Set (i ⊔ g) _*_ over f = λ x y → ∀ i → f x i * f y i record IsMonoidTransformer {s ℓˢ} {S : Set s} (≈ˢ : Rel S ℓˢ) {m ℓᵐ} {M : Set m} (≈ᵐ : Rel M ℓᵐ) (∙ : Op₂ M) (ε : M) (◃ : M → S → S) : Set (s ⊔ ℓˢ ⊔ m ⊔ ℓᵐ) where field ◃-identity : PowerRightIdentity ≈ˢ ε ◃ ≈ˢ-over-◃-⟶-≈ᵐ : ≈ˢ over ◃ ⇒ ≈ᵐ ≈ᵐ-to-≈ˢ-over-◃ : ≈ᵐ ⇒ ≈ˢ over ◃ ◃-extracts-∙ : PowerAssociative ≈ˢ ◃ ∙ open IsMonoidTransformer ⦃ … ⦄ record MonoidTransformer {s} (S : Set s) ℓˢ {m} (M : Set m) ℓᵐ : Set (s ⊔ m ⊔ lsuc (ℓˢ ⊔ ℓᵐ)) where field ⦃ base ⦄ : Equivalence S ℓˢ ⦃ exponent ⦄ : Monoid M ℓᵐ infixl 6 _◃_ field _◃_ : M → S → S instance isMonoidTransformer : IsMonoidTransformer _≈_ _≈_ _∙_ ε _◃_
{ "alphanum_fraction": 0.5412558381, "avg_line_length": 31.5901639344, "ext": "agda", "hexsha": "17c8cc87ac8007ce29afdb572ae3ad184d7cd4b0", "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-1/Foundation/Semigroup.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-1/Foundation/Semigroup.agda", "max_line_length": 162, "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-1/Foundation/Semigroup.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 934, "size": 1927 }
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Data.List.Base where open import Agda.Builtin.List public open import Cubical.Core.Everything open import Cubical.Data.Maybe.Base open import Cubical.Data.Nat.Base module _ {ℓ} {A : Type ℓ} where infixr 5 _++_ infixl 5 _∷ʳ_ [_] : A → List A [ a ] = a ∷ [] _++_ : List A → List A → List A [] ++ ys = ys (x ∷ xs) ++ ys = x ∷ xs ++ ys rev : List A → List A rev [] = [] rev (x ∷ xs) = rev xs ++ [ x ] _∷ʳ_ : List A → A → List A xs ∷ʳ x = xs ++ x ∷ [] length : List A → ℕ length [] = 0 length (x ∷ l) = 1 + length l map : ∀ {ℓ'} {B : Type ℓ'} → (A → B) → List A → List B map f [] = [] map f (x ∷ xs) = f x ∷ map f xs map2 : ∀ {ℓ' ℓ''} {B : Type ℓ'} {C : Type ℓ''} → (A → B → C) → List A → List B → List C map2 f [] _ = [] map2 f _ [] = [] map2 f (x ∷ xs) (y ∷ ys) = f x y ∷ map2 f xs ys foldr : ∀ {ℓ'} {B : Type ℓ'} → (A → B → B) → B → List A → B foldr f b [] = b foldr f b (x ∷ xs) = f x (foldr f b xs) foldl : ∀ {ℓ'} {B : Type ℓ'} → (B → A → B) → B → List A → B foldl f b [] = b foldl f b (x ∷ xs) = foldl f (f b x) xs
{ "alphanum_fraction": 0.4797588286, "avg_line_length": 23.693877551, "ext": "agda", "hexsha": "277cb4f44d38874cc5f4692b791a477e615144da", "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": "5de11df25b79ee49d5c084fbbe6dfc66e4147a2e", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "Edlyr/cubical", "max_forks_repo_path": "Cubical/Data/List/Base.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "5de11df25b79ee49d5c084fbbe6dfc66e4147a2e", "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": "Edlyr/cubical", "max_issues_repo_path": "Cubical/Data/List/Base.agda", "max_line_length": 61, "max_stars_count": null, "max_stars_repo_head_hexsha": "5de11df25b79ee49d5c084fbbe6dfc66e4147a2e", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "Edlyr/cubical", "max_stars_repo_path": "Cubical/Data/List/Base.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 505, "size": 1161 }
module Instances where open import Level using () renaming (zero to ℓ₀) open import Category.Functor using (RawFunctor) open import Data.Maybe as M using (Maybe) open import Data.Nat using (ℕ) open import Data.Product using (_×_ ; _,_ ; proj₁ ; proj₂) open import Data.Vec using (Vec) import Data.Vec.Equality open Data.Vec.Equality.PropositionalEquality using () renaming (to-≡ to VecEq-to-≡) open import Function using (_∘_ ; id) open import Relation.Binary using (Setoid ; module Setoid) open import Relation.Binary.Indexed using (_at_) renaming (Setoid to ISetoid) open import Relation.Binary.PropositionalEquality as P using (_≡_ ; _≗_ ; module ≡-Reasoning) open Setoid using () renaming (_≈_ to _∋_≈_) open import Generic using (VecISetoid) open import Structures using (Functor ; Shaped ; module Shaped) MaybeFunctor : Functor Maybe MaybeFunctor = record { rawfunctor = M.functor ; isFunctor = record { cong = cong ; identity = identity ; composition = composition } } where _<$>_ : {α β : Set} → (α → β) → Maybe α → Maybe β _<$>_ = RawFunctor._<$>_ M.functor cong : {α β : Set} {g h : α → β} → g ≗ h → _<$>_ g ≗ _<$>_ h cong g≗h (M.just x) = P.cong M.just (g≗h x) cong g≗h M.nothing = P.refl identity : {α : Set} → _<$>_ {α} id ≗ id identity (M.just x) = P.refl identity M.nothing = P.refl composition : {α β γ : Set} → (g : β → γ) → (h : α → β) → _<$>_ (g ∘ h) ≗ _<$>_ g ∘ _<$>_ h composition g h (M.just x) = P.refl composition g h M.nothing = P.refl VecShaped : Shaped ℕ Vec VecShaped = record { arity = id ; content = id ; fill = λ _ → id ; isShaped = record { content-fill = λ _ → P.refl ; fill-content = λ _ _ → P.refl } } ShapedISetoid : (S : Setoid ℓ₀ ℓ₀) {C : Set → (Setoid.Carrier S) → Set} → Shaped (Setoid.Carrier S) C → Setoid ℓ₀ ℓ₀ → ISetoid (Setoid.Carrier S) ℓ₀ ℓ₀ ShapedISetoid S {C} ShapeT α = record { Carrier = C (Setoid.Carrier α) ; _≈_ = λ {s₁} {s₂} c₁ c₂ → S ∋ s₁ ≈ s₂ × ISetoid._≈_ (VecISetoid α) (content c₁) (content c₂) ; isEquivalence = record { refl = Setoid.refl S , ISetoid.refl (VecISetoid α) ; sym = λ p → Setoid.sym S (proj₁ p) , ISetoid.sym (VecISetoid α) (proj₂ p) ; trans = λ p q → Setoid.trans S (proj₁ p) (proj₁ q) , ISetoid.trans (VecISetoid α) (proj₂ p) (proj₂ q) } } where open Shaped ShapeT Shaped≈-to-≡ : {S : Set} {C : Set → S → Set} → (ShapeT : Shaped S C) → (α : Set) → {s : S} {x y : C α s} → ShapedISetoid (P.setoid S) ShapeT (P.setoid α) at s ∋ x ≈ y → x ≡ y Shaped≈-to-≡ ShapeT α {s} {x} {y} (shape≈ , content≈) = begin x ≡⟨ P.sym (content-fill x) ⟩ fill s (content x) ≡⟨ P.cong (fill s) (VecEq-to-≡ content≈) ⟩ fill s (content y) ≡⟨ content-fill y ⟩ y ∎ where open ≡-Reasoning open Shaped ShapeT
{ "alphanum_fraction": 0.6120295463, "avg_line_length": 37.9066666667, "ext": "agda", "hexsha": "3f69627c7278af221a8f472b65f27dd185fe2bc5", "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": "a5abbd177f032523d1d9d3fa4b9137aefe88dee0", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "jvoigtlaender/bidiragda", "max_forks_repo_path": "Instances.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "a5abbd177f032523d1d9d3fa4b9137aefe88dee0", "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": "jvoigtlaender/bidiragda", "max_issues_repo_path": "Instances.agda", "max_line_length": 174, "max_stars_count": null, "max_stars_repo_head_hexsha": "a5abbd177f032523d1d9d3fa4b9137aefe88dee0", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "jvoigtlaender/bidiragda", "max_stars_repo_path": "Instances.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 1061, "size": 2843 }
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.HITs.Rationals.HITQ where open import Cubical.HITs.Rationals.HITQ.Base public -- open import Cubical.HITs.Rationals.HITQ.Properties public
{ "alphanum_fraction": 0.7729468599, "avg_line_length": 29.5714285714, "ext": "agda", "hexsha": "0d9bc13cb139754ba743eb6f29bf112982319402", "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/Rationals/HITQ.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/Rationals/HITQ.agda", "max_line_length": 60, "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/Rationals/HITQ.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 61, "size": 207 }
{-# OPTIONS --without-K --safe #-} module Data.Fin.Base where open import Data.Maybe.Base open import Data.Nat.Base using (ℕ; suc; zero) open import Level open import Data.Empty Fin : ℕ → Type Fin zero = ⊥ Fin (suc n) = Maybe (Fin n) pattern f0 = nothing pattern fs n = just n
{ "alphanum_fraction": 0.6830985915, "avg_line_length": 17.75, "ext": "agda", "hexsha": "5dd576fec30632005ac1ef608626d80f2b450049", "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": "Data/Fin/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": "Data/Fin/Base.agda", "max_line_length": 46, "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": "Data/Fin/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": 83, "size": 284 }
------------------------------------------------------------------------ -- This file contains the definition of a preorder as a category with -- -- additional properties. -- ------------------------------------------------------------------------ module Category.Preorder where open import Level renaming (suc to lsuc) open import Data.Empty open import Setoid.Total open import Category.Category open import Equality.Eq record PO {l : Level} : Set (lsuc l) where field -- The underlying category. ℙ : Cat {l} -- The preorder axiom. POax : ∀{A B}{f g : el (Hom ℙ A B)} → ⟨ Hom ℙ A B ⟩[ f ≡ g ] open PO public renaming (ℙ to po-cat) -- A PO with 4 objects. module 4PO where -- The objects. data 4Obj {l : Level} : Set l where i₁ : 4Obj i₂ : 4Obj i₃ : 4Obj i₄ : 4Obj -- The PreHom. data 4PHom {l : Level} : 4Obj {l} → 4Obj {l} → Set l where id₁ : 4PHom i₁ i₁ f₁ : 4PHom i₁ i₂ f₂ : 4PHom i₁ i₃ id₂ : 4PHom i₂ i₂ f₃ : 4PHom i₂ i₄ id₃ : 4PHom i₃ i₃ f₄ : 4PHom i₃ i₄ f₅ : 4PHom i₁ i₄ id₄ : 4PHom i₄ i₄ -- The Hom. 4Hom : {l : Level} → 4Obj {l} → 4Obj {l} → Setoid {l} 4Hom i₁ i₁ = record { el = 4PHom i₁ i₁; eq = λ a b → a ≅ b; eqRpf = isEqRel } 4Hom i₁ i₂ = record { el = 4PHom i₁ i₂; eq = λ a b → a ≅ b; eqRpf = isEqRel } 4Hom i₁ i₃ = record { el = 4PHom i₁ i₃; eq = λ a b → a ≅ b; eqRpf = isEqRel } 4Hom i₁ i₄ = record { el = 4PHom i₁ i₄; eq = λ a b → a ≅ b; eqRpf = isEqRel } 4Hom i₂ i₂ = record { el = 4PHom i₂ i₂; eq = λ a b → a ≅ b; eqRpf = isEqRel } 4Hom i₂ i₄ = record { el = 4PHom i₂ i₄; eq = λ a b → a ≅ b; eqRpf = isEqRel } 4Hom i₃ i₃ = record { el = 4PHom i₃ i₃; eq = λ a b → a ≅ b; eqRpf = isEqRel } 4Hom i₃ i₄ = record { el = 4PHom i₃ i₄; eq = λ a b → a ≅ b; eqRpf = isEqRel } 4Hom i₄ i₄ = record { el = 4PHom i₄ i₄; eq = λ a b → a ≅ b; eqRpf = isEqRel } 4Hom _ _ = EmptySetoid 4Comp : {l : Level}{a b c : 4Obj {l}} → BinSetoidFun (4Hom a b) (4Hom b c) (4Hom a c) 4Comp {_} {i₁} {i₂} {i₁} = record { appT = λ x → record { appT = λ x₁ → id₁; extT = λ x₂ → refl }; extT = λ x₁ x₂ → refl } 4Comp {_} {i₂} {i₁} {i₁} = record { appT = λ x → record { appT = λ x₁ → x; extT = λ x₂ → refl }; extT = λ x₁ x₂ → x₁ } 4Comp {_} {i₂} {i₁} {i₂} = record { appT = λ x → record { appT = λ x₁ → id₂; extT = λ x₂ → refl }; extT = λ x₁ x₂ → refl } 4Comp {_} {i₂} {i₁} {i₃} = record { appT = λ x → record { appT = λ x₁ → x; extT = λ x₂ → refl }; extT = λ x₁ x₂ → x₁ } 4Comp {_} {i₂} {i₁} {i₄} = record { appT = λ x → record { appT = λ x₁ → f₃; extT = λ x₂ → refl }; extT = λ x₁ x₂ → refl } 4Comp {_} {i₃} {i₁} {i₁} = record { appT = λ x → record { appT = λ x₁ → x; extT = λ x₂ → refl }; extT = λ x₁ x₂ → x₁ } 4Comp {_} {i₃} {i₂} {i₁} = record { appT = λ x → record { appT = λ x₁ → x₁; extT = λ x₂ → x₂ }; extT = λ x₁ x₂ → refl } 4Comp {_} {i₃} {i₁} {i₂} = record { appT = λ x → record { appT = λ x₁ → x; extT = λ x₂ → refl }; extT = λ x₁ x₂ → x₁ } 4Comp {_} {i₃} {i₁} {i₃} = record { appT = λ x → record { appT = λ x₁ → id₃; extT = λ x₂ → refl }; extT = λ x₁ x₂ → refl } 4Comp {_} {i₃} {i₁} {i₄} = record { appT = λ x → record { appT = λ x₁ → f₄; extT = λ x₂ → refl }; extT = λ x₁ x₂ → refl } 4Comp {_} {i₄} {i₁} {i₁} = record { appT = λ x → record { appT = λ x₁ → x; extT = λ x₂ → refl }; extT = λ x₁ x₂ → x₁ } 4Comp {_} {i₄} {i₂} {i₁} = record { appT = λ x → record { appT = λ x₁ → x; extT = λ x₂ → refl }; extT = λ x₁ x₂ → x₁ } 4Comp {_} {i₄} {i₁} {i₂} = record { appT = λ x → record { appT = λ x₁ → x; extT = λ x₂ → refl }; extT = λ x₁ x₂ → x₁ } 4Comp {_} {i₄} {i₁} {i₃} = record { appT = λ x → record { appT = λ x₁ → x; extT = λ x₂ → refl }; extT = λ x₁ x₂ → x₁ } 4Comp {_} {i₄} {i₃} {i₃} = record { appT = λ x → record { appT = λ x₁ → x; extT = λ x₂ → refl }; extT = λ x₁ x₂ → x₁ } 4Comp {_} {i₄} {i₁} {i₄} = record { appT = λ x → record { appT = λ x₁ → ⊥-poly-elim x; extT = λ x₂ → refl }; extT = λ x₁ x₂ → refl } 4Comp {_} {i₄} {i₄} {i₃} = record { appT = λ x → record { appT = λ x₁ → x₁; extT = λ x₂ → x₂ }; extT = λ x₁ x₂ → refl } 4Comp {_} {i₄} {i₄} {i₂} = record { appT = λ x → record { appT = λ x₁ → x₁; extT = λ x₂ → x₂ }; extT = λ x₁ x₂ → refl } 4Comp {_} {i₄} {i₄} {i₁} = record { appT = λ x → record { appT = λ x₁ → x₁; extT = λ x₂ → x₂ }; extT = λ x₁ x₂ → refl } 4Comp {_} {i₄} {i₃} {i₄} = record { appT = λ x → record { appT = λ x₁ → id₄; extT = λ x₂ → refl }; extT = λ x₁ x₂ → refl } 4Comp {_} {i₄} {i₃} {i₂} = record { appT = λ x → record { appT = λ x₁ → x; extT = λ x₂ → refl }; extT = λ x₁ x₂ → x₁ } 4Comp {_} {i₄} {i₃} {i₁} = record { appT = λ x → record { appT = λ x₁ → x; extT = λ x₂ → refl }; extT = λ x₁ x₂ → x₁ } 4Comp {_} {i₄} {i₂} {i₄} = record { appT = λ x → record { appT = λ x₁ → id₄; extT = λ x₂ → refl }; extT = λ x₁ x₂ → refl } 4Comp {_} {i₄} {i₂} {i₃} = record { appT = λ x → record { appT = λ x₁ → x; extT = λ x₂ → refl }; extT = λ x₁ x₂ → x₁ } 4Comp {_} {i₄} {i₂} {i₂} = record { appT = λ x → record { appT = λ x₁ → x; extT = λ x₂ → refl }; extT = λ x₁ x₂ → x₁ } 4Comp {_} {i₃} {i₄} {i₃} = record { appT = λ x → record { appT = λ x₁ → id₃; extT = λ x₂ → refl }; extT = λ x₁ x₂ → refl } 4Comp {_} {i₃} {i₄} {i₂} = record { appT = λ x → record { appT = λ x₁ → x₁; extT = λ x₂ → x₂ }; extT = λ x₁ x₂ → refl } 4Comp {_} {i₃} {i₄} {i₁} = record { appT = λ x → record { appT = λ x₁ → x₁; extT = λ x₂ → x₂ }; extT = λ x₁ x₂ → refl } 4Comp {_} {i₃} {i₃} {i₄} = record { appT = λ x → record { appT = λ x₁ → f₄; extT = λ x₂ → refl }; extT = λ x₁ x₂ → refl } 4Comp {_} {i₃} {i₃} {i₂} = record { appT = λ x → record { appT = λ x₁ → x₁; extT = λ x₂ → x₂ }; extT = λ x₁ x₂ → refl } 4Comp {_} {i₃} {i₃} {i₁} = record { appT = λ x → record { appT = λ x₁ → x₁; extT = λ x₂ → x₂ }; extT = λ x₁ x₂ → refl } 4Comp {_} {i₃} {i₂} {i₄} = record { appT = λ x → record { appT = λ x₁ → f₄; extT = λ x₂ → refl }; extT = λ x₁ x₂ → refl } 4Comp {_} {i₃} {i₂} {i₃} = record { appT = λ x → record { appT = λ x₁ → id₃; extT = λ x₂ → refl }; extT = λ x₁ x₂ → refl } 4Comp {_} {i₃} {i₂} {i₂} = record { appT = λ x → record { appT = λ x₁ → x; extT = λ x₂ → refl }; extT = λ x₁ x₂ → x₁ } 4Comp {_} {i₃} {i₄} {i₄} = record { appT = λ x → record { appT = λ x₁ → f₄; extT = λ x₂ → refl }; extT = λ x₁ x₂ → refl } 4Comp {_} {i₂} {i₄} {i₃} = record { appT = λ x → record { appT = λ x₁ → x₁; extT = λ x₂ → x₂ }; extT = λ x₁ x₂ → refl } 4Comp {_} {i₂} {i₄} {i₂} = record { appT = λ x → record { appT = λ x₁ → id₂; extT = λ x₂ → refl }; extT = λ x₁ x₂ → refl } 4Comp {_} {i₂} {i₄} {i₁} = record { appT = λ x → record { appT = λ x₁ → x₁; extT = λ x₂ → x₂ }; extT = λ x₁ x₂ → refl } 4Comp {_} {i₂} {i₃} {i₄} = record { appT = λ x → record { appT = λ x₁ → f₃; extT = λ x₂ → refl }; extT = λ x₁ x₂ → refl } 4Comp {_} {i₂} {i₃} {i₂} = record { appT = λ x → record { appT = λ x₁ → id₂; extT = λ x₂ → refl }; extT = λ x₁ x₂ → refl } 4Comp {_} {i₂} {i₃} {i₁} = record { appT = λ x → record { appT = λ x₁ → x; extT = λ x₂ → refl }; extT = λ x₁ x₂ → x₁ } 4Comp {_} {i₂} {i₂} {i₄} = record { appT = λ x → record { appT = λ x₁ → x₁; extT = λ x₂ → x₂ }; extT = λ x₁ x₂ → refl } 4Comp {_} {i₂} {i₂} {i₃} = record { appT = λ x → record { appT = λ x₁ → x₁; extT = λ x₂ → x₂ }; extT = λ x₁ x₂ → refl } 4Comp {_} {i₂} {i₂} {i₂} = record { appT = λ x → record { appT = λ x₁ → id₂; extT = λ x₂ → refl }; extT = λ x₁ x₂ → refl } 4Comp {_} {i₂} {i₃} {i₃} = record { appT = λ x → record { appT = λ x₁ → x; extT = λ x₂ → refl }; extT = λ x₁ x₂ → x₁ } 4Comp {_} {i₂} {i₄} {i₄} = record { appT = λ x → record { appT = λ x₁ → x; extT = λ x₂ → refl }; extT = λ x₁ x₂ → x₁ } 4Comp {_} {i₁} {i₄} {i₃} = record { appT = λ x → record { appT = λ x₁ → f₂; extT = λ x₂ → refl }; extT = λ x₁ x₂ → refl } 4Comp {_} {i₁} {i₄} {i₂} = record { appT = λ x → record { appT = λ x₁ → f₁; extT = λ x₂ → refl }; extT = λ x₁ x₂ → refl } 4Comp {_} {i₁} {i₄} {i₁} = record { appT = λ x → record { appT = λ x₁ → id₁; extT = λ x₂ → refl }; extT = λ x₁ x₂ → refl } 4Comp {_} {i₁} {i₃} {i₄} = record { appT = λ x → record { appT = λ x₁ → f₅; extT = λ x₂ → refl }; extT = λ x₁ x₂ → refl } 4Comp {_} {i₁} {i₃} {i₂} = record { appT = λ x → record { appT = λ x₁ → f₁; extT = λ x₂ → refl }; extT = λ x₁ x₂ → refl } 4Comp {_} {i₁} {i₃} {i₁} = record { appT = λ x → record { appT = λ x₁ → id₁; extT = λ x₂ → refl }; extT = λ x₁ x₂ → refl } 4Comp {_} {i₁} {i₂} {i₄} = record { appT = λ x → record { appT = λ x₁ → f₅; extT = λ x₂ → refl }; extT = λ x₁ x₂ → refl } 4Comp {_} {i₁} {i₂} {i₃} = record { appT = λ x → record { appT = λ x₁ → f₂; extT = λ x₂ → refl }; extT = λ x₁ x₂ → refl } 4Comp {_} {i₁} {i₂} {i₂} = record { appT = λ x → record { appT = λ x₁ → f₁; extT = λ x₂ → refl }; extT = λ x₁ x₂ → refl } 4Comp {_} {i₁} {i₃} {i₃} = record { appT = λ x → record { appT = λ x₁ → f₂; extT = λ x₂ → refl }; extT = λ x₁ x₂ → refl } 4Comp {_} {i₁} {i₄} {i₄} = record { appT = λ x → record { appT = λ x₁ → f₅; extT = λ x₂ → refl }; extT = λ x₁ x₂ → refl } 4Comp {l} {i₁} {i₁} {c} = record { appT = λ x → record { appT = λ x₁ → x₁; extT = λ x₂ → x₂ }; extT = λ x₁ x₂ → refPf (eqRpf (4Hom i₁ c)) {x₂} } 4Comp {l} {i₂} {i₂} {c} = record { appT = λ x → record { appT = λ x₁ → x₁; extT = λ x₂ → x₂ }; extT = λ x₁ x₂ → refPf (eqRpf (4Hom i₂ c)) {x₂} } 4Comp {l} {i₃} {i₃} {c} = record { appT = λ x → record { appT = λ x₁ → x₁; extT = λ x₂ → x₂ }; extT = λ x₁ x₂ → refPf (eqRpf (4Hom i₃ c)) {x₂} } 4Comp {l} {i₄} {i₄} {c} = record { appT = λ x → record { appT = λ x₁ → x₁; extT = λ x₂ → x₂ }; extT = λ x₁ x₂ → refPf (eqRpf (4Hom i₄ c)) {x₂} } 4Id : {l : Level}{A : 4Obj {l}} → el (4Hom A A) 4Id {_}{i₁} = id₁ 4Id {_}{i₂} = id₂ 4Id {_}{i₃} = id₃ 4Id {_}{i₄} = id₄ 4PO-ax : ∀{l}{A B : 4Obj {l}}{f g : el (4Hom A B)} → eq (4Hom A B) f g 4PO-ax {A = i₁} {i₁} {id₁} {id₁} = refl 4PO-ax {A = i₁} {i₂} {f₁} {f₁} = refl 4PO-ax {A = i₁} {i₃} {f₂} {f₂} = refl 4PO-ax {A = i₁} {i₄} {f₅} {f₅} = refl 4PO-ax {A = i₂} {i₂} {id₂} {id₂} = refl 4PO-ax {A = i₂} {i₄} {f₃} {f₃} = refl 4PO-ax {A = i₃} {i₃} {id₃} {id₃} = refl 4PO-ax {A = i₃} {i₄} {f₄} {f₄} = refl 4PO-ax {A = i₄} {i₄} {id₄} {id₄} = refl 4PO-ax {A = i₂} {i₁} {f} = ⊥-poly-elim f 4PO-ax {A = i₃} {i₁} {f} = ⊥-poly-elim f 4PO-ax {A = i₄} {i₁} {f} = ⊥-poly-elim f 4PO-ax {A = i₃} {i₂} {f} = ⊥-poly-elim f 4PO-ax {A = i₄} {i₂} {f} = ⊥-poly-elim f 4PO-ax {A = i₂} {i₃} {f} = ⊥-poly-elim f 4PO-ax {A = i₄} {i₃} {f} = ⊥-poly-elim f 4AssocPf : ∀{l}{A B C D : 4Obj {l}} {f : el (4Hom A B)} {g : el (4Hom B C)}{h : el (4Hom C D)} → ⟨ 4Hom A D ⟩[ f ○[ 4Comp {l} {A}{B}{D} ] (g ○[ 4Comp {l}{B}{C}{D} ] h) ≡ (f ○[ 4Comp {l} {A}{B}{C} ] g) ○[ 4Comp {l}{A}{C}{D} ] h ] 4AssocPf {l}{A}{B}{C}{D} {f}{g} = 4PO-ax {l} {A} {D} 4IdPF : {l : Level}{A B : 4Obj {l}} {f : el (4Hom A B)} → ⟨ 4Hom A B ⟩[ (4Id {l}{A}) ○[ 4Comp {l}{A}{A}{B} ] f ≡ f ○[ 4Comp {l}{A}{B}{B} ] (4Id {l}{B}) ] 4IdPF {l}{A}{B}{f} = 4PO-ax {l} {A} {B} -- We have a category. 4cat : {l : Level} → Cat {l} 4cat {l} = record { Obj = 4Obj {l}; Hom = 4Hom; comp = λ {A} {B} {C} → 4Comp {l} {A}{B}{C}; id = λ {A} → 4Id {l}{A}; assocPf = λ {A} {B} {C} {D} {f} {g} {h} → 4AssocPf {l}{A}{B}{C}{D}{f}{g}{h}; idPfCom = λ {A} {B} {f} → 4IdPF {l}{A}{B}{f}; idPf = λ {A} {B} {f} → 4PO-ax {l} {A} {B}} -- We have a preorder. 4po : {l : Level} → PO {l} 4po {l} = record { ℙ = 4cat; POax = λ {A} {B} {f} {g} → 4PO-ax {l} {A} {B} {f} {g} }
{ "alphanum_fraction": 0.4745495308, "avg_line_length": 72.1137724551, "ext": "agda", "hexsha": "d133120730a5fd5d64dc7f5641da412c6b88a673", "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": "b33c6a59d664aed46cac8ef77d34313e148fecc2", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "heades/AUGL", "max_forks_repo_path": "setoid-cats/Category/Preorder.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "b33c6a59d664aed46cac8ef77d34313e148fecc2", "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": "heades/AUGL", "max_issues_repo_path": "setoid-cats/Category/Preorder.agda", "max_line_length": 150, "max_stars_count": null, "max_stars_repo_head_hexsha": "b33c6a59d664aed46cac8ef77d34313e148fecc2", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "heades/AUGL", "max_stars_repo_path": "setoid-cats/Category/Preorder.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 5852, "size": 12043 }
module BasicIS4.Metatheory.Hilbert-TarskiGluedHilbert where open import BasicIS4.Syntax.Hilbert public open import BasicIS4.Semantics.TarskiGluedHilbert public -- Internalisation of syntax as syntax representation in a particular model. module _ {{_ : Model}} where [_] : ∀ {A Γ} → Γ ⊢ A → Γ [⊢] A [ var i ] = [var] i [ app t u ] = [app] [ t ] [ u ] [ ci ] = [ci] [ ck ] = [ck] [ cs ] = [cs] [ box t ] = [box] [ t ] [ cdist ] = [cdist] [ cup ] = [cup] [ cdown ] = [cdown] [ cpair ] = [cpair] [ cfst ] = [cfst] [ csnd ] = [csnd] [ unit ] = [unit] -- Soundness with respect to all models, or evaluation. eval : ∀ {A Γ} → Γ ⊢ A → Γ ⊨ A eval (var i) γ = lookup i γ eval (app {A} {B} t u) γ = _⟪$⟫_ {A} {B} (eval t γ) (eval u γ) eval ci γ = K I eval (ck {A} {B}) γ = K (⟪K⟫ {A} {B}) eval (cs {A} {B} {C}) γ = K (⟪S⟫′ {A} {B} {C}) eval (box t) γ = K ([ box t ] ⅋ eval t ∙) eval cdist γ = K _⟪D⟫′_ eval cup γ = K ⟪↑⟫ eval cdown γ = K ⟪↓⟫ eval (cpair {A} {B}) γ = K (_⟪,⟫′_ {A} {B}) eval cfst γ = K π₁ eval csnd γ = K π₂ eval unit γ = ∙ -- TODO: Correctness of evaluation with respect to conversion. -- The canonical model. private instance canon : Model canon = record { _⊩ᵅ_ = λ Γ P → Γ ⊢ α P ; mono⊩ᵅ = mono⊢ ; _[⊢]_ = _⊢_ ; mono[⊢] = mono⊢ ; [var] = var ; [app] = app ; [ci] = ci ; [ck] = ck ; [cs] = cs ; [box] = box ; [cdist] = cdist ; [cup] = cup ; [cdown] = cdown ; [cpair] = cpair ; [cfst] = cfst ; [csnd] = csnd ; [unit] = unit } -- Soundness and completeness with respect to the canonical model. mutual reflectᶜ : ∀ {A Γ} → Γ ⊢ A → Γ ⊩ A reflectᶜ {α P} t = t reflectᶜ {A ▻ B} t = λ η → let t′ = mono⊢ η t in λ a → reflectᶜ (app t′ (reifyᶜ a)) reflectᶜ {□ A} t = λ η → let t′ = mono⊢ η t in t′ ⅋ reflectᶜ (down t′) reflectᶜ {A ∧ B} t = reflectᶜ (fst t) , reflectᶜ (snd t) reflectᶜ {⊤} t = ∙ reifyᶜ : ∀ {A Γ} → Γ ⊩ A → Γ ⊢ A reifyᶜ {α P} s = s reifyᶜ {A ▻ B} s = lam (reifyᶜ (s weak⊆ (reflectᶜ {A} v₀))) reifyᶜ {□ A} s = syn (s refl⊆) reifyᶜ {A ∧ B} s = pair (reifyᶜ (π₁ s)) (reifyᶜ (π₂ s)) reifyᶜ {⊤} s = unit reflectᶜ⋆ : ∀ {Ξ Γ} → Γ ⊢⋆ Ξ → Γ ⊩⋆ Ξ reflectᶜ⋆ {∅} ∙ = ∙ reflectᶜ⋆ {Ξ , A} (ts , t) = reflectᶜ⋆ ts , reflectᶜ t reifyᶜ⋆ : ∀ {Ξ Γ} → Γ ⊩⋆ Ξ → Γ ⊢⋆ Ξ reifyᶜ⋆ {∅} ∙ = ∙ reifyᶜ⋆ {Ξ , A} (ts , t) = reifyᶜ⋆ ts , reifyᶜ t -- Reflexivity and transitivity. refl⊩⋆ : ∀ {Γ} → Γ ⊩⋆ Γ refl⊩⋆ = reflectᶜ⋆ refl⊢⋆ trans⊩⋆ : ∀ {Γ Γ′ Γ″} → Γ ⊩⋆ Γ′ → Γ′ ⊩⋆ Γ″ → Γ ⊩⋆ Γ″ trans⊩⋆ ts us = reflectᶜ⋆ (trans⊢⋆ (reifyᶜ⋆ ts) (reifyᶜ⋆ us)) -- Completeness with respect to all models, or quotation. quot : ∀ {A Γ} → Γ ⊨ A → Γ ⊢ A quot s = reifyᶜ (s refl⊩⋆) -- Normalisation by evaluation. norm : ∀ {A Γ} → Γ ⊢ A → Γ ⊢ A norm = quot ∘ eval -- TODO: Correctness of normalisation with respect to conversion.
{ "alphanum_fraction": 0.4668759812, "avg_line_length": 25.8943089431, "ext": "agda", "hexsha": "795203b7768098da8c8985c53d609dd0e6963026", "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": "fcd187db70f0a39b894fe44fad0107f61849405c", "max_forks_repo_licenses": [ "X11" ], "max_forks_repo_name": "mietek/hilbert-gentzen", "max_forks_repo_path": "BasicIS4/Metatheory/Hilbert-TarskiGluedHilbert.agda", "max_issues_count": 1, "max_issues_repo_head_hexsha": "fcd187db70f0a39b894fe44fad0107f61849405c", "max_issues_repo_issues_event_max_datetime": "2018-06-10T09:11:22.000Z", "max_issues_repo_issues_event_min_datetime": "2018-06-10T09:11:22.000Z", "max_issues_repo_licenses": [ "X11" ], "max_issues_repo_name": "mietek/hilbert-gentzen", "max_issues_repo_path": "BasicIS4/Metatheory/Hilbert-TarskiGluedHilbert.agda", "max_line_length": 76, "max_stars_count": 29, "max_stars_repo_head_hexsha": "fcd187db70f0a39b894fe44fad0107f61849405c", "max_stars_repo_licenses": [ "X11" ], "max_stars_repo_name": "mietek/hilbert-gentzen", "max_stars_repo_path": "BasicIS4/Metatheory/Hilbert-TarskiGluedHilbert.agda", "max_stars_repo_stars_event_max_datetime": "2022-01-01T10:29:18.000Z", "max_stars_repo_stars_event_min_datetime": "2016-07-03T18:51:56.000Z", "num_tokens": 1485, "size": 3185 }
module HelloWorldPrim where open import IO.Primitive.Infinite open import Codata.Musical.Costring main = putStrLn (toCostring "Hello World!")
{ "alphanum_fraction": 0.8125, "avg_line_length": 20.5714285714, "ext": "agda", "hexsha": "034dadd8482cc54f38605fc8eaec3b45545d8fc3", "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": "154d1c1e3d7a3ed2a965a800c620958ecda8fb1e", "max_forks_repo_licenses": [ "BSD-3-Clause" ], "max_forks_repo_name": "ashinkarov/agda", "max_forks_repo_path": "test/Compiler/with-stdlib/HelloWorldPrim.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "154d1c1e3d7a3ed2a965a800c620958ecda8fb1e", "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": "ashinkarov/agda", "max_issues_repo_path": "test/Compiler/with-stdlib/HelloWorldPrim.agda", "max_line_length": 43, "max_stars_count": null, "max_stars_repo_head_hexsha": "154d1c1e3d7a3ed2a965a800c620958ecda8fb1e", "max_stars_repo_licenses": [ "BSD-3-Clause" ], "max_stars_repo_name": "ashinkarov/agda", "max_stars_repo_path": "test/Compiler/with-stdlib/HelloWorldPrim.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 34, "size": 144 }
postulate A B : Set C : .{{_ : B}} → Set instance f : {{_ : A}} → B test : {{x : A}} → C
{ "alphanum_fraction": 0.3823529412, "avg_line_length": 12.75, "ext": "agda", "hexsha": "4125cdf9cc7e223ba287d6624518bca0d4a2ae3f", "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/Succeed/Issue1425.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/Succeed/Issue1425.agda", "max_line_length": 22, "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/Succeed/Issue1425.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": 47, "size": 102 }
------------------------------------------------------------------------ -- Properties relating Any to various list functions ------------------------------------------------------------------------ module Data.List.Any.Properties where open import Category.Monad open import Data.Bool open import Data.Bool.Properties open import Data.Function open import Data.List as List open RawMonad List.monad open import Data.List.Any as Any using (Any; here; there) import Data.List.Equality as ListEq open import Data.Product as Prod hiding (map) open import Data.Sum as Sum using (_⊎_; inj₁; inj₂; [_,_]′) open import Relation.Unary using (Pred; _⟨×⟩_; _⟨→⟩_) open import Relation.Binary import Relation.Binary.EqReasoning as EqReasoning open import Relation.Binary.FunctionSetoid open import Relation.Binary.Product.Pointwise open import Relation.Binary.PropositionalEquality as PropEq using (_≡_; refl; inspect; _with-≡_) ------------------------------------------------------------------------ -- Lemmas related to Any -- Introduction (⁺) and elimination (⁻) rules for map. map⁺ : ∀ {A B} {P : Pred B} {f : A → B} {xs} → Any (P ∘₀ f) xs → Any P (map f xs) map⁺ (here p) = here p map⁺ (there p) = there $ map⁺ p map⁻ : ∀ {A B} {P : Pred B} {f : A → B} {xs} → Any P (map f xs) → Any (P ∘₀ f) xs map⁻ {xs = []} () map⁻ {xs = x ∷ xs} (here p) = here p map⁻ {xs = x ∷ xs} (there p) = there $ map⁻ p -- Introduction and elimination rules for _++_. ++⁺ˡ : ∀ {A} {P : Pred A} {xs ys} → Any P xs → Any P (xs ++ ys) ++⁺ˡ (here p) = here p ++⁺ˡ (there p) = there (++⁺ˡ p) ++⁺ʳ : ∀ {A} {P : Pred A} xs {ys} → Any P ys → Any P (xs ++ ys) ++⁺ʳ [] p = p ++⁺ʳ (x ∷ xs) p = there (++⁺ʳ xs p) ++⁻ : ∀ {A} {P : Pred A} xs {ys} → Any P (xs ++ ys) → Any P xs ⊎ Any P ys ++⁻ [] p = inj₂ p ++⁻ (x ∷ xs) (here p) = inj₁ (here p) ++⁻ (x ∷ xs) (there p) = Sum.map there id (++⁻ xs p) -- Introduction and elimination rules for return. return⁺ : ∀ {A} {P : Pred A} {x} → P x → Any P (return x) return⁺ = here return⁻ : ∀ {A} {P : Pred A} {x} → Any P (return x) → P x return⁻ (here p) = p return⁻ (there ()) -- Introduction and elimination rules for concat. concat⁺ : ∀ {A} {P : Pred A} {xss} → Any (Any P) xss → Any P (concat xss) concat⁺ (here p) = ++⁺ˡ p concat⁺ (there {x = xs} p) = ++⁺ʳ xs (concat⁺ p) concat⁻ : ∀ {A} {P : Pred A} xss → Any P (concat xss) → Any (Any P) xss concat⁻ [] () concat⁻ ([] ∷ xss) p = there $ concat⁻ xss p concat⁻ ((x ∷ xs) ∷ xss) (here p) = here (here p) concat⁻ ((x ∷ xs) ∷ xss) (there p) with concat⁻ (xs ∷ xss) p ... | here p′ = here (there p′) ... | there p′ = there p′ -- Introduction and elimination rules for _>>=_. >>=⁺ : ∀ {A B P xs} {f : A → List B} → Any (Any P ∘₀ f) xs → Any P (xs >>= f) >>=⁺ = concat⁺ ∘ map⁺ >>=⁻ : ∀ {A B P} xs {f : A → List B} → Any P (xs >>= f) → Any (Any P ∘₀ f) xs >>=⁻ _ = map⁻ ∘ concat⁻ _ -- Introduction and elimination rules for _⊛_. ⊛⁺ : ∀ {A B P} {fs : List (A → B)} {xs} → Any (λ f → Any (P ∘₀ f) xs) fs → Any P (fs ⊛ xs) ⊛⁺ = >>=⁺ ∘ Any.map (>>=⁺ ∘ Any.map return⁺) ⊛⁺′ : ∀ {A B P Q} {fs : List (A → B)} {xs} → Any (P ⟨→⟩ Q) fs → Any P xs → Any Q (fs ⊛ xs) ⊛⁺′ pq p = ⊛⁺ (Any.map (λ pq → Any.map (λ {x} → pq {x}) p) pq) ⊛⁻ : ∀ {A B P} (fs : List (A → B)) xs → Any P (fs ⊛ xs) → Any (λ f → Any (P ∘₀ f) xs) fs ⊛⁻ fs xs = Any.map (Any.map return⁻ ∘ >>=⁻ xs) ∘ >>=⁻ fs -- Introduction and elimination rules for _⊗_. ⊗⁺ : ∀ {A B P} {xs : List A} {ys : List B} → Any (λ x → Any (λ y → P (x , y)) ys) xs → Any P (xs ⊗ ys) ⊗⁺ = ⊛⁺ ∘′ ⊛⁺ ∘′ return⁺ ⊗⁺′ : ∀ {A B} {P : Pred A} {Q : Pred B} {xs ys} → Any P xs → Any Q ys → Any (P ⟨×⟩ Q) (xs ⊗ ys) ⊗⁺′ p q = ⊗⁺ (Any.map (λ p → Any.map (λ q → (p , q)) q) p) ⊗⁻ : ∀ {A B P} (xs : List A) (ys : List B) → Any P (xs ⊗ ys) → Any (λ x → Any (λ y → P (x , y)) ys) xs ⊗⁻ _ _ = return⁻ ∘ ⊛⁻ _ _ ∘ ⊛⁻ _ _ ⊗⁻′ : ∀ {A B} {P : Pred A} {Q : Pred B} xs ys → Any (P ⟨×⟩ Q) (xs ⊗ ys) → Any P xs × Any Q ys ⊗⁻′ _ _ pq = (Any.map (proj₁ ∘ proj₂ ∘ Any.satisfied) lem , (Any.map proj₂ $ proj₂ (Any.satisfied lem))) where lem = ⊗⁻ _ _ pq -- Any and any are related via T. any⁺ : ∀ {A} (p : A → Bool) {xs} → Any (T ∘₀ p) xs → T (any p xs) any⁺ p (here px) = proj₂ T-∨ (inj₁ px) any⁺ p (there {x = x} pxs) with p x ... | true = _ ... | false = any⁺ p pxs any⁻ : ∀ {A} (p : A → Bool) xs → T (any p xs) → Any (T ∘₀ p) xs any⁻ p [] () any⁻ p (x ∷ xs) px∷xs with inspect (p x) any⁻ p (x ∷ xs) px∷xs | true with-≡ eq = here (proj₂ T-≡ $ PropEq.sym eq) any⁻ p (x ∷ xs) px∷xs | false with-≡ eq with p x any⁻ p (x ∷ xs) pxs | false with-≡ refl | .false = there (any⁻ p xs pxs) ------------------------------------------------------------------------ -- Lemmas related to _∈_, parameterised on underlying equalities module Membership₁ (S : Setoid) where open Any.Membership S private open module S = Setoid S using (_≈_) open module [M] = Any.Membership (ListEq.Equality.setoid S) using () renaming (_∈_ to _[∈]_; _⊆_ to _[⊆]_) open module M≡ = Any.Membership-≡ using () renaming (_∈_ to _∈≡_; _⊆_ to _⊆≡_) -- Any is monotone. mono : ∀ {P xs ys} → P Respects _≈_ → xs ⊆ ys → Any P xs → Any P ys mono resp xs⊆ys pxs with find pxs ... | (x , x∈xs , px) = lose resp (xs⊆ys x∈xs) px -- _++_ is monotone. _++-mono_ : ∀ {xs₁ xs₂ ys₁ ys₂} → xs₁ ⊆ ys₁ → xs₂ ⊆ ys₂ → xs₁ ++ xs₂ ⊆ ys₁ ++ ys₂ _++-mono_ {ys₁ = ys₁} xs₁⊆ys₁ xs₂⊆ys₂ = [ ++⁺ˡ ∘ xs₁⊆ys₁ , ++⁺ʳ ys₁ ∘ xs₂⊆ys₂ ]′ ∘ ++⁻ _ -- _++_ is idempotent. ++-idempotent : ∀ {xs} → xs ++ xs ⊆ xs ++-idempotent = [ id , id ]′ ∘ ++⁻ _ -- Introduction and elimination rules for concat. concat-∈⁺ : ∀ {x xs xss} → x ∈ xs → xs [∈] xss → x ∈ concat xss concat-∈⁺ x∈xs xs∈xss = concat⁺ (Any.map (λ xs≈ys → P.reflexive xs≈ys x∈xs) xs∈xss) where module P = Preorder ⊆-preorder concat-∈⁻ : ∀ {x} xss → x ∈ concat xss → ∃ λ xs → x ∈ xs × xs [∈] xss concat-∈⁻ xss x∈ = Prod.map id swap $ [M].find (concat⁻ xss x∈) -- concat is monotone. concat-mono : ∀ {xss yss} → xss [⊆] yss → concat xss ⊆ concat yss concat-mono {xss = xss} xss⊆yss x∈ with concat-∈⁻ xss x∈ ... | (xs , x∈xs , xs∈xss) = concat-∈⁺ x∈xs (xss⊆yss xs∈xss) -- any is monotone. any-mono : ∀ p → (T ∘₀ p) Respects _≈_ → ∀ {xs ys} → xs ⊆ ys → T (any p xs) → T (any p ys) any-mono p resp xs⊆ys = any⁺ p ∘ mono resp xs⊆ys ∘ any⁻ p _ -- Introduction and elimination rules for map-with-∈. map-with-∈-∈⁺ : ∀ {A} {xs : List A} (f : ∀ {x} → x ∈≡ xs → S.carrier) {x} → (x∈xs : x ∈≡ xs) → f x∈xs ∈ M≡.map-with-∈ xs f map-with-∈-∈⁺ f (here refl) = here S.refl map-with-∈-∈⁺ f (there x∈xs) = there $ map-with-∈-∈⁺ (f ∘ there) x∈xs map-with-∈-∈⁻ : ∀ {A} {xs : List A} (f : ∀ {x} → x ∈≡ xs → S.carrier) {fx∈xs} → fx∈xs ∈ M≡.map-with-∈ xs f → ∃ λ x → Σ (x ∈≡ xs) λ x∈xs → fx∈xs ≈ f x∈xs map-with-∈-∈⁻ {xs = []} f () map-with-∈-∈⁻ {xs = y ∷ xs} f (here fx≈) = (y , here refl , fx≈) map-with-∈-∈⁻ {xs = y ∷ xs} f (there x∈xs) = Prod.map id (Prod.map there id) $ map-with-∈-∈⁻ (f ∘ there) x∈xs -- map-with-∈ is monotone. map-with-∈-mono : ∀ {A} {xs : List A} {f : ∀ {x} → x ∈≡ xs → S.carrier} {ys : List A} {g : ∀ {x} → x ∈≡ ys → S.carrier} → (xs⊆ys : xs ⊆≡ ys) → (∀ {x} (x∈xs : x ∈≡ xs) → f x∈xs ≈ g (xs⊆ys x∈xs)) → M≡.map-with-∈ xs f ⊆ M≡.map-with-∈ ys g map-with-∈-mono {f = f} {g = g} xs⊆ys f≈g {fx∈xs} fx∈xs∈ with map-with-∈-∈⁻ f fx∈xs∈ ... | (x , x∈xs , fx∈xs≈) = Any.map (λ {y} g[xs⊆ys-x∈xs]≈y → begin fx∈xs ≈⟨ fx∈xs≈ ⟩ f x∈xs ≈⟨ f≈g x∈xs ⟩ g (xs⊆ys x∈xs) ≈⟨ g[xs⊆ys-x∈xs]≈y ⟩ y ∎) $ map-with-∈-∈⁺ g (xs⊆ys x∈xs) where open EqReasoning S module Membership₂ (S₁ S₂ : Setoid) where private open module S₁ = Setoid S₁ using () renaming (_≈_ to _≈₁_) open module S₂ = Setoid S₂ using () renaming (_≈_ to _≈₂_) module L₂ = ListEq.Equality S₂ open module M₁ = Any.Membership S₁ using () renaming (_∈_ to _∈₁_; _⊆_ to _⊆₁_) open module M₂ = Any.Membership S₂ using () renaming (_∈_ to _∈₂_; _⊆_ to _⊆₂_) open module M₁₂ = Any.Membership (S₁ ⇨ S₂) using () renaming (_∈_ to _∈₁₂_; _⊆_ to _⊆₁₂_) open Any.Membership (S₁ ×-setoid S₂) using () renaming (_⊆_ to _⊆₁,₂_) -- Introduction and elimination rules for map. map-∈⁺ : ∀ (f : S₁ ⟶ S₂) {x xs} → x ∈₁ xs → f ⟨$⟩ x ∈₂ map (_⟨$⟩_ f) xs map-∈⁺ f = map⁺ ∘ Any.map (pres f) map-∈⁻ : ∀ {f fx} xs → fx ∈₂ map f xs → ∃ λ x → x ∈₁ xs × fx ≈₂ f x map-∈⁻ _ fx∈ = M₁.find (map⁻ fx∈) -- map is monotone. map-mono : ∀ (f : S₁ ⟶ S₂) {xs ys} → xs ⊆₁ ys → map (_⟨$⟩_ f) xs ⊆₂ map (_⟨$⟩_ f) ys map-mono f xs⊆ys fx∈ with map-∈⁻ _ fx∈ ... | (x , x∈ , eq) = Any.map (S₂.trans eq) (map-∈⁺ f (xs⊆ys x∈)) -- Introduction and elimination rules for _>>=_. >>=-∈⁺ : ∀ (f : S₁ ⟶ L₂.setoid) {x y xs} → x ∈₁ xs → y ∈₂ f ⟨$⟩ x → y ∈₂ (xs >>= _⟨$⟩_ f) >>=-∈⁺ f x∈xs y∈fx = >>=⁺ (Any.map (flip M₂.∈-resp-list-≈ y∈fx ∘ pres f) x∈xs) >>=-∈⁻ : ∀ (f : S₁ ⟶ L₂.setoid) {y} xs → y ∈₂ (xs >>= _⟨$⟩_ f) → ∃ λ x → x ∈₁ xs × y ∈₂ f ⟨$⟩ x >>=-∈⁻ f xs y∈ = M₁.find (>>=⁻ xs y∈) -- _>>=_ is monotone. >>=-mono : ∀ (f g : S₁ ⟶ L₂.setoid) {xs ys} → xs ⊆₁ ys → (∀ {x} → f ⟨$⟩ x ⊆₂ g ⟨$⟩ x) → (xs >>= _⟨$⟩_ f) ⊆₂ (ys >>= _⟨$⟩_ g) >>=-mono f g {xs} xs⊆ys f⊆g z∈ with >>=-∈⁻ f xs z∈ ... | (x , x∈xs , z∈fx) = >>=-∈⁺ g (xs⊆ys x∈xs) (f⊆g z∈fx) -- Introduction and elimination rules for _⊛_. private infixl 4 _⟨⊛⟩_ _⟨⊛⟩_ : List (S₁ ⟶ S₂) → List S₁.carrier → List S₂.carrier fs ⟨⊛⟩ xs = map _⟨$⟩_ fs ⊛ xs ⊛-∈⁺ : ∀ f {fs x xs} → f ∈₁₂ fs → x ∈₁ xs → f ⟨$⟩ x ∈₂ fs ⟨⊛⟩ xs ⊛-∈⁺ _ f∈fs x∈xs = ⊛⁺′ (map⁺ (Any.map (λ f≈g x≈y → f≈g x≈y) f∈fs)) x∈xs ⊛-∈⁻ : ∀ fs xs {fx} → fx ∈₂ fs ⟨⊛⟩ xs → ∃₂ λ f x → f ∈₁₂ fs × x ∈₁ xs × fx ≈₂ f ⟨$⟩ x ⊛-∈⁻ fs xs fx∈ with M₁₂.find $ map⁻ (⊛⁻ (map _⟨$⟩_ fs) xs fx∈) ... | (f , f∈fs , x∈) with M₁.find x∈ ... | (x , x∈xs , fx≈fx) = (f , x , f∈fs , x∈xs , fx≈fx) -- _⊛_ is monotone. _⊛-mono_ : ∀ {fs gs xs ys} → fs ⊆₁₂ gs → xs ⊆₁ ys → fs ⟨⊛⟩ xs ⊆₂ gs ⟨⊛⟩ ys _⊛-mono_ {fs = fs} {xs = xs} fs⊆gs xs⊆ys fx∈ with ⊛-∈⁻ fs xs fx∈ ... | (f , x , f∈fs , x∈xs , fx≈fx) = Any.map (S₂.trans fx≈fx) $ ⊛-∈⁺ f (fs⊆gs {f} f∈fs) (xs⊆ys x∈xs) -- _⊗_ is monotone. _⊗-mono_ : ∀ {xs₁ xs₂ ys₁ ys₂} → xs₁ ⊆₁ ys₁ → xs₂ ⊆₂ ys₂ → (xs₁ ⊗ xs₂) ⊆₁,₂ (ys₁ ⊗ ys₂) _⊗-mono_ {xs₁ = xs₁} {xs₂} xs₁⊆ys₁ xs₂⊆ys₂ {x , y} x,y∈ with ⊗⁻′ {P = _≈₁_ x} {Q = _≈₂_ y} xs₁ xs₂ x,y∈ ... | (x∈ , y∈) = ⊗⁺′ (xs₁⊆ys₁ x∈) (xs₂⊆ys₂ y∈) ------------------------------------------------------------------------ -- Lemmas related to the variant of _∈_ which is defined using -- propositional equality module Membership-≡ where open Any.Membership-≡ private module P {A} = ListEq.PropositionalEquality {A} open module M₁ {A} = Membership₁ (PropEq.setoid A) public using (_++-mono_; ++-idempotent; map-with-∈-∈⁺; map-with-∈-∈⁻; map-with-∈-mono) open module M₂ {A} {B} = Membership₂ (PropEq.setoid A) (PropEq.setoid B) public using (map-∈⁻) -- Any is monotone. mono : ∀ {A xs ys} {P : Pred A} → xs ⊆ ys → Any P xs → Any P ys mono {P = P} = M₁.mono (PropEq.subst P) -- Introduction and elimination rules for concat. concat-∈⁺ : ∀ {A} {x : A} {xs xss} → x ∈ xs → xs ∈ xss → x ∈ concat xss concat-∈⁺ x∈xs = M₁.concat-∈⁺ x∈xs ∘ Any.map P.reflexive concat-∈⁻ : ∀ {A} {x : A} xss → x ∈ concat xss → ∃ λ xs → x ∈ xs × xs ∈ xss concat-∈⁻ xss x∈ = Prod.map id (Prod.map id (Any.map P.≈⇒≡)) $ M₁.concat-∈⁻ xss x∈ -- concat is monotone. concat-mono : ∀ {A} {xss yss : List (List A)} → xss ⊆ yss → concat xss ⊆ concat yss concat-mono xss⊆yss = M₁.concat-mono (Any.map P.reflexive ∘ xss⊆yss ∘ Any.map P.≈⇒≡) -- any is monotone. any-mono : ∀ {A} (p : A → Bool) {xs ys} → xs ⊆ ys → T (any p xs) → T (any p ys) any-mono p = M₁.any-mono p (PropEq.subst (T ∘₀ p)) -- Introduction rule for map. map-∈⁺ : ∀ {A B} {f : A → B} {x xs} → x ∈ xs → f x ∈ map f xs map-∈⁺ {f = f} = M₂.map-∈⁺ (PropEq.→-to-⟶ f) -- map is monotone. map-mono : ∀ {A B} {f : A → B} {xs ys} → xs ⊆ ys → map f xs ⊆ map f ys map-mono {f = f} = M₂.map-mono (PropEq.→-to-⟶ f) -- Introduction and elimination rules for _>>=_. private [→-to-⟶] : ∀ {A B} → (A → List B) → PropEq.setoid A ⟶ ListEq.Equality.setoid (PropEq.setoid B) [→-to-⟶] f = record { _⟨$⟩_ = f; pres = P.reflexive ∘ PropEq.cong f } >>=-∈⁺ : ∀ {A B} (f : A → List B) {x y xs} → x ∈ xs → y ∈ f x → y ∈ (xs >>= f) >>=-∈⁺ f = M₂.>>=-∈⁺ ([→-to-⟶] f) >>=-∈⁻ : ∀ {A B} (f : A → List B) {y} xs → y ∈ (xs >>= f) → ∃ λ x → x ∈ xs × y ∈ f x >>=-∈⁻ f = M₂.>>=-∈⁻ ([→-to-⟶] f) -- _>>=_ is monotone. _>>=-mono_ : ∀ {A B} {f g : A → List B} {xs ys} → xs ⊆ ys → (∀ {x} → f x ⊆ g x) → (xs >>= f) ⊆ (ys >>= g) _>>=-mono_ {f = f} {g} = M₂.>>=-mono ([→-to-⟶] f) ([→-to-⟶] g) -- Introduction and elimination rules for _⊛_. ⊛-∈⁺ : ∀ {A B} {fs : List (A → B)} {xs f x} → f ∈ fs → x ∈ xs → f x ∈ fs ⊛ xs ⊛-∈⁺ f∈fs x∈xs = ⊛⁺′ (Any.map (λ f≡g x≡y → PropEq.cong₂ _$_ f≡g x≡y) f∈fs) x∈xs ⊛-∈⁻ : ∀ {A B} (fs : List (A → B)) xs {fx} → fx ∈ fs ⊛ xs → ∃₂ λ f x → f ∈ fs × x ∈ xs × fx ≡ f x ⊛-∈⁻ fs xs fx∈ with find $ ⊛⁻ fs xs fx∈ ... | (f , f∈fs , x∈) with find x∈ ... | (x , x∈xs , fx≡fx) = (f , x , f∈fs , x∈xs , fx≡fx) -- _⊛_ is monotone. _⊛-mono_ : ∀ {A B} {fs gs : List (A → B)} {xs ys} → fs ⊆ gs → xs ⊆ ys → fs ⊛ xs ⊆ gs ⊛ ys _⊛-mono_ {fs = fs} {xs = xs} fs⊆gs xs⊆ys fx∈ with ⊛-∈⁻ fs xs fx∈ ... | (f , x , f∈fs , x∈xs , refl) = ⊛-∈⁺ (fs⊆gs f∈fs) (xs⊆ys x∈xs) -- Introduction and elimination rules for _⊗_. private lemma₁ : ∀ {A B} {p q : A × B} → (p ⟨ _≡_ on₁ proj₁ ⟩₁ q) × (p ⟨ _≡_ on₁ proj₂ ⟩₁ q) → p ≡ q lemma₁ {p = (x , y)} {q = (.x , .y)} (refl , refl) = refl lemma₂ : ∀ {A B} {p q : A × B} → p ≡ q → (p ⟨ _≡_ on₁ proj₁ ⟩₁ q) × (p ⟨ _≡_ on₁ proj₂ ⟩₁ q) lemma₂ = < PropEq.cong proj₁ , PropEq.cong proj₂ > ⊗-∈⁺ : ∀ {A B} {xs : List A} {ys : List B} {x y} → x ∈ xs → y ∈ ys → (x , y) ∈ (xs ⊗ ys) ⊗-∈⁺ x∈xs y∈ys = Any.map lemma₁ (⊗⁺′ x∈xs y∈ys) ⊗-∈⁻ : ∀ {A B} (xs : List A) (ys : List B) {p} → p ∈ (xs ⊗ ys) → proj₁ p ∈ xs × proj₂ p ∈ ys ⊗-∈⁻ xs ys = ⊗⁻′ xs ys ∘ Any.map lemma₂ -- _⊗_ is monotone. _⊗-mono_ : ∀ {A B} {xs₁ ys₁ : List A} {xs₂ ys₂ : List B} → xs₁ ⊆ ys₁ → xs₂ ⊆ ys₂ → (xs₁ ⊗ xs₂) ⊆ (ys₁ ⊗ ys₂) _⊗-mono_ xs₁⊆ys₁ xs₂⊆ys₂ {p} = Any.map lemma₁ ∘ M₂._⊗-mono_ xs₁⊆ys₁ xs₂⊆ys₂ {p} ∘ Any.map lemma₂
{ "alphanum_fraction": 0.4616337441, "avg_line_length": 33.3456521739, "ext": "agda", "hexsha": "011a7ca6f078e790b3da94eba381a48fcaa4e669", "lang": "Agda", "max_forks_count": 3, "max_forks_repo_forks_event_max_datetime": "2022-03-12T11:54:10.000Z", "max_forks_repo_forks_event_min_datetime": "2015-07-21T16:37:58.000Z", "max_forks_repo_head_hexsha": "8ef786b40e4a9ab274c6103dc697dcb658cf3db3", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "isabella232/Lemmachine", "max_forks_repo_path": "vendor/stdlib/src/Data/List/Any/Properties.agda", "max_issues_count": 1, "max_issues_repo_head_hexsha": "8ef786b40e4a9ab274c6103dc697dcb658cf3db3", "max_issues_repo_issues_event_max_datetime": "2022-03-12T12:17:51.000Z", "max_issues_repo_issues_event_min_datetime": "2022-03-12T12:17:51.000Z", "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "larrytheliquid/Lemmachine", "max_issues_repo_path": "vendor/stdlib/src/Data/List/Any/Properties.agda", "max_line_length": 72, "max_stars_count": 56, "max_stars_repo_head_hexsha": "8ef786b40e4a9ab274c6103dc697dcb658cf3db3", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "isabella232/Lemmachine", "max_stars_repo_path": "vendor/stdlib/src/Data/List/Any/Properties.agda", "max_stars_repo_stars_event_max_datetime": "2021-12-21T17:02:19.000Z", "max_stars_repo_stars_event_min_datetime": "2015-01-20T02:11:42.000Z", "num_tokens": 7079, "size": 15339 }
-- Andreas, 2021-08-18, issue #5506 reported by alexarice -- A crash in the forcing methodology introduced in 2.6.1 -- that surfaced with the removal of auto-inlining in 2.6.2. -- {-# OPTIONS --no-forcing #-} -- fixes -- {-# OPTIONS --auto-inline #-} -- fixes {-# OPTIONS -v tc.lhs.unify.force:100 #-} open import Agda.Builtin.Nat data Unit : Set where unit : Unit data Ctx : Nat → Set where -- index needed cons : (m : Nat) (A : Unit) → Ctx (suc m) mutual data P : (n : Nat) (Γ : Ctx n) → Set -- Needs to be mutual {-# NOINLINE getFocus #-} getFocus : (n : Nat) (A : Unit) → Unit getFocus n A = A -- needs to be A, not unit data P where c : (n : Nat) -- n is forced (A : Unit) → P (suc n) (cons n (getFocus n A)) test : (n : Nat) (Γ : Ctx n) → P n Γ → Nat test n Γ (c m A) = n + m -- ^ n := suc m fixes the issue -- WAS: -- Panic: Pattern match failure in do expression at -- src/full/Agda/TypeChecking/Rules/LHS/Unify.hs:1313:7-14 -- when checking that the pattern c _ _ _ _ has type P n Γ -- Expect: type-checks without errors.
{ "alphanum_fraction": 0.6040515654, "avg_line_length": 25.2558139535, "ext": "agda", "hexsha": "47a7b53a3a2fe713369825d1d359a64e60e05eb0", "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/Succeed/Issue5506.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/Succeed/Issue5506.agda", "max_line_length": 60, "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/Succeed/Issue5506.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": 374, "size": 1086 }
{-# OPTIONS --omega-in-omega --no-termination-check --overlapping-instances #-} module Light.Library.Data.Either where open import Light.Level using (Level ; Setω ; _⊔_) open import Light.Variable.Sets open import Light.Variable.Levels record Dependencies : Setω where record Library (dependencies : Dependencies) : Setω where field ℓf : Level → Level → Level Either : Set aℓ → Set bℓ → Set (ℓf aℓ bℓ) left : 𝕒 → Either 𝕒 𝕓 right : 𝕓 → Either 𝕒 𝕓 open Library ⦃ ... ⦄ public
{ "alphanum_fraction": 0.6491557223, "avg_line_length": 29.6111111111, "ext": "agda", "hexsha": "4db1b677cbd367d54438f223a5c32d8e9dd875b2", "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": "44b1c724f2de95d3a9effe87ca36ef9eca8b4756", "max_forks_repo_licenses": [ "0BSD" ], "max_forks_repo_name": "Zambonifofex/lightlib", "max_forks_repo_path": "Light/Library/Data/Either.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "44b1c724f2de95d3a9effe87ca36ef9eca8b4756", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "0BSD" ], "max_issues_repo_name": "Zambonifofex/lightlib", "max_issues_repo_path": "Light/Library/Data/Either.agda", "max_line_length": 79, "max_stars_count": 1, "max_stars_repo_head_hexsha": "44b1c724f2de95d3a9effe87ca36ef9eca8b4756", "max_stars_repo_licenses": [ "0BSD" ], "max_stars_repo_name": "zamfofex/lightlib", "max_stars_repo_path": "Light/Library/Data/Either.agda", "max_stars_repo_stars_event_max_datetime": "2019-12-20T21:33:05.000Z", "max_stars_repo_stars_event_min_datetime": "2019-12-20T21:33:05.000Z", "num_tokens": 155, "size": 533 }
f : Set → Set module _ (A : Set) where mutual g : Set g = h h : Set h = A f = g
{ "alphanum_fraction": 0.4174757282, "avg_line_length": 7.3571428571, "ext": "agda", "hexsha": "9fdd2824fca9f23014c8bdcc7671bacd8a90cd33", "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/lonesig.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/lonesig.agda", "max_line_length": 24, "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/lonesig.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": 42, "size": 103 }
{-# OPTIONS --without-K --safe #-} -- The One Category is also a -2-Category module Categories.Minus2-Category.Instance.One where open import Categories.Minus2-Category open import Categories.Category.Instance.One -- Proof is trivial ⊤-is-2-Category : ∀ {o ℓ e} → -2-Category {o} {ℓ} {e} ⊤-is-2-Category = record { cat = One }
{ "alphanum_fraction": 0.6978851964, "avg_line_length": 27.5833333333, "ext": "agda", "hexsha": "497b0d3519fa48e3b555390cca5211645bfe5fbb", "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/Minus2-Category/Instance/One.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/Minus2-Category/Instance/One.agda", "max_line_length": 53, "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/Minus2-Category/Instance/One.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": 101, "size": 331 }
module Oscar.Data.Term {𝔣} (FunctionName : Set 𝔣) where open import Oscar.Data.Equality open import Oscar.Data.Fin open import Oscar.Data.Nat open import Oscar.Data.Vec open import Oscar.Function open import Oscar.Relation mutual Terms : Nat → Nat → Set 𝔣 Terms N m = Vec (Term m) N data Term (m : Nat) : Set 𝔣 where i : (x : Fin m) → Term m leaf : Term m _fork_ : (s t : Term m) → Term m function : FunctionName → ∀ {N} → Terms N m → Term m
{ "alphanum_fraction": 0.6588486141, "avg_line_length": 22.3333333333, "ext": "agda", "hexsha": "59490d9eb60fb8f95b7269a67441f028f0878529", "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/Data/Term.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/Data/Term.agda", "max_line_length": 56, "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/Data/Term.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 155, "size": 469 }