Search is not available for this dataset
text
string
meta
dict
module Issue1280 where open import Common.Prelude open import Common.Reflection infixr 5 _∷_ data Vec (A : Set) : Nat → Set where [] : Vec A 0 _∷_ : ∀ {n} → A → Vec A n → Vec A (suc n) test : Vec _ _ test = 0 ∷ [] quoteTest : Term quoteTest = quoteTerm test unquoteTest = unquote (give quoteTest) data Foo (A : Set) : Set where foo : Foo A ok : Foo Nat ok = unquote (give (quoteTerm (foo {Nat}))) -- This shouldn't type-check. The term `bad` is type-checked because -- the implicit argument of `foo` is missing when using quoteTerm. bad : Foo Bool bad = unquote (give (quoteTerm (foo {Nat})))
{ "alphanum_fraction": 0.6661184211, "avg_line_length": 20.2666666667, "ext": "agda", "hexsha": "fbe3d978b54d3fe508c888fc6d7d972b1cea4bc3", "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/Issue1280.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/Issue1280.agda", "max_line_length": 68, "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/Issue1280.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": 195, "size": 608 }
module Control.Monad.Zero where open import Prelude record MonadZero {a b} (M : Set a → Set b) : Set (lsuc a ⊔ b) where instance constructor mkMonadZero field overlap {{super-zero}} : FunctorZero M overlap {{super-monad}} : Monad M open MonadZero public
{ "alphanum_fraction": 0.6974169742, "avg_line_length": 22.5833333333, "ext": "agda", "hexsha": "e73dc3cd6e9e57c94221ab55381a6ade04210bd1", "lang": "Agda", "max_forks_count": 24, "max_forks_repo_forks_event_max_datetime": "2021-04-22T06:10:41.000Z", "max_forks_repo_forks_event_min_datetime": "2015-03-12T18:03:45.000Z", "max_forks_repo_head_hexsha": "da4fca7744d317b8843f2bc80a923972f65548d3", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "t-more/agda-prelude", "max_forks_repo_path": "src/Control/Monad/Zero.agda", "max_issues_count": 59, "max_issues_repo_head_hexsha": "da4fca7744d317b8843f2bc80a923972f65548d3", "max_issues_repo_issues_event_max_datetime": "2022-01-14T07:32:36.000Z", "max_issues_repo_issues_event_min_datetime": "2016-02-09T05:36:44.000Z", "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "t-more/agda-prelude", "max_issues_repo_path": "src/Control/Monad/Zero.agda", "max_line_length": 67, "max_stars_count": 111, "max_stars_repo_head_hexsha": "da4fca7744d317b8843f2bc80a923972f65548d3", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "t-more/agda-prelude", "max_stars_repo_path": "src/Control/Monad/Zero.agda", "max_stars_repo_stars_event_max_datetime": "2022-02-12T23:29:26.000Z", "max_stars_repo_stars_event_min_datetime": "2015-01-05T11:28:15.000Z", "num_tokens": 75, "size": 271 }
{-# OPTIONS --cubical --no-import-sorts --no-exact-split --safe #-} module Cubical.Data.NatPlusOne.Base where open import Cubical.Core.Primitives open import Cubical.Data.Nat open import Cubical.Data.Empty record ℕ₊₁ : Type₀ where constructor 1+_ field n : ℕ pattern one = 1+ zero pattern 2+_ n = 1+ (suc n) -1+_ : ℕ₊₁ → ℕ -1+ (1+ n) = n ℕ₊₁→ℕ : ℕ₊₁ → ℕ ℕ₊₁→ℕ (1+ n) = suc n suc₊₁ : ℕ₊₁ → ℕ₊₁ suc₊₁ (1+ n) = 1+ (suc n) -- Natural number literals for ℕ₊₁ open import Cubical.Data.Nat.Literals public instance fromNatℕ₊₁ : HasFromNat ℕ₊₁ fromNatℕ₊₁ = record { Constraint = λ { zero → ⊥ ; _ → Unit } ; fromNat = λ { (suc n) → 1+ n } }
{ "alphanum_fraction": 0.6118518519, "avg_line_length": 20.4545454545, "ext": "agda", "hexsha": "a7c959476bf809f5683bf03e62b09340be5ac26c", "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/Data/NatPlusOne/Base.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/Data/NatPlusOne/Base.agda", "max_line_length": 67, "max_stars_count": null, "max_stars_repo_head_hexsha": "fd8059ec3eed03f8280b4233753d00ad123ffce8", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "dan-iel-lee/cubical", "max_stars_repo_path": "Cubical/Data/NatPlusOne/Base.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 272, "size": 675 }
------------------------------------------------------------------------------ -- Arithmetic properties (using induction on the FOTC natural numbers type) ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTIONS --without-K #-} -- Usually our proofs use pattern matching instead of the induction -- principle associated with the FOTC natural numbers. The following -- examples show some proofs using it. module FOTC.Data.Nat.PropertiesByInductionATP where open import FOTC.Base open import FOTC.Data.Nat ------------------------------------------------------------------------------ +-leftIdentity : ∀ n → zero + n ≡ n +-leftIdentity n = +-0x n -- See Issue https://github.com/asr/apia/issues/81 . +-rightIdentityA : D → Set +-rightIdentityA i = i + zero ≡ i {-# ATP definition +-rightIdentityA #-} +-rightIdentity : ∀ {n} → N n → n + zero ≡ n +-rightIdentity Nn = N-ind +-rightIdentityA A0 is Nn where postulate A0 : +-rightIdentityA zero {-# ATP prove A0 #-} postulate is : ∀ {i} → +-rightIdentityA i → +-rightIdentityA (succ₁ i) {-# ATP prove is #-} -- See Issue https://github.com/asr/apia/issues/81 . +-NA : D → D → Set +-NA n i = N (i + n) {-# ATP definition +-NA #-} +-N : ∀ {m n} → N m → N n → N (m + n) +-N {n = n} Nm Nn = N-ind (+-NA n) A0 is Nm where postulate A0 : +-NA n zero {-# ATP prove A0 #-} postulate is : ∀ {i} → +-NA n i → +-NA n (succ₁ i) {-# ATP prove is #-} -- See Issue https://github.com/asr/apia/issues/81 . +-assocA : D → D → D → Set +-assocA n o i = i + n + o ≡ i + (n + o) {-# ATP definition +-assocA #-} +-assoc : ∀ {m} → N m → ∀ n o → m + n + o ≡ m + (n + o) +-assoc Nm n o = N-ind (+-assocA n o) A0 is Nm where postulate A0 : +-assocA n o zero {-# ATP prove A0 #-} postulate is : ∀ {i} → +-assocA n o i → +-assocA n o (succ₁ i) {-# ATP prove is #-} -- A proof without use ATPs definitions. +-assoc' : ∀ {m} → N m → ∀ n o → m + n + o ≡ m + (n + o) +-assoc' Nm n o = N-ind A A0 is Nm where A : D → Set A i = i + n + o ≡ i + (n + o) postulate A0 : zero + n + o ≡ zero + (n + o) {-# ATP prove A0 #-} postulate is : ∀ {i} → i + n + o ≡ i + (n + o) → succ₁ i + n + o ≡ succ₁ i + (n + o) {-# ATP prove is #-} -- See Issue https://github.com/asr/apia/issues/81 . x+Sy≡S[x+y]A : D → D → Set x+Sy≡S[x+y]A n i = i + succ₁ n ≡ succ₁ (i + n) {-# ATP definition x+Sy≡S[x+y]A #-} x+Sy≡S[x+y] : ∀ {m} → N m → ∀ n → m + succ₁ n ≡ succ₁ (m + n) x+Sy≡S[x+y] Nm n = N-ind (x+Sy≡S[x+y]A n) A0 is Nm where postulate A0 : x+Sy≡S[x+y]A n zero {-# ATP prove A0 #-} postulate is : ∀ {i} → x+Sy≡S[x+y]A n i → x+Sy≡S[x+y]A n (succ₁ i) {-# ATP prove is #-} -- See Issue https://github.com/asr/apia/issues/81 . +-commA : D → D → Set +-commA n i = i + n ≡ n + i {-# ATP definition +-commA #-} +-comm : ∀ {m n} → N m → N n → m + n ≡ n + m +-comm {n = n} Nm Nn = N-ind (+-commA n) A0 is Nm where postulate A0 : +-commA n zero {-# ATP prove A0 +-rightIdentity #-} postulate is : ∀ {i} → +-commA n i → +-commA n (succ₁ i) {-# ATP prove is x+Sy≡S[x+y] #-}
{ "alphanum_fraction": 0.5038426068, "avg_line_length": 30.1203703704, "ext": "agda", "hexsha": "368ab9fadc87ddc0cf9b66d84a12ec37c81f680d", "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/Nat/PropertiesByInductionATP.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/Nat/PropertiesByInductionATP.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/Nat/PropertiesByInductionATP.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": 1130, "size": 3253 }
module Bootstrap.SimpleInductive where open import Data.List using (applyUpTo) open import Prelude data ConstrData' : Set where Self : ConstrData' Other : String → ConstrData' ConstrData = String × List ConstrData' InductiveData = String × List ConstrData private ℕ⊎Sshow : ℕ ⊎ String → String ℕ⊎Sshow (inj₁ x) = show x ℕ⊎Sshow (inj₂ y) = y ℕ⊎Ssuc : ℕ ⊎ String → ℕ ⊎ String ℕ⊎Ssuc (inj₁ x) = inj₁ (suc x) ℕ⊎Ssuc (inj₂ y) = inj₂ y constrDataToPrefix : (ℕ ⊎ String → String) → ℕ ⊎ String → Char → ConstrData → String constrDataToPrefix term n _ (_ , []) = term n constrDataToPrefix term n c (name , x ∷ constr) = show c <+> "_ :" <+> (case x of λ { Self → ℕ⊎Sshow n ; (Other y) → y }) <+> constrDataToPrefix term (ℕ⊎Ssuc n) c (name , constr) constrDataToConstrPrefix : ℕ ⊎ String → Char → ConstrData → String constrDataToConstrPrefix = constrDataToPrefix (λ _ → "") constrDataToTypeAnn : ℕ ⊎ String → Char → ConstrData → String constrDataToTypeAnn = constrDataToPrefix ℕ⊎Sshow kthConstr : ℕ → InductiveData → String kthConstr k (name , constrs) with lookupMaybe k constrs ... | Maybe.just c@(_ , constr) = constrDataToConstrPrefix (inj₂ name) 'λ' c <+> -- constructor arguments "Λ _ : *" <+> unwords (flip mapWithIndex constrs -- abstract arguments (λ k constr → "λ _ :" <+> constrDataToTypeAnn (inj₁ k) 'Π' constr)) <+> -- apply all abstract arguments to self constructors and leave the others alone -- then pass the results to the k-th abstract constructor applyTo currentConstr (zipWith (λ where i Self → applyTo ("<" + show i <+> show (length constrs) + ">") abstractConstrs i (Other x) → show i) (applyUpTo ((length constrs + length constr) ∸_) $ length constr) constr) where currentConstr = show (length constrs ∸ k ∸ 1) abstractConstrs : List String abstractConstrs = reverse $ applyUpTo show $ length constrs applyTo : String → List String → String applyTo f fs = foldl (λ s l → "[" + s <+> l + "]") f fs kthConstr k constrs | nothing = "Error: no such constructor" kthConstrType : String → ℕ → List ConstrData → String kthConstrType name k constrs with lookupMaybe k constrs ... | just x = constrDataToTypeAnn (inj₂ name) 'Π' x ... | nothing = "Error: no such constructor" typeDecl : String → List ConstrData → String typeDecl name constrs = "∀ _ : *" <+> unwords (flip mapWithIndex constrs (λ k constr → "Π _ :" <+> constrDataToTypeAnn (inj₁ k) 'Π' constr)) <+> show (length constrs) -------------------------------------------------------------------------------- simpleInductive : InductiveData → String simpleInductive d@(name , constrs) = "let" <+> name <+> ":=" <+> typeDecl name constrs + "." + unwords (flip mapWithIndex constrs (λ k constr → "let" <+> proj₁ constr <+> ":=" <+> kthConstr k d <+> ":" <+> kthConstrType name k constrs + "."))
{ "alphanum_fraction": 0.6162790698, "avg_line_length": 36.265060241, "ext": "agda", "hexsha": "c8e60a210f13f7d10585d1298268f02dae8e7276", "lang": "Agda", "max_forks_count": 2, "max_forks_repo_forks_event_max_datetime": "2021-10-20T10:46:20.000Z", "max_forks_repo_forks_event_min_datetime": "2019-06-27T23:12:48.000Z", "max_forks_repo_head_hexsha": "62fa6f36e4555360d94041113749bbb6d291691c", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "WhatisRT/meta-cedille", "max_forks_repo_path": "src/Bootstrap/SimpleInductive.agda", "max_issues_count": 10, "max_issues_repo_head_hexsha": "62fa6f36e4555360d94041113749bbb6d291691c", "max_issues_repo_issues_event_max_datetime": "2020-04-25T15:29:17.000Z", "max_issues_repo_issues_event_min_datetime": "2019-06-13T17:44:43.000Z", "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "WhatisRT/meta-cedille", "max_issues_repo_path": "src/Bootstrap/SimpleInductive.agda", "max_line_length": 86, "max_stars_count": 35, "max_stars_repo_head_hexsha": "62fa6f36e4555360d94041113749bbb6d291691c", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "WhatisRT/meta-cedille", "max_stars_repo_path": "src/Bootstrap/SimpleInductive.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": 944, "size": 3010 }
{-# OPTIONS --without-K #-} module Examples.Traced where open import Data.Empty using (⊥) open import Data.Unit using (⊤; tt) open import Data.Sum using (_⊎_; inj₁; inj₂) open import Data.Product open import Relation.Binary.PropositionalEquality using (_≡_; refl; sym; trans; cong; cong₂; subst; module ≡-Reasoning) open import Singleton open import PiFrac open import Trace open import Reasoning open import Examples.BooleanCircuits ------------------------------------------------------------------ -- Example in Sec. 4.3 from Abramsky's paper -- http://www.cs.ox.ac.uk/files/341/calco05.pdf q : {A1 A2 A3 A4 B1 B2 B3 B4 : 𝕌} → (f1 : A1 ⟷ B2) → (f2 : A2 ⟷ B4) → (f3 : A3 ⟷ B3) → (f4 : A4 ⟷ B1) → A1 ×ᵤ (A2 ×ᵤ (A3 ×ᵤ A4)) ⟷ B1 ×ᵤ (B2 ×ᵤ (B3 ×ᵤ B4)) q {A1} {A2} {A3} {A4} {B1} {B2} {B3} {B4} f1 f2 f3 f4 = (A1 ×ᵤ A2 ×ᵤ A3 ×ᵤ A4) ⟷⟨ f1 ⊗ (f2 ⊗ (f3 ⊗ f4)) ⟩ (B2 ×ᵤ B4 ×ᵤ B3 ×ᵤ B1) ⟷⟨ assocl⋆ ⟩ (B2 ×ᵤ B4) ×ᵤ (B3 ×ᵤ B1) ⟷⟨ swap⋆ ⟩ (B3 ×ᵤ B1) ×ᵤ (B2 ×ᵤ B4) ⟷⟨ swap⋆ ⊗ id⟷ ⟩ (B1 ×ᵤ B3) ×ᵤ (B2 ×ᵤ B4) ⟷⟨ assocr⋆ ⊚ (id⟷ ⊗ assocl⋆) ⟩ B1 ×ᵤ ((B3 ×ᵤ B2) ×ᵤ B4) ⟷⟨ id⟷ ⊗ ((swap⋆ ⊗ id⟷) ⊚ assocr⋆) ⟩ B1 ×ᵤ (B2 ×ᵤ (B3 ×ᵤ B4)) □ q' : {A1 U2 U3 U4 B1 : 𝕌} → (f1 : A1 ⟷ U2) → (f2 : U2 ⟷ U4) → (f3 : U3 ⟷ U3) → (f4 : U4 ⟷ B1) → (v : ⟦ A1 ⟧) (u3 : ⟦ U3 ⟧) → (u3-fix : eval f3 u3 ≡ u3) → let u2 = eval f1 v in let u4 = eval f2 u2 in ● A1 [ v ] ⟷ ● B1 [ proj₁ (eval (q f1 f2 f3 f4) (v , u2 , u3 , u4)) ] q' f1 f2 f3 f4 v u3 u3fix = trace v (q f1 f2 f3 f4) (( u2 , ( u3 , u4 ) ), cong₂ _,_ refl (cong₂ _,_ u3fix refl)) where u2 = eval f1 v u3′ = eval f3 u3 u4 = eval f2 u2 -- The point is that q' acts in a very particular way: q'-closed-form : {A1 U2 U3 U4 B1 : 𝕌} → (f1 : A1 ⟷ U2) → (f2 : U2 ⟷ U4) → (f3 : U3 ⟷ U3) → (f4 : U4 ⟷ B1) → (u3 : ⟦ U3 ⟧) (u3-fix : eval f3 u3 ≡ u3) → (v : ⟦ A1 ⟧) → proj₁ (eval (q' f1 f2 f3 f4 v u3 u3-fix) (v , refl)) ≡ eval (f1 ⊚ f2 ⊚ f4) v q'-closed-form f1 f2 f3 f4 u3 u3fix v = refl --------------------------------------------------------------------------------- -- I think the examples below are 'obsolete', in the sense that the one above -- is more faithful to the original, and more general too. Delete? p : {A1 A2 A3 A4 : 𝕌} → (A1 ×ᵤ A2) ×ᵤ (A3 ×ᵤ A4) ⟷ (A2 ×ᵤ A4) ×ᵤ (A3 ×ᵤ A1) p = (swap⋆ ⊗ swap⋆) ⊚ assocr⋆ ⊚ (id⟷ ⊗ assocl⋆) ⊚ (id⟷ ⊗ (swap⋆ ⊗ id⟷)) ⊚ (id⟷ ⊗ assocr⋆) ⊚ assocl⋆ ⊚ (id⟷ ⊗ swap⋆) p' : {A1 A2 A3 A4 : 𝕌} → ((A1 ×ᵤ A2) ×ᵤ A4) ×ᵤ A3 ⟷ ((A2 ×ᵤ A4) ×ᵤ A1) ×ᵤ A3 p' = assocr⋆ ⊚ (id⟷ ⊗ swap⋆) ⊚ p ⊚ (id⟷ ⊗ swap⋆) ⊚ assocl⋆ p2 : 𝔹 ×ᵤ (𝔹 ×ᵤ (𝔹 ×ᵤ 𝔹)) ⟷ 𝔹 ×ᵤ (𝔹 ×ᵤ (𝔹 ×ᵤ 𝔹)) p2 = assocl⋆ ⊚ (swap⋆ ⊗ swap⋆) ⊚ assocr⋆ ⊚ (id⟷ ⊗ assocl⋆) ⊚ (id⟷ ⊗ (swap⋆ ⊗ id⟷)) ⊚ (id⟷ ⊗ assocr⋆) ⊚ assocl⋆ ⊚ (id⟷ ⊗ swap⋆) ⊚ assocr⋆ p2' : (v : ⟦ 𝔹 ⟧) → ● 𝔹 [ v ] ⟷ ● 𝔹 [ proj₁ (proj₁ (eval p ((v , v) , (v , v)))) ] p2' v = trace v p2 ((v , (v , v)) , refl) --------------------------------------------------------------------------------- -- Examples inspired by compact closed categories and fractional numbers. -- Intuition: -- 1/A x B is a space transformer; takes A space and returns B space -- denote space transformers as A ⊸ B -- Best we can do: -- we need Singletons, so |a ⊸ b| is 1 component of a function. _⊸_ : {A : 𝕌} → (a : ⟦ A ⟧) → {B : 𝕌} → (b : ⟦ B ⟧) → 𝕌 _⊸_ {A} a {B} b = 𝟙/● A [ a ] ×ᵤ ● B [ b ] id⊸ : {A : 𝕌} {a : ⟦ A ⟧} → (a ⊸ a) ⟷ 𝟙 id⊸ {A} {a} = (𝟙/● A [ a ] ×ᵤ ● A [ a ]) ⟷⟨ swap⋆ ⟩ (● A [ a ] ×ᵤ 𝟙/● A [ a ]) ⟷⟨ ε a ⟩ 𝟙 □ comp⊸ : {A B C : 𝕌} {a : ⟦ A ⟧} {b : ⟦ B ⟧} {c : ⟦ C ⟧} → (a ⊸ b) ×ᵤ (b ⊸ c) ⟷ (a ⊸ c) comp⊸ {A} {B} {C} {a} {b} {c} = (𝟙/● A [ a ] ×ᵤ ● B [ b ]) ×ᵤ (𝟙/● B [ b ] ×ᵤ ● C [ c ]) ⟷⟨ assocr⋆ ⟩ 𝟙/● A [ a ] ×ᵤ (● B [ b ] ×ᵤ (𝟙/● B [ b ] ×ᵤ ● C [ c ])) ⟷⟨ id⟷ ⊗ assocl⋆ ⟩ 𝟙/● A [ a ] ×ᵤ (● B [ b ] ×ᵤ 𝟙/● B [ b ]) ×ᵤ ● C [ c ] ⟷⟨ id⟷ ⊗ (ε b ⊗ id⟷) ⟩ 𝟙/● A [ a ] ×ᵤ (𝟙 ×ᵤ ● C [ c ]) ⟷⟨ id⟷ ⊗ unite⋆l ⟩ 𝟙/● A [ a ] ×ᵤ ● C [ c ] □ app : {A B : 𝕌} {a : ⟦ A ⟧} {b : ⟦ B ⟧} → (a ⊸ b) ×ᵤ ● A [ a ] ⟷ ● B [ b ] app {A} {B} {a} {b} = (𝟙/● A [ a ] ×ᵤ ● B [ b ]) ×ᵤ ● A [ a ] ⟷⟨ swap⋆ ⊗ id⟷ ⟩ (● B [ b ] ×ᵤ 𝟙/● A [ a ]) ×ᵤ ● A [ a ] ⟷⟨ assocr⋆ ⊚ (id⟷ ⊗ (swap⋆ ⊚ ε a)) ⟩ ● B [ b ] ×ᵤ 𝟙 ⟷⟨ unite⋆r ⟩ ● B [ b ] □ -- B/A × D/C ⟷ B × D / A × C dist×/ : {A B C D : 𝕌} {a : ⟦ A ⟧} {b : ⟦ B ⟧} {c : ⟦ C ⟧} {d : ⟦ D ⟧} → (a ⊸ b) ×ᵤ (c ⊸ d) ⟷ ((a , c) ⊸ (b , d)) dist×/ {A} {B} {C} {D} {a} {b} {c} {d} = (𝟙/● A [ a ] ×ᵤ ● B [ b ]) ×ᵤ (𝟙/● C [ c ] ×ᵤ ● D [ d ]) ⟷⟨ assocr⋆ ⊚ (id⟷ ⊗ assocl⋆) ⟩ (𝟙/● A [ a ] ×ᵤ (● B [ b ] ×ᵤ 𝟙/● C [ c ]) ×ᵤ ● D [ d ]) ⟷⟨ id⟷ ⊗ (swap⋆ ⊗ id⟷) ⟩ (𝟙/● A [ a ] ×ᵤ (𝟙/● C [ c ] ×ᵤ ● B [ b ]) ×ᵤ ● D [ d ]) ⟷⟨ (id⟷ ⊗ assocr⋆) ⊚ assocl⋆ ⟩ (𝟙/● A [ a ] ×ᵤ 𝟙/● C [ c ]) ×ᵤ (● B [ b ] ×ᵤ ● D [ d ]) ⟷⟨ fracr ⊗ tensorr ⟩ (𝟙/● A ×ᵤ C [ a , c ]) ×ᵤ (● B ×ᵤ D [ b , d ]) □ -- 1/A x 1/B <-> 1 / (A x B) rev× : {A B : 𝕌} {a : ⟦ A ⟧} {b : ⟦ B ⟧} → (a ⊸ tt) ×ᵤ (b ⊸ tt) ⟷ ((a , b) ⊸ tt) rev× {A} {B} {a} {b} = (𝟙/● A [ a ] ×ᵤ ● 𝟙 [ tt ]) ×ᵤ (𝟙/● B [ b ] ×ᵤ ● 𝟙 [ tt ]) ⟷⟨ dist×/ ⟩ (𝟙/● A ×ᵤ B [ a , b ] ×ᵤ ● 𝟙 ×ᵤ 𝟙 [ tt , tt ]) ⟷⟨ id⟷ ⊗ lift unite⋆l ⟩ (𝟙/● A ×ᵤ B [ a , b ] ×ᵤ ● 𝟙 [ tt ]) □ {-- trivial : ● 𝟙 [ tt ] ⟷ 𝟙 trivial = {!!} --} -- (A <-> B) -> (1/A <-> 1/B) --rev : {A B : 𝕌} {a : ⟦ A ⟧} {b : ⟦ B ⟧} -- → ● A [ a ] ⟷ ● B [ b ] → (b ⊸ tt) ⟷ (a ⊸ tt) -- (𝟙/● A [ a ] ×ᵤ ● 𝟙 [ tt ]) ⟷⟨ {!!} ⟩ -- (𝟙/● B [ b ] ×ᵤ ● 𝟙 [ tt ]) □ rev : {A B : 𝕌} {a : ⟦ A ⟧} → (f : A ⟷ B) → (𝟙/● B [ eval f a ] ⟷ 𝟙/● A [ a ]) rev {A} {B} {a} f = dual f a -- A <-> 1 / (1/A) revrev : {A : 𝕌} {a : ⟦ A ⟧} {a⋆ : ⟦ 𝟙/● A [ a ] ⟧} → ● A [ a ] ⟷ 𝟙/● (𝟙/● A [ a ]) [ a⋆ ] revrev {A} {a} {a⋆} = ● A [ a ] ⟷⟨ uniti⋆r ⟩ ● A [ a ] ×ᵤ 𝟙 ⟷⟨ {!id⟷ ⊗ η a⋆!} ⟩ ● A [ a ] ×ᵤ (𝟙/● A [ a ] ×ᵤ 𝟙/● (𝟙/● A [ a ]) [ a⋆ ]) ⟷⟨ {!!} ⟩ 𝟙/● (𝟙/● A [ a ]) [ a⋆ ] □ -- this is strange -- A/C + B/C <-> (A + B) / C -- factor+/l : {A B C : 𝕌} {a : ⟦ A ⟧} {b : ⟦ B ⟧} {c : ⟦ C ⟧} -- → (c ⊸ a) +ᵤ (c ⊸ b) ⟷ (_⊸_ {C} c {A +ᵤ B} (inj₁ a)) -- factor+/l {A} {B} {C} {a} {b} {c} = -- (𝟙/● C [ c ] ×ᵤ ● A [ a ] +ᵤ 𝟙/● C [ c ] ×ᵤ ● B [ b ]) ⟷⟨ factorl ⟩ -- (𝟙/● C [ c ] ×ᵤ (● A [ a ] +ᵤ ● B [ b ])) ⟷⟨ id⟷ ⊗ {!!} ⟩ -- (𝟙/● C [ c ] ×ᵤ ● A +ᵤ B [ inj₁ a ]) □ -- same issue here with the + -- A/B + C/D <-> (A x D + B x C) / (B x D) -- SAT solver Sec. 5 from https://www.cs.indiana.edu/~sabry/papers/rational.pdf -- can we do this? -- curry⊸ : {A B C : 𝕌} {a : ⟦ A ⟧} {b : ⟦ B ⟧} {c : ⟦ C ⟧} -- → (● A [ a ] ×ᵤ (b ⊸ c)) ⟷ (a ⊸ {!!}) -- what do we put here? -- curry⊸ {A} {B} {C} {a} {b} {c} = {!!}
{ "alphanum_fraction": 0.3789968177, "avg_line_length": 36.6611111111, "ext": "agda", "hexsha": "98501606ed7af2742f5f9790fba8f6482ceb6166", "lang": "Agda", "max_forks_count": 3, "max_forks_repo_forks_event_max_datetime": "2019-09-10T09:47:13.000Z", "max_forks_repo_forks_event_min_datetime": "2016-05-29T01:56:33.000Z", "max_forks_repo_head_hexsha": "003835484facfde0b770bc2b3d781b42b76184c1", "max_forks_repo_licenses": [ "BSD-2-Clause" ], "max_forks_repo_name": "JacquesCarette/pi-dual", "max_forks_repo_path": "fracGC/Examples/Traced.agda", "max_issues_count": 4, "max_issues_repo_head_hexsha": "003835484facfde0b770bc2b3d781b42b76184c1", "max_issues_repo_issues_event_max_datetime": "2021-10-29T20:41:23.000Z", "max_issues_repo_issues_event_min_datetime": "2018-06-07T16:27:41.000Z", "max_issues_repo_licenses": [ "BSD-2-Clause" ], "max_issues_repo_name": "JacquesCarette/pi-dual", "max_issues_repo_path": "fracGC/Examples/Traced.agda", "max_line_length": 89, "max_stars_count": 14, "max_stars_repo_head_hexsha": "003835484facfde0b770bc2b3d781b42b76184c1", "max_stars_repo_licenses": [ "BSD-2-Clause" ], "max_stars_repo_name": "JacquesCarette/pi-dual", "max_stars_repo_path": "fracGC/Examples/Traced.agda", "max_stars_repo_stars_event_max_datetime": "2021-05-05T01:07:57.000Z", "max_stars_repo_stars_event_min_datetime": "2015-08-18T21:40:15.000Z", "num_tokens": 3989, "size": 6599 }
{- This file proves the higher groupoid structure of types for homogeneous and heterogeneous paths -} {-# OPTIONS --cubical --safe #-} module Cubical.Foundations.GroupoidLaws where open import Cubical.Foundations.Prelude private variable ℓ : Level A : Type ℓ x y z w : A _⁻¹ : (x ≡ y) → (y ≡ x) x≡y ⁻¹ = sym x≡y infix 40 _⁻¹ -- homogeneous groupoid laws symInvo : (p : x ≡ y) → p ≡ p ⁻¹ ⁻¹ symInvo p = refl rUnit : (p : x ≡ y) → p ≡ p ∙ refl rUnit p j i = compPath-filler p refl j i -- The filler of left unit: lUnit-filler p = -- PathP (λ i → PathP (λ j → PathP (λ k → A) x (p (~ j ∨ i))) -- (refl i) (λ j → compPath-filler refl p i j)) (λ k i → (p (~ k ∧ i ))) (lUnit p) lUnit-filler : {x y : A} (p : x ≡ y) → I → I → I → A lUnit-filler {x = x} p j k i = hfill (λ j → λ { (i = i0) → x ; (i = i1) → p (~ k ∨ j ) ; (k = i0) → p i -- ; (k = i1) → compPath-filler refl p j i }) (inS (p (~ k ∧ i ))) j lUnit : (p : x ≡ y) → p ≡ refl ∙ p lUnit p j i = lUnit-filler p i1 j i symRefl : refl {x = x} ≡ refl ⁻¹ symRefl i = refl compPathRefl : refl {x = x} ≡ refl ∙ refl compPathRefl = rUnit refl -- The filler of right cancellation: rCancel-filler p = -- PathP (λ i → PathP (λ j → PathP (λ k → A) x (p (~ j ∧ ~ i))) -- (λ j → compPath-filler p (p ⁻¹) i j) (refl i)) (λ j i → (p (i ∧ ~ j))) (rCancel p) rCancel-filler : ∀ {x y : A} (p : x ≡ y) → (k j i : I) → A rCancel-filler {x = x} p k j i = hfill (λ k → λ { (i = i0) → x ; (i = i1) → p (~ k ∧ ~ j) -- ; (j = i0) → compPath-filler p (p ⁻¹) k i ; (j = i1) → x }) (inS (p (i ∧ ~ j))) k rCancel : (p : x ≡ y) → p ∙ p ⁻¹ ≡ refl rCancel {x = x} p j i = rCancel-filler p i1 j i lCancel : (p : x ≡ y) → p ⁻¹ ∙ p ≡ refl lCancel p = rCancel (p ⁻¹) -- The filler of the three-out-of-four identification: 3outof4-filler α p β = -- PathP (λ i → PathP (λ j → PathP (λ k → A) (α i i0) (α i i1)) -- (λ j → α i j) (λ j → β i j)) (λ j i → α i0 i) (3outof4 α p β) 3outof4-filler : (α : I → I → A) → (p : α i1 i0 ≡ α i1 i1) → (β : PathP (λ j → Path A (α j i0) (α j i1)) (λ i → α i0 i) p) → I → I → I → A 3outof4-filler α p β k j i = hfill (λ k → λ { (i = i0) → α k i0 ; (i = i1) → α k i1 ; (j = i0) → α k i ; (j = i1) → β k i }) (inS (α i0 i)) k 3outof4 : (α : I → I → A) → (p : α i1 i0 ≡ α i1 i1) → (β : PathP (λ j → Path A (α j i0) (α j i1)) (λ i → α i0 i) p) → (λ i → α i1 i) ≡ p 3outof4 α p β j i = 3outof4-filler α p β i1 j i -- The filler of the pre-associative square: preassoc p q r = -- PathP (λ i → PathP (λ j → PathP (λ k → A) x (compPath-filler q r i j)) -- (refl i) (λ j → compPath-filler (p ∙ q) r i j)) (λ j i → compPath-filler p q j i) (preassoc p q r) preassoc-filler : {x y z w : A} (p : x ≡ y) (q : y ≡ z) (r : z ≡ w) → I → I → I → A preassoc-filler {x = x} p q r k j i = hfill (λ k → λ { (i = i0) → x ; (i = i1) → compPath-filler q r k j ; (j = i0) → p i -- ; (j = i1) → compPath-filler (p ∙ q) r k i }) (inS (compPath-filler p q j i)) k preassoc : (p : x ≡ y) (q : y ≡ z) (r : z ≡ w) → PathP (λ j → Path A x ((q ∙ r) j)) p ((p ∙ q) ∙ r) preassoc {x = x} p q r j i = preassoc-filler p q r i1 j i assoc : (p : x ≡ y) (q : y ≡ z) (r : z ≡ w) → p ∙ q ∙ r ≡ (p ∙ q) ∙ r assoc p q r = 3outof4 (compPath-filler p (q ∙ r)) ((p ∙ q) ∙ r) (preassoc p q r) -- heterogeneous groupoid laws symInvoP : {A : I → Type ℓ} → {x : A i0} → {y : A i1} → (p : PathP A x y) → PathP (λ j → PathP (λ i → symInvo (λ i → A i) j i) x y) p (symP (symP p)) symInvoP p = refl rUnitP : {A : I → Type ℓ} → {x : A i0} → {y : A i1} → (p : PathP A x y) → PathP (λ j → PathP (λ i → rUnit (λ i → A i) j i) x y) p (compPathP p refl) rUnitP p j i = compPathP-filler p refl i j lUnitP : {A : I → Type ℓ} → {x : A i0} → {y : A i1} → (p : PathP A x y) → PathP (λ j → PathP (λ i → lUnit (λ i → A i) j i) x y) p (compPathP refl p) lUnitP {A = A} {x = x} p k i = comp (λ j → lUnit-filler (λ i → A i) j k i) (λ j → λ { (i = i0) → x ; (i = i1) → p (~ k ∨ j ) ; (k = i0) → p i }) (p (~ k ∧ i )) rCancelP : {A : I → Type ℓ} → {x : A i0} → {y : A i1} → (p : PathP A x y) → PathP (λ j → PathP (λ i → rCancel (λ i → A i) j i) x x) (compPathP p (symP p)) refl rCancelP {A = A} {x = x} p j i = comp (λ k → rCancel-filler (λ i → A i) k j i) (λ k → λ { (i = i0) → x ; (i = i1) → p (~ k ∧ ~ j) ; (j = i1) → x }) (p (i ∧ ~ j)) lCancelP : {A : I → Type ℓ} → {x : A i0} → {y : A i1} → (p : PathP A x y) → PathP (λ j → PathP (λ i → lCancel (λ i → A i) j i) y y) (compPathP (symP p) p) refl lCancelP p = rCancelP (symP p) 3outof4P : {A : I → I → Type ℓ} {P : (A i0 i1) ≡ (A i1 i1)} {B : PathP (λ j → Path (Type ℓ) (A i0 j) (A i1 j)) (λ i → A i i0) P} (α : ∀ (i j : I) → A j i) (p : PathP (λ i → P i) (α i1 i0) (α i1 i1)) → (β : PathP (λ j → PathP (λ i → B j i) (α j i0) (α j i1)) (λ i → α i0 i) p) → PathP (λ j → PathP (λ i → 3outof4 (λ j i → A i j) P B j i) (α i1 i0) (α i1 i1)) (λ i → α i1 i) p 3outof4P {A = A} {P} {B} α p β j i = comp (λ k → 3outof4-filler (λ j i → A i j) P B k j i) (λ k → λ { (i = i0) → α k i0 ; (i = i1) → α k i1 ; (j = i0) → α k i ; (j = i1) → β k i }) (α i0 i) preassocP : {A : I → Type ℓ} {x : A i0} {y : A i1} {B_i1 : Type ℓ} {B : (A i1) ≡ B_i1} {z : B i1} {C_i1 : Type ℓ} {C : (B i1) ≡ C_i1} {w : C i1} (p : PathP A x y) (q : PathP (λ i → B i) y z) (r : PathP (λ i → C i) z w) → PathP (λ j → PathP (λ i → preassoc (λ i → A i) B C j i) x ((compPathP q r) j)) p (compPathP (compPathP p q) r) preassocP {A = A} {x = x} {B = B} {C = C} p q r j i = comp (λ k → preassoc-filler (λ i → A i) B C k j i) (λ k → λ { (i = i0) → x ; (i = i1) → compPathP-filler q r j k ; (j = i0) → p i -- ; (j = i1) → compPathP-filler (compPathP p q) r i k }) (compPathP-filler p q i j) assocP : {A : I → Type ℓ} {x : A i0} {y : A i1} {B_i1 : Type ℓ} {B : (A i1) ≡ B_i1} {z : B i1} {C_i1 : Type ℓ} {C : (B i1) ≡ C_i1} {w : C i1} (p : PathP A x y) (q : PathP (λ i → B i) y z) (r : PathP (λ i → C i) z w) → PathP (λ j → PathP (λ i → assoc (λ i → A i) B C j i) x w) (compPathP p (compPathP q r)) (compPathP (compPathP p q) r) assocP p q r = 3outof4P (λ i j → compPathP-filler p (compPathP q r) j i) (compPathP (compPathP p q) r) (preassocP p q r) -- Loic's code below -- simultaneaous composition on both sides of a path doubleCompPath-filler : {ℓ : Level} {A : Type ℓ} {w x y z : A} → w ≡ x → x ≡ y → y ≡ z → I → I → A doubleCompPath-filler p q r i = hfill (λ t → λ { (i = i0) → p (~ t) ; (i = i1) → r t }) (inS (q i)) doubleCompPath : {ℓ : Level} {A : Type ℓ} {w x y z : A} → w ≡ x → x ≡ y → y ≡ z → w ≡ z doubleCompPath p q r i = doubleCompPath-filler p q r i i1 _∙∙_∙∙_ : {ℓ : Level} {A : Type ℓ} {w x y z : A} → w ≡ x → x ≡ y → y ≡ z → w ≡ z p ∙∙ q ∙∙ r = doubleCompPath p q r -- some exchange law for doubleCompPath and refl rhombus-filler : {ℓ : Level} {A : Type ℓ} {x y z : A} (p : x ≡ y) (q : y ≡ z) → I → I → A rhombus-filler p q i j = hcomp (λ t → λ { (i = i0) → p (~ t ∨ j) ; (i = i1) → q (t ∧ j) ; (j = i0) → p (~ t ∨ i) ; (j = i1) → q (t ∧ i) }) (p i1) leftright : {ℓ : Level} {A : Type ℓ} {x y z : A} (p : x ≡ y) (q : y ≡ z) → (refl ∙∙ p ∙∙ q) ≡ (p ∙∙ q ∙∙ refl) leftright p q i j = hcomp (λ t → λ { (j = i0) → p (i ∧ (~ t)) ; (j = i1) → q (t ∨ i) }) (rhombus-filler p q i j) -- equating doubleCompPath and a succession of two compPath split-leftright : {ℓ : Level} {A : Type ℓ} {w x y z : A} (p : w ≡ x) (q : x ≡ y) (r : y ≡ z) → (p ∙∙ q ∙∙ r) ≡ (refl ∙∙ (p ∙∙ q ∙∙ refl) ∙∙ r) split-leftright p q r i j = hcomp (λ t → λ { (j = i0) → p (~ i ∧ ~ t) ; (j = i1) → r t }) (doubleCompPath-filler p q refl j i) split-leftright' : {ℓ : Level} {A : Type ℓ} {w x y z : A} (p : w ≡ x) (q : x ≡ y) (r : y ≡ z) → (p ∙∙ q ∙∙ r) ≡ (p ∙∙ (refl ∙∙ q ∙∙ r) ∙∙ refl) split-leftright' p q r i j = hcomp (λ t → λ { (j = i0) → p (~ t) ; (j = i1) → r (i ∨ t) }) (doubleCompPath-filler refl q r j i) doubleCompPath-elim : {ℓ : Level} {A : Type ℓ} {w x y z : A} (p : w ≡ x) (q : x ≡ y) (r : y ≡ z) → (p ∙∙ q ∙∙ r) ≡ (p ∙ q) ∙ r doubleCompPath-elim p q r = (split-leftright p q r) ∙ (λ i → (leftright p q (~ i)) ∙ r) doubleCompPath-elim' : {ℓ : Level} {A : Type ℓ} {w x y z : A} (p : w ≡ x) (q : x ≡ y) (r : y ≡ z) → (p ∙∙ q ∙∙ r) ≡ p ∙ (q ∙ r) doubleCompPath-elim' p q r = (split-leftright' p q r) ∙ (sym (leftright p (q ∙ r))) -- deducing associativity for compPath -- assoc : {ℓ : Level} {A : Type ℓ} {w x y z : A} (p : w ≡ x) (q : x ≡ y) (r : y ≡ z) → -- (p ∙ q) ∙ r ≡ p ∙ (q ∙ r) -- assoc p q r = (sym (doubleCompPath-elim p q r)) ∙ (doubleCompPath-elim' p q r) hcomp-unique : ∀ {ℓ} {A : Set ℓ} {φ} → (u : I → Partial φ A) → (u0 : A [ φ ↦ u i0 ]) → (h2 : ∀ i → A [ (φ ∨ ~ i) ↦ (\ { (φ = i1) → u i 1=1; (i = i0) → outS u0}) ]) → (hcomp u (outS u0) ≡ outS (h2 i1)) [ φ ↦ (\ { (φ = i1) → (\ i → u i1 1=1)}) ] hcomp-unique {φ = φ} u u0 h2 = inS (\ i → hcomp (\ k → \ { (φ = i1) → u k 1=1 ; (i = i1) → outS (h2 k) }) (outS u0)) lid-unique : ∀ {ℓ} {A : Set ℓ} {φ} → (u : I → Partial φ A) → (u0 : A [ φ ↦ u i0 ]) → (h1 h2 : ∀ i → A [ (φ ∨ ~ i) ↦ (\ { (φ = i1) → u i 1=1; (i = i0) → outS u0}) ]) → (outS (h1 i1) ≡ outS (h2 i1)) [ φ ↦ (\ { (φ = i1) → (\ i → u i1 1=1)}) ] lid-unique {φ = φ} u u0 h1 h2 = inS (\ i → hcomp (\ k → \ { (φ = i1) → u k 1=1 ; (i = i0) → outS (h1 k) ; (i = i1) → outS (h2 k) }) (outS u0)) transp-hcomp : ∀ {ℓ} (φ : I) {A' : Set ℓ} (A : (i : I) → Set ℓ [ φ ↦ (λ _ → A') ]) (let B = \ (i : I) → outS (A i)) → ∀ {ψ} (u : I → Partial ψ (B i0)) → (u0 : B i0 [ ψ ↦ u i0 ]) → (transp B φ (hcomp u (outS u0)) ≡ hcomp (\ i o → transp B φ (u i o)) (transp B φ (outS u0))) [ ψ ↦ (\ { (ψ = i1) → (\ i → transp B φ (u i1 1=1))}) ] transp-hcomp φ A u u0 = inS (sym (outS (hcomp-unique ((\ i o → transp B φ (u i o))) (inS (transp B φ (outS u0))) \ i → inS (transp B φ (hfill u u0 i))))) where B = \ (i : I) → outS (A i) hcomp-cong : ∀ {ℓ} {A : Set ℓ} {φ} → (u : I → Partial φ A) → (u0 : A [ φ ↦ u i0 ]) → (u' : I → Partial φ A) → (u0' : A [ φ ↦ u' i0 ]) → (ueq : ∀ i → PartialP φ (\ o → u i o ≡ u' i o)) → (outS u0 ≡ outS u0') [ φ ↦ (\ { (φ = i1) → ueq i0 1=1}) ] → (hcomp u (outS u0) ≡ hcomp u' (outS u0')) [ φ ↦ (\ { (φ = i1) → ueq i1 1=1 }) ] hcomp-cong u u0 u' u0' ueq 0eq = inS (\ j → hcomp (\ i o → ueq i o j) (outS 0eq j)) squeezeSq≡ : ∀{w x y z : A} → (p : w ≡ y) (q : w ≡ x) (r : y ≡ z) (s : x ≡ z) → (q ≡ p ∙∙ r ∙∙ sym s) ≡ (Square p q r s) squeezeSq≡ p q r s k = Square (λ j → p (j ∧ k)) q (λ j → doubleCompPath-filler p r (sym s) j (~ k)) (λ j → s (j ∧ k))
{ "alphanum_fraction": 0.4213435374, "avg_line_length": 41.554770318, "ext": "agda", "hexsha": "fa30ebef834f7a7572e3238d04ade87e3ae3ca9b", "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": "7fd336c6d31a6e6d58a44114831aacd63f422545", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "cj-xu/cubical", "max_forks_repo_path": "Cubical/Foundations/GroupoidLaws.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "7fd336c6d31a6e6d58a44114831aacd63f422545", "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": "cj-xu/cubical", "max_issues_repo_path": "Cubical/Foundations/GroupoidLaws.agda", "max_line_length": 124, "max_stars_count": null, "max_stars_repo_head_hexsha": "7fd336c6d31a6e6d58a44114831aacd63f422545", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "cj-xu/cubical", "max_stars_repo_path": "Cubical/Foundations/GroupoidLaws.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 5320, "size": 11760 }
open import Agda.Builtin.Nat open import Agda.Builtin.Bool -- A function that requires call-by-need f : Nat → Nat → Nat f a 0 = a f a (suc b) = f (a + a) b even : Nat → Bool even n = mod-helper 0 1 n 1 == 0 data ⊥ : Set where record ⊤ : Set where IsTrue : Bool → Set IsTrue false = ⊥ IsTrue true = ⊤ -- Previously we reverted to slow reduce in when positivity checking. f-even : IsTrue (even (f 1 64)) f-even = _
{ "alphanum_fraction": 0.6455399061, "avg_line_length": 18.5217391304, "ext": "agda", "hexsha": "89a32f8a5133a3c4d4cfbf9588e07e1f252d55b6", "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/Issue3050.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/Issue3050.agda", "max_line_length": 69, "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/Issue3050.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": 148, "size": 426 }
{-# OPTIONS --safe --experimental-lossy-unification #-} module Cubical.Homotopy.Group.Pi4S3.S3PushoutIso2 where open import Cubical.Homotopy.Group.Base open import Cubical.Homotopy.Group.Pi4S3.S3PushoutIso open import Cubical.Foundations.Prelude open import Cubical.Foundations.Pointed open import Cubical.Foundations.Isomorphism open import Cubical.Foundations.Equiv open import Cubical.Foundations.Univalence open import Cubical.Data.Nat open import Cubical.Algebra.Group open import Cubical.Algebra.Group.Morphisms open import Cubical.Algebra.Group.MorphismProperties open import Cubical.Algebra.Group.GroupPath open import Cubical.HITs.Sn open import Cubical.HITs.Susp renaming (toSusp to σ) open import Cubical.HITs.Pushout open import Cubical.HITs.Truncation renaming (rec to trRec ; elim to trElim ; elim2 to trElim2 ; map to trMap) open import Cubical.HITs.S2 ≡→Pushout⋁↪fold⋁≡ : ∀ {ℓ} {A B : Pointed ℓ} → (A ≡ B) → Pushout⋁↪fold⋁∙ A ≡ Pushout⋁↪fold⋁∙ B ≡→Pushout⋁↪fold⋁≡ = cong Pushout⋁↪fold⋁∙ private ∙≃→π≅ : ∀ {ℓ} {A B : Pointed ℓ} (n : ℕ) → (e : typ A ≃ typ B) → fst e (pt A) ≡ pt B → GroupEquiv (πGr n A) (πGr n B) ∙≃→π≅ {A = A} {B = B} n e = EquivJ (λ A e → (a : A) → fst e a ≡ pt B → GroupEquiv (πGr n (A , a)) (πGr n B)) (λ b p → J (λ b p → GroupEquiv (πGr n (typ B , b)) (πGr n B)) idGroupEquiv (sym p)) e (pt A) {- π₄(S³) ≅ π₃((S² × S²) ⊔ᴬ S²) where A = S² ∨ S² -} π₄S³≅π₃PushS² : GroupIso (πGr 3 (S₊∙ 3)) (πGr 2 (Pushout⋁↪fold⋁∙ (S₊∙ 2))) π₄S³≅π₃PushS² = compGroupIso (GroupEquiv→GroupIso (∙≃→π≅ 3 (compEquiv (isoToEquiv (invIso IsoS³S3)) S³≃SuspS²) refl)) (compGroupIso (invGroupIso (GrIso-πΩ-π 2)) (compGroupIso (πTruncGroupIso 2) (compGroupIso (GroupEquiv→GroupIso (∙≃→π≅ {B = _ , ∣ inl (base , base) ∣ₕ} 2 (isoToEquiv IsoΩ∥SuspS²∥₅∥Pushout⋁↪fold⋁S²∥₅) encode∙)) (compGroupIso (invGroupIso (πTruncGroupIso 2)) (GroupEquiv→GroupIso (invEq (GroupPath _ _) (cong (πGr 2) (cong Pushout⋁↪fold⋁∙ (ua∙ S²≃SuspS¹ refl))))))))) where encode∙ : encode ∣ north ∣ refl ≡ ∣ inl (base , base) ∣ encode∙ = transportRefl _
{ "alphanum_fraction": 0.6323268206, "avg_line_length": 33.1176470588, "ext": "agda", "hexsha": "36f320262a1948d3ed37463ec44ce8ae371f2f3a", "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/Homotopy/Group/Pi4S3/S3PushoutIso2.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/Homotopy/Group/Pi4S3/S3PushoutIso2.agda", "max_line_length": 72, "max_stars_count": 1, "max_stars_repo_head_hexsha": "58c0b83bb0fed0dc683f3d29b1709effe51c1689", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "thomas-lamiaux/cubical", "max_stars_repo_path": "Cubical/Homotopy/Group/Pi4S3/S3PushoutIso2.agda", "max_stars_repo_stars_event_max_datetime": "2021-10-31T17:32:49.000Z", "max_stars_repo_stars_event_min_datetime": "2021-10-31T17:32:49.000Z", "num_tokens": 938, "size": 2252 }
-- 2012-03-08 Andreas module NoTerminationCheck where postulate A : Set -- Skipping a single definition: before type signature {-# NO_TERMINATION_CHECK #-} a : A a = a -- Skipping a single definition: before first clause b : A {-# NO_TERMINATION_CHECK #-} b = b -- Skipping an old-style mutual block (placed before) {-# NO_TERMINATION_CHECK #-} mutual c : A c = d d : A d = c -- Skipping an old-style mutual block (placed within) mutual {-# NO_TERMINATION_CHECK #-} c1 : A c1 = d1 d1 : A d1 = c1 mutual c2 : A {-# NO_TERMINATION_CHECK #-} c2 = d2 d2 : A d2 = c2 mutual c3 : A c3 = d3 {-# NO_TERMINATION_CHECK #-} d3 : A d3 = c3 -- Skipping a new-style mutual block {-# NO_TERMINATION_CHECK #-} e : A f : A e = f f = e -- Skipping a new-style mutual block, variant 2 g : A {-# NO_TERMINATION_CHECK #-} h : A g = h h = g -- Skipping a new-style mutual block, variant 4 i : A j : A i = j {-# NO_TERMINATION_CHECK #-} j = i private {-# NO_TERMINATION_CHECK #-} k : A k = k abstract {-# NO_TERMINATION_CHECK #-} l : A l = l
{ "alphanum_fraction": 0.614402917, "avg_line_length": 11.9239130435, "ext": "agda", "hexsha": "40bf6730005c89eb43ff3f09ed9a44f1ef646a7d", "lang": "Agda", "max_forks_count": 1, "max_forks_repo_forks_event_max_datetime": "2022-03-12T11:35:18.000Z", "max_forks_repo_forks_event_min_datetime": "2022-03-12T11:35:18.000Z", "max_forks_repo_head_hexsha": "70c8a575c46f6a568c7518150a1a64fcd03aa437", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "masondesu/agda", "max_forks_repo_path": "test/succeed/NoTerminationCheck.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "70c8a575c46f6a568c7518150a1a64fcd03aa437", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "masondesu/agda", "max_issues_repo_path": "test/succeed/NoTerminationCheck.agda", "max_line_length": 54, "max_stars_count": 1, "max_stars_repo_head_hexsha": "477c8c37f948e6038b773409358fd8f38395f827", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "larrytheliquid/agda", "max_stars_repo_path": "test/succeed/NoTerminationCheck.agda", "max_stars_repo_stars_event_max_datetime": "2018-10-10T17:08:44.000Z", "max_stars_repo_stars_event_min_datetime": "2018-10-10T17:08:44.000Z", "num_tokens": 371, "size": 1097 }
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.HITs.Ints.HAEquivInt where open import Cubical.HITs.Ints.HAEquivInt.Base public
{ "alphanum_fraction": 0.7567567568, "avg_line_length": 24.6666666667, "ext": "agda", "hexsha": "e03d703078674afed1223fcb47425846379e8d45", "lang": "Agda", "max_forks_count": 1, "max_forks_repo_forks_event_max_datetime": "2021-11-22T02:02:01.000Z", "max_forks_repo_forks_event_min_datetime": "2021-11-22T02:02:01.000Z", "max_forks_repo_head_hexsha": "fd8059ec3eed03f8280b4233753d00ad123ffce8", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "dan-iel-lee/cubical", "max_forks_repo_path": "Cubical/HITs/Ints/HAEquivInt.agda", "max_issues_count": 1, "max_issues_repo_head_hexsha": "fd8059ec3eed03f8280b4233753d00ad123ffce8", "max_issues_repo_issues_event_max_datetime": "2022-01-27T02:07:48.000Z", "max_issues_repo_issues_event_min_datetime": "2022-01-27T02:07:48.000Z", "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "dan-iel-lee/cubical", "max_issues_repo_path": "Cubical/HITs/Ints/HAEquivInt.agda", "max_line_length": 52, "max_stars_count": null, "max_stars_repo_head_hexsha": "fd8059ec3eed03f8280b4233753d00ad123ffce8", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "dan-iel-lee/cubical", "max_stars_repo_path": "Cubical/HITs/Ints/HAEquivInt.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 44, "size": 148 }
module plfa-exercises.weird where open import Data.Nat using (ℕ; zero; suc; _+_; _*_) open import Data.Bool.Base using (Bool; true; false; _∧_; _∨_; not) import Relation.Binary.PropositionalEquality as Eq open Eq using (_≡_; refl; sym; trans; cong; subst) data ℕ∨Bool : Set where N B : ℕ∨Bool -- Idea taken from paper: Fractional Types by Chao-Hong Chen et al. ⟦_⟧ : ℕ∨Bool → Set ⟦ N ⟧ = ℕ ⟦ B ⟧ = Bool manyinputs : {a : ℕ∨Bool} → ⟦ a ⟧ → ⟦ a ⟧ manyinputs {N} n = suc n manyinputs {B} b = not b _ : manyinputs 6 ≡ 7 _ = refl _ : manyinputs true ≡ false -- WOW!! _ = refl open import Relation.Nullary using (¬_) open import Data.Unit using (⊤; tt) open import Data.Empty using (⊥; ⊥-elim) -- Actually this should use "isomorphisms" not mere 'iff' between propositions. -- https://agda.github.io/agda-stdlib/v1.1/Function.Inverse.html#2229 open import plfa.part1.Isomorphism using (_⇔_) lemma₁ : ¬ ⊤ → ⊥ lemma₁ ¬⊤ = ¬⊤ tt lemma₂ : ⊥ → ¬ ⊤ lemma₂ () -- I can easily prove this!! Which is not the same as ¬ ⊤ same as ⊥, -- but ¬ ⊤ iff ⊥, where ⊤ and ⊥ are predicates prf₀ : (¬ ⊤) ⇔ ⊥ prf₀ = record { to = lemma₁ ; from = lemma₂ } -- But how to prove the following? --prf : ¬ ⊤ ≡ ⊥ --prf = ? -- seems to require extensionality and iso-is-≡, or cubical, see https://stackoverflow.com/a/58912530 open import Level using (0ℓ) open import Agda.Primitive using (lsuc) open import Relation.Binary.Definitions using (Substitutive; _Respects_; _⟶_Respects_) prf₂ : ¬ (⊤ ≡ ⊥) -- same as: ⊤ ≢ ⊥ prf₂ ⊤≡⊥ = subst (λ x → x) ⊤≡⊥ tt -- We don't need to give the implicit parameters but doing so lets us look -- inside of the definitions and how they get reduced to other terms --prf₂ ⊤≡⊥ = subst {A = Set} {ℓ = 0ℓ} (λ x → x) ⊤≡⊥ tt -- `subst` has type: {a : Level} {A : Set a} {ℓ : Level} → Substitutive _≡_ ℓ -- `subst {A = Set}` has type: {ℓ : Level} → Substitutive _≡_ ℓ -- `subst {A = Set} {ℓ = 0ℓ}` has type: Substitutive _≡_ 0ℓ -- actually it has type: Substitutive {A = Set} _≡_ 0ℓ -- `Substitutive {A = Set} _≡_ 0ℓ` which reduces to (P : Set → Set) {x y : Set} → x ≡ y → P x → P y -- which means that the type of -- `subst {A = Set} {ℓ = 0ℓ}` -- is -- (P : Set → Set) {x y : Set} → x ≡ y → P x → P y -- thus, the type of -- `subst {A = Set} {ℓ = 0ℓ} (λ x → x)` (*) -- is -- {x y : Set} → x ≡ y → P x → P y -- Note: careful, Agda tells us that the type of (*) is: -- (λ x → x) Respects _≡_ -- but it is actually: -- _Respects_ {A = Set} (λ x → x) _≡_ -- -- From reading the code: -- _Respects_ {A = Set} (λ x → x) _≡_ (**) -- reduces first to: -- _⟶_Respects_ {A = Set} (λ x → x) (λ x → x) _≡_ -- -- There is even more. (**) actually has some implicit parameters, here they are -- _Respects_ {A = Set} {ℓ₁ = 0ℓ} {ℓ₂ = lsuc 0ℓ} (λ x → x) _≡_ -- -- LESSON LEARNT: Implicit arguments are cool because you don't need to give -- them, Agda can generally infer them from context which makes code to look -- prettier but excesively harder to read -- -- Other stuff: -- `Substitutive {A = Set} _≡_ 0ℓ` reduces to (P : Set → Set) {x y : Set} → x ≡ y → P x → P y -- `Substitutive {A = Set} _≡_ (lsuc 0ℓ)` reduces to (P : Set → Set₁) {x y : Set} → x ≡ y → P x → P y
{ "alphanum_fraction": 0.6076899031, "avg_line_length": 33.6736842105, "ext": "agda", "hexsha": "29e17f5ae4fe56e4186e23a0f37673465d99f18c", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "a432faf1b340cb379190a2f2b11b997b02d1cd8d", "max_forks_repo_licenses": [ "CC0-1.0" ], "max_forks_repo_name": "helq/old_code", "max_forks_repo_path": "proglangs-learning/Agda/plfa-exercises/weird.agda", "max_issues_count": 4, "max_issues_repo_head_hexsha": "a432faf1b340cb379190a2f2b11b997b02d1cd8d", "max_issues_repo_issues_event_max_datetime": "2021-06-07T15:39:48.000Z", "max_issues_repo_issues_event_min_datetime": "2020-03-10T19:20:21.000Z", "max_issues_repo_licenses": [ "CC0-1.0" ], "max_issues_repo_name": "helq/old_code", "max_issues_repo_path": "proglangs-learning/Agda/plfa-exercises/weird.agda", "max_line_length": 112, "max_stars_count": null, "max_stars_repo_head_hexsha": "a432faf1b340cb379190a2f2b11b997b02d1cd8d", "max_stars_repo_licenses": [ "CC0-1.0" ], "max_stars_repo_name": "helq/old_code", "max_stars_repo_path": "proglangs-learning/Agda/plfa-exercises/weird.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 1267, "size": 3199 }
open import Relation.Binary open import Level module Experiments.Infer {c ℓ₁ ℓ₂}(PO : Preorder c ℓ₁ ℓ₂) where open Preorder PO renaming (_∼_ to _⊑_) record IsIncluded (W W' : Carrier) : Set ℓ₂ where field is-included : W ⊑ W' record IsIncludedOnce (W W' : Carrier) : Set ℓ₂ where field is-included-once : W ⊑ W' instance is-included-refl : ∀ {W} → IsIncluded W W is-included-refl = record { is-included = refl } is-included-step : ∀ {W W' W''} ⦃ p : IsIncludedOnce W W' ⦄ ⦃ q : IsIncluded W' W'' ⦄ → IsIncluded W W'' is-included-step {{p = record { is-included-once = p }}} {{record { is-included = q }}} = record { is-included = trans p q } -- typeclass for world-indexed things that support weakening record Weakenable {i}(I : Carrier → Set i) : Set (i ⊔ ℓ₂ ⊔ c) where field weaken : ∀ {W W'} → W ⊑ W' → I W → I W' wk : ∀ {W W'} → I W → ⦃ p : IsIncluded W W' ⦄ → I W' wk x ⦃ record { is-included = p } ⦄ = weaken p x ISet = Carrier → Set module Monad (M : ISet → ISet) (ret : ∀ {P : ISet}{c} → P c → M P c) (bind : ∀ {P Q : ISet}{c} → (∀ {c'} ⦃ sub : IsIncludedOnce c c' ⦄ → P c' → M Q c') → M P c → M Q c) (V : ISet) (wV : Weakenable V) (get : ∀ {c} → M V c) (App : ∀ {c} → V c → V c → V c) where instance weakenable-val = wV open Weakenable ⦃...⦄ {- uncomment to see the compiler error -} -- test : ∀ {c} → M V c -- test = bind (λ x → bind (λ y → ret (App (wk x) (wk y))) get) get
{ "alphanum_fraction": 0.5590817016, "avg_line_length": 27.9433962264, "ext": "agda", "hexsha": "6c7e13ddb37f327d7e2c793cc2c67cfb274414c7", "lang": "Agda", "max_forks_count": 1, "max_forks_repo_forks_event_max_datetime": "2021-12-28T17:38:05.000Z", "max_forks_repo_forks_event_min_datetime": "2021-12-28T17:38:05.000Z", "max_forks_repo_head_hexsha": "0c096fea1716d714db0ff204ef2a9450b7a816df", "max_forks_repo_licenses": [ "Apache-2.0" ], "max_forks_repo_name": "metaborg/mj.agda", "max_forks_repo_path": "src/Experiments/Infer.agda", "max_issues_count": 1, "max_issues_repo_head_hexsha": "0c096fea1716d714db0ff204ef2a9450b7a816df", "max_issues_repo_issues_event_max_datetime": "2020-10-14T13:41:58.000Z", "max_issues_repo_issues_event_min_datetime": "2019-01-13T13:03:47.000Z", "max_issues_repo_licenses": [ "Apache-2.0" ], "max_issues_repo_name": "metaborg/mj.agda", "max_issues_repo_path": "src/Experiments/Infer.agda", "max_line_length": 106, "max_stars_count": 10, "max_stars_repo_head_hexsha": "0c096fea1716d714db0ff204ef2a9450b7a816df", "max_stars_repo_licenses": [ "Apache-2.0" ], "max_stars_repo_name": "metaborg/mj.agda", "max_stars_repo_path": "src/Experiments/Infer.agda", "max_stars_repo_stars_event_max_datetime": "2021-09-24T08:02:33.000Z", "max_stars_repo_stars_event_min_datetime": "2017-11-17T17:10:36.000Z", "num_tokens": 583, "size": 1481 }
{-# OPTIONS --cubical --safe #-} module Data.List.Indexing where open import Data.List.Base open import Data.Fin open import Prelude infixl 6 _!_ _!_ : (xs : List A) → Fin (length xs) → A (x ∷ xs) ! f0 = x (x ∷ xs) ! fs i = xs ! i tabulate : ∀ n → (Fin n → A) → List A tabulate zero f = [] tabulate (suc n) f = f f0 ∷ tabulate n (f ∘ fs)
{ "alphanum_fraction": 0.6023391813, "avg_line_length": 20.1176470588, "ext": "agda", "hexsha": "a2a73e8d007d63c893672d1cc2d396788f73dd9c", "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/List/Indexing.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/List/Indexing.agda", "max_line_length": 47, "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/List/Indexing.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": 128, "size": 342 }
------------------------------------------------------------------------ -- The Agda standard library -- -- Properties of the extensional sublist relation over setoid equality. ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Relation.Binary hiding (Decidable) module Data.List.Relation.Binary.Subset.Setoid.Properties where open import Data.Bool.Base using (Bool; true; false) open import Data.List.Base open import Data.List.Relation.Unary.Any using (here; there) import Data.List.Membership.Setoid as Membership open import Data.List.Membership.Setoid.Properties import Data.List.Relation.Binary.Subset.Setoid as Sublist import Data.List.Relation.Binary.Equality.Setoid as Equality open import Relation.Nullary using (¬_; does) open import Relation.Unary using (Pred; Decidable) import Relation.Binary.Reasoning.Preorder as PreorderReasoning open Setoid using (Carrier) ------------------------------------------------------------------------ -- Relational properties module _ {a ℓ} (S : Setoid a ℓ) where open Equality S open Sublist S open Membership S ⊆-reflexive : _≋_ ⇒ _⊆_ ⊆-reflexive xs≋ys = ∈-resp-≋ S xs≋ys ⊆-refl : Reflexive _⊆_ ⊆-refl x∈xs = x∈xs ⊆-trans : Transitive _⊆_ ⊆-trans xs⊆ys ys⊆zs x∈xs = ys⊆zs (xs⊆ys x∈xs) ⊆-isPreorder : IsPreorder _≋_ _⊆_ ⊆-isPreorder = record { isEquivalence = ≋-isEquivalence ; reflexive = ⊆-reflexive ; trans = ⊆-trans } ⊆-preorder : Preorder _ _ _ ⊆-preorder = record { isPreorder = ⊆-isPreorder } -- Reasoning over subsets module ⊆-Reasoning where private module Base = PreorderReasoning ⊆-preorder open Base public hiding (step-∼; step-≈; step-≈˘) renaming (_≈⟨⟩_ to _≋⟨⟩_) infix 2 step-⊆ step-≋ step-≋˘ infix 1 step-∈ step-∈ : ∀ x {xs ys} → xs IsRelatedTo ys → x ∈ xs → x ∈ ys step-∈ x xs⊆ys x∈xs = (begin xs⊆ys) x∈xs step-⊆ = Base.step-∼ step-≋ = Base.step-≈ step-≋˘ = Base.step-≈˘ syntax step-∈ x xs⊆ys x∈xs = x ∈⟨ x∈xs ⟩ xs⊆ys syntax step-⊆ xs ys⊆zs xs⊆ys = xs ⊆⟨ xs⊆ys ⟩ ys⊆zs syntax step-≋ xs ys⊆zs xs≋ys = xs ≋⟨ xs≋ys ⟩ ys⊆zs syntax step-≋˘ xs ys⊆zs xs≋ys = xs ≋˘⟨ xs≋ys ⟩ ys⊆zs ------------------------------------------------------------------------ -- filter module _ {a p ℓ} (S : Setoid a ℓ) {P : Pred (Carrier S) p} (P? : Decidable P) where open Setoid S renaming (Carrier to A) open Sublist S filter⁺ : ∀ xs → filter P? xs ⊆ xs filter⁺ (x ∷ xs) y∈f[x∷xs] with does (P? x) ... | false = there (filter⁺ xs y∈f[x∷xs]) ... | true with y∈f[x∷xs] ... | here y≈x = here y≈x ... | there y∈f[xs] = there (filter⁺ xs y∈f[xs])
{ "alphanum_fraction": 0.5638606676, "avg_line_length": 29.0105263158, "ext": "agda", "hexsha": "c2da86a313a8d5cdb27924b0a69dd7cdc0e86125", "lang": "Agda", "max_forks_count": 1, "max_forks_repo_forks_event_max_datetime": "2021-11-04T06:54:45.000Z", "max_forks_repo_forks_event_min_datetime": "2021-11-04T06:54:45.000Z", "max_forks_repo_head_hexsha": "fb380f2e67dcb4a94f353dbaec91624fcb5b8933", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "DreamLinuxer/popl21-artifact", "max_forks_repo_path": "agda-stdlib/src/Data/List/Relation/Binary/Subset/Setoid/Properties.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "fb380f2e67dcb4a94f353dbaec91624fcb5b8933", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "DreamLinuxer/popl21-artifact", "max_issues_repo_path": "agda-stdlib/src/Data/List/Relation/Binary/Subset/Setoid/Properties.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/List/Relation/Binary/Subset/Setoid/Properties.agda", "max_stars_repo_stars_event_max_datetime": "2020-10-10T21:41:32.000Z", "max_stars_repo_stars_event_min_datetime": "2020-10-07T12:07:53.000Z", "num_tokens": 983, "size": 2756 }
postulate Ty : Set data Cxt : Set where ε : Cxt sg : (A : Ty) → Cxt _∙_ : (Γ₁ Γ₂ : Cxt) → Cxt variable Γ Γ₁ Γ₂ Δ : Cxt postulate Ren : (Δ Γ : Cxt) → Set <_,_> : (f₁ : Ren Δ Γ₁) (f₂ : Ren Δ Γ₂) → Ren Δ (Γ₁ ∙ Γ₂) <_,_> = {!!} <_,_>₁ : (f₁ : Ren Δ Γ₁) (f₂ : Ren Δ Γ₂) → Cxt → Ren Δ (Γ₁ ∙ Γ₂) < f₁ , f₂ >₁ x = {!!}
{ "alphanum_fraction": 0.4767801858, "avg_line_length": 17.9444444444, "ext": "agda", "hexsha": "73023a80060635b7444b14ba13bb89a0d50101f5", "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/Issue3166.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/Issue3166.agda", "max_line_length": 64, "max_stars_count": 1989, "max_stars_repo_head_hexsha": "7f58030124fa99dfbf8db376659416f3ad8384de", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "cruhland/agda", "max_stars_repo_path": "test/interaction/Issue3166.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": 168, "size": 323 }
------------------------------------------------------------------------ -- The Agda standard library -- -- Lists with fast append ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.DifferenceList where open import Level using (Level) open import Data.List.Base as List using (List) open import Function open import Data.Nat.Base private variable a b : Level A : Set a B : Set b ------------------------------------------------------------------------ -- Type definition and list function lifting DiffList : Set a → Set a DiffList A = List A → List A lift : (List A → List A) → (DiffList A → DiffList A) lift f xs = λ k → f (xs k) ------------------------------------------------------------------------ -- Building difference lists infixr 5 _∷_ _++_ [] : DiffList A [] = λ k → k _∷_ : A → DiffList A → DiffList A _∷_ x = lift (x List.∷_) [_] : A → DiffList A [ x ] = x ∷ [] _++_ : DiffList A → DiffList A → DiffList A xs ++ ys = λ k → xs (ys k) infixl 6 _∷ʳ_ _∷ʳ_ : DiffList A → A → DiffList A xs ∷ʳ x = λ k → xs (x List.∷ k) ------------------------------------------------------------------------ -- Conversion back and forth with List toList : DiffList A → List A toList xs = xs List.[] -- fromList xs is linear in the length of xs. fromList : List A → DiffList A fromList xs = λ k → xs ⟨ List._++_ ⟩ k ------------------------------------------------------------------------ -- Transforming difference lists -- It is OK to use List._++_ here, since map is linear in the length of -- the list anyway. map : (A → B) → DiffList A → DiffList B map f xs = λ k → List.map f (toList xs) ⟨ List._++_ ⟩ k -- concat is linear in the length of the outer list. concat : DiffList (DiffList A) → DiffList A concat xs = concat' (toList xs) where concat' : List (DiffList A) → DiffList A concat' = List.foldr _++_ [] take : ℕ → DiffList A → DiffList A take n = lift (List.take n) drop : ℕ → DiffList A → DiffList A drop n = lift (List.drop n)
{ "alphanum_fraction": 0.5014662757, "avg_line_length": 24.0705882353, "ext": "agda", "hexsha": "65723b1cf2778f827d9763d22d3787c75b20770e", "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/DifferenceList.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/DifferenceList.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/DifferenceList.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": 544, "size": 2046 }
---------------------------------------------------------------------------------- -- The contents of this file is based on the work in "Setoids in Type -- -- Theory" by Barthe et al. and Capretta's "Universal Algebra in Type Theory." -- -- -- -- See http://www.cs.ru.nl/~venanzio/publications/Setoids_JFP_2003.pdf and -- -- http://www.cs.ru.nl/~venanzio/publications/Universal_Algebra_TPHOLs_1999.pdf -- ---------------------------------------------------------------------------------- module Setoid.Total where open import Level renaming (suc to lsuc) open import Data.Product open import Relation.Relation open import Basics public open import Equality.Eq public open ParRel public open EqRel public -- Total setoids. record Setoid {l : Level} : Set (lsuc l) where constructor Setoid_,_,_ field el : Set l eq : el → el → Set l eqRpf : EqRel eq open Setoid public -- Notation for the underlying equivalence of a setoid. ⟨_⟩[_≡_] : {l : Level} → (A : Setoid {l}) → el A → el A → Set l ⟨ A ⟩[ x ≡ y ] = eq A x y -- Total empty setoids. EmptySetoid : {l : Level} → Setoid {l} EmptySetoid = record { el = ⊥-poly; eq = λ x y → x ≅ y; eqRpf = isEqRel } -- Total setoids maps. Barthe et al. calls "map." record SetoidFun {l₁ l₂ : Level} (A : Setoid {l₁}) (B : Setoid {l₂}) : Set (l₁ ⊔ l₂) where field appT : el A → el B extT : ∀ {x y} → ⟨ A ⟩[ x ≡ y ] → ⟨ B ⟩[ appT x ≡ appT y ] open SetoidFun public -- The setoid function space from A to B. Barthe et al. calls this -- "Map." SetoidFunSpace : {l₁ l₂ : Level} → Setoid {l₁} → Setoid {l₂} → Setoid {l₁ ⊔ l₂} SetoidFunSpace A B with parEqPf (eqRpf B) ... | b = record { el = SetoidFun A B; eq = λ f g → ∀ (x : el A) → ⟨ B ⟩[ appT f x ≡ appT g x ]; eqRpf = record { parEqPf = record { symPf = λ x₁ x₂ → symPf b (x₁ x₂); transPf = λ x₁ x₂ x₃ → transPf b (x₁ x₃) (x₂ x₃) }; refPf = λ x₁ → refPf (eqRpf B) } } -- Total binary setoid maps. BinSetoidFun : {l₁ l₂ l₃ : Level} → Setoid {l₁} → Setoid {l₂} → Setoid {l₃} → Set (l₁ ⊔ l₂ ⊔ l₃) BinSetoidFun A B C = SetoidFun A (SetoidFunSpace B C) -- A nice notation for composition of BMap's. _○[_]_ : {l : Level}{A B C : Setoid {l}} → el A → BinSetoidFun A B C → el B → el C f ○[ comp ] g = appT (appT comp f) g -- Setoid predicates. record Pred {l : Level} (A : Setoid {l}) : Set (lsuc l) where field -- The predicate. pf : el A → Set l -- The proof that the predicate respects equality. inv : ∀{x y} → ⟨ A ⟩[ x ≡ y ] → pf x → pf y open Pred -- Setoid Subcarriers. record Subcarrier {l : Level} (A : Setoid {l}) (P : Pred A) : Set l where field subel : el A insub : pf P subel open Subcarrier -- Subsetoids. Subsetoid : {l : Level} → (A : Setoid {l}) → (P : Pred A) → Setoid {l} Subsetoid A P with parEqPf (eqRpf A) ... | a = record { el = Subcarrier A P; eq = λ x y → ⟨ A ⟩[ subel x ≡ subel y ]; eqRpf = record { parEqPf = record { symPf = λ x₁ → symPf a x₁; transPf = λ x₁ x₂ → transPf a x₁ x₂ }; refPf = λ {x} → refPf (eqRpf A) } } -- The product of two setoids. ProductSetoid : {l₁ l₂ : Level} → Setoid {l₁} → Setoid {l₂} → Setoid {l₁ ⊔ l₂} ProductSetoid A B = record { el = (el A) × (el B); eq = ProductRel (eq A) (eq B); eqRpf = ProductRelIsEqRel (eq A) (eq B) (eqRpf A) (eqRpf B) } _●ₛ_ : {l₁ l₂ : Level} → Setoid {l₁} → Setoid {l₂} → Setoid {l₁ ⊔ l₂} A ●ₛ B = ProductSetoid A B -- Product setoid functions. ProdSetoidFun : {l₁ l₂ l₃ l₄ : Level} {A₁ : Setoid {l₁}} {B₁ : Setoid {l₂}} {A₂ : Setoid {l₃}} {B₂ : Setoid {l₄}} → (F₁ : SetoidFun A₁ A₂) → (F₂ : SetoidFun B₁ B₂) → SetoidFun (A₁ ●ₛ B₁) (A₂ ●ₛ B₂) ProdSetoidFun F₁ F₂ = record { appT = λ x → appT F₁ (proj₁ x) , appT F₂ (proj₂ x); extT = λ x₁ → extT F₁ (proj₁ x₁) , extT F₂ (proj₂ x₁) } -- Binary product setoid functions. BinProdSetoidFun : {l₁ l₂ l₃ l₄ : Level} {A₁ : Setoid {l₁}} {B₁ : Setoid {l₂}} {C₁ : Setoid {l₃}} {A₂ : Setoid {l₄}} {B₂ : Setoid {l₄}} {C₂ : Setoid {l₄}} → (F₁ : BinSetoidFun A₁ B₁ C₁) → (F₂ : BinSetoidFun A₂ B₂ C₂) → BinSetoidFun (A₁ ●ₛ A₂) (B₁ ●ₛ B₂) (C₁ ●ₛ C₂) BinProdSetoidFun F₁ F₂ = record { appT = λ x → ProdSetoidFun (appT F₁ (proj₁ x)) (appT F₂ (proj₂ x)); extT = λ {a b} c d → (extT F₁ (proj₁ c) (proj₁ d)) , (extT F₂ (proj₂ c) (proj₂ d)) } _●b_ : {l₁ l₂ l₃ l₄ : Level} {A₁ : Setoid {l₁}} {B₁ : Setoid {l₂}} {C₁ : Setoid {l₃}} {A₂ : Setoid {l₄}} {B₂ : Setoid {l₄}} {C₂ : Setoid {l₄}} → (F₁ : BinSetoidFun A₁ B₁ C₁) → (F₂ : BinSetoidFun A₂ B₂ C₂) → BinSetoidFun (A₁ ●ₛ A₂) (B₁ ●ₛ B₂) (C₁ ●ₛ C₂) F₁ ●b F₂ = BinProdSetoidFun F₁ F₂ -- Next we define a relaxed notion of a subsetoid where the predicate -- does not have to be invariant on the equality. ↓Setoid : {l : Level} → (S : Setoid {l}) → (P : el S → Set l) → Setoid {l} ↓Setoid S P = record { el = eq S ↓ P; eq = λ f g → ⟨ S ⟩[ proj₁ f ≡ proj₁ g ]; eqRpf = ↓EqRel (eq S) P (eqRpf S)} -- Restricted setoid functions. ↓SetoidFun : {l : Level} {S₁ S₂ : Setoid {l}} {P₁ : el S₁ → Set l} {P₂ : el S₂ → Set l} → (F : SetoidFun S₁ S₂) → ({f : el S₁} → (P₁ f) → P₂ (appT F f)) → SetoidFun (↓Setoid S₁ P₁) (↓Setoid S₂ P₂) ↓SetoidFun {l}{S₁}{S₂}{P₁}{P₂} F pf = record { appT = λ x₁ → appT F (proj₁ x₁) , pf {proj₁ x₁} (proj₂ x₁); extT = λ {x}{y} x₂ → extT F x₂ } -- Binary restricted setoid functions. ↓BinSetoidFun : {l : Level} {S₁ S₂ S₃ : Setoid {l}} {P₁ : el S₁ → Set l} {P₂ : el S₂ → Set l} {P₃ : el S₃ → Set l} → (F : BinSetoidFun S₁ S₂ S₃) → ({f : el S₁}{g : el S₂} → (P₁ f) → (P₂ g) → P₃ (f ○[ F ] g)) → BinSetoidFun (↓Setoid S₁ P₁) (↓Setoid S₂ P₂) (↓Setoid S₃ P₃) ↓BinSetoidFun {l}{S₁}{S₂}{S₃}{P₁}{P₂}{P₃} F pf = record { appT = λ f → ↓SetoidFun (appT F (proj₁ f)) (pf (proj₂ f)); extT = λ x₁ x₂ → extT F x₁ (proj₁ x₂) }
{ "alphanum_fraction": 0.4974459135, "avg_line_length": 38.4739884393, "ext": "agda", "hexsha": "efa26a39d6a040b8dd4a97159fc0fcb0de1fdc56", "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/Setoid/Total.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/Setoid/Total.agda", "max_line_length": 118, "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/Setoid/Total.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 2441, "size": 6656 }
{-# OPTIONS --safe --experimental-lossy-unification #-} module Cubical.Algebra.Polynomials.Multivariate.EquivCarac.Poly0-A where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Isomorphism open import Cubical.Foundations.HLevels open import Cubical.Data.Nat renaming (_+_ to _+n_; _·_ to _·n_) open import Cubical.Data.Vec open import Cubical.Algebra.DirectSum.DirectSumHIT.Base open import Cubical.Algebra.Ring open import Cubical.Algebra.CommRing open import Cubical.Algebra.CommRing.Instances.Polynomials.MultivariatePoly private variable ℓ : Level module Equiv-Poly0-A (Acr@(A , Astr) : CommRing ℓ) where private PA = PolyCommRing Acr 0 open CommRingStr ----------------------------------------------------------------------------- -- Equivalence Poly0→A : Poly Acr 0 → A Poly0→A = DS-Rec-Set.f _ _ _ _ (is-set Astr) (0r Astr) (λ v a → a) (_+_ Astr) (+Assoc Astr) (+IdR Astr) (+Comm Astr) (λ _ → refl) λ _ a b → refl A→Poly0 : A → Poly Acr 0 A→Poly0 a = base [] a e-sect : (a : A) → Poly0→A (A→Poly0 a) ≡ a e-sect a = refl e-retr : (P : Poly Acr 0) → A→Poly0 (Poly0→A P) ≡ P e-retr = DS-Ind-Prop.f _ _ _ _ (λ _ → trunc _ _) (base-neutral []) (λ { [] a → refl }) λ {U V} ind-U ind-V → (sym (base-add _ _ _)) ∙ (cong₂ (snd PA ._+_ ) ind-U ind-V) ----------------------------------------------------------------------------- -- Ring homomorphism Poly0→A-pres1 : Poly0→A (snd PA .1r) ≡ 1r Astr Poly0→A-pres1 = refl Poly0→A-pres+ : (P Q : Poly Acr 0) → Poly0→A (snd PA ._+_ P Q) ≡ Astr ._+_ (Poly0→A P) (Poly0→A Q) Poly0→A-pres+ P Q = refl Poly0→A-pres· : (P Q : Poly Acr 0) → Poly0→A ( snd PA ._·_ P Q) ≡ Astr ._·_ (Poly0→A P) (Poly0→A Q) Poly0→A-pres· = DS-Ind-Prop.f _ _ _ _ (λ _ → isPropΠ λ _ → is-set Astr _ _) (λ Q → sym (RingTheory.0LeftAnnihilates (CommRing→Ring Acr) (Poly0→A Q))) (λ v a → DS-Ind-Prop.f _ _ _ _ (λ _ → is-set Astr _ _) (sym (RingTheory.0RightAnnihilates (CommRing→Ring Acr) (Poly0→A (base v a)))) (λ v' a' → refl) λ {U V} ind-U ind-V → (cong₂ (Astr ._+_) ind-U ind-V) ∙ sym (·DistR+ Astr _ _ _)) λ {U V} ind-U ind-V Q → (cong₂ (Astr ._+_) (ind-U Q) (ind-V Q)) ∙ sym (·DistL+ Astr _ _ _) ----------------------------------------------------------------------------- -- Ring Equivalence module _ (A' : CommRing ℓ) where open Equiv-Poly0-A A' CRE-Poly0-A : CommRingEquiv (PolyCommRing A' 0) A' fst CRE-Poly0-A = isoToEquiv is where is : Iso (Poly A' 0) (A' .fst) Iso.fun is = Poly0→A Iso.inv is = A→Poly0 Iso.rightInv is = e-sect Iso.leftInv is = e-retr snd CRE-Poly0-A = makeIsRingHom Poly0→A-pres1 Poly0→A-pres+ Poly0→A-pres·
{ "alphanum_fraction": 0.5300878972, "avg_line_length": 32.152173913, "ext": "agda", "hexsha": "2cc6f3c0b03a5e1578eab6a2ab3437494df8102e", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "58c0b83bb0fed0dc683f3d29b1709effe51c1689", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "thomas-lamiaux/cubical", "max_forks_repo_path": "Cubical/Algebra/Polynomials/Multivariate/EquivCarac/Poly0-A.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "58c0b83bb0fed0dc683f3d29b1709effe51c1689", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "thomas-lamiaux/cubical", "max_issues_repo_path": "Cubical/Algebra/Polynomials/Multivariate/EquivCarac/Poly0-A.agda", "max_line_length": 111, "max_stars_count": null, "max_stars_repo_head_hexsha": "58c0b83bb0fed0dc683f3d29b1709effe51c1689", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "thomas-lamiaux/cubical", "max_stars_repo_path": "Cubical/Algebra/Polynomials/Multivariate/EquivCarac/Poly0-A.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 980, "size": 2958 }
-- Andreas, 2017-07-28, issue #1077 -- Agda's reconstruction of the top-level module can be confusing -- in case the user puts some illegal declarations before the -- top level module in error. -- Thus, Agda now rejects the following if the anon. module is omitted. -- If the user writes the anon. module, it should be accepted, -- (even if it looks stupid in this case). module _ where foo = Set module Issue1077 where bar = Set -- Should be accepted.
{ "alphanum_fraction": 0.7251082251, "avg_line_length": 23.1, "ext": "agda", "hexsha": "90435eba182009fcb69b6a55d04cc5052861388a", "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/Issue1077.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/Issue1077.agda", "max_line_length": 71, "max_stars_count": 1989, "max_stars_repo_head_hexsha": "ed8ac6f4062ea8a20fa0f62d5db82d4e68278338", "max_stars_repo_licenses": [ "BSD-3-Clause" ], "max_stars_repo_name": "shlevy/agda", "max_stars_repo_path": "test/Succeed/Issue1077.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": 116, "size": 462 }
module DefinitionalEquality where postulate _≡_ : {A B : Set} -> A -> B -> Set refl-≡ : {A : Set}{x : A} -> x ≡ x subst-≡ : {A : Set}{x y : A}(C : A -> Set) -> x ≡ y -> C y -> C x subst-≡¹ : {A : Set}{x y : A}(C : A -> Set1) -> x ≡ y -> C y -> C x subst-≡' : {A B : Set}{x : A}{y : B}(C : {X : Set} -> X -> Set) -> x ≡ y -> C y -> C x app-≡₀ : {A₁ A₂ : Set}{B₁ : A₁ -> Set}{B₂ : A₂ -> Set} {f : (x : A₁) -> B₁ x}{g : (x : A₂) -> B₂ x}{a₁ : A₁}{a₂ : A₂} -> f ≡ g -> a₁ ≡ a₂ -> f a₁ ≡ g a₂ η-≡ : {A₁ A₂ : Set}{B₁ : A₁ -> Set}{B₂ : A₂ -> Set} {f₁ : (x : A₁) -> B₁ x}{f₂ : (x : A₂) -> B₂ x} -> ((x : A₁)(y : A₂) -> x ≡ y -> f₁ x ≡ f₂ y) -> f₁ ≡ f₂ -- Substitution is a no-op subst-≡-identity : {A : Set}{x y : A}(C : A -> Set)(p : x ≡ y)(cy : C y) -> subst-≡ C p cy ≡ cy cong-≡ : {A B : Set}{x y : A}(f : A -> B)(p : x ≡ y) -> f x ≡ f y cong-≡ {_}{_}{_}{y} f p = subst-≡ (\z -> f z ≡ f y) p refl-≡ cong-≡' : {A : Set}{B : A -> Set}{x y : A}(f : (z : A) -> B z)(p : x ≡ y) -> f x ≡ f y cong-≡' {_}{_}{_}{y} f p = subst-≡ (\z -> f z ≡ f y) p refl-≡ cong₂-≡' : {A : Set}{B : A -> Set}{C : (x : A) -> B x -> Set} {x y : A}{z : B x}{w : B y}(f : (x : A)(z : B x) -> C x z) -> x ≡ y -> z ≡ w -> f x z ≡ f y w cong₂-≡' f xy zw = app-≡₀ (cong-≡' f xy) zw trans-≡ : {A B C : Set}(x : A)(y : B)(z : C) -> x ≡ y -> y ≡ z -> x ≡ z trans-≡ x y z xy yz = subst-≡' (\w -> w ≡ z) xy yz postulate _≡₁_ : {A B : Set1} -> A -> B -> Set1 refl-≡₁ : {A : Set1}{x : A} -> x ≡₁ x subst-≡₁ : {A : Set1}{x y : A}(C : A -> Set1) -> x ≡₁ y -> C y -> C x subst-≡₁' : {A B : Set1}{x : A}{y : B}(C : {X : Set1} -> X -> Set1) -> x ≡₁ y -> C y -> C x -- Substitution is a no-op subst-≡₁-identity : {A : Set1}{x y : A}(C : A -> Set1)(p : x ≡₁ y)(cy : C y) -> subst-≡₁ C p cy ≡₁ cy app-≡₁ : {A₁ A₂ : Set1}{B₁ : A₁ -> Set1}{B₂ : A₂ -> Set1} {f : (x : A₁) -> B₁ x}{g : (x : A₂) -> B₂ x}{a₁ : A₁}{a₂ : A₂} -> f ≡₁ g -> a₁ ≡₁ a₂ -> f a₁ ≡₁ g a₂ app-≡₁⁰ : {A₁ A₂ : Set}{B₁ : A₁ -> Set1}{B₂ : A₂ -> Set1} {f : (x : A₁) -> B₁ x}{g : (x : A₂) -> B₂ x}{a₁ : A₁}{a₂ : A₂} -> f ≡₁ g -> a₁ ≡ a₂ -> f a₁ ≡₁ g a₂ η-≡₁ : {A₁ A₂ : Set1}{B₁ : A₁ -> Set1}{B₂ : A₂ -> Set1} {f₁ : (x : A₁) -> B₁ x}{f₂ : (x : A₂) -> B₂ x} -> ((x : A₁)(y : A₂) -> x ≡₁ y -> f₁ x ≡₁ f₂ y) -> f₁ ≡₁ f₂ η-≡₁⁰ : {A₁ A₂ : Set}{B₁ : A₁ -> Set1}{B₂ : A₂ -> Set1} {f₁ : (x : A₁) -> B₁ x}{f₂ : (x : A₂) -> B₂ x} -> ((x : A₁)(y : A₂) -> x ≡ y -> f₁ x ≡₁ f₂ y) -> f₁ ≡₁ f₂ cong-≡₁ : {A B : Set1}{x y : A}(f : A -> B)(p : x ≡₁ y) -> f x ≡₁ f y cong-≡₁ {_}{_}{_}{y} f p = subst-≡₁ (\z -> f z ≡₁ f y) p refl-≡₁ cong-≡₁⁰ : {A : Set}{B : A -> Set1}{x y : A}(f : (x : A) -> B x)(p : x ≡ y) -> f x ≡₁ f y cong-≡₁⁰ {_}{_}{_}{y} f p = subst-≡¹ (\z -> f z ≡₁ f y) p refl-≡₁ trans-≡₁ : {A B C : Set1}(x : A)(y : B)(z : C) -> x ≡₁ y -> y ≡₁ z -> x ≡₁ z trans-≡₁ x y z xy yz = subst-≡₁' (\w -> w ≡₁ z) xy yz
{ "alphanum_fraction": 0.370904325, "avg_line_length": 41.8082191781, "ext": "agda", "hexsha": "1fdb7f4d7a56f6179f656b738142ab2104dd364d", "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/iird/DefinitionalEquality.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/iird/DefinitionalEquality.agda", "max_line_length": 93, "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/iird/DefinitionalEquality.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": 1625, "size": 3052 }
-- Andreas, 2016-06-16 Issue #2045 -- Size solver should be called before checking extended lambda -- {-# OPTIONS -v tc.term.exlam:100 #-} open import Common.Size postulate anything : ∀{a}{A : Set a} → A data Exp : Size → Set where abs : ∀ i (t : Exp i) → Exp (↑ i) data Val : ∀ i (t : Exp i) → Set where valAbs : ∀ i (t : Exp i) → Val (↑ i) (abs i t) data Whnf i (t : Exp i) : Set where immed : (v : Val i t) → Whnf i t postulate Evaluate : ∀ i (t : Exp i) (P : (w : Whnf i t) → Set) → Set worksE : ∀ i (fa : Exp i) → Set worksE i fa = Evaluate i fa λ{ (immed (valAbs _ _)) → anything } works : ∀ i (fa : Exp i) → Set works i fa = Evaluate i fa aux where aux : Whnf i fa → Set aux (immed (valAbs _ _)) = anything test : ∀ i (fa : Exp i) → Set test i fa = Evaluate _ fa λ{ (immed (valAbs _ _)) → anything } -- Should work. -- WAS: -- extended lambda's implementation ".extendedlambda1" has type: -- (Whnf (_38 i fa) fa → Set) -- Cannot instantiate the metavariable _38 to solution (↑ i₁) since it -- contains the variable i₁ which is not in scope of the metavariable -- or irrelevant in the metavariable but relevant in the solution -- when checking that the pattern (valAbs _ _) has type -- (Val (_38 i fa) fa)
{ "alphanum_fraction": 0.6263115416, "avg_line_length": 27.5333333333, "ext": "agda", "hexsha": "fd3dcc9151992bb2dac18da12c2a8f620266c8d1", "lang": "Agda", "max_forks_count": 1, "max_forks_repo_forks_event_max_datetime": "2019-03-05T20:02:38.000Z", "max_forks_repo_forks_event_min_datetime": "2019-03-05T20:02:38.000Z", "max_forks_repo_head_hexsha": "231d6ad8e77b67ff8c4b1cb35a6c31ccd988c3e9", "max_forks_repo_licenses": [ "BSD-3-Clause" ], "max_forks_repo_name": "Agda-zh/agda", "max_forks_repo_path": "test/Succeed/Issue2045.agda", "max_issues_count": 3, "max_issues_repo_head_hexsha": "ed8ac6f4062ea8a20fa0f62d5db82d4e68278338", "max_issues_repo_issues_event_max_datetime": "2019-04-01T19:39:26.000Z", "max_issues_repo_issues_event_min_datetime": "2018-11-14T15:31:44.000Z", "max_issues_repo_licenses": [ "BSD-3-Clause" ], "max_issues_repo_name": "shlevy/agda", "max_issues_repo_path": "test/Succeed/Issue2045.agda", "max_line_length": 70, "max_stars_count": 3, "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/Issue2045.agda", "max_stars_repo_stars_event_max_datetime": "2015-12-07T20:14:00.000Z", "max_stars_repo_stars_event_min_datetime": "2015-03-28T14:51:03.000Z", "num_tokens": 408, "size": 1239 }
module Issue23 where postulate ℝ : Set r₀ : ℝ _+_ : ℝ → ℝ → ℝ -_ : ℝ → ℝ _-_ : ℝ → ℝ → ℝ x - y = x + (- y) infixl 4 _≡_ -- Equality. data _≡_ : ℝ → ℝ → Set where refl : (x : ℝ) → x ≡ x postulate ─-neut : {x : ℝ} → r₀ - x ≡ - x {-# ATP prove ─-neut #-}
{ "alphanum_fraction": 0.4538745387, "avg_line_length": 13.55, "ext": "agda", "hexsha": "b575845165d18016ce36f7abf5bf4076c5055279", "lang": "Agda", "max_forks_count": 4, "max_forks_repo_forks_event_max_datetime": "2016-08-03T03:54:55.000Z", "max_forks_repo_forks_event_min_datetime": "2016-05-10T23:06:19.000Z", "max_forks_repo_head_hexsha": "a66c5ddca2ab470539fd68c42c4fbd45f720d682", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "asr/apia", "max_forks_repo_path": "test/Fail/non-theorems/Issue23.agda", "max_issues_count": 121, "max_issues_repo_head_hexsha": "a66c5ddca2ab470539fd68c42c4fbd45f720d682", "max_issues_repo_issues_event_max_datetime": "2018-04-22T06:01:44.000Z", "max_issues_repo_issues_event_min_datetime": "2015-01-25T13:22:12.000Z", "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "asr/apia", "max_issues_repo_path": "test/Fail/non-theorems/Issue23.agda", "max_line_length": 41, "max_stars_count": 10, "max_stars_repo_head_hexsha": "a66c5ddca2ab470539fd68c42c4fbd45f720d682", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "asr/apia", "max_stars_repo_path": "test/Fail/non-theorems/Issue23.agda", "max_stars_repo_stars_event_max_datetime": "2019-12-03T13:44:25.000Z", "max_stars_repo_stars_event_min_datetime": "2015-09-03T20:54:16.000Z", "num_tokens": 128, "size": 271 }
{-# OPTIONS --safe --warning=error --without-K #-} open import Functions.Definition open import Functions.Lemmas open import LogicalFormulae open import Numbers.Naturals.Definition open import Numbers.Naturals.Order open import Sets.Cardinality.Infinite.Definition open import Sets.FinSet.Definition open import Sets.FinSet.Lemmas module Sets.Cardinality.Infinite.Lemmas where finsetNotInfinite : {n : ℕ} → InfiniteSet (FinSet n) → False finsetNotInfinite {n} isInfinite = isInfinite n id idIsBijective noInjectionNToFinite : {n : ℕ} → {f : ℕ → FinSet n} → Injection f → False noInjectionNToFinite {n} {f} inj = pigeonhole (le 0 refl) tInj where t : FinSet (succ n) → FinSet n t m = f (toNat m) tInj : Injection t tInj {x} {y} fx=fy = toNatInjective x y (inj fx=fy) dedekindInfiniteImpliesInfinite : {a : _} (A : Set a) → DedekindInfiniteSet A → InfiniteSet A dedekindInfiniteImpliesInfinite A record { inj = inj ; isInjection = isInjection } zero f x with Invertible.inverse (bijectionImpliesInvertible x) (inj 0) ... | () dedekindInfiniteImpliesInfinite A record { inj = inj ; isInjection = isInj } (succ n) f isBij = noInjectionNToFinite {f = t} tInjective where t : ℕ → FinSet (succ n) t n = Invertible.inverse (bijectionImpliesInvertible isBij) (inj n) tInjective : Injection t tInjective pr = isInj ((Bijection.inj (invertibleImpliesBijection (inverseIsInvertible (bijectionImpliesInvertible isBij)))) pr)
{ "alphanum_fraction": 0.7419132829, "avg_line_length": 42.7352941176, "ext": "agda", "hexsha": "1d649634be5cfc9aaf63d60df1e3defd00b18264", "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": "Sets/Cardinality/Infinite/Lemmas.agda", "max_issues_count": 14, "max_issues_repo_head_hexsha": "0f4230011039092f58f673abcad8fb0652e6b562", "max_issues_repo_issues_event_max_datetime": "2020-04-11T11:03:39.000Z", "max_issues_repo_issues_event_min_datetime": "2019-01-06T21:11:59.000Z", "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "Smaug123/agdaproofs", "max_issues_repo_path": "Sets/Cardinality/Infinite/Lemmas.agda", "max_line_length": 154, "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": "Sets/Cardinality/Infinite/Lemmas.agda", "max_stars_repo_stars_event_max_datetime": "2022-01-28T06:04:15.000Z", "max_stars_repo_stars_event_min_datetime": "2019-08-08T12:44:19.000Z", "num_tokens": 461, "size": 1453 }
module Issue642 where module M₁ (X : Set) where postulate F : X → Set module M₂ (X : Set) where open M₁ X public postulate A : Set x : A open M₂ A foo : F x foo = {!!} -- The goal was displayed as M₁.F A x rather than F x. If "open M₂ A" -- is replaced by "open M₁ A", then the goal is displayed correctly.
{ "alphanum_fraction": 0.6448598131, "avg_line_length": 16.05, "ext": "agda", "hexsha": "72b4328ffd0b744c5fc6de93eb65a2c067ada08d", "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": "70c8a575c46f6a568c7518150a1a64fcd03aa437", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "masondesu/agda", "max_forks_repo_path": "test/interaction/Issue642.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "70c8a575c46f6a568c7518150a1a64fcd03aa437", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "masondesu/agda", "max_issues_repo_path": "test/interaction/Issue642.agda", "max_line_length": 69, "max_stars_count": 1, "max_stars_repo_head_hexsha": "20596e9dd9867166a64470dd24ea68925ff380ce", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "np/agda-git-experiment", "max_stars_repo_path": "test/interaction/Issue642.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": 109, "size": 321 }
-- Andreas, 2021-04-19, fixed #5236, regression introduced by #2858. -- In record declarations, `constructor` should not be a layout keyword, -- in order to be compatible with Agda 2.6.1. record Works : Set₁ where eta-equality; field W : Set record Test : Set₁ where constructor c; field F : Set -- Should work record Test2 : Set₁ where constructor c; eta-equality -- Should work field foo : Set
{ "alphanum_fraction": 0.6935866983, "avg_line_length": 24.7647058824, "ext": "agda", "hexsha": "dbd4a7f6d76e124495b23c67e5497e24349aca82", "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/Succeed/Issue5236.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/Succeed/Issue5236.agda", "max_line_length": 72, "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/Succeed/Issue5236.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": 122, "size": 421 }
{-# OPTIONS --without-K #-} module F1a where open import Data.Unit open import Data.Sum hiding (map) open import Data.Product hiding (map) open import Data.List open import Data.Nat open import Data.Bool {-- infixr 90 _⊗_ infixr 80 _⊕_ infixr 60 _∘_ infix 30 _⟷_ --} --------------------------------------------------------------------------- -- Paths -- Path relation should be an equivalence data IPath (I A : Set) : Set where _↝_ : {i : I} (a : A) → (b : A) → IPath I A id↝ : {A : Set} → A → IPath ⊤ A id↝ a = a ↝ a ap : {A B I J : Set} → (I → J) → (A → B) → IPath I A → IPath J B ap g f (_↝_ {i} a a') = _↝_ {i = g i} (f a) (f a') ZIP : (K : Set → Set → Set) → (P : Set → Set → Set) → (I : Set) → (J : Set) → (A : Set) → (B : Set) → Set ZIP K P I J A B = K I A → K J B → K (P I J) (P A B) pathProd : {A B I J : Set} → ZIP IPath _×_ I J A B pathProd (_↝_ {i = i} a a') (_↝_ {i = j} b b') = _↝_ {i = i , j} (a , b) (a' , b') prod : {X Y Z : Set} → (X → Y → Z) → List X → List Y → List Z prod f l₁ l₂ = concatMap (λ b → map (f b) l₂) l₁ _×↝_ : {A B I J : Set} → List (IPath I A) → List (IPath J B) → List (IPath (I × J) (A × B)) _×↝_ = prod pathProd -- pi types with exactly one level of reciprocals data B0 : Set where ONE : B0 PLUS0 : B0 → B0 → B0 TIMES0 : B0 → B0 → B0 data B1 : Set where LIFT0 : B0 → B1 PLUS1 : B1 → B1 → B1 TIMES1 : B1 → B1 → B1 RECIP1 : B0 → B1 -- interpretation of B0 as discrete groupoids record 0-type : Set₁ where constructor G₀ field ∣_∣₀ : Set open 0-type public plus : 0-type → 0-type → 0-type plus t₁ t₂ = G₀ (∣ t₁ ∣₀ ⊎ ∣ t₂ ∣₀) times : 0-type → 0-type → 0-type times t₁ t₂ = G₀ (∣ t₁ ∣₀ × ∣ t₂ ∣₀) ⟦_⟧₀ : B0 → 0-type ⟦ ONE ⟧₀ = G₀ ⊤ ⟦ PLUS0 b₁ b₂ ⟧₀ = plus ⟦ b₁ ⟧₀ ⟦ b₂ ⟧₀ ⟦ TIMES0 b₁ b₂ ⟧₀ = times ⟦ b₁ ⟧₀ ⟦ b₂ ⟧₀ ı₀ : B0 → Set ı₀ b = ∣ ⟦ b ⟧₀ ∣₀ elems0 : (b : B0) → List (ı₀ b) elems0 ONE = [ tt ] elems0 (PLUS0 b b') = map inj₁ (elems0 b) ++ map inj₂ (elems0 b') elems0 (TIMES0 b b') = -- concatMap (λ a → map (λ b → (a , b)) (elems0 b')) (elems0 b) prod _,_ (elems0 b) (elems0 b') point : (b : B0) → ı₀ b point ONE = tt point (PLUS0 b _) = inj₁ (point b) point (TIMES0 b₀ b₁) = point b₀ , point b₁ expand : ∀ {I} (b : B0) → ( ı₀ b → IPath I (ı₀ b)) → List (IPath I (ı₀ b)) expand x f = map f (elems0 x) -- interpretation of B1 types as 2-types record 1-type : Set₁ where constructor G₂ field I : Set ∣_∣₁ : Set 1-paths : List (IPath I ∣_∣₁) open 1-type public _⊎↝_ : {I J A B : Set} → List (IPath I A) → List (IPath J B) → List (IPath (I ⊎ J) (A ⊎ B)) p₁ ⊎↝ p₂ = map (ap inj₁ inj₁) p₁ ++ map (ap inj₂ inj₂) p₂ ⟦_⟧₁ : B1 → 1-type ⟦ LIFT0 b0 ⟧₁ = G₂ ⊤ (ı₀ b0) (expand b0 id↝) ⟦ PLUS1 b₁ b₂ ⟧₁ with ⟦ b₁ ⟧₁ | ⟦ b₂ ⟧₁ ... | G₂ I₁ 0p₁ 1p₁ | G₂ I₂ 0p₂ 1p₂ = G₂ (I₁ ⊎ I₂) (0p₁ ⊎ 0p₂) (1p₁ ⊎↝ 1p₂) ⟦ TIMES1 b₁ b₂ ⟧₁ with ⟦ b₁ ⟧₁ | ⟦ b₂ ⟧₁ ... | G₂ I₁ 0p₁ 1p₁ | G₂ I₂ 0p₂ 1p₂ = G₂ (I₁ × I₂) (0p₁ × 0p₂) (1p₁ ×↝ 1p₂) ⟦ RECIP1 b0 ⟧₁ = G₂ (ı₀ (TIMES0 b0 b0)) ⊤ (prod (λ a b → _↝_ {i = a , b} tt tt) (elems0 b0) (elems0 b0) ) ı₁ : B1 → Set ı₁ b = ∣ ⟦ b ⟧₁ ∣₁ test10 = ⟦ LIFT0 ONE ⟧₁ test11 = ⟦ LIFT0 (PLUS0 ONE ONE) ⟧₁ test12 = ⟦ RECIP1 (PLUS0 ONE ONE) ⟧₁ -- isos data _⟷_ : B1 → B1 → Set where -- + swap₊ : { b₁ b₂ : B1 } → PLUS1 b₁ b₂ ⟷ PLUS1 b₂ b₁ -- * unite⋆ : { b : B1 } → TIMES1 (LIFT0 ONE) b ⟷ b uniti⋆ : { b : B1 } → b ⟷ TIMES1 (LIFT0 ONE) b {- assocl₊ : { b₁ b₂ b₃ : B } → PLUS b₁ (PLUS b₂ b₃) ⟷ PLUS (PLUS b₁ b₂) b₃ assocr₊ : { b₁ b₂ b₃ : B } → PLUS (PLUS b₁ b₂) b₃ ⟷ PLUS b₁ (PLUS b₂ b₃) swap⋆ : { b₁ b₂ : B } → TIMES b₁ b₂ ⟷ TIMES b₂ b₁ assocl⋆ : { b₁ b₂ b₃ : B } → TIMES b₁ (TIMES b₂ b₃) ⟷ TIMES (TIMES b₁ b₂) b₃ assocr⋆ : { b₁ b₂ b₃ : B } → TIMES (TIMES b₁ b₂) b₃ ⟷ TIMES b₁ (TIMES b₂ b₃) -- * distributes over + dist : { b₁ b₂ b₃ : B } → TIMES (PLUS b₁ b₂) b₃ ⟷ PLUS (TIMES b₁ b₃) (TIMES b₂ b₃) factor : { b₁ b₂ b₃ : B } → PLUS (TIMES b₁ b₃) (TIMES b₂ b₃) ⟷ TIMES (PLUS b₁ b₂) b₃ -- congruence id⟷ : { b : B } → b ⟷ b sym : { b₁ b₂ : B } → (b₁ ⟷ b₂) → (b₂ ⟷ b₁) _∘_ : { b₁ b₂ b₃ : B } → (b₁ ⟷ b₂) → (b₂ ⟷ b₃) → (b₁ ⟷ b₃) _⊕_ : { b₁ b₂ b₃ b₄ : B } → (b₁ ⟷ b₃) → (b₂ ⟷ b₄) → (PLUS b₁ b₂ ⟷ PLUS b₃ b₄) _⊗_ : { b₁ b₂ b₃ b₄ : B } → (b₁ ⟷ b₃) → (b₂ ⟷ b₄) → (TIMES b₁ b₂ ⟷ TIMES b₃ b₄) -} η⋆ : (b : B0) → LIFT0 ONE ⟷ TIMES1 (LIFT0 b) (RECIP1 b) ε⋆ : (b : B0) → TIMES1 (LIFT0 b) (RECIP1 b) ⟷ LIFT0 ONE -- interpret isos as functors record 1-functor (A B : 1-type) : Set where constructor F₁ field find : I A → I B fobj : ∣ A ∣₁ → ∣ B ∣₁ fmor : List (IPath (I A) ∣ A ∣₁) → List (IPath (I B) ∣ B ∣₁) open 1-functor public ipath : B1 → Set ipath b = IPath (I ⟦ b ⟧₁) (ı₁ b) swap⊎ : {A B : Set} → A ⊎ B → B ⊎ A swap⊎ (inj₁ a) = inj₂ a swap⊎ (inj₂ b) = inj₁ b elim1⋆ : {b : B1} → ipath (TIMES1 (LIFT0 ONE) b) → ipath b elim1⋆ (_↝_ {tt , x} (tt , y) (tt , z)) = _↝_ {i = x} y z intro1⋆ : {b : B1} → ipath b → ipath (TIMES1 (LIFT0 ONE) b) intro1⋆ (_↝_ {x} y z) = _↝_ {i = tt , x} (tt , y) (tt , z) Iη⋆ : (b : B0) → I ⟦ LIFT0 ONE ⟧₁ → I ⟦ TIMES1 (LIFT0 b) (RECIP1 b) ⟧₁ Iη⋆ b tt = tt , (point b , point b) Iε⋆ : (b : B0) → I ⟦ TIMES1 (LIFT0 b) (RECIP1 b) ⟧₁ → I ⟦ LIFT0 ONE ⟧₁ Iε⋆ b (tt , x) = tt objη⋆ : (b : B0) → ı₁ (LIFT0 ONE) → ı₁ (TIMES1 (LIFT0 b) (RECIP1 b)) objη⋆ b tt = point b , tt objε⋆ : (b : B0) → ı₁ (TIMES1 (LIFT0 b) (RECIP1 b)) → ı₁ (LIFT0 ONE) objε⋆ b (x , tt) = tt sw : {b₁ b₂ : B1} → ipath (PLUS1 b₁ b₂) → ipath (PLUS1 b₂ b₁) sw (_↝_ {i} (inj₁ x) (inj₁ y)) = _↝_ {i = swap⊎ i} (inj₂ x) (inj₂ y) sw (_↝_ {i} (inj₁ x) (inj₂ y)) = _↝_ {i = swap⊎ i} (inj₂ x) (inj₁ y) sw (_↝_ {i} (inj₂ x) (inj₁ y)) = _↝_ {i = swap⊎ i} (inj₁ x) (inj₂ y) sw (_↝_ {i} (inj₂ x) (inj₂ y)) = _↝_ {i = swap⊎ i} (inj₁ x) (inj₁ y) elim1I : (b : B1) → I ⟦ TIMES1 (LIFT0 ONE) b ⟧₁ → I ⟦ b ⟧₁ elim1I b (tt , x) = x elim1∣₁ : (b : B1) → ı₁ (TIMES1 (LIFT0 ONE) b) → ı₁ b elim1∣₁ b (tt , x) = x introI : (b : B1) → I ⟦ b ⟧₁ → I ⟦ TIMES1 (LIFT0 ONE) b ⟧₁ introI b x = (tt , x) intro1∣₁ : (b : B1) → ı₁ b → ı₁ (TIMES1 (LIFT0 ONE) b) intro1∣₁ b x = (tt , x) eta : (b : B0) → List (ipath (LIFT0 ONE)) → List (ipath (TIMES1 (LIFT0 b) (RECIP1 b))) -- note how the input list is not used at all! eta b _ = prod (λ a a' → _↝_ {i = tt , a , a'} (a , tt) (a' , tt)) (elems0 b) (elems0 b) eps : (b : B0) → ipath (TIMES1 (LIFT0 b) (RECIP1 b)) → ipath (LIFT0 ONE) eps b0 (_↝_ {i = i} a b) = _↝_ tt tt mutual eval : {b₁ b₂ : B1} → (b₁ ⟷ b₂) → 1-functor ⟦ b₁ ⟧₁ ⟦ b₂ ⟧₁ eval (swap₊ {b₁} {b₂}) = F₁ swap⊎ swap⊎ (map (sw {b₁} {b₂})) eval (unite⋆ {b}) = F₁ (elim1I b) (elim1∣₁ b) (map (elim1⋆ {b})) eval (uniti⋆ {b}) = F₁ (introI b) (intro1∣₁ b) (map (intro1⋆ {b})) eval (η⋆ b) = F₁ (Iη⋆ b) (objη⋆ b) (eta b ) eval (ε⋆ b) = F₁ (Iε⋆ b) (objε⋆ b) (map (eps b)) evalB : {b₁ b₂ : B1} → (b₁ ⟷ b₂) → 1-functor ⟦ b₂ ⟧₁ ⟦ b₁ ⟧₁ evalB (swap₊ {b₁} {b₂}) = F₁ swap⊎ swap⊎ (map (sw {b₂} {b₁})) evalB (unite⋆ {b}) = F₁ (introI b) (intro1∣₁ b) (map (intro1⋆ {b})) evalB (uniti⋆ {b}) = F₁ (elim1I b) (elim1∣₁ b) (map (elim1⋆ {b})) evalB (η⋆ b) = F₁ (Iε⋆ b) (objε⋆ b) (map (eps b)) evalB (ε⋆ b) = F₁ (Iη⋆ b) (objη⋆ b) (eta b) {- eval assocl₊ = ? -- : { b₁ b₂ b₃ : B } → PLUS b₁ (PLUS b₂ b₃) ⟷ PLUS (PLUS b₁ b₂) b₃ eval assocr₊ = ? -- : { b₁ b₂ b₃ : B } → PLUS (PLUS b₁ b₂) b₃ ⟷ PLUS b₁ (PLUS b₂ b₃) eval uniti⋆ = ? -- : { b : B } → b ⟷ TIMES ONE b eval swap⋆ = ? -- : { b₁ b₂ : B } → TIMES b₁ b₂ ⟷ TIMES b₂ b₁ eval assocl⋆ = ? -- : { b₁ b₂ b₃ : B } → TIMES b₁ (TIMES b₂ b₃) ⟷ TIMES (TIMES b₁ b₂) b₃ eval assocr⋆ = ? -- : { b₁ b₂ b₃ : B } → TIMES (TIMES b₁ b₂) b₃ ⟷ TIMES b₁ (TIMES b₂ b₃) eval dist = ? -- : { b₁ b₂ b₃ : B } → TIMES (PLUS b₁ b₂) b₃ ⟷ PLUS (TIMES b₁ b₃) (TIMES b₂ b₃) eval factor = ? -- : { b₁ b₂ b₃ : B } → PLUS (TIMES b₁ b₃) (TIMES b₂ b₃) ⟷ TIMES (PLUS b₁ b₂) b₃ eval id⟷ = ? -- : { b : B } → b ⟷ b eval (sym c) = ? -- : { b₁ b₂ : B } → (b₁ ⟷ b₂) → (b₂ ⟷ b₁) eval (c₁ ∘ c₂) = ? -- : { b₁ b₂ b₃ : B } → (b₁ ⟷ b₂) → (b₂ ⟷ b₃) → (b₁ ⟷ b₃) eval (c₁ ⊕ c₂) = ? -- : { b₁ b₂ b₃ b₄ : B } → (b₁ ⟷ b₃) → (b₂ ⟷ b₄) → (PLUS b₁ b₂ ⟷ PLUS b₃ b₄) eval (c₁ ⊗ c₂) = ? -- : { b₁ b₂ b₃ b₄ : B } → (b₁ ⟷ b₃) → (b₂ ⟷ b₄) → (TIMES b₁ b₂ ⟷ TIMES b₃ b₄) --------------------------------------------------------------------------- --}
{ "alphanum_fraction": 0.5006035732, "avg_line_length": 33.4032258065, "ext": "agda", "hexsha": "2d807ef329adec3acae8cf2cde00af97be8fb82d", "lang": "Agda", "max_forks_count": 3, "max_forks_repo_forks_event_max_datetime": "2019-09-10T09:47:13.000Z", "max_forks_repo_forks_event_min_datetime": "2016-05-29T01:56:33.000Z", "max_forks_repo_head_hexsha": "003835484facfde0b770bc2b3d781b42b76184c1", "max_forks_repo_licenses": [ "BSD-2-Clause" ], "max_forks_repo_name": "JacquesCarette/pi-dual", "max_forks_repo_path": "F1a.agda", "max_issues_count": 4, "max_issues_repo_head_hexsha": "003835484facfde0b770bc2b3d781b42b76184c1", "max_issues_repo_issues_event_max_datetime": "2021-10-29T20:41:23.000Z", "max_issues_repo_issues_event_min_datetime": "2018-06-07T16:27:41.000Z", "max_issues_repo_licenses": [ "BSD-2-Clause" ], "max_issues_repo_name": "JacquesCarette/pi-dual", "max_issues_repo_path": "F1a.agda", "max_line_length": 105, "max_stars_count": 14, "max_stars_repo_head_hexsha": "003835484facfde0b770bc2b3d781b42b76184c1", "max_stars_repo_licenses": [ "BSD-2-Clause" ], "max_stars_repo_name": "JacquesCarette/pi-dual", "max_stars_repo_path": "F1a.agda", "max_stars_repo_stars_event_max_datetime": "2021-05-05T01:07:57.000Z", "max_stars_repo_stars_event_min_datetime": "2015-08-18T21:40:15.000Z", "num_tokens": 4405, "size": 8284 }
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 import SecondOrder.Renaming import SecondOrder.Term import SecondOrder.Substitution import SecondOrder.Instantiation import SecondOrder.Theory module SecondOrder.Equality {ℓ ℓa} {𝔸 : SecondOrder.Arity.Arity} {Σ : SecondOrder.Signature.Signature ℓ 𝔸} (𝕋 : SecondOrder.Theory.Theory Σ ℓa) where open SecondOrder.Metavariable Σ open SecondOrder.Renaming Σ open SecondOrder.Term Σ open SecondOrder.Substitution Σ open SecondOrder.Signature.Signature Σ open SecondOrder.Instantiation Σ open SecondOrder.Theory.Theory 𝕋 record Equation : Set (lsuc ℓ) where constructor make-eq field eq-mv-ctx : MContext -- metavariable context of an equation eq-ctx : VContext -- variable context of an equation eq-sort : sort -- sort of an equation eq-lhs : Term eq-mv-ctx eq-ctx eq-sort -- left-hand side eq-rhs : Term eq-mv-ctx eq-ctx eq-sort -- right-hand side infix 5 make-eq syntax make-eq Θ Γ A s t = Θ ⊕ Γ ∥ s ≋ t ⦂ A -- Instantiate an axiom of 𝕋 to an equation instantiate-axiom : ∀ (ε : ax) {Θ Γ} (I : ax-mv-ctx ε ⇒ⁱ Θ ⊕ Γ) → Equation instantiate-axiom ε {Θ} {Γ} I = Θ ⊕ Γ ∥ [ I ]ⁱ (ax-lhs ε) ≋ [ I ]ⁱ (ax-rhs ε) ⦂ ax-sort ε -- The equality judgement infix 4 ⊢_ data ⊢_ : Equation → Set (lsuc (ℓ ⊔ ℓa)) where -- general rules eq-refl : ∀ {Θ Γ A} {t : Term Θ Γ A} → ⊢ Θ ⊕ Γ ∥ t ≋ t ⦂ A eq-symm : ∀ {Θ Γ A} {s t : Term Θ Γ A} → ⊢ Θ ⊕ Γ ∥ s ≋ t ⦂ A → ⊢ Θ ⊕ Γ ∥ t ≋ s ⦂ A eq-trans : ∀ {Θ Γ A} {s t u : Term Θ Γ A} → ⊢ Θ ⊕ Γ ∥ s ≋ t ⦂ A → ⊢ Θ ⊕ Γ ∥ t ≋ u ⦂ A → ⊢ Θ ⊕ Γ ∥ s ≋ u ⦂ A -- Congruence rule for operations -- the premises are: an operation f, two sets of arguments xs, ys of f that give -- for each argument of f a term in the extended context with the arguments that f binds -- such that xᵢ ≋ yᵢ for each i ∈ oper-arity f -- then f xs ≋ f ys (in the appropriate context) eq-oper : ∀ {Γ Θ} {f : oper} {xs ys : ∀ (i : oper-arg f) → Term Θ (Γ ,, arg-bind f i) (arg-sort f i)} → (∀ i → ⊢ Θ ⊕ (Γ ,, arg-bind f i) ∥ (xs i) ≋ (ys i) ⦂ (arg-sort f i)) → ⊢ Θ ⊕ Γ ∥ (tm-oper f xs) ≋ (tm-oper f ys) ⦂ (oper-sort f) -- Congruence rule for metavariables -- the permises are: a meta-variable M, and two sets of arguments of the appropriate -- sorts and arities to apply M, such that xᵢ ≋ yᵢ -- then M xs ≋ M ys eq-meta : ∀ {Γ Θ} {Γᴹ Aᴹ} {M : [ Γᴹ , Aᴹ ]∈ Θ} {xs ys : ∀ {B : sort} (i : B ∈ Γᴹ) → Term Θ Γ B} → (∀ {B : sort} (i : B ∈ Γᴹ) → ⊢ Θ ⊕ Γ ∥ (xs i) ≋ (ys i) ⦂ B) → ⊢ Θ ⊕ Γ ∥ (tm-meta M xs) ≋ (tm-meta M ys) ⦂ Aᴹ -- equational axiom eq-axiom : ∀ (ε : ax) {Θ Γ} (I : ax-mv-ctx ε ⇒ⁱ Θ ⊕ Γ) → ⊢ instantiate-axiom ε I -- Syntactically equal terms are judgementally equal ≈-≋ : ∀ {Θ Γ A} {s t : Term Θ Γ A} → s ≈ t → ⊢ Θ ⊕ Γ ∥ s ≋ t ⦂ A ≈-≋ (≈-≡ refl) = eq-refl ≈-≋ (≈-meta ξ) = eq-meta (λ i → ≈-≋ (ξ i)) ≈-≋ (≈-oper ξ) = eq-oper (λ i → ≈-≋ (ξ i)) -- terms and judgemental equality form a setoid eq-setoid : ∀ (Γ : VContext) (Θ : MContext) (A : sort) → Setoid ℓ (lsuc (ℓ ⊔ ℓa)) eq-setoid Γ Θ A = record { Carrier = Term Θ Γ A ; _≈_ = λ s t → ⊢ Θ ⊕ Γ ∥ s ≋ t ⦂ A ; isEquivalence = record { refl = eq-refl ; sym = eq-symm ; trans = eq-trans } } -- judgemental equality of substitutions _≋ˢ_ : ∀ {Θ Γ Δ} (σ τ : Θ ⊕ Γ ⇒ˢ Δ) → Set (lsuc (ℓ ⊔ ℓa)) _≋ˢ_ {Θ} {Γ} {Δ} σ τ = ∀ {A} (x : A ∈ Γ) → ⊢ Θ ⊕ Δ ∥ σ x ≋ τ x ⦂ A ≈ˢ-≋ˢ : ∀ {Θ Γ Δ} {σ τ : Θ ⊕ Γ ⇒ˢ Δ} → σ ≈ˢ τ → σ ≋ˢ τ ≈ˢ-≋ˢ ξ = λ x → ≈-≋ (ξ x) -- judgemental equality of metavariable instatiations _≋ⁱ_ : ∀ {Θ Ξ Γ} (I J : Θ ⇒ⁱ Ξ ⊕ Γ) → Set (lsuc (ℓ ⊔ ℓa)) _≋ⁱ_ {Θ} {Ξ} {Γ} I J = ∀ {Γᴹ Aᴹ} (M : [ Γᴹ , Aᴹ ]∈ Θ) → ⊢ Ξ ⊕ (Γ ,, Γᴹ) ∥ I M ≋ J M ⦂ Aᴹ
{ "alphanum_fraction": 0.5483634587, "avg_line_length": 37.5596330275, "ext": "agda", "hexsha": "d644571959ee97fa24257cc912eecbf2e4fd9f06", "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": "2aaf850bb1a262681c5a232cdefae312f921b9d4", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "andrejbauer/formaltt", "max_forks_repo_path": "src/SecondOrder/Equality.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "2aaf850bb1a262681c5a232cdefae312f921b9d4", "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": "andrejbauer/formaltt", "max_issues_repo_path": "src/SecondOrder/Equality.agda", "max_line_length": 111, "max_stars_count": 1, "max_stars_repo_head_hexsha": "2aaf850bb1a262681c5a232cdefae312f921b9d4", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "andrejbauer/formal", "max_stars_repo_path": "src/SecondOrder/Equality.agda", "max_stars_repo_stars_event_max_datetime": "2021-04-18T18:21:00.000Z", "max_stars_repo_stars_event_min_datetime": "2021-04-18T18:21:00.000Z", "num_tokens": 1756, "size": 4094 }
------------------------------------------------------------------------ -- The Agda standard library -- -- Lexicographic ordering of lists ------------------------------------------------------------------------ -- The definition of lexicographic ordering used here is suitable if -- the argument order is a strict partial order. The lexicographic -- ordering itself can be either strict or non-strict, depending on -- the value of a parameter. module Relation.Binary.List.StrictLex where open import Data.Empty open import Data.Unit using (⊤; tt) open import Function open import Data.Product open import Data.Sum open import Data.List open import Level open import Relation.Nullary open import Relation.Binary open import Relation.Binary.Consequences open import Relation.Binary.List.Pointwise as Pointwise using ([]; _∷_; head; tail) module _ {A : Set} where data Lex (P : Set) (_≈_ _<_ : Rel A zero) : Rel (List A) zero where base : P → Lex P _≈_ _<_ [] [] halt : ∀ {y ys} → Lex P _≈_ _<_ [] (y ∷ ys) this : ∀ {x xs y ys} (x<y : x < y) → Lex P _≈_ _<_ (x ∷ xs) (y ∷ ys) next : ∀ {x xs y ys} (x≈y : x ≈ y) (xs⊴ys : Lex P _≈_ _<_ xs ys) → Lex P _≈_ _<_ (x ∷ xs) (y ∷ ys) -- Strict lexicographic ordering. Lex-< : (_≈_ _<_ : Rel A zero) → Rel (List A) zero Lex-< = Lex ⊥ ¬[]<[] : ∀ {_≈_ _<_} → ¬ Lex-< _≈_ _<_ [] [] ¬[]<[] (base ()) -- Non-strict lexicographic ordering. Lex-≤ : (_≈_ _<_ : Rel A zero) → Rel (List A) zero Lex-≤ = Lex ⊤ -- Utilities. ¬≤-this : ∀ {P _≈_ _<_ x y xs ys} → ¬ (x ≈ y) → ¬ (x < y) → ¬ Lex P _≈_ _<_ (x ∷ xs) (y ∷ ys) ¬≤-this ¬x≈y ¬x<y (this x<y) = ¬x<y x<y ¬≤-this ¬x≈y ¬x<y (next x≈y xs⊴ys) = ¬x≈y x≈y ¬≤-next : ∀ {P _≈_ _<_ x y xs ys} → ¬ (x < y) → ¬ Lex P _≈_ _<_ xs ys → ¬ Lex P _≈_ _<_ (x ∷ xs) (y ∷ ys) ¬≤-next ¬x<y ¬xs⊴ys (this x<y) = ¬x<y x<y ¬≤-next ¬x<y ¬xs⊴ys (next x≈y xs⊴ys) = ¬xs⊴ys xs⊴ys ---------------------------------------------------------------------- -- Properties ≤-reflexive : ∀ _≈_ _<_ → Pointwise.Rel _≈_ ⇒ Lex-≤ _≈_ _<_ ≤-reflexive _≈_ _<_ [] = base tt ≤-reflexive _≈_ _<_ (x≈y ∷ xs≈ys) = next x≈y (≤-reflexive _≈_ _<_ xs≈ys) <-irreflexive : ∀ {_≈_ _<_} → Irreflexive _≈_ _<_ → Irreflexive (Pointwise.Rel _≈_) (Lex-< _≈_ _<_) <-irreflexive irr [] (base ()) <-irreflexive irr (x≈y ∷ xs≈ys) (this x<y) = irr x≈y x<y <-irreflexive irr (x≈y ∷ xs≈ys) (next x≊y xs⊴ys) = <-irreflexive irr xs≈ys xs⊴ys transitive : ∀ {P _≈_ _<_} → IsEquivalence _≈_ → _<_ Respects₂ _≈_ → Transitive _<_ → Transitive (Lex P _≈_ _<_) transitive {P} {_≈_} {_<_} eq resp tr = trans where trans : Transitive (Lex P _≈_ _<_) trans (base p) (base _) = base p trans (base y) halt = halt trans halt (this y<z) = halt trans halt (next y≈z ys⊴zs) = halt trans (this x<y) (this y<z) = this (tr x<y y<z) trans (this x<y) (next y≈z ys⊴zs) = this (proj₁ resp y≈z x<y) trans (next x≈y xs⊴ys) (this y<z) = this (proj₂ resp (IsEquivalence.sym eq x≈y) y<z) trans (next x≈y xs⊴ys) (next y≈z ys⊴zs) = next (IsEquivalence.trans eq x≈y y≈z) (trans xs⊴ys ys⊴zs) antisymmetric : ∀ {P _≈_ _<_} → Symmetric _≈_ → Irreflexive _≈_ _<_ → Asymmetric _<_ → Antisymmetric (Pointwise.Rel _≈_) (Lex P _≈_ _<_) antisymmetric {P} {_≈_} {_<_} sym ir asym = as where as : Antisymmetric (Pointwise.Rel _≈_) (Lex P _≈_ _<_) as (base _) (base _) = [] as halt () as (this x<y) (this y<x) = ⊥-elim (asym x<y y<x) as (this x<y) (next y≈x ys⊴xs) = ⊥-elim (ir (sym y≈x) x<y) as (next x≈y xs⊴ys) (this y<x) = ⊥-elim (ir (sym x≈y) y<x) as (next x≈y xs⊴ys) (next y≈x ys⊴xs) = x≈y ∷ as xs⊴ys ys⊴xs <-asymmetric : ∀ {_≈_ _<_} → Symmetric _≈_ → _<_ Respects₂ _≈_ → Asymmetric _<_ → Asymmetric (Lex-< _≈_ _<_) <-asymmetric {_≈_} {_<_} sym resp as = asym where irrefl : Irreflexive _≈_ _<_ irrefl = asym⟶irr resp sym as asym : Asymmetric (Lex-< _≈_ _<_) asym (base bot) _ = bot asym halt () asym (this x<y) (this y<x) = as x<y y<x asym (this x<y) (next y≈x ys⊴xs) = irrefl (sym y≈x) x<y asym (next x≈y xs⊴ys) (this y<x) = irrefl (sym x≈y) y<x asym (next x≈y xs⊴ys) (next y≈x ys⊴xs) = asym xs⊴ys ys⊴xs respects₂ : ∀ {P _≈_ _<_} → IsEquivalence _≈_ → _<_ Respects₂ _≈_ → Lex P _≈_ _<_ Respects₂ Pointwise.Rel _≈_ respects₂ {P} {_≈_} {_<_} eq resp = (λ {xs} {ys} {zs} → resp¹ {xs} {ys} {zs}) , (λ {xs} {ys} {zs} → resp² {xs} {ys} {zs}) where resp¹ : ∀ {xs} → Lex P _≈_ _<_ xs Respects Pointwise.Rel _≈_ resp¹ [] xs⊴[] = xs⊴[] resp¹ (x≈y ∷ xs≈ys) halt = halt resp¹ (x≈y ∷ xs≈ys) (this z<x) = this (proj₁ resp x≈y z<x) resp¹ (x≈y ∷ xs≈ys) (next z≈x zs⊴xs) = next (Eq.trans z≈x x≈y) (resp¹ xs≈ys zs⊴xs) where module Eq = IsEquivalence eq resp² : ∀ {ys} → flip (Lex P _≈_ _<_) ys Respects Pointwise.Rel _≈_ resp² [] []⊴ys = []⊴ys resp² (x≈z ∷ xs≈zs) (this x<y) = this (proj₂ resp x≈z x<y) resp² (x≈z ∷ xs≈zs) (next x≈y xs⊴ys) = next (Eq.trans (Eq.sym x≈z) x≈y) (resp² xs≈zs xs⊴ys) where module Eq = IsEquivalence eq decidable : ∀ {P _≈_ _<_} → Dec P → Decidable _≈_ → Decidable _<_ → Decidable (Lex P _≈_ _<_) decidable (yes p) dec-≈ dec-< [] [] = yes (base p) decidable (no ¬p) dec-≈ dec-< [] [] = no λ{(base p) → ¬p p} decidable dec-P dec-≈ dec-< [] (y ∷ ys) = yes halt decidable dec-P dec-≈ dec-< (x ∷ xs) [] = no (λ ()) decidable dec-P dec-≈ dec-< (x ∷ xs) (y ∷ ys) with dec-< x y ... | yes x<y = yes (this x<y) ... | no ¬x<y with dec-≈ x y ... | no ¬x≈y = no (¬≤-this ¬x≈y ¬x<y) ... | yes x≈y with decidable dec-P dec-≈ dec-< xs ys ... | yes xs⊴ys = yes (next x≈y xs⊴ys) ... | no ¬xs⊴ys = no (¬≤-next ¬x<y ¬xs⊴ys) <-decidable : ∀ {_≈_ _<_} → Decidable _≈_ → Decidable _<_ → Decidable (Lex-< _≈_ _<_) <-decidable = decidable (no id) ≤-decidable : ∀ {_≈_ _<_} → Decidable _≈_ → Decidable _<_ → Decidable (Lex-≤ _≈_ _<_) ≤-decidable = decidable (yes tt) -- Note that trichotomy is an unnecessarily strong precondition for -- the following lemma. ≤-total : ∀ {_≈_ _<_} → Symmetric _≈_ → Trichotomous _≈_ _<_ → Total (Lex-≤ _≈_ _<_) ≤-total {_≈_} {_<_} sym tri = total where total : Total (Lex-≤ _≈_ _<_) total [] [] = inj₁ (base tt) total [] (x ∷ xs) = inj₁ halt total (x ∷ xs) [] = inj₂ halt total (x ∷ xs) (y ∷ ys) with tri x y ... | tri< x<y _ _ = inj₁ (this x<y) ... | tri> _ _ y<x = inj₂ (this y<x) ... | tri≈ _ x≈y _ with total xs ys ... | inj₁ xs≲ys = inj₁ (next x≈y xs≲ys) ... | inj₂ ys≲xs = inj₂ (next (sym x≈y) ys≲xs) <-compare : ∀ {_≈_ _<_} → Symmetric _≈_ → Trichotomous _≈_ _<_ → Trichotomous (Pointwise.Rel _≈_) (Lex-< _≈_ _<_) <-compare {_≈_} {_<_} sym tri = cmp where cmp : Trichotomous (Pointwise.Rel _≈_) (Lex-< _≈_ _<_) cmp [] [] = tri≈ ¬[]<[] [] ¬[]<[] cmp [] (y ∷ ys) = tri< halt (λ ()) (λ ()) cmp (x ∷ xs) [] = tri> (λ ()) (λ ()) halt cmp (x ∷ xs) (y ∷ ys) with tri x y ... | tri< x<y ¬x≈y ¬y<x = tri< (this x<y) (¬x≈y ∘ head) (¬≤-this (¬x≈y ∘ sym) ¬y<x) ... | tri> ¬x<y ¬x≈y y<x = tri> (¬≤-this ¬x≈y ¬x<y) (¬x≈y ∘ head) (this y<x) ... | tri≈ ¬x<y x≈y ¬y<x with cmp xs ys ... | tri< xs<ys ¬xs≈ys ¬ys<xs = tri< (next x≈y xs<ys) (¬xs≈ys ∘ tail) (¬≤-next ¬y<x ¬ys<xs) ... | tri≈ ¬xs<ys xs≈ys ¬ys<xs = tri≈ (¬≤-next ¬x<y ¬xs<ys) (x≈y ∷ xs≈ys) (¬≤-next ¬y<x ¬ys<xs) ... | tri> ¬xs<ys ¬xs≈ys ys<xs = tri> (¬≤-next ¬x<y ¬xs<ys) (¬xs≈ys ∘ tail) (next (sym x≈y) ys<xs) -- Some collections of properties which are preserved by Lex-≤ or -- Lex-<. ≤-isPreorder : ∀ {_≈_ _<_} → IsEquivalence _≈_ → Transitive _<_ → _<_ Respects₂ _≈_ → IsPreorder (Pointwise.Rel _≈_) (Lex-≤ _≈_ _<_) ≤-isPreorder {_≈_} {_<_} eq tr resp = record { isEquivalence = Pointwise.isEquivalence eq ; reflexive = ≤-reflexive _≈_ _<_ ; trans = transitive eq resp tr } ≤-isPartialOrder : ∀ {_≈_ _<_} → IsStrictPartialOrder _≈_ _<_ → IsPartialOrder (Pointwise.Rel _≈_) (Lex-≤ _≈_ _<_) ≤-isPartialOrder {_≈_} {_<_} spo = record { isPreorder = ≤-isPreorder isEquivalence trans <-resp-≈ ; antisym = antisymmetric Eq.sym irrefl (trans∧irr⟶asym {_≈_ = _≈_} {_<_ = _<_} Eq.refl trans irrefl) } where open IsStrictPartialOrder spo ≤-isTotalOrder : ∀ {_≈_ _<_} → IsStrictTotalOrder _≈_ _<_ → IsTotalOrder (Pointwise.Rel _≈_) (Lex-≤ _≈_ _<_) ≤-isTotalOrder sto = record { isPartialOrder = ≤-isPartialOrder (record { isEquivalence = isEquivalence ; irrefl = tri⟶irr <-resp-≈ Eq.sym compare ; trans = trans ; <-resp-≈ = <-resp-≈ }) ; total = ≤-total Eq.sym compare } where open IsStrictTotalOrder sto ≤-isDecTotalOrder : ∀ {_≈_ _<_} → IsStrictTotalOrder _≈_ _<_ → IsDecTotalOrder (Pointwise.Rel _≈_) (Lex-≤ _≈_ _<_) ≤-isDecTotalOrder sto = record { isTotalOrder = ≤-isTotalOrder sto ; _≟_ = Pointwise.decidable _≟_ ; _≤?_ = ≤-decidable _≟_ (tri⟶dec< compare) } where open IsStrictTotalOrder sto <-isStrictPartialOrder : ∀ {_≈_ _<_} → IsStrictPartialOrder _≈_ _<_ → IsStrictPartialOrder (Pointwise.Rel _≈_) (Lex-< _≈_ _<_) <-isStrictPartialOrder spo = record { isEquivalence = Pointwise.isEquivalence isEquivalence ; irrefl = <-irreflexive irrefl ; trans = transitive isEquivalence <-resp-≈ trans ; <-resp-≈ = respects₂ isEquivalence <-resp-≈ } where open IsStrictPartialOrder spo <-isStrictTotalOrder : ∀ {_≈_ _<_} → IsStrictTotalOrder _≈_ _<_ → IsStrictTotalOrder (Pointwise.Rel _≈_) (Lex-< _≈_ _<_) <-isStrictTotalOrder sto = record { isEquivalence = Pointwise.isEquivalence isEquivalence ; trans = transitive isEquivalence <-resp-≈ trans ; compare = <-compare Eq.sym compare ; <-resp-≈ = respects₂ isEquivalence <-resp-≈ } where open IsStrictTotalOrder sto -- "Packages" (e.g. preorders) can also be handled. ≤-preorder : Preorder _ _ _ → Preorder _ _ _ ≤-preorder pre = record { isPreorder = ≤-isPreorder isEquivalence trans ∼-resp-≈ } where open Preorder pre ≤-partialOrder : StrictPartialOrder _ _ _ → Poset _ _ _ ≤-partialOrder spo = record { isPartialOrder = ≤-isPartialOrder isStrictPartialOrder } where open StrictPartialOrder spo ≤-decTotalOrder : StrictTotalOrder _ _ _ → DecTotalOrder _ _ _ ≤-decTotalOrder sto = record { isDecTotalOrder = ≤-isDecTotalOrder isStrictTotalOrder } where open StrictTotalOrder sto <-strictPartialOrder : StrictPartialOrder _ _ _ → StrictPartialOrder _ _ _ <-strictPartialOrder spo = record { isStrictPartialOrder = <-isStrictPartialOrder isStrictPartialOrder } where open StrictPartialOrder spo <-strictTotalOrder : StrictTotalOrder _ _ _ → StrictTotalOrder _ _ _ <-strictTotalOrder sto = record { isStrictTotalOrder = <-isStrictTotalOrder isStrictTotalOrder } where open StrictTotalOrder sto
{ "alphanum_fraction": 0.5205547712, "avg_line_length": 39.6085526316, "ext": "agda", "hexsha": "c2dc3cfce968dd0438c3f1c3df97335422b92158", "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/Binary/List/StrictLex.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/Binary/List/StrictLex.agda", "max_line_length": 77, "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/Binary/List/StrictLex.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": 4610, "size": 12041 }
open import Relation.Binary.PropositionalEquality module Experiments.STLCRef (funext : ∀ {a b} → Extensionality a b) where open import Level open import Data.Nat open import Data.Unit as Unit open import Data.List open import Data.List.Most open import Data.Product open import Data.Maybe as Maybe hiding (All) open import Function as Fun using (case_of_) import Relation.Binary.PropositionalEquality as PEq open PEq.≡-Reasoning data Ty : Set where unit : Ty arrow : (a b : Ty) → Ty ref : Ty → Ty open import Experiments.Category (⊑-preorder {A = Ty}) Ctx = List Ty StoreTy = List Ty data Expr (Γ : List Ty) : Ty → Set where var : ∀ {t} → t ∈ Γ → Expr Γ t ƛ : ∀ {a b} → Expr (a ∷ Γ) b → Expr Γ (arrow a b) app : ∀ {a b} → Expr Γ (arrow a b) → Expr Γ a → Expr Γ b unit : Expr Γ unit ref : ∀ {t} → Expr Γ t → Expr Γ (ref t) !_ : ∀ {t} → Expr Γ (ref t) → Expr Γ t _≔_ : ∀ {t} → Expr Γ (ref t) → Expr Γ t → Expr Γ unit mutual Env : (Γ : Ctx)(Σ : StoreTy) → Set Env Γ Σ = All (λ t → Val t Σ) Γ data Val : Ty → List Ty → Set where unit : ∀ {Σ} → Val unit Σ ⟨_,_⟩ : ∀ {Σ Γ a b} → Expr (a ∷ Γ) b → Env Γ Σ → Val (arrow a b) Σ loc : ∀ {Σ t} → t ∈ Σ → Val (ref t) Σ weaken-all : ∀ {i}{A : Set i}{j}{B : Set j}{xs : List B} {k}{C : B → List A → Set k}( wₐ : ∀ {x} {bs cs} → bs ⊑ cs → C x bs → C x cs) → ∀ {bs cs} → bs ⊑ cs → All (λ x → C x bs) xs → All (λ x → C x cs) xs weaken-all wₐ ext x = map-all (λ y → wₐ ext y) x mutual weaken-val : ∀ {a : Ty}{Σ Σ' : StoreTy} → Σ ⊑ Σ' → Val a Σ → Val a Σ' weaken-val ext unit = unit weaken-val ext ⟨ e , E ⟩ = ⟨ e , weaken-env ext E ⟩ weaken-val ext (loc l) = loc (∈-⊒ l ext) weaken-env : ∀ {Γ}{Σ Σ' : StoreTy} → Σ ⊑ Σ' → Env Γ Σ → Env Γ Σ' weaken-env ext (v ∷ vs) = weaken-val ext v ∷ weaken-env ext vs weaken-env ext [] = [] -- weaken-env : ∀ {Γ}{Σ Σ' : StoreTy} → Σ ⊑ Σ' → Env Γ Σ → Env Γ Σ' -- weaken-env ext E = weaken-all weaken-val ext E import Relation.Binary.HeterogeneousEquality as H mutual clo-cong : ∀ {Γ a t Σ}{e e' : Expr (a ∷ Γ) t}{E E' : Env Γ Σ} → e ≡ e' → E ≡ E' → ⟨ e , E ⟩ ≡ ⟨ e' , E' ⟩ clo-cong refl refl = refl mono-val-refl : ∀ {t c}{ext : c ⊑ c}(p : Val t c) → weaken-val ext p ≡ p mono-val-refl unit = refl mono-val-refl ⟨ e , E ⟩ = clo-cong refl (mono-env-refl E) mono-val-refl (loc l) = {!!} mono-env-refl : ∀ {Γ c}{ext : c ⊑ c}(p : Env Γ c) → weaken-env ext p ≡ p mono-env-refl [] = refl mono-env-refl (v ∷ vs) = {!!} Val' : Ty → MP₀ Val' t = mp (Val t) (record { monotone = weaken-val ; monotone-refl = mono-val-refl ; monotone-trans = {!!} }) Env' : List Ty → MP₀ Env' Γ = mp (Env Γ) (record { monotone = weaken-env ; monotone-refl = mono-env-refl ; monotone-trans = {!!} }) open import Experiments.StrongMonad Ty Val' funext meq' : ∀ {Σ' b}{B : World → Set b}{Γ}{f g : (Σ : World) → Σ' ⊑ Σ → Env' Γ · Σ → Store Σ → B Σ} → (∀ Σ → (ext : Σ' ⊑ Σ) → (E : Env' Γ · Σ) → (μ : Store Σ) → f Σ ext E μ ≡ g Σ ext E μ) → f ≡ g meq' p = funext λ Σ → funext λ ext → funext λ E → funext λ μ → p Σ ext E μ M' : ∀ {ℓ} → List Ty → MP ℓ → MP ℓ M' Γ P = mp (λ Σ → ∀ Σ₁ → Σ ⊑ Σ₁ → Env' Γ · Σ₁ → Store Σ₁ → Maybe (∃ λ Σ₂ → Σ₂ ⊒ Σ₁ × Store Σ₂ × P · Σ₂)) record { monotone = λ w₀ f Σ w₁ E μ → f Σ (⊑-trans w₀ w₁) E μ ; monotone-refl = λ f → meq' (λ Σ₁ _ E μ → cong (λ u → f Σ₁ u E μ) ⊑-trans-refl) ; monotone-trans = λ f w₀ w₁ → meq' (λ Σ₁ w₂ E μ → cong (λ u → f Σ₁ u E μ) (sym ⊑-trans-assoc)) } Const : ∀ (T : Set) → MP₀ Const T = mp (λ _ → T) ((record { monotone = λ x x₁ → x₁ ; monotone-refl = λ _ → refl ; monotone-trans = λ _ _ _ → refl })) -- one : ∀ {Γ} → M' Γ One -- one = ? η' : ∀ {Γ}{p}(P : MP p) → P ⇒ M' Γ P η' P = mk⇒ (λ p Σ ext _ μ → just (Σ , ⊑-refl , μ , MP.monotone P ext p)) (λ c~c' {p} → begin (λ z ext E μ → just (z , ⊑-refl , μ , MP.monotone P ext (MP.monotone P c~c' p))) ≡⟨ meq' (λ z ext E μ → cong (λ u → just (z , ⊑-refl , μ , u)) (sym (MP.monotone-trans P p c~c' ext))) ⟩ (λ z ext E μ → just (z , ⊑-refl , μ , MP.monotone P (⊑-trans c~c' ext) p)) ≡⟨ refl ⟩ MP.monotone (M' _ P) c~c' (λ z ext E μ → just (z , ⊑-refl , μ , MP.monotone P ext p)) ∎) -- necessary because Agda's unification is shaky for pattern matching -- lambdas join : ∀ {l}{a : Set l} → Maybe (Maybe a) → Maybe a join nothing = nothing join (just nothing) = nothing join (just (just x)) = just x μ' : ∀ {Γ}{p}(P : MP p) → M' Γ (M' Γ P) ⇒ M' Γ P μ' P = mk⇒ (λ pc Σ₁ ext E μ → join (case pc Σ₁ ext E μ of (Maybe.map (λ{ (Σ₂ , ext₁ , μ₁ , f) → case f Σ₂ ⊑-refl (weaken-env ext₁ E) μ₁ of (Maybe.map (λ{ (Σ₃ , ext₂ , μ₂ , v) → Σ₃ , ⊑-trans ext₁ ext₂ , μ₂ , v })) })))) (λ c~c' → refl) fmap' : ∀ {Γ p q}{P : MP p}{Q : MP q} → (P ⇒ Q) → M' Γ P ⇒ M' Γ Q fmap' F = mk⇒ (λ x Σ₁ ext E μ → case x Σ₁ ext E μ of Maybe.map (λ{ (Σ₂ , ext₁ , μ₁ , v) → Σ₂ , ext₁ , μ₁ , apply F v })) (λ c~c' → refl) bind' : ∀ {p q}{P : MP p}{Q : MP q}{Γ} → (P ⇒ M' Γ Q) → M' Γ P ⇒ M' Γ Q bind' {Q = Q} F = μ' Q ∘ fmap' F -- mbind : ∀ {p q}{P : MP p}{Q : MP q}{Γ Σ} → -- M' Γ P · Σ → -- (∀ {Σ'} → P · Σ' → M' Γ Q · Σ') → M' Γ Q · Σ -- mbind f g Σ ext E μ = -- case (f Σ ext E μ) of (λ{ -- nothing → nothing -- ; (just (Σ₁ , ext₁ , μ₁ , v)) → -- bind' -- case g v Σ₁ ⊑-refl (weaken-env ext₁ E) μ₁ of (λ{ -- nothing → nothing -- ; (just (Σ₂ , ext₂ , μ₂ , v')) → -- just (Σ₂ , ⊑-trans ext₁ ext₂ , μ₂ , v') -- }) -- }) mbind : ∀ {p q}{P : MP p}{Q : MP q}{Γ Σ} → M' Γ P · Σ → (P ⇒ M' Γ Q) → M' Γ Q · Σ mbind {_} {_} {P} {Q} f g = apply (bind' {_} {_} {P} {Q} g) f return : ∀ {p}{P : MP p}{Γ Σ} → P · Σ → M' Γ P · Σ return {_} {P} p = apply (η' P) p timeout : ∀ {P Q : MP₀}{Γ} → P ⇒ M' Γ Q timeout = mk⇒ (λ _ _ _ _ _ → nothing) (λ _ → refl) getEnv : ∀ {Γ Σ} → M' Γ (Env' Γ) · Σ getEnv {Γ} Σ ext E μ = (return {_} {Env' Γ} E) Σ ⊑-refl E μ setEnv : ∀ {P : MP₀}{Γ Γ' Σ} → Env' Γ' · Σ → M' Γ' P · Σ → M' Γ P · Σ setEnv E f Σ ext _ = f Σ ext (weaken-env ext E) open Product strength : ∀ {Γ}{Q P : MP₀} → Q ⊗ M' Γ P ⇒ M' Γ (Q ⊗ P) strength {_} {Q} = mk⇒ (λ p Σ ext E μ → case p of λ{ (x , y) → case y Σ ext E μ of Maybe.map (λ{ (Σ₁ , ext₁ , μ₁ , v) → (Σ₁ , ext₁ , μ₁ , (MP.monotone Q (⊑-trans ext ext₁) x , v)) })}) (λ c~c' → {!!}) -- eval : ℕ → ∀ {Γ t} → Const (Expr Γ t) ⇒ M' Γ (Val' t) -- eval zero = timeout {_} {Val' _} -- eval (suc k) = -- mk⇒ (λ{ unit → -- return {_} {Val' unit} unit -- ; (var x) → -- (mbind {_} {_} {Env' _} {Val' _} -- getEnv -- (mk⇒ -- (λ E → -- return {_} {Val' _} (lookup E x)) -- (λ c~c' → {- ugh -} {!!}))) -- ; (app {a} {b} e1 e2) → -- (mbind {_} {_} {Val' (arrow a b)} {Val' b} -- (apply (eval k) e1) -- (mk⇒ (λ{ (⟨_,_⟩ {_} {Γ} e E) → -- (mbind {_} {_} {Env' Γ ⊗ Val' a} {Val' b} -- (apply (strength {_} {Env' Γ} {Val' a}) (E , apply (eval k) e2)) -- (mk⇒ -- (λ{ (E' , v) → -- setEnv {Val' b} (v ∷ E') -- (apply (eval k) e) }) -- (λ c~c' → {!!}))) -- }) -- λ c~c' → {!!} )) -- ; _ → {!!} }) -- (λ c~c' → {!!}) eval : ℕ → ∀ {Γ t} → Const (Expr Γ t) ⇒ M' Γ (Val' t) eval zero = timeout {_} {Val' _} eval (suc k) = mk⇒ (λ{ unit → apply (η' (Val' unit)) unit ; (var x) → apply (bind' {_} {_} {Env' _} {Val' _} (mk⇒ (λ E → apply (η' (Val' _)) (lookup E x)) (λ c~c' → {- ugh -} {!!}))) getEnv ; (app {a} {b} e1 e2) → apply (bind' {_} {_} {Val' (arrow a b)} {Val' b} (mk⇒ (λ{ (⟨_,_⟩ {_} {Γ} e E) → apply (bind' {_} {_} {Env' Γ ⊗ Val' a} {Val' b} (mk⇒ (λ{ (E' , v) → setEnv {Val' b} (v ∷ E') (apply (eval k) e) }) (λ c~c' → {!!}))) (apply (strength {_} {Env' Γ} {Val' a}) (E , apply (eval k) e2)) }) λ c~c' → {!!} )) (apply (eval k) e1) ; _ → {!!} }) (λ c~c' → {!!})
{ "alphanum_fraction": 0.4098735833, "avg_line_length": 35.1570881226, "ext": "agda", "hexsha": "9123a00e11fa5b63abfb57ca4fefe4cda5b178c7", "lang": "Agda", "max_forks_count": 1, "max_forks_repo_forks_event_max_datetime": "2021-12-28T17:38:05.000Z", "max_forks_repo_forks_event_min_datetime": "2021-12-28T17:38:05.000Z", "max_forks_repo_head_hexsha": "0c096fea1716d714db0ff204ef2a9450b7a816df", "max_forks_repo_licenses": [ "Apache-2.0" ], "max_forks_repo_name": "metaborg/mj.agda", "max_forks_repo_path": "src/Experiments/STLCRef.agda", "max_issues_count": 1, "max_issues_repo_head_hexsha": "0c096fea1716d714db0ff204ef2a9450b7a816df", "max_issues_repo_issues_event_max_datetime": "2020-10-14T13:41:58.000Z", "max_issues_repo_issues_event_min_datetime": "2019-01-13T13:03:47.000Z", "max_issues_repo_licenses": [ "Apache-2.0" ], "max_issues_repo_name": "metaborg/mj.agda", "max_issues_repo_path": "src/Experiments/STLCRef.agda", "max_line_length": 111, "max_stars_count": 10, "max_stars_repo_head_hexsha": "0c096fea1716d714db0ff204ef2a9450b7a816df", "max_stars_repo_licenses": [ "Apache-2.0" ], "max_stars_repo_name": "metaborg/mj.agda", "max_stars_repo_path": "src/Experiments/STLCRef.agda", "max_stars_repo_stars_event_max_datetime": "2021-09-24T08:02:33.000Z", "max_stars_repo_stars_event_min_datetime": "2017-11-17T17:10:36.000Z", "num_tokens": 3625, "size": 9176 }
module BTree.Heap {A : Set}(_≤_ : A → A → Set) where open import BTree {A} data Heap : BTree → Set where leaf : Heap leaf single : (x : A) → Heap (node x leaf leaf) left : {l r : BTree}{x y : A} → x ≤ y → Heap (node y l r) → Heap (node x (node y l r) leaf) right : {l r : BTree}{x y : A} → x ≤ y → Heap (node y l r) → Heap (node x leaf (node y l r)) both : {l r l' r' : BTree}{x y y' : A} → x ≤ y → x ≤ y' → Heap (node y l r) → Heap (node y' l' r') → Heap (node x (node y l r) (node y' l' r'))
{ "alphanum_fraction": 0.3565683646, "avg_line_length": 32.4347826087, "ext": "agda", "hexsha": "f836cd340135863f252190b92d4ceb6b986d1d98", "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": "b8d428bccbdd1b13613e8f6ead6c81a8f9298399", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "bgbianchi/sorting", "max_forks_repo_path": "agda/BTree/Heap.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "b8d428bccbdd1b13613e8f6ead6c81a8f9298399", "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": "bgbianchi/sorting", "max_issues_repo_path": "agda/BTree/Heap.agda", "max_line_length": 63, "max_stars_count": 6, "max_stars_repo_head_hexsha": "b8d428bccbdd1b13613e8f6ead6c81a8f9298399", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "bgbianchi/sorting", "max_stars_repo_path": "agda/BTree/Heap.agda", "max_stars_repo_stars_event_max_datetime": "2021-08-24T22:11:15.000Z", "max_stars_repo_stars_event_min_datetime": "2015-05-21T12:50:35.000Z", "num_tokens": 231, "size": 746 }
{- This second-order equational theory was created from the following second-order syntax description: syntax PropLog | PR type * : 0-ary term false : * | ⊥ or : * * -> * | _∨_ l20 true : * | ⊤ and : * * -> * | _∧_ l30 not : * -> * | ¬_ r50 theory (⊥U∨ᴸ) a |> or (false, a) = a (⊥U∨ᴿ) a |> or (a, false) = a (∨A) a b c |> or (or(a, b), c) = or (a, or(b, c)) (∨C) a b |> or(a, b) = or(b, a) (⊤U∧ᴸ) a |> and (true, a) = a (⊤U∧ᴿ) a |> and (a, true) = a (∧A) a b c |> and (and(a, b), c) = and (a, and(b, c)) (∧D∨ᴸ) a b c |> and (a, or (b, c)) = or (and(a, b), and(a, c)) (∧D∨ᴿ) a b c |> and (or (a, b), c) = or (and(a, c), and(b, c)) (⊥X∧ᴸ) a |> and (false, a) = false (⊥X∧ᴿ) a |> and (a, false) = false (¬N∨ᴸ) a |> or (not (a), a) = false (¬N∨ᴿ) a |> or (a, not (a)) = false (∧C) a b |> and(a, b) = and(b, a) (∨I) a |> or(a, a) = a (∧I) a |> and(a, a) = a (¬²) a |> not(not (a)) = a (∨D∧ᴸ) a b c |> or (a, and (b, c)) = and (or(a, b), or(a, c)) (∨D∧ᴿ) a b c |> or (and (a, b), c) = and (or(a, c), or(b, c)) (∨B∧ᴸ) a b |> or (and (a, b), a) = a (∨B∧ᴿ) a b |> or (a, and (a, b)) = a (∧B∨ᴸ) a b |> and (or (a, b), a) = a (∧B∨ᴿ) a b |> and (a, or (a, b)) = a (⊤X∨ᴸ) a |> or (true, a) = true (⊤X∨ᴿ) a |> or (a, true) = true (¬N∧ᴸ) a |> and (not (a), a) = false (¬N∧ᴿ) a |> and (a, not (a)) = false (DM∧) a b |> not (and (a, b)) = or (not(a), not(b)) (DM∨) a b |> not (or (a, b)) = and (not(a), not(b)) -} module PropLog.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 PropLog.Signature open import PropLog.Syntax open import SOAS.Metatheory.SecondOrder.Metasubstitution PR:Syn open import SOAS.Metatheory.SecondOrder.Equality PR:Syn private variable α β γ τ : *T Γ Δ Π : Ctx infix 1 _▹_⊢_≋ₐ_ -- Axioms of equality data _▹_⊢_≋ₐ_ : ∀ 𝔐 Γ {α} → (𝔐 ▷ PR) α Γ → (𝔐 ▷ PR) α Γ → Set where ⊥U∨ᴸ : ⁅ * ⁆̣ ▹ ∅ ⊢ ⊥ ∨ 𝔞 ≋ₐ 𝔞 ∨A : ⁅ * ⁆ ⁅ * ⁆ ⁅ * ⁆̣ ▹ ∅ ⊢ (𝔞 ∨ 𝔟) ∨ 𝔠 ≋ₐ 𝔞 ∨ (𝔟 ∨ 𝔠) ∨C : ⁅ * ⁆ ⁅ * ⁆̣ ▹ ∅ ⊢ 𝔞 ∨ 𝔟 ≋ₐ 𝔟 ∨ 𝔞 ⊤U∧ᴸ : ⁅ * ⁆̣ ▹ ∅ ⊢ ⊤ ∧ 𝔞 ≋ₐ 𝔞 ∧A : ⁅ * ⁆ ⁅ * ⁆ ⁅ * ⁆̣ ▹ ∅ ⊢ (𝔞 ∧ 𝔟) ∧ 𝔠 ≋ₐ 𝔞 ∧ (𝔟 ∧ 𝔠) ∧D∨ᴸ : ⁅ * ⁆ ⁅ * ⁆ ⁅ * ⁆̣ ▹ ∅ ⊢ 𝔞 ∧ (𝔟 ∨ 𝔠) ≋ₐ (𝔞 ∧ 𝔟) ∨ (𝔞 ∧ 𝔠) ⊥X∧ᴸ : ⁅ * ⁆̣ ▹ ∅ ⊢ ⊥ ∧ 𝔞 ≋ₐ ⊥ ¬N∨ᴸ : ⁅ * ⁆̣ ▹ ∅ ⊢ (¬ 𝔞) ∨ 𝔞 ≋ₐ ⊥ ∧C : ⁅ * ⁆ ⁅ * ⁆̣ ▹ ∅ ⊢ 𝔞 ∧ 𝔟 ≋ₐ 𝔟 ∧ 𝔞 ∨I : ⁅ * ⁆̣ ▹ ∅ ⊢ 𝔞 ∨ 𝔞 ≋ₐ 𝔞 ∧I : ⁅ * ⁆̣ ▹ ∅ ⊢ 𝔞 ∧ 𝔞 ≋ₐ 𝔞 ¬² : ⁅ * ⁆̣ ▹ ∅ ⊢ ¬ (¬ 𝔞) ≋ₐ 𝔞 ∨D∧ᴸ : ⁅ * ⁆ ⁅ * ⁆ ⁅ * ⁆̣ ▹ ∅ ⊢ 𝔞 ∨ (𝔟 ∧ 𝔠) ≋ₐ (𝔞 ∨ 𝔟) ∧ (𝔞 ∨ 𝔠) ∨B∧ᴸ : ⁅ * ⁆ ⁅ * ⁆̣ ▹ ∅ ⊢ (𝔞 ∧ 𝔟) ∨ 𝔞 ≋ₐ 𝔞 ∧B∨ᴸ : ⁅ * ⁆ ⁅ * ⁆̣ ▹ ∅ ⊢ (𝔞 ∨ 𝔟) ∧ 𝔞 ≋ₐ 𝔞 ⊤X∨ᴸ : ⁅ * ⁆̣ ▹ ∅ ⊢ ⊤ ∨ 𝔞 ≋ₐ ⊤ ¬N∧ᴸ : ⁅ * ⁆̣ ▹ ∅ ⊢ (¬ 𝔞) ∧ 𝔞 ≋ₐ ⊥ DM∧ : ⁅ * ⁆ ⁅ * ⁆̣ ▹ ∅ ⊢ ¬ (𝔞 ∧ 𝔟) ≋ₐ (¬ 𝔞) ∨ (¬ 𝔟) DM∨ : ⁅ * ⁆ ⁅ * ⁆̣ ▹ ∅ ⊢ ¬ (𝔞 ∨ 𝔟) ≋ₐ (¬ 𝔞) ∧ (¬ 𝔟) open EqLogic _▹_⊢_≋ₐ_ open ≋-Reasoning -- Derived equations ⊥U∨ᴿ : ⁅ * ⁆̣ ▹ ∅ ⊢ 𝔞 ∨ ⊥ ≋ 𝔞 ⊥U∨ᴿ = tr (ax ∨C with《 𝔞 ◃ ⊥ 》) (ax ⊥U∨ᴸ with《 𝔞 》) ⊤U∧ᴿ : ⁅ * ⁆̣ ▹ ∅ ⊢ 𝔞 ∧ ⊤ ≋ 𝔞 ⊤U∧ᴿ = tr (ax ∧C with《 𝔞 ◃ ⊤ 》) (ax ⊤U∧ᴸ with《 𝔞 》) ∧D∨ᴿ : ⁅ * ⁆ ⁅ * ⁆ ⁅ * ⁆̣ ▹ ∅ ⊢ (𝔞 ∨ 𝔟) ∧ 𝔠 ≋ (𝔞 ∧ 𝔠) ∨ (𝔟 ∧ 𝔠) ∧D∨ᴿ = begin (𝔞 ∨ 𝔟) ∧ 𝔠 ≋⟨ ax ∧C with《 𝔞 ∨ 𝔟 ◃ 𝔠 》 ⟩ 𝔠 ∧ (𝔞 ∨ 𝔟) ≋⟨ ax ∧D∨ᴸ with《 𝔠 ◃ 𝔞 ◃ 𝔟 》 ⟩ (𝔠 ∧ 𝔞) ∨ (𝔠 ∧ 𝔟) ≋⟨ cong₂[ ax ∧C with《 𝔠 ◃ 𝔞 》 ][ ax ∧C with《 𝔠 ◃ 𝔟 》 ]inside ◌ᵈ ∨ ◌ᵉ ⟩ (𝔞 ∧ 𝔠) ∨ (𝔟 ∧ 𝔠) ∎ ⊥X∧ᴿ : ⁅ * ⁆̣ ▹ ∅ ⊢ 𝔞 ∧ ⊥ ≋ ⊥ ⊥X∧ᴿ = tr (ax ∧C with《 𝔞 ◃ ⊥ 》) (ax ⊥X∧ᴸ with《 𝔞 》) ¬N∨ᴿ : ⁅ * ⁆̣ ▹ ∅ ⊢ 𝔞 ∨ (¬ 𝔞) ≋ ⊥ ¬N∨ᴿ = tr (ax ∨C with《 𝔞 ◃ (¬ 𝔞) 》) (ax ¬N∨ᴸ with《 𝔞 》) ∨D∧ᴿ : ⁅ * ⁆ ⁅ * ⁆ ⁅ * ⁆̣ ▹ ∅ ⊢ (𝔞 ∧ 𝔟) ∨ 𝔠 ≋ (𝔞 ∨ 𝔠) ∧ (𝔟 ∨ 𝔠) ∨D∧ᴿ = begin (𝔞 ∧ 𝔟) ∨ 𝔠 ≋⟨ ax ∨C with《 𝔞 ∧ 𝔟 ◃ 𝔠 》 ⟩ 𝔠 ∨ (𝔞 ∧ 𝔟) ≋⟨ ax ∨D∧ᴸ with《 𝔠 ◃ 𝔞 ◃ 𝔟 》 ⟩ (𝔠 ∨ 𝔞) ∧ (𝔠 ∨ 𝔟) ≋⟨ cong₂[ ax ∨C with《 𝔠 ◃ 𝔞 》 ][ ax ∨C with《 𝔠 ◃ 𝔟 》 ]inside ◌ᵈ ∧ ◌ᵉ ⟩ (𝔞 ∨ 𝔠) ∧ (𝔟 ∨ 𝔠) ∎ ∨B∧ᴿ : ⁅ * ⁆ ⁅ * ⁆̣ ▹ ∅ ⊢ 𝔞 ∨ (𝔞 ∧ 𝔟) ≋ 𝔞 ∨B∧ᴿ = tr (ax ∨C with《 𝔞 ◃ (𝔞 ∧ 𝔟) 》) (ax ∨B∧ᴸ with《 𝔞 ◃ 𝔟 》) ∧B∨ᴿ : ⁅ * ⁆ ⁅ * ⁆̣ ▹ ∅ ⊢ 𝔞 ∧ (𝔞 ∨ 𝔟) ≋ 𝔞 ∧B∨ᴿ = tr (ax ∧C with《 𝔞 ◃ (𝔞 ∨ 𝔟) 》) (ax ∧B∨ᴸ with《 𝔞 ◃ 𝔟 》) ⊤X∨ᴿ : ⁅ * ⁆̣ ▹ ∅ ⊢ 𝔞 ∨ ⊤ ≋ ⊤ ⊤X∨ᴿ = tr (ax ∨C with《 𝔞 ◃ ⊤ 》) (ax ⊤X∨ᴸ with《 𝔞 》) ¬N∧ᴿ : ⁅ * ⁆̣ ▹ ∅ ⊢ 𝔞 ∧ (¬ 𝔞) ≋ ⊥ ¬N∧ᴿ = tr (ax ∧C with《 𝔞 ◃ (¬ 𝔞) 》) (ax ¬N∧ᴸ with《 𝔞 》)
{ "alphanum_fraction": 0.348518851, "avg_line_length": 35.935483871, "ext": "agda", "hexsha": "e573b88b454f0e56fb967d0c30aa0fd7f48e83a5", "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/PropLog/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/PropLog/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/PropLog/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": 3205, "size": 4456 }
{- 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 -} import LibraBFT.Impl.Types.LedgerInfoWithSignatures as LedgerInfoWithSignatures open import LibraBFT.ImplShared.Consensus.Types open import Util.PKCS module LibraBFT.Impl.Types.CryptoProxies where addToLi : AccountAddress → Signature → LedgerInfoWithSignatures → LedgerInfoWithSignatures addToLi = LedgerInfoWithSignatures.addSignature
{ "alphanum_fraction": 0.8177172061, "avg_line_length": 36.6875, "ext": "agda", "hexsha": "e04edcef8a5bf74e087d53bce88030649a64e25c", "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/Types/CryptoProxies.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/Types/CryptoProxies.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/Types/CryptoProxies.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 150, "size": 587 }
module cfg where open import Level renaming ( suc to succ ; zero to Zero ) open import Data.Nat hiding ( _≟_ ) open import Data.Fin open import Data.Product open import Data.List open import Data.Maybe open import Data.Bool using ( Bool ; true ; false ; _∧_ ; _∨_ ) open import Relation.Binary.PropositionalEquality hiding ( [_] ) open import Relation.Nullary using (¬_; Dec; yes; no) -- open import Data.String data IsTerm (Token : Set) : Set (succ Zero) where isTerm : Token → IsTerm Token noTerm : IsTerm Token record CFGGrammer (Token Node : Set) : Set (succ Zero) where field cfg : Node → List ( List ( Node ) ) cfgtop : Node term? : Node → IsTerm Token tokensz : ℕ tokenid : Token → Fin tokensz open CFGGrammer ----------------- -- -- CGF language -- ----------------- split : {Σ : Set} → (List Σ → Bool) → ( List Σ → Bool) → List Σ → Bool split x y [] = x [] ∧ y [] split x y (h ∷ t) = (x [] ∧ y (h ∷ t)) ∨ split (λ t1 → x ( h ∷ t1 )) (λ t2 → y t2 ) t cfg-language0 : {Node Token : Set} → CFGGrammer Token Node → List (List Node ) → List Token → Bool {-# TERMINATING #-} cfg-language2 : {Node Token : Set} → CFGGrammer Token Node → Node → List Token → Bool cfg-language2 cg _ [] = false cfg-language2 cg x (h1 ∷ [] ) with term? cg x cfg-language2 cg x (h1 ∷ []) | isTerm t with tokenid cg h1 ≟ tokenid cg t cfg-language2 cg x (h1 ∷ []) | isTerm t | yes p = true cfg-language2 cg x (h1 ∷ []) | isTerm t | no ¬p = false cfg-language2 cg x (h1 ∷ []) | noTerm = cfg-language0 cg (cfg cg x) ( h1 ∷ [] ) cfg-language2 cg x In with term? cg x cfg-language2 cg x In | isTerm t = false cfg-language2 cg x In | noTerm = cfg-language0 cg (cfg cg x ) In cfg-language1 : {Node Token : Set} → CFGGrammer Token Node → List Node → List Token → Bool cfg-language1 cg [] [] = true cfg-language1 cg [] _ = false cfg-language1 cg (node ∷ T) = split ( cfg-language2 cg node ) ( cfg-language1 cg T ) cfg-language0 cg [] [] = true cfg-language0 cg [] _ = false cfg-language0 cg (node ∷ T) In = cfg-language1 cg node In ∨ cfg-language0 cg T In cfg-language : {Node Token : Set} → CFGGrammer Token Node → List Token → Bool cfg-language cg = cfg-language0 cg (cfg cg (cfgtop cg)) ----------------- data IFToken : Set where t:EA : IFToken t:EB : IFToken t:EC : IFToken t:IF : IFToken t:THEN : IFToken t:ELSE : IFToken t:SA : IFToken t:SB : IFToken t:SC : IFToken IFtokenid : IFToken → Fin 9 IFtokenid t:EA = # 0 IFtokenid t:EB = # 1 IFtokenid t:EC = # 2 IFtokenid t:IF = # 3 IFtokenid t:THEN = # 4 IFtokenid t:ELSE = # 5 IFtokenid t:SA = # 6 IFtokenid t:SB = # 7 IFtokenid t:SC = # 8 data IFNode (T : Set) : Set where Token : T → IFNode T expr : IFNode T statement : IFNode T IFGrammer : CFGGrammer IFToken (IFNode IFToken) IFGrammer = record { cfg = cfg' ; cfgtop = statement ; term? = term?' ; tokensz = 9 ; tokenid = IFtokenid } where term?' : IFNode IFToken → IsTerm IFToken term?' (Token x) = isTerm x term?' _ = noTerm cfg' : IFNode IFToken → List ( List (IFNode IFToken) ) cfg' (Token t) = ( (Token t) ∷ [] ) ∷ [] cfg' expr = ( Token t:EA ∷ [] ) ∷ ( Token t:EB ∷ [] ) ∷ ( Token t:EC ∷ [] ) ∷ [] cfg' statement = ( Token t:SA ∷ [] ) ∷ ( Token t:SB ∷ [] ) ∷ ( Token t:SC ∷ [] ) ∷ ( Token t:IF ∷ expr ∷ statement ∷ [] ) ∷ ( Token t:IF ∷ expr ∷ statement ∷ Token t:ELSE ∷ statement ∷ [] ) ∷ [] cfgtest1 = cfg-language IFGrammer ( t:SA ∷ [] ) cfgtest2 = cfg-language2 IFGrammer (Token t:SA) ( t:SA ∷ [] ) cfgtest3 = cfg-language1 IFGrammer (Token t:SA ∷ [] ) ( t:SA ∷ [] ) cfgtest4 = cfg-language IFGrammer (t:IF ∷ t:EA ∷ t:SA ∷ [] ) cfgtest5 = cfg-language1 IFGrammer (Token t:IF ∷ expr ∷ statement ∷ []) (t:IF ∷ t:EA ∷ t:EA ∷ [] ) cfgtest6 = cfg-language2 IFGrammer statement (t:IF ∷ t:EA ∷ t:SA ∷ [] ) cfgtest7 = cfg-language1 IFGrammer (Token t:IF ∷ expr ∷ statement ∷ Token t:ELSE ∷ statement ∷ []) (t:IF ∷ t:EA ∷ t:SA ∷ t:ELSE ∷ t:SB ∷ [] ) cfgtest8 = cfg-language IFGrammer (t:IF ∷ t:EA ∷ t:IF ∷ t:EB ∷ t:SA ∷ t:ELSE ∷ t:SB ∷ [] )
{ "alphanum_fraction": 0.5733240223, "avg_line_length": 32.3007518797, "ext": "agda", "hexsha": "550b41a4627949f878814f0b9cac26608dc357e2", "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": "eba0538f088f3d0c0fedb19c47c081954fbc69cb", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "shinji-kono/automaton-in-agda", "max_forks_repo_path": "src/cfg.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "eba0538f088f3d0c0fedb19c47c081954fbc69cb", "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/automaton-in-agda", "max_issues_repo_path": "src/cfg.agda", "max_line_length": 147, "max_stars_count": null, "max_stars_repo_head_hexsha": "eba0538f088f3d0c0fedb19c47c081954fbc69cb", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "shinji-kono/automaton-in-agda", "max_stars_repo_path": "src/cfg.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 1540, "size": 4296 }
{-# OPTIONS --cubical --safe #-} module Data.Sum where open import Level open import Cubical.Data.Sum using (_⊎_; inl; inr) public open import Data.Bool using (Bool; true; false) open import Function using (const) either : ∀ {ℓ} {C : A ⊎ B → Type ℓ} → ((a : A) → C (inl a)) → ((b : B) → C (inr b)) → (x : A ⊎ B) → C x either f _ (inl x) = f x either _ g (inr y) = g y ⟦l_,r_⟧ = either either′ : (A → C) → (B → C) → (A ⊎ B) → C either′ = either is-l : A ⊎ B → Bool is-l = either′ (const true) (const false) map-⊎ : ∀ {a₁ a₂ b₁ b₂} {A₁ : Type a₁} {A₂ : Type a₂} {B₁ : Type b₁} {B₂ : Type b₂} → (A₁ → A₂) → (B₁ → B₂) → (A₁ ⊎ B₁) → (A₂ ⊎ B₂) map-⊎ f g (inl x) = inl (f x) map-⊎ f g (inr x) = inr (g x) mapˡ : (A → B) → A ⊎ C → B ⊎ C mapˡ f (inl x) = inl (f x) mapˡ f (inr x) = inr x mapʳ : (A → B) → C ⊎ A → C ⊎ B mapʳ f (inl x) = inl x mapʳ f (inr x) = inr (f x)
{ "alphanum_fraction": 0.5022172949, "avg_line_length": 23.7368421053, "ext": "agda", "hexsha": "a3aa1d0a28e2718266a4c7344e9a9a2892c1693e", "lang": "Agda", "max_forks_count": 1, "max_forks_repo_forks_event_max_datetime": "2021-01-05T14:05:30.000Z", "max_forks_repo_forks_event_min_datetime": "2021-01-05T14:05:30.000Z", "max_forks_repo_head_hexsha": "3c176d4690566d81611080e9378f5a178b39b851", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "oisdk/combinatorics-paper", "max_forks_repo_path": "agda/Data/Sum.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "3c176d4690566d81611080e9378f5a178b39b851", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "oisdk/combinatorics-paper", "max_issues_repo_path": "agda/Data/Sum.agda", "max_line_length": 85, "max_stars_count": 4, "max_stars_repo_head_hexsha": "3c176d4690566d81611080e9378f5a178b39b851", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "oisdk/combinatorics-paper", "max_stars_repo_path": "agda/Data/Sum.agda", "max_stars_repo_stars_event_max_datetime": "2021-01-05T15:32:14.000Z", "max_stars_repo_stars_event_min_datetime": "2021-01-05T14:07:44.000Z", "num_tokens": 433, "size": 902 }
open import Agda.Builtin.Reflection renaming (bindTC to _>>=_) open import Agda.Builtin.Sigma open import Agda.Builtin.List open import Agda.Builtin.Unit open import Agda.Builtin.Nat open import Agda.Builtin.Equality infixr 0 _$_ _$_ : ∀ {a b}{A : Set a}{B : Set b} → (A → B) → (A → B) f $ x = f x map : {A B : Set} → (A → B) → List A → List B map f [] = [] map f (x ∷ xs) = f x ∷ map f xs reverseAcc : {A : Set} → List A → List A → List A reverseAcc [] ys = ys reverseAcc (x ∷ xs) ys = reverseAcc xs (x ∷ ys) reverse : {A : Set} → List A → List A reverse xs = reverseAcc xs [] data Vec (A : Set) : Nat → Set where [] : Vec A 0 _∷_ : ∀ {n} (x : A) (xs : Vec A n) → Vec A (suc n) macro ntest : Name → Term → TC ⊤ ntest f a = do (function te@(clause tel _ t ∷ [])) ← withReconstructed $ getDefinition f where _ → typeError $ strErr "ERROR" ∷ [] t ← withReconstructed $ inContext (reverse tel) $ normalise t quoteTC t >>= unify a -- A record with parameters. record X {n} (x : Vec Nat n) : Set where constructor mk field c : Nat -- A function that we will call at the unknown argument position -- when defining the type of `f`. [_] : ∀ {X} → X → Vec X 1 [ x ] = x ∷ [] -- The function that has two reconstructable arguments in the body. f : X [ 1 ] f = mk 1 -- Normalisation of the body of the function should also -- normalise reconstructed arguments. test : ntest f ≡ con (quote mk) (_ ∷ arg _ (con (quote Vec._∷_) _) ∷ _) test = refl
{ "alphanum_fraction": 0.6148148148, "avg_line_length": 27, "ext": "agda", "hexsha": "b4180197df4ced117af4888ff59c846ca35ba298", "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": "b5b3b1657556f720a7310cb7744edb1fac71eaf4", "max_forks_repo_licenses": [ "BSD-2-Clause" ], "max_forks_repo_name": "Seanpm2001-Agda-lang/agda", "max_forks_repo_path": "test/Succeed/normalise-bug.agda", "max_issues_count": 6, "max_issues_repo_head_hexsha": "b5b3b1657556f720a7310cb7744edb1fac71eaf4", "max_issues_repo_issues_event_max_datetime": "2021-11-24T08:31:10.000Z", "max_issues_repo_issues_event_min_datetime": "2021-10-18T08:12:24.000Z", "max_issues_repo_licenses": [ "BSD-2-Clause" ], "max_issues_repo_name": "Seanpm2001-Agda-lang/agda", "max_issues_repo_path": "test/Succeed/normalise-bug.agda", "max_line_length": 84, "max_stars_count": 1, "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/normalise-bug.agda", "max_stars_repo_stars_event_max_datetime": "2022-03-05T00:25:14.000Z", "max_stars_repo_stars_event_min_datetime": "2022-03-05T00:25:14.000Z", "num_tokens": 506, "size": 1485 }
module Text.Greek.SBLGNT.1Tim where open import Data.List open import Text.Greek.Bible open import Text.Greek.Script open import Text.Greek.Script.Unicode ΠΡΟΣ-ΤΙΜΟΘΕΟΝ-Α : List (Word) ΠΡΟΣ-ΤΙΜΟΘΕΟΝ-Α = word (Π ∷ α ∷ ῦ ∷ ∙λ ∷ ο ∷ ς ∷ []) "1Tim.1.1" ∷ word (ἀ ∷ π ∷ ό ∷ σ ∷ τ ∷ ο ∷ ∙λ ∷ ο ∷ ς ∷ []) "1Tim.1.1" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ο ∷ ῦ ∷ []) "1Tim.1.1" ∷ word (Ἰ ∷ η ∷ σ ∷ ο ∷ ῦ ∷ []) "1Tim.1.1" ∷ word (κ ∷ α ∷ τ ∷ []) "1Tim.1.1" ∷ word (ἐ ∷ π ∷ ι ∷ τ ∷ α ∷ γ ∷ ὴ ∷ ν ∷ []) "1Tim.1.1" ∷ word (θ ∷ ε ∷ ο ∷ ῦ ∷ []) "1Tim.1.1" ∷ word (σ ∷ ω ∷ τ ∷ ῆ ∷ ρ ∷ ο ∷ ς ∷ []) "1Tim.1.1" ∷ word (ἡ ∷ μ ∷ ῶ ∷ ν ∷ []) "1Tim.1.1" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.1.1" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ο ∷ ῦ ∷ []) "1Tim.1.1" ∷ word (Ἰ ∷ η ∷ σ ∷ ο ∷ ῦ ∷ []) "1Tim.1.1" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "1Tim.1.1" ∷ word (ἐ ∷ ∙λ ∷ π ∷ ί ∷ δ ∷ ο ∷ ς ∷ []) "1Tim.1.1" ∷ word (ἡ ∷ μ ∷ ῶ ∷ ν ∷ []) "1Tim.1.1" ∷ word (Τ ∷ ι ∷ μ ∷ ο ∷ θ ∷ έ ∷ ῳ ∷ []) "1Tim.1.2" ∷ word (γ ∷ ν ∷ η ∷ σ ∷ ί ∷ ῳ ∷ []) "1Tim.1.2" ∷ word (τ ∷ έ ∷ κ ∷ ν ∷ ῳ ∷ []) "1Tim.1.2" ∷ word (ἐ ∷ ν ∷ []) "1Tim.1.2" ∷ word (π ∷ ί ∷ σ ∷ τ ∷ ε ∷ ι ∷ []) "1Tim.1.2" ∷ word (χ ∷ ά ∷ ρ ∷ ι ∷ ς ∷ []) "1Tim.1.2" ∷ word (ἔ ∷ ∙λ ∷ ε ∷ ο ∷ ς ∷ []) "1Tim.1.2" ∷ word (ε ∷ ἰ ∷ ρ ∷ ή ∷ ν ∷ η ∷ []) "1Tim.1.2" ∷ word (ἀ ∷ π ∷ ὸ ∷ []) "1Tim.1.2" ∷ word (θ ∷ ε ∷ ο ∷ ῦ ∷ []) "1Tim.1.2" ∷ word (π ∷ α ∷ τ ∷ ρ ∷ ὸ ∷ ς ∷ []) "1Tim.1.2" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.1.2" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ο ∷ ῦ ∷ []) "1Tim.1.2" ∷ word (Ἰ ∷ η ∷ σ ∷ ο ∷ ῦ ∷ []) "1Tim.1.2" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "1Tim.1.2" ∷ word (κ ∷ υ ∷ ρ ∷ ί ∷ ο ∷ υ ∷ []) "1Tim.1.2" ∷ word (ἡ ∷ μ ∷ ῶ ∷ ν ∷ []) "1Tim.1.2" ∷ word (Κ ∷ α ∷ θ ∷ ὼ ∷ ς ∷ []) "1Tim.1.3" ∷ word (π ∷ α ∷ ρ ∷ ε ∷ κ ∷ ά ∷ ∙λ ∷ ε ∷ σ ∷ ά ∷ []) "1Tim.1.3" ∷ word (σ ∷ ε ∷ []) "1Tim.1.3" ∷ word (π ∷ ρ ∷ ο ∷ σ ∷ μ ∷ ε ∷ ῖ ∷ ν ∷ α ∷ ι ∷ []) "1Tim.1.3" ∷ word (ἐ ∷ ν ∷ []) "1Tim.1.3" ∷ word (Ἐ ∷ φ ∷ έ ∷ σ ∷ ῳ ∷ []) "1Tim.1.3" ∷ word (π ∷ ο ∷ ρ ∷ ε ∷ υ ∷ ό ∷ μ ∷ ε ∷ ν ∷ ο ∷ ς ∷ []) "1Tim.1.3" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "1Tim.1.3" ∷ word (Μ ∷ α ∷ κ ∷ ε ∷ δ ∷ ο ∷ ν ∷ ί ∷ α ∷ ν ∷ []) "1Tim.1.3" ∷ word (ἵ ∷ ν ∷ α ∷ []) "1Tim.1.3" ∷ word (π ∷ α ∷ ρ ∷ α ∷ γ ∷ γ ∷ ε ∷ ί ∷ ∙λ ∷ ῃ ∷ ς ∷ []) "1Tim.1.3" ∷ word (τ ∷ ι ∷ σ ∷ ὶ ∷ ν ∷ []) "1Tim.1.3" ∷ word (μ ∷ ὴ ∷ []) "1Tim.1.3" ∷ word (ἑ ∷ τ ∷ ε ∷ ρ ∷ ο ∷ δ ∷ ι ∷ δ ∷ α ∷ σ ∷ κ ∷ α ∷ ∙λ ∷ ε ∷ ῖ ∷ ν ∷ []) "1Tim.1.3" ∷ word (μ ∷ η ∷ δ ∷ ὲ ∷ []) "1Tim.1.4" ∷ word (π ∷ ρ ∷ ο ∷ σ ∷ έ ∷ χ ∷ ε ∷ ι ∷ ν ∷ []) "1Tim.1.4" ∷ word (μ ∷ ύ ∷ θ ∷ ο ∷ ι ∷ ς ∷ []) "1Tim.1.4" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.1.4" ∷ word (γ ∷ ε ∷ ν ∷ ε ∷ α ∷ ∙λ ∷ ο ∷ γ ∷ ί ∷ α ∷ ι ∷ ς ∷ []) "1Tim.1.4" ∷ word (ἀ ∷ π ∷ ε ∷ ρ ∷ ά ∷ ν ∷ τ ∷ ο ∷ ι ∷ ς ∷ []) "1Tim.1.4" ∷ word (α ∷ ἵ ∷ τ ∷ ι ∷ ν ∷ ε ∷ ς ∷ []) "1Tim.1.4" ∷ word (ἐ ∷ κ ∷ ζ ∷ η ∷ τ ∷ ή ∷ σ ∷ ε ∷ ι ∷ ς ∷ []) "1Tim.1.4" ∷ word (π ∷ α ∷ ρ ∷ έ ∷ χ ∷ ο ∷ υ ∷ σ ∷ ι ∷ []) "1Tim.1.4" ∷ word (μ ∷ ᾶ ∷ ∙λ ∷ ∙λ ∷ ο ∷ ν ∷ []) "1Tim.1.4" ∷ word (ἢ ∷ []) "1Tim.1.4" ∷ word (ο ∷ ἰ ∷ κ ∷ ο ∷ ν ∷ ο ∷ μ ∷ ί ∷ α ∷ ν ∷ []) "1Tim.1.4" ∷ word (θ ∷ ε ∷ ο ∷ ῦ ∷ []) "1Tim.1.4" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "1Tim.1.4" ∷ word (ἐ ∷ ν ∷ []) "1Tim.1.4" ∷ word (π ∷ ί ∷ σ ∷ τ ∷ ε ∷ ι ∷ []) "1Tim.1.4" ∷ word (τ ∷ ὸ ∷ []) "1Tim.1.5" ∷ word (δ ∷ ὲ ∷ []) "1Tim.1.5" ∷ word (τ ∷ έ ∷ ∙λ ∷ ο ∷ ς ∷ []) "1Tim.1.5" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "1Tim.1.5" ∷ word (π ∷ α ∷ ρ ∷ α ∷ γ ∷ γ ∷ ε ∷ ∙λ ∷ ί ∷ α ∷ ς ∷ []) "1Tim.1.5" ∷ word (ἐ ∷ σ ∷ τ ∷ ὶ ∷ ν ∷ []) "1Tim.1.5" ∷ word (ἀ ∷ γ ∷ ά ∷ π ∷ η ∷ []) "1Tim.1.5" ∷ word (ἐ ∷ κ ∷ []) "1Tim.1.5" ∷ word (κ ∷ α ∷ θ ∷ α ∷ ρ ∷ ᾶ ∷ ς ∷ []) "1Tim.1.5" ∷ word (κ ∷ α ∷ ρ ∷ δ ∷ ί ∷ α ∷ ς ∷ []) "1Tim.1.5" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.1.5" ∷ word (σ ∷ υ ∷ ν ∷ ε ∷ ι ∷ δ ∷ ή ∷ σ ∷ ε ∷ ω ∷ ς ∷ []) "1Tim.1.5" ∷ word (ἀ ∷ γ ∷ α ∷ θ ∷ ῆ ∷ ς ∷ []) "1Tim.1.5" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.1.5" ∷ word (π ∷ ί ∷ σ ∷ τ ∷ ε ∷ ω ∷ ς ∷ []) "1Tim.1.5" ∷ word (ἀ ∷ ν ∷ υ ∷ π ∷ ο ∷ κ ∷ ρ ∷ ί ∷ τ ∷ ο ∷ υ ∷ []) "1Tim.1.5" ∷ word (ὧ ∷ ν ∷ []) "1Tim.1.6" ∷ word (τ ∷ ι ∷ ν ∷ ε ∷ ς ∷ []) "1Tim.1.6" ∷ word (ἀ ∷ σ ∷ τ ∷ ο ∷ χ ∷ ή ∷ σ ∷ α ∷ ν ∷ τ ∷ ε ∷ ς ∷ []) "1Tim.1.6" ∷ word (ἐ ∷ ξ ∷ ε ∷ τ ∷ ρ ∷ ά ∷ π ∷ η ∷ σ ∷ α ∷ ν ∷ []) "1Tim.1.6" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "1Tim.1.6" ∷ word (μ ∷ α ∷ τ ∷ α ∷ ι ∷ ο ∷ ∙λ ∷ ο ∷ γ ∷ ί ∷ α ∷ ν ∷ []) "1Tim.1.6" ∷ word (θ ∷ έ ∷ ∙λ ∷ ο ∷ ν ∷ τ ∷ ε ∷ ς ∷ []) "1Tim.1.7" ∷ word (ε ∷ ἶ ∷ ν ∷ α ∷ ι ∷ []) "1Tim.1.7" ∷ word (ν ∷ ο ∷ μ ∷ ο ∷ δ ∷ ι ∷ δ ∷ ά ∷ σ ∷ κ ∷ α ∷ ∙λ ∷ ο ∷ ι ∷ []) "1Tim.1.7" ∷ word (μ ∷ ὴ ∷ []) "1Tim.1.7" ∷ word (ν ∷ ο ∷ ο ∷ ῦ ∷ ν ∷ τ ∷ ε ∷ ς ∷ []) "1Tim.1.7" ∷ word (μ ∷ ή ∷ τ ∷ ε ∷ []) "1Tim.1.7" ∷ word (ἃ ∷ []) "1Tim.1.7" ∷ word (∙λ ∷ έ ∷ γ ∷ ο ∷ υ ∷ σ ∷ ι ∷ ν ∷ []) "1Tim.1.7" ∷ word (μ ∷ ή ∷ τ ∷ ε ∷ []) "1Tim.1.7" ∷ word (π ∷ ε ∷ ρ ∷ ὶ ∷ []) "1Tim.1.7" ∷ word (τ ∷ ί ∷ ν ∷ ω ∷ ν ∷ []) "1Tim.1.7" ∷ word (δ ∷ ι ∷ α ∷ β ∷ ε ∷ β ∷ α ∷ ι ∷ ο ∷ ῦ ∷ ν ∷ τ ∷ α ∷ ι ∷ []) "1Tim.1.7" ∷ word (Ο ∷ ἴ ∷ δ ∷ α ∷ μ ∷ ε ∷ ν ∷ []) "1Tim.1.8" ∷ word (δ ∷ ὲ ∷ []) "1Tim.1.8" ∷ word (ὅ ∷ τ ∷ ι ∷ []) "1Tim.1.8" ∷ word (κ ∷ α ∷ ∙λ ∷ ὸ ∷ ς ∷ []) "1Tim.1.8" ∷ word (ὁ ∷ []) "1Tim.1.8" ∷ word (ν ∷ ό ∷ μ ∷ ο ∷ ς ∷ []) "1Tim.1.8" ∷ word (ἐ ∷ ά ∷ ν ∷ []) "1Tim.1.8" ∷ word (τ ∷ ι ∷ ς ∷ []) "1Tim.1.8" ∷ word (α ∷ ὐ ∷ τ ∷ ῷ ∷ []) "1Tim.1.8" ∷ word (ν ∷ ο ∷ μ ∷ ί ∷ μ ∷ ω ∷ ς ∷ []) "1Tim.1.8" ∷ word (χ ∷ ρ ∷ ῆ ∷ τ ∷ α ∷ ι ∷ []) "1Tim.1.8" ∷ word (ε ∷ ἰ ∷ δ ∷ ὼ ∷ ς ∷ []) "1Tim.1.9" ∷ word (τ ∷ ο ∷ ῦ ∷ τ ∷ ο ∷ []) "1Tim.1.9" ∷ word (ὅ ∷ τ ∷ ι ∷ []) "1Tim.1.9" ∷ word (δ ∷ ι ∷ κ ∷ α ∷ ί ∷ ῳ ∷ []) "1Tim.1.9" ∷ word (ν ∷ ό ∷ μ ∷ ο ∷ ς ∷ []) "1Tim.1.9" ∷ word (ο ∷ ὐ ∷ []) "1Tim.1.9" ∷ word (κ ∷ ε ∷ ῖ ∷ τ ∷ α ∷ ι ∷ []) "1Tim.1.9" ∷ word (ἀ ∷ ν ∷ ό ∷ μ ∷ ο ∷ ι ∷ ς ∷ []) "1Tim.1.9" ∷ word (δ ∷ ὲ ∷ []) "1Tim.1.9" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.1.9" ∷ word (ἀ ∷ ν ∷ υ ∷ π ∷ ο ∷ τ ∷ ά ∷ κ ∷ τ ∷ ο ∷ ι ∷ ς ∷ []) "1Tim.1.9" ∷ word (ἀ ∷ σ ∷ ε ∷ β ∷ έ ∷ σ ∷ ι ∷ []) "1Tim.1.9" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.1.9" ∷ word (ἁ ∷ μ ∷ α ∷ ρ ∷ τ ∷ ω ∷ ∙λ ∷ ο ∷ ῖ ∷ ς ∷ []) "1Tim.1.9" ∷ word (ἀ ∷ ν ∷ ο ∷ σ ∷ ί ∷ ο ∷ ι ∷ ς ∷ []) "1Tim.1.9" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.1.9" ∷ word (β ∷ ε ∷ β ∷ ή ∷ ∙λ ∷ ο ∷ ι ∷ ς ∷ []) "1Tim.1.9" ∷ word (π ∷ α ∷ τ ∷ ρ ∷ ο ∷ ∙λ ∷ ῴ ∷ α ∷ ι ∷ ς ∷ []) "1Tim.1.9" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.1.9" ∷ word (μ ∷ η ∷ τ ∷ ρ ∷ ο ∷ ∙λ ∷ ῴ ∷ α ∷ ι ∷ ς ∷ []) "1Tim.1.9" ∷ word (ἀ ∷ ν ∷ δ ∷ ρ ∷ ο ∷ φ ∷ ό ∷ ν ∷ ο ∷ ι ∷ ς ∷ []) "1Tim.1.9" ∷ word (π ∷ ό ∷ ρ ∷ ν ∷ ο ∷ ι ∷ ς ∷ []) "1Tim.1.10" ∷ word (ἀ ∷ ρ ∷ σ ∷ ε ∷ ν ∷ ο ∷ κ ∷ ο ∷ ί ∷ τ ∷ α ∷ ι ∷ ς ∷ []) "1Tim.1.10" ∷ word (ἀ ∷ ν ∷ δ ∷ ρ ∷ α ∷ π ∷ ο ∷ δ ∷ ι ∷ σ ∷ τ ∷ α ∷ ῖ ∷ ς ∷ []) "1Tim.1.10" ∷ word (ψ ∷ ε ∷ ύ ∷ σ ∷ τ ∷ α ∷ ι ∷ ς ∷ []) "1Tim.1.10" ∷ word (ἐ ∷ π ∷ ι ∷ ό ∷ ρ ∷ κ ∷ ο ∷ ι ∷ ς ∷ []) "1Tim.1.10" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.1.10" ∷ word (ε ∷ ἴ ∷ []) "1Tim.1.10" ∷ word (τ ∷ ι ∷ []) "1Tim.1.10" ∷ word (ἕ ∷ τ ∷ ε ∷ ρ ∷ ο ∷ ν ∷ []) "1Tim.1.10" ∷ word (τ ∷ ῇ ∷ []) "1Tim.1.10" ∷ word (ὑ ∷ γ ∷ ι ∷ α ∷ ι ∷ ν ∷ ο ∷ ύ ∷ σ ∷ ῃ ∷ []) "1Tim.1.10" ∷ word (δ ∷ ι ∷ δ ∷ α ∷ σ ∷ κ ∷ α ∷ ∙λ ∷ ί ∷ ᾳ ∷ []) "1Tim.1.10" ∷ word (ἀ ∷ ν ∷ τ ∷ ί ∷ κ ∷ ε ∷ ι ∷ τ ∷ α ∷ ι ∷ []) "1Tim.1.10" ∷ word (κ ∷ α ∷ τ ∷ ὰ ∷ []) "1Tim.1.11" ∷ word (τ ∷ ὸ ∷ []) "1Tim.1.11" ∷ word (ε ∷ ὐ ∷ α ∷ γ ∷ γ ∷ έ ∷ ∙λ ∷ ι ∷ ο ∷ ν ∷ []) "1Tim.1.11" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "1Tim.1.11" ∷ word (δ ∷ ό ∷ ξ ∷ η ∷ ς ∷ []) "1Tim.1.11" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "1Tim.1.11" ∷ word (μ ∷ α ∷ κ ∷ α ∷ ρ ∷ ί ∷ ο ∷ υ ∷ []) "1Tim.1.11" ∷ word (θ ∷ ε ∷ ο ∷ ῦ ∷ []) "1Tim.1.11" ∷ word (ὃ ∷ []) "1Tim.1.11" ∷ word (ἐ ∷ π ∷ ι ∷ σ ∷ τ ∷ ε ∷ ύ ∷ θ ∷ η ∷ ν ∷ []) "1Tim.1.11" ∷ word (ἐ ∷ γ ∷ ώ ∷ []) "1Tim.1.11" ∷ word (Χ ∷ ά ∷ ρ ∷ ι ∷ ν ∷ []) "1Tim.1.12" ∷ word (ἔ ∷ χ ∷ ω ∷ []) "1Tim.1.12" ∷ word (τ ∷ ῷ ∷ []) "1Tim.1.12" ∷ word (ἐ ∷ ν ∷ δ ∷ υ ∷ ν ∷ α ∷ μ ∷ ώ ∷ σ ∷ α ∷ ν ∷ τ ∷ ί ∷ []) "1Tim.1.12" ∷ word (μ ∷ ε ∷ []) "1Tim.1.12" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ῷ ∷ []) "1Tim.1.12" ∷ word (Ἰ ∷ η ∷ σ ∷ ο ∷ ῦ ∷ []) "1Tim.1.12" ∷ word (τ ∷ ῷ ∷ []) "1Tim.1.12" ∷ word (κ ∷ υ ∷ ρ ∷ ί ∷ ῳ ∷ []) "1Tim.1.12" ∷ word (ἡ ∷ μ ∷ ῶ ∷ ν ∷ []) "1Tim.1.12" ∷ word (ὅ ∷ τ ∷ ι ∷ []) "1Tim.1.12" ∷ word (π ∷ ι ∷ σ ∷ τ ∷ ό ∷ ν ∷ []) "1Tim.1.12" ∷ word (μ ∷ ε ∷ []) "1Tim.1.12" ∷ word (ἡ ∷ γ ∷ ή ∷ σ ∷ α ∷ τ ∷ ο ∷ []) "1Tim.1.12" ∷ word (θ ∷ έ ∷ μ ∷ ε ∷ ν ∷ ο ∷ ς ∷ []) "1Tim.1.12" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "1Tim.1.12" ∷ word (δ ∷ ι ∷ α ∷ κ ∷ ο ∷ ν ∷ ί ∷ α ∷ ν ∷ []) "1Tim.1.12" ∷ word (τ ∷ ὸ ∷ []) "1Tim.1.13" ∷ word (π ∷ ρ ∷ ό ∷ τ ∷ ε ∷ ρ ∷ ο ∷ ν ∷ []) "1Tim.1.13" ∷ word (ὄ ∷ ν ∷ τ ∷ α ∷ []) "1Tim.1.13" ∷ word (β ∷ ∙λ ∷ ά ∷ σ ∷ φ ∷ η ∷ μ ∷ ο ∷ ν ∷ []) "1Tim.1.13" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.1.13" ∷ word (δ ∷ ι ∷ ώ ∷ κ ∷ τ ∷ η ∷ ν ∷ []) "1Tim.1.13" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.1.13" ∷ word (ὑ ∷ β ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ή ∷ ν ∷ []) "1Tim.1.13" ∷ word (ἀ ∷ ∙λ ∷ ∙λ ∷ ὰ ∷ []) "1Tim.1.13" ∷ word (ἠ ∷ ∙λ ∷ ε ∷ ή ∷ θ ∷ η ∷ ν ∷ []) "1Tim.1.13" ∷ word (ὅ ∷ τ ∷ ι ∷ []) "1Tim.1.13" ∷ word (ἀ ∷ γ ∷ ν ∷ ο ∷ ῶ ∷ ν ∷ []) "1Tim.1.13" ∷ word (ἐ ∷ π ∷ ο ∷ ί ∷ η ∷ σ ∷ α ∷ []) "1Tim.1.13" ∷ word (ἐ ∷ ν ∷ []) "1Tim.1.13" ∷ word (ἀ ∷ π ∷ ι ∷ σ ∷ τ ∷ ί ∷ ᾳ ∷ []) "1Tim.1.13" ∷ word (ὑ ∷ π ∷ ε ∷ ρ ∷ ε ∷ π ∷ ∙λ ∷ ε ∷ ό ∷ ν ∷ α ∷ σ ∷ ε ∷ ν ∷ []) "1Tim.1.14" ∷ word (δ ∷ ὲ ∷ []) "1Tim.1.14" ∷ word (ἡ ∷ []) "1Tim.1.14" ∷ word (χ ∷ ά ∷ ρ ∷ ι ∷ ς ∷ []) "1Tim.1.14" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "1Tim.1.14" ∷ word (κ ∷ υ ∷ ρ ∷ ί ∷ ο ∷ υ ∷ []) "1Tim.1.14" ∷ word (ἡ ∷ μ ∷ ῶ ∷ ν ∷ []) "1Tim.1.14" ∷ word (μ ∷ ε ∷ τ ∷ ὰ ∷ []) "1Tim.1.14" ∷ word (π ∷ ί ∷ σ ∷ τ ∷ ε ∷ ω ∷ ς ∷ []) "1Tim.1.14" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.1.14" ∷ word (ἀ ∷ γ ∷ ά ∷ π ∷ η ∷ ς ∷ []) "1Tim.1.14" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "1Tim.1.14" ∷ word (ἐ ∷ ν ∷ []) "1Tim.1.14" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ῷ ∷ []) "1Tim.1.14" ∷ word (Ἰ ∷ η ∷ σ ∷ ο ∷ ῦ ∷ []) "1Tim.1.14" ∷ word (π ∷ ι ∷ σ ∷ τ ∷ ὸ ∷ ς ∷ []) "1Tim.1.15" ∷ word (ὁ ∷ []) "1Tim.1.15" ∷ word (∙λ ∷ ό ∷ γ ∷ ο ∷ ς ∷ []) "1Tim.1.15" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.1.15" ∷ word (π ∷ ά ∷ σ ∷ η ∷ ς ∷ []) "1Tim.1.15" ∷ word (ἀ ∷ π ∷ ο ∷ δ ∷ ο ∷ χ ∷ ῆ ∷ ς ∷ []) "1Tim.1.15" ∷ word (ἄ ∷ ξ ∷ ι ∷ ο ∷ ς ∷ []) "1Tim.1.15" ∷ word (ὅ ∷ τ ∷ ι ∷ []) "1Tim.1.15" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ὸ ∷ ς ∷ []) "1Tim.1.15" ∷ word (Ἰ ∷ η ∷ σ ∷ ο ∷ ῦ ∷ ς ∷ []) "1Tim.1.15" ∷ word (ἦ ∷ ∙λ ∷ θ ∷ ε ∷ ν ∷ []) "1Tim.1.15" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "1Tim.1.15" ∷ word (τ ∷ ὸ ∷ ν ∷ []) "1Tim.1.15" ∷ word (κ ∷ ό ∷ σ ∷ μ ∷ ο ∷ ν ∷ []) "1Tim.1.15" ∷ word (ἁ ∷ μ ∷ α ∷ ρ ∷ τ ∷ ω ∷ ∙λ ∷ ο ∷ ὺ ∷ ς ∷ []) "1Tim.1.15" ∷ word (σ ∷ ῶ ∷ σ ∷ α ∷ ι ∷ []) "1Tim.1.15" ∷ word (ὧ ∷ ν ∷ []) "1Tim.1.15" ∷ word (π ∷ ρ ∷ ῶ ∷ τ ∷ ό ∷ ς ∷ []) "1Tim.1.15" ∷ word (ε ∷ ἰ ∷ μ ∷ ι ∷ []) "1Tim.1.15" ∷ word (ἐ ∷ γ ∷ ώ ∷ []) "1Tim.1.15" ∷ word (ἀ ∷ ∙λ ∷ ∙λ ∷ ὰ ∷ []) "1Tim.1.16" ∷ word (δ ∷ ι ∷ ὰ ∷ []) "1Tim.1.16" ∷ word (τ ∷ ο ∷ ῦ ∷ τ ∷ ο ∷ []) "1Tim.1.16" ∷ word (ἠ ∷ ∙λ ∷ ε ∷ ή ∷ θ ∷ η ∷ ν ∷ []) "1Tim.1.16" ∷ word (ἵ ∷ ν ∷ α ∷ []) "1Tim.1.16" ∷ word (ἐ ∷ ν ∷ []) "1Tim.1.16" ∷ word (ἐ ∷ μ ∷ ο ∷ ὶ ∷ []) "1Tim.1.16" ∷ word (π ∷ ρ ∷ ώ ∷ τ ∷ ῳ ∷ []) "1Tim.1.16" ∷ word (ἐ ∷ ν ∷ δ ∷ ε ∷ ί ∷ ξ ∷ η ∷ τ ∷ α ∷ ι ∷ []) "1Tim.1.16" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ὸ ∷ ς ∷ []) "1Tim.1.16" ∷ word (Ἰ ∷ η ∷ σ ∷ ο ∷ ῦ ∷ ς ∷ []) "1Tim.1.16" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "1Tim.1.16" ∷ word (ἅ ∷ π ∷ α ∷ σ ∷ α ∷ ν ∷ []) "1Tim.1.16" ∷ word (μ ∷ α ∷ κ ∷ ρ ∷ ο ∷ θ ∷ υ ∷ μ ∷ ί ∷ α ∷ ν ∷ []) "1Tim.1.16" ∷ word (π ∷ ρ ∷ ὸ ∷ ς ∷ []) "1Tim.1.16" ∷ word (ὑ ∷ π ∷ ο ∷ τ ∷ ύ ∷ π ∷ ω ∷ σ ∷ ι ∷ ν ∷ []) "1Tim.1.16" ∷ word (τ ∷ ῶ ∷ ν ∷ []) "1Tim.1.16" ∷ word (μ ∷ ε ∷ ∙λ ∷ ∙λ ∷ ό ∷ ν ∷ τ ∷ ω ∷ ν ∷ []) "1Tim.1.16" ∷ word (π ∷ ι ∷ σ ∷ τ ∷ ε ∷ ύ ∷ ε ∷ ι ∷ ν ∷ []) "1Tim.1.16" ∷ word (ἐ ∷ π ∷ []) "1Tim.1.16" ∷ word (α ∷ ὐ ∷ τ ∷ ῷ ∷ []) "1Tim.1.16" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "1Tim.1.16" ∷ word (ζ ∷ ω ∷ ὴ ∷ ν ∷ []) "1Tim.1.16" ∷ word (α ∷ ἰ ∷ ώ ∷ ν ∷ ι ∷ ο ∷ ν ∷ []) "1Tim.1.16" ∷ word (τ ∷ ῷ ∷ []) "1Tim.1.17" ∷ word (δ ∷ ὲ ∷ []) "1Tim.1.17" ∷ word (β ∷ α ∷ σ ∷ ι ∷ ∙λ ∷ ε ∷ ῖ ∷ []) "1Tim.1.17" ∷ word (τ ∷ ῶ ∷ ν ∷ []) "1Tim.1.17" ∷ word (α ∷ ἰ ∷ ώ ∷ ν ∷ ω ∷ ν ∷ []) "1Tim.1.17" ∷ word (ἀ ∷ φ ∷ θ ∷ ά ∷ ρ ∷ τ ∷ ῳ ∷ []) "1Tim.1.17" ∷ word (ἀ ∷ ο ∷ ρ ∷ ά ∷ τ ∷ ῳ ∷ []) "1Tim.1.17" ∷ word (μ ∷ ό ∷ ν ∷ ῳ ∷ []) "1Tim.1.17" ∷ word (θ ∷ ε ∷ ῷ ∷ []) "1Tim.1.17" ∷ word (τ ∷ ι ∷ μ ∷ ὴ ∷ []) "1Tim.1.17" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.1.17" ∷ word (δ ∷ ό ∷ ξ ∷ α ∷ []) "1Tim.1.17" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "1Tim.1.17" ∷ word (τ ∷ ο ∷ ὺ ∷ ς ∷ []) "1Tim.1.17" ∷ word (α ∷ ἰ ∷ ῶ ∷ ν ∷ α ∷ ς ∷ []) "1Tim.1.17" ∷ word (τ ∷ ῶ ∷ ν ∷ []) "1Tim.1.17" ∷ word (α ∷ ἰ ∷ ώ ∷ ν ∷ ω ∷ ν ∷ []) "1Tim.1.17" ∷ word (ἀ ∷ μ ∷ ή ∷ ν ∷ []) "1Tim.1.17" ∷ word (Τ ∷ α ∷ ύ ∷ τ ∷ η ∷ ν ∷ []) "1Tim.1.18" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "1Tim.1.18" ∷ word (π ∷ α ∷ ρ ∷ α ∷ γ ∷ γ ∷ ε ∷ ∙λ ∷ ί ∷ α ∷ ν ∷ []) "1Tim.1.18" ∷ word (π ∷ α ∷ ρ ∷ α ∷ τ ∷ ί ∷ θ ∷ ε ∷ μ ∷ α ∷ ί ∷ []) "1Tim.1.18" ∷ word (σ ∷ ο ∷ ι ∷ []) "1Tim.1.18" ∷ word (τ ∷ έ ∷ κ ∷ ν ∷ ο ∷ ν ∷ []) "1Tim.1.18" ∷ word (Τ ∷ ι ∷ μ ∷ ό ∷ θ ∷ ε ∷ ε ∷ []) "1Tim.1.18" ∷ word (κ ∷ α ∷ τ ∷ ὰ ∷ []) "1Tim.1.18" ∷ word (τ ∷ ὰ ∷ ς ∷ []) "1Tim.1.18" ∷ word (π ∷ ρ ∷ ο ∷ α ∷ γ ∷ ο ∷ ύ ∷ σ ∷ α ∷ ς ∷ []) "1Tim.1.18" ∷ word (ἐ ∷ π ∷ ὶ ∷ []) "1Tim.1.18" ∷ word (σ ∷ ὲ ∷ []) "1Tim.1.18" ∷ word (π ∷ ρ ∷ ο ∷ φ ∷ η ∷ τ ∷ ε ∷ ί ∷ α ∷ ς ∷ []) "1Tim.1.18" ∷ word (ἵ ∷ ν ∷ α ∷ []) "1Tim.1.18" ∷ word (σ ∷ τ ∷ ρ ∷ α ∷ τ ∷ ε ∷ ύ ∷ ῃ ∷ []) "1Tim.1.18" ∷ word (ἐ ∷ ν ∷ []) "1Tim.1.18" ∷ word (α ∷ ὐ ∷ τ ∷ α ∷ ῖ ∷ ς ∷ []) "1Tim.1.18" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "1Tim.1.18" ∷ word (κ ∷ α ∷ ∙λ ∷ ὴ ∷ ν ∷ []) "1Tim.1.18" ∷ word (σ ∷ τ ∷ ρ ∷ α ∷ τ ∷ ε ∷ ί ∷ α ∷ ν ∷ []) "1Tim.1.18" ∷ word (ἔ ∷ χ ∷ ω ∷ ν ∷ []) "1Tim.1.19" ∷ word (π ∷ ί ∷ σ ∷ τ ∷ ι ∷ ν ∷ []) "1Tim.1.19" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.1.19" ∷ word (ἀ ∷ γ ∷ α ∷ θ ∷ ὴ ∷ ν ∷ []) "1Tim.1.19" ∷ word (σ ∷ υ ∷ ν ∷ ε ∷ ί ∷ δ ∷ η ∷ σ ∷ ι ∷ ν ∷ []) "1Tim.1.19" ∷ word (ἥ ∷ ν ∷ []) "1Tim.1.19" ∷ word (τ ∷ ι ∷ ν ∷ ε ∷ ς ∷ []) "1Tim.1.19" ∷ word (ἀ ∷ π ∷ ω ∷ σ ∷ ά ∷ μ ∷ ε ∷ ν ∷ ο ∷ ι ∷ []) "1Tim.1.19" ∷ word (π ∷ ε ∷ ρ ∷ ὶ ∷ []) "1Tim.1.19" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "1Tim.1.19" ∷ word (π ∷ ί ∷ σ ∷ τ ∷ ι ∷ ν ∷ []) "1Tim.1.19" ∷ word (ἐ ∷ ν ∷ α ∷ υ ∷ ά ∷ γ ∷ η ∷ σ ∷ α ∷ ν ∷ []) "1Tim.1.19" ∷ word (ὧ ∷ ν ∷ []) "1Tim.1.20" ∷ word (ἐ ∷ σ ∷ τ ∷ ι ∷ ν ∷ []) "1Tim.1.20" ∷ word (Ὑ ∷ μ ∷ έ ∷ ν ∷ α ∷ ι ∷ ο ∷ ς ∷ []) "1Tim.1.20" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.1.20" ∷ word (Ἀ ∷ ∙λ ∷ έ ∷ ξ ∷ α ∷ ν ∷ δ ∷ ρ ∷ ο ∷ ς ∷ []) "1Tim.1.20" ∷ word (ο ∷ ὓ ∷ ς ∷ []) "1Tim.1.20" ∷ word (π ∷ α ∷ ρ ∷ έ ∷ δ ∷ ω ∷ κ ∷ α ∷ []) "1Tim.1.20" ∷ word (τ ∷ ῷ ∷ []) "1Tim.1.20" ∷ word (Σ ∷ α ∷ τ ∷ α ∷ ν ∷ ᾷ ∷ []) "1Tim.1.20" ∷ word (ἵ ∷ ν ∷ α ∷ []) "1Tim.1.20" ∷ word (π ∷ α ∷ ι ∷ δ ∷ ε ∷ υ ∷ θ ∷ ῶ ∷ σ ∷ ι ∷ []) "1Tim.1.20" ∷ word (μ ∷ ὴ ∷ []) "1Tim.1.20" ∷ word (β ∷ ∙λ ∷ α ∷ σ ∷ φ ∷ η ∷ μ ∷ ε ∷ ῖ ∷ ν ∷ []) "1Tim.1.20" ∷ word (Π ∷ α ∷ ρ ∷ α ∷ κ ∷ α ∷ ∙λ ∷ ῶ ∷ []) "1Tim.2.1" ∷ word (ο ∷ ὖ ∷ ν ∷ []) "1Tim.2.1" ∷ word (π ∷ ρ ∷ ῶ ∷ τ ∷ ο ∷ ν ∷ []) "1Tim.2.1" ∷ word (π ∷ ά ∷ ν ∷ τ ∷ ω ∷ ν ∷ []) "1Tim.2.1" ∷ word (π ∷ ο ∷ ι ∷ ε ∷ ῖ ∷ σ ∷ θ ∷ α ∷ ι ∷ []) "1Tim.2.1" ∷ word (δ ∷ ε ∷ ή ∷ σ ∷ ε ∷ ι ∷ ς ∷ []) "1Tim.2.1" ∷ word (π ∷ ρ ∷ ο ∷ σ ∷ ε ∷ υ ∷ χ ∷ ά ∷ ς ∷ []) "1Tim.2.1" ∷ word (ἐ ∷ ν ∷ τ ∷ ε ∷ ύ ∷ ξ ∷ ε ∷ ι ∷ ς ∷ []) "1Tim.2.1" ∷ word (ε ∷ ὐ ∷ χ ∷ α ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ί ∷ α ∷ ς ∷ []) "1Tim.2.1" ∷ word (ὑ ∷ π ∷ ὲ ∷ ρ ∷ []) "1Tim.2.1" ∷ word (π ∷ ά ∷ ν ∷ τ ∷ ω ∷ ν ∷ []) "1Tim.2.1" ∷ word (ἀ ∷ ν ∷ θ ∷ ρ ∷ ώ ∷ π ∷ ω ∷ ν ∷ []) "1Tim.2.1" ∷ word (ὑ ∷ π ∷ ὲ ∷ ρ ∷ []) "1Tim.2.2" ∷ word (β ∷ α ∷ σ ∷ ι ∷ ∙λ ∷ έ ∷ ω ∷ ν ∷ []) "1Tim.2.2" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.2.2" ∷ word (π ∷ ά ∷ ν ∷ τ ∷ ω ∷ ν ∷ []) "1Tim.2.2" ∷ word (τ ∷ ῶ ∷ ν ∷ []) "1Tim.2.2" ∷ word (ἐ ∷ ν ∷ []) "1Tim.2.2" ∷ word (ὑ ∷ π ∷ ε ∷ ρ ∷ ο ∷ χ ∷ ῇ ∷ []) "1Tim.2.2" ∷ word (ὄ ∷ ν ∷ τ ∷ ω ∷ ν ∷ []) "1Tim.2.2" ∷ word (ἵ ∷ ν ∷ α ∷ []) "1Tim.2.2" ∷ word (ἤ ∷ ρ ∷ ε ∷ μ ∷ ο ∷ ν ∷ []) "1Tim.2.2" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.2.2" ∷ word (ἡ ∷ σ ∷ ύ ∷ χ ∷ ι ∷ ο ∷ ν ∷ []) "1Tim.2.2" ∷ word (β ∷ ί ∷ ο ∷ ν ∷ []) "1Tim.2.2" ∷ word (δ ∷ ι ∷ ά ∷ γ ∷ ω ∷ μ ∷ ε ∷ ν ∷ []) "1Tim.2.2" ∷ word (ἐ ∷ ν ∷ []) "1Tim.2.2" ∷ word (π ∷ ά ∷ σ ∷ ῃ ∷ []) "1Tim.2.2" ∷ word (ε ∷ ὐ ∷ σ ∷ ε ∷ β ∷ ε ∷ ί ∷ ᾳ ∷ []) "1Tim.2.2" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.2.2" ∷ word (σ ∷ ε ∷ μ ∷ ν ∷ ό ∷ τ ∷ η ∷ τ ∷ ι ∷ []) "1Tim.2.2" ∷ word (τ ∷ ο ∷ ῦ ∷ τ ∷ ο ∷ []) "1Tim.2.3" ∷ word (κ ∷ α ∷ ∙λ ∷ ὸ ∷ ν ∷ []) "1Tim.2.3" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.2.3" ∷ word (ἀ ∷ π ∷ ό ∷ δ ∷ ε ∷ κ ∷ τ ∷ ο ∷ ν ∷ []) "1Tim.2.3" ∷ word (ἐ ∷ ν ∷ ώ ∷ π ∷ ι ∷ ο ∷ ν ∷ []) "1Tim.2.3" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "1Tim.2.3" ∷ word (σ ∷ ω ∷ τ ∷ ῆ ∷ ρ ∷ ο ∷ ς ∷ []) "1Tim.2.3" ∷ word (ἡ ∷ μ ∷ ῶ ∷ ν ∷ []) "1Tim.2.3" ∷ word (θ ∷ ε ∷ ο ∷ ῦ ∷ []) "1Tim.2.3" ∷ word (ὃ ∷ ς ∷ []) "1Tim.2.4" ∷ word (π ∷ ά ∷ ν ∷ τ ∷ α ∷ ς ∷ []) "1Tim.2.4" ∷ word (ἀ ∷ ν ∷ θ ∷ ρ ∷ ώ ∷ π ∷ ο ∷ υ ∷ ς ∷ []) "1Tim.2.4" ∷ word (θ ∷ έ ∷ ∙λ ∷ ε ∷ ι ∷ []) "1Tim.2.4" ∷ word (σ ∷ ω ∷ θ ∷ ῆ ∷ ν ∷ α ∷ ι ∷ []) "1Tim.2.4" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.2.4" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "1Tim.2.4" ∷ word (ἐ ∷ π ∷ ί ∷ γ ∷ ν ∷ ω ∷ σ ∷ ι ∷ ν ∷ []) "1Tim.2.4" ∷ word (ἀ ∷ ∙λ ∷ η ∷ θ ∷ ε ∷ ί ∷ α ∷ ς ∷ []) "1Tim.2.4" ∷ word (ἐ ∷ ∙λ ∷ θ ∷ ε ∷ ῖ ∷ ν ∷ []) "1Tim.2.4" ∷ word (ε ∷ ἷ ∷ ς ∷ []) "1Tim.2.5" ∷ word (γ ∷ ὰ ∷ ρ ∷ []) "1Tim.2.5" ∷ word (θ ∷ ε ∷ ό ∷ ς ∷ []) "1Tim.2.5" ∷ word (ε ∷ ἷ ∷ ς ∷ []) "1Tim.2.5" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.2.5" ∷ word (μ ∷ ε ∷ σ ∷ ί ∷ τ ∷ η ∷ ς ∷ []) "1Tim.2.5" ∷ word (θ ∷ ε ∷ ο ∷ ῦ ∷ []) "1Tim.2.5" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.2.5" ∷ word (ἀ ∷ ν ∷ θ ∷ ρ ∷ ώ ∷ π ∷ ω ∷ ν ∷ []) "1Tim.2.5" ∷ word (ἄ ∷ ν ∷ θ ∷ ρ ∷ ω ∷ π ∷ ο ∷ ς ∷ []) "1Tim.2.5" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ὸ ∷ ς ∷ []) "1Tim.2.5" ∷ word (Ἰ ∷ η ∷ σ ∷ ο ∷ ῦ ∷ ς ∷ []) "1Tim.2.5" ∷ word (ὁ ∷ []) "1Tim.2.6" ∷ word (δ ∷ ο ∷ ὺ ∷ ς ∷ []) "1Tim.2.6" ∷ word (ἑ ∷ α ∷ υ ∷ τ ∷ ὸ ∷ ν ∷ []) "1Tim.2.6" ∷ word (ἀ ∷ ν ∷ τ ∷ ί ∷ ∙λ ∷ υ ∷ τ ∷ ρ ∷ ο ∷ ν ∷ []) "1Tim.2.6" ∷ word (ὑ ∷ π ∷ ὲ ∷ ρ ∷ []) "1Tim.2.6" ∷ word (π ∷ ά ∷ ν ∷ τ ∷ ω ∷ ν ∷ []) "1Tim.2.6" ∷ word (τ ∷ ὸ ∷ []) "1Tim.2.6" ∷ word (μ ∷ α ∷ ρ ∷ τ ∷ ύ ∷ ρ ∷ ι ∷ ο ∷ ν ∷ []) "1Tim.2.6" ∷ word (κ ∷ α ∷ ι ∷ ρ ∷ ο ∷ ῖ ∷ ς ∷ []) "1Tim.2.6" ∷ word (ἰ ∷ δ ∷ ί ∷ ο ∷ ι ∷ ς ∷ []) "1Tim.2.6" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "1Tim.2.7" ∷ word (ὃ ∷ []) "1Tim.2.7" ∷ word (ἐ ∷ τ ∷ έ ∷ θ ∷ η ∷ ν ∷ []) "1Tim.2.7" ∷ word (ἐ ∷ γ ∷ ὼ ∷ []) "1Tim.2.7" ∷ word (κ ∷ ῆ ∷ ρ ∷ υ ∷ ξ ∷ []) "1Tim.2.7" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.2.7" ∷ word (ἀ ∷ π ∷ ό ∷ σ ∷ τ ∷ ο ∷ ∙λ ∷ ο ∷ ς ∷ []) "1Tim.2.7" ∷ word (ἀ ∷ ∙λ ∷ ή ∷ θ ∷ ε ∷ ι ∷ α ∷ ν ∷ []) "1Tim.2.7" ∷ word (∙λ ∷ έ ∷ γ ∷ ω ∷ []) "1Tim.2.7" ∷ word (ο ∷ ὐ ∷ []) "1Tim.2.7" ∷ word (ψ ∷ ε ∷ ύ ∷ δ ∷ ο ∷ μ ∷ α ∷ ι ∷ []) "1Tim.2.7" ∷ word (δ ∷ ι ∷ δ ∷ ά ∷ σ ∷ κ ∷ α ∷ ∙λ ∷ ο ∷ ς ∷ []) "1Tim.2.7" ∷ word (ἐ ∷ θ ∷ ν ∷ ῶ ∷ ν ∷ []) "1Tim.2.7" ∷ word (ἐ ∷ ν ∷ []) "1Tim.2.7" ∷ word (π ∷ ί ∷ σ ∷ τ ∷ ε ∷ ι ∷ []) "1Tim.2.7" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.2.7" ∷ word (ἀ ∷ ∙λ ∷ η ∷ θ ∷ ε ∷ ί ∷ ᾳ ∷ []) "1Tim.2.7" ∷ word (Β ∷ ο ∷ ύ ∷ ∙λ ∷ ο ∷ μ ∷ α ∷ ι ∷ []) "1Tim.2.8" ∷ word (ο ∷ ὖ ∷ ν ∷ []) "1Tim.2.8" ∷ word (π ∷ ρ ∷ ο ∷ σ ∷ ε ∷ ύ ∷ χ ∷ ε ∷ σ ∷ θ ∷ α ∷ ι ∷ []) "1Tim.2.8" ∷ word (τ ∷ ο ∷ ὺ ∷ ς ∷ []) "1Tim.2.8" ∷ word (ἄ ∷ ν ∷ δ ∷ ρ ∷ α ∷ ς ∷ []) "1Tim.2.8" ∷ word (ἐ ∷ ν ∷ []) "1Tim.2.8" ∷ word (π ∷ α ∷ ν ∷ τ ∷ ὶ ∷ []) "1Tim.2.8" ∷ word (τ ∷ ό ∷ π ∷ ῳ ∷ []) "1Tim.2.8" ∷ word (ἐ ∷ π ∷ α ∷ ί ∷ ρ ∷ ο ∷ ν ∷ τ ∷ α ∷ ς ∷ []) "1Tim.2.8" ∷ word (ὁ ∷ σ ∷ ί ∷ ο ∷ υ ∷ ς ∷ []) "1Tim.2.8" ∷ word (χ ∷ ε ∷ ῖ ∷ ρ ∷ α ∷ ς ∷ []) "1Tim.2.8" ∷ word (χ ∷ ω ∷ ρ ∷ ὶ ∷ ς ∷ []) "1Tim.2.8" ∷ word (ὀ ∷ ρ ∷ γ ∷ ῆ ∷ ς ∷ []) "1Tim.2.8" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.2.8" ∷ word (δ ∷ ι ∷ α ∷ ∙λ ∷ ο ∷ γ ∷ ι ∷ σ ∷ μ ∷ ο ∷ ῦ ∷ []) "1Tim.2.8" ∷ word (ὡ ∷ σ ∷ α ∷ ύ ∷ τ ∷ ω ∷ ς ∷ []) "1Tim.2.9" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.2.9" ∷ word (γ ∷ υ ∷ ν ∷ α ∷ ῖ ∷ κ ∷ α ∷ ς ∷ []) "1Tim.2.9" ∷ word (ἐ ∷ ν ∷ []) "1Tim.2.9" ∷ word (κ ∷ α ∷ τ ∷ α ∷ σ ∷ τ ∷ ο ∷ ∙λ ∷ ῇ ∷ []) "1Tim.2.9" ∷ word (κ ∷ ο ∷ σ ∷ μ ∷ ί ∷ ῳ ∷ []) "1Tim.2.9" ∷ word (μ ∷ ε ∷ τ ∷ ὰ ∷ []) "1Tim.2.9" ∷ word (α ∷ ἰ ∷ δ ∷ ο ∷ ῦ ∷ ς ∷ []) "1Tim.2.9" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.2.9" ∷ word (σ ∷ ω ∷ φ ∷ ρ ∷ ο ∷ σ ∷ ύ ∷ ν ∷ η ∷ ς ∷ []) "1Tim.2.9" ∷ word (κ ∷ ο ∷ σ ∷ μ ∷ ε ∷ ῖ ∷ ν ∷ []) "1Tim.2.9" ∷ word (ἑ ∷ α ∷ υ ∷ τ ∷ ά ∷ ς ∷ []) "1Tim.2.9" ∷ word (μ ∷ ὴ ∷ []) "1Tim.2.9" ∷ word (ἐ ∷ ν ∷ []) "1Tim.2.9" ∷ word (π ∷ ∙λ ∷ έ ∷ γ ∷ μ ∷ α ∷ σ ∷ ι ∷ ν ∷ []) "1Tim.2.9" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.2.9" ∷ word (χ ∷ ρ ∷ υ ∷ σ ∷ ί ∷ ῳ ∷ []) "1Tim.2.9" ∷ word (ἢ ∷ []) "1Tim.2.9" ∷ word (μ ∷ α ∷ ρ ∷ γ ∷ α ∷ ρ ∷ ί ∷ τ ∷ α ∷ ι ∷ ς ∷ []) "1Tim.2.9" ∷ word (ἢ ∷ []) "1Tim.2.9" ∷ word (ἱ ∷ μ ∷ α ∷ τ ∷ ι ∷ σ ∷ μ ∷ ῷ ∷ []) "1Tim.2.9" ∷ word (π ∷ ο ∷ ∙λ ∷ υ ∷ τ ∷ ε ∷ ∙λ ∷ ε ∷ ῖ ∷ []) "1Tim.2.9" ∷ word (ἀ ∷ ∙λ ∷ ∙λ ∷ []) "1Tim.2.10" ∷ word (ὃ ∷ []) "1Tim.2.10" ∷ word (π ∷ ρ ∷ έ ∷ π ∷ ε ∷ ι ∷ []) "1Tim.2.10" ∷ word (γ ∷ υ ∷ ν ∷ α ∷ ι ∷ ξ ∷ ὶ ∷ ν ∷ []) "1Tim.2.10" ∷ word (ἐ ∷ π ∷ α ∷ γ ∷ γ ∷ ε ∷ ∙λ ∷ ∙λ ∷ ο ∷ μ ∷ έ ∷ ν ∷ α ∷ ι ∷ ς ∷ []) "1Tim.2.10" ∷ word (θ ∷ ε ∷ ο ∷ σ ∷ έ ∷ β ∷ ε ∷ ι ∷ α ∷ ν ∷ []) "1Tim.2.10" ∷ word (δ ∷ ι ∷ []) "1Tim.2.10" ∷ word (ἔ ∷ ρ ∷ γ ∷ ω ∷ ν ∷ []) "1Tim.2.10" ∷ word (ἀ ∷ γ ∷ α ∷ θ ∷ ῶ ∷ ν ∷ []) "1Tim.2.10" ∷ word (γ ∷ υ ∷ ν ∷ ὴ ∷ []) "1Tim.2.11" ∷ word (ἐ ∷ ν ∷ []) "1Tim.2.11" ∷ word (ἡ ∷ σ ∷ υ ∷ χ ∷ ί ∷ ᾳ ∷ []) "1Tim.2.11" ∷ word (μ ∷ α ∷ ν ∷ θ ∷ α ∷ ν ∷ έ ∷ τ ∷ ω ∷ []) "1Tim.2.11" ∷ word (ἐ ∷ ν ∷ []) "1Tim.2.11" ∷ word (π ∷ ά ∷ σ ∷ ῃ ∷ []) "1Tim.2.11" ∷ word (ὑ ∷ π ∷ ο ∷ τ ∷ α ∷ γ ∷ ῇ ∷ []) "1Tim.2.11" ∷ word (δ ∷ ι ∷ δ ∷ ά ∷ σ ∷ κ ∷ ε ∷ ι ∷ ν ∷ []) "1Tim.2.12" ∷ word (δ ∷ ὲ ∷ []) "1Tim.2.12" ∷ word (γ ∷ υ ∷ ν ∷ α ∷ ι ∷ κ ∷ ὶ ∷ []) "1Tim.2.12" ∷ word (ο ∷ ὐ ∷ κ ∷ []) "1Tim.2.12" ∷ word (ἐ ∷ π ∷ ι ∷ τ ∷ ρ ∷ έ ∷ π ∷ ω ∷ []) "1Tim.2.12" ∷ word (ο ∷ ὐ ∷ δ ∷ ὲ ∷ []) "1Tim.2.12" ∷ word (α ∷ ὐ ∷ θ ∷ ε ∷ ν ∷ τ ∷ ε ∷ ῖ ∷ ν ∷ []) "1Tim.2.12" ∷ word (ἀ ∷ ν ∷ δ ∷ ρ ∷ ό ∷ ς ∷ []) "1Tim.2.12" ∷ word (ἀ ∷ ∙λ ∷ ∙λ ∷ []) "1Tim.2.12" ∷ word (ε ∷ ἶ ∷ ν ∷ α ∷ ι ∷ []) "1Tim.2.12" ∷ word (ἐ ∷ ν ∷ []) "1Tim.2.12" ∷ word (ἡ ∷ σ ∷ υ ∷ χ ∷ ί ∷ ᾳ ∷ []) "1Tim.2.12" ∷ word (Ἀ ∷ δ ∷ ὰ ∷ μ ∷ []) "1Tim.2.13" ∷ word (γ ∷ ὰ ∷ ρ ∷ []) "1Tim.2.13" ∷ word (π ∷ ρ ∷ ῶ ∷ τ ∷ ο ∷ ς ∷ []) "1Tim.2.13" ∷ word (ἐ ∷ π ∷ ∙λ ∷ ά ∷ σ ∷ θ ∷ η ∷ []) "1Tim.2.13" ∷ word (ε ∷ ἶ ∷ τ ∷ α ∷ []) "1Tim.2.13" ∷ word (Ε ∷ ὕ ∷ α ∷ []) "1Tim.2.13" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.2.14" ∷ word (Ἀ ∷ δ ∷ ὰ ∷ μ ∷ []) "1Tim.2.14" ∷ word (ο ∷ ὐ ∷ κ ∷ []) "1Tim.2.14" ∷ word (ἠ ∷ π ∷ α ∷ τ ∷ ή ∷ θ ∷ η ∷ []) "1Tim.2.14" ∷ word (ἡ ∷ []) "1Tim.2.14" ∷ word (δ ∷ ὲ ∷ []) "1Tim.2.14" ∷ word (γ ∷ υ ∷ ν ∷ ὴ ∷ []) "1Tim.2.14" ∷ word (ἐ ∷ ξ ∷ α ∷ π ∷ α ∷ τ ∷ η ∷ θ ∷ ε ∷ ῖ ∷ σ ∷ α ∷ []) "1Tim.2.14" ∷ word (ἐ ∷ ν ∷ []) "1Tim.2.14" ∷ word (π ∷ α ∷ ρ ∷ α ∷ β ∷ ά ∷ σ ∷ ε ∷ ι ∷ []) "1Tim.2.14" ∷ word (γ ∷ έ ∷ γ ∷ ο ∷ ν ∷ ε ∷ ν ∷ []) "1Tim.2.14" ∷ word (σ ∷ ω ∷ θ ∷ ή ∷ σ ∷ ε ∷ τ ∷ α ∷ ι ∷ []) "1Tim.2.15" ∷ word (δ ∷ ὲ ∷ []) "1Tim.2.15" ∷ word (δ ∷ ι ∷ ὰ ∷ []) "1Tim.2.15" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "1Tim.2.15" ∷ word (τ ∷ ε ∷ κ ∷ ν ∷ ο ∷ γ ∷ ο ∷ ν ∷ ί ∷ α ∷ ς ∷ []) "1Tim.2.15" ∷ word (ἐ ∷ ὰ ∷ ν ∷ []) "1Tim.2.15" ∷ word (μ ∷ ε ∷ ί ∷ ν ∷ ω ∷ σ ∷ ι ∷ ν ∷ []) "1Tim.2.15" ∷ word (ἐ ∷ ν ∷ []) "1Tim.2.15" ∷ word (π ∷ ί ∷ σ ∷ τ ∷ ε ∷ ι ∷ []) "1Tim.2.15" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.2.15" ∷ word (ἀ ∷ γ ∷ ά ∷ π ∷ ῃ ∷ []) "1Tim.2.15" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.2.15" ∷ word (ἁ ∷ γ ∷ ι ∷ α ∷ σ ∷ μ ∷ ῷ ∷ []) "1Tim.2.15" ∷ word (μ ∷ ε ∷ τ ∷ ὰ ∷ []) "1Tim.2.15" ∷ word (σ ∷ ω ∷ φ ∷ ρ ∷ ο ∷ σ ∷ ύ ∷ ν ∷ η ∷ ς ∷ []) "1Tim.2.15" ∷ word (Π ∷ ι ∷ σ ∷ τ ∷ ὸ ∷ ς ∷ []) "1Tim.3.1" ∷ word (ὁ ∷ []) "1Tim.3.1" ∷ word (∙λ ∷ ό ∷ γ ∷ ο ∷ ς ∷ []) "1Tim.3.1" ∷ word (ε ∷ ἴ ∷ []) "1Tim.3.1" ∷ word (τ ∷ ι ∷ ς ∷ []) "1Tim.3.1" ∷ word (ἐ ∷ π ∷ ι ∷ σ ∷ κ ∷ ο ∷ π ∷ ῆ ∷ ς ∷ []) "1Tim.3.1" ∷ word (ὀ ∷ ρ ∷ έ ∷ γ ∷ ε ∷ τ ∷ α ∷ ι ∷ []) "1Tim.3.1" ∷ word (κ ∷ α ∷ ∙λ ∷ ο ∷ ῦ ∷ []) "1Tim.3.1" ∷ word (ἔ ∷ ρ ∷ γ ∷ ο ∷ υ ∷ []) "1Tim.3.1" ∷ word (ἐ ∷ π ∷ ι ∷ θ ∷ υ ∷ μ ∷ ε ∷ ῖ ∷ []) "1Tim.3.1" ∷ word (δ ∷ ε ∷ ῖ ∷ []) "1Tim.3.2" ∷ word (ο ∷ ὖ ∷ ν ∷ []) "1Tim.3.2" ∷ word (τ ∷ ὸ ∷ ν ∷ []) "1Tim.3.2" ∷ word (ἐ ∷ π ∷ ί ∷ σ ∷ κ ∷ ο ∷ π ∷ ο ∷ ν ∷ []) "1Tim.3.2" ∷ word (ἀ ∷ ν ∷ ε ∷ π ∷ ί ∷ ∙λ ∷ η ∷ μ ∷ π ∷ τ ∷ ο ∷ ν ∷ []) "1Tim.3.2" ∷ word (ε ∷ ἶ ∷ ν ∷ α ∷ ι ∷ []) "1Tim.3.2" ∷ word (μ ∷ ι ∷ ᾶ ∷ ς ∷ []) "1Tim.3.2" ∷ word (γ ∷ υ ∷ ν ∷ α ∷ ι ∷ κ ∷ ὸ ∷ ς ∷ []) "1Tim.3.2" ∷ word (ἄ ∷ ν ∷ δ ∷ ρ ∷ α ∷ []) "1Tim.3.2" ∷ word (ν ∷ η ∷ φ ∷ ά ∷ ∙λ ∷ ι ∷ ο ∷ ν ∷ []) "1Tim.3.2" ∷ word (σ ∷ ώ ∷ φ ∷ ρ ∷ ο ∷ ν ∷ α ∷ []) "1Tim.3.2" ∷ word (κ ∷ ό ∷ σ ∷ μ ∷ ι ∷ ο ∷ ν ∷ []) "1Tim.3.2" ∷ word (φ ∷ ι ∷ ∙λ ∷ ό ∷ ξ ∷ ε ∷ ν ∷ ο ∷ ν ∷ []) "1Tim.3.2" ∷ word (δ ∷ ι ∷ δ ∷ α ∷ κ ∷ τ ∷ ι ∷ κ ∷ ό ∷ ν ∷ []) "1Tim.3.2" ∷ word (μ ∷ ὴ ∷ []) "1Tim.3.3" ∷ word (π ∷ ά ∷ ρ ∷ ο ∷ ι ∷ ν ∷ ο ∷ ν ∷ []) "1Tim.3.3" ∷ word (μ ∷ ὴ ∷ []) "1Tim.3.3" ∷ word (π ∷ ∙λ ∷ ή ∷ κ ∷ τ ∷ η ∷ ν ∷ []) "1Tim.3.3" ∷ word (ἀ ∷ ∙λ ∷ ∙λ ∷ ὰ ∷ []) "1Tim.3.3" ∷ word (ἐ ∷ π ∷ ι ∷ ε ∷ ι ∷ κ ∷ ῆ ∷ []) "1Tim.3.3" ∷ word (ἄ ∷ μ ∷ α ∷ χ ∷ ο ∷ ν ∷ []) "1Tim.3.3" ∷ word (ἀ ∷ φ ∷ ι ∷ ∙λ ∷ ά ∷ ρ ∷ γ ∷ υ ∷ ρ ∷ ο ∷ ν ∷ []) "1Tim.3.3" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "1Tim.3.4" ∷ word (ἰ ∷ δ ∷ ί ∷ ο ∷ υ ∷ []) "1Tim.3.4" ∷ word (ο ∷ ἴ ∷ κ ∷ ο ∷ υ ∷ []) "1Tim.3.4" ∷ word (κ ∷ α ∷ ∙λ ∷ ῶ ∷ ς ∷ []) "1Tim.3.4" ∷ word (π ∷ ρ ∷ ο ∷ ϊ ∷ σ ∷ τ ∷ ά ∷ μ ∷ ε ∷ ν ∷ ο ∷ ν ∷ []) "1Tim.3.4" ∷ word (τ ∷ έ ∷ κ ∷ ν ∷ α ∷ []) "1Tim.3.4" ∷ word (ἔ ∷ χ ∷ ο ∷ ν ∷ τ ∷ α ∷ []) "1Tim.3.4" ∷ word (ἐ ∷ ν ∷ []) "1Tim.3.4" ∷ word (ὑ ∷ π ∷ ο ∷ τ ∷ α ∷ γ ∷ ῇ ∷ []) "1Tim.3.4" ∷ word (μ ∷ ε ∷ τ ∷ ὰ ∷ []) "1Tim.3.4" ∷ word (π ∷ ά ∷ σ ∷ η ∷ ς ∷ []) "1Tim.3.4" ∷ word (σ ∷ ε ∷ μ ∷ ν ∷ ό ∷ τ ∷ η ∷ τ ∷ ο ∷ ς ∷ []) "1Tim.3.4" ∷ word (ε ∷ ἰ ∷ []) "1Tim.3.5" ∷ word (δ ∷ έ ∷ []) "1Tim.3.5" ∷ word (τ ∷ ι ∷ ς ∷ []) "1Tim.3.5" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "1Tim.3.5" ∷ word (ἰ ∷ δ ∷ ί ∷ ο ∷ υ ∷ []) "1Tim.3.5" ∷ word (ο ∷ ἴ ∷ κ ∷ ο ∷ υ ∷ []) "1Tim.3.5" ∷ word (π ∷ ρ ∷ ο ∷ σ ∷ τ ∷ ῆ ∷ ν ∷ α ∷ ι ∷ []) "1Tim.3.5" ∷ word (ο ∷ ὐ ∷ κ ∷ []) "1Tim.3.5" ∷ word (ο ∷ ἶ ∷ δ ∷ ε ∷ ν ∷ []) "1Tim.3.5" ∷ word (π ∷ ῶ ∷ ς ∷ []) "1Tim.3.5" ∷ word (ἐ ∷ κ ∷ κ ∷ ∙λ ∷ η ∷ σ ∷ ί ∷ α ∷ ς ∷ []) "1Tim.3.5" ∷ word (θ ∷ ε ∷ ο ∷ ῦ ∷ []) "1Tim.3.5" ∷ word (ἐ ∷ π ∷ ι ∷ μ ∷ ε ∷ ∙λ ∷ ή ∷ σ ∷ ε ∷ τ ∷ α ∷ ι ∷ []) "1Tim.3.5" ∷ word (μ ∷ ὴ ∷ []) "1Tim.3.6" ∷ word (ν ∷ ε ∷ ό ∷ φ ∷ υ ∷ τ ∷ ο ∷ ν ∷ []) "1Tim.3.6" ∷ word (ἵ ∷ ν ∷ α ∷ []) "1Tim.3.6" ∷ word (μ ∷ ὴ ∷ []) "1Tim.3.6" ∷ word (τ ∷ υ ∷ φ ∷ ω ∷ θ ∷ ε ∷ ὶ ∷ ς ∷ []) "1Tim.3.6" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "1Tim.3.6" ∷ word (κ ∷ ρ ∷ ί ∷ μ ∷ α ∷ []) "1Tim.3.6" ∷ word (ἐ ∷ μ ∷ π ∷ έ ∷ σ ∷ ῃ ∷ []) "1Tim.3.6" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "1Tim.3.6" ∷ word (δ ∷ ι ∷ α ∷ β ∷ ό ∷ ∙λ ∷ ο ∷ υ ∷ []) "1Tim.3.6" ∷ word (δ ∷ ε ∷ ῖ ∷ []) "1Tim.3.7" ∷ word (δ ∷ ὲ ∷ []) "1Tim.3.7" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.3.7" ∷ word (μ ∷ α ∷ ρ ∷ τ ∷ υ ∷ ρ ∷ ί ∷ α ∷ ν ∷ []) "1Tim.3.7" ∷ word (κ ∷ α ∷ ∙λ ∷ ὴ ∷ ν ∷ []) "1Tim.3.7" ∷ word (ἔ ∷ χ ∷ ε ∷ ι ∷ ν ∷ []) "1Tim.3.7" ∷ word (ἀ ∷ π ∷ ὸ ∷ []) "1Tim.3.7" ∷ word (τ ∷ ῶ ∷ ν ∷ []) "1Tim.3.7" ∷ word (ἔ ∷ ξ ∷ ω ∷ θ ∷ ε ∷ ν ∷ []) "1Tim.3.7" ∷ word (ἵ ∷ ν ∷ α ∷ []) "1Tim.3.7" ∷ word (μ ∷ ὴ ∷ []) "1Tim.3.7" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "1Tim.3.7" ∷ word (ὀ ∷ ν ∷ ε ∷ ι ∷ δ ∷ ι ∷ σ ∷ μ ∷ ὸ ∷ ν ∷ []) "1Tim.3.7" ∷ word (ἐ ∷ μ ∷ π ∷ έ ∷ σ ∷ ῃ ∷ []) "1Tim.3.7" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.3.7" ∷ word (π ∷ α ∷ γ ∷ ί ∷ δ ∷ α ∷ []) "1Tim.3.7" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "1Tim.3.7" ∷ word (δ ∷ ι ∷ α ∷ β ∷ ό ∷ ∙λ ∷ ο ∷ υ ∷ []) "1Tim.3.7" ∷ word (Δ ∷ ι ∷ α ∷ κ ∷ ό ∷ ν ∷ ο ∷ υ ∷ ς ∷ []) "1Tim.3.8" ∷ word (ὡ ∷ σ ∷ α ∷ ύ ∷ τ ∷ ω ∷ ς ∷ []) "1Tim.3.8" ∷ word (σ ∷ ε ∷ μ ∷ ν ∷ ο ∷ ύ ∷ ς ∷ []) "1Tim.3.8" ∷ word (μ ∷ ὴ ∷ []) "1Tim.3.8" ∷ word (δ ∷ ι ∷ ∙λ ∷ ό ∷ γ ∷ ο ∷ υ ∷ ς ∷ []) "1Tim.3.8" ∷ word (μ ∷ ὴ ∷ []) "1Tim.3.8" ∷ word (ο ∷ ἴ ∷ ν ∷ ῳ ∷ []) "1Tim.3.8" ∷ word (π ∷ ο ∷ ∙λ ∷ ∙λ ∷ ῷ ∷ []) "1Tim.3.8" ∷ word (π ∷ ρ ∷ ο ∷ σ ∷ έ ∷ χ ∷ ο ∷ ν ∷ τ ∷ α ∷ ς ∷ []) "1Tim.3.8" ∷ word (μ ∷ ὴ ∷ []) "1Tim.3.8" ∷ word (α ∷ ἰ ∷ σ ∷ χ ∷ ρ ∷ ο ∷ κ ∷ ε ∷ ρ ∷ δ ∷ ε ∷ ῖ ∷ ς ∷ []) "1Tim.3.8" ∷ word (ἔ ∷ χ ∷ ο ∷ ν ∷ τ ∷ α ∷ ς ∷ []) "1Tim.3.9" ∷ word (τ ∷ ὸ ∷ []) "1Tim.3.9" ∷ word (μ ∷ υ ∷ σ ∷ τ ∷ ή ∷ ρ ∷ ι ∷ ο ∷ ν ∷ []) "1Tim.3.9" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "1Tim.3.9" ∷ word (π ∷ ί ∷ σ ∷ τ ∷ ε ∷ ω ∷ ς ∷ []) "1Tim.3.9" ∷ word (ἐ ∷ ν ∷ []) "1Tim.3.9" ∷ word (κ ∷ α ∷ θ ∷ α ∷ ρ ∷ ᾷ ∷ []) "1Tim.3.9" ∷ word (σ ∷ υ ∷ ν ∷ ε ∷ ι ∷ δ ∷ ή ∷ σ ∷ ε ∷ ι ∷ []) "1Tim.3.9" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.3.10" ∷ word (ο ∷ ὗ ∷ τ ∷ ο ∷ ι ∷ []) "1Tim.3.10" ∷ word (δ ∷ ὲ ∷ []) "1Tim.3.10" ∷ word (δ ∷ ο ∷ κ ∷ ι ∷ μ ∷ α ∷ ζ ∷ έ ∷ σ ∷ θ ∷ ω ∷ σ ∷ α ∷ ν ∷ []) "1Tim.3.10" ∷ word (π ∷ ρ ∷ ῶ ∷ τ ∷ ο ∷ ν ∷ []) "1Tim.3.10" ∷ word (ε ∷ ἶ ∷ τ ∷ α ∷ []) "1Tim.3.10" ∷ word (δ ∷ ι ∷ α ∷ κ ∷ ο ∷ ν ∷ ε ∷ ί ∷ τ ∷ ω ∷ σ ∷ α ∷ ν ∷ []) "1Tim.3.10" ∷ word (ἀ ∷ ν ∷ έ ∷ γ ∷ κ ∷ ∙λ ∷ η ∷ τ ∷ ο ∷ ι ∷ []) "1Tim.3.10" ∷ word (ὄ ∷ ν ∷ τ ∷ ε ∷ ς ∷ []) "1Tim.3.10" ∷ word (γ ∷ υ ∷ ν ∷ α ∷ ῖ ∷ κ ∷ α ∷ ς ∷ []) "1Tim.3.11" ∷ word (ὡ ∷ σ ∷ α ∷ ύ ∷ τ ∷ ω ∷ ς ∷ []) "1Tim.3.11" ∷ word (σ ∷ ε ∷ μ ∷ ν ∷ ά ∷ ς ∷ []) "1Tim.3.11" ∷ word (μ ∷ ὴ ∷ []) "1Tim.3.11" ∷ word (δ ∷ ι ∷ α ∷ β ∷ ό ∷ ∙λ ∷ ο ∷ υ ∷ ς ∷ []) "1Tim.3.11" ∷ word (ν ∷ η ∷ φ ∷ α ∷ ∙λ ∷ ί ∷ ο ∷ υ ∷ ς ∷ []) "1Tim.3.11" ∷ word (π ∷ ι ∷ σ ∷ τ ∷ ὰ ∷ ς ∷ []) "1Tim.3.11" ∷ word (ἐ ∷ ν ∷ []) "1Tim.3.11" ∷ word (π ∷ ᾶ ∷ σ ∷ ι ∷ ν ∷ []) "1Tim.3.11" ∷ word (δ ∷ ι ∷ ά ∷ κ ∷ ο ∷ ν ∷ ο ∷ ι ∷ []) "1Tim.3.12" ∷ word (ἔ ∷ σ ∷ τ ∷ ω ∷ σ ∷ α ∷ ν ∷ []) "1Tim.3.12" ∷ word (μ ∷ ι ∷ ᾶ ∷ ς ∷ []) "1Tim.3.12" ∷ word (γ ∷ υ ∷ ν ∷ α ∷ ι ∷ κ ∷ ὸ ∷ ς ∷ []) "1Tim.3.12" ∷ word (ἄ ∷ ν ∷ δ ∷ ρ ∷ ε ∷ ς ∷ []) "1Tim.3.12" ∷ word (τ ∷ έ ∷ κ ∷ ν ∷ ω ∷ ν ∷ []) "1Tim.3.12" ∷ word (κ ∷ α ∷ ∙λ ∷ ῶ ∷ ς ∷ []) "1Tim.3.12" ∷ word (π ∷ ρ ∷ ο ∷ ϊ ∷ σ ∷ τ ∷ ά ∷ μ ∷ ε ∷ ν ∷ ο ∷ ι ∷ []) "1Tim.3.12" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.3.12" ∷ word (τ ∷ ῶ ∷ ν ∷ []) "1Tim.3.12" ∷ word (ἰ ∷ δ ∷ ί ∷ ω ∷ ν ∷ []) "1Tim.3.12" ∷ word (ο ∷ ἴ ∷ κ ∷ ω ∷ ν ∷ []) "1Tim.3.12" ∷ word (ο ∷ ἱ ∷ []) "1Tim.3.13" ∷ word (γ ∷ ὰ ∷ ρ ∷ []) "1Tim.3.13" ∷ word (κ ∷ α ∷ ∙λ ∷ ῶ ∷ ς ∷ []) "1Tim.3.13" ∷ word (δ ∷ ι ∷ α ∷ κ ∷ ο ∷ ν ∷ ή ∷ σ ∷ α ∷ ν ∷ τ ∷ ε ∷ ς ∷ []) "1Tim.3.13" ∷ word (β ∷ α ∷ θ ∷ μ ∷ ὸ ∷ ν ∷ []) "1Tim.3.13" ∷ word (ἑ ∷ α ∷ υ ∷ τ ∷ ο ∷ ῖ ∷ ς ∷ []) "1Tim.3.13" ∷ word (κ ∷ α ∷ ∙λ ∷ ὸ ∷ ν ∷ []) "1Tim.3.13" ∷ word (π ∷ ε ∷ ρ ∷ ι ∷ π ∷ ο ∷ ι ∷ ο ∷ ῦ ∷ ν ∷ τ ∷ α ∷ ι ∷ []) "1Tim.3.13" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.3.13" ∷ word (π ∷ ο ∷ ∙λ ∷ ∙λ ∷ ὴ ∷ ν ∷ []) "1Tim.3.13" ∷ word (π ∷ α ∷ ρ ∷ ρ ∷ η ∷ σ ∷ ί ∷ α ∷ ν ∷ []) "1Tim.3.13" ∷ word (ἐ ∷ ν ∷ []) "1Tim.3.13" ∷ word (π ∷ ί ∷ σ ∷ τ ∷ ε ∷ ι ∷ []) "1Tim.3.13" ∷ word (τ ∷ ῇ ∷ []) "1Tim.3.13" ∷ word (ἐ ∷ ν ∷ []) "1Tim.3.13" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ῷ ∷ []) "1Tim.3.13" ∷ word (Ἰ ∷ η ∷ σ ∷ ο ∷ ῦ ∷ []) "1Tim.3.13" ∷ word (Τ ∷ α ∷ ῦ ∷ τ ∷ ά ∷ []) "1Tim.3.14" ∷ word (σ ∷ ο ∷ ι ∷ []) "1Tim.3.14" ∷ word (γ ∷ ρ ∷ ά ∷ φ ∷ ω ∷ []) "1Tim.3.14" ∷ word (ἐ ∷ ∙λ ∷ π ∷ ί ∷ ζ ∷ ω ∷ ν ∷ []) "1Tim.3.14" ∷ word (ἐ ∷ ∙λ ∷ θ ∷ ε ∷ ῖ ∷ ν ∷ []) "1Tim.3.14" ∷ word (π ∷ ρ ∷ ὸ ∷ ς ∷ []) "1Tim.3.14" ∷ word (σ ∷ ὲ ∷ []) "1Tim.3.14" ∷ word (ἐ ∷ ν ∷ []) "1Tim.3.14" ∷ word (τ ∷ ά ∷ χ ∷ ε ∷ ι ∷ []) "1Tim.3.14" ∷ word (ἐ ∷ ὰ ∷ ν ∷ []) "1Tim.3.15" ∷ word (δ ∷ ὲ ∷ []) "1Tim.3.15" ∷ word (β ∷ ρ ∷ α ∷ δ ∷ ύ ∷ ν ∷ ω ∷ []) "1Tim.3.15" ∷ word (ἵ ∷ ν ∷ α ∷ []) "1Tim.3.15" ∷ word (ε ∷ ἰ ∷ δ ∷ ῇ ∷ ς ∷ []) "1Tim.3.15" ∷ word (π ∷ ῶ ∷ ς ∷ []) "1Tim.3.15" ∷ word (δ ∷ ε ∷ ῖ ∷ []) "1Tim.3.15" ∷ word (ἐ ∷ ν ∷ []) "1Tim.3.15" ∷ word (ο ∷ ἴ ∷ κ ∷ ῳ ∷ []) "1Tim.3.15" ∷ word (θ ∷ ε ∷ ο ∷ ῦ ∷ []) "1Tim.3.15" ∷ word (ἀ ∷ ν ∷ α ∷ σ ∷ τ ∷ ρ ∷ έ ∷ φ ∷ ε ∷ σ ∷ θ ∷ α ∷ ι ∷ []) "1Tim.3.15" ∷ word (ἥ ∷ τ ∷ ι ∷ ς ∷ []) "1Tim.3.15" ∷ word (ἐ ∷ σ ∷ τ ∷ ὶ ∷ ν ∷ []) "1Tim.3.15" ∷ word (ἐ ∷ κ ∷ κ ∷ ∙λ ∷ η ∷ σ ∷ ί ∷ α ∷ []) "1Tim.3.15" ∷ word (θ ∷ ε ∷ ο ∷ ῦ ∷ []) "1Tim.3.15" ∷ word (ζ ∷ ῶ ∷ ν ∷ τ ∷ ο ∷ ς ∷ []) "1Tim.3.15" ∷ word (σ ∷ τ ∷ ῦ ∷ ∙λ ∷ ο ∷ ς ∷ []) "1Tim.3.15" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.3.15" ∷ word (ἑ ∷ δ ∷ ρ ∷ α ∷ ί ∷ ω ∷ μ ∷ α ∷ []) "1Tim.3.15" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "1Tim.3.15" ∷ word (ἀ ∷ ∙λ ∷ η ∷ θ ∷ ε ∷ ί ∷ α ∷ ς ∷ []) "1Tim.3.15" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.3.16" ∷ word (ὁ ∷ μ ∷ ο ∷ ∙λ ∷ ο ∷ γ ∷ ο ∷ υ ∷ μ ∷ έ ∷ ν ∷ ω ∷ ς ∷ []) "1Tim.3.16" ∷ word (μ ∷ έ ∷ γ ∷ α ∷ []) "1Tim.3.16" ∷ word (ἐ ∷ σ ∷ τ ∷ ὶ ∷ ν ∷ []) "1Tim.3.16" ∷ word (τ ∷ ὸ ∷ []) "1Tim.3.16" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "1Tim.3.16" ∷ word (ε ∷ ὐ ∷ σ ∷ ε ∷ β ∷ ε ∷ ί ∷ α ∷ ς ∷ []) "1Tim.3.16" ∷ word (μ ∷ υ ∷ σ ∷ τ ∷ ή ∷ ρ ∷ ι ∷ ο ∷ ν ∷ []) "1Tim.3.16" ∷ word (Ὃ ∷ ς ∷ []) "1Tim.3.16" ∷ word (ἐ ∷ φ ∷ α ∷ ν ∷ ε ∷ ρ ∷ ώ ∷ θ ∷ η ∷ []) "1Tim.3.16" ∷ word (ἐ ∷ ν ∷ []) "1Tim.3.16" ∷ word (σ ∷ α ∷ ρ ∷ κ ∷ ί ∷ []) "1Tim.3.16" ∷ word (ἐ ∷ δ ∷ ι ∷ κ ∷ α ∷ ι ∷ ώ ∷ θ ∷ η ∷ []) "1Tim.3.16" ∷ word (ἐ ∷ ν ∷ []) "1Tim.3.16" ∷ word (π ∷ ν ∷ ε ∷ ύ ∷ μ ∷ α ∷ τ ∷ ι ∷ []) "1Tim.3.16" ∷ word (ὤ ∷ φ ∷ θ ∷ η ∷ []) "1Tim.3.16" ∷ word (ἀ ∷ γ ∷ γ ∷ έ ∷ ∙λ ∷ ο ∷ ι ∷ ς ∷ []) "1Tim.3.16" ∷ word (ἐ ∷ κ ∷ η ∷ ρ ∷ ύ ∷ χ ∷ θ ∷ η ∷ []) "1Tim.3.16" ∷ word (ἐ ∷ ν ∷ []) "1Tim.3.16" ∷ word (ἔ ∷ θ ∷ ν ∷ ε ∷ σ ∷ ι ∷ ν ∷ []) "1Tim.3.16" ∷ word (ἐ ∷ π ∷ ι ∷ σ ∷ τ ∷ ε ∷ ύ ∷ θ ∷ η ∷ []) "1Tim.3.16" ∷ word (ἐ ∷ ν ∷ []) "1Tim.3.16" ∷ word (κ ∷ ό ∷ σ ∷ μ ∷ ῳ ∷ []) "1Tim.3.16" ∷ word (ἀ ∷ ν ∷ ε ∷ ∙λ ∷ ή ∷ μ ∷ φ ∷ θ ∷ η ∷ []) "1Tim.3.16" ∷ word (ἐ ∷ ν ∷ []) "1Tim.3.16" ∷ word (δ ∷ ό ∷ ξ ∷ ῃ ∷ []) "1Tim.3.16" ∷ word (Τ ∷ ὸ ∷ []) "1Tim.4.1" ∷ word (δ ∷ ὲ ∷ []) "1Tim.4.1" ∷ word (π ∷ ν ∷ ε ∷ ῦ ∷ μ ∷ α ∷ []) "1Tim.4.1" ∷ word (ῥ ∷ η ∷ τ ∷ ῶ ∷ ς ∷ []) "1Tim.4.1" ∷ word (∙λ ∷ έ ∷ γ ∷ ε ∷ ι ∷ []) "1Tim.4.1" ∷ word (ὅ ∷ τ ∷ ι ∷ []) "1Tim.4.1" ∷ word (ἐ ∷ ν ∷ []) "1Tim.4.1" ∷ word (ὑ ∷ σ ∷ τ ∷ έ ∷ ρ ∷ ο ∷ ι ∷ ς ∷ []) "1Tim.4.1" ∷ word (κ ∷ α ∷ ι ∷ ρ ∷ ο ∷ ῖ ∷ ς ∷ []) "1Tim.4.1" ∷ word (ἀ ∷ π ∷ ο ∷ σ ∷ τ ∷ ή ∷ σ ∷ ο ∷ ν ∷ τ ∷ α ∷ ί ∷ []) "1Tim.4.1" ∷ word (τ ∷ ι ∷ ν ∷ ε ∷ ς ∷ []) "1Tim.4.1" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "1Tim.4.1" ∷ word (π ∷ ί ∷ σ ∷ τ ∷ ε ∷ ω ∷ ς ∷ []) "1Tim.4.1" ∷ word (π ∷ ρ ∷ ο ∷ σ ∷ έ ∷ χ ∷ ο ∷ ν ∷ τ ∷ ε ∷ ς ∷ []) "1Tim.4.1" ∷ word (π ∷ ν ∷ ε ∷ ύ ∷ μ ∷ α ∷ σ ∷ ι ∷ []) "1Tim.4.1" ∷ word (π ∷ ∙λ ∷ ά ∷ ν ∷ ο ∷ ι ∷ ς ∷ []) "1Tim.4.1" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.4.1" ∷ word (δ ∷ ι ∷ δ ∷ α ∷ σ ∷ κ ∷ α ∷ ∙λ ∷ ί ∷ α ∷ ι ∷ ς ∷ []) "1Tim.4.1" ∷ word (δ ∷ α ∷ ι ∷ μ ∷ ο ∷ ν ∷ ί ∷ ω ∷ ν ∷ []) "1Tim.4.1" ∷ word (ἐ ∷ ν ∷ []) "1Tim.4.2" ∷ word (ὑ ∷ π ∷ ο ∷ κ ∷ ρ ∷ ί ∷ σ ∷ ε ∷ ι ∷ []) "1Tim.4.2" ∷ word (ψ ∷ ε ∷ υ ∷ δ ∷ ο ∷ ∙λ ∷ ό ∷ γ ∷ ω ∷ ν ∷ []) "1Tim.4.2" ∷ word (κ ∷ ε ∷ κ ∷ α ∷ υ ∷ σ ∷ τ ∷ η ∷ ρ ∷ ι ∷ α ∷ σ ∷ μ ∷ έ ∷ ν ∷ ω ∷ ν ∷ []) "1Tim.4.2" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "1Tim.4.2" ∷ word (ἰ ∷ δ ∷ ί ∷ α ∷ ν ∷ []) "1Tim.4.2" ∷ word (σ ∷ υ ∷ ν ∷ ε ∷ ί ∷ δ ∷ η ∷ σ ∷ ι ∷ ν ∷ []) "1Tim.4.2" ∷ word (κ ∷ ω ∷ ∙λ ∷ υ ∷ ό ∷ ν ∷ τ ∷ ω ∷ ν ∷ []) "1Tim.4.3" ∷ word (γ ∷ α ∷ μ ∷ ε ∷ ῖ ∷ ν ∷ []) "1Tim.4.3" ∷ word (ἀ ∷ π ∷ έ ∷ χ ∷ ε ∷ σ ∷ θ ∷ α ∷ ι ∷ []) "1Tim.4.3" ∷ word (β ∷ ρ ∷ ω ∷ μ ∷ ά ∷ τ ∷ ω ∷ ν ∷ []) "1Tim.4.3" ∷ word (ἃ ∷ []) "1Tim.4.3" ∷ word (ὁ ∷ []) "1Tim.4.3" ∷ word (θ ∷ ε ∷ ὸ ∷ ς ∷ []) "1Tim.4.3" ∷ word (ἔ ∷ κ ∷ τ ∷ ι ∷ σ ∷ ε ∷ ν ∷ []) "1Tim.4.3" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "1Tim.4.3" ∷ word (μ ∷ ε ∷ τ ∷ ά ∷ ∙λ ∷ η ∷ μ ∷ ψ ∷ ι ∷ ν ∷ []) "1Tim.4.3" ∷ word (μ ∷ ε ∷ τ ∷ ὰ ∷ []) "1Tim.4.3" ∷ word (ε ∷ ὐ ∷ χ ∷ α ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ί ∷ α ∷ ς ∷ []) "1Tim.4.3" ∷ word (τ ∷ ο ∷ ῖ ∷ ς ∷ []) "1Tim.4.3" ∷ word (π ∷ ι ∷ σ ∷ τ ∷ ο ∷ ῖ ∷ ς ∷ []) "1Tim.4.3" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.4.3" ∷ word (ἐ ∷ π ∷ ε ∷ γ ∷ ν ∷ ω ∷ κ ∷ ό ∷ σ ∷ ι ∷ []) "1Tim.4.3" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "1Tim.4.3" ∷ word (ἀ ∷ ∙λ ∷ ή ∷ θ ∷ ε ∷ ι ∷ α ∷ ν ∷ []) "1Tim.4.3" ∷ word (ὅ ∷ τ ∷ ι ∷ []) "1Tim.4.4" ∷ word (π ∷ ᾶ ∷ ν ∷ []) "1Tim.4.4" ∷ word (κ ∷ τ ∷ ί ∷ σ ∷ μ ∷ α ∷ []) "1Tim.4.4" ∷ word (θ ∷ ε ∷ ο ∷ ῦ ∷ []) "1Tim.4.4" ∷ word (κ ∷ α ∷ ∙λ ∷ ό ∷ ν ∷ []) "1Tim.4.4" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.4.4" ∷ word (ο ∷ ὐ ∷ δ ∷ ὲ ∷ ν ∷ []) "1Tim.4.4" ∷ word (ἀ ∷ π ∷ ό ∷ β ∷ ∙λ ∷ η ∷ τ ∷ ο ∷ ν ∷ []) "1Tim.4.4" ∷ word (μ ∷ ε ∷ τ ∷ ὰ ∷ []) "1Tim.4.4" ∷ word (ε ∷ ὐ ∷ χ ∷ α ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ί ∷ α ∷ ς ∷ []) "1Tim.4.4" ∷ word (∙λ ∷ α ∷ μ ∷ β ∷ α ∷ ν ∷ ό ∷ μ ∷ ε ∷ ν ∷ ο ∷ ν ∷ []) "1Tim.4.4" ∷ word (ἁ ∷ γ ∷ ι ∷ ά ∷ ζ ∷ ε ∷ τ ∷ α ∷ ι ∷ []) "1Tim.4.5" ∷ word (γ ∷ ὰ ∷ ρ ∷ []) "1Tim.4.5" ∷ word (δ ∷ ι ∷ ὰ ∷ []) "1Tim.4.5" ∷ word (∙λ ∷ ό ∷ γ ∷ ο ∷ υ ∷ []) "1Tim.4.5" ∷ word (θ ∷ ε ∷ ο ∷ ῦ ∷ []) "1Tim.4.5" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.4.5" ∷ word (ἐ ∷ ν ∷ τ ∷ ε ∷ ύ ∷ ξ ∷ ε ∷ ω ∷ ς ∷ []) "1Tim.4.5" ∷ word (Τ ∷ α ∷ ῦ ∷ τ ∷ α ∷ []) "1Tim.4.6" ∷ word (ὑ ∷ π ∷ ο ∷ τ ∷ ι ∷ θ ∷ έ ∷ μ ∷ ε ∷ ν ∷ ο ∷ ς ∷ []) "1Tim.4.6" ∷ word (τ ∷ ο ∷ ῖ ∷ ς ∷ []) "1Tim.4.6" ∷ word (ἀ ∷ δ ∷ ε ∷ ∙λ ∷ φ ∷ ο ∷ ῖ ∷ ς ∷ []) "1Tim.4.6" ∷ word (κ ∷ α ∷ ∙λ ∷ ὸ ∷ ς ∷ []) "1Tim.4.6" ∷ word (ἔ ∷ σ ∷ ῃ ∷ []) "1Tim.4.6" ∷ word (δ ∷ ι ∷ ά ∷ κ ∷ ο ∷ ν ∷ ο ∷ ς ∷ []) "1Tim.4.6" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ο ∷ ῦ ∷ []) "1Tim.4.6" ∷ word (Ἰ ∷ η ∷ σ ∷ ο ∷ ῦ ∷ []) "1Tim.4.6" ∷ word (ἐ ∷ ν ∷ τ ∷ ρ ∷ ε ∷ φ ∷ ό ∷ μ ∷ ε ∷ ν ∷ ο ∷ ς ∷ []) "1Tim.4.6" ∷ word (τ ∷ ο ∷ ῖ ∷ ς ∷ []) "1Tim.4.6" ∷ word (∙λ ∷ ό ∷ γ ∷ ο ∷ ι ∷ ς ∷ []) "1Tim.4.6" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "1Tim.4.6" ∷ word (π ∷ ί ∷ σ ∷ τ ∷ ε ∷ ω ∷ ς ∷ []) "1Tim.4.6" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.4.6" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "1Tim.4.6" ∷ word (κ ∷ α ∷ ∙λ ∷ ῆ ∷ ς ∷ []) "1Tim.4.6" ∷ word (δ ∷ ι ∷ δ ∷ α ∷ σ ∷ κ ∷ α ∷ ∙λ ∷ ί ∷ α ∷ ς ∷ []) "1Tim.4.6" ∷ word (ᾗ ∷ []) "1Tim.4.6" ∷ word (π ∷ α ∷ ρ ∷ η ∷ κ ∷ ο ∷ ∙λ ∷ ο ∷ ύ ∷ θ ∷ η ∷ κ ∷ α ∷ ς ∷ []) "1Tim.4.6" ∷ word (τ ∷ ο ∷ ὺ ∷ ς ∷ []) "1Tim.4.7" ∷ word (δ ∷ ὲ ∷ []) "1Tim.4.7" ∷ word (β ∷ ε ∷ β ∷ ή ∷ ∙λ ∷ ο ∷ υ ∷ ς ∷ []) "1Tim.4.7" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.4.7" ∷ word (γ ∷ ρ ∷ α ∷ ώ ∷ δ ∷ ε ∷ ι ∷ ς ∷ []) "1Tim.4.7" ∷ word (μ ∷ ύ ∷ θ ∷ ο ∷ υ ∷ ς ∷ []) "1Tim.4.7" ∷ word (π ∷ α ∷ ρ ∷ α ∷ ι ∷ τ ∷ ο ∷ ῦ ∷ []) "1Tim.4.7" ∷ word (γ ∷ ύ ∷ μ ∷ ν ∷ α ∷ ζ ∷ ε ∷ []) "1Tim.4.7" ∷ word (δ ∷ ὲ ∷ []) "1Tim.4.7" ∷ word (σ ∷ ε ∷ α ∷ υ ∷ τ ∷ ὸ ∷ ν ∷ []) "1Tim.4.7" ∷ word (π ∷ ρ ∷ ὸ ∷ ς ∷ []) "1Tim.4.7" ∷ word (ε ∷ ὐ ∷ σ ∷ έ ∷ β ∷ ε ∷ ι ∷ α ∷ ν ∷ []) "1Tim.4.7" ∷ word (ἡ ∷ []) "1Tim.4.8" ∷ word (γ ∷ ὰ ∷ ρ ∷ []) "1Tim.4.8" ∷ word (σ ∷ ω ∷ μ ∷ α ∷ τ ∷ ι ∷ κ ∷ ὴ ∷ []) "1Tim.4.8" ∷ word (γ ∷ υ ∷ μ ∷ ν ∷ α ∷ σ ∷ ί ∷ α ∷ []) "1Tim.4.8" ∷ word (π ∷ ρ ∷ ὸ ∷ ς ∷ []) "1Tim.4.8" ∷ word (ὀ ∷ ∙λ ∷ ί ∷ γ ∷ ο ∷ ν ∷ []) "1Tim.4.8" ∷ word (ἐ ∷ σ ∷ τ ∷ ὶ ∷ ν ∷ []) "1Tim.4.8" ∷ word (ὠ ∷ φ ∷ έ ∷ ∙λ ∷ ι ∷ μ ∷ ο ∷ ς ∷ []) "1Tim.4.8" ∷ word (ἡ ∷ []) "1Tim.4.8" ∷ word (δ ∷ ὲ ∷ []) "1Tim.4.8" ∷ word (ε ∷ ὐ ∷ σ ∷ έ ∷ β ∷ ε ∷ ι ∷ α ∷ []) "1Tim.4.8" ∷ word (π ∷ ρ ∷ ὸ ∷ ς ∷ []) "1Tim.4.8" ∷ word (π ∷ ά ∷ ν ∷ τ ∷ α ∷ []) "1Tim.4.8" ∷ word (ὠ ∷ φ ∷ έ ∷ ∙λ ∷ ι ∷ μ ∷ ό ∷ ς ∷ []) "1Tim.4.8" ∷ word (ἐ ∷ σ ∷ τ ∷ ι ∷ ν ∷ []) "1Tim.4.8" ∷ word (ἐ ∷ π ∷ α ∷ γ ∷ γ ∷ ε ∷ ∙λ ∷ ί ∷ α ∷ ν ∷ []) "1Tim.4.8" ∷ word (ἔ ∷ χ ∷ ο ∷ υ ∷ σ ∷ α ∷ []) "1Tim.4.8" ∷ word (ζ ∷ ω ∷ ῆ ∷ ς ∷ []) "1Tim.4.8" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "1Tim.4.8" ∷ word (ν ∷ ῦ ∷ ν ∷ []) "1Tim.4.8" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.4.8" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "1Tim.4.8" ∷ word (μ ∷ ε ∷ ∙λ ∷ ∙λ ∷ ο ∷ ύ ∷ σ ∷ η ∷ ς ∷ []) "1Tim.4.8" ∷ word (π ∷ ι ∷ σ ∷ τ ∷ ὸ ∷ ς ∷ []) "1Tim.4.9" ∷ word (ὁ ∷ []) "1Tim.4.9" ∷ word (∙λ ∷ ό ∷ γ ∷ ο ∷ ς ∷ []) "1Tim.4.9" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.4.9" ∷ word (π ∷ ά ∷ σ ∷ η ∷ ς ∷ []) "1Tim.4.9" ∷ word (ἀ ∷ π ∷ ο ∷ δ ∷ ο ∷ χ ∷ ῆ ∷ ς ∷ []) "1Tim.4.9" ∷ word (ἄ ∷ ξ ∷ ι ∷ ο ∷ ς ∷ []) "1Tim.4.9" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "1Tim.4.10" ∷ word (τ ∷ ο ∷ ῦ ∷ τ ∷ ο ∷ []) "1Tim.4.10" ∷ word (γ ∷ ὰ ∷ ρ ∷ []) "1Tim.4.10" ∷ word (κ ∷ ο ∷ π ∷ ι ∷ ῶ ∷ μ ∷ ε ∷ ν ∷ []) "1Tim.4.10" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.4.10" ∷ word (ὀ ∷ ν ∷ ε ∷ ι ∷ δ ∷ ι ∷ ζ ∷ ό ∷ μ ∷ ε ∷ θ ∷ α ∷ []) "1Tim.4.10" ∷ word (ὅ ∷ τ ∷ ι ∷ []) "1Tim.4.10" ∷ word (ἠ ∷ ∙λ ∷ π ∷ ί ∷ κ ∷ α ∷ μ ∷ ε ∷ ν ∷ []) "1Tim.4.10" ∷ word (ἐ ∷ π ∷ ὶ ∷ []) "1Tim.4.10" ∷ word (θ ∷ ε ∷ ῷ ∷ []) "1Tim.4.10" ∷ word (ζ ∷ ῶ ∷ ν ∷ τ ∷ ι ∷ []) "1Tim.4.10" ∷ word (ὅ ∷ ς ∷ []) "1Tim.4.10" ∷ word (ἐ ∷ σ ∷ τ ∷ ι ∷ ν ∷ []) "1Tim.4.10" ∷ word (σ ∷ ω ∷ τ ∷ ὴ ∷ ρ ∷ []) "1Tim.4.10" ∷ word (π ∷ ά ∷ ν ∷ τ ∷ ω ∷ ν ∷ []) "1Tim.4.10" ∷ word (ἀ ∷ ν ∷ θ ∷ ρ ∷ ώ ∷ π ∷ ω ∷ ν ∷ []) "1Tim.4.10" ∷ word (μ ∷ ά ∷ ∙λ ∷ ι ∷ σ ∷ τ ∷ α ∷ []) "1Tim.4.10" ∷ word (π ∷ ι ∷ σ ∷ τ ∷ ῶ ∷ ν ∷ []) "1Tim.4.10" ∷ word (Π ∷ α ∷ ρ ∷ ά ∷ γ ∷ γ ∷ ε ∷ ∙λ ∷ ∙λ ∷ ε ∷ []) "1Tim.4.11" ∷ word (τ ∷ α ∷ ῦ ∷ τ ∷ α ∷ []) "1Tim.4.11" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.4.11" ∷ word (δ ∷ ί ∷ δ ∷ α ∷ σ ∷ κ ∷ ε ∷ []) "1Tim.4.11" ∷ word (μ ∷ η ∷ δ ∷ ε ∷ ί ∷ ς ∷ []) "1Tim.4.12" ∷ word (σ ∷ ο ∷ υ ∷ []) "1Tim.4.12" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "1Tim.4.12" ∷ word (ν ∷ ε ∷ ό ∷ τ ∷ η ∷ τ ∷ ο ∷ ς ∷ []) "1Tim.4.12" ∷ word (κ ∷ α ∷ τ ∷ α ∷ φ ∷ ρ ∷ ο ∷ ν ∷ ε ∷ ί ∷ τ ∷ ω ∷ []) "1Tim.4.12" ∷ word (ἀ ∷ ∙λ ∷ ∙λ ∷ ὰ ∷ []) "1Tim.4.12" ∷ word (τ ∷ ύ ∷ π ∷ ο ∷ ς ∷ []) "1Tim.4.12" ∷ word (γ ∷ ί ∷ ν ∷ ο ∷ υ ∷ []) "1Tim.4.12" ∷ word (τ ∷ ῶ ∷ ν ∷ []) "1Tim.4.12" ∷ word (π ∷ ι ∷ σ ∷ τ ∷ ῶ ∷ ν ∷ []) "1Tim.4.12" ∷ word (ἐ ∷ ν ∷ []) "1Tim.4.12" ∷ word (∙λ ∷ ό ∷ γ ∷ ῳ ∷ []) "1Tim.4.12" ∷ word (ἐ ∷ ν ∷ []) "1Tim.4.12" ∷ word (ἀ ∷ ν ∷ α ∷ σ ∷ τ ∷ ρ ∷ ο ∷ φ ∷ ῇ ∷ []) "1Tim.4.12" ∷ word (ἐ ∷ ν ∷ []) "1Tim.4.12" ∷ word (ἀ ∷ γ ∷ ά ∷ π ∷ ῃ ∷ []) "1Tim.4.12" ∷ word (ἐ ∷ ν ∷ []) "1Tim.4.12" ∷ word (π ∷ ί ∷ σ ∷ τ ∷ ε ∷ ι ∷ []) "1Tim.4.12" ∷ word (ἐ ∷ ν ∷ []) "1Tim.4.12" ∷ word (ἁ ∷ γ ∷ ν ∷ ε ∷ ί ∷ ᾳ ∷ []) "1Tim.4.12" ∷ word (ἕ ∷ ω ∷ ς ∷ []) "1Tim.4.13" ∷ word (ἔ ∷ ρ ∷ χ ∷ ο ∷ μ ∷ α ∷ ι ∷ []) "1Tim.4.13" ∷ word (π ∷ ρ ∷ ό ∷ σ ∷ ε ∷ χ ∷ ε ∷ []) "1Tim.4.13" ∷ word (τ ∷ ῇ ∷ []) "1Tim.4.13" ∷ word (ἀ ∷ ν ∷ α ∷ γ ∷ ν ∷ ώ ∷ σ ∷ ε ∷ ι ∷ []) "1Tim.4.13" ∷ word (τ ∷ ῇ ∷ []) "1Tim.4.13" ∷ word (π ∷ α ∷ ρ ∷ α ∷ κ ∷ ∙λ ∷ ή ∷ σ ∷ ε ∷ ι ∷ []) "1Tim.4.13" ∷ word (τ ∷ ῇ ∷ []) "1Tim.4.13" ∷ word (δ ∷ ι ∷ δ ∷ α ∷ σ ∷ κ ∷ α ∷ ∙λ ∷ ί ∷ ᾳ ∷ []) "1Tim.4.13" ∷ word (μ ∷ ὴ ∷ []) "1Tim.4.14" ∷ word (ἀ ∷ μ ∷ έ ∷ ∙λ ∷ ε ∷ ι ∷ []) "1Tim.4.14" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "1Tim.4.14" ∷ word (ἐ ∷ ν ∷ []) "1Tim.4.14" ∷ word (σ ∷ ο ∷ ὶ ∷ []) "1Tim.4.14" ∷ word (χ ∷ α ∷ ρ ∷ ί ∷ σ ∷ μ ∷ α ∷ τ ∷ ο ∷ ς ∷ []) "1Tim.4.14" ∷ word (ὃ ∷ []) "1Tim.4.14" ∷ word (ἐ ∷ δ ∷ ό ∷ θ ∷ η ∷ []) "1Tim.4.14" ∷ word (σ ∷ ο ∷ ι ∷ []) "1Tim.4.14" ∷ word (δ ∷ ι ∷ ὰ ∷ []) "1Tim.4.14" ∷ word (π ∷ ρ ∷ ο ∷ φ ∷ η ∷ τ ∷ ε ∷ ί ∷ α ∷ ς ∷ []) "1Tim.4.14" ∷ word (μ ∷ ε ∷ τ ∷ ὰ ∷ []) "1Tim.4.14" ∷ word (ἐ ∷ π ∷ ι ∷ θ ∷ έ ∷ σ ∷ ε ∷ ω ∷ ς ∷ []) "1Tim.4.14" ∷ word (τ ∷ ῶ ∷ ν ∷ []) "1Tim.4.14" ∷ word (χ ∷ ε ∷ ι ∷ ρ ∷ ῶ ∷ ν ∷ []) "1Tim.4.14" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "1Tim.4.14" ∷ word (π ∷ ρ ∷ ε ∷ σ ∷ β ∷ υ ∷ τ ∷ ε ∷ ρ ∷ ί ∷ ο ∷ υ ∷ []) "1Tim.4.14" ∷ word (τ ∷ α ∷ ῦ ∷ τ ∷ α ∷ []) "1Tim.4.15" ∷ word (μ ∷ ε ∷ ∙λ ∷ έ ∷ τ ∷ α ∷ []) "1Tim.4.15" ∷ word (ἐ ∷ ν ∷ []) "1Tim.4.15" ∷ word (τ ∷ ο ∷ ύ ∷ τ ∷ ο ∷ ι ∷ ς ∷ []) "1Tim.4.15" ∷ word (ἴ ∷ σ ∷ θ ∷ ι ∷ []) "1Tim.4.15" ∷ word (ἵ ∷ ν ∷ α ∷ []) "1Tim.4.15" ∷ word (σ ∷ ο ∷ υ ∷ []) "1Tim.4.15" ∷ word (ἡ ∷ []) "1Tim.4.15" ∷ word (π ∷ ρ ∷ ο ∷ κ ∷ ο ∷ π ∷ ὴ ∷ []) "1Tim.4.15" ∷ word (φ ∷ α ∷ ν ∷ ε ∷ ρ ∷ ὰ ∷ []) "1Tim.4.15" ∷ word (ᾖ ∷ []) "1Tim.4.15" ∷ word (π ∷ ᾶ ∷ σ ∷ ι ∷ ν ∷ []) "1Tim.4.15" ∷ word (ἔ ∷ π ∷ ε ∷ χ ∷ ε ∷ []) "1Tim.4.16" ∷ word (σ ∷ ε ∷ α ∷ υ ∷ τ ∷ ῷ ∷ []) "1Tim.4.16" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.4.16" ∷ word (τ ∷ ῇ ∷ []) "1Tim.4.16" ∷ word (δ ∷ ι ∷ δ ∷ α ∷ σ ∷ κ ∷ α ∷ ∙λ ∷ ί ∷ ᾳ ∷ []) "1Tim.4.16" ∷ word (ἐ ∷ π ∷ ί ∷ μ ∷ ε ∷ ν ∷ ε ∷ []) "1Tim.4.16" ∷ word (α ∷ ὐ ∷ τ ∷ ο ∷ ῖ ∷ ς ∷ []) "1Tim.4.16" ∷ word (τ ∷ ο ∷ ῦ ∷ τ ∷ ο ∷ []) "1Tim.4.16" ∷ word (γ ∷ ὰ ∷ ρ ∷ []) "1Tim.4.16" ∷ word (π ∷ ο ∷ ι ∷ ῶ ∷ ν ∷ []) "1Tim.4.16" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.4.16" ∷ word (σ ∷ ε ∷ α ∷ υ ∷ τ ∷ ὸ ∷ ν ∷ []) "1Tim.4.16" ∷ word (σ ∷ ώ ∷ σ ∷ ε ∷ ι ∷ ς ∷ []) "1Tim.4.16" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.4.16" ∷ word (τ ∷ ο ∷ ὺ ∷ ς ∷ []) "1Tim.4.16" ∷ word (ἀ ∷ κ ∷ ο ∷ ύ ∷ ο ∷ ν ∷ τ ∷ ά ∷ ς ∷ []) "1Tim.4.16" ∷ word (σ ∷ ο ∷ υ ∷ []) "1Tim.4.16" ∷ word (Π ∷ ρ ∷ ε ∷ σ ∷ β ∷ υ ∷ τ ∷ έ ∷ ρ ∷ ῳ ∷ []) "1Tim.5.1" ∷ word (μ ∷ ὴ ∷ []) "1Tim.5.1" ∷ word (ἐ ∷ π ∷ ι ∷ π ∷ ∙λ ∷ ή ∷ ξ ∷ ῃ ∷ ς ∷ []) "1Tim.5.1" ∷ word (ἀ ∷ ∙λ ∷ ∙λ ∷ ὰ ∷ []) "1Tim.5.1" ∷ word (π ∷ α ∷ ρ ∷ α ∷ κ ∷ ά ∷ ∙λ ∷ ε ∷ ι ∷ []) "1Tim.5.1" ∷ word (ὡ ∷ ς ∷ []) "1Tim.5.1" ∷ word (π ∷ α ∷ τ ∷ έ ∷ ρ ∷ α ∷ []) "1Tim.5.1" ∷ word (ν ∷ ε ∷ ω ∷ τ ∷ έ ∷ ρ ∷ ο ∷ υ ∷ ς ∷ []) "1Tim.5.1" ∷ word (ὡ ∷ ς ∷ []) "1Tim.5.1" ∷ word (ἀ ∷ δ ∷ ε ∷ ∙λ ∷ φ ∷ ο ∷ ύ ∷ ς ∷ []) "1Tim.5.1" ∷ word (π ∷ ρ ∷ ε ∷ σ ∷ β ∷ υ ∷ τ ∷ έ ∷ ρ ∷ α ∷ ς ∷ []) "1Tim.5.2" ∷ word (ὡ ∷ ς ∷ []) "1Tim.5.2" ∷ word (μ ∷ η ∷ τ ∷ έ ∷ ρ ∷ α ∷ ς ∷ []) "1Tim.5.2" ∷ word (ν ∷ ε ∷ ω ∷ τ ∷ έ ∷ ρ ∷ α ∷ ς ∷ []) "1Tim.5.2" ∷ word (ὡ ∷ ς ∷ []) "1Tim.5.2" ∷ word (ἀ ∷ δ ∷ ε ∷ ∙λ ∷ φ ∷ ὰ ∷ ς ∷ []) "1Tim.5.2" ∷ word (ἐ ∷ ν ∷ []) "1Tim.5.2" ∷ word (π ∷ ά ∷ σ ∷ ῃ ∷ []) "1Tim.5.2" ∷ word (ἁ ∷ γ ∷ ν ∷ ε ∷ ί ∷ ᾳ ∷ []) "1Tim.5.2" ∷ word (Χ ∷ ή ∷ ρ ∷ α ∷ ς ∷ []) "1Tim.5.3" ∷ word (τ ∷ ί ∷ μ ∷ α ∷ []) "1Tim.5.3" ∷ word (τ ∷ ὰ ∷ ς ∷ []) "1Tim.5.3" ∷ word (ὄ ∷ ν ∷ τ ∷ ω ∷ ς ∷ []) "1Tim.5.3" ∷ word (χ ∷ ή ∷ ρ ∷ α ∷ ς ∷ []) "1Tim.5.3" ∷ word (ε ∷ ἰ ∷ []) "1Tim.5.4" ∷ word (δ ∷ έ ∷ []) "1Tim.5.4" ∷ word (τ ∷ ι ∷ ς ∷ []) "1Tim.5.4" ∷ word (χ ∷ ή ∷ ρ ∷ α ∷ []) "1Tim.5.4" ∷ word (τ ∷ έ ∷ κ ∷ ν ∷ α ∷ []) "1Tim.5.4" ∷ word (ἢ ∷ []) "1Tim.5.4" ∷ word (ἔ ∷ κ ∷ γ ∷ ο ∷ ν ∷ α ∷ []) "1Tim.5.4" ∷ word (ἔ ∷ χ ∷ ε ∷ ι ∷ []) "1Tim.5.4" ∷ word (μ ∷ α ∷ ν ∷ θ ∷ α ∷ ν ∷ έ ∷ τ ∷ ω ∷ σ ∷ α ∷ ν ∷ []) "1Tim.5.4" ∷ word (π ∷ ρ ∷ ῶ ∷ τ ∷ ο ∷ ν ∷ []) "1Tim.5.4" ∷ word (τ ∷ ὸ ∷ ν ∷ []) "1Tim.5.4" ∷ word (ἴ ∷ δ ∷ ι ∷ ο ∷ ν ∷ []) "1Tim.5.4" ∷ word (ο ∷ ἶ ∷ κ ∷ ο ∷ ν ∷ []) "1Tim.5.4" ∷ word (ε ∷ ὐ ∷ σ ∷ ε ∷ β ∷ ε ∷ ῖ ∷ ν ∷ []) "1Tim.5.4" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.5.4" ∷ word (ἀ ∷ μ ∷ ο ∷ ι ∷ β ∷ ὰ ∷ ς ∷ []) "1Tim.5.4" ∷ word (ἀ ∷ π ∷ ο ∷ δ ∷ ι ∷ δ ∷ ό ∷ ν ∷ α ∷ ι ∷ []) "1Tim.5.4" ∷ word (τ ∷ ο ∷ ῖ ∷ ς ∷ []) "1Tim.5.4" ∷ word (π ∷ ρ ∷ ο ∷ γ ∷ ό ∷ ν ∷ ο ∷ ι ∷ ς ∷ []) "1Tim.5.4" ∷ word (τ ∷ ο ∷ ῦ ∷ τ ∷ ο ∷ []) "1Tim.5.4" ∷ word (γ ∷ ά ∷ ρ ∷ []) "1Tim.5.4" ∷ word (ἐ ∷ σ ∷ τ ∷ ι ∷ ν ∷ []) "1Tim.5.4" ∷ word (ἀ ∷ π ∷ ό ∷ δ ∷ ε ∷ κ ∷ τ ∷ ο ∷ ν ∷ []) "1Tim.5.4" ∷ word (ἐ ∷ ν ∷ ώ ∷ π ∷ ι ∷ ο ∷ ν ∷ []) "1Tim.5.4" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "1Tim.5.4" ∷ word (θ ∷ ε ∷ ο ∷ ῦ ∷ []) "1Tim.5.4" ∷ word (ἡ ∷ []) "1Tim.5.5" ∷ word (δ ∷ ὲ ∷ []) "1Tim.5.5" ∷ word (ὄ ∷ ν ∷ τ ∷ ω ∷ ς ∷ []) "1Tim.5.5" ∷ word (χ ∷ ή ∷ ρ ∷ α ∷ []) "1Tim.5.5" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.5.5" ∷ word (μ ∷ ε ∷ μ ∷ ο ∷ ν ∷ ω ∷ μ ∷ έ ∷ ν ∷ η ∷ []) "1Tim.5.5" ∷ word (ἤ ∷ ∙λ ∷ π ∷ ι ∷ κ ∷ ε ∷ ν ∷ []) "1Tim.5.5" ∷ word (ἐ ∷ π ∷ ὶ ∷ []) "1Tim.5.5" ∷ word (θ ∷ ε ∷ ὸ ∷ ν ∷ []) "1Tim.5.5" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.5.5" ∷ word (π ∷ ρ ∷ ο ∷ σ ∷ μ ∷ έ ∷ ν ∷ ε ∷ ι ∷ []) "1Tim.5.5" ∷ word (τ ∷ α ∷ ῖ ∷ ς ∷ []) "1Tim.5.5" ∷ word (δ ∷ ε ∷ ή ∷ σ ∷ ε ∷ σ ∷ ι ∷ ν ∷ []) "1Tim.5.5" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.5.5" ∷ word (τ ∷ α ∷ ῖ ∷ ς ∷ []) "1Tim.5.5" ∷ word (π ∷ ρ ∷ ο ∷ σ ∷ ε ∷ υ ∷ χ ∷ α ∷ ῖ ∷ ς ∷ []) "1Tim.5.5" ∷ word (ν ∷ υ ∷ κ ∷ τ ∷ ὸ ∷ ς ∷ []) "1Tim.5.5" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.5.5" ∷ word (ἡ ∷ μ ∷ έ ∷ ρ ∷ α ∷ ς ∷ []) "1Tim.5.5" ∷ word (ἡ ∷ []) "1Tim.5.6" ∷ word (δ ∷ ὲ ∷ []) "1Tim.5.6" ∷ word (σ ∷ π ∷ α ∷ τ ∷ α ∷ ∙λ ∷ ῶ ∷ σ ∷ α ∷ []) "1Tim.5.6" ∷ word (ζ ∷ ῶ ∷ σ ∷ α ∷ []) "1Tim.5.6" ∷ word (τ ∷ έ ∷ θ ∷ ν ∷ η ∷ κ ∷ ε ∷ ν ∷ []) "1Tim.5.6" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.5.7" ∷ word (τ ∷ α ∷ ῦ ∷ τ ∷ α ∷ []) "1Tim.5.7" ∷ word (π ∷ α ∷ ρ ∷ ά ∷ γ ∷ γ ∷ ε ∷ ∙λ ∷ ∙λ ∷ ε ∷ []) "1Tim.5.7" ∷ word (ἵ ∷ ν ∷ α ∷ []) "1Tim.5.7" ∷ word (ἀ ∷ ν ∷ ε ∷ π ∷ ί ∷ ∙λ ∷ η ∷ μ ∷ π ∷ τ ∷ ο ∷ ι ∷ []) "1Tim.5.7" ∷ word (ὦ ∷ σ ∷ ι ∷ ν ∷ []) "1Tim.5.7" ∷ word (ε ∷ ἰ ∷ []) "1Tim.5.8" ∷ word (δ ∷ έ ∷ []) "1Tim.5.8" ∷ word (τ ∷ ι ∷ ς ∷ []) "1Tim.5.8" ∷ word (τ ∷ ῶ ∷ ν ∷ []) "1Tim.5.8" ∷ word (ἰ ∷ δ ∷ ί ∷ ω ∷ ν ∷ []) "1Tim.5.8" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.5.8" ∷ word (μ ∷ ά ∷ ∙λ ∷ ι ∷ σ ∷ τ ∷ α ∷ []) "1Tim.5.8" ∷ word (ο ∷ ἰ ∷ κ ∷ ε ∷ ί ∷ ω ∷ ν ∷ []) "1Tim.5.8" ∷ word (ο ∷ ὐ ∷ []) "1Tim.5.8" ∷ word (π ∷ ρ ∷ ο ∷ ν ∷ ο ∷ ε ∷ ῖ ∷ []) "1Tim.5.8" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "1Tim.5.8" ∷ word (π ∷ ί ∷ σ ∷ τ ∷ ι ∷ ν ∷ []) "1Tim.5.8" ∷ word (ἤ ∷ ρ ∷ ν ∷ η ∷ τ ∷ α ∷ ι ∷ []) "1Tim.5.8" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.5.8" ∷ word (ἔ ∷ σ ∷ τ ∷ ι ∷ ν ∷ []) "1Tim.5.8" ∷ word (ἀ ∷ π ∷ ί ∷ σ ∷ τ ∷ ο ∷ υ ∷ []) "1Tim.5.8" ∷ word (χ ∷ ε ∷ ί ∷ ρ ∷ ω ∷ ν ∷ []) "1Tim.5.8" ∷ word (Χ ∷ ή ∷ ρ ∷ α ∷ []) "1Tim.5.9" ∷ word (κ ∷ α ∷ τ ∷ α ∷ ∙λ ∷ ε ∷ γ ∷ έ ∷ σ ∷ θ ∷ ω ∷ []) "1Tim.5.9" ∷ word (μ ∷ ὴ ∷ []) "1Tim.5.9" ∷ word (ἔ ∷ ∙λ ∷ α ∷ τ ∷ τ ∷ ο ∷ ν ∷ []) "1Tim.5.9" ∷ word (ἐ ∷ τ ∷ ῶ ∷ ν ∷ []) "1Tim.5.9" ∷ word (ἑ ∷ ξ ∷ ή ∷ κ ∷ ο ∷ ν ∷ τ ∷ α ∷ []) "1Tim.5.9" ∷ word (γ ∷ ε ∷ γ ∷ ο ∷ ν ∷ υ ∷ ῖ ∷ α ∷ []) "1Tim.5.9" ∷ word (ἑ ∷ ν ∷ ὸ ∷ ς ∷ []) "1Tim.5.9" ∷ word (ἀ ∷ ν ∷ δ ∷ ρ ∷ ὸ ∷ ς ∷ []) "1Tim.5.9" ∷ word (γ ∷ υ ∷ ν ∷ ή ∷ []) "1Tim.5.9" ∷ word (ἐ ∷ ν ∷ []) "1Tim.5.10" ∷ word (ἔ ∷ ρ ∷ γ ∷ ο ∷ ι ∷ ς ∷ []) "1Tim.5.10" ∷ word (κ ∷ α ∷ ∙λ ∷ ο ∷ ῖ ∷ ς ∷ []) "1Tim.5.10" ∷ word (μ ∷ α ∷ ρ ∷ τ ∷ υ ∷ ρ ∷ ο ∷ υ ∷ μ ∷ έ ∷ ν ∷ η ∷ []) "1Tim.5.10" ∷ word (ε ∷ ἰ ∷ []) "1Tim.5.10" ∷ word (ἐ ∷ τ ∷ ε ∷ κ ∷ ν ∷ ο ∷ τ ∷ ρ ∷ ό ∷ φ ∷ η ∷ σ ∷ ε ∷ ν ∷ []) "1Tim.5.10" ∷ word (ε ∷ ἰ ∷ []) "1Tim.5.10" ∷ word (ἐ ∷ ξ ∷ ε ∷ ν ∷ ο ∷ δ ∷ ό ∷ χ ∷ η ∷ σ ∷ ε ∷ ν ∷ []) "1Tim.5.10" ∷ word (ε ∷ ἰ ∷ []) "1Tim.5.10" ∷ word (ἁ ∷ γ ∷ ί ∷ ω ∷ ν ∷ []) "1Tim.5.10" ∷ word (π ∷ ό ∷ δ ∷ α ∷ ς ∷ []) "1Tim.5.10" ∷ word (ἔ ∷ ν ∷ ι ∷ ψ ∷ ε ∷ ν ∷ []) "1Tim.5.10" ∷ word (ε ∷ ἰ ∷ []) "1Tim.5.10" ∷ word (θ ∷ ∙λ ∷ ι ∷ β ∷ ο ∷ μ ∷ έ ∷ ν ∷ ο ∷ ι ∷ ς ∷ []) "1Tim.5.10" ∷ word (ἐ ∷ π ∷ ή ∷ ρ ∷ κ ∷ ε ∷ σ ∷ ε ∷ ν ∷ []) "1Tim.5.10" ∷ word (ε ∷ ἰ ∷ []) "1Tim.5.10" ∷ word (π ∷ α ∷ ν ∷ τ ∷ ὶ ∷ []) "1Tim.5.10" ∷ word (ἔ ∷ ρ ∷ γ ∷ ῳ ∷ []) "1Tim.5.10" ∷ word (ἀ ∷ γ ∷ α ∷ θ ∷ ῷ ∷ []) "1Tim.5.10" ∷ word (ἐ ∷ π ∷ η ∷ κ ∷ ο ∷ ∙λ ∷ ο ∷ ύ ∷ θ ∷ η ∷ σ ∷ ε ∷ ν ∷ []) "1Tim.5.10" ∷ word (ν ∷ ε ∷ ω ∷ τ ∷ έ ∷ ρ ∷ α ∷ ς ∷ []) "1Tim.5.11" ∷ word (δ ∷ ὲ ∷ []) "1Tim.5.11" ∷ word (χ ∷ ή ∷ ρ ∷ α ∷ ς ∷ []) "1Tim.5.11" ∷ word (π ∷ α ∷ ρ ∷ α ∷ ι ∷ τ ∷ ο ∷ ῦ ∷ []) "1Tim.5.11" ∷ word (ὅ ∷ τ ∷ α ∷ ν ∷ []) "1Tim.5.11" ∷ word (γ ∷ ὰ ∷ ρ ∷ []) "1Tim.5.11" ∷ word (κ ∷ α ∷ τ ∷ α ∷ σ ∷ τ ∷ ρ ∷ η ∷ ν ∷ ι ∷ ά ∷ σ ∷ ω ∷ σ ∷ ι ∷ ν ∷ []) "1Tim.5.11" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "1Tim.5.11" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ο ∷ ῦ ∷ []) "1Tim.5.11" ∷ word (γ ∷ α ∷ μ ∷ ε ∷ ῖ ∷ ν ∷ []) "1Tim.5.11" ∷ word (θ ∷ έ ∷ ∙λ ∷ ο ∷ υ ∷ σ ∷ ι ∷ ν ∷ []) "1Tim.5.11" ∷ word (ἔ ∷ χ ∷ ο ∷ υ ∷ σ ∷ α ∷ ι ∷ []) "1Tim.5.12" ∷ word (κ ∷ ρ ∷ ί ∷ μ ∷ α ∷ []) "1Tim.5.12" ∷ word (ὅ ∷ τ ∷ ι ∷ []) "1Tim.5.12" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "1Tim.5.12" ∷ word (π ∷ ρ ∷ ώ ∷ τ ∷ η ∷ ν ∷ []) "1Tim.5.12" ∷ word (π ∷ ί ∷ σ ∷ τ ∷ ι ∷ ν ∷ []) "1Tim.5.12" ∷ word (ἠ ∷ θ ∷ έ ∷ τ ∷ η ∷ σ ∷ α ∷ ν ∷ []) "1Tim.5.12" ∷ word (ἅ ∷ μ ∷ α ∷ []) "1Tim.5.13" ∷ word (δ ∷ ὲ ∷ []) "1Tim.5.13" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.5.13" ∷ word (ἀ ∷ ρ ∷ γ ∷ α ∷ ὶ ∷ []) "1Tim.5.13" ∷ word (μ ∷ α ∷ ν ∷ θ ∷ ά ∷ ν ∷ ο ∷ υ ∷ σ ∷ ι ∷ ν ∷ []) "1Tim.5.13" ∷ word (π ∷ ε ∷ ρ ∷ ι ∷ ε ∷ ρ ∷ χ ∷ ό ∷ μ ∷ ε ∷ ν ∷ α ∷ ι ∷ []) "1Tim.5.13" ∷ word (τ ∷ ὰ ∷ ς ∷ []) "1Tim.5.13" ∷ word (ο ∷ ἰ ∷ κ ∷ ί ∷ α ∷ ς ∷ []) "1Tim.5.13" ∷ word (ο ∷ ὐ ∷ []) "1Tim.5.13" ∷ word (μ ∷ ό ∷ ν ∷ ο ∷ ν ∷ []) "1Tim.5.13" ∷ word (δ ∷ ὲ ∷ []) "1Tim.5.13" ∷ word (ἀ ∷ ρ ∷ γ ∷ α ∷ ὶ ∷ []) "1Tim.5.13" ∷ word (ἀ ∷ ∙λ ∷ ∙λ ∷ ὰ ∷ []) "1Tim.5.13" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.5.13" ∷ word (φ ∷ ∙λ ∷ ύ ∷ α ∷ ρ ∷ ο ∷ ι ∷ []) "1Tim.5.13" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.5.13" ∷ word (π ∷ ε ∷ ρ ∷ ί ∷ ε ∷ ρ ∷ γ ∷ ο ∷ ι ∷ []) "1Tim.5.13" ∷ word (∙λ ∷ α ∷ ∙λ ∷ ο ∷ ῦ ∷ σ ∷ α ∷ ι ∷ []) "1Tim.5.13" ∷ word (τ ∷ ὰ ∷ []) "1Tim.5.13" ∷ word (μ ∷ ὴ ∷ []) "1Tim.5.13" ∷ word (δ ∷ έ ∷ ο ∷ ν ∷ τ ∷ α ∷ []) "1Tim.5.13" ∷ word (β ∷ ο ∷ ύ ∷ ∙λ ∷ ο ∷ μ ∷ α ∷ ι ∷ []) "1Tim.5.14" ∷ word (ο ∷ ὖ ∷ ν ∷ []) "1Tim.5.14" ∷ word (ν ∷ ε ∷ ω ∷ τ ∷ έ ∷ ρ ∷ α ∷ ς ∷ []) "1Tim.5.14" ∷ word (γ ∷ α ∷ μ ∷ ε ∷ ῖ ∷ ν ∷ []) "1Tim.5.14" ∷ word (τ ∷ ε ∷ κ ∷ ν ∷ ο ∷ γ ∷ ο ∷ ν ∷ ε ∷ ῖ ∷ ν ∷ []) "1Tim.5.14" ∷ word (ο ∷ ἰ ∷ κ ∷ ο ∷ δ ∷ ε ∷ σ ∷ π ∷ ο ∷ τ ∷ ε ∷ ῖ ∷ ν ∷ []) "1Tim.5.14" ∷ word (μ ∷ η ∷ δ ∷ ε ∷ μ ∷ ί ∷ α ∷ ν ∷ []) "1Tim.5.14" ∷ word (ἀ ∷ φ ∷ ο ∷ ρ ∷ μ ∷ ὴ ∷ ν ∷ []) "1Tim.5.14" ∷ word (δ ∷ ι ∷ δ ∷ ό ∷ ν ∷ α ∷ ι ∷ []) "1Tim.5.14" ∷ word (τ ∷ ῷ ∷ []) "1Tim.5.14" ∷ word (ἀ ∷ ν ∷ τ ∷ ι ∷ κ ∷ ε ∷ ι ∷ μ ∷ έ ∷ ν ∷ ῳ ∷ []) "1Tim.5.14" ∷ word (∙λ ∷ ο ∷ ι ∷ δ ∷ ο ∷ ρ ∷ ί ∷ α ∷ ς ∷ []) "1Tim.5.14" ∷ word (χ ∷ ά ∷ ρ ∷ ι ∷ ν ∷ []) "1Tim.5.14" ∷ word (ἤ ∷ δ ∷ η ∷ []) "1Tim.5.15" ∷ word (γ ∷ ά ∷ ρ ∷ []) "1Tim.5.15" ∷ word (τ ∷ ι ∷ ν ∷ ε ∷ ς ∷ []) "1Tim.5.15" ∷ word (ἐ ∷ ξ ∷ ε ∷ τ ∷ ρ ∷ ά ∷ π ∷ η ∷ σ ∷ α ∷ ν ∷ []) "1Tim.5.15" ∷ word (ὀ ∷ π ∷ ί ∷ σ ∷ ω ∷ []) "1Tim.5.15" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "1Tim.5.15" ∷ word (Σ ∷ α ∷ τ ∷ α ∷ ν ∷ ᾶ ∷ []) "1Tim.5.15" ∷ word (ε ∷ ἴ ∷ []) "1Tim.5.16" ∷ word (τ ∷ ι ∷ ς ∷ []) "1Tim.5.16" ∷ word (π ∷ ι ∷ σ ∷ τ ∷ ὴ ∷ []) "1Tim.5.16" ∷ word (ἔ ∷ χ ∷ ε ∷ ι ∷ []) "1Tim.5.16" ∷ word (χ ∷ ή ∷ ρ ∷ α ∷ ς ∷ []) "1Tim.5.16" ∷ word (ἐ ∷ π ∷ α ∷ ρ ∷ κ ∷ ε ∷ ί ∷ τ ∷ ω ∷ []) "1Tim.5.16" ∷ word (α ∷ ὐ ∷ τ ∷ α ∷ ῖ ∷ ς ∷ []) "1Tim.5.16" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.5.16" ∷ word (μ ∷ ὴ ∷ []) "1Tim.5.16" ∷ word (β ∷ α ∷ ρ ∷ ε ∷ ί ∷ σ ∷ θ ∷ ω ∷ []) "1Tim.5.16" ∷ word (ἡ ∷ []) "1Tim.5.16" ∷ word (ἐ ∷ κ ∷ κ ∷ ∙λ ∷ η ∷ σ ∷ ί ∷ α ∷ []) "1Tim.5.16" ∷ word (ἵ ∷ ν ∷ α ∷ []) "1Tim.5.16" ∷ word (τ ∷ α ∷ ῖ ∷ ς ∷ []) "1Tim.5.16" ∷ word (ὄ ∷ ν ∷ τ ∷ ω ∷ ς ∷ []) "1Tim.5.16" ∷ word (χ ∷ ή ∷ ρ ∷ α ∷ ι ∷ ς ∷ []) "1Tim.5.16" ∷ word (ἐ ∷ π ∷ α ∷ ρ ∷ κ ∷ έ ∷ σ ∷ ῃ ∷ []) "1Tim.5.16" ∷ word (Ο ∷ ἱ ∷ []) "1Tim.5.17" ∷ word (κ ∷ α ∷ ∙λ ∷ ῶ ∷ ς ∷ []) "1Tim.5.17" ∷ word (π ∷ ρ ∷ ο ∷ ε ∷ σ ∷ τ ∷ ῶ ∷ τ ∷ ε ∷ ς ∷ []) "1Tim.5.17" ∷ word (π ∷ ρ ∷ ε ∷ σ ∷ β ∷ ύ ∷ τ ∷ ε ∷ ρ ∷ ο ∷ ι ∷ []) "1Tim.5.17" ∷ word (δ ∷ ι ∷ π ∷ ∙λ ∷ ῆ ∷ ς ∷ []) "1Tim.5.17" ∷ word (τ ∷ ι ∷ μ ∷ ῆ ∷ ς ∷ []) "1Tim.5.17" ∷ word (ἀ ∷ ξ ∷ ι ∷ ο ∷ ύ ∷ σ ∷ θ ∷ ω ∷ σ ∷ α ∷ ν ∷ []) "1Tim.5.17" ∷ word (μ ∷ ά ∷ ∙λ ∷ ι ∷ σ ∷ τ ∷ α ∷ []) "1Tim.5.17" ∷ word (ο ∷ ἱ ∷ []) "1Tim.5.17" ∷ word (κ ∷ ο ∷ π ∷ ι ∷ ῶ ∷ ν ∷ τ ∷ ε ∷ ς ∷ []) "1Tim.5.17" ∷ word (ἐ ∷ ν ∷ []) "1Tim.5.17" ∷ word (∙λ ∷ ό ∷ γ ∷ ῳ ∷ []) "1Tim.5.17" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.5.17" ∷ word (δ ∷ ι ∷ δ ∷ α ∷ σ ∷ κ ∷ α ∷ ∙λ ∷ ί ∷ ᾳ ∷ []) "1Tim.5.17" ∷ word (∙λ ∷ έ ∷ γ ∷ ε ∷ ι ∷ []) "1Tim.5.18" ∷ word (γ ∷ ὰ ∷ ρ ∷ []) "1Tim.5.18" ∷ word (ἡ ∷ []) "1Tim.5.18" ∷ word (γ ∷ ρ ∷ α ∷ φ ∷ ή ∷ []) "1Tim.5.18" ∷ word (Β ∷ ο ∷ ῦ ∷ ν ∷ []) "1Tim.5.18" ∷ word (ἀ ∷ ∙λ ∷ ο ∷ ῶ ∷ ν ∷ τ ∷ α ∷ []) "1Tim.5.18" ∷ word (ο ∷ ὐ ∷ []) "1Tim.5.18" ∷ word (φ ∷ ι ∷ μ ∷ ώ ∷ σ ∷ ε ∷ ι ∷ ς ∷ []) "1Tim.5.18" ∷ word (κ ∷ α ∷ ί ∷ []) "1Tim.5.18" ∷ word (Ἄ ∷ ξ ∷ ι ∷ ο ∷ ς ∷ []) "1Tim.5.18" ∷ word (ὁ ∷ []) "1Tim.5.18" ∷ word (ἐ ∷ ρ ∷ γ ∷ ά ∷ τ ∷ η ∷ ς ∷ []) "1Tim.5.18" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "1Tim.5.18" ∷ word (μ ∷ ι ∷ σ ∷ θ ∷ ο ∷ ῦ ∷ []) "1Tim.5.18" ∷ word (α ∷ ὐ ∷ τ ∷ ο ∷ ῦ ∷ []) "1Tim.5.18" ∷ word (κ ∷ α ∷ τ ∷ ὰ ∷ []) "1Tim.5.19" ∷ word (π ∷ ρ ∷ ε ∷ σ ∷ β ∷ υ ∷ τ ∷ έ ∷ ρ ∷ ο ∷ υ ∷ []) "1Tim.5.19" ∷ word (κ ∷ α ∷ τ ∷ η ∷ γ ∷ ο ∷ ρ ∷ ί ∷ α ∷ ν ∷ []) "1Tim.5.19" ∷ word (μ ∷ ὴ ∷ []) "1Tim.5.19" ∷ word (π ∷ α ∷ ρ ∷ α ∷ δ ∷ έ ∷ χ ∷ ο ∷ υ ∷ []) "1Tim.5.19" ∷ word (ἐ ∷ κ ∷ τ ∷ ὸ ∷ ς ∷ []) "1Tim.5.19" ∷ word (ε ∷ ἰ ∷ []) "1Tim.5.19" ∷ word (μ ∷ ὴ ∷ []) "1Tim.5.19" ∷ word (ἐ ∷ π ∷ ὶ ∷ []) "1Tim.5.19" ∷ word (δ ∷ ύ ∷ ο ∷ []) "1Tim.5.19" ∷ word (ἢ ∷ []) "1Tim.5.19" ∷ word (τ ∷ ρ ∷ ι ∷ ῶ ∷ ν ∷ []) "1Tim.5.19" ∷ word (μ ∷ α ∷ ρ ∷ τ ∷ ύ ∷ ρ ∷ ω ∷ ν ∷ []) "1Tim.5.19" ∷ word (τ ∷ ο ∷ ὺ ∷ ς ∷ []) "1Tim.5.20" ∷ word (ἁ ∷ μ ∷ α ∷ ρ ∷ τ ∷ ά ∷ ν ∷ ο ∷ ν ∷ τ ∷ α ∷ ς ∷ []) "1Tim.5.20" ∷ word (ἐ ∷ ν ∷ ώ ∷ π ∷ ι ∷ ο ∷ ν ∷ []) "1Tim.5.20" ∷ word (π ∷ ά ∷ ν ∷ τ ∷ ω ∷ ν ∷ []) "1Tim.5.20" ∷ word (ἔ ∷ ∙λ ∷ ε ∷ γ ∷ χ ∷ ε ∷ []) "1Tim.5.20" ∷ word (ἵ ∷ ν ∷ α ∷ []) "1Tim.5.20" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.5.20" ∷ word (ο ∷ ἱ ∷ []) "1Tim.5.20" ∷ word (∙λ ∷ ο ∷ ι ∷ π ∷ ο ∷ ὶ ∷ []) "1Tim.5.20" ∷ word (φ ∷ ό ∷ β ∷ ο ∷ ν ∷ []) "1Tim.5.20" ∷ word (ἔ ∷ χ ∷ ω ∷ σ ∷ ι ∷ ν ∷ []) "1Tim.5.20" ∷ word (δ ∷ ι ∷ α ∷ μ ∷ α ∷ ρ ∷ τ ∷ ύ ∷ ρ ∷ ο ∷ μ ∷ α ∷ ι ∷ []) "1Tim.5.21" ∷ word (ἐ ∷ ν ∷ ώ ∷ π ∷ ι ∷ ο ∷ ν ∷ []) "1Tim.5.21" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "1Tim.5.21" ∷ word (θ ∷ ε ∷ ο ∷ ῦ ∷ []) "1Tim.5.21" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.5.21" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ο ∷ ῦ ∷ []) "1Tim.5.21" ∷ word (Ἰ ∷ η ∷ σ ∷ ο ∷ ῦ ∷ []) "1Tim.5.21" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.5.21" ∷ word (τ ∷ ῶ ∷ ν ∷ []) "1Tim.5.21" ∷ word (ἐ ∷ κ ∷ ∙λ ∷ ε ∷ κ ∷ τ ∷ ῶ ∷ ν ∷ []) "1Tim.5.21" ∷ word (ἀ ∷ γ ∷ γ ∷ έ ∷ ∙λ ∷ ω ∷ ν ∷ []) "1Tim.5.21" ∷ word (ἵ ∷ ν ∷ α ∷ []) "1Tim.5.21" ∷ word (τ ∷ α ∷ ῦ ∷ τ ∷ α ∷ []) "1Tim.5.21" ∷ word (φ ∷ υ ∷ ∙λ ∷ ά ∷ ξ ∷ ῃ ∷ ς ∷ []) "1Tim.5.21" ∷ word (χ ∷ ω ∷ ρ ∷ ὶ ∷ ς ∷ []) "1Tim.5.21" ∷ word (π ∷ ρ ∷ ο ∷ κ ∷ ρ ∷ ί ∷ μ ∷ α ∷ τ ∷ ο ∷ ς ∷ []) "1Tim.5.21" ∷ word (μ ∷ η ∷ δ ∷ ὲ ∷ ν ∷ []) "1Tim.5.21" ∷ word (π ∷ ο ∷ ι ∷ ῶ ∷ ν ∷ []) "1Tim.5.21" ∷ word (κ ∷ α ∷ τ ∷ ὰ ∷ []) "1Tim.5.21" ∷ word (π ∷ ρ ∷ ό ∷ σ ∷ κ ∷ ∙λ ∷ ι ∷ σ ∷ ι ∷ ν ∷ []) "1Tim.5.21" ∷ word (χ ∷ ε ∷ ῖ ∷ ρ ∷ α ∷ ς ∷ []) "1Tim.5.22" ∷ word (τ ∷ α ∷ χ ∷ έ ∷ ω ∷ ς ∷ []) "1Tim.5.22" ∷ word (μ ∷ η ∷ δ ∷ ε ∷ ν ∷ ὶ ∷ []) "1Tim.5.22" ∷ word (ἐ ∷ π ∷ ι ∷ τ ∷ ί ∷ θ ∷ ε ∷ ι ∷ []) "1Tim.5.22" ∷ word (μ ∷ η ∷ δ ∷ ὲ ∷ []) "1Tim.5.22" ∷ word (κ ∷ ο ∷ ι ∷ ν ∷ ώ ∷ ν ∷ ε ∷ ι ∷ []) "1Tim.5.22" ∷ word (ἁ ∷ μ ∷ α ∷ ρ ∷ τ ∷ ί ∷ α ∷ ι ∷ ς ∷ []) "1Tim.5.22" ∷ word (ἀ ∷ ∙λ ∷ ∙λ ∷ ο ∷ τ ∷ ρ ∷ ί ∷ α ∷ ι ∷ ς ∷ []) "1Tim.5.22" ∷ word (σ ∷ ε ∷ α ∷ υ ∷ τ ∷ ὸ ∷ ν ∷ []) "1Tim.5.22" ∷ word (ἁ ∷ γ ∷ ν ∷ ὸ ∷ ν ∷ []) "1Tim.5.22" ∷ word (τ ∷ ή ∷ ρ ∷ ε ∷ ι ∷ []) "1Tim.5.22" ∷ word (μ ∷ η ∷ κ ∷ έ ∷ τ ∷ ι ∷ []) "1Tim.5.23" ∷ word (ὑ ∷ δ ∷ ρ ∷ ο ∷ π ∷ ό ∷ τ ∷ ε ∷ ι ∷ []) "1Tim.5.23" ∷ word (ἀ ∷ ∙λ ∷ ∙λ ∷ ὰ ∷ []) "1Tim.5.23" ∷ word (ο ∷ ἴ ∷ ν ∷ ῳ ∷ []) "1Tim.5.23" ∷ word (ὀ ∷ ∙λ ∷ ί ∷ γ ∷ ῳ ∷ []) "1Tim.5.23" ∷ word (χ ∷ ρ ∷ ῶ ∷ []) "1Tim.5.23" ∷ word (δ ∷ ι ∷ ὰ ∷ []) "1Tim.5.23" ∷ word (τ ∷ ὸ ∷ ν ∷ []) "1Tim.5.23" ∷ word (σ ∷ τ ∷ ό ∷ μ ∷ α ∷ χ ∷ ο ∷ ν ∷ []) "1Tim.5.23" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.5.23" ∷ word (τ ∷ ὰ ∷ ς ∷ []) "1Tim.5.23" ∷ word (π ∷ υ ∷ κ ∷ ν ∷ ά ∷ ς ∷ []) "1Tim.5.23" ∷ word (σ ∷ ο ∷ υ ∷ []) "1Tim.5.23" ∷ word (ἀ ∷ σ ∷ θ ∷ ε ∷ ν ∷ ε ∷ ί ∷ α ∷ ς ∷ []) "1Tim.5.23" ∷ word (Τ ∷ ι ∷ ν ∷ ῶ ∷ ν ∷ []) "1Tim.5.24" ∷ word (ἀ ∷ ν ∷ θ ∷ ρ ∷ ώ ∷ π ∷ ω ∷ ν ∷ []) "1Tim.5.24" ∷ word (α ∷ ἱ ∷ []) "1Tim.5.24" ∷ word (ἁ ∷ μ ∷ α ∷ ρ ∷ τ ∷ ί ∷ α ∷ ι ∷ []) "1Tim.5.24" ∷ word (π ∷ ρ ∷ ό ∷ δ ∷ η ∷ ∙λ ∷ ο ∷ ί ∷ []) "1Tim.5.24" ∷ word (ε ∷ ἰ ∷ σ ∷ ι ∷ ν ∷ []) "1Tim.5.24" ∷ word (π ∷ ρ ∷ ο ∷ ά ∷ γ ∷ ο ∷ υ ∷ σ ∷ α ∷ ι ∷ []) "1Tim.5.24" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "1Tim.5.24" ∷ word (κ ∷ ρ ∷ ί ∷ σ ∷ ι ∷ ν ∷ []) "1Tim.5.24" ∷ word (τ ∷ ι ∷ σ ∷ ὶ ∷ ν ∷ []) "1Tim.5.24" ∷ word (δ ∷ ὲ ∷ []) "1Tim.5.24" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.5.24" ∷ word (ἐ ∷ π ∷ α ∷ κ ∷ ο ∷ ∙λ ∷ ο ∷ υ ∷ θ ∷ ο ∷ ῦ ∷ σ ∷ ι ∷ ν ∷ []) "1Tim.5.24" ∷ word (ὡ ∷ σ ∷ α ∷ ύ ∷ τ ∷ ω ∷ ς ∷ []) "1Tim.5.25" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.5.25" ∷ word (τ ∷ ὰ ∷ []) "1Tim.5.25" ∷ word (ἔ ∷ ρ ∷ γ ∷ α ∷ []) "1Tim.5.25" ∷ word (τ ∷ ὰ ∷ []) "1Tim.5.25" ∷ word (κ ∷ α ∷ ∙λ ∷ ὰ ∷ []) "1Tim.5.25" ∷ word (π ∷ ρ ∷ ό ∷ δ ∷ η ∷ ∙λ ∷ α ∷ []) "1Tim.5.25" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.5.25" ∷ word (τ ∷ ὰ ∷ []) "1Tim.5.25" ∷ word (ἄ ∷ ∙λ ∷ ∙λ ∷ ω ∷ ς ∷ []) "1Tim.5.25" ∷ word (ἔ ∷ χ ∷ ο ∷ ν ∷ τ ∷ α ∷ []) "1Tim.5.25" ∷ word (κ ∷ ρ ∷ υ ∷ β ∷ ῆ ∷ ν ∷ α ∷ ι ∷ []) "1Tim.5.25" ∷ word (ο ∷ ὐ ∷ []) "1Tim.5.25" ∷ word (δ ∷ ύ ∷ ν ∷ α ∷ ν ∷ τ ∷ α ∷ ι ∷ []) "1Tim.5.25" ∷ word (Ὅ ∷ σ ∷ ο ∷ ι ∷ []) "1Tim.6.1" ∷ word (ε ∷ ἰ ∷ σ ∷ ὶ ∷ ν ∷ []) "1Tim.6.1" ∷ word (ὑ ∷ π ∷ ὸ ∷ []) "1Tim.6.1" ∷ word (ζ ∷ υ ∷ γ ∷ ὸ ∷ ν ∷ []) "1Tim.6.1" ∷ word (δ ∷ ο ∷ ῦ ∷ ∙λ ∷ ο ∷ ι ∷ []) "1Tim.6.1" ∷ word (τ ∷ ο ∷ ὺ ∷ ς ∷ []) "1Tim.6.1" ∷ word (ἰ ∷ δ ∷ ί ∷ ο ∷ υ ∷ ς ∷ []) "1Tim.6.1" ∷ word (δ ∷ ε ∷ σ ∷ π ∷ ό ∷ τ ∷ α ∷ ς ∷ []) "1Tim.6.1" ∷ word (π ∷ ά ∷ σ ∷ η ∷ ς ∷ []) "1Tim.6.1" ∷ word (τ ∷ ι ∷ μ ∷ ῆ ∷ ς ∷ []) "1Tim.6.1" ∷ word (ἀ ∷ ξ ∷ ί ∷ ο ∷ υ ∷ ς ∷ []) "1Tim.6.1" ∷ word (ἡ ∷ γ ∷ ε ∷ ί ∷ σ ∷ θ ∷ ω ∷ σ ∷ α ∷ ν ∷ []) "1Tim.6.1" ∷ word (ἵ ∷ ν ∷ α ∷ []) "1Tim.6.1" ∷ word (μ ∷ ὴ ∷ []) "1Tim.6.1" ∷ word (τ ∷ ὸ ∷ []) "1Tim.6.1" ∷ word (ὄ ∷ ν ∷ ο ∷ μ ∷ α ∷ []) "1Tim.6.1" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "1Tim.6.1" ∷ word (θ ∷ ε ∷ ο ∷ ῦ ∷ []) "1Tim.6.1" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.6.1" ∷ word (ἡ ∷ []) "1Tim.6.1" ∷ word (δ ∷ ι ∷ δ ∷ α ∷ σ ∷ κ ∷ α ∷ ∙λ ∷ ί ∷ α ∷ []) "1Tim.6.1" ∷ word (β ∷ ∙λ ∷ α ∷ σ ∷ φ ∷ η ∷ μ ∷ ῆ ∷ τ ∷ α ∷ ι ∷ []) "1Tim.6.1" ∷ word (ο ∷ ἱ ∷ []) "1Tim.6.2" ∷ word (δ ∷ ὲ ∷ []) "1Tim.6.2" ∷ word (π ∷ ι ∷ σ ∷ τ ∷ ο ∷ ὺ ∷ ς ∷ []) "1Tim.6.2" ∷ word (ἔ ∷ χ ∷ ο ∷ ν ∷ τ ∷ ε ∷ ς ∷ []) "1Tim.6.2" ∷ word (δ ∷ ε ∷ σ ∷ π ∷ ό ∷ τ ∷ α ∷ ς ∷ []) "1Tim.6.2" ∷ word (μ ∷ ὴ ∷ []) "1Tim.6.2" ∷ word (κ ∷ α ∷ τ ∷ α ∷ φ ∷ ρ ∷ ο ∷ ν ∷ ε ∷ ί ∷ τ ∷ ω ∷ σ ∷ α ∷ ν ∷ []) "1Tim.6.2" ∷ word (ὅ ∷ τ ∷ ι ∷ []) "1Tim.6.2" ∷ word (ἀ ∷ δ ∷ ε ∷ ∙λ ∷ φ ∷ ο ∷ ί ∷ []) "1Tim.6.2" ∷ word (ε ∷ ἰ ∷ σ ∷ ι ∷ ν ∷ []) "1Tim.6.2" ∷ word (ἀ ∷ ∙λ ∷ ∙λ ∷ ὰ ∷ []) "1Tim.6.2" ∷ word (μ ∷ ᾶ ∷ ∙λ ∷ ∙λ ∷ ο ∷ ν ∷ []) "1Tim.6.2" ∷ word (δ ∷ ο ∷ υ ∷ ∙λ ∷ ε ∷ υ ∷ έ ∷ τ ∷ ω ∷ σ ∷ α ∷ ν ∷ []) "1Tim.6.2" ∷ word (ὅ ∷ τ ∷ ι ∷ []) "1Tim.6.2" ∷ word (π ∷ ι ∷ σ ∷ τ ∷ ο ∷ ί ∷ []) "1Tim.6.2" ∷ word (ε ∷ ἰ ∷ σ ∷ ι ∷ ν ∷ []) "1Tim.6.2" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.6.2" ∷ word (ἀ ∷ γ ∷ α ∷ π ∷ η ∷ τ ∷ ο ∷ ὶ ∷ []) "1Tim.6.2" ∷ word (ο ∷ ἱ ∷ []) "1Tim.6.2" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "1Tim.6.2" ∷ word (ε ∷ ὐ ∷ ε ∷ ρ ∷ γ ∷ ε ∷ σ ∷ ί ∷ α ∷ ς ∷ []) "1Tim.6.2" ∷ word (ἀ ∷ ν ∷ τ ∷ ι ∷ ∙λ ∷ α ∷ μ ∷ β ∷ α ∷ ν ∷ ό ∷ μ ∷ ε ∷ ν ∷ ο ∷ ι ∷ []) "1Tim.6.2" ∷ word (Τ ∷ α ∷ ῦ ∷ τ ∷ α ∷ []) "1Tim.6.2" ∷ word (δ ∷ ί ∷ δ ∷ α ∷ σ ∷ κ ∷ ε ∷ []) "1Tim.6.2" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.6.2" ∷ word (π ∷ α ∷ ρ ∷ α ∷ κ ∷ ά ∷ ∙λ ∷ ε ∷ ι ∷ []) "1Tim.6.2" ∷ word (ε ∷ ἴ ∷ []) "1Tim.6.3" ∷ word (τ ∷ ι ∷ ς ∷ []) "1Tim.6.3" ∷ word (ἑ ∷ τ ∷ ε ∷ ρ ∷ ο ∷ δ ∷ ι ∷ δ ∷ α ∷ σ ∷ κ ∷ α ∷ ∙λ ∷ ε ∷ ῖ ∷ []) "1Tim.6.3" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.6.3" ∷ word (μ ∷ ὴ ∷ []) "1Tim.6.3" ∷ word (π ∷ ρ ∷ ο ∷ σ ∷ έ ∷ ρ ∷ χ ∷ ε ∷ τ ∷ α ∷ ι ∷ []) "1Tim.6.3" ∷ word (ὑ ∷ γ ∷ ι ∷ α ∷ ί ∷ ν ∷ ο ∷ υ ∷ σ ∷ ι ∷ []) "1Tim.6.3" ∷ word (∙λ ∷ ό ∷ γ ∷ ο ∷ ι ∷ ς ∷ []) "1Tim.6.3" ∷ word (τ ∷ ο ∷ ῖ ∷ ς ∷ []) "1Tim.6.3" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "1Tim.6.3" ∷ word (κ ∷ υ ∷ ρ ∷ ί ∷ ο ∷ υ ∷ []) "1Tim.6.3" ∷ word (ἡ ∷ μ ∷ ῶ ∷ ν ∷ []) "1Tim.6.3" ∷ word (Ἰ ∷ η ∷ σ ∷ ο ∷ ῦ ∷ []) "1Tim.6.3" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ο ∷ ῦ ∷ []) "1Tim.6.3" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.6.3" ∷ word (τ ∷ ῇ ∷ []) "1Tim.6.3" ∷ word (κ ∷ α ∷ τ ∷ []) "1Tim.6.3" ∷ word (ε ∷ ὐ ∷ σ ∷ έ ∷ β ∷ ε ∷ ι ∷ α ∷ ν ∷ []) "1Tim.6.3" ∷ word (δ ∷ ι ∷ δ ∷ α ∷ σ ∷ κ ∷ α ∷ ∙λ ∷ ί ∷ ᾳ ∷ []) "1Tim.6.3" ∷ word (τ ∷ ε ∷ τ ∷ ύ ∷ φ ∷ ω ∷ τ ∷ α ∷ ι ∷ []) "1Tim.6.4" ∷ word (μ ∷ η ∷ δ ∷ ὲ ∷ ν ∷ []) "1Tim.6.4" ∷ word (ἐ ∷ π ∷ ι ∷ σ ∷ τ ∷ ά ∷ μ ∷ ε ∷ ν ∷ ο ∷ ς ∷ []) "1Tim.6.4" ∷ word (ἀ ∷ ∙λ ∷ ∙λ ∷ ὰ ∷ []) "1Tim.6.4" ∷ word (ν ∷ ο ∷ σ ∷ ῶ ∷ ν ∷ []) "1Tim.6.4" ∷ word (π ∷ ε ∷ ρ ∷ ὶ ∷ []) "1Tim.6.4" ∷ word (ζ ∷ η ∷ τ ∷ ή ∷ σ ∷ ε ∷ ι ∷ ς ∷ []) "1Tim.6.4" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.6.4" ∷ word (∙λ ∷ ο ∷ γ ∷ ο ∷ μ ∷ α ∷ χ ∷ ί ∷ α ∷ ς ∷ []) "1Tim.6.4" ∷ word (ἐ ∷ ξ ∷ []) "1Tim.6.4" ∷ word (ὧ ∷ ν ∷ []) "1Tim.6.4" ∷ word (γ ∷ ί ∷ ν ∷ ε ∷ τ ∷ α ∷ ι ∷ []) "1Tim.6.4" ∷ word (φ ∷ θ ∷ ό ∷ ν ∷ ο ∷ ς ∷ []) "1Tim.6.4" ∷ word (ἔ ∷ ρ ∷ ι ∷ ς ∷ []) "1Tim.6.4" ∷ word (β ∷ ∙λ ∷ α ∷ σ ∷ φ ∷ η ∷ μ ∷ ί ∷ α ∷ ι ∷ []) "1Tim.6.4" ∷ word (ὑ ∷ π ∷ ό ∷ ν ∷ ο ∷ ι ∷ α ∷ ι ∷ []) "1Tim.6.4" ∷ word (π ∷ ο ∷ ν ∷ η ∷ ρ ∷ α ∷ ί ∷ []) "1Tim.6.4" ∷ word (δ ∷ ι ∷ α ∷ π ∷ α ∷ ρ ∷ α ∷ τ ∷ ρ ∷ ι ∷ β ∷ α ∷ ὶ ∷ []) "1Tim.6.5" ∷ word (δ ∷ ι ∷ ε ∷ φ ∷ θ ∷ α ∷ ρ ∷ μ ∷ έ ∷ ν ∷ ω ∷ ν ∷ []) "1Tim.6.5" ∷ word (ἀ ∷ ν ∷ θ ∷ ρ ∷ ώ ∷ π ∷ ω ∷ ν ∷ []) "1Tim.6.5" ∷ word (τ ∷ ὸ ∷ ν ∷ []) "1Tim.6.5" ∷ word (ν ∷ ο ∷ ῦ ∷ ν ∷ []) "1Tim.6.5" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.6.5" ∷ word (ἀ ∷ π ∷ ε ∷ σ ∷ τ ∷ ε ∷ ρ ∷ η ∷ μ ∷ έ ∷ ν ∷ ω ∷ ν ∷ []) "1Tim.6.5" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "1Tim.6.5" ∷ word (ἀ ∷ ∙λ ∷ η ∷ θ ∷ ε ∷ ί ∷ α ∷ ς ∷ []) "1Tim.6.5" ∷ word (ν ∷ ο ∷ μ ∷ ι ∷ ζ ∷ ό ∷ ν ∷ τ ∷ ω ∷ ν ∷ []) "1Tim.6.5" ∷ word (π ∷ ο ∷ ρ ∷ ι ∷ σ ∷ μ ∷ ὸ ∷ ν ∷ []) "1Tim.6.5" ∷ word (ε ∷ ἶ ∷ ν ∷ α ∷ ι ∷ []) "1Tim.6.5" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "1Tim.6.5" ∷ word (ε ∷ ὐ ∷ σ ∷ έ ∷ β ∷ ε ∷ ι ∷ α ∷ ν ∷ []) "1Tim.6.5" ∷ word (ἔ ∷ σ ∷ τ ∷ ι ∷ ν ∷ []) "1Tim.6.6" ∷ word (δ ∷ ὲ ∷ []) "1Tim.6.6" ∷ word (π ∷ ο ∷ ρ ∷ ι ∷ σ ∷ μ ∷ ὸ ∷ ς ∷ []) "1Tim.6.6" ∷ word (μ ∷ έ ∷ γ ∷ α ∷ ς ∷ []) "1Tim.6.6" ∷ word (ἡ ∷ []) "1Tim.6.6" ∷ word (ε ∷ ὐ ∷ σ ∷ έ ∷ β ∷ ε ∷ ι ∷ α ∷ []) "1Tim.6.6" ∷ word (μ ∷ ε ∷ τ ∷ ὰ ∷ []) "1Tim.6.6" ∷ word (α ∷ ὐ ∷ τ ∷ α ∷ ρ ∷ κ ∷ ε ∷ ί ∷ α ∷ ς ∷ []) "1Tim.6.6" ∷ word (ο ∷ ὐ ∷ δ ∷ ὲ ∷ ν ∷ []) "1Tim.6.7" ∷ word (γ ∷ ὰ ∷ ρ ∷ []) "1Tim.6.7" ∷ word (ε ∷ ἰ ∷ σ ∷ η ∷ ν ∷ έ ∷ γ ∷ κ ∷ α ∷ μ ∷ ε ∷ ν ∷ []) "1Tim.6.7" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "1Tim.6.7" ∷ word (τ ∷ ὸ ∷ ν ∷ []) "1Tim.6.7" ∷ word (κ ∷ ό ∷ σ ∷ μ ∷ ο ∷ ν ∷ []) "1Tim.6.7" ∷ word (ὅ ∷ τ ∷ ι ∷ []) "1Tim.6.7" ∷ word (ο ∷ ὐ ∷ δ ∷ ὲ ∷ []) "1Tim.6.7" ∷ word (ἐ ∷ ξ ∷ ε ∷ ν ∷ ε ∷ γ ∷ κ ∷ ε ∷ ῖ ∷ ν ∷ []) "1Tim.6.7" ∷ word (τ ∷ ι ∷ []) "1Tim.6.7" ∷ word (δ ∷ υ ∷ ν ∷ ά ∷ μ ∷ ε ∷ θ ∷ α ∷ []) "1Tim.6.7" ∷ word (ἔ ∷ χ ∷ ο ∷ ν ∷ τ ∷ ε ∷ ς ∷ []) "1Tim.6.8" ∷ word (δ ∷ ὲ ∷ []) "1Tim.6.8" ∷ word (δ ∷ ι ∷ α ∷ τ ∷ ρ ∷ ο ∷ φ ∷ ὰ ∷ ς ∷ []) "1Tim.6.8" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.6.8" ∷ word (σ ∷ κ ∷ ε ∷ π ∷ ά ∷ σ ∷ μ ∷ α ∷ τ ∷ α ∷ []) "1Tim.6.8" ∷ word (τ ∷ ο ∷ ύ ∷ τ ∷ ο ∷ ι ∷ ς ∷ []) "1Tim.6.8" ∷ word (ἀ ∷ ρ ∷ κ ∷ ε ∷ σ ∷ θ ∷ η ∷ σ ∷ ό ∷ μ ∷ ε ∷ θ ∷ α ∷ []) "1Tim.6.8" ∷ word (ο ∷ ἱ ∷ []) "1Tim.6.9" ∷ word (δ ∷ ὲ ∷ []) "1Tim.6.9" ∷ word (β ∷ ο ∷ υ ∷ ∙λ ∷ ό ∷ μ ∷ ε ∷ ν ∷ ο ∷ ι ∷ []) "1Tim.6.9" ∷ word (π ∷ ∙λ ∷ ο ∷ υ ∷ τ ∷ ε ∷ ῖ ∷ ν ∷ []) "1Tim.6.9" ∷ word (ἐ ∷ μ ∷ π ∷ ί ∷ π ∷ τ ∷ ο ∷ υ ∷ σ ∷ ι ∷ ν ∷ []) "1Tim.6.9" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "1Tim.6.9" ∷ word (π ∷ ε ∷ ι ∷ ρ ∷ α ∷ σ ∷ μ ∷ ὸ ∷ ν ∷ []) "1Tim.6.9" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.6.9" ∷ word (π ∷ α ∷ γ ∷ ί ∷ δ ∷ α ∷ []) "1Tim.6.9" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.6.9" ∷ word (ἐ ∷ π ∷ ι ∷ θ ∷ υ ∷ μ ∷ ί ∷ α ∷ ς ∷ []) "1Tim.6.9" ∷ word (π ∷ ο ∷ ∙λ ∷ ∙λ ∷ ὰ ∷ ς ∷ []) "1Tim.6.9" ∷ word (ἀ ∷ ν ∷ ο ∷ ή ∷ τ ∷ ο ∷ υ ∷ ς ∷ []) "1Tim.6.9" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.6.9" ∷ word (β ∷ ∙λ ∷ α ∷ β ∷ ε ∷ ρ ∷ ά ∷ ς ∷ []) "1Tim.6.9" ∷ word (α ∷ ἵ ∷ τ ∷ ι ∷ ν ∷ ε ∷ ς ∷ []) "1Tim.6.9" ∷ word (β ∷ υ ∷ θ ∷ ί ∷ ζ ∷ ο ∷ υ ∷ σ ∷ ι ∷ []) "1Tim.6.9" ∷ word (τ ∷ ο ∷ ὺ ∷ ς ∷ []) "1Tim.6.9" ∷ word (ἀ ∷ ν ∷ θ ∷ ρ ∷ ώ ∷ π ∷ ο ∷ υ ∷ ς ∷ []) "1Tim.6.9" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "1Tim.6.9" ∷ word (ὄ ∷ ∙λ ∷ ε ∷ θ ∷ ρ ∷ ο ∷ ν ∷ []) "1Tim.6.9" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.6.9" ∷ word (ἀ ∷ π ∷ ώ ∷ ∙λ ∷ ε ∷ ι ∷ α ∷ ν ∷ []) "1Tim.6.9" ∷ word (ῥ ∷ ί ∷ ζ ∷ α ∷ []) "1Tim.6.10" ∷ word (γ ∷ ὰ ∷ ρ ∷ []) "1Tim.6.10" ∷ word (π ∷ ά ∷ ν ∷ τ ∷ ω ∷ ν ∷ []) "1Tim.6.10" ∷ word (τ ∷ ῶ ∷ ν ∷ []) "1Tim.6.10" ∷ word (κ ∷ α ∷ κ ∷ ῶ ∷ ν ∷ []) "1Tim.6.10" ∷ word (ἐ ∷ σ ∷ τ ∷ ι ∷ ν ∷ []) "1Tim.6.10" ∷ word (ἡ ∷ []) "1Tim.6.10" ∷ word (φ ∷ ι ∷ ∙λ ∷ α ∷ ρ ∷ γ ∷ υ ∷ ρ ∷ ί ∷ α ∷ []) "1Tim.6.10" ∷ word (ἧ ∷ ς ∷ []) "1Tim.6.10" ∷ word (τ ∷ ι ∷ ν ∷ ε ∷ ς ∷ []) "1Tim.6.10" ∷ word (ὀ ∷ ρ ∷ ε ∷ γ ∷ ό ∷ μ ∷ ε ∷ ν ∷ ο ∷ ι ∷ []) "1Tim.6.10" ∷ word (ἀ ∷ π ∷ ε ∷ π ∷ ∙λ ∷ α ∷ ν ∷ ή ∷ θ ∷ η ∷ σ ∷ α ∷ ν ∷ []) "1Tim.6.10" ∷ word (ἀ ∷ π ∷ ὸ ∷ []) "1Tim.6.10" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "1Tim.6.10" ∷ word (π ∷ ί ∷ σ ∷ τ ∷ ε ∷ ω ∷ ς ∷ []) "1Tim.6.10" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.6.10" ∷ word (ἑ ∷ α ∷ υ ∷ τ ∷ ο ∷ ὺ ∷ ς ∷ []) "1Tim.6.10" ∷ word (π ∷ ε ∷ ρ ∷ ι ∷ έ ∷ π ∷ ε ∷ ι ∷ ρ ∷ α ∷ ν ∷ []) "1Tim.6.10" ∷ word (ὀ ∷ δ ∷ ύ ∷ ν ∷ α ∷ ι ∷ ς ∷ []) "1Tim.6.10" ∷ word (π ∷ ο ∷ ∙λ ∷ ∙λ ∷ α ∷ ῖ ∷ ς ∷ []) "1Tim.6.10" ∷ word (Σ ∷ ὺ ∷ []) "1Tim.6.11" ∷ word (δ ∷ έ ∷ []) "1Tim.6.11" ∷ word (ὦ ∷ []) "1Tim.6.11" ∷ word (ἄ ∷ ν ∷ θ ∷ ρ ∷ ω ∷ π ∷ ε ∷ []) "1Tim.6.11" ∷ word (θ ∷ ε ∷ ο ∷ ῦ ∷ []) "1Tim.6.11" ∷ word (τ ∷ α ∷ ῦ ∷ τ ∷ α ∷ []) "1Tim.6.11" ∷ word (φ ∷ ε ∷ ῦ ∷ γ ∷ ε ∷ []) "1Tim.6.11" ∷ word (δ ∷ ί ∷ ω ∷ κ ∷ ε ∷ []) "1Tim.6.11" ∷ word (δ ∷ ὲ ∷ []) "1Tim.6.11" ∷ word (δ ∷ ι ∷ κ ∷ α ∷ ι ∷ ο ∷ σ ∷ ύ ∷ ν ∷ η ∷ ν ∷ []) "1Tim.6.11" ∷ word (ε ∷ ὐ ∷ σ ∷ έ ∷ β ∷ ε ∷ ι ∷ α ∷ ν ∷ []) "1Tim.6.11" ∷ word (π ∷ ί ∷ σ ∷ τ ∷ ι ∷ ν ∷ []) "1Tim.6.11" ∷ word (ἀ ∷ γ ∷ ά ∷ π ∷ η ∷ ν ∷ []) "1Tim.6.11" ∷ word (ὑ ∷ π ∷ ο ∷ μ ∷ ο ∷ ν ∷ ή ∷ ν ∷ []) "1Tim.6.11" ∷ word (π ∷ ρ ∷ α ∷ ϋ ∷ π ∷ α ∷ θ ∷ ί ∷ α ∷ ν ∷ []) "1Tim.6.11" ∷ word (ἀ ∷ γ ∷ ω ∷ ν ∷ ί ∷ ζ ∷ ο ∷ υ ∷ []) "1Tim.6.12" ∷ word (τ ∷ ὸ ∷ ν ∷ []) "1Tim.6.12" ∷ word (κ ∷ α ∷ ∙λ ∷ ὸ ∷ ν ∷ []) "1Tim.6.12" ∷ word (ἀ ∷ γ ∷ ῶ ∷ ν ∷ α ∷ []) "1Tim.6.12" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "1Tim.6.12" ∷ word (π ∷ ί ∷ σ ∷ τ ∷ ε ∷ ω ∷ ς ∷ []) "1Tim.6.12" ∷ word (ἐ ∷ π ∷ ι ∷ ∙λ ∷ α ∷ β ∷ ο ∷ ῦ ∷ []) "1Tim.6.12" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "1Tim.6.12" ∷ word (α ∷ ἰ ∷ ω ∷ ν ∷ ί ∷ ο ∷ υ ∷ []) "1Tim.6.12" ∷ word (ζ ∷ ω ∷ ῆ ∷ ς ∷ []) "1Tim.6.12" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "1Tim.6.12" ∷ word (ἣ ∷ ν ∷ []) "1Tim.6.12" ∷ word (ἐ ∷ κ ∷ ∙λ ∷ ή ∷ θ ∷ η ∷ ς ∷ []) "1Tim.6.12" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.6.12" ∷ word (ὡ ∷ μ ∷ ο ∷ ∙λ ∷ ό ∷ γ ∷ η ∷ σ ∷ α ∷ ς ∷ []) "1Tim.6.12" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "1Tim.6.12" ∷ word (κ ∷ α ∷ ∙λ ∷ ὴ ∷ ν ∷ []) "1Tim.6.12" ∷ word (ὁ ∷ μ ∷ ο ∷ ∙λ ∷ ο ∷ γ ∷ ί ∷ α ∷ ν ∷ []) "1Tim.6.12" ∷ word (ἐ ∷ ν ∷ ώ ∷ π ∷ ι ∷ ο ∷ ν ∷ []) "1Tim.6.12" ∷ word (π ∷ ο ∷ ∙λ ∷ ∙λ ∷ ῶ ∷ ν ∷ []) "1Tim.6.12" ∷ word (μ ∷ α ∷ ρ ∷ τ ∷ ύ ∷ ρ ∷ ω ∷ ν ∷ []) "1Tim.6.12" ∷ word (π ∷ α ∷ ρ ∷ α ∷ γ ∷ γ ∷ έ ∷ ∙λ ∷ ∙λ ∷ ω ∷ []) "1Tim.6.13" ∷ word (σ ∷ ο ∷ ι ∷ []) "1Tim.6.13" ∷ word (ἐ ∷ ν ∷ ώ ∷ π ∷ ι ∷ ο ∷ ν ∷ []) "1Tim.6.13" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "1Tim.6.13" ∷ word (θ ∷ ε ∷ ο ∷ ῦ ∷ []) "1Tim.6.13" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "1Tim.6.13" ∷ word (ζ ∷ ῳ ∷ ο ∷ γ ∷ ο ∷ ν ∷ ο ∷ ῦ ∷ ν ∷ τ ∷ ο ∷ ς ∷ []) "1Tim.6.13" ∷ word (τ ∷ ὰ ∷ []) "1Tim.6.13" ∷ word (π ∷ ά ∷ ν ∷ τ ∷ α ∷ []) "1Tim.6.13" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.6.13" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ο ∷ ῦ ∷ []) "1Tim.6.13" ∷ word (Ἰ ∷ η ∷ σ ∷ ο ∷ ῦ ∷ []) "1Tim.6.13" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "1Tim.6.13" ∷ word (μ ∷ α ∷ ρ ∷ τ ∷ υ ∷ ρ ∷ ή ∷ σ ∷ α ∷ ν ∷ τ ∷ ο ∷ ς ∷ []) "1Tim.6.13" ∷ word (ἐ ∷ π ∷ ὶ ∷ []) "1Tim.6.13" ∷ word (Π ∷ ο ∷ ν ∷ τ ∷ ί ∷ ο ∷ υ ∷ []) "1Tim.6.13" ∷ word (Π ∷ ι ∷ ∙λ ∷ ά ∷ τ ∷ ο ∷ υ ∷ []) "1Tim.6.13" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "1Tim.6.13" ∷ word (κ ∷ α ∷ ∙λ ∷ ὴ ∷ ν ∷ []) "1Tim.6.13" ∷ word (ὁ ∷ μ ∷ ο ∷ ∙λ ∷ ο ∷ γ ∷ ί ∷ α ∷ ν ∷ []) "1Tim.6.13" ∷ word (τ ∷ η ∷ ρ ∷ ῆ ∷ σ ∷ α ∷ ί ∷ []) "1Tim.6.14" ∷ word (σ ∷ ε ∷ []) "1Tim.6.14" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "1Tim.6.14" ∷ word (ἐ ∷ ν ∷ τ ∷ ο ∷ ∙λ ∷ ὴ ∷ ν ∷ []) "1Tim.6.14" ∷ word (ἄ ∷ σ ∷ π ∷ ι ∷ ∙λ ∷ ο ∷ ν ∷ []) "1Tim.6.14" ∷ word (ἀ ∷ ν ∷ ε ∷ π ∷ ί ∷ ∙λ ∷ η ∷ μ ∷ π ∷ τ ∷ ο ∷ ν ∷ []) "1Tim.6.14" ∷ word (μ ∷ έ ∷ χ ∷ ρ ∷ ι ∷ []) "1Tim.6.14" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "1Tim.6.14" ∷ word (ἐ ∷ π ∷ ι ∷ φ ∷ α ∷ ν ∷ ε ∷ ί ∷ α ∷ ς ∷ []) "1Tim.6.14" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "1Tim.6.14" ∷ word (κ ∷ υ ∷ ρ ∷ ί ∷ ο ∷ υ ∷ []) "1Tim.6.14" ∷ word (ἡ ∷ μ ∷ ῶ ∷ ν ∷ []) "1Tim.6.14" ∷ word (Ἰ ∷ η ∷ σ ∷ ο ∷ ῦ ∷ []) "1Tim.6.14" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ο ∷ ῦ ∷ []) "1Tim.6.14" ∷ word (ἣ ∷ ν ∷ []) "1Tim.6.15" ∷ word (κ ∷ α ∷ ι ∷ ρ ∷ ο ∷ ῖ ∷ ς ∷ []) "1Tim.6.15" ∷ word (ἰ ∷ δ ∷ ί ∷ ο ∷ ι ∷ ς ∷ []) "1Tim.6.15" ∷ word (δ ∷ ε ∷ ί ∷ ξ ∷ ε ∷ ι ∷ []) "1Tim.6.15" ∷ word (ὁ ∷ []) "1Tim.6.15" ∷ word (μ ∷ α ∷ κ ∷ ά ∷ ρ ∷ ι ∷ ο ∷ ς ∷ []) "1Tim.6.15" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.6.15" ∷ word (μ ∷ ό ∷ ν ∷ ο ∷ ς ∷ []) "1Tim.6.15" ∷ word (δ ∷ υ ∷ ν ∷ ά ∷ σ ∷ τ ∷ η ∷ ς ∷ []) "1Tim.6.15" ∷ word (ὁ ∷ []) "1Tim.6.15" ∷ word (β ∷ α ∷ σ ∷ ι ∷ ∙λ ∷ ε ∷ ὺ ∷ ς ∷ []) "1Tim.6.15" ∷ word (τ ∷ ῶ ∷ ν ∷ []) "1Tim.6.15" ∷ word (β ∷ α ∷ σ ∷ ι ∷ ∙λ ∷ ε ∷ υ ∷ ό ∷ ν ∷ τ ∷ ω ∷ ν ∷ []) "1Tim.6.15" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.6.15" ∷ word (κ ∷ ύ ∷ ρ ∷ ι ∷ ο ∷ ς ∷ []) "1Tim.6.15" ∷ word (τ ∷ ῶ ∷ ν ∷ []) "1Tim.6.15" ∷ word (κ ∷ υ ∷ ρ ∷ ι ∷ ε ∷ υ ∷ ό ∷ ν ∷ τ ∷ ω ∷ ν ∷ []) "1Tim.6.15" ∷ word (ὁ ∷ []) "1Tim.6.16" ∷ word (μ ∷ ό ∷ ν ∷ ο ∷ ς ∷ []) "1Tim.6.16" ∷ word (ἔ ∷ χ ∷ ω ∷ ν ∷ []) "1Tim.6.16" ∷ word (ἀ ∷ θ ∷ α ∷ ν ∷ α ∷ σ ∷ ί ∷ α ∷ ν ∷ []) "1Tim.6.16" ∷ word (φ ∷ ῶ ∷ ς ∷ []) "1Tim.6.16" ∷ word (ο ∷ ἰ ∷ κ ∷ ῶ ∷ ν ∷ []) "1Tim.6.16" ∷ word (ἀ ∷ π ∷ ρ ∷ ό ∷ σ ∷ ι ∷ τ ∷ ο ∷ ν ∷ []) "1Tim.6.16" ∷ word (ὃ ∷ ν ∷ []) "1Tim.6.16" ∷ word (ε ∷ ἶ ∷ δ ∷ ε ∷ ν ∷ []) "1Tim.6.16" ∷ word (ο ∷ ὐ ∷ δ ∷ ε ∷ ὶ ∷ ς ∷ []) "1Tim.6.16" ∷ word (ἀ ∷ ν ∷ θ ∷ ρ ∷ ώ ∷ π ∷ ω ∷ ν ∷ []) "1Tim.6.16" ∷ word (ο ∷ ὐ ∷ δ ∷ ὲ ∷ []) "1Tim.6.16" ∷ word (ἰ ∷ δ ∷ ε ∷ ῖ ∷ ν ∷ []) "1Tim.6.16" ∷ word (δ ∷ ύ ∷ ν ∷ α ∷ τ ∷ α ∷ ι ∷ []) "1Tim.6.16" ∷ word (ᾧ ∷ []) "1Tim.6.16" ∷ word (τ ∷ ι ∷ μ ∷ ὴ ∷ []) "1Tim.6.16" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.6.16" ∷ word (κ ∷ ρ ∷ ά ∷ τ ∷ ο ∷ ς ∷ []) "1Tim.6.16" ∷ word (α ∷ ἰ ∷ ώ ∷ ν ∷ ι ∷ ο ∷ ν ∷ []) "1Tim.6.16" ∷ word (ἀ ∷ μ ∷ ή ∷ ν ∷ []) "1Tim.6.16" ∷ word (Τ ∷ ο ∷ ῖ ∷ ς ∷ []) "1Tim.6.17" ∷ word (π ∷ ∙λ ∷ ο ∷ υ ∷ σ ∷ ί ∷ ο ∷ ι ∷ ς ∷ []) "1Tim.6.17" ∷ word (ἐ ∷ ν ∷ []) "1Tim.6.17" ∷ word (τ ∷ ῷ ∷ []) "1Tim.6.17" ∷ word (ν ∷ ῦ ∷ ν ∷ []) "1Tim.6.17" ∷ word (α ∷ ἰ ∷ ῶ ∷ ν ∷ ι ∷ []) "1Tim.6.17" ∷ word (π ∷ α ∷ ρ ∷ ά ∷ γ ∷ γ ∷ ε ∷ ∙λ ∷ ∙λ ∷ ε ∷ []) "1Tim.6.17" ∷ word (μ ∷ ὴ ∷ []) "1Tim.6.17" ∷ word (ὑ ∷ ψ ∷ η ∷ ∙λ ∷ ο ∷ φ ∷ ρ ∷ ο ∷ ν ∷ ε ∷ ῖ ∷ ν ∷ []) "1Tim.6.17" ∷ word (μ ∷ η ∷ δ ∷ ὲ ∷ []) "1Tim.6.17" ∷ word (ἠ ∷ ∙λ ∷ π ∷ ι ∷ κ ∷ έ ∷ ν ∷ α ∷ ι ∷ []) "1Tim.6.17" ∷ word (ἐ ∷ π ∷ ὶ ∷ []) "1Tim.6.17" ∷ word (π ∷ ∙λ ∷ ο ∷ ύ ∷ τ ∷ ο ∷ υ ∷ []) "1Tim.6.17" ∷ word (ἀ ∷ δ ∷ η ∷ ∙λ ∷ ό ∷ τ ∷ η ∷ τ ∷ ι ∷ []) "1Tim.6.17" ∷ word (ἀ ∷ ∙λ ∷ ∙λ ∷ []) "1Tim.6.17" ∷ word (ἐ ∷ π ∷ ὶ ∷ []) "1Tim.6.17" ∷ word (θ ∷ ε ∷ ῷ ∷ []) "1Tim.6.17" ∷ word (τ ∷ ῷ ∷ []) "1Tim.6.17" ∷ word (π ∷ α ∷ ρ ∷ έ ∷ χ ∷ ο ∷ ν ∷ τ ∷ ι ∷ []) "1Tim.6.17" ∷ word (ἡ ∷ μ ∷ ῖ ∷ ν ∷ []) "1Tim.6.17" ∷ word (π ∷ ά ∷ ν ∷ τ ∷ α ∷ []) "1Tim.6.17" ∷ word (π ∷ ∙λ ∷ ο ∷ υ ∷ σ ∷ ί ∷ ω ∷ ς ∷ []) "1Tim.6.17" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "1Tim.6.17" ∷ word (ἀ ∷ π ∷ ό ∷ ∙λ ∷ α ∷ υ ∷ σ ∷ ι ∷ ν ∷ []) "1Tim.6.17" ∷ word (ἀ ∷ γ ∷ α ∷ θ ∷ ο ∷ ε ∷ ρ ∷ γ ∷ ε ∷ ῖ ∷ ν ∷ []) "1Tim.6.18" ∷ word (π ∷ ∙λ ∷ ο ∷ υ ∷ τ ∷ ε ∷ ῖ ∷ ν ∷ []) "1Tim.6.18" ∷ word (ἐ ∷ ν ∷ []) "1Tim.6.18" ∷ word (ἔ ∷ ρ ∷ γ ∷ ο ∷ ι ∷ ς ∷ []) "1Tim.6.18" ∷ word (κ ∷ α ∷ ∙λ ∷ ο ∷ ῖ ∷ ς ∷ []) "1Tim.6.18" ∷ word (ε ∷ ὐ ∷ μ ∷ ε ∷ τ ∷ α ∷ δ ∷ ό ∷ τ ∷ ο ∷ υ ∷ ς ∷ []) "1Tim.6.18" ∷ word (ε ∷ ἶ ∷ ν ∷ α ∷ ι ∷ []) "1Tim.6.18" ∷ word (κ ∷ ο ∷ ι ∷ ν ∷ ω ∷ ν ∷ ι ∷ κ ∷ ο ∷ ύ ∷ ς ∷ []) "1Tim.6.18" ∷ word (ἀ ∷ π ∷ ο ∷ θ ∷ η ∷ σ ∷ α ∷ υ ∷ ρ ∷ ί ∷ ζ ∷ ο ∷ ν ∷ τ ∷ α ∷ ς ∷ []) "1Tim.6.19" ∷ word (ἑ ∷ α ∷ υ ∷ τ ∷ ο ∷ ῖ ∷ ς ∷ []) "1Tim.6.19" ∷ word (θ ∷ ε ∷ μ ∷ έ ∷ ∙λ ∷ ι ∷ ο ∷ ν ∷ []) "1Tim.6.19" ∷ word (κ ∷ α ∷ ∙λ ∷ ὸ ∷ ν ∷ []) "1Tim.6.19" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "1Tim.6.19" ∷ word (τ ∷ ὸ ∷ []) "1Tim.6.19" ∷ word (μ ∷ έ ∷ ∙λ ∷ ∙λ ∷ ο ∷ ν ∷ []) "1Tim.6.19" ∷ word (ἵ ∷ ν ∷ α ∷ []) "1Tim.6.19" ∷ word (ἐ ∷ π ∷ ι ∷ ∙λ ∷ ά ∷ β ∷ ω ∷ ν ∷ τ ∷ α ∷ ι ∷ []) "1Tim.6.19" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "1Tim.6.19" ∷ word (ὄ ∷ ν ∷ τ ∷ ω ∷ ς ∷ []) "1Tim.6.19" ∷ word (ζ ∷ ω ∷ ῆ ∷ ς ∷ []) "1Tim.6.19" ∷ word (Ὦ ∷ []) "1Tim.6.20" ∷ word (Τ ∷ ι ∷ μ ∷ ό ∷ θ ∷ ε ∷ ε ∷ []) "1Tim.6.20" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "1Tim.6.20" ∷ word (π ∷ α ∷ ρ ∷ α ∷ θ ∷ ή ∷ κ ∷ η ∷ ν ∷ []) "1Tim.6.20" ∷ word (φ ∷ ύ ∷ ∙λ ∷ α ∷ ξ ∷ ο ∷ ν ∷ []) "1Tim.6.20" ∷ word (ἐ ∷ κ ∷ τ ∷ ρ ∷ ε ∷ π ∷ ό ∷ μ ∷ ε ∷ ν ∷ ο ∷ ς ∷ []) "1Tim.6.20" ∷ word (τ ∷ ὰ ∷ ς ∷ []) "1Tim.6.20" ∷ word (β ∷ ε ∷ β ∷ ή ∷ ∙λ ∷ ο ∷ υ ∷ ς ∷ []) "1Tim.6.20" ∷ word (κ ∷ ε ∷ ν ∷ ο ∷ φ ∷ ω ∷ ν ∷ ί ∷ α ∷ ς ∷ []) "1Tim.6.20" ∷ word (κ ∷ α ∷ ὶ ∷ []) "1Tim.6.20" ∷ word (ἀ ∷ ν ∷ τ ∷ ι ∷ θ ∷ έ ∷ σ ∷ ε ∷ ι ∷ ς ∷ []) "1Tim.6.20" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "1Tim.6.20" ∷ word (ψ ∷ ε ∷ υ ∷ δ ∷ ω ∷ ν ∷ ύ ∷ μ ∷ ο ∷ υ ∷ []) "1Tim.6.20" ∷ word (γ ∷ ν ∷ ώ ∷ σ ∷ ε ∷ ω ∷ ς ∷ []) "1Tim.6.20" ∷ word (ἥ ∷ ν ∷ []) "1Tim.6.21" ∷ word (τ ∷ ι ∷ ν ∷ ε ∷ ς ∷ []) "1Tim.6.21" ∷ word (ἐ ∷ π ∷ α ∷ γ ∷ γ ∷ ε ∷ ∙λ ∷ ∙λ ∷ ό ∷ μ ∷ ε ∷ ν ∷ ο ∷ ι ∷ []) "1Tim.6.21" ∷ word (π ∷ ε ∷ ρ ∷ ὶ ∷ []) "1Tim.6.21" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "1Tim.6.21" ∷ word (π ∷ ί ∷ σ ∷ τ ∷ ι ∷ ν ∷ []) "1Tim.6.21" ∷ word (ἠ ∷ σ ∷ τ ∷ ό ∷ χ ∷ η ∷ σ ∷ α ∷ ν ∷ []) "1Tim.6.21" ∷ word (Ἡ ∷ []) "1Tim.6.21" ∷ word (χ ∷ ά ∷ ρ ∷ ι ∷ ς ∷ []) "1Tim.6.21" ∷ word (μ ∷ ε ∷ θ ∷ []) "1Tim.6.21" ∷ word (ὑ ∷ μ ∷ ῶ ∷ ν ∷ []) "1Tim.6.21" ∷ []
{ "alphanum_fraction": 0.3369717251, "avg_line_length": 47.752184769, "ext": "agda", "hexsha": "736d2381ea87e48c15ede9e9e7172740684977ef", "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/1Tim.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/1Tim.agda", "max_line_length": 92, "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/1Tim.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": 55144, "size": 76499 }
{- Copyright 2019 Lisandra Silva 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. -} open import Prelude open import Data.Fin hiding (_≟_; _<?_; _≤?_ ;_+_; pred; lift) renaming (_<_ to _<F_; _≤_ to _≤F_) open import Data.List open import Data.List.Properties open import Data.Maybe.Base as Maybe using (Maybe; nothing; just) open import Data.Vec.Base as Vec using (Vec) open import Data.Bool hiding (_<_ ; _<?_; _≤_; _≤?_; _≟_) open import Data.Vec.Any open import Data.Vec.All hiding (lookup) open import StateMachineModel open import Stream module DistributedSystem.Prototype {ℓ₁ ℓ₂ ℓ₃ ℓ₄ ℓ₅ : Level} (N : ℕ) (f : ℕ) (fta : N > 3 * f) (ClientRequest : Set ℓ₂) (Block : Set ℓ₃) (Vote : Set ℓ₄) (QC : Set ℓ₅) where -- Client can make a request at any moment {- 0 - Set node role LEADER || LEADER & FOLLOWER 1 - block = getPoolReq 2 - broadcast block || 3 - receive block || 4 - vote for block 5 - while (#votes < N-f-1) 6 - reveive vote 5 - broadcast QC || 7 - receive QC || 8 - check commit rule || 9 - movenextview -} -- QUESTION: -- To prove the liveness not only the sequence of honest leaders per view must be -- long enough but also the length of the requests must be greater than 3. -- If the sequence is smaller we don't have enough requests to ensure the commit rule -- A dishonest leader can deliberately left honest nodes behind, and these nodes -- won't move to the next view, unless they timeout. However, t if these nodes have -- moved for the next view for timeout, they will be missing a block and a qc -- in the RecordStore, how to fix this? -- 1 - Whisper of proposed blocks and Qc's -- 2 - Whisper only of QC's (if they have attached the proposed block) -- 3 - Mechanism of asking records missing in the record store ----------------------------------------------------------------------------- -- SPECIFICATION ----------------------------------------------------------------------------- NodeID = Fin N HonestID = Fin (N ∸ f) Instruction = Fin 10 Receiver = Fin N DishonestID : NodeID → Set DishonestID nId = N ∸ f ≤ toℕ nId data Message : Set (ℓ₃ ⊔ ℓ₄ ⊔ ℓ₅) where blockM : Block → Message voteM : Vote → Message qcM : QC → Message data Role : Set where leader : Role follower : Role record NodeState : Set (ℓ₁ ⊔ ℓ₃ ⊔ ℓ₄ ⊔ ℓ₅) where field nodeRole : Role currNodeView : ℕ msgBuffer : List Message readMessages : ℕ currProposal : Block votesforQC : List Vote control : Instruction -- id : Node --recordTree : RecordTree -- previousRound : ℕ -- lockedRound : ℕ -- clock : ℕ -- timeout : ℕ open NodeState record State : Set (ℓ₁ ⊔ ℓ₂ ⊔ ℓ₃ ⊔ ℓ₄ ⊔ ℓ₅) where field -- I am not sure that we don't need the faulty Node States -- because we may need to express that we have at least (N ∸ f) -- nodes on the same view and it may be that the f nodes behave normally nodeStates : Vec NodeState (N ∸ f) leaderPerView : Stream (Fin N) poolRequests : List ClientRequest committedReq : ℕ open State Honest? : Decidable ((_< N ∸ f) ∘ toℕ {N}) Honest? x = toℕ x <? N ∸ f Dishonest? : Decidable ((N ∸ f ≤_) ∘ toℕ {N}) Dishonest? x = N ∸ f ≤? toℕ x mkBlock : ClientRequest → NodeState → Block mkQC : NodeState → QC mkVote : NodeState → Vote validVote : State → HonestID → Vote → Set validBlock : State → HonestID → Block → Set validQC : State → HonestID → QC → Set ¬validMsg : State → HonestID → Message → Set data HonestEvent (nId : HonestID) : Set (ℓ₂ ⊔ ℓ₃ ⊔ ℓ₄ ⊔ ℓ₅) where setNodeRole : HonestEvent nId getPoolReq : ClientRequest → HonestEvent nId broadcastB : Block → HonestEvent nId broadcastQC : QC → HonestEvent nId wait : HonestEvent nId receive : Message → HonestEvent nId dropMsg : Message → HonestEvent nId sendVote : Vote → Receiver → HonestEvent nId commit : HonestEvent nId moveNextView : HonestEvent nId data DSEvent : Set (ℓ₂ ⊔ ℓ₃ ⊔ ℓ₄ ⊔ ℓ₅) where newRequest : ClientRequest → DSEvent -- A client add a request to the request pool honestEvent : ∀ {nId} → HonestEvent nId → DSEvent dishonestEvent : Message → HonestID → DSEvent -- dishonest nodes can send any msg to honest nodes nodeSt : HonestID → State → NodeState nodeSt nId st = Vec.lookup (nodeStates st) nId -- Other option is to have a flag in the NodeState saying if it's leader or follower isLeader : State → HonestID → Set isLeader st nId = nodeRole (nodeSt nId st) ≡ leader getLeader : State → HonestID → Fin N getLeader st nId = get (leaderPerView st) (currNodeView (nodeSt nId st)) {- Instruction is an abstraction for the number of intructions available for the node -} nextInstruction : State → HonestID → Instruction nextInstruction st nId = control (nodeSt nId st) data HonestEnabled (nId : HonestID) (st : State) : HonestEvent nId → Set (ℓ₂ ⊔ ℓ₃ ⊔ ℓ₄ ⊔ ℓ₅) where setRoleEn : nextInstruction st nId ≡ 0F → HonestEnabled nId st setNodeRole getReqEn : ∀ {req} → isLeader st nId → nextInstruction st nId ≡ 1F → (comm< : committedReq st < length (poolRequests st)) -- Maybe it's better to have a function: -- fetchNextReq : List ClientRequests → Maybe (Index , Request) → req ≡ lookup (poolRequests st) (fromℕ≤ comm<) → HonestEnabled nId st (getPoolReq req) broadcastBEn : isLeader st nId → nextInstruction st nId ≡ 2F → HonestEnabled nId st (broadcastB (currProposal (nodeSt nId st))) receiveBlockEn : ∀ {b : Block} → nextInstruction st nId ≡ 3F → (i : readMessages (nodeSt nId st) < length (msgBuffer (nodeSt nId st))) → blockM b ≡ lookup (msgBuffer (nodeSt nId st)) (fromℕ≤ i) → validBlock st nId b → HonestEnabled nId st (receive (blockM b)) voteBlockEn : nextInstruction st nId ≡ 4F → HonestEnabled nId st (sendVote (mkVote (nodeSt nId st)) (getLeader st nId)) waitVotesEn : isLeader st nId → nextInstruction st nId ≡ 5F → length (votesforQC (nodeSt nId st)) < N ∸ f ∸ 1 → HonestEnabled nId st wait receiveVoteEn : ∀ {v : Vote} → isLeader st nId → nextInstruction st nId ≡ 6F → (i : readMessages (nodeSt nId st) < length (msgBuffer (nodeSt nId st))) → voteM v ≡ lookup (msgBuffer (nodeSt nId st)) (fromℕ≤ i) → validVote st nId v → HonestEnabled nId st (receive (voteM v)) broadcastQCEn : isLeader st nId → nextInstruction st nId ≡ 5F → length (votesforQC (nodeSt nId st)) ≡ N ∸ f ∸ 1 → HonestEnabled nId st (broadcastQC (mkQC (nodeSt nId st))) receiveQCEn : ∀ {qc : QC} → nextInstruction st nId ≡ 7F → (i : readMessages (nodeSt nId st) < length (msgBuffer (nodeSt nId st))) → qcM qc ≡ lookup (msgBuffer (nodeSt nId st)) (fromℕ≤ i) → validQC st nId qc → HonestEnabled nId st (receive (qcM qc)) dropMsgEn : ∀ {msg} → (i : readMessages (nodeSt nId st) < length (msgBuffer (nodeSt nId st))) → msg ≡ lookup (msgBuffer (nodeSt nId st)) (fromℕ≤ i) → ¬validMsg st nId msg → HonestEnabled nId st (dropMsg msg) commitEn : nextInstruction st nId ≡ 8F -- TODO: check commit rule → HonestEnabled nId st commit moveNextViewEn : nextInstruction st nId ≡ 8F ⊎ DishonestID (getLeader st nId) → HonestEnabled nId st moveNextView data Enabled : DSEvent → State → Set (ℓ₂ ⊔ ℓ₃ ⊔ ℓ₄ ⊔ ℓ₅) where newReqEn : ∀ {st req} → Enabled (newRequest req) st honestEvEn : ∀ {st hId hEv} → HonestEnabled hId st hEv → Enabled (honestEvent hEv) st dishonestEvEn : ∀ {st dId msg hId} → DishonestID dId → Enabled (dishonestEvent msg hId) st -- Maybe I need to postulate that dishonest nodes cannot -- forge signatures (Node (N ∸ f)) sendMsgToNode : Message → NodeState → NodeState sendMsgToNode msg nodeSt = record nodeSt { msgBuffer = msgBuffer nodeSt ++ [ msg ] } broadcast : State → Message → Vec NodeState (N ∸ f) broadcast st msg = Vec.map (λ n → sendMsgToNode msg n) (nodeStates st) Action : ∀ {preState} {event} → Enabled event preState → State Action {ps} {newRequest req} x = record ps { poolRequests = poolRequests ps ++ [ req ] } Action {ps} {honestEvent {nId} setNodeRole} x with toℕ nId ≟ toℕ (getLeader ps nId) ... | yes p = let updateNode = λ old → record old { nodeRole = leader ; control = 1F } in record ps { nodeStates = Vec.updateAt nId updateNode (nodeStates ps) } ... | no ¬p = let updateNode = λ old → record old { nodeRole = follower ; control = 3F } in record ps { nodeStates = Vec.updateAt nId updateNode (nodeStates ps) } Action {ps} {honestEvent {nId} (getPoolReq req)} x = let updateNode = λ old → record old { control = 2F ; currProposal = mkBlock req old } in record ps { nodeStates = Vec.updateAt nId updateNode (nodeStates ps) } -- QUESTION: -- Not sure if it's a good approach to consider a broadcast atomically, -- or have a different state transition to send to each node Action {ps} {honestEvent {nId} (broadcastB b)} x = let sendToAll = broadcast ps (blockM b) updateLeader = λ old → record old { control = 3F } in record ps { nodeStates = Vec.updateAt nId updateLeader sendToAll } Action {ps} {honestEvent {nId} (receive (blockM b))} x -- TODO : update RecordTree = let updateNode = λ old → record old { readMessages = 1 + readMessages old ; currProposal = b ; control = 4F } in record ps { nodeStates = Vec.updateAt nId updateNode (nodeStates ps) } Action {ps} {honestEvent {nId} (sendVote v receiver)} x with toℕ receiver <? N ∸ f | nodeRole (nodeSt nId ps) -- If receiver is not honest → only updates the control variable of the sender ... | no ¬p | leader = let updateNode = λ old → record old { control = 5F } in record ps { nodeStates = Vec.updateAt nId updateNode (nodeStates ps) } ... | no ¬p | follower = let updateNode = λ old → record old { control = 7F } in record ps { nodeStates = Vec.updateAt nId updateNode (nodeStates ps) } -- If receiver is honest → update the message buffer of the receiver as well ... | yes p | leader = let updateReceiver = Vec.updateAt (fromℕ≤ p) (sendMsgToNode (voteM v)) (nodeStates ps) updateNode = λ old → record old { control = 5F } in record ps { nodeStates = Vec.updateAt nId updateNode updateReceiver } ... | yes p | follower = let updateReceiver = Vec.updateAt (fromℕ≤ p) (sendMsgToNode (voteM v)) (nodeStates ps) updateNode = λ old → record old { control = 7F } in record ps { nodeStates = Vec.updateAt nId updateNode updateReceiver } Action {ps} {honestEvent {nId} wait} x = let updateInst = λ old → record old { control = 6F } in record ps { nodeStates = Vec.updateAt nId updateInst (nodeStates ps) } Action {ps} {honestEvent {nId} (receive (voteM v))} x = let updateNode = λ old → record old { readMessages = 1 + readMessages old ; control = 5F ; votesforQC = v ∷ votesforQC old } in record ps { nodeStates = Vec.updateAt nId updateNode (nodeStates ps) } Action {ps} {honestEvent {nId} (broadcastQC q)} x = let sendToAll = broadcast ps (qcM q) updateLeader = λ old → record old { control = 7F } in record ps { nodeStates = Vec.updateAt nId updateLeader sendToAll } Action {ps} {honestEvent {nId} (receive (qcM qc))} x = let updateNode = λ old → record old { readMessages = 1 + readMessages old ; control = 8F } in record ps { nodeStates = Vec.updateAt nId updateNode (nodeStates ps) } Action {ps} {honestEvent {nId} (dropMsg msg)} x = let updateNode = λ old → record old { readMessages = 1 + readMessages old } in record ps { nodeStates = Vec.updateAt nId updateNode (nodeStates ps) } Action {ps} {honestEvent commit} x = {!!} Action {ps} {honestEvent {nId} moveNextView} x = let updateNode = λ old → record old { currNodeView = 1 + currNodeView old ; control = 0F } in record ps { nodeStates = Vec.updateAt nId updateNode (nodeStates ps) } Action {ps} {dishonestEvent msg hId} x = record ps { nodeStates = Vec.updateAt hId (sendMsgToNode msg) (nodeStates ps) } nodeᵢ : NodeState → Set (ℓ₃ ⊔ ℓ₄ ⊔ ℓ₅) nodeᵢ nSt = nodeRole nSt ≡ follower × currNodeView nSt ≡ 0 × msgBuffer nSt ≡ [] × readMessages nSt ≡ 0 × currProposal nSt ≡ {!!} × votesforQC nSt ≡ [] × control nSt ≡ 0F stateᵢ : State → Set (ℓ₁ ⊔ ℓ₂ ⊔ ℓ₃ ⊔ ℓ₄ ⊔ ℓ₅) stateᵢ st = poolRequests st ≡ [] × committedReq st ≡ 0 × All nodeᵢ (nodeStates st) -- instantiate leaderPerView or maybe it's not necessary MyStateMachine : StateMachine State DSEvent MyStateMachine = record { initial = stateᵢ ; enabled = Enabled ; action = Action } NodeEvSet : HonestID → EventSet {Event = DSEvent} NodeEvSet nId (newRequest x) = ⊥ NodeEvSet nId₁ (honestEvent {nId₂} x) = nId₁ ≡ nId₂ NodeEvSet nId (dishonestEvent x x₁) = ⊥ data MyWeakFairness : EventSet → Set (ℓ₂ ⊔ ℓ₃ ⊔ ℓ₄ ⊔ ℓ₅) where wf : (nId : HonestID) → MyWeakFairness (NodeEvSet nId) MySystem : System State DSEvent MySystem = record { stateMachine = MyStateMachine ; weakFairness = MyWeakFairness }
{ "alphanum_fraction": 0.5542987824, "avg_line_length": 35.6365638767, "ext": "agda", "hexsha": "65726282138d02715c71045c326f70bcb868b0fe", "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": "391e148f391dc2d246249193788a0d203285b38e", "max_forks_repo_licenses": [ "Apache-2.0" ], "max_forks_repo_name": "lisandrasilva/agda-liveness", "max_forks_repo_path": "src/DistributedSystem/Prototype.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "391e148f391dc2d246249193788a0d203285b38e", "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": "lisandrasilva/agda-liveness", "max_issues_repo_path": "src/DistributedSystem/Prototype.agda", "max_line_length": 101, "max_stars_count": null, "max_stars_repo_head_hexsha": "391e148f391dc2d246249193788a0d203285b38e", "max_stars_repo_licenses": [ "Apache-2.0" ], "max_stars_repo_name": "lisandrasilva/agda-liveness", "max_stars_repo_path": "src/DistributedSystem/Prototype.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 4473, "size": 16179 }
module Oscar.Class.Transitivity where open import Oscar.Level open import Oscar.Relation record Transitivity {a} {A : Set a} {ℓ} (_≤_ : A → A → Set ℓ) : Set (a ⊔ ℓ) where field transitivity : ∀ {x y} → x ≤ y → ∀ {z} → y ⟨ _≤ z ⟩→ x open Transitivity ⦃ … ⦄ public
{ "alphanum_fraction": 0.6117216117, "avg_line_length": 22.75, "ext": "agda", "hexsha": "5c4e33663fdd1430eb02ea9c3d830bf81921a547", "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/Class/Transitivity.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/Class/Transitivity.agda", "max_line_length": 81, "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/Class/Transitivity.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 104, "size": 273 }
open import Algebra using (CommutativeRing) module Algebra.Module.Vec.Recursive {r ℓ} {CR : CommutativeRing r ℓ} where open CommutativeRing CR open import Algebra.Module using (Module) open import Data.Vec.Recursive open import Data.Product using (_×_; _,_) open import Data.Product.Relation.Binary.Pointwise.NonDependent open import Relation.Binary using (Rel) open import Data.Nat using (zero; suc; ℕ) open import Data.Unit.Polymorphic using (⊤) open import Assume using (assume) _^ᴹ_ : ∀ {m ℓm} → Module CR m ℓm → ℕ → Module CR m ℓm M ^ᴹ n = record { Carrierᴹ = Carrierᴹ ^ n ; _≈ᴹ_ = pointwise _≈ᴹ_ ; _+ᴹ_ = zipWith _+ᴹ_ n ; _*ₗ_ = λ s → map (_*ₗ_ s) n ; _*ᵣ_ = λ v s → map (λ x → x *ᵣ s) n v ; 0ᴹ = replicate n 0ᴹ ; -ᴹ_ = map (-ᴹ_) n ; isModule = assume } where open Module M open import Data.Unit.Polymorphic pointwise : ∀ {a ℓ n} {A : Set a} (~ : Rel A ℓ) → Rel (A ^ n) ℓ pointwise {n = ℕ.zero} ~ .tt .tt = ⊤ pointwise {n = suc ℕ.zero} ~ x y = ~ x y pointwise {n = 2+ n} ~ (x , xs) (y , ys) = ~ x y × pointwise ~ xs ys
{ "alphanum_fraction": 0.6319702602, "avg_line_length": 29.8888888889, "ext": "agda", "hexsha": "eda478ef0947537d89959b3e05158913d11a22a8", "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": "a193aeebf1326f960975b19d3e31b46fddbbfaa2", "max_forks_repo_licenses": [ "CC0-1.0" ], "max_forks_repo_name": "cspollard/reals", "max_forks_repo_path": "src/Algebra/Module/Vec/Recursive.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "a193aeebf1326f960975b19d3e31b46fddbbfaa2", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "CC0-1.0" ], "max_issues_repo_name": "cspollard/reals", "max_issues_repo_path": "src/Algebra/Module/Vec/Recursive.agda", "max_line_length": 74, "max_stars_count": null, "max_stars_repo_head_hexsha": "a193aeebf1326f960975b19d3e31b46fddbbfaa2", "max_stars_repo_licenses": [ "CC0-1.0" ], "max_stars_repo_name": "cspollard/reals", "max_stars_repo_path": "src/Algebra/Module/Vec/Recursive.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 425, "size": 1076 }
open import Relation.Binary.PropositionalEquality using (_≡_; refl) open import Data.Unit using (⊤; tt) open import Agda.Builtin.FromNat using (Number) module AKS.Test where open import AKS.Nat using () open import AKS.Rational using (show-ℚ) open import AKS.Rational.Properties using (+-*-/-decField) open import AKS.Polynomial.Base +-*-/-decField open import AKS.Polynomial.Properties +-*-/-decField ex : Polynomial ex = 1ᵖ +ᵖ 𝑋^ 1 +ᵖ 𝑋^ 2 ex-unit₁ : show-Polynomial show-ℚ ex ≡ "1 + 1 * X^1 + 1 * X^2" ex-unit₁ = refl ex-unit₂ : show-Polynomial show-ℚ (ex *ᵖ ex) ≡ "1 + 2 * X^1 + 3 * X^2 + 2 * X^3 + 1 * X^4" ex-unit₂ = refl ex₂ : Polynomial ex₂ = 𝑋^ 2 -ᵖ 1ᵖ open Euclidean open import AKS.Unsafe using (TODO) test = show-Polynomial show-ℚ (q (divMod ex₂ (𝑋 -ᵖ 1ᵖ) {TODO})) -- open import AKS.Modular.Quotient using (ℤ/[_]; _+_; _*_; _/_; _⁻¹) -- open import AKS.Primality using (Prime; Prime✓) -- open import AKS.Unsafe using (TODO) -- 11-prime : Prime -- 11-prime = Prime✓ 11 TODO -- test : ℤ/[ 11-prime ] -- test = 3 * (3 ⁻¹) {TODO}
{ "alphanum_fraction": 0.6631779258, "avg_line_length": 26.275, "ext": "agda", "hexsha": "68787379191202e3b3168e0191b60b9e11d9ff47", "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": "ddad4c0d5f384a0219b2177461a68dae06952dde", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "mckeankylej/thesis", "max_forks_repo_path": "proofs/AKS/Test.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "ddad4c0d5f384a0219b2177461a68dae06952dde", "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": "mckeankylej/thesis", "max_issues_repo_path": "proofs/AKS/Test.agda", "max_line_length": 90, "max_stars_count": 1, "max_stars_repo_head_hexsha": "ddad4c0d5f384a0219b2177461a68dae06952dde", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "mckeankylej/thesis", "max_stars_repo_path": "proofs/AKS/Test.agda", "max_stars_repo_stars_event_max_datetime": "2020-12-01T22:38:27.000Z", "max_stars_repo_stars_event_min_datetime": "2020-12-01T22:38:27.000Z", "num_tokens": 409, "size": 1051 }
module Structure.Operator.Names where open import Functional.Dependent open import Function.Names import Lvl open import Logic open import Logic.Propositional open import Logic.Predicate open import Structure.Function.Names open import Structure.Setoid open import Syntax.Function open import Syntax.Transitivity open import Type private variable ℓ ℓₑ ℓ₁ ℓ₂ ℓ₃ ℓᵣ₂ ℓᵣ₃ ℓᵣ ℓₑ₁ ℓₑ₂ ℓₑ₃ ℓₑᵣ : Lvl.Level module _ {T₁ : Type{ℓ₁}} {T₂ : Type{ℓ₂}} ⦃ _ : Equiv{ℓₑ₂}(T₂) ⦄ where -- Definition of commutativity of specific elements. -- The binary operation swapped yields the same result. -- Example: For any x, (x ▫ x) always commutes. Commuting : (T₁ → T₁ → T₂) → T₁ → T₁ → Stmt Commuting(_▫_) = pointwise₂,₂(_≡_) (_▫_) (swap(_▫_)) -- Definition of commutativity. -- Order of application for the operation does not matter for equality. -- Example: Addition of the natural numbers (_+_ : ℕ → ℕ → ℕ). Commutativity : (T₁ → T₁ → T₂) → Stmt Commutativity = ∀² ∘ Commuting -- Definition of an left identity element. -- Example: Top implies a proposition in boolean logic (⊤ →_). Identityₗ : (T₁ → T₂ → T₂) → T₁ → Stmt Identityₗ (_▫_) id = ∀{x : T₂} → (id ▫ x) ≡ x -- Definition of a right absorber element -- Also called "right neutral element" or "right annihilator" -- Applying the operation on this element to the right always yields itself. -- Example: A proposition implies top in boolean logic (_→ ⊤). Absorberᵣ : (T₁ → T₂ → T₂) → T₂ → Stmt Absorberᵣ (_▫_) null = ∀{x : T₁} → (x ▫ null) ≡ null ConverseAbsorberᵣ : (T₁ → T₂ → T₂) → T₂ → Stmt ConverseAbsorberᵣ (_▫_)(a) = ∀{x y} → (x ▫ y ≡ a) → (y ≡ a) module _ {T₁ : Type{ℓ₁}} ⦃ _ : Equiv{ℓₑ₁}(T₁) ⦄ {T₂ : Type{ℓ₂}} where -- Definition of an right identity element -- Example: Subtracting 0 for integers (_− 0). Identityᵣ : (T₁ → T₂ → T₁) → T₂ → Stmt Identityᵣ(_▫_) id = Identityₗ(swap(_▫_)) id -- Definition of a left absorber element -- Also called "left neutral element" or "left annihilator" -- Example: Subtraction (monus) of 0 for natural numbers (0 − ). Absorberₗ : (T₁ → T₂ → T₁) → T₁ → Stmt Absorberₗ(_▫_) null = Absorberᵣ(swap(_▫_)) null ConverseAbsorberₗ : (T₁ → T₂ → T₁) → T₁ → Stmt ConverseAbsorberₗ (_▫_)(a) = ∀{x y} → (x ▫ y ≡ a) → (x ≡ a) module _ {T : Type{ℓ}} ⦃ _ : Equiv{ℓₑ}(T) ⦄ where -- Definition of an identity element -- Example: 0 for addition of integers, 1 for multiplication of integers. Identity : (T → T → T) → T → Stmt Identity (_▫_) id = (Identityₗ (_▫_) id) ∧ (Identityᵣ (_▫_) id) -- Definition of idempotence. Idempotence : (T → T → T) → Stmt Idempotence (_▫_) = ∀{x : T} → (x ▫ x ≡ x) -- Example: 0 for addition of natural numbers, 1 for multiplication of natural numbers. ConverseAbsorber : (T → T → T) → T → Stmt ConverseAbsorber (_▫_)(a) = ∀{x y} → (x ▫ y ≡ a) → (x ≡ a)∧(y ≡ a) -- Example: 0 for multiplication of natural numbers. WeakConverseAbsorber : (T → T → T) → T → Stmt WeakConverseAbsorber (_▫_)(a) = ∀{x y} → (x ▫ y ≡ a) → (x ≡ a)∨(y ≡ a) module _ {T₊ : Type{ℓ₁}} {T₋ : Type{ℓ₂}} {Tᵣ : Type{ℓ₃}} ⦃ _ : Equiv{ℓₑᵣ}(Tᵣ) ⦄ where -- Definition of a left inverse element. InverseElementₗ : (T₋ → T₊ → Tᵣ) → Tᵣ → T₊ → T₋ → Stmt InverseElementₗ (_▫_) id x x⁻¹ = ((x⁻¹ ▫ x) ≡ id) -- Definition of a right inverse element InverseElementᵣ : (T₊ → T₋ → Tᵣ) → Tᵣ → T₊ → T₋ → Stmt InverseElementᵣ (_▫_) id x x⁻¹ = ((x ▫ x⁻¹) ≡ id) -- Definition of a left inverse function InverseFunctionₗ : (T₋ → T₊ → Tᵣ) → Tᵣ → (T₊ → T₋) → Stmt InverseFunctionₗ (_▫_) id inv = ∀{x : T₊} → InverseElementₗ(_▫_) id x (inv x) -- Definition of a right inverse function InverseFunctionᵣ : (T₊ → T₋ → Tᵣ) → Tᵣ → (T₊ → T₋) → Stmt InverseFunctionᵣ (_▫_) id inv = ∀{x : T₊} → InverseElementᵣ(_▫_) id x (inv x) module _ {T : Type{ℓ₁}} {Tᵣ : Type{ℓ₂}} ⦃ _ : Equiv{ℓₑᵣ}(Tᵣ) ⦄ where -- Definition of an invertible element InverseElement : (T → T → Tᵣ) → Tᵣ → T → T → Stmt InverseElement (_▫_) id x x⁻¹ = (InverseElementₗ(_▫_) id x x⁻¹) ∧ (InverseElementᵣ(_▫_) id x x⁻¹) -- Definition of a function which returns the inverse element of the other side of the operation InverseFunction : (T → T → Tᵣ) → Tᵣ → (T → T) → Stmt InverseFunction (_▫_) id inv = (InverseFunctionₗ (_▫_) id inv) ∧ (InverseFunctionᵣ (_▫_) id inv) module _ {T₁ : Type{ℓ₁}} {T₂ : Type{ℓ₂}} ⦃ _ : Equiv{ℓₑ₂}(T₂) ⦄ {T₃ : Type{ℓ₃}} ⦃ _ : Equiv{ℓₑ₃}(T₃) ⦄ where -- Definition of right cancellation of a specific object -- ∀{a b : T₂} → ((x ▫ a) ≡ (x ▫ b)) → (a ≡ b) CancellationOnₗ : (T₁ → T₂ → T₃) → T₁ → Stmt CancellationOnₗ (_▫_) (x) = Injective(x ▫_) -- Definition of left cancellation (Injectivity for the right param) -- ∀{x : T₁}{a b : T₂} → ((x ▫ a) ≡ (x ▫ b)) → (a ≡ b) Cancellationₗ : (T₁ → T₂ → T₃) → Stmt Cancellationₗ (_▫_) = (∀{x : T₁} → CancellationOnₗ(_▫_)(x)) module _ {T₁ : Type{ℓ₁}} ⦃ _ : Equiv{ℓₑ₁}(T₁) ⦄ {T₂ : Type{ℓ₂}} {T₃ : Type{ℓ₃}} ⦃ _ : Equiv{ℓₑ₃}(T₃) ⦄ where -- Definition of right cancellation of a specific object -- ∀{a b : T₁} → ((a ▫ x) ≡ (b ▫ x)) → (a ≡ b) CancellationOnᵣ : (T₁ → T₂ → T₃) → T₂ → Stmt CancellationOnᵣ (_▫_) (x) = Injective(_▫ x) -- Definition of right cancellation (Injectivity for the left param) -- ∀{x : T₂}{a b : T₁} → ((a ▫ x) ≡ (b ▫ x)) → (a ≡ b) Cancellationᵣ : (T₁ → T₂ → T₃) → Stmt Cancellationᵣ (_▫_) = (∀{x : T₂} → CancellationOnᵣ (_▫_)(x)) module _ {T₁ : Type{ℓ₁}} {T₂ : Type{ℓ₂}} {T₃ : Type{ℓ₃}} ⦃ _ : Equiv{ℓₑ₂}(T₂) ⦄ where -- Definition of the left inverse property InverseOperatorOnₗ : (T₁ → T₂ → T₃) → (T₁ → T₃ → T₂) → T₁ → T₂ → Stmt InverseOperatorOnₗ (_▫₁_) (_▫₂_) x y = (x ▫₂ (x ▫₁ y) ≡ y) InverseOperatorₗ : (T₁ → T₂ → T₃) → (T₁ → T₃ → T₂) → Stmt InverseOperatorₗ (_▫₁_)(_▫₂_) = ∀{x y} → InverseOperatorOnₗ(_▫₁_)(_▫₂_) x y module _ {T₁ : Type{ℓ₁}} {T₂ : Type{ℓ₂}} {T₃ : Type{ℓ₃}} ⦃ _ : Equiv{ℓₑ₁}(T₁) ⦄ where -- Definition of the right inverse property InverseOperatorOnᵣ : (T₁ → T₂ → T₃) → (T₃ → T₂ → T₁) → T₁ → T₂ → Stmt InverseOperatorOnᵣ (_▫₁_) (_▫₂_) x y = ((x ▫₁ y) ▫₂ y ≡ x) InverseOperatorᵣ : (T₁ → T₂ → T₃) → (T₃ → T₂ → T₁) → Stmt InverseOperatorᵣ (_▫₁_)(_▫₂_) = ∀{x y} → InverseOperatorOnᵣ(_▫₁_)(_▫₂_) x y module _ {T₁ : Type{ℓ₁}} {T₂ : Type{ℓ₂}} ⦃ _ : Equiv{ℓₑ₂}(T₂) ⦄ where InversePropertyₗ : (T₁ → T₂ → T₂) → (T₁ → T₁) → Stmt InversePropertyₗ (_▫_) inv = InverseOperatorₗ(_▫_)(a ↦ b ↦ inv(a) ▫ b) InversePropertyᵣ : (T₂ → T₁ → T₂) → (T₁ → T₁) → Stmt InversePropertyᵣ (_▫_) inv = InverseOperatorᵣ(_▫_)(a ↦ b ↦ a ▫ inv(b)) --------------------------------------------------------- -- Patterns module _ {T₁ : Type{ℓ₁}}{T₂ : Type{ℓ₂}}{T₃ : Type{ℓ₃}}{Tᵣ₂ : Type{ℓᵣ₂}}{Tᵣ₃ : Type{ℓᵣ₃}}{Tᵣ : Type{ℓᵣ}} ⦃ _ : Equiv{ℓₑᵣ}(Tᵣ) ⦄ where AssociativityPattern : (T₁ → T₂ → Tᵣ₃) → (Tᵣ₃ → T₃ → Tᵣ) → (T₁ → Tᵣ₂ → Tᵣ) → (T₂ → T₃ → Tᵣ₂)→ Stmt AssociativityPattern (_▫₁_) (_▫₂_) (_▫₃_) (_▫₄_) = ∀{x : T₁}{y : T₂}{z : T₃} → ((x ▫₁ y) ▫₂ z) ≡ (x ▫₃ (y ▫₄ z)) module _ {T₁ : Type{ℓ₁}} {T₂ : Type{ℓ₂}} {T₃ : Type{ℓ₃}} ⦃ _ : Equiv{ℓₑ₃}(T₃) ⦄ where DistributivityPatternₗ : (T₁ → T₂ → T₃) → (T₂ → T₂ → T₂) → (T₃ → T₃ → T₃) → Stmt DistributivityPatternₗ (_▫₁_) (_▫₂_) (_▫₃_) = ∀{x : T₁} {y z : T₂} → (x ▫₁ (y ▫₂ z)) ≡ ((x ▫₁ y) ▫₃ (x ▫₁ z)) DistributivityPatternᵣ : (T₁ → T₂ → T₃) → (T₁ → T₁ → T₁) → (T₃ → T₃ → T₃) → Stmt DistributivityPatternᵣ (_▫₁_) (_▫₂_) (_▫₃_) = ∀{x y : T₁} {z : T₂} → ((x ▫₂ y) ▫₁ z) ≡ ((x ▫₁ z) ▫₃ (y ▫₁ z)) --------------------------------------------------------- -- Derived module _ {T : Type{ℓ}} ⦃ _ : Equiv{ℓₑ}(T) ⦄ where -- Definition of associativity for a binary operation Associativity : (T → T → T) → Stmt Associativity (_▫_) = AssociativityPattern (_▫_) (_▫_) (_▫_) (_▫_) -- {x y z : T} → ((x ▫ y) ▫ z) ≡ (x ▫ (y ▫ z)) module _ {T₁ : Type{ℓ₁}} {T₂ : Type{ℓ₂}} ⦃ _ : Equiv{ℓₑ₂}(T₂) ⦄ where -- Definition of compatibility for a binary operation Compatibility : (T₁ → T₁ → T₁) → (T₁ → T₂ → T₂) → Stmt -- TODO: https://en.wikipedia.org/wiki/Semigroup_action Compatibility (_▫₁_) (_▫₂_) = AssociativityPattern (_▫₁_) (_▫₂_) (_▫₂_) (_▫₂_) -- {x₁ x₂ : T₁}{y : T₂} → ((x₁ ▫₁ x₂) ▫₂ y) ≡ (x₁ ▫₂ (x₂ ▫₂ y)) -- Definition of left distributivity for a binary operation Distributivityₗ : (T₁ → T₂ → T₂) → (T₂ → T₂ → T₂) → Stmt Distributivityₗ (_▫₁_) (_▫₂_) = DistributivityPatternₗ (_▫₁_) (_▫₂_) (_▫₂_) -- ∀{x : T₁} {y z : T₂} → (x ▫₁ (y ▫₂ z)) ≡ (x ▫₁ y) ▫₂ (x ▫₁ z) -- Definition of right distributivity for a binary operation Distributivityᵣ : (T₂ → T₁ → T₂) → (T₂ → T₂ → T₂) → Stmt Distributivityᵣ (_▫₁_) (_▫₂_) = DistributivityPatternᵣ (_▫₁_) (_▫₂_) (_▫₂_) -- ∀{x y : T₂} {z : T₁} → ((x ▫₂ y) ▫₁ z) ≡ (x ▫₁ z) ▫₂ (y ▫₁ z) module _ {T₁ : Type{ℓ₁}} {T₂ : Type{ℓ₂}} {T₃ : Type{ℓ₃}} ⦃ _ : Equiv{ℓₑ₁}(T₁) ⦄ where -- Definition of left absorption for two binary operators Absorptionₗ : (T₁ → T₃ → T₁) → (T₁ → T₂ → T₃) → Stmt Absorptionₗ (_▫₁_)(_▫₂_) = ∀{x : T₁}{y : T₂} → (x ▫₁ (x ▫₂ y) ≡ x) module _ {T₁ : Type{ℓ₁}} {T₂ : Type{ℓ₂}} {T₃ : Type{ℓ₃}} ⦃ _ : Equiv{ℓₑ₂}(T₂) ⦄ where -- Definition of right absorption for two binary operators Absorptionᵣ : (T₃ → T₂ → T₂) → (T₁ → T₂ → T₃) → Stmt Absorptionᵣ (_▫₁_)(_▫₂_) = ∀{x : T₁}{y : T₂} → ((x ▫₂ y) ▫₁ y ≡ y) --------------------------------------------------------- -- Functions (TODO: Move to Structure.Operator.Proofs) {- open import Relator.Equals{ℓ₁}{ℓ₂} open import Relator.Equals.Proofs{ℓ₁}{ℓ₂} -- Returns a commuted LHS of an equality commuteₗ : ∀{T}{_▫_}{x y z} → ⦃ _ : Commutativity {T} {T} (_▫_) ⦄ → ((x ▫ y) ≡ z) → ((y ▫ x) ≡ z) commuteₗ ⦃ comm ⦄ stmt = comm 🝖 stmt -- Returns a commuted RHS of an equality commuteᵣ : ∀{T}{_▫_}{x y z} → ⦃ _ : Commutativity {T} {T} (_▫_) ⦄ → (z ≡ (x ▫ y)) → (z ≡ (y ▫ x)) commuteᵣ ⦃ comm ⦄ stmt = stmt 🝖 comm commuteBoth : ∀{T₁ T₂}{_▫_}{a₁ a₂ b₁ b₂} → Commutativity{T₁}{T₂}(_▫_) → (a₁ ▫ a₂ ≡ b₁ ▫ b₂) → (a₂ ▫ a₁ ≡ b₂ ▫ b₁) commuteBoth {_}{_} {a₁} {a₂} {b₁} {b₂} commutativity (a₁▫a₂≡b₁▫b₂) = (symmetry ⦃ [≡]-symmetry ⦄ (commutativity {a₁} {a₂})) 🝖' (a₁▫a₂≡b₁▫b₂) 🝖' (commutativity {b₁} {b₂}) where _🝖'_ = _🝖_ ⦃ [≡]-transitivity ⦄ infixl 1000 _🝖'_ -}
{ "alphanum_fraction": 0.5766696174, "avg_line_length": 45.3883928571, "ext": "agda", "hexsha": "1bd287c63f25bc032e51f34dae6ba4fe8dd8e406", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "70f4fba849f2fd779c5aaa5af122ccb6a5b271ba", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "Lolirofle/stuff-in-agda", "max_forks_repo_path": "Structure/Operator/Names.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "70f4fba849f2fd779c5aaa5af122ccb6a5b271ba", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "Lolirofle/stuff-in-agda", "max_issues_repo_path": "Structure/Operator/Names.agda", "max_line_length": 132, "max_stars_count": 6, "max_stars_repo_head_hexsha": "70f4fba849f2fd779c5aaa5af122ccb6a5b271ba", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "Lolirofle/stuff-in-agda", "max_stars_repo_path": "Structure/Operator/Names.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": 4786, "size": 10167 }
postulate F G : (Set → Set) → Set !_ : Set → Set infix 2 F infix 1 !_ syntax F (λ X → Y) = X , Y syntax G (λ X → Y) = Y , X -- This parsed when default fixity was 'unrelated', but with -- an actual default fixity (of any strength) in place it really -- should not. Foo : Set Foo = ! X , X
{ "alphanum_fraction": 0.6060606061, "avg_line_length": 18.5625, "ext": "agda", "hexsha": "cff7b997da643d74cb9a8c3dc029e0c3bcd4ac45", "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/Issue1436-9.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/Issue1436-9.agda", "max_line_length": 64, "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/Issue1436-9.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": 107, "size": 297 }
data D : Set where record R : Set where constructor d field x : D record R′ : Set where coinductive constructor d field r : R′ f : R → D f r = let d x = r in x
{ "alphanum_fraction": 0.612716763, "avg_line_length": 12.3571428571, "ext": "agda", "hexsha": "e9580003edd5ea43de44b6ce4f1850e6e69de04e", "lang": "Agda", "max_forks_count": 1, "max_forks_repo_forks_event_max_datetime": "2019-03-05T20:02:38.000Z", "max_forks_repo_forks_event_min_datetime": "2019-03-05T20:02:38.000Z", "max_forks_repo_head_hexsha": "231d6ad8e77b67ff8c4b1cb35a6c31ccd988c3e9", "max_forks_repo_licenses": [ "BSD-3-Clause" ], "max_forks_repo_name": "Agda-zh/agda", "max_forks_repo_path": "test/interaction/Issue1064.agda", "max_issues_count": 3, "max_issues_repo_head_hexsha": "ed8ac6f4062ea8a20fa0f62d5db82d4e68278338", "max_issues_repo_issues_event_max_datetime": "2019-04-01T19:39:26.000Z", "max_issues_repo_issues_event_min_datetime": "2018-11-14T15:31:44.000Z", "max_issues_repo_licenses": [ "BSD-3-Clause" ], "max_issues_repo_name": "shlevy/agda", "max_issues_repo_path": "test/interaction/Issue1064.agda", "max_line_length": 22, "max_stars_count": 3, "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/Issue1064.agda", "max_stars_repo_stars_event_max_datetime": "2015-12-07T20:14:00.000Z", "max_stars_repo_stars_event_min_datetime": "2015-03-28T14:51:03.000Z", "num_tokens": 62, "size": 173 }
{-# OPTIONS --cubical-compatible #-} module Common.Float where open import Agda.Builtin.Float public open import Common.String floatToString : Float -> String floatToString = primShowFloat
{ "alphanum_fraction": 0.78125, "avg_line_length": 21.3333333333, "ext": "agda", "hexsha": "b4fca8d43868ea2625abf43ab88164f0731d088d", "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/Common/Float.agda", "max_issues_count": 6, "max_issues_repo_head_hexsha": "98c9382a59f707c2c97d75919e389fc2a783ac75", "max_issues_repo_issues_event_max_datetime": "2021-11-24T08:31:10.000Z", "max_issues_repo_issues_event_min_datetime": "2021-10-18T08:12:24.000Z", "max_issues_repo_licenses": [ "BSD-2-Clause" ], "max_issues_repo_name": "KDr2/agda", "max_issues_repo_path": "test/Common/Float.agda", "max_line_length": 37, "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/Common/Float.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 42, "size": 192 }
{-# OPTIONS --no-universe-polymorphism #-} open import Data.Product hiding (map) open import Relation.Binary.Core hiding (Total) open import Relation.Nullary open import Data.Nat import Level as L using (zero) open import Data.List open import Data.Unit using (⊤) open import Data.Empty open import DivideEtImpera open import Equivalence open import BagEquality open import Lists module Quicksort where splitWith : {A : Set} {P Q : A → Set} → (∀ x → P x ⊕ Q x) → List A → List A × List A splitWith _ [] = ([] , []) splitWith decPQ (x ∷ xs) with (decPQ x) splitWith decPQ (x ∷ xs) | (inj₁ _) = (x ∷ (proj₁ res), proj₂ res) where res = splitWith decPQ xs splitWith decPQ (x ∷ xs) | (inj₂ _) = (proj₁ res , x ∷ (proj₂ res)) where res = splitWith decPQ xs splitWithProp1 : {A : Set} {P Q : A → Set} → (decPQ : ∀ x → P x ⊕ Q x) → (xs : List A) → (z : A) → z ∈ proj₁ (splitWith decPQ xs) → P z splitWithProp1 decPQ [] z zIn1 = ⊥-elim zIn1 splitWithProp1 decPQ (x ∷ xs) z zIn with (decPQ x) splitWithProp1 decPQ (x ∷ xs) .x (inj₁ refl) | (inj₁ pfP) = pfP splitWithProp1 decPQ (x ∷ xs) z (inj₂ zIn) | (inj₁ _ ) = splitWithProp1 decPQ xs z zIn splitWithProp1 decPQ (x ∷ xs) z zIn | (inj₂ _ ) = splitWithProp1 decPQ xs z zIn splitWithProp2 : {A : Set} {P Q : A → Set} → (decPQ : ∀ x → P x ⊕ Q x) → (xs : List A) → (z : A) → z ∈ proj₂ (splitWith decPQ xs) → Q z splitWithProp2 decPQ [] z zIn1 = ⊥-elim zIn1 splitWithProp2 decPQ (x ∷ xs) z zIn with (decPQ x) splitWithProp2 decPQ (x ∷ xs) .x (inj₁ refl) | (inj₂ pfQ) = pfQ splitWithProp2 decPQ (x ∷ xs) z (inj₂ zIn) | (inj₂ _ ) = splitWithProp2 decPQ xs z zIn splitWithProp2 decPQ (x ∷ xs) z zIn | (inj₁ _ ) = splitWithProp2 decPQ xs z zIn ×-join : {A B C : Set} → (pair : A × B) → (op : A → B → C) → C ×-join (a , b) op = op a b splitWith-cong : {A : Set} {P Q : A → Set} → (decPQ : ∀ x → P x ⊕ Q x) → (xs : List A) → (proj₁ (splitWith decPQ xs)) ++ (proj₂ (splitWith decPQ xs)) ≈ xs splitWith-cong _ [] z = ⊥ □↔ splitWith-cong decPQ (x ∷ xs) z with (decPQ x) splitWith-cong decPQ (x ∷ xs) z | (inj₁ _) = let (res1 , res2) = splitWith decPQ xs in (z ≡ x) ⊕ Any (z ≡_) (res1 ++ res2) ↔⟨ ⊕-cong ((z ≡ x) □↔) (splitWith-cong decPQ xs z) ⟩ (z ≡ x) ⊕ Any (z ≡_) xs □↔ splitWith-cong decPQ (x ∷ xs) z | (inj₂ _) = let (res1 , res2) = splitWith decPQ xs in Any (z ≡_) (res1 ++ x ∷ res2) ↔⟨ ++-comm res1 (x ∷ res2) z ⟩ (z ≡ x) ⊕ Any (z ≡_) (res2 ++ res1) ↔⟨ ⊕-cong ((z ≡ x) □↔) (++-comm res2 res1 z) ⟩ (z ≡ x) ⊕ Any (z ≡_) (res1 ++ res2) ↔⟨ ⊕-cong ((z ≡ x) □↔) (splitWith-cong decPQ xs z) ⟩ (z ≡ x) ⊕ Any (z ≡_) xs □↔ ≤′-suc : {n m : ℕ} → n ≤′ m → suc n ≤′ suc m ≤′-suc ≤′-refl = ≤′-refl ≤′-suc (≤′-step pf) = ≤′-step (≤′-suc pf) splitWith-length1 : {A : Set} {P Q : A → Set} → (decPQ : ∀ x → P x ⊕ Q x) → (xs : List A) → length (proj₁ (splitWith decPQ xs)) ≤′ length xs splitWith-length1 _ [] = ≤′-refl splitWith-length1 decPQ (x ∷ xs) with (decPQ x) splitWith-length1 decPQ (x ∷ xs) | (inj₁ _) = ≤′-suc (splitWith-length1 decPQ xs) splitWith-length1 decPQ (x ∷ xs) | (inj₂ _) = ≤′-step (splitWith-length1 decPQ xs) splitWith-length2 : {A : Set} {P Q : A → Set} → (decPQ : ∀ x → P x ⊕ Q x) → (xs : List A) → length (proj₂ (splitWith decPQ xs)) ≤′ length xs splitWith-length2 _ [] = ≤′-refl splitWith-length2 decPQ (x ∷ xs) with (decPQ x) splitWith-length2 decPQ (x ∷ xs) | (inj₁ _) = ≤′-step (splitWith-length2 decPQ xs) splitWith-length2 decPQ (x ∷ xs) | (inj₂ _) = ≤′-suc (splitWith-length2 decPQ xs) qs-DecompCond : {A : Set} → Rel A L.zero → List A → (A × List A × List A) → Set qs-DecompCond LEQ xs (piv , ys , zs) = (piv ∷ (ys ++ zs) ≈ xs) × (∀ y → y ∈ ys → LEQ y piv) × (∀ z → z ∈ zs → LEQ piv z) qs-InputCond : {A : Set} → List A → Set qs-InputCond x = ⊤ qs-OutputCond : {A : Set} → Rel A L.zero → List A → List A → Set qs-OutputCond LEQ xs ys = ys ≈ xs × Ordered LEQ ys qs-G-InputCond : {A : Set} → A → Set qs-G-InputCond x = ⊤ qs-G-OutputCond : {A : Set} → A → A → Set qs-G-OutputCond x y = x ≡ y qs-CompCond : {A : Set} → (A × List A × List A) → List A → Set qs-CompCond (piv , xs , ys) zs = xs ++ piv ∷ ys ≡ zs qs-InductionLemma : {A : Set} → (LEQ : Rel A L.zero) → ∀{x₀ x₁ x₂ x₃ z₀ z₁ z₂ z₃} → qs-DecompCond LEQ x₀ (x₁ , x₂ , x₃ ) → qs-G-OutputCond x₁ z₁ → qs-OutputCond LEQ x₂ z₂ → qs-OutputCond LEQ x₃ z₃ → qs-CompCond (z₁ , z₂ , z₃) z₀ → qs-OutputCond LEQ x₀ z₀ qs-InductionLemma LEQ {xs} {piv} {ys₁} {ys₂} {ws} {.piv} {zs₁} {zs₂} (piv∷ys₁++ys₂≈xs , ltPiv , gtPiv) refl (zs₁≈ys₁ , ord₁) (zs₂≈ys₂ , ord₂) refl = (λ x → x ∈ (zs₁ ++ piv ∷ zs₂) ↔⟨ ++-comm zs₁ (piv ∷ zs₂) x ⟩ (x ∈ ((piv ∷ zs₂) ++ zs₁)) ↔⟨ Any-++ (λ z → x ≡ z) (piv ∷ zs₂) zs₁ ⟩ ((x ≡ piv) ⊕ x ∈ zs₂) ⊕ x ∈ zs₁ ↔⟨ ↔sym ⊕-assoc ⟩ (x ≡ piv) ⊕ (x ∈ zs₂ ⊕ x ∈ zs₁) ↔⟨ ⊕-cong ((x ≡ piv) □↔) (⊕-cong (zs₂≈ys₂ x) (zs₁≈ys₁ x)) ⟩ (x ≡ piv) ⊕ (x ∈ ys₂ ⊕ x ∈ ys₁) ↔⟨ ⊕-cong ((x ≡ piv) □↔) ⊕-comm ⟩ (x ≡ piv) ⊕ (x ∈ ys₁ ⊕ x ∈ ys₂) ↔⟨ ⊕-cong ((x ≡ piv) □↔) (↔sym (Any-++ (λ z → x ≡ z) ys₁ ys₂)) ⟩ x ∈ (piv ∷ (ys₁ ++ ys₂)) ↔⟨ piv∷ys₁++ys₂≈xs x ⟩ x ∈ xs □↔) , ++-Order-cong (λ x x∈zs₁ → ltPiv x (_↔_.to (zs₁≈ys₁ x) x∈zs₁)) ord₁ (cons-Order-cong (λ x x∈zs₂ → gtPiv x (_↔_.to (zs₂≈ys₂ x) x∈zs₂)) ord₂) qs-Decomp : {A : Set} → {LEQ : Rel A L.zero} → Total LEQ → (xs : List A) → ⊤ → ¬ ListPrimitive xs → Σ (A × List A × List A) λ y → qs-G-InputCond (proj₁ y) × (qs-InputCond (proj₁ (proj₂ y))) × (qs-InputCond (proj₂ (proj₂ y))) × ((proj₁ (proj₂ y)) <l xs) × ((proj₂ (proj₂ y)) <l xs) × (qs-DecompCond LEQ xs y) qs-Decomp total [] _ notPrim = ⊥-elim (notPrim (NilIsPrim)) qs-Decomp total (x ∷ xs) _ _ = ( x , splitWith (λ y → total y x) xs) , (⊤.tt , ⊤.tt , ⊤.tt , ≤′-suc (splitWith-length1 (λ y → total y x) xs) , ≤′-suc (splitWith-length2 (λ y → total y x) xs) , ((λ z → (z ≡ x) ⊕ z ∈ (proj₁ (splitWith (λ y → total y x) xs) ++ proj₂ (splitWith (λ y → total y x) xs)) ↔⟨ ⊕-cong ((z ≡ x) □↔) (splitWith-cong (λ y → total y x) xs z) ⟩ (z ≡ x) ⊕ z ∈ xs □↔) , splitWithProp1 (λ y → total y x) xs , splitWithProp2 (λ y → total y x) xs)) qs-G : {A : Set} → (x : A) → ⊤ → Σ A (qs-G-OutputCond x) qs-G x _ = (x , refl) qs-Comp : {A : Set} → (y : A × (List A × List A)) → Σ (List A) (qs-CompCond y) qs-Comp (piv , xs , ys) = (xs ++ piv ∷ ys , refl) qs-DirSolve : {A : Set} → (LEQ : Rel A L.zero) → (xs : List A) → ⊤ → ListPrimitive xs → Σ (List A) (qs-OutputCond LEQ xs) qs-DirSolve _ [] _ _ = ([] , (λ z → z ∈ [] □↔) , NilIsOrd) qs-DirSolve _ (_ ∷ _) _ prim = ⊥-elim (consIsNotPrim prim) quicksort : {A : Set} → {LEQ : Rel A L.zero} → Total LEQ → (xs : List A) → Σ (List A) (λ ys → ys ≈ xs × Ordered LEQ ys) quicksort {LEQ = LEQ} total xs = makeD&C2 <l-wellFounded primDec (qs-Decomp total) qs-Comp qs-G (qs-DirSolve LEQ) (qs-InductionLemma LEQ) xs ⊤.tt _≤_-total : Total _≤_ _≤_-total zero n = inj₁ z≤n _≤_-total n zero = inj₂ z≤n _≤_-total (suc n) (suc m) with (_≤_-total n m) _≤_-total (suc n) (suc m) | (inj₁ n≤m) = inj₁ (s≤s n≤m) _≤_-total (suc n) (suc m) | (inj₂ m≤n) = inj₂ (s≤s m≤n) nat-quicksort = quicksort _≤_-total
{ "alphanum_fraction": 0.4518762045, "avg_line_length": 54.7888198758, "ext": "agda", "hexsha": "30f65f55003b8f656df0c4591c86619f191491a8", "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": "99bd3a5e772563153d78f61c1bbca48d7809ff48", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "NAMEhzj/Divide-and-Conquer-in-Agda", "max_forks_repo_path": "Quicksort.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "99bd3a5e772563153d78f61c1bbca48d7809ff48", "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": "NAMEhzj/Divide-and-Conquer-in-Agda", "max_issues_repo_path": "Quicksort.agda", "max_line_length": 193, "max_stars_count": null, "max_stars_repo_head_hexsha": "99bd3a5e772563153d78f61c1bbca48d7809ff48", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "NAMEhzj/Divide-and-Conquer-in-Agda", "max_stars_repo_path": "Quicksort.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 3321, "size": 8821 }
------------------------------------------------------------------------ -- Normalization of raw terms in Fω with interval kinds ------------------------------------------------------------------------ {-# OPTIONS --safe --exact-split --without-K #-} module FOmegaInt.Syntax.Normalization where open import Data.Context.WellFormed using (module ⊤-WellFormed) open import Data.Fin using (Fin; zero; suc; raise; lift) open import Data.Fin.Substitution open import Data.Fin.Substitution.Lemmas using (module VarLemmas) open import Data.Fin.Substitution.ExtraLemmas open import Data.Fin.Substitution.Typed open import Data.Maybe using (just; nothing) open import Data.Nat using (ℕ; zero; suc; _+_) open import Data.List using ([]; _∷_; _∷ʳ_) open import Data.List.Relation.Unary.All using (All; []; _∷_) open import Data.Vec as Vec using ([]; _∷_) import Data.Vec.Properties as VecProps open import Function using (_∘_; flip) open import Relation.Binary.Construct.Closure.ReflexiveTransitive using (ε) open import Relation.Binary.PropositionalEquality as P hiding ([_]) open import FOmegaInt.Reduction.Full open import FOmegaInt.Syntax open import FOmegaInt.Syntax.SingleVariableSubstitution open import FOmegaInt.Syntax.HereditarySubstitution open Syntax ---------------------------------------------------------------------- -- Kind simplification as a relation. infix 4 ⌊_⌋≡_ -- Kind simplification (aka erasure to shapes) as a relation. -- -- We introduce an inductively defined relation on kinds (and shapes) -- that precisely relates a (dependent) kind to its shape. Proofs of -- ⌊ j ⌋≡ k are equivalent to proofs that ⌊ j ⌋ ≡ k, as witnessed by -- the ⌊⌋-⌊⌋≡ and ⌊⌋≡⇒⌊⌋-≡ lemmas below, but the former are easier to -- work with in certain functions and lemmas that are defined by -- recursion on shapes since the recursion structure then matches the -- inductive structure of the relation. A prime example of this is -- η-expansion as implemented below (see the definition of η-exp in -- the TrackSimpleKindsEtaExp module). Most lemmas about η-expansion -- also use the ⌊_⌋≡_ relation in a similar way. data ⌊_⌋≡_ {T n} : Kind T n → SKind → Set where is-★ : ∀ {a b} → ⌊ a ⋯ b ⌋≡ ★ is-⇒ : ∀ {j₁ j₂ k₁ k₂} → ⌊ j₁ ⌋≡ k₁ → ⌊ j₂ ⌋≡ k₂ → ⌊ Π j₁ j₂ ⌋≡ k₁ ⇒ k₂ -- Kind simplification as a relation agrees with kind simplification -- as a function. ⌊⌋-⌊⌋≡ : ∀ {T n} (k : Kind T n) → ⌊ k ⌋≡ ⌊ k ⌋ ⌊⌋-⌊⌋≡ (a ⋯ b) = is-★ ⌊⌋-⌊⌋≡ (Π j k) = is-⇒ (⌊⌋-⌊⌋≡ j) (⌊⌋-⌊⌋≡ k) ⌊⌋≡⇒⌊⌋-≡ : ∀ {T n k} {j : Kind T n} → ⌊ j ⌋≡ k → ⌊ j ⌋ ≡ k ⌊⌋≡⇒⌊⌋-≡ is-★ = refl ⌊⌋≡⇒⌊⌋-≡ (is-⇒ ⌊j₁⌋=k₁ ⌊j₂⌋=k₂) = cong₂ _⇒_ (⌊⌋≡⇒⌊⌋-≡ ⌊j₁⌋=k₁) (⌊⌋≡⇒⌊⌋-≡ ⌊j₂⌋=k₂) ⌊⌋≡-trans : ∀ {T n m k} {j : Kind T n} {l : Kind T m} → ⌊ j ⌋ ≡ ⌊ l ⌋ → ⌊ l ⌋≡ k → ⌊ j ⌋≡ k ⌊⌋≡-trans ⌊j⌋≡⌊l⌋ ⌊l⌋≡k rewrite (sym (⌊⌋≡⇒⌊⌋-≡ ⌊l⌋≡k)) = subst (⌊ _ ⌋≡_) ⌊j⌋≡⌊l⌋ (⌊⌋-⌊⌋≡ _) -- Kind simplification is proof-irrelevant. ⌊⌋≡-pirr : ∀ {T n k} {j : Kind T n} → (p₁ p₂ : ⌊ j ⌋≡ k) → p₁ ≡ p₂ ⌊⌋≡-pirr is-★ is-★ = refl ⌊⌋≡-pirr (is-⇒ p₁₁ p₁₂) (is-⇒ p₂₁ p₂₂) = cong₂ is-⇒ (⌊⌋≡-pirr p₁₁ p₂₁) (⌊⌋≡-pirr p₁₂ p₂₂) -- A type of abstract lemma stating that kind simplification as a -- relation commutes with substitution. KindSimpAppLemma : ∀ {T T′} (app : Application (Kind T) T′) → Set KindSimpAppLemma {_} {T′} app = ∀ {m n j k} {σ : Sub T′ m n} → ⌊ j ⌋≡ k → ⌊ j / σ ⌋≡ k where open Application app -- Lemmas relating kind simplification to operations on T-kinds. record KindSimpLemmas (T : ℕ → Set) : Set₁ where field lemmas : TermLikeLemmas (Kind T) Term open TermLikeLemmas lemmas using (termApplication; varApplication; weaken; weaken⋆) field ⌊⌋≡-/ : KindSimpAppLemma termApplication ⌊⌋≡-/Var : KindSimpAppLemma varApplication -- Kind simplification as a relation commutes with weakening. ⌊⌋≡-weaken : ∀ {n k} {j : Kind T n} → ⌊ j ⌋≡ k → ⌊ weaken j ⌋≡ k ⌊⌋≡-weaken ⌊j⌋≡k = ⌊⌋≡-/Var ⌊j⌋≡k ⌊⌋≡-weaken⋆ : ∀ m {n k} {j : Kind T n} → ⌊ j ⌋≡ k → ⌊ weaken⋆ m j ⌋≡ k ⌊⌋≡-weaken⋆ zero ⌊j⌋≡k = ⌊j⌋≡k ⌊⌋≡-weaken⋆ (suc m) ⌊j⌋≡k = ⌊⌋≡-weaken (⌊⌋≡-weaken⋆ m ⌊j⌋≡k) module KindSimpSubstApp {T} {l : Lift T Term} where open SubstApp l -- Kind simplification as a relation commutes with substitution. ⌊⌋≡-Kind/ : ∀ {m n j k} {σ : Sub T m n} → ⌊ j ⌋≡ k → ⌊ j Kind/ σ ⌋≡ k ⌊⌋≡-Kind/ is-★ = is-★ ⌊⌋≡-Kind/ (is-⇒ ⌊j₁⌋≡k₁ ⌊j₂⌋≡k₂) = is-⇒ (⌊⌋≡-Kind/ ⌊j₁⌋≡k₁) (⌊⌋≡-Kind/ ⌊j₂⌋≡k₂) ⌊⌋≡-Kind′/ : ∀ {m n j k} {σ : Sub T m n} → ⌊ j ⌋≡ k → ⌊ j Kind′/ σ ⌋≡ k ⌊⌋≡-Kind′/ is-★ = is-★ ⌊⌋≡-Kind′/ (is-⇒ ⌊j₁⌋≡k₁ ⌊j₂⌋≡k₂) = is-⇒ (⌊⌋≡-Kind′/ ⌊j₁⌋≡k₁) (⌊⌋≡-Kind′/ ⌊j₂⌋≡k₂) simpLemmasKind : KindSimpLemmas Term simpLemmasKind = record { lemmas = termLikeLemmasKind ; ⌊⌋≡-/ = KindSimpSubstApp.⌊⌋≡-Kind/ ; ⌊⌋≡-/Var = KindSimpSubstApp.⌊⌋≡-Kind/ } where open Substitution simpLemmasKind′ : KindSimpLemmas Elim simpLemmasKind′ = record { lemmas = termLikeLemmasKind′ ; ⌊⌋≡-/ = KindSimpSubstApp.⌊⌋≡-Kind′/ ; ⌊⌋≡-/Var = KindSimpSubstApp.⌊⌋≡-Kind′/ } where open Substitution module SimpHSubstLemmas where open KindSimpLemmas simpLemmasKind′ public -- Kind simplification as a relation commutes with hereditary -- substitution. ⌊⌋≡-/⟨⟩ : ∀ {m n j k l} {σ : SVSub m n} → ⌊ j ⌋≡ k → ⌊ j Kind/⟨ l ⟩ σ ⌋≡ k ⌊⌋≡-/⟨⟩ is-★ = is-★ ⌊⌋≡-/⟨⟩ (is-⇒ ⌊j₁⌋≡k₁ ⌊j₂⌋≡k₂) = is-⇒ (⌊⌋≡-/⟨⟩ ⌊j₁⌋≡k₁) (⌊⌋≡-/⟨⟩ ⌊j₂⌋≡k₂) open SimpHSubstLemmas ---------------------------------------------------------------------- -- Untyped η-expansion of neutral terms. module TrackSimpleKindsEtaExp where open Substitution hiding (_↑; sub) -- NOTE. The definition of the function η-exp in this module is -- structurally recursive in the *shape* parameter k, but *not* in -- the kind (j : Kind Elim n) because we need to weaken the domain -- j₁ of the dependent kind (j = Π j₁ j₂) in the arrow case. The -- additional hypothesis ⌊ j ⌋≡ k ensures that k is indeed the shape -- of the kind j. -- Kind-driven untyped η-expansion of eliminations. -- -- NOTE. We only expand neutral types since these are the only -- non-lambda forms of arrow kind, and thus the only ones that -- require expansion to reach η-long β-normal forms. η-exp : ∀ {n k} (j : Kind Elim n) → ⌊ j ⌋≡ k → Elim n → Elim n η-exp (c ⋯ d) (is-★) a = a η-exp (Π j₁ j₂) (is-⇒ ⌊j₁⌋≡k₁ ⌊j₂⌋≡k₂) a = Λ∙ j₁ (η-exp j₂ ⌊j₂⌋≡k₂ a·ηz) where a·ηz = weakenElim a ⌜·⌝ η-exp (weakenKind′ j₁) (⌊⌋≡-weaken ⌊j₁⌋≡k₁) (var∙ zero) -- A helper lemma. η-exp-⌊⌋≡ : ∀ {n j₁ j₂ k₁ k₂} {a : Elim n} (hyp₁ : ⌊ j₁ ⌋≡ k₁) (hyp₂ : ⌊ j₂ ⌋≡ k₂) → j₁ ≡ j₂ → k₁ ≡ k₂ → η-exp j₁ hyp₁ a ≡ η-exp j₂ hyp₂ a η-exp-⌊⌋≡ hyp₁ hyp₂ refl refl = cong (λ hyp → η-exp _ hyp _) (⌊⌋≡-pirr hyp₁ hyp₂) -- η-expansion commutes with renaming. η-exp-/Var : ∀ {m n j k} (hyp : ⌊ j ⌋≡ k) a {ρ : Sub Fin m n} → η-exp j hyp a Elim/Var ρ ≡ η-exp (j Kind′/Var ρ) (⌊⌋≡-/Var hyp) (a Elim/Var ρ) η-exp-/Var is-★ a = refl η-exp-/Var (is-⇒ {j₁} {j₂} ⌊j₁⌋≡k₁ ⌊j₂⌋≡k₂) a {ρ} = begin η-exp _ (is-⇒ ⌊j₁⌋≡k₁ ⌊j₂⌋≡k₂) a Elim/Var ρ ≡⟨ cong (Λ∙ (j₁ Kind′/Var ρ)) (η-exp-/Var ⌊j₂⌋≡k₂ _) ⟩ Λ∙ (j₁ Kind′/Var ρ) (η-exp (j₂ Kind′/Var ρ V.↑) (⌊⌋≡-/Var ⌊j₂⌋≡k₂) ((weakenElim a ⌜·⌝ η-exp (weakenKind′ j₁) (⌊⌋≡-weaken ⌊j₁⌋≡k₁) (var∙ zero)) Elim/Var ρ V.↑)) ≡⟨ cong (λ c → Λ∙ (j₁ Kind′/Var ρ) (η-exp (j₂ Kind′/Var ρ V.↑) (⌊⌋≡-/Var ⌊j₂⌋≡k₂) c)) (begin weakenElim a ⌜·⌝ η-exp (weakenKind′ j₁) (⌊⌋≡-weaken ⌊j₁⌋≡k₁) (var∙ zero) Elim/Var ρ V.↑ ≡⟨ ⌜·⌝-/Var (weakenElim a) _ ⟩ (weakenElim a Elim/Var ρ V.↑) ⌜·⌝ (η-exp (weakenKind′ j₁) (⌊⌋≡-weaken ⌊j₁⌋≡k₁) (var∙ zero) Elim/Var ρ V.↑) ≡⟨ cong₂ _⌜·⌝_ (sym (EVL.wk-commutes a)) (η-exp-/Var (⌊⌋≡-weaken ⌊j₁⌋≡k₁) (var∙ zero)) ⟩ (weakenElim (a Elim/Var ρ)) ⌜·⌝ (η-exp (weakenKind′ j₁ Kind′/Var ρ V.↑) (⌊⌋≡-/Var (⌊⌋≡-weaken ⌊j₁⌋≡k₁)) ((var∙ zero) Elim/Var ρ V.↑)) ≡⟨ cong ((weakenElim (a Elim/Var ρ)) ⌜·⌝_) (η-exp-⌊⌋≡ (⌊⌋≡-/Var (⌊⌋≡-weaken ⌊j₁⌋≡k₁)) (⌊⌋≡-weaken (⌊⌋≡-/Var ⌊j₁⌋≡k₁)) (sym (KVL.wk-commutes j₁)) refl) ⟩ (weakenElim (a Elim/Var ρ)) ⌜·⌝ (η-exp (weakenKind′ (j₁ Kind′/Var ρ)) (⌊⌋≡-weaken (⌊⌋≡-/Var ⌊j₁⌋≡k₁)) (var∙ zero)) ∎) ⟩ η-exp _ (is-⇒ (⌊⌋≡-/Var ⌊j₁⌋≡k₁) (⌊⌋≡-/Var ⌊j₂⌋≡k₂)) (a Elim/Var ρ) ∎ where open ≡-Reasoning module V = VarSubst module EL = TermLikeLemmas termLikeLemmasElim module KL = TermLikeLemmas termLikeLemmasKind′ module EVL = LiftAppLemmas EL.varLiftAppLemmas module KVL = LiftAppLemmas KL.varLiftAppLemmas -- η-expansion of neutrals commutes with hereditary substitutions -- that miss the head of the neutral. η-exp-ne-Miss-/⟨⟩ : ∀ {l m n j k} x y {as} {σ : SVSub m n} (hyp : ⌊ j ⌋≡ k) → Miss σ x y → η-exp j hyp (var x ∙ as) /⟨ l ⟩ σ ≡ η-exp (j Kind/⟨ l ⟩ σ) (⌊⌋≡-/⟨⟩ hyp) (var y ∙ (as //⟨ l ⟩ σ)) η-exp-ne-Miss-/⟨⟩ x y is-★ missP = cong (_?∙∙⟨ _ ⟩ _) (lookup-Miss missP) η-exp-ne-Miss-/⟨⟩ {l} x y {as} {σ} (is-⇒ {j₁} {j₂} ⌊j₁⌋≡k₁ ⌊j₂⌋≡k₂) missP = cong (Λ∙ (j₁ Kind/⟨ l ⟩ σ)) (begin η-exp j₂ ⌊j₂⌋≡k₂ ((weakenElim (var x ∙ as)) ⌜·⌝ ηz) /⟨ l ⟩ σ ↑ ≡⟨ cong (λ x → η-exp _ ⌊j₂⌋≡k₂ (var x ∙ weakenSpine as ⌜·⌝ _) /⟨ l ⟩ σ ↑) (VarLemmas.lookup-wk x) ⟩ η-exp j₂ ⌊j₂⌋≡k₂ (var (suc x) ∙ (weakenSpine as) ⌜·⌝ ηz) /⟨ l ⟩ σ ↑ ≡⟨ η-exp-ne-Miss-/⟨⟩ (suc x) (suc y) ⌊j₂⌋≡k₂ (missP ↑) ⟩ η-exp (j₂ Kind/⟨ l ⟩ σ ↑) (⌊⌋≡-/⟨⟩ ⌊j₂⌋≡k₂) (var (suc y) ∙ (((weakenSpine as) ∷ʳ ηz) //⟨ l ⟩ σ ↑)) ≡⟨ cong (λ bs → η-exp _ (⌊⌋≡-/⟨⟩ ⌊j₂⌋≡k₂) (var _ ∙ bs)) (++-//⟨⟩ (weakenSpine as) (_ ∷ [])) ⟩ η-exp (j₂ Kind/⟨ l ⟩ σ ↑) (⌊⌋≡-/⟨⟩ ⌊j₂⌋≡k₂) (var (suc y) ∙ ((weakenSpine as) //⟨ l ⟩ σ ↑) ⌜·⌝ (ηz /⟨ l ⟩ σ ↑)) ≡⟨ cong₂ (λ a b → η-exp (j₂ Kind/⟨ l ⟩ σ ↑) (⌊⌋≡-/⟨⟩ ⌊j₂⌋≡k₂) (a ⌜·⌝ b)) (cong₂ (λ x as → var x ∙ as) (sym (VarLemmas.lookup-wk y)) (wk-//⟨⟩-↑⋆ 0 as)) (η-exp-ne-Miss-/⟨⟩ zero zero (⌊⌋≡-weaken ⌊j₁⌋≡k₁) under) ⟩ η-exp (j₂ Kind/⟨ l ⟩ σ ↑) (⌊⌋≡-/⟨⟩ ⌊j₂⌋≡k₂) (weakenElim (var y ∙ (as //⟨ l ⟩ σ)) ⌜·⌝ η-exp ((weakenKind′ j₁) Kind/⟨ l ⟩ σ ↑) (⌊⌋≡-/⟨⟩ (⌊⌋≡-weaken ⌊j₁⌋≡k₁)) (var∙ zero)) ≡⟨ cong (λ a → η-exp _ (⌊⌋≡-/⟨⟩ ⌊j₂⌋≡k₂) (weakenElim (var y ∙ (as //⟨ l ⟩ σ)) ⌜·⌝ a)) (η-exp-⌊⌋≡ (⌊⌋≡-/⟨⟩ (⌊⌋≡-weaken ⌊j₁⌋≡k₁)) (⌊⌋≡-weaken (⌊⌋≡-/⟨⟩ ⌊j₁⌋≡k₁)) (wk-Kind/⟨⟩-↑⋆ 0 j₁) refl) ⟩ η-exp (j₂ Kind/⟨ l ⟩ σ ↑) (⌊⌋≡-/⟨⟩ ⌊j₂⌋≡k₂) ((weakenElim (var y ∙ (as //⟨ l ⟩ σ))) ⌜·⌝ η-exp (weakenKind′ (j₁ Kind/⟨ l ⟩ σ)) (⌊⌋≡-weaken (⌊⌋≡-/⟨⟩ ⌊j₁⌋≡k₁)) (var∙ zero)) ∎) where open ≡-Reasoning open RenamingCommutes ηz = η-exp (weakenKind′ j₁) (⌊⌋≡-weaken ⌊j₁⌋≡k₁) (var∙ zero) private module TK = TrackSimpleKindsEtaExp -- Kind-driven untyped η-expansion. η-exp : ∀ {n} → Kind Elim n → Elim n → Elim n η-exp k a = TK.η-exp k (⌊⌋-⌊⌋≡ k) a module _ where open Substitution open ≡-Reasoning -- η-expansion commutes with renaming. η-exp-/Var : ∀ {m n} k a {ρ : Sub Fin m n} → η-exp k a Elim/Var ρ ≡ η-exp (k Kind′/Var ρ) (a Elim/Var ρ) η-exp-/Var k a {ρ} = begin η-exp k a Elim/Var ρ ≡⟨ TK.η-exp-/Var (⌊⌋-⌊⌋≡ k) a ⟩ TK.η-exp (k Kind′/Var ρ) (⌊⌋≡-/Var (⌊⌋-⌊⌋≡ k)) (a Elim/Var ρ) ≡⟨ TK.η-exp-⌊⌋≡ (⌊⌋≡-/Var (⌊⌋-⌊⌋≡ k)) (⌊⌋-⌊⌋≡ (k Kind′/Var ρ)) refl (sym (⌊⌋-Kind′/Var k)) ⟩ η-exp (k Kind′/Var ρ) (a Elim/Var ρ) ∎ -- A corollary: η-expansion commutes with weakening. η-exp-weaken : ∀ {n} k (a : Elim n) → weakenElim (η-exp k a) ≡ η-exp (weakenKind′ k) (weakenElim a) η-exp-weaken k a = η-exp-/Var k a -- η-expansion of neutrals commutes with hereditary substitutions -- that miss the head of the neutral. η-exp-ne-Miss-/⟨⟩ : ∀ {l m n} x y as k {σ : SVSub m n} → Miss σ x y → η-exp k (var x ∙ as) /⟨ l ⟩ σ ≡ η-exp (k Kind/⟨ l ⟩ σ) (var y ∙ (as //⟨ l ⟩ σ)) η-exp-ne-Miss-/⟨⟩ {l} x y as k {σ} missP = begin η-exp k (var x ∙ as) /⟨ l ⟩ σ ≡⟨ TK.η-exp-ne-Miss-/⟨⟩ x y (⌊⌋-⌊⌋≡ k) missP ⟩ TK.η-exp (k Kind/⟨ l ⟩ σ) (⌊⌋≡-/⟨⟩ (⌊⌋-⌊⌋≡ k)) (var y ∙ (as //⟨ l ⟩ σ)) ≡⟨ TK.η-exp-⌊⌋≡ (⌊⌋≡-/⟨⟩ (⌊⌋-⌊⌋≡ k)) (⌊⌋-⌊⌋≡ (k Kind/⟨ l ⟩ σ)) refl (sym (⌊⌋-Kind/⟨⟩ k)) ⟩ η-exp (k Kind/⟨ l ⟩ σ) (var y ∙ (as //⟨ l ⟩ σ)) ∎ ---------------------------------------------------------------------- -- Untyped normalization. open ElimCtx -- Normalize an raw type or kind into η-long β-normal form if -- possible. Degenerate cases are marked "!". mutual nf : ∀ {n} → Ctx n → Term n → Elim n nf Γ (var x) with lookup Γ x nf Γ (var x) | kd k = η-exp k (var∙ x) nf Γ (var x) | tp a = var∙ x -- ! a not a kind nf Γ ⊥ = ⊥∙ nf Γ ⊤ = ⊤∙ nf Γ (Π k a) = let k′ = nfKind Γ k in ∀∙ k′ (nf (kd k′ ∷ Γ) a) nf Γ (a ⇒ b) = (nf Γ a ⇒ nf Γ b) ∙ [] nf Γ (Λ k a) = let k′ = nfKind Γ k in Λ∙ k′ (nf (kd k′ ∷ Γ) a) nf Γ (ƛ a b) = ƛ∙ ⌜ a ⌝ ⌜ b ⌝ -- ! ƛ a b not a type nf Γ (a · b) = nf Γ a ↓⌜·⌝ nf Γ b nf Γ (a ⊡ b) = ⌜ a ⌝ ⊡∙ ⌜ b ⌝ -- ! a ⊡ b not a type nfKind : ∀ {n} → Ctx n → Kind Term n → Kind Elim n nfKind Γ (a ⋯ b) = nf Γ a ⋯ nf Γ b nfKind Γ (Π j k) = let j′ = nfKind Γ j in Π j′ (nfKind (kd j′ ∷ Γ) k) -- Normalization extended to contexts. nfAsc : ∀ {n} → Ctx n → TermAsc n → ElimAsc n nfAsc Γ (kd k) = kd (nfKind Γ k) nfAsc Γ (tp a) = tp (nf Γ a) nfCtx : ∀ {n} → TermCtx.Ctx n → Ctx n nfCtx [] = [] nfCtx (a ∷ Γ) = let Γ′ = nfCtx Γ in nfAsc Γ′ a ∷ Γ′ nfCtxExt : ∀ {m n} → Ctx m → TermCtx.CtxExt m n → CtxExt m n nfCtxExt Γ [] = [] nfCtxExt Γ (a ∷ Δ) = let Δ′ = nfCtxExt Γ Δ in nfAsc (Δ′ ++ Γ) a ∷ Δ′ -- Shapes are stable w.r.t. normalization. ⌊⌋-nf : ∀ {n} {Γ : Ctx n} k → ⌊ nfKind Γ k ⌋ ≡ ⌊ k ⌋ ⌊⌋-nf (a ⋯ b) = refl ⌊⌋-nf (Π j k) = cong₂ _⇒_ (⌊⌋-nf j) (⌊⌋-nf k) open SimpleCtx using (⌊_⌋Asc; kd; tp) open ContextConversions using (⌊_⌋Ctx) -- Simple contexts are stable w.r.t. normalization. ⌊⌋Asc-nf : ∀ {n} {Γ : Ctx n} a → ⌊ nfAsc Γ a ⌋Asc ≡ ⌊ a ⌋Asc ⌊⌋Asc-nf (kd k) = cong kd (⌊⌋-nf k) ⌊⌋Asc-nf (tp a) = refl ⌊⌋Ctx-nf : ∀ {n} (Γ : TermCtx.Ctx n) → ⌊ nfCtx Γ ⌋Ctx ≡ ⌊ Γ ⌋Ctx ⌊⌋Ctx-nf [] = refl ⌊⌋Ctx-nf (a ∷ Γ) = cong₂ _∷_ (⌊⌋Asc-nf a) (⌊⌋Ctx-nf Γ) -- Normalization commutes with context concatenation. nf-++ : ∀ {m n} (Δ : TermCtx.CtxExt m n) Γ → nfCtx (Δ ++ Γ) ≡ nfCtxExt (nfCtx Γ) Δ ++ nfCtx Γ nf-++ [] Γ = refl nf-++ (a ∷ Δ) Γ = cong₂ _∷_ (cong (λ Δ → nfAsc Δ a) (nf-++ Δ Γ)) (nf-++ Δ Γ) -- A helper lemma about normalization of variables. nf-var-kd : ∀ {n} (Γ : Ctx n) {k} x → lookup Γ x ≡ kd k → nf Γ (var x) ≡ η-exp k (var∙ x) nf-var-kd Γ x Γ[x]≡kd-k with lookup Γ x nf-var-kd Γ x refl | kd k = refl nf-var-kd Γ x () | tp _ module RenamingCommutesNorm where open Substitution hiding (subst; varLiftAppLemmas) open TermLikeLemmas termLikeLemmasElimAsc using (varApplication; varLiftAppLemmas) open RenamingCommutes open ⊤-WellFormed weakenOps open ≡-Reasoning private module V = VarSubst module AL = LiftAppLemmas varLiftAppLemmas -- Well-formed renamings. -- -- A renaming `ρ' is well-formed `Δ ⊢/ ρ ∈ Γ' if it maps ascriptions -- from the source contxt `Γ' to the target context `Δ' in a manner -- that is consistent with the renaming, i.e. such that we have -- `Δ(ρ(x)) = Γ(x)ρ'. kindedVarSubst : TypedVarSubst ElimAsc _ kindedVarSubst = record { _⊢_wf = _⊢_wf ; typeExtension = weakenOps ; typeVarApplication = varApplication ; wf-wf = λ _ → ctx-wf _ ; /-wk = refl ; id-vanishes = AL.id-vanishes ; /-⊙ = AL./-⊙ } open TypedVarSubst kindedVarSubst renaming (lookup to /∈-lookup) -- Extract a "consistency" proof from a well-formed renaming, i.e. a -- proof that `Δ(ρ(x)) = Γ(x)ρ'. lookup-≡ : ∀ {m n Δ Γ} {ρ : Sub Fin m n} → Δ ⊢/Var ρ ∈ Γ → ∀ x → lookup Δ (Vec.lookup ρ x) ≡ lookup Γ x ElimAsc/Var ρ lookup-≡ {_} {_} {Δ} {Γ} {ρ} ρ∈Γ x with Vec.lookup ρ x | lookup Γ x ElimAsc/Var ρ | /∈-lookup ρ∈Γ x lookup-≡ ρ∈Γ x | y | _ | VarTyping.∈-var .y _ = refl mutual -- A helper. ∈-↑′ : ∀ {m n Δ Γ} {ρ : Sub Fin m n} k → Δ ⊢/Var ρ ∈ Γ → kd (nfKind Δ (k Kind/Var ρ)) ∷ Δ ⊢/Var ρ V.↑ ∈ (nfAsc Γ (kd k) ∷ Γ) ∈-↑′ k ρ∈Γ = subst (λ k → kd k ∷ _ ⊢/Var _ ∈ _) (nfKind-/Var k ρ∈Γ) (∈-↑ _ ρ∈Γ) -- Normalization commutes with renaming. nf-/Var : ∀ {m n Δ Γ} {ρ : Sub Fin m n} a → Δ ⊢/Var ρ ∈ Γ → nf Γ a Elim/Var ρ ≡ nf Δ (a /Var ρ) nf-/Var {_} {_} {Δ} {Γ} {ρ} (var x) ρ∈Γ with lookup Γ x | lookup Δ (Vec.lookup ρ x) | lookup-≡ ρ∈Γ x nf-/Var (var x) ρ∈Γ | kd k | _ | refl = η-exp-/Var k (var∙ x) nf-/Var (var x) ρ∈Γ | tp a | _ | refl = refl nf-/Var ⊥ ρ∈Γ = refl nf-/Var ⊤ ρ∈Γ = refl nf-/Var (Π k a) ρ∈Γ = cong₂ ∀∙ (nfKind-/Var k ρ∈Γ) (nf-/Var a (∈-↑′ k ρ∈Γ)) nf-/Var (a ⇒ b) ρ∈Γ = cong₂ _⇒∙_ (nf-/Var a ρ∈Γ) (nf-/Var b ρ∈Γ) nf-/Var (Λ j a) ρ∈Γ = cong₂ Λ∙ (nfKind-/Var j ρ∈Γ) (nf-/Var a (∈-↑′ j ρ∈Γ)) nf-/Var (ƛ a b) ρ∈Γ = cong₂ ƛ∙ (sym (⌜⌝-/Var a)) (sym (⌜⌝-/Var b)) nf-/Var {m} {_} {Δ} {Γ} {ρ} (a · b) ρ∈Γ = begin (nf Γ a ↓⌜·⌝ nf Γ b) Elim/Var ρ ≡⟨ ↓⌜·⌝-/Var (nf Γ a) (nf Γ b) ⟩ (nf Γ a Elim/Var ρ) ↓⌜·⌝ (nf Γ b Elim/Var ρ) ≡⟨ cong₂ (_↓⌜·⌝_) (nf-/Var a ρ∈Γ) (nf-/Var b ρ∈Γ) ⟩ nf Δ (a · b /Var ρ) ∎ nf-/Var (a ⊡ b) ρ∈Γ = cong₂ _⊡∙_ (sym (⌜⌝-/Var a)) (sym (⌜⌝-/Var b)) nfKind-/Var : ∀ {m n Δ Γ} {ρ : Sub Fin m n} k → Δ ⊢/Var ρ ∈ Γ → nfKind Γ k Kind′/Var ρ ≡ nfKind Δ (k Kind/Var ρ) nfKind-/Var (a ⋯ b) ρ∈Γ = cong₂ _⋯_ (nf-/Var a ρ∈Γ) (nf-/Var b ρ∈Γ) nfKind-/Var (Π j k) ρ∈Γ = cong₂ Π (nfKind-/Var j ρ∈Γ) (nfKind-/Var k (∈-↑′ j ρ∈Γ)) -- Normalization of ascriptions commutes with renaming. nfAsc-/Var : ∀ {m n Δ Γ} {ρ : Sub Fin m n} a → Δ ⊢/Var ρ ∈ Γ → nfAsc Γ a ElimAsc/Var ρ ≡ nfAsc Δ (a TermAsc/Var ρ) nfAsc-/Var (kd k) ρ∈Γ = cong kd (nfKind-/Var k ρ∈Γ) nfAsc-/Var (tp a) ρ∈Γ = cong tp (nf-/Var a ρ∈Γ) -- Corollaries: normalization commutes with weakening. nf-weaken : ∀ {n} {Γ : Ctx n} a b → weakenElim (nf Γ b) ≡ nf (a ∷ Γ) (weaken b) nf-weaken a b = nf-/Var b (∈-wk _) nfKind-weaken : ∀ {n} {Γ : Ctx n} a k → weakenKind′ (nfKind Γ k) ≡ nfKind (a ∷ Γ) (weakenKind k) nfKind-weaken a k = nfKind-/Var k (∈-wk _) nfAsc-weaken : ∀ {n} {Γ : Ctx n} a b → weakenElimAsc (nfAsc Γ b) ≡ nfAsc (a ∷ Γ) (weakenTermAsc b) nfAsc-weaken a b = nfAsc-/Var b (∈-wk _) open RenamingCommutesNorm module _ where open Substitution hiding (sub; _↑; subst) open ≡-Reasoning open VecProps using (map-cong; map-∘) -- Normalization extended to single-variable substitutions nfSVSub : ∀ {m n} → Ctx n → SVSub m n → SVSub m n nfSVSub Γ (sub a) = sub (nf Γ (⌞ a ⌟)) nfSVSub (_ ∷ Γ) (σ ↑) = (nfSVSub Γ σ) ↑ nf-Hit : ∀ {m n} Γ {σ : SVSub m n} {x a} → Hit σ x a → Hit (nfSVSub Γ σ) x (nf Γ ⌞ a ⌟) nf-Hit Γ here = here nf-Hit (a ∷ Γ) {σ ↑} (_↑ {x = x} {b} hitP) = subst (Hit (nfSVSub Γ σ ↑) (suc x)) (trans (nf-weaken a ⌞ b ⌟) (cong (nf _) (sym (⌞⌟-/Var b)))) (nf-Hit Γ hitP ↑) nf-Miss : ∀ {m n} Γ {σ : SVSub m n} {x y} → Miss σ x y → Miss (nfSVSub Γ σ) x y nf-Miss Γ over = over nf-Miss (a ∷ Γ) under = under nf-Miss (a ∷ Γ) (missP ↑) = (nf-Miss Γ missP) ↑ -- Normalization commutes conversion from context to vector representation. nfCtx-toVec : ∀ {n} (Γ : TermCtx.Ctx n) → toVec (nfCtx Γ) ≡ Vec.map (nfAsc (nfCtx Γ)) (TermCtx.toVec Γ) nfCtx-toVec [] = refl nfCtx-toVec (a ∷ Γ) = cong₂ _∷_ (nfAsc-weaken (nfAsc (nfCtx Γ) a) a) (begin Vec.map weakenElimAsc (toVec (nfCtx Γ)) ≡⟨ cong (Vec.map weakenElimAsc) (nfCtx-toVec Γ) ⟩ Vec.map weakenElimAsc (Vec.map (nfAsc (nfCtx Γ)) (TermCtx.toVec Γ)) ≡⟨ sym (map-∘ weakenElimAsc (nfAsc (nfCtx Γ)) (TermCtx.toVec Γ)) ⟩ Vec.map (weakenElimAsc ∘ nfAsc (nfCtx Γ)) (TermCtx.toVec Γ) ≡⟨ map-cong (nfAsc-weaken (nfAsc (nfCtx Γ) a)) (TermCtx.toVec Γ) ⟩ Vec.map (nfAsc (nfCtx (a ∷ Γ)) ∘ weakenTermAsc) (TermCtx.toVec Γ) ≡⟨ map-∘ (nfAsc (nfCtx (a ∷ Γ))) weakenTermAsc (TermCtx.toVec Γ) ⟩ Vec.map (nfAsc (nfCtx (a ∷ Γ))) (Vec.map weakenTermAsc (TermCtx.toVec Γ)) ∎) -- Normalization commutes with context lookup. nfCtx-lookup : ∀ {n} (Γ : TermCtx.Ctx n) x → lookup (nfCtx Γ) x ≡ nfAsc (nfCtx Γ) (TermCtx.lookup Γ x) nfCtx-lookup Γ x = begin lookup (nfCtx Γ) x ≡⟨ cong (flip Vec.lookup x) (nfCtx-toVec Γ) ⟩ Vec.lookup (Vec.map (nfAsc (nfCtx Γ)) (TermCtx.toVec Γ)) x ≡⟨ VecProps.lookup-map x _ (TermCtx.toVec Γ) ⟩ nfAsc (nfCtx Γ) (TermCtx.lookup Γ x) ∎ -- A corollary of the above (specialized for type variable lookup). nfCtx-lookup-kd : ∀ {n k} x (Γ : TermCtx.Ctx n) → TermCtx.lookup Γ x ≡ kd k → lookup (nfCtx Γ) x ≡ kd (nfKind (nfCtx Γ) k) nfCtx-lookup-kd x Γ Γ[x]≡kd-k with TermCtx.lookup Γ x | nfCtx-lookup Γ x nfCtx-lookup-kd x Γ refl | kd k | nf-Γ[x]≡kd-nf-k = nf-Γ[x]≡kd-nf-k nfCtx-lookup-kd x Γ () | tp t | _
{ "alphanum_fraction": 0.5059545291, "avg_line_length": 39.304964539, "ext": "agda", "hexsha": "499586eca1aefffa9241b1b846b66b3f56d20399", "lang": "Agda", "max_forks_count": 2, "max_forks_repo_forks_event_max_datetime": "2021-05-14T10:25:05.000Z", "max_forks_repo_forks_event_min_datetime": "2021-05-13T22:29:48.000Z", "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/Syntax/Normalization.agda", "max_issues_count": 1, "max_issues_repo_head_hexsha": "ae20dac2a5e0c18dff2afda4c19954e24d73a24f", "max_issues_repo_issues_event_max_datetime": "2021-05-14T08:54:39.000Z", "max_issues_repo_issues_event_min_datetime": "2021-05-14T08:09:40.000Z", "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "Blaisorblade/f-omega-int-agda", "max_issues_repo_path": "src/FOmegaInt/Syntax/Normalization.agda", "max_line_length": 81, "max_stars_count": 12, "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/Syntax/Normalization.agda", "max_stars_repo_stars_event_max_datetime": "2021-09-27T05:53:06.000Z", "max_stars_repo_stars_event_min_datetime": "2017-06-13T16:05:35.000Z", "num_tokens": 10715, "size": 22168 }
------------------------------------------------------------------------------ -- Inductive PA properties ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTIONS --without-K #-} module PA.Inductive.PropertiesATP where open import PA.Inductive.Base ------------------------------------------------------------------------------ +-rightIdentity : ∀ n → n + zero ≡ n +-rightIdentity zero = refl +-rightIdentity (succ n) = prf (+-rightIdentity n) where postulate prf : n + zero ≡ n → succ n + zero ≡ succ n -- TODO (21 November 2014). See Apia issue 16 -- {-# ATP prove prf #-} x+Sy≡S[x+y] : ∀ m n → m + succ n ≡ succ (m + n) x+Sy≡S[x+y] zero _ = refl x+Sy≡S[x+y] (succ m) n = prf (x+Sy≡S[x+y] m n) where postulate prf : m + succ n ≡ succ (m + n) → succ m + succ n ≡ succ (succ m + n) -- TODO (21 November 2014). See Apia issue 16 -- {-# ATP prove prf #-} +-comm : ∀ m n → m + n ≡ n + m +-comm zero n = sym (+-rightIdentity n) +-comm (succ m) n = prf (+-comm m n) where postulate prf : m + n ≡ n + m → succ m + n ≡ n + succ m -- TODO (21 November 2014). See Apia issue 16 -- {-# ATP prove prf x+Sy≡S[x+y] #-}
{ "alphanum_fraction": 0.4373642288, "avg_line_length": 37.3243243243, "ext": "agda", "hexsha": "63b9fcc9f16b60880becd53fde1a70b0cf4473f7", "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/PA/Inductive/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/PA/Inductive/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/PA/Inductive/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": 389, "size": 1381 }
module WithApp where f : {A : Set} → A → A f x with x ... | y = y g : {A : Set} → A → A → A g x y with x ... | _ with y ... | _ = x
{ "alphanum_fraction": 0.3647798742, "avg_line_length": 6.625, "ext": "agda", "hexsha": "775f088fe0e5bf92939449076469dc31c77ead66", "lang": "Agda", "max_forks_count": 1, "max_forks_repo_forks_event_max_datetime": "2022-03-01T16:38:14.000Z", "max_forks_repo_forks_event_min_datetime": "2022-03-01T16:38:14.000Z", "max_forks_repo_head_hexsha": "f327f9aab8dcb07022b857736d8201906bba02e9", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "msuperdock/agda-unused", "max_forks_repo_path": "data/expression/WithApp.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "f327f9aab8dcb07022b857736d8201906bba02e9", "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": "msuperdock/agda-unused", "max_issues_repo_path": "data/expression/WithApp.agda", "max_line_length": 20, "max_stars_count": 6, "max_stars_repo_head_hexsha": "f327f9aab8dcb07022b857736d8201906bba02e9", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "msuperdock/agda-unused", "max_stars_repo_path": "data/expression/WithApp.agda", "max_stars_repo_stars_event_max_datetime": "2022-03-01T16:38:05.000Z", "max_stars_repo_stars_event_min_datetime": "2020-10-29T09:38:43.000Z", "num_tokens": 80, "size": 159 }
open import Data.Product using ( ∃ ; _×_ ) open import FRP.LTL.RSet.Core using ( RSet ; _[_,_] ; ⟦_⟧ ) open import FRP.LTL.RSet.Stateless using ( _⇒_ ) open import FRP.LTL.RSet.Globally using ( □ ; [_] ) open import FRP.LTL.Time using ( _≤_ ; ≤-refl ; _≤-trans_ ) module FRP.LTL.RSet.Causal where infixr 2 _⊵_ infixr 3 _⋙_ -- A ⊵ B is the causal function space from A to B _⊵_ : RSet → RSet → RSet (A ⊵ B) t = ∀ {u} → (t ≤ u) → (A [ t , u ]) → B u -- Categorical structure arr : ∀ {A B} → ⟦ □ (A ⇒ B) ⇒ (A ⊵ B) ⟧ arr f s≤t σ = f s≤t (σ s≤t ≤-refl) identity : ∀ {A} → ⟦ A ⊵ A ⟧ identity {A} = arr [( λ {u} (a : A u) → a )] _before_ : ∀ {A s u v} → (A [ s , v ]) → (u ≤ v) → (A [ s , u ]) (σ before u≤v) s≤t t≤u = σ s≤t (t≤u ≤-trans u≤v) _after_ : ∀ {A s t v} → (A [ s , v ]) → (s ≤ t) → (A [ t , v ]) (σ after s≤t) t≤u u≤v = σ (s≤t ≤-trans t≤u) u≤v _$_ : ∀ {A B s u} → (A ⊵ B) s → (A [ s , u ]) → (B [ s , u ]) (f $ σ) s≤t t≤u = f s≤t (σ before t≤u) _⋙_ : ∀ {A B C} → ⟦ (A ⊵ B) ⇒ (B ⊵ C) ⇒ (A ⊵ C) ⟧ (f ⋙ g) s≤t σ = g s≤t (f $ σ)
{ "alphanum_fraction": 0.474543708, "avg_line_length": 28.9166666667, "ext": "agda", "hexsha": "a54a35f621b3d262ffe1f983319ac651764421d7", "lang": "Agda", "max_forks_count": 3, "max_forks_repo_forks_event_max_datetime": "2022-03-12T11:39:04.000Z", "max_forks_repo_forks_event_min_datetime": "2015-03-01T07:33:00.000Z", "max_forks_repo_head_hexsha": "e88107d7d192cbfefd0a94505e6a5793afe1a7a5", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "agda/agda-frp-ltl", "max_forks_repo_path": "src/FRP/LTL/RSet/Causal.agda", "max_issues_count": 2, "max_issues_repo_head_hexsha": "e88107d7d192cbfefd0a94505e6a5793afe1a7a5", "max_issues_repo_issues_event_max_datetime": "2015-03-02T15:23:53.000Z", "max_issues_repo_issues_event_min_datetime": "2015-03-01T07:01:31.000Z", "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "agda/agda-frp-ltl", "max_issues_repo_path": "src/FRP/LTL/RSet/Causal.agda", "max_line_length": 64, "max_stars_count": 21, "max_stars_repo_head_hexsha": "e88107d7d192cbfefd0a94505e6a5793afe1a7a5", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "agda/agda-frp-ltl", "max_stars_repo_path": "src/FRP/LTL/RSet/Causal.agda", "max_stars_repo_stars_event_max_datetime": "2020-06-15T02:51:13.000Z", "max_stars_repo_stars_event_min_datetime": "2015-07-02T20:25:05.000Z", "num_tokens": 539, "size": 1041 }
module STLC.Kovacs.Embedding where open import STLC.Syntax public open import Category -------------------------------------------------------------------------------- -- Embeddings (OPE ; ∙ ; drop ; keep) infix 4 _⊇_ data _⊇_ : 𝒞 → 𝒞 → Set where done : ∅ ⊇ ∅ wkₑ : ∀ {Γ Γ′ A} → (η : Γ′ ⊇ Γ) → Γ′ , A ⊇ Γ liftₑ : ∀ {Γ Γ′ A} → (η : Γ′ ⊇ Γ) → Γ′ , A ⊇ Γ , A idₑ : ∀ {Γ} → Γ ⊇ Γ idₑ {∅} = done idₑ {Γ , A} = liftₑ idₑ -- (_∘ₑ_) _○_ : ∀ {Γ Γ′ Γ″} → Γ′ ⊇ Γ → Γ″ ⊇ Γ′ → Γ″ ⊇ Γ η₂ ○ done = η₂ η₂ ○ wkₑ η₁ = wkₑ (η₂ ○ η₁) wkₑ η₂ ○ liftₑ η₁ = wkₑ (η₂ ○ η₁) liftₑ η₂ ○ liftₑ η₁ = liftₑ (η₂ ○ η₁) -- (idlₑ) lid○ : ∀ {Γ Γ′} → (η : Γ′ ⊇ Γ) → idₑ ○ η ≡ η lid○ done = refl lid○ (wkₑ η) = wkₑ & lid○ η lid○ (liftₑ η) = liftₑ & lid○ η -- (idrₑ) rid○ : ∀ {Γ Γ′} → (η : Γ′ ⊇ Γ) → η ○ idₑ ≡ η rid○ done = refl rid○ (wkₑ η) = wkₑ & rid○ η rid○ (liftₑ η) = liftₑ & rid○ η -- (assₑ) assoc○ : ∀ {Γ Γ′ Γ″ Γ‴} → (η₁ : Γ‴ ⊇ Γ″) (η₂ : Γ″ ⊇ Γ′) (η₃ : Γ′ ⊇ Γ) → (η₃ ○ η₂) ○ η₁ ≡ η₃ ○ (η₂ ○ η₁) assoc○ done η₂ η₃ = refl assoc○ (wkₑ η₁) η₂ η₃ = wkₑ & assoc○ η₁ η₂ η₃ assoc○ (liftₑ η₁) (wkₑ η₂) η₃ = wkₑ & assoc○ η₁ η₂ η₃ assoc○ (liftₑ η₁) (liftₑ η₂) (wkₑ η₃) = wkₑ & assoc○ η₁ η₂ η₃ assoc○ (liftₑ η₁) (liftₑ η₂) (liftₑ η₃) = liftₑ & assoc○ η₁ η₂ η₃ -------------------------------------------------------------------------------- -- (∈ₑ) getₑ : ∀ {Γ Γ′ A} → Γ′ ⊇ Γ → Γ ∋ A → Γ′ ∋ A getₑ done i = i getₑ (wkₑ η) i = suc (getₑ η i) getₑ (liftₑ η) zero = zero getₑ (liftₑ η) (suc i) = suc (getₑ η i) -- (∈-idₑ) idgetₑ : ∀ {Γ A} → (i : Γ ∋ A) → getₑ idₑ i ≡ i idgetₑ zero = refl idgetₑ (suc i) = suc & idgetₑ i -- (∈-∘ₑ) get○ : ∀ {Γ Γ′ Γ″ A} → (η₁ : Γ″ ⊇ Γ′) (η₂ : Γ′ ⊇ Γ) (i : Γ ∋ A) → getₑ (η₂ ○ η₁) i ≡ (getₑ η₁ ∘ getₑ η₂) i get○ done done () get○ (wkₑ η₁) η₂ i = suc & get○ η₁ η₂ i get○ (liftₑ η₁) (wkₑ η₂) i = suc & get○ η₁ η₂ i get○ (liftₑ η₁) (liftₑ η₂) zero = refl get○ (liftₑ η₁) (liftₑ η₂) (suc i) = suc & get○ η₁ η₂ i -------------------------------------------------------------------------------- -- (Tmₑ) ren : ∀ {Γ Γ′ A} → Γ′ ⊇ Γ → Γ ⊢ A → Γ′ ⊢ A ren η (𝓋 i) = 𝓋 (getₑ η i) ren η (ƛ M) = ƛ (ren (liftₑ η) M) ren η (M ∙ N) = ren η M ∙ ren η N wk : ∀ {B Γ A} → Γ ⊢ A → Γ , B ⊢ A wk M = ren (wkₑ idₑ) M -- (Tm-idₑ) idren : ∀ {Γ A} → (M : Γ ⊢ A) → ren idₑ M ≡ M idren (𝓋 i) = 𝓋 & idgetₑ i idren (ƛ M) = ƛ & idren M idren (M ∙ N) = _∙_ & idren M ⊗ idren N -- (Tm-∘ₑ) ren○ : ∀ {Γ Γ′ Γ″ A} → (η₁ : Γ″ ⊇ Γ′) (η₂ : Γ′ ⊇ Γ) (M : Γ ⊢ A) → ren (η₂ ○ η₁) M ≡ (ren η₁ ∘ ren η₂) M ren○ η₁ η₂ (𝓋 i) = 𝓋 & get○ η₁ η₂ i ren○ η₁ η₂ (ƛ M) = ƛ & ren○ (liftₑ η₁) (liftₑ η₂) M ren○ η₁ η₂ (M ∙ N) = _∙_ & ren○ η₁ η₂ M ⊗ ren○ η₁ η₂ N -------------------------------------------------------------------------------- 𝗢𝗣𝗘 : Category 𝒞 _⊇_ 𝗢𝗣𝗘 = record { idₓ = idₑ ; _⋄_ = _○_ ; lid⋄ = lid○ ; rid⋄ = rid○ ; assoc⋄ = assoc○ } getₑPsh : 𝒯 → Presheaf₀ 𝗢𝗣𝗘 getₑPsh A = record { Fₓ = _∋ A ; F = getₑ ; idF = fext! idgetₑ ; F⋄ = λ η₁ η₂ → fext! (get○ η₂ η₁) } renPsh : 𝒯 → Presheaf₀ 𝗢𝗣𝗘 renPsh A = record { Fₓ = _⊢ A ; F = ren ; idF = fext! idren ; F⋄ = λ η₁ η₂ → fext! (ren○ η₂ η₁) } --------------------------------------------------------------------------------
{ "alphanum_fraction": 0.3666849918, "avg_line_length": 24.7482993197, "ext": "agda", "hexsha": "7691c4e604854d6a7cb3d0726c9c8b6d43e86915", "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": "bd626509948fbf8503ec2e31c1852e1ac6edcc79", "max_forks_repo_licenses": [ "X11" ], "max_forks_repo_name": "mietek/coquand-kovacs", "max_forks_repo_path": "src/STLC/Kovacs/Embedding.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "bd626509948fbf8503ec2e31c1852e1ac6edcc79", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "X11" ], "max_issues_repo_name": "mietek/coquand-kovacs", "max_issues_repo_path": "src/STLC/Kovacs/Embedding.agda", "max_line_length": 80, "max_stars_count": null, "max_stars_repo_head_hexsha": "bd626509948fbf8503ec2e31c1852e1ac6edcc79", "max_stars_repo_licenses": [ "X11" ], "max_stars_repo_name": "mietek/coquand-kovacs", "max_stars_repo_path": "src/STLC/Kovacs/Embedding.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 1926, "size": 3638 }
module Prelude.Functor where open import Agda.Primitive open import Prelude.Function open import Prelude.Equality record Functor {a b} (F : Set a → Set b) : Set (lsuc a ⊔ b) where infixl 4 _<$>_ _<$_ field fmap : ∀ {A B} → (A → B) → F A → F B _<$>_ = fmap _<$_ : ∀ {A B} → A → F B → F A x <$ m = fmap (const x) m open Functor {{...}} public {-# DISPLAY Functor.fmap _ = fmap #-} {-# DISPLAY Functor._<$>_ _ = _<$>_ #-} {-# DISPLAY Functor._<$_ _ = _<$_ #-} -- Level polymorphic functors record Functor′ {a b} (F : ∀ {a} → Set a → Set a) : Set (lsuc (a ⊔ b)) where infixl 4 _<$>′_ _<$′_ field fmap′ : {A : Set a} {B : Set b} → (A → B) → F A → F B _<$>′_ = fmap′ _<$′_ : {A : Set a} {B : Set b} → B → F A → F B x <$′ m = fmap′ (const x) m open Functor′ {{...}} public infixr 0 flip-fmap syntax flip-fmap a (λ x → y) = for x ← a return y flip-fmap : ∀ {a b} {F : Set a → Set b} {{_ : Functor F}} {A B} → F A → (A → B) → F B flip-fmap x f = fmap f x infixr 0 caseF_of_ caseF_of_ : ∀ {a b} {F : Set a → Set b} {{_ : Functor F}} {A B} → F A → (A → B) → F B caseF_of_ x f = fmap f x for = caseF_of_ {-# INLINE for #-} {-# INLINE caseF_of_ #-} -- Congruence for _<$>_ -- infixl 4 _=$=_ _=$=′_ _=$=_ : ∀ {a b} {A B : Set a} {F : Set a → Set b} {{_ : Functor F}} {x y : F A} (f : A → B) → x ≡ y → (f <$> x) ≡ (f <$> y) f =$= refl = refl _=$=′_ : ∀ {a b} {A : Set a} {B : Set b} {F : ∀ {a} → Set a → Set a} {{_ : Functor′ F}} {x y : F A} (f : A → B) → x ≡ y → (f <$>′ x) ≡ (f <$>′ y) f =$=′ refl = refl
{ "alphanum_fraction": 0.4846153846, "avg_line_length": 26.4406779661, "ext": "agda", "hexsha": "59b1243121a3dca7dfdc2768a67b7f3e31cf758b", "lang": "Agda", "max_forks_count": 24, "max_forks_repo_forks_event_max_datetime": "2021-04-22T06:10:41.000Z", "max_forks_repo_forks_event_min_datetime": "2015-03-12T18:03:45.000Z", "max_forks_repo_head_hexsha": "158d299b1b365e186f00d8ef5b8c6844235ee267", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "L-TChen/agda-prelude", "max_forks_repo_path": "src/Prelude/Functor.agda", "max_issues_count": 59, "max_issues_repo_head_hexsha": "158d299b1b365e186f00d8ef5b8c6844235ee267", "max_issues_repo_issues_event_max_datetime": "2022-01-14T07:32:36.000Z", "max_issues_repo_issues_event_min_datetime": "2016-02-09T05:36:44.000Z", "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "L-TChen/agda-prelude", "max_issues_repo_path": "src/Prelude/Functor.agda", "max_line_length": 99, "max_stars_count": 111, "max_stars_repo_head_hexsha": "158d299b1b365e186f00d8ef5b8c6844235ee267", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "L-TChen/agda-prelude", "max_stars_repo_path": "src/Prelude/Functor.agda", "max_stars_repo_stars_event_max_datetime": "2022-02-12T23:29:26.000Z", "max_stars_repo_stars_event_min_datetime": "2015-01-05T11:28:15.000Z", "num_tokens": 655, "size": 1560 }
module Cats.Util.Logic.Classical where open import Cats.Util.Logic.Constructive public -- (Strong) law of the excluded middle postulate lem : ∀ {p} (P : Set p) → P ∨ ¬ P -- Double negation elimination ¬¬-elim : ∀ {p} {P : Set p} → ¬ ¬ P → P ¬¬-elim {P = P} ¬¬p with lem P ... | ∨-introl p = p ... | ∨-intror ¬p = ⊥-elim (¬¬p ¬p) -- Contrapositive contrapositive : ∀ {p q} {P : Set p} {Q : Set q} → (¬ Q → ¬ P) → P → Q contrapositive {P = P} {Q} contra p with lem Q ... | ∨-introl q = q ... | ∨-intror ¬q = ⊥-elim (contra ¬q p) -- De Morgan's nonconstructive rule ¬∧→¬∨¬ : ∀ {p q} {P : Set p} {Q : Set q} → ¬ (P ∧ Q) → ¬ P ∨ ¬ Q ¬∧→¬∨¬ {P = P} {Q} ¬p∧q with lem P | lem Q ... | ∨-introl p | ∨-introl q = ⊥-elim (¬p∧q (p , q)) ... | ∨-introl _ | ∨-intror ¬q = ∨-intror ¬q ... | ∨-intror ¬p | _ = ∨-introl ¬p -- Negation and ∀ ¬∀→∃¬ : ∀ {u p} {U : Set u} {P : U → Set p} → ¬ (∀ u → P u) → ∃[ u ] (¬ P u) ¬∀→∃¬ ¬∀ = ¬¬-elim (λ ¬∃¬ → ¬∀ (λ u → ¬¬-elim (λ pu → ¬∃¬ (u , pu))))
{ "alphanum_fraction": 0.4630738523, "avg_line_length": 26.3684210526, "ext": "agda", "hexsha": "ac5026d68c6cc0012161a31752ee692e4228d298", "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/Logic/Classical.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/Logic/Classical.agda", "max_line_length": 69, "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/Logic/Classical.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 473, "size": 1002 }
------------------------------------------------------------------------ -- The Agda standard library -- -- Finding the maximum/minimum values in a list ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Relation.Binary using (TotalOrder; Setoid) module Data.List.Extrema {b ℓ₁ ℓ₂} (totalOrder : TotalOrder b ℓ₁ ℓ₂) where import Algebra.Construct.NaturalChoice.Min as Min import Algebra.Construct.NaturalChoice.Max as Max open import Data.List.Base using (List; foldr) open import Data.List.Relation.Unary.Any as Any using (Any; here; there) open import Data.List.Relation.Unary.All using (All; []; _∷_; lookup; map; tabulate) open import Data.List.Membership.Propositional using (_∈_; lose) open import Data.List.Membership.Propositional.Properties using (foldr-selective) open import Data.List.Relation.Binary.Subset.Propositional using (_⊆_) open import Data.List.Properties open import Data.Sum.Base using (_⊎_; inj₁; inj₂) open import Function using (id; flip; _on_) open import Level using (Level) open import Relation.Unary using (Pred) import Relation.Binary.Construct.NonStrictToStrict as NonStrictToStrict open import Relation.Binary.PropositionalEquality using (_≡_; sym; subst) renaming (refl to ≡-refl) import Relation.Binary.Construct.On as On ------------------------------------------------------------------------------ -- Setup open TotalOrder totalOrder renaming (Carrier to B) open NonStrictToStrict _≈_ _≤_ using (_<_) open import Data.List.Extrema.Core totalOrder renaming (⊓ᴸ to ⊓-lift; ⊔ᴸ to ⊔-lift) private variable a p : Level A : Set a ------------------------------------------------------------------------------ -- Functions argmin : (A → B) → A → List A → A argmin f = foldr (⊓-lift f) argmax : (A → B) → A → List A → A argmax f = foldr (⊔-lift f) min : B → List B → B min = argmin id max : B → List B → B max = argmax id ------------------------------------------------------------------------------ -- Properties of argmin module _ {f : A → B} where f[argmin]≤v⁺ : ∀ {v} ⊤ xs → (f ⊤ ≤ v) ⊎ (Any (λ x → f x ≤ v) xs) → f (argmin f ⊤ xs) ≤ v f[argmin]≤v⁺ = foldr-preservesᵒ (⊓ᴸ-presᵒ-≤v f) f[argmin]<v⁺ : ∀ {v} ⊤ xs → (f ⊤ < v) ⊎ (Any (λ x → f x < v) xs) → f (argmin f ⊤ xs) < v f[argmin]<v⁺ = foldr-preservesᵒ (⊓ᴸ-presᵒ-<v f) v≤f[argmin]⁺ : ∀ {v ⊤ xs} → v ≤ f ⊤ → All (λ x → v ≤ f x) xs → v ≤ f (argmin f ⊤ xs) v≤f[argmin]⁺ = foldr-preservesᵇ (⊓ᴸ-presᵇ-v≤ f) v<f[argmin]⁺ : ∀ {v ⊤ xs} → v < f ⊤ → All (λ x → v < f x) xs → v < f (argmin f ⊤ xs) v<f[argmin]⁺ = foldr-preservesᵇ (⊓ᴸ-presᵇ-v< f) f[argmin]≤f[⊤] : ∀ ⊤ xs → f (argmin f ⊤ xs) ≤ f ⊤ f[argmin]≤f[⊤] ⊤ xs = f[argmin]≤v⁺ ⊤ xs (inj₁ refl) f[argmin]≤f[xs] : ∀ ⊤ xs → All (λ x → f (argmin f ⊤ xs) ≤ f x) xs f[argmin]≤f[xs] ⊤ xs = foldr-forcesᵇ (⊓ᴸ-forcesᵇ-v≤ f) ⊤ xs refl f[argmin]≈f[v]⁺ : ∀ {v ⊤ xs} → v ∈ xs → All (λ x → f v ≤ f x) xs → f v ≤ f ⊤ → f (argmin f ⊤ xs) ≈ f v f[argmin]≈f[v]⁺ v∈xs fv≤fxs fv≤f⊤ = antisym (f[argmin]≤v⁺ _ _ (inj₂ (lose v∈xs refl))) (v≤f[argmin]⁺ fv≤f⊤ fv≤fxs) argmin[xs]≤argmin[ys]⁺ : ∀ {f g : A → B} ⊤₁ {⊤₂} xs {ys : List A} → (f ⊤₁ ≤ g ⊤₂) ⊎ Any (λ x → f x ≤ g ⊤₂) xs → All (λ y → (f ⊤₁ ≤ g y) ⊎ Any (λ x → f x ≤ g y) xs) ys → f (argmin f ⊤₁ xs) ≤ g (argmin g ⊤₂ ys) argmin[xs]≤argmin[ys]⁺ ⊤₁ xs xs≤⊤₂ xs≤ys = v≤f[argmin]⁺ (f[argmin]≤v⁺ ⊤₁ _ xs≤⊤₂) (map (f[argmin]≤v⁺ ⊤₁ xs) xs≤ys) argmin[xs]<argmin[ys]⁺ : ∀ {f g : A → B} ⊤₁ {⊤₂} xs {ys : List A} → (f ⊤₁ < g ⊤₂) ⊎ Any (λ x → f x < g ⊤₂) xs → All (λ y → (f ⊤₁ < g y) ⊎ Any (λ x → f x < g y) xs) ys → f (argmin f ⊤₁ xs) < g (argmin g ⊤₂ ys) argmin[xs]<argmin[ys]⁺ ⊤₁ xs xs<⊤₂ xs<ys = v<f[argmin]⁺ (f[argmin]<v⁺ ⊤₁ _ xs<⊤₂) (map (f[argmin]<v⁺ ⊤₁ xs) xs<ys) argmin-sel : ∀ (f : A → B) ⊤ xs → (argmin f ⊤ xs ≡ ⊤) ⊎ (argmin f ⊤ xs ∈ xs) argmin-sel f = foldr-selective (⊓ᴸ-sel f) argmin-all : ∀ (f : A → B) {⊤ xs} {P : Pred A p} → P ⊤ → All P xs → P (argmin f ⊤ xs) argmin-all f {⊤} {xs} {P = P} p⊤ pxs with argmin-sel f ⊤ xs ... | inj₁ argmin≡⊤ = subst P (sym argmin≡⊤) p⊤ ... | inj₂ argmin∈xs = lookup pxs argmin∈xs ------------------------------------------------------------------------------ -- Properties of argmax module _ {f : A → B} where v≤f[argmax]⁺ : ∀ {v} ⊥ xs → (v ≤ f ⊥) ⊎ (Any (λ x → v ≤ f x) xs) → v ≤ f (argmax f ⊥ xs) v≤f[argmax]⁺ = foldr-preservesᵒ (⊔ᴸ-presᵒ-v≤ f) v<f[argmax]⁺ : ∀ {v} ⊥ xs → (v < f ⊥) ⊎ (Any (λ x → v < f x) xs) → v < f (argmax f ⊥ xs) v<f[argmax]⁺ = foldr-preservesᵒ (⊔ᴸ-presᵒ-v< f) f[argmax]≤v⁺ : ∀ {v ⊥ xs} → f ⊥ ≤ v → All (λ x → f x ≤ v) xs → f (argmax f ⊥ xs) ≤ v f[argmax]≤v⁺ = foldr-preservesᵇ (⊔ᴸ-presᵇ-≤v f) f[argmax]<v⁺ : ∀ {v ⊥ xs} → f ⊥ < v → All (λ x → f x < v) xs → f (argmax f ⊥ xs) < v f[argmax]<v⁺ = foldr-preservesᵇ (⊔ᴸ-presᵇ-<v f) f[⊥]≤f[argmax] : ∀ ⊥ xs → f ⊥ ≤ f (argmax f ⊥ xs) f[⊥]≤f[argmax] ⊥ xs = v≤f[argmax]⁺ ⊥ xs (inj₁ refl) f[xs]≤f[argmax] : ∀ ⊥ xs → All (λ x → f x ≤ f (argmax f ⊥ xs)) xs f[xs]≤f[argmax] ⊥ xs = foldr-forcesᵇ (⊔ᴸ-forcesᵇ-≤v f) ⊥ xs refl f[argmax]≈f[v]⁺ : ∀ {v ⊥ xs} → v ∈ xs → All (λ x → f x ≤ f v) xs → f ⊥ ≤ f v → f (argmax f ⊥ xs) ≈ f v f[argmax]≈f[v]⁺ v∈xs fxs≤fv f⊥≤fv = antisym (f[argmax]≤v⁺ f⊥≤fv fxs≤fv) (v≤f[argmax]⁺ _ _ (inj₂ (lose v∈xs refl))) argmax[xs]≤argmax[ys]⁺ : ∀ {f g : A → B} {⊥₁} ⊥₂ {xs : List A} ys → (f ⊥₁ ≤ g ⊥₂) ⊎ Any (λ y → f ⊥₁ ≤ g y) ys → All (λ x → (f x ≤ g ⊥₂) ⊎ Any (λ y → f x ≤ g y) ys) xs → f (argmax f ⊥₁ xs) ≤ g (argmax g ⊥₂ ys) argmax[xs]≤argmax[ys]⁺ ⊥₂ ys ⊥₁≤ys xs≤ys = f[argmax]≤v⁺ (v≤f[argmax]⁺ ⊥₂ _ ⊥₁≤ys) (map (v≤f[argmax]⁺ ⊥₂ ys) xs≤ys) argmax[xs]<argmax[ys]⁺ : ∀ {f g : A → B} {⊥₁} ⊥₂ {xs : List A} ys → (f ⊥₁ < g ⊥₂) ⊎ Any (λ y → f ⊥₁ < g y) ys → All (λ x → (f x < g ⊥₂) ⊎ Any (λ y → f x < g y) ys) xs → f (argmax f ⊥₁ xs) < g (argmax g ⊥₂ ys) argmax[xs]<argmax[ys]⁺ ⊥₂ ys ⊥₁<ys xs<ys = f[argmax]<v⁺ (v<f[argmax]⁺ ⊥₂ _ ⊥₁<ys) (map (v<f[argmax]⁺ ⊥₂ ys) xs<ys) argmax-sel : ∀ (f : A → B) ⊥ xs → (argmax f ⊥ xs ≡ ⊥) ⊎ (argmax f ⊥ xs ∈ xs) argmax-sel f = foldr-selective (⊔ᴸ-sel f) argmax-all : ∀ (f : A → B) {P : Pred A p} {⊥ xs} → P ⊥ → All P xs → P (argmax f ⊥ xs) argmax-all f {P = P} {⊥} {xs} p⊥ pxs with argmax-sel f ⊥ xs ... | inj₁ argmax≡⊥ = subst P (sym argmax≡⊥) p⊥ ... | inj₂ argmax∈xs = lookup pxs argmax∈xs ------------------------------------------------------------------------------ -- Properties of min min≤v⁺ : ∀ {v} ⊤ xs → ⊤ ≤ v ⊎ Any (_≤ v) xs → min ⊤ xs ≤ v min≤v⁺ = f[argmin]≤v⁺ min<v⁺ : ∀ {v} ⊤ xs → ⊤ < v ⊎ Any (_< v) xs → min ⊤ xs < v min<v⁺ = f[argmin]<v⁺ v≤min⁺ : ∀ {v ⊤ xs} → v ≤ ⊤ → All (v ≤_) xs → v ≤ min ⊤ xs v≤min⁺ = v≤f[argmin]⁺ v<min⁺ : ∀ {v ⊤ xs} → v < ⊤ → All (v <_) xs → v < min ⊤ xs v<min⁺ = v<f[argmin]⁺ min≤⊤ : ∀ ⊤ xs → min ⊤ xs ≤ ⊤ min≤⊤ = f[argmin]≤f[⊤] min≤xs : ∀ ⊥ xs → All (min ⊥ xs ≤_) xs min≤xs = f[argmin]≤f[xs] min≈v⁺ : ∀ {v ⊤ xs} → v ∈ xs → All (v ≤_) xs → v ≤ ⊤ → min ⊤ xs ≈ v min≈v⁺ = f[argmin]≈f[v]⁺ min[xs]≤min[ys]⁺ : ∀ ⊤₁ {⊤₂} xs {ys} → (⊤₁ ≤ ⊤₂) ⊎ Any (_≤ ⊤₂) xs → All (λ y → (⊤₁ ≤ y) ⊎ Any (λ x → x ≤ y) xs) ys → min ⊤₁ xs ≤ min ⊤₂ ys min[xs]≤min[ys]⁺ = argmin[xs]≤argmin[ys]⁺ min[xs]<min[ys]⁺ : ∀ ⊤₁ {⊤₂} xs {ys} → (⊤₁ < ⊤₂) ⊎ Any (_< ⊤₂) xs → All (λ y → (⊤₁ < y) ⊎ Any (λ x → x < y) xs) ys → min ⊤₁ xs < min ⊤₂ ys min[xs]<min[ys]⁺ = argmin[xs]<argmin[ys]⁺ ------------------------------------------------------------------------------ -- Properties of max max≤v⁺ : ∀ {v ⊥ xs} → ⊥ ≤ v → All (_≤ v) xs → max ⊥ xs ≤ v max≤v⁺ = f[argmax]≤v⁺ max<v⁺ : ∀ {v ⊥ xs} → ⊥ < v → All (_< v) xs → max ⊥ xs < v max<v⁺ = f[argmax]<v⁺ v≤max⁺ : ∀ {v} ⊥ xs → v ≤ ⊥ ⊎ Any (v ≤_) xs → v ≤ max ⊥ xs v≤max⁺ = v≤f[argmax]⁺ v<max⁺ : ∀ {v} ⊥ xs → v < ⊥ ⊎ Any (v <_) xs → v < max ⊥ xs v<max⁺ = v<f[argmax]⁺ ⊥≤max : ∀ ⊥ xs → ⊥ ≤ max ⊥ xs ⊥≤max = f[⊥]≤f[argmax] xs≤max : ∀ ⊥ xs → All (_≤ max ⊥ xs) xs xs≤max = f[xs]≤f[argmax] max≈v⁺ : ∀ {v ⊤ xs} → v ∈ xs → All (_≤ v) xs → ⊤ ≤ v → max ⊤ xs ≈ v max≈v⁺ = f[argmax]≈f[v]⁺ max[xs]≤max[ys]⁺ : ∀ {⊥₁} ⊥₂ {xs} ys → ⊥₁ ≤ ⊥₂ ⊎ Any (⊥₁ ≤_) ys → All (λ x → x ≤ ⊥₂ ⊎ Any (x ≤_) ys) xs → max ⊥₁ xs ≤ max ⊥₂ ys max[xs]≤max[ys]⁺ = argmax[xs]≤argmax[ys]⁺ max[xs]<max[ys]⁺ : ∀ {⊥₁} ⊥₂ {xs} ys → ⊥₁ < ⊥₂ ⊎ Any (⊥₁ <_) ys → All (λ x → x < ⊥₂ ⊎ Any (x <_) ys) xs → max ⊥₁ xs < max ⊥₂ ys max[xs]<max[ys]⁺ = argmax[xs]<argmax[ys]⁺
{ "alphanum_fraction": 0.4530411449, "avg_line_length": 37.112033195, "ext": "agda", "hexsha": "6b3685c7429e236be63adcf280a014d4c01b5e14", "lang": "Agda", "max_forks_count": 1, "max_forks_repo_forks_event_max_datetime": "2021-11-04T06:54:45.000Z", "max_forks_repo_forks_event_min_datetime": "2021-11-04T06:54:45.000Z", "max_forks_repo_head_hexsha": "fb380f2e67dcb4a94f353dbaec91624fcb5b8933", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "DreamLinuxer/popl21-artifact", "max_forks_repo_path": "agda-stdlib/src/Data/List/Extrema.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "fb380f2e67dcb4a94f353dbaec91624fcb5b8933", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "DreamLinuxer/popl21-artifact", "max_issues_repo_path": "agda-stdlib/src/Data/List/Extrema.agda", "max_line_length": 84, "max_stars_count": 5, "max_stars_repo_head_hexsha": "fb380f2e67dcb4a94f353dbaec91624fcb5b8933", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "DreamLinuxer/popl21-artifact", "max_stars_repo_path": "agda-stdlib/src/Data/List/Extrema.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": 4113, "size": 8944 }
------------------------------------------------------------------------------ -- Fair properties ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTIONS --without-K #-} module FOTC.Program.ABP.Fair.PropertiesATP where open import FOTC.Base open import FOTC.Base.List open import FOTC.Data.List open import FOTC.Program.ABP.Fair.Type open import FOTC.Program.ABP.Terms ------------------------------------------------------------------------------ -- Because a greatest post-fixed point is a fixed-point, then the Fair -- predicate is also a pre-fixed point of the functional FairF, i.e. -- -- FairF Fair ≤ Fair (see FOTC.Program.ABP.Fair). -- See Issue https://github.com/asr/apia/issues/81 . Fair-inA : D → Set Fair-inA os = ∃[ ft ] ∃[ os' ] F*T ft ∧ os ≡ ft ++ os' ∧ Fair os' {-# ATP definition Fair-inA #-} Fair-in : ∀ {os} → ∃[ ft ] ∃[ os' ] F*T ft ∧ os ≡ ft ++ os' ∧ Fair os' → Fair os Fair-in h = Fair-coind Fair-inA h' h where postulate h' : ∀ {os} → Fair-inA os → ∃[ ft ] ∃[ os' ] F*T ft ∧ os ≡ ft ++ os' ∧ Fair-inA os' {-# ATP prove h' #-} head-tail-Fair : ∀ {os} → Fair os → os ≡ T ∷ tail₁ os ∨ os ≡ F ∷ tail₁ os head-tail-Fair {os} Fos with Fair-out Fos ... | (.(T ∷ []) , os' , f*tnil , h , Fos') = prf where postulate prf : os ≡ T ∷ tail₁ os ∨ os ≡ F ∷ tail₁ os {-# ATP prove prf #-} ... | (.(F ∷ ft) , os' , f*tcons {ft} FTft , h , Fos') = prf where postulate prf : os ≡ T ∷ tail₁ os ∨ os ≡ F ∷ tail₁ os {-# ATP prove prf #-} tail-Fair : ∀ {os} → Fair os → Fair (tail₁ os) tail-Fair {os} Fos with Fair-out Fos ... | .(T ∷ []) , os' , f*tnil , h , Fos' = prf where postulate prf : Fair (tail₁ os) {-# ATP prove prf #-} ... | .(F ∷ ft) , os' , f*tcons {ft} FTft , h , Fos' = prf where postulate prf : Fair (tail₁ os) {-# ATP prove prf Fair-in #-}
{ "alphanum_fraction": 0.4972513743, "avg_line_length": 33.35, "ext": "agda", "hexsha": "ed840e09574b9daa124f997fce42fb21af052da0", "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/ABP/Fair/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/Program/ABP/Fair/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/Program/ABP/Fair/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": 649, "size": 2001 }
open import Agda.Primitive open import Data.Unit open import Data.Nat hiding (_⊔_ ; _^_) open import Data.Integer hiding (_⊔_) open import Data.List open import Data.List.Relation.Unary.Any open import Data.List.Relation.Unary.All as All open import Data.List.Membership.Propositional open import Data.Product open import Data.Maybe hiding (_>>=_) open import Data.List.Prefix open import Data.List.Properties.Extra open import Data.List.All.Properties.Extra open import Function open import Relation.Binary.PropositionalEquality hiding ([_]) open ≡-Reasoning open import Common.Weakening -- This file contains the definitional interpreter for STLC using -- scopes and frames, described in Section 4 of the paper. -- The scopes-and-frames library assumes that we are given a -- particular scope graph, with `k` scopes. The following module is -- parameterized by a `k` representing the number of scopes that a -- particular object language program has. module STLCSF.Semantics (k : ℕ) where ----------- -- TYPES -- ----------- data Ty : Set where unit : Ty _⇒_ : (a b : Ty) → Ty int : Ty -- The library is loaded and passed two arguments: -- -- * `k` is the size of the scope graph for an object program -- -- * `Ty` is the type of declarations in the scope graph open import ScopesFrames.ScopesFrames k Ty -- Our interpreter is parameterized by a scope graph, via the module -- below. module Syntax (g : Graph) where -- We load all the scope graph definitions in the scope graph -- library, by passing the object scope graph `g` as module -- parameter: open UsesGraph g ------------ -- SYNTAX -- ------------ -- We can now define our well-typed syntax as described in the paper -- Section 4.2: data Expr (s : Scope) : Ty → Set where unit : Expr s unit var : ∀ {t} → (s ↦ t) → Expr s t ƛ : ∀ {s' a b} → ⦃ shape : g s' ≡ ( [ a ] , [ s ] ) ⦄ → Expr s' b → Expr s (a ⇒ b) _·_ : ∀ {a b} → Expr s (a ⇒ b) → Expr s a → Expr s b num : ℤ → Expr s int iop : (ℤ → ℤ → ℤ) → (l r : Expr s int) → Expr s int ------------ -- VALUES -- ------------ -- We can also define well-typed values as described in the paper -- Section 4.4: data Val : Ty → (Σ : HeapTy) → Set where unit : ∀ {Σ} → Val unit Σ ⟨_,_⟩ : ∀ {Σ s s' a b}⦃ shape : g s' ≡ ( [ a ] , [ s ] ) ⦄ → Expr s' b → Frame s Σ → Val (a ⇒ b) Σ num : ∀ {Σ} → ℤ → Val int Σ val-weaken : ∀ {t Σ Σ'} → Σ ⊑ Σ' → Val t Σ → Val t Σ' val-weaken ext ⟨ e , f ⟩ = ⟨ e , wk ext f ⟩ val-weaken ext unit = unit val-weaken ext (num z) = num z -- We can now load the frames definitions of the scopes-and-frames -- library. As described in Section 4.3 of the paper, our notion of -- frame assumes a notion of weakenable value, to be passed as -- module arguments to `UsesVal`: open UsesVal Val val-weaken renaming (getFrame to getFrame') -- We rename `getFrame` from the scopes-and-frames library so that -- we can use `getFrame` as the name of the monadic operation which -- returns the "current frame pointer" below. ----------- -- MONAD -- ----------- -- These definitions correspond to Section 4.4. M : (s : Scope) → (HeapTy → Set) → HeapTy → Set M s p Σ = Frame s Σ → Heap Σ → Maybe (∃ λ Σ' → (Heap Σ' × p Σ' × Σ ⊑ Σ')) _>>=_ : ∀ {s Σ}{p q : List Scope → Set} → M s p Σ → (∀ {Σ'} → p Σ' → M s q Σ') → M s q Σ (a >>= b) f h with (a f h) ... | nothing = nothing ... | just (Σ , h' , v , ext) with (b v (wk ext f) h') ... | nothing = nothing ... | just (Σ' , h'' , v' , ext') = just (Σ' , h'' , v' , ext ⊚ ext') return : ∀ {s Σ}{p : List Scope → Set} → p Σ → M s p Σ return v f h = just (_ , h , v , ⊑-refl) getFrame : ∀ {s Σ} → M s (Frame s) Σ getFrame f = return f f usingFrame : ∀ {s s' Σ}{p : List Scope → Set} → Frame s Σ → M s p Σ → M s' p Σ usingFrame f a _ = a f timeout : ∀ {s Σ}{p : List Scope → Set} → M s p Σ timeout _ _ = nothing init : ∀ {Σ s' ds es}(s : Scope)⦃ shape : g s ≡ (ds , es) ⦄ → Slots ds Σ → Links es Σ → M s' (Frame s) Σ init {Σ} s slots links _ h with (initFrame s slots links h) ... | (f' , h') = just (_ , h' , f' , ∷ʳ-⊒ s Σ) getv : ∀ {s t Σ} → (s ↦ t) → M s (Val t) Σ getv p f h = return (getVal p f h) f h _^_ : ∀ {Σ Γ}{p q : List Scope → Set} → ⦃ w : Weakenable q ⦄ → M Γ p Σ → q Σ → M Γ (p ⊗ q) Σ (a ^ x) f h with (a f h) ... | nothing = nothing ... | just (Σ , h' , v , ext) = just (Σ , h' , (v , wk ext x) , ext) sₑ : ∀ {s t} → Expr s t → Scope sₑ {s} _ = s eval : ℕ → ∀ {s t Σ} → Expr s t → M s (Val t) Σ eval zero _ = timeout eval (suc k) unit = return unit eval (suc k) (var x) = getv x eval (suc k) (ƛ e) = getFrame >>= λ f → return ⟨ e , f ⟩ eval (suc k) (l · r) = eval k l >>= λ{ ⟨ e , f ⟩ → (eval k r ^ f) >>= λ{ (v , f) → init (sₑ e) (v ∷ []) (f ∷ []) >>= λ f' → usingFrame f' (eval k e) }} eval (suc k) (num z) = return (num z) eval (suc k) (iop f l r) = eval k l >>= λ{ (num z₁) → eval k r >>= λ{ (num z₂) → return (num (f z₁ z₂)) }}
{ "alphanum_fraction": 0.5460601447, "avg_line_length": 30.5465116279, "ext": "agda", "hexsha": "aa39d1363fee40ee6c4d3e0965b5a9ff24141c6a", "lang": "Agda", "max_forks_count": 1, "max_forks_repo_forks_event_max_datetime": "2021-12-28T17:38:05.000Z", "max_forks_repo_forks_event_min_datetime": "2021-12-28T17:38:05.000Z", "max_forks_repo_head_hexsha": "0c096fea1716d714db0ff204ef2a9450b7a816df", "max_forks_repo_licenses": [ "Apache-2.0" ], "max_forks_repo_name": "metaborg/mj.agda", "max_forks_repo_path": "src/STLCSF/Semantics.agda", "max_issues_count": 1, "max_issues_repo_head_hexsha": "0c096fea1716d714db0ff204ef2a9450b7a816df", "max_issues_repo_issues_event_max_datetime": "2020-10-14T13:41:58.000Z", "max_issues_repo_issues_event_min_datetime": "2019-01-13T13:03:47.000Z", "max_issues_repo_licenses": [ "Apache-2.0" ], "max_issues_repo_name": "metaborg/mj.agda", "max_issues_repo_path": "src/STLCSF/Semantics.agda", "max_line_length": 90, "max_stars_count": 10, "max_stars_repo_head_hexsha": "0c096fea1716d714db0ff204ef2a9450b7a816df", "max_stars_repo_licenses": [ "Apache-2.0" ], "max_stars_repo_name": "metaborg/mj.agda", "max_stars_repo_path": "src/STLCSF/Semantics.agda", "max_stars_repo_stars_event_max_datetime": "2021-09-24T08:02:33.000Z", "max_stars_repo_stars_event_min_datetime": "2017-11-17T17:10:36.000Z", "num_tokens": 1896, "size": 5254 }
open import MLib.Algebra.PropertyCode open import MLib.Algebra.PropertyCode.Structures module MLib.Matrix.SemiTensor.GeneralizesMul {c ℓ} (struct : Struct bimonoidCode c ℓ) where open import MLib.Prelude open import MLib.Matrix.Core open import MLib.Matrix.Equality struct open import MLib.Matrix.Mul struct open import MLib.Matrix.Tensor struct open import MLib.Matrix.SemiTensor.Core struct open import MLib.Algebra.Operations struct open Nat using () renaming (_+_ to _+ℕ_; _*_ to _*ℕ_) open import MLib.Fin.Parts.Simple open import Data.Nat.LCM open import Data.Nat.Divisibility -- Semi-tensor product generalizes the usual matrix product module _ ⦃ props : Has (1# is rightIdentity for * ∷ []) ⦄ where generalizes-⊗ : ∀ {m n o} (A : Matrix S m n) (B : Matrix S n o) → A ⋉ B ≃ A ⊗ B open _≃_ module Zero {m o} (A : Matrix S m 0) (B : Matrix S 0 o) where generalizes-⊗′ : A ⋉ B ≃ A ⊗ B generalizes-⊗′ .m≡p = Nat.*-identityʳ m generalizes-⊗′ .n≡q = Nat.*-identityʳ o generalizes-⊗′ .equal _ _ = S.refl module Nonzero {m n o} (A : Matrix S m (suc n)) (B : Matrix S (suc n) o) where private t = lcm (suc n) (suc n) .proj₁ t-lcm = lcm (suc n) (suc n) .proj₂ open Defn t-lcm renaming (n∣t to sn∣t; t/n to t/sn; p∣t to sn∣t′; t/p to t/sn′) A′′-lem : A′′ A B ≃ A B′′-lem : B′′ A B ≃ B generalizes-⊗′ : A ⋉ B ≃ A ⊗ B generalizes-⊗′ = ⊗-cong-≃ _ _ _ _ A′′-lem B′′-lem private abstract lcm-n-n : ∀ {n t} → LCM n n t → t ≡ n lcm-n-n {n} isLcm = let t∣n = LCM.least isLcm (∣-refl , ∣-refl) n∣t = LCM.commonMultiple isLcm .proj₁ in ∣-antisym t∣n n∣t quotient-n-n : ∀ {n} (p : suc n ∣ suc n) → quotient p ≡ 1 quotient-n-n (divides q equality) = Nat.*-cancelʳ-≡ q 1 (≡.sym (≡.trans (≡.cong suc (Nat.+-identityʳ _)) equality)) quotient-subst : ∀ {n p q} (n∣p : n ∣ p) (p≡q : p ≡ q) → quotient n∣p ≡ quotient (≡.subst (λ h → n ∣ h) p≡q n∣p) quotient-subst n∣p ≡.refl = ≡.refl t≡sn : t ≡ suc n t≡sn = lcm-n-n t-lcm t/sn≡1 : t/sn ≡ 1 t/sn≡1 = begin t/sn ≡⟨ quotient-subst sn∣t t≡sn ⟩ quotient (≡.subst (λ h → suc n ∣ h) t≡sn sn∣t) ≡⟨ quotient-n-n (≡.subst (λ h → suc n ∣ h) t≡sn sn∣t) ⟩ 1 ∎ where open ≡.Reasoning t/sn′≡1 : t/sn′ ≡ 1 t/sn′≡1 = begin t/sn′ ≡⟨ quotient-subst sn∣t′ t≡sn ⟩ quotient (≡.subst (λ h → suc n ∣ h) t≡sn sn∣t′) ≡⟨ quotient-n-n (≡.subst (λ h → suc n ∣ h) t≡sn sn∣t′) ⟩ 1 ∎ where open ≡.Reasoning lhs≡m : m *ℕ t/sn ≡ m lhs≡m = begin m *ℕ t/sn ≡⟨ ≡.cong₂ _*ℕ_ (≡.refl {x = m}) t/sn≡1 ⟩ m *ℕ 1 ≡⟨ Nat.*-identityʳ _ ⟩ m ∎ where open ≡.Reasoning rhs≡o : o *ℕ t/sn′ ≡ o rhs≡o = begin o *ℕ t/sn′ ≡⟨ ≡.cong₂ _*ℕ_ (≡.refl {x = o}) t/sn′≡1 ⟩ o *ℕ 1 ≡⟨ Nat.*-identityʳ _ ⟩ o ∎ where open ≡.Reasoning A′′-lem = ≃-trans (≡-subst-≃₂ lem₁) (≃-trans (⊠-cong (≃-refl {A = A}) (1●-cong-≃ t/sn≡1)) (⊠-identityʳ ⦃ weaken props ⦄ A)) B′′-lem = ≃-trans (≡-subst-≃₁ lem₂) (≃-trans (⊠-cong (≃-refl {A = B}) (1●-cong-≃ t/sn′≡1)) (⊠-identityʳ ⦃ weaken props ⦄ B)) generalizes-⊗ {n = zero} = Zero.generalizes-⊗′ generalizes-⊗ {n = suc n} = Nonzero.generalizes-⊗′
{ "alphanum_fraction": 0.5270034843, "avg_line_length": 34.099009901, "ext": "agda", "hexsha": "8ce1e18818ea7bf1b15a8cb624e58e3da8d266a2", "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": "e26ae2e0aa7721cb89865aae78625a2f3fd2b574", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "bch29/agda-matrices", "max_forks_repo_path": "src/MLib/Matrix/SemiTensor/GeneralizesMul.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "e26ae2e0aa7721cb89865aae78625a2f3fd2b574", "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": "bch29/agda-matrices", "max_issues_repo_path": "src/MLib/Matrix/SemiTensor/GeneralizesMul.agda", "max_line_length": 130, "max_stars_count": null, "max_stars_repo_head_hexsha": "e26ae2e0aa7721cb89865aae78625a2f3fd2b574", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "bch29/agda-matrices", "max_stars_repo_path": "src/MLib/Matrix/SemiTensor/GeneralizesMul.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 1499, "size": 3444 }
------------------------------------------------------------------------ -- The Agda standard library -- -- Vectors with fast append ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.DifferenceVec where open import Data.DifferenceNat open import Data.Vec as V using (Vec) open import Function import Data.Nat.Base as N infixr 5 _∷_ _++_ DiffVec : ∀ {ℓ} → Set ℓ → Diffℕ → Set ℓ DiffVec A m = ∀ {n} → Vec A n → Vec A (m n) [] : ∀ {a} {A : Set a} → DiffVec A 0# [] = λ k → k _∷_ : ∀ {a} {A : Set a} {n} → A → DiffVec A n → DiffVec A (suc n) x ∷ xs = λ k → V._∷_ x (xs k) [_] : ∀ {a} {A : Set a} → A → DiffVec A 1# [ x ] = x ∷ [] _++_ : ∀ {a} {A : Set a} {m n} → DiffVec A m → DiffVec A n → DiffVec A (m + n) xs ++ ys = λ k → xs (ys k) toVec : ∀ {a} {A : Set a} {n} → DiffVec A n → Vec A (toℕ n) toVec xs = xs V.[] -- fromVec xs is linear in the length of xs. fromVec : ∀ {a} {A : Set a} {n} → Vec A n → DiffVec A (fromℕ n) fromVec xs = λ k → xs ⟨ V._++_ ⟩ k head : ∀ {a} {A : Set a} {n} → DiffVec A (suc n) → A head xs = V.head (toVec xs) tail : ∀ {a} {A : Set a} {n} → DiffVec A (suc n) → DiffVec A n tail xs = λ k → V.tail (xs k) take : ∀ {a} {A : Set a} m {n} → DiffVec A (fromℕ m + n) → DiffVec A (fromℕ m) take N.zero xs = [] take (N.suc m) xs = head xs ∷ take m (tail xs) drop : ∀ {a} {A : Set a} m {n} → DiffVec A (fromℕ m + n) → DiffVec A n drop N.zero xs = xs drop (N.suc m) xs = drop m (tail xs)
{ "alphanum_fraction": 0.4795514512, "avg_line_length": 26.5964912281, "ext": "agda", "hexsha": "03392cf130068e15745851b57037973f2395ad66", "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/DifferenceVec.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/DifferenceVec.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/DifferenceVec.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 578, "size": 1516 }
{-# OPTIONS --safe #-} module Cubical.HITs.S2 where open import Cubical.HITs.S2.Base public open import Cubical.HITs.S2.Properties public
{ "alphanum_fraction": 0.7697841727, "avg_line_length": 23.1666666667, "ext": "agda", "hexsha": "d08280c309cac23987fa05fca0620c10d1b07452", "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/HITs/S2.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/HITs/S2.agda", "max_line_length": 45, "max_stars_count": 1, "max_stars_repo_head_hexsha": "58c0b83bb0fed0dc683f3d29b1709effe51c1689", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "thomas-lamiaux/cubical", "max_stars_repo_path": "Cubical/HITs/S2.agda", "max_stars_repo_stars_event_max_datetime": "2021-10-31T17:32:49.000Z", "max_stars_repo_stars_event_min_datetime": "2021-10-31T17:32:49.000Z", "num_tokens": 39, "size": 139 }
module Nat where data ℕ : Set where zero : ℕ suc : ℕ → ℕ _+_ : ℕ → ℕ → ℕ zero + a = a suc a + b = suc (a + b) data _≡_ {A : Set} : A → A → Set where refl : {a : A} → a ≡ a infix 4 _≡_ cong : {A B : Set} {a b : A} (f : A → B) → a ≡ b → f a ≡ f b cong f refl = refl +-assoc : (a b c : ℕ) → (a + b) + c ≡ a + (b + c) +-assoc zero b c = refl +-assoc (suc a) b c = cong suc (+-assoc a b c)
{ "alphanum_fraction": 0.4623115578, "avg_line_length": 18.0909090909, "ext": "agda", "hexsha": "cba1fa9dbd68d565381e97c46eed596ce5ac9d38", "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": "a8902e36ed2037de9008e061d54517d4d7d99f0f", "max_forks_repo_licenses": [ "BSD-3-Clause" ], "max_forks_repo_name": "divipp/agda-intro-prezi", "max_forks_repo_path": "Nat.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "a8902e36ed2037de9008e061d54517d4d7d99f0f", "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": "divipp/agda-intro-prezi", "max_issues_repo_path": "Nat.agda", "max_line_length": 60, "max_stars_count": 2, "max_stars_repo_head_hexsha": "a8902e36ed2037de9008e061d54517d4d7d99f0f", "max_stars_repo_licenses": [ "BSD-3-Clause" ], "max_stars_repo_name": "divipp/agda-intro-prezi", "max_stars_repo_path": "Nat.agda", "max_stars_repo_stars_event_max_datetime": "2020-01-21T14:53:25.000Z", "max_stars_repo_stars_event_min_datetime": "2018-11-27T02:50:48.000Z", "num_tokens": 185, "size": 398 }
module ModuleReexport where open import Common.Unit open import Common.Nat open import Common.IO module A (B : Set) (b : B) where data X : Set where Con1 : B -> X Con2 : X f : X -> B f (Con1 x) = x f Con2 = b module X = A Nat 10 main = printNat (A.f Nat 10 (X.Con1 20)) ,, putStrLn "" ,, printNat (A.f Nat 10 X.Con2) ,, putStrLn "" ,, return unit
{ "alphanum_fraction": 0.5968169761, "avg_line_length": 15.7083333333, "ext": "agda", "hexsha": "bda52e46721993989b7a9331f8f5e7eadcbc792e", "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/Compiler/simple/ModuleReexport.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/Compiler/simple/ModuleReexport.agda", "max_line_length": 43, "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/Compiler/simple/ModuleReexport.agda", "max_stars_repo_stars_event_max_datetime": "2022-03-30T18:20:48.000Z", "max_stars_repo_stars_event_min_datetime": "2015-01-09T23:51:16.000Z", "num_tokens": 137, "size": 377 }
------------------------------------------------------------------------ -- The Agda standard library -- -- Symmetric closures of binary relations ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Relation.Binary.Construct.Closure.Symmetric where open import Data.Sum as Sum using (_⊎_) open import Function using (id) open import Relation.Binary open Sum public using () renaming (inj₁ to fwd; inj₂ to bwd) -- The symmetric closure of a relation. SymClosure : ∀ {a ℓ} {A : Set a} → Rel A ℓ → Rel A ℓ SymClosure _∼_ a b = a ∼ b ⊎ b ∼ a module _ {a ℓ} {A : Set a} where -- Symmetric closures are symmetric. symmetric : (_∼_ : Rel A ℓ) → Symmetric (SymClosure _∼_) symmetric _ (fwd a∼b) = bwd a∼b symmetric _ (bwd b∼a) = fwd b∼a -- A generalised variant of map which allows the index type to change. gmap : ∀ {b ℓ₂} {B : Set b} {P : Rel A ℓ} {Q : Rel B ℓ₂} → (f : A → B) → P =[ f ]⇒ Q → SymClosure P =[ f ]⇒ SymClosure Q gmap _ g = Sum.map g g map : ∀ {ℓ₂} {P : Rel A ℓ} {Q : Rel A ℓ₂} → P ⇒ Q → SymClosure P ⇒ SymClosure Q map = gmap id
{ "alphanum_fraction": 0.5409407666, "avg_line_length": 29.4358974359, "ext": "agda", "hexsha": "4b3aa74abacf4f0f1343bff4d96077cd2c9426e3", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "0debb886eb5dbcd38dbeebd04b34cf9d9c5e0e71", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "omega12345/agda-mode", "max_forks_repo_path": "test/asset/agda-stdlib-1.0/Relation/Binary/Construct/Closure/Symmetric.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "0debb886eb5dbcd38dbeebd04b34cf9d9c5e0e71", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "omega12345/agda-mode", "max_issues_repo_path": "test/asset/agda-stdlib-1.0/Relation/Binary/Construct/Closure/Symmetric.agda", "max_line_length": 72, "max_stars_count": null, "max_stars_repo_head_hexsha": "0debb886eb5dbcd38dbeebd04b34cf9d9c5e0e71", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "omega12345/agda-mode", "max_stars_repo_path": "test/asset/agda-stdlib-1.0/Relation/Binary/Construct/Closure/Symmetric.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 361, "size": 1148 }
{-# OPTIONS --omega-in-omega --no-termination-check --overlapping-instances #-} module Light.Library.Relation where open import Light.Level using (Level ; Setω) open import Light.Variable.Sets record Kind : Setω where field iℓ : Level Index : Set iℓ ℓf : Index → Level Proposition : ∀ i → Set (ℓf i) record Style (kind : Kind) : Setω where open Kind kind field true‐i false‐i : Index true : Proposition true‐i false : Proposition false‐i ¬‐index‐f : Index → Index ¬_ : ∀ {i} → Proposition i → Proposition (¬‐index‐f i) ∧‐index‐f ∨‐index‐f ⇢‐index‐f : Index → Index → Index _∧_ : ∀ {ia ib} → Proposition ia → Proposition ib → Proposition (∧‐index‐f ia ib) _∨_ : ∀ {ia ib} → Proposition ia → Proposition ib → Proposition (∨‐index‐f ia ib) _⇢_ : ∀ {ia ib} → Proposition ia → Proposition ib → Proposition (⇢‐index‐f ia ib) true‐set‐ℓf false‐set‐ℓf : Index → Level True : ∀ {i} → Proposition i → Set (true‐set‐ℓf i) False : ∀ {i} → Proposition i → Set (false‐set‐ℓf i) true‐is‐true : True true false‐is‐false : False false record Base : Setω where field ⦃ kind ⦄ : Kind field ⦃ style ⦄ : Style kind open Kind ⦃ ... ⦄ public open Style ⦃ ... ⦄ public
{ "alphanum_fraction": 0.5389972145, "avg_line_length": 34.1904761905, "ext": "agda", "hexsha": "000712144e5afee093cf78d88f3f85a684bc2197", "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/Relation.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/Relation.agda", "max_line_length": 93, "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/Relation.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": 420, "size": 1436 }
{-# OPTIONS --warning=error --safe --without-K #-} open import LogicalFormulae open import Numbers.Naturals.Definition open import Numbers.Naturals.Addition open import Numbers.Naturals.Multiplication open import Numbers.Naturals.Order module Numbers.Naturals.Exponentiation where _^N_ : ℕ → ℕ → ℕ a ^N zero = 1 a ^N succ b = a *N (a ^N b) exponentiationIncreases : (a b : ℕ) → (a ≡ 0) || (a ≤N a ^N (succ b)) exponentiationIncreases zero b = inl refl exponentiationIncreases (succ a) zero = inr (inr (applyEquality succ (transitivity (additionNIsCommutative 0 a) (multiplicationNIsCommutative 1 a)))) exponentiationIncreases (succ a) (succ b) with exponentiationIncreases (succ a) b exponentiationIncreases (succ a) (succ b) | inr (inl x) = inr (inl (canAddToOneSideOfInequality _ x)) exponentiationIncreases (succ a) (succ b) | inr (inr x) with productOne x exponentiationIncreases (succ 0) (succ b) | inr (inr x) | inr pr rewrite pr = inr (inr refl) exponentiationIncreases (succ (succ a)) (succ b) | inr (inr x) | inr pr rewrite pr | productWithOneRight a = inr (inl (le (succ (a +N a *N succ (succ a))) (additionNIsCommutative _ (succ (succ a)))))
{ "alphanum_fraction": 0.7312013829, "avg_line_length": 50.3043478261, "ext": "agda", "hexsha": "66f40430ad7d81ea2b9655caf66d6376a8e8e333", "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": "Numbers/Naturals/Exponentiation.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": "Numbers/Naturals/Exponentiation.agda", "max_line_length": 199, "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": "Numbers/Naturals/Exponentiation.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": 375, "size": 1157 }
module Issue296 where postulate Unit : Set IO : Set → Set foo : ((A B : Set) → Unit) → IO Unit bar : (A B : Set) → Unit {-# BUILTIN IO IO #-} {-# COMPILED_TYPE IO IO #-} {-# COMPILED_TYPE Unit () #-} {-# COMPILED bar undefined #-} main : IO Unit main = foo bar
{ "alphanum_fraction": 0.5724637681, "avg_line_length": 17.25, "ext": "agda", "hexsha": "d6a9d1b132c5a1ca29f9d90f907747a41149d964", "lang": "Agda", "max_forks_count": 1, "max_forks_repo_forks_event_max_datetime": "2022-03-12T11:35:18.000Z", "max_forks_repo_forks_event_min_datetime": "2022-03-12T11:35:18.000Z", "max_forks_repo_head_hexsha": "70c8a575c46f6a568c7518150a1a64fcd03aa437", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "masondesu/agda", "max_forks_repo_path": "test/succeed/Issue296.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "70c8a575c46f6a568c7518150a1a64fcd03aa437", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "masondesu/agda", "max_issues_repo_path": "test/succeed/Issue296.agda", "max_line_length": 39, "max_stars_count": 1, "max_stars_repo_head_hexsha": "c0ae7d20728b15d7da4efff6ffadae6fe4590016", "max_stars_repo_licenses": [ "BSD-3-Clause" ], "max_stars_repo_name": "redfish64/autonomic-agda", "max_stars_repo_path": "test/Succeed/Issue296.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": 90, "size": 276 }
------------------------------------------------------------------------------ -- Testing nested axioms ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTIONS --without-K #-} module NestedAxioms.A where ------------------------------------------------------------------------------ postulate D : Set _≡_ : D → D → Set postulate a b : D a≡b : a ≡ b {-# ATP axiom a≡b #-}
{ "alphanum_fraction": 0.2991150442, "avg_line_length": 25.6818181818, "ext": "agda", "hexsha": "d38a6f4966054b0ebf7ef26357450a18930fbf50", "lang": "Agda", "max_forks_count": 4, "max_forks_repo_forks_event_max_datetime": "2016-08-03T03:54:55.000Z", "max_forks_repo_forks_event_min_datetime": "2016-05-10T23:06:19.000Z", "max_forks_repo_head_hexsha": "a66c5ddca2ab470539fd68c42c4fbd45f720d682", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "asr/apia", "max_forks_repo_path": "test/Succeed/fol-theorems/NestedAxioms/A.agda", "max_issues_count": 121, "max_issues_repo_head_hexsha": "a66c5ddca2ab470539fd68c42c4fbd45f720d682", "max_issues_repo_issues_event_max_datetime": "2018-04-22T06:01:44.000Z", "max_issues_repo_issues_event_min_datetime": "2015-01-25T13:22:12.000Z", "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "asr/apia", "max_issues_repo_path": "test/Succeed/fol-theorems/NestedAxioms/A.agda", "max_line_length": 78, "max_stars_count": 10, "max_stars_repo_head_hexsha": "a66c5ddca2ab470539fd68c42c4fbd45f720d682", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "asr/apia", "max_stars_repo_path": "test/Succeed/fol-theorems/NestedAxioms/A.agda", "max_stars_repo_stars_event_max_datetime": "2019-12-03T13:44:25.000Z", "max_stars_repo_stars_event_min_datetime": "2015-09-03T20:54:16.000Z", "num_tokens": 101, "size": 565 }
-- Andreas, 2016-11-02, issue #2285 raised by effectfully, found by dnkndnts -- {-# OPTIONS -v tc.data.fits:15 #-} -- {-# OPTIONS -v tc.conv.sort:30 #-} -- {-# OPTIONS -v tc.meta.assign:50 #-} -- {-# OPTIONS -v tc.meta.new:50 #-} -- {-# OPTIONS -v tc:10 #-} -- {-# OPTIONS -v tc.data:100 #-} mutual Type = _ data Big : Type where big : (∀ {α} → Set α) → Big -- Problem WAS: -- new sort meta _0 : .Agda.Primitive.Level -- new meta (?0) _1 : Set _0 -- new sort meta _2 : .Agda.Primitive.Level -- solving _0 := .Agda.Primitive.lsuc _2 -- solving _1 := Set _2 -- solving _2 := Setω -- Big should be rejected -- Even with Type = Setω : Setω, we do not get Hurkens through: {- ⊥ : Type ⊥ = (A : Type) → A ¬_ : Type → Type ¬ A = A → ⊥ -- We have some form of Type : Type P : Type → Type P A = A → Type U : Type U = (X : Type) → (P (P X) → X) → P (P X) test : Type test = P (P U) → U {- -- This is not accepted: τ : P (P U) → U τ = λ (t : P (P U)) (X : Type) (f : P (P X) → X) (p : P X) → t λ x → p (f (x X f)) σ : U → (P (P U)) σ = λ (s : U) → s U λ t → τ t Δ : P U Δ = \y → ¬ ((p : P U) → σ y p → p (τ (σ y))) Ω : U Ω = τ \p → (x : U) → σ x p → p x D : Type D = (p : P U) → σ Ω p → p (τ (σ Ω)) lem₁ : (p : P U) → ((x : U) → σ x p → p x) → p Ω lem₁ p H1 = H1 Ω \x → H1 (τ (σ x)) lem₂ : ¬ D lem₂ = lem₁ Δ \x H2 H3 → H3 Δ H2 \p → H3 \y → p (τ (σ y)) lem₃ : D lem₃ p = lem₁ \y → p (τ (σ y)) loop : ⊥ loop = lem₂ lem₃ -- -} -- -}
{ "alphanum_fraction": 0.4724618447, "avg_line_length": 20.0933333333, "ext": "agda", "hexsha": "9eea6f7f6d704dfb6fb9b0373f877df0b97c71ea", "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/Issue2285.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/Issue2285.agda", "max_line_length": 84, "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/Issue2285.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": 656, "size": 1507 }
-- Andreas, 2019-03-18, AIM XXIX, performance regression in 2.5.4 -- The following was quick in 2.5.3 postulate Bool : Set Foo : Bool → Bool → Bool → Bool → Bool → Bool → Bool → Bool → Bool → Set data FooRel : (x1 x1' : Bool) (x2 x2' : Bool) (x3 x3' : Bool) (x4 x4' : Bool) (x5 x5' : Bool) (x6 x6' : Bool) (x7 x7' : Bool) (x8 x8' : Bool) (x9 x9' : Bool) → Foo x1 x2 x3 x4 x5 x6 x7 x8 x9 → Foo x1' x2' x3' x4' x5' x6' x7' x8' x9' → Set where tran : (x1 x1' x1'' : Bool) (x2 x2' x2'' : Bool) (x3 x3' x3'' : Bool) (x4 x4' x4'' : Bool) (x5 x5' x5'' : Bool) (x6 x6' x6'' : Bool) (x7 x7' x7'' : Bool) (x8 x8' x8'' : Bool) (x9 x9' x9'' : Bool) (t : Foo x1 x2 x3 x4 x5 x6 x7 x8 x9) (t' : Foo x1' x2' x3' x4' x5' x6' x7' x8' x9') (t'' : Foo x1'' x2'' x3'' x4'' x5'' x6'' x7'' x8'' x9'') → FooRel x1 x1' x2 x2' x3 x3' x4 x4' x5 x5' x6 x6' x7 x7' x8 x8' x9 x9' t t' → FooRel x1' x1'' x2' x2'' x3' x3'' x4' x4'' x5' x5'' x6' x6'' x7' x7'' x8' x8'' x9' x9'' t' t'' → FooRel x1 x1'' x2 x2'' x3 x3'' x4 x4'' x5 x5'' x6 x6'' x7 x7'' x8 x8'' x9 x9'' t t'' foo : (x1 x1' : Bool) (x2 x2' : Bool) (x3 x3' : Bool) (x4 x4' : Bool) (x5 x5' : Bool) (x6 x6' : Bool) (x7 x7' : Bool) (x8 x8' : Bool) (x9 x9' : Bool) (t : Foo x1 x2 x3 x4 x5 x6 x7 x8 x9) (t' : Foo x1' x2' x3' x4' x5' x6' x7' x8' x9') → FooRel x1 x1' x2 x2' x3 x3' x4 x4' x5 x5' x6 x6' x7 x7' x8 x8' x9 x9' t t' → Set foo x1 x1' x2 x2' x3 x3' x4 x4' x5 x5' x6 x6' x7 x7' x8 x8' x9 x9' t t' (tran .x1 x1'' .x1' .x2 x2'' .x2' .x3 x3'' .x3' .x4 x4'' .x4' .x5 x5'' .x5' .x6 x6'' .x6' .x7 x7'' .x7' .x8 x8'' .x8' .x9 x9'' .x9' .t t'' .t' xy yz) = Bool -- Should check quickly again in 2.6.0
{ "alphanum_fraction": 0.4761640798, "avg_line_length": 32.2142857143, "ext": "agda", "hexsha": "398d030c38156cf5e14e1a3516d3aed5f0a8e2a8", "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/Issue3621.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/Issue3621.agda", "max_line_length": 228, "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/Issue3621.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": 976, "size": 1804 }
{-# OPTIONS --universe-polymorphism #-} module Categories.Monoidal.Symmetric where open import Level open import Categories.Category open import Categories.Monoidal open import Categories.Monoidal.Braided open import Categories.Monoidal.Helpers open import Categories.Monoidal.Braided.Helpers open import Categories.NaturalIsomorphism open import Categories.NaturalTransformation using (_∘₁_; _≡_; id) record Symmetric {o ℓ e} {C : Category o ℓ e} {M : Monoidal C} (B : Braided M) : Set (o ⊔ ℓ ⊔ e) where private module C = Category C private module M = Monoidal M private module B = Braided B -- open C hiding (id; identityˡ; identityʳ; assoc; _≡_) -- open M hiding (id) -- open MonoidalHelperFunctors C ⊗ M.id -- open BraidedHelperFunctors C ⊗ M.id private module NI = NaturalIsomorphism B.braid field symmetry : NI.F⇒G ∘₁ NI.F⇐G ≡ id
{ "alphanum_fraction": 0.738177624, "avg_line_length": 30.9642857143, "ext": "agda", "hexsha": "4cc69df9525191a96d2da95c6b380b6f48b13abd", "lang": "Agda", "max_forks_count": 23, "max_forks_repo_forks_event_max_datetime": "2021-11-11T13:50:56.000Z", "max_forks_repo_forks_event_min_datetime": "2015-02-05T13:03:09.000Z", "max_forks_repo_head_hexsha": "36f4181d751e2ecb54db219911d8c69afe8ba892", "max_forks_repo_licenses": [ "BSD-3-Clause" ], "max_forks_repo_name": "copumpkin/categories", "max_forks_repo_path": "Categories/Monoidal/Symmetric.agda", "max_issues_count": 19, "max_issues_repo_head_hexsha": "36f4181d751e2ecb54db219911d8c69afe8ba892", "max_issues_repo_issues_event_max_datetime": "2019-08-09T16:31:40.000Z", "max_issues_repo_issues_event_min_datetime": "2015-05-23T06:47:10.000Z", "max_issues_repo_licenses": [ "BSD-3-Clause" ], "max_issues_repo_name": "copumpkin/categories", "max_issues_repo_path": "Categories/Monoidal/Symmetric.agda", "max_line_length": 102, "max_stars_count": 98, "max_stars_repo_head_hexsha": "36f4181d751e2ecb54db219911d8c69afe8ba892", "max_stars_repo_licenses": [ "BSD-3-Clause" ], "max_stars_repo_name": "copumpkin/categories", "max_stars_repo_path": "Categories/Monoidal/Symmetric.agda", "max_stars_repo_stars_event_max_datetime": "2022-03-08T05:20:36.000Z", "max_stars_repo_stars_event_min_datetime": "2015-04-15T14:57:33.000Z", "num_tokens": 253, "size": 867 }
open import Common.Prelude open import Common.Reflect id : {A : Set} → A → A id x = x idTerm : Term idTerm = lam visible (def (quote id) (arg₁ ∷ arg₂ ∷ [])) where arg₁ = arg (arginfo hidden relevant) (def (quote Nat) []) arg₂ = arg (arginfo visible relevant) (var 0 []) -- Should fail since idTerm "λ z → id {Nat} z" id₂ : {A : Set} → A → A id₂ = unquote idTerm
{ "alphanum_fraction": 0.6196808511, "avg_line_length": 22.1176470588, "ext": "agda", "hexsha": "d5e49cb57c3eb01588300b7e467d17c2f4fd85e9", "lang": "Agda", "max_forks_count": 1, "max_forks_repo_forks_event_max_datetime": "2022-03-12T11:35:18.000Z", "max_forks_repo_forks_event_min_datetime": "2022-03-12T11:35:18.000Z", "max_forks_repo_head_hexsha": "70c8a575c46f6a568c7518150a1a64fcd03aa437", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "masondesu/agda", "max_forks_repo_path": "test/fail/Issue1012.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "70c8a575c46f6a568c7518150a1a64fcd03aa437", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "masondesu/agda", "max_issues_repo_path": "test/fail/Issue1012.agda", "max_line_length": 61, "max_stars_count": 1, "max_stars_repo_head_hexsha": "477c8c37f948e6038b773409358fd8f38395f827", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "larrytheliquid/agda", "max_stars_repo_path": "test/fail/Issue1012.agda", "max_stars_repo_stars_event_max_datetime": "2018-10-10T17:08:44.000Z", "max_stars_repo_stars_event_min_datetime": "2018-10-10T17:08:44.000Z", "num_tokens": 131, "size": 376 }
-- Andreas, 2022-03-07, issue #5809 reported by jamestmartin -- Regression in Agda 2.6.1. -- Not reducing irrelevant projections lead to non-inferable elim-terms -- and consequently to internal errors. -- -- The fix is to treat irrelevant projections as just functions, -- retaining their parameters, so that they remain inferable -- even if not in normal form. {-# OPTIONS --irrelevant-projections #-} {-# OPTIONS --allow-unsolved-metas #-} -- {-# OPTIONS --no-double-check #-} -- {-# OPTIONS -v impossible:100 #-} -- {-# OPTIONS -v tc:40 #-} open import Agda.Builtin.Equality record Squash {ℓ} (A : Set ℓ) : Set ℓ where constructor squash field .unsquash : A open Squash .test : ∀ {ℓ} {A : Set ℓ} (x : A) (y : Squash A) → {!!} test x y = {!!} where help : unsquash (squash x) ≡ unsquash y help = refl -- WAS: internal error. -- Should succeed with unsolved metas.
{ "alphanum_fraction": 0.6651685393, "avg_line_length": 26.9696969697, "ext": "agda", "hexsha": "128b3243bbddd1c3146c51db5a17e2168438c784", "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/Issue5809.agda", "max_issues_count": 6, "max_issues_repo_head_hexsha": "98c9382a59f707c2c97d75919e389fc2a783ac75", "max_issues_repo_issues_event_max_datetime": "2021-11-24T08:31:10.000Z", "max_issues_repo_issues_event_min_datetime": "2021-10-18T08:12:24.000Z", "max_issues_repo_licenses": [ "BSD-2-Clause" ], "max_issues_repo_name": "KDr2/agda", "max_issues_repo_path": "test/Succeed/Issue5809.agda", "max_line_length": 71, "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/Issue5809.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 260, "size": 890 }
module PatternSynonymParameterisedModule where data ℕ : Set where zero : ℕ suc : ℕ -> ℕ module M (A : Set) where pattern sss x = suc (suc (suc x)) open M ℕ na : ℕ na = sss 3
{ "alphanum_fraction": 0.6397849462, "avg_line_length": 12.4, "ext": "agda", "hexsha": "f879ebd05c8f92dd81de1d33d982cdbbe73570aa", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "20596e9dd9867166a64470dd24ea68925ff380ce", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "np/agda-git-experiment", "max_forks_repo_path": "test/fail/PatternSynonymParameterisedModule.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "20596e9dd9867166a64470dd24ea68925ff380ce", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "np/agda-git-experiment", "max_issues_repo_path": "test/fail/PatternSynonymParameterisedModule.agda", "max_line_length": 46, "max_stars_count": 1, "max_stars_repo_head_hexsha": "aa10ae6a29dc79964fe9dec2de07b9df28b61ed5", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "asr/agda-kanso", "max_stars_repo_path": "test/fail/PatternSynonymParameterisedModule.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": 67, "size": 186 }
{- 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.Types.LedgerInfoWithSignatures as LedgerInfoWithSignatures open import LibraBFT.ImplShared.Base.Types open import LibraBFT.ImplShared.Consensus.Types open import Optics.All open import Util.KVMap as Map open import Util.Hash open import Util.Prelude module LibraBFT.Impl.Types.Properties.LedgerInfoWithSignatures (self : LedgerInfoWithSignatures) (vv : ValidatorVerifier) where -- See comments in LibraBFT.Impl.Consensus.ConsensusTypes.Properties.QuorumCert postulate -- TODO-2: define and prove Contract : Set contract : LedgerInfoWithSignatures.verifySignatures self vv ≡ Right unit → Contract
{ "alphanum_fraction": 0.8019693654, "avg_line_length": 36.56, "ext": "agda", "hexsha": "72c475b72d52f909d128ffeeb10ac5375d3a971f", "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/Types/Properties/LedgerInfoWithSignatures.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/Types/Properties/LedgerInfoWithSignatures.agda", "max_line_length": 127, "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/Types/Properties/LedgerInfoWithSignatures.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 236, "size": 914 }
{-# OPTIONS --cubical-compatible --safe #-} open import Agda.Primitive as Prim public using (Level; _⊔_; Setω) renaming (lzero to zero; lsuc to suc) open import Agda.Builtin.Sigma public renaming (fst to proj₁; snd to proj₂) hiding (module Σ) infixr 2 _×_ variable a b c p q r : Level A B C : Set a _×_ : ∀ (A : Set a) (B : Set b) → Set (a ⊔ b) A × B = Σ A λ _ → B <_,_> : ∀ {A : Set a} {B : A → Set b} {C : ∀ {x} → B x → Set c} (f : (x : A) → B x) → ((x : A) → C (f x)) → ((x : A) → Σ (B x) C) < f , g > x = (f x , g x) map : ∀ {P : A → Set p} {Q : B → Set q} → (f : A → B) → (∀ {x} → P x → Q (f x)) → Σ A P → Σ B Q map f g (x , y) = (f x , g y) zip : ∀ {P : A → Set p} {Q : B → Set q} {R : C → Set r} → (_∙_ : A → B → C) → (∀ {x y} → P x → Q y → R (x ∙ y)) → Σ A P → Σ B Q → Σ C R zip _∙_ _∘_ (a , p) (b , q) = ((a ∙ b) , (p ∘ q)) curry′ : (A × B → C) → (A → B → C) curry′ k a b = k (a , b) swap : A × B → B × A swap (x , y) = (y , x) record Category (o ℓ e : Level) : Set (suc (o ⊔ ℓ ⊔ e)) where eta-equality infix 4 _≈_ _⇒_ infixr 9 _∘_ field Obj : Set o _⇒_ : Obj → Obj → Set ℓ _≈_ : ∀ {A B} → (A ⇒ B) → (A ⇒ B) → Set e _∘_ : ∀ {A B C} → (B ⇒ C) → (A ⇒ B) → (A ⇒ C) CommutativeSquare : ∀ {A B C D} → (f : A ⇒ B) (g : A ⇒ C) (h : B ⇒ D) (i : C ⇒ D) → Set _ CommutativeSquare f g h i = h ∘ f ≈ i ∘ g infix 10 _[_,_] _[_,_] : ∀ {o ℓ e} → (C : Category o ℓ e) → (X : Category.Obj C) → (Y : Category.Obj C) → Set ℓ _[_,_] = Category._⇒_ module Inner {x₁ x₂ x₃} (CC : Category x₁ x₂ x₃) where private variable o ℓ e o′ ℓ′ e′ o″ ℓ″ e″ : Level zipWith : ∀ {a b c p q r s} {A : Set a} {B : Set b} {C : Set c} {P : A → Set p} {Q : B → Set q} {R : C → Set r} {S : (x : C) → R x → Set s} (_∙_ : A → B → C) → (_∘_ : ∀ {x y} → P x → Q y → R (x ∙ y)) → (_*_ : (x : C) → (y : R x) → S x y) → (x : Σ A P) → (y : Σ B Q) → S (proj₁ x ∙ proj₁ y) (proj₂ x ∘ proj₂ y) zipWith _∙_ _∘_ _*_ (a , p) (b , q) = (a ∙ b) * (p ∘ q) syntax zipWith f g h = f -< h >- g record Functor (C : Category o ℓ e) (D : Category o′ ℓ′ e′) : Set (o ⊔ ℓ ⊔ e ⊔ o′ ⊔ ℓ′ ⊔ e′) where eta-equality private module C = Category C private module D = Category D field F₀ : C.Obj → D.Obj F₁ : ∀ {A B} (f : C [ A , B ]) → D [ F₀ A , F₀ B ] Product : (C : Category o ℓ e) (D : Category o′ ℓ′ e′) → Category (o ⊔ o′) (ℓ ⊔ ℓ′) (e ⊔ e′) Product C D = record { Obj = C.Obj × D.Obj ; _⇒_ = C._⇒_ -< _×_ >- D._⇒_ ; _≈_ = C._≈_ -< _×_ >- D._≈_ ; _∘_ = zip C._∘_ D._∘_ } where module C = Category C module D = Category D Bifunctor : Category o ℓ e → Category o′ ℓ′ e′ → Category o″ ℓ″ e″ → Set _ Bifunctor C D E = Functor (Product C D) E private module CC = Category CC open CC infix 4 _≅_ record _≅_ (A B : Obj) : Set (x₂) where field from : A ⇒ B to : B ⇒ A private variable X Y Z W : Obj f g h : X ⇒ Y record Monoidal : Set (x₁ ⊔ x₂ ⊔ x₃) where infixr 10 _⊗₀_ _⊗₁_ field ⊗ : Bifunctor CC CC CC module ⊗ = Functor ⊗ open Functor ⊗ _⊗₀_ : Obj → Obj → Obj _⊗₀_ = curry′ F₀ -- this is also 'curry', but a very-dependent version _⊗₁_ : X ⇒ Y → Z ⇒ W → X ⊗₀ Z ⇒ Y ⊗₀ W f ⊗₁ g = F₁ (f , g) field associator : (X ⊗₀ Y) ⊗₀ Z ≅ X ⊗₀ (Y ⊗₀ Z) module associator {X} {Y} {Z} = _≅_ (associator {X} {Y} {Z}) -- for exporting, it makes sense to use the above long names, but for -- internal consumption, the traditional (short!) categorical names are more -- convenient. However, they are not symmetric, even though the concepts are, so -- we'll use ⇒ and ⇐ arrows to indicate that private α⇒ = associator.from α⇐ = λ {X} {Y} {Z} → associator.to {X} {Y} {Z} field assoc-commute-from : CommutativeSquare ((f ⊗₁ g) ⊗₁ h) α⇒ α⇒ (f ⊗₁ (g ⊗₁ h)) assoc-commute-to : CommutativeSquare (f ⊗₁ (g ⊗₁ h)) α⇐ α⇐ ((f ⊗₁ g) ⊗₁ h)
{ "alphanum_fraction": 0.4719683873, "avg_line_length": 27.924137931, "ext": "agda", "hexsha": "6aa5a0b5bc51205251ca4be14a6e15e213474830", "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/Issue4312.agda", "max_issues_count": 6, "max_issues_repo_head_hexsha": "98c9382a59f707c2c97d75919e389fc2a783ac75", "max_issues_repo_issues_event_max_datetime": "2021-11-24T08:31:10.000Z", "max_issues_repo_issues_event_min_datetime": "2021-10-18T08:12:24.000Z", "max_issues_repo_licenses": [ "BSD-2-Clause" ], "max_issues_repo_name": "KDr2/agda", "max_issues_repo_path": "test/Succeed/Issue4312.agda", "max_line_length": 311, "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/Issue4312.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 1824, "size": 4049 }
{-# OPTIONS --cubical #-} module propositional-equality where open import Cubical.Foundations.Prelude open import Agda.Primitive
{ "alphanum_fraction": 0.7938931298, "avg_line_length": 18.7142857143, "ext": "agda", "hexsha": "0bb1c5b6a558342774c31c950dbb259ef587b759", "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": "e1104012d85d2072318656f6c6d31acff75c9460", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "guilhermehas/Equality", "max_forks_repo_path": "propositional-equality.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "e1104012d85d2072318656f6c6d31acff75c9460", "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": "guilhermehas/Equality", "max_issues_repo_path": "propositional-equality.agda", "max_line_length": 39, "max_stars_count": 1, "max_stars_repo_head_hexsha": "e1104012d85d2072318656f6c6d31acff75c9460", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "guilhermehas/Equality", "max_stars_repo_path": "propositional-equality.agda", "max_stars_repo_stars_event_max_datetime": "2021-10-01T06:04:21.000Z", "max_stars_repo_stars_event_min_datetime": "2021-10-01T06:04:21.000Z", "num_tokens": 31, "size": 131 }
------------------------------------------------------------------------ -- The Agda standard library -- -- Some properties of reflexive transitive closures. ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Relation.Binary.Construct.Closure.ReflexiveTransitive.Properties where open import Function open import Relation.Binary open import Relation.Binary.Construct.Closure.ReflexiveTransitive open import Relation.Binary.PropositionalEquality as PropEq using (_≡_; refl; sym; cong; cong₂) import Relation.Binary.Reasoning.Preorder as PreR ------------------------------------------------------------------------ -- _◅◅_ module _ {i t} {I : Set i} {T : Rel I t} where ◅◅-assoc : ∀ {i j k l} (xs : Star T i j) (ys : Star T j k) (zs : Star T k l) → (xs ◅◅ ys) ◅◅ zs ≡ xs ◅◅ (ys ◅◅ zs) ◅◅-assoc ε ys zs = refl ◅◅-assoc (x ◅ xs) ys zs = cong (_◅_ x) (◅◅-assoc xs ys zs) ------------------------------------------------------------------------ -- gmap gmap-id : ∀ {i t} {I : Set i} {T : Rel I t} {i j} (xs : Star T i j) → gmap id id xs ≡ xs gmap-id ε = refl gmap-id (x ◅ xs) = cong (_◅_ x) (gmap-id xs) gmap-∘ : ∀ {i t} {I : Set i} {T : Rel I t} {j u} {J : Set j} {U : Rel J u} {k v} {K : Set k} {V : Rel K v} (f : J → K) (g : U =[ f ]⇒ V) (f′ : I → J) (g′ : T =[ f′ ]⇒ U) {i j} (xs : Star T i j) → (gmap {U = V} f g ∘ gmap f′ g′) xs ≡ gmap (f ∘ f′) (g ∘ g′) xs gmap-∘ f g f′ g′ ε = refl gmap-∘ f g f′ g′ (x ◅ xs) = cong (_◅_ (g (g′ x))) (gmap-∘ f g f′ g′ xs) gmap-◅◅ : ∀ {i t j u} {I : Set i} {T : Rel I t} {J : Set j} {U : Rel J u} (f : I → J) (g : T =[ f ]⇒ U) {i j k} (xs : Star T i j) (ys : Star T j k) → gmap {U = U} f g (xs ◅◅ ys) ≡ gmap f g xs ◅◅ gmap f g ys gmap-◅◅ f g ε ys = refl gmap-◅◅ f g (x ◅ xs) ys = cong (_◅_ (g x)) (gmap-◅◅ f g xs ys) gmap-cong : ∀ {i t j u} {I : Set i} {T : Rel I t} {J : Set j} {U : Rel J u} (f : I → J) (g : T =[ f ]⇒ U) (g′ : T =[ f ]⇒ U) → (∀ {i j} (x : T i j) → g x ≡ g′ x) → ∀ {i j} (xs : Star T i j) → gmap {U = U} f g xs ≡ gmap f g′ xs gmap-cong f g g′ eq ε = refl gmap-cong f g g′ eq (x ◅ xs) = cong₂ _◅_ (eq x) (gmap-cong f g g′ eq xs) ------------------------------------------------------------------------ -- fold fold-◅◅ : ∀ {i p} {I : Set i} (P : Rel I p) (_⊕_ : Transitive P) (∅ : Reflexive P) → (∀ {i j} (x : P i j) → (∅ ⊕ x) ≡ x) → (∀ {i j k l} (x : P i j) (y : P j k) (z : P k l) → ((x ⊕ y) ⊕ z) ≡ (x ⊕ (y ⊕ z))) → ∀ {i j k} (xs : Star P i j) (ys : Star P j k) → fold P _⊕_ ∅ (xs ◅◅ ys) ≡ (fold P _⊕_ ∅ xs ⊕ fold P _⊕_ ∅ ys) fold-◅◅ P _⊕_ ∅ left-unit assoc ε ys = sym (left-unit _) fold-◅◅ P _⊕_ ∅ left-unit assoc (x ◅ xs) ys = begin (x ⊕ fold P _⊕_ ∅ (xs ◅◅ ys)) ≡⟨ cong (_⊕_ x) $ fold-◅◅ P _⊕_ ∅ left-unit assoc xs ys ⟩ (x ⊕ (fold P _⊕_ ∅ xs ⊕ fold P _⊕_ ∅ ys)) ≡⟨ sym (assoc x _ _) ⟩ ((x ⊕ fold P _⊕_ ∅ xs) ⊕ fold P _⊕_ ∅ ys) ∎ where open PropEq.≡-Reasoning ------------------------------------------------------------------------ -- Relational properties module _ {i t} {I : Set i} (T : Rel I t) where reflexive : _≡_ ⇒ Star T reflexive refl = ε trans : Transitive (Star T) trans = _◅◅_ isPreorder : IsPreorder _≡_ (Star T) isPreorder = record { isEquivalence = PropEq.isEquivalence ; reflexive = reflexive ; trans = trans } preorder : Preorder _ _ _ preorder = record { _≈_ = _≡_ ; _∼_ = Star T ; isPreorder = isPreorder } ------------------------------------------------------------------------ -- Preorder reasoning for Star module StarReasoning {i t} {I : Set i} (T : Rel I t) where open PreR (preorder T) public hiding (_≈⟨_⟩_) renaming (_∼⟨_⟩_ to _⟶⋆⟨_⟩_) infixr 2 _⟶⟨_⟩_ _⟶⟨_⟩_ : ∀ x {y z} → T x y → y IsRelatedTo z → x IsRelatedTo z x ⟶⟨ x⟶y ⟩ y⟶⋆z = x ⟶⋆⟨ x⟶y ◅ ε ⟩ y⟶⋆z
{ "alphanum_fraction": 0.4097619048, "avg_line_length": 35.593220339, "ext": "agda", "hexsha": "f122dcdce3062e5f6e1a9dbbd28b5fba95ebe04e", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "0debb886eb5dbcd38dbeebd04b34cf9d9c5e0e71", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "omega12345/agda-mode", "max_forks_repo_path": "test/asset/agda-stdlib-1.0/Relation/Binary/Construct/Closure/ReflexiveTransitive/Properties.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "0debb886eb5dbcd38dbeebd04b34cf9d9c5e0e71", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "omega12345/agda-mode", "max_issues_repo_path": "test/asset/agda-stdlib-1.0/Relation/Binary/Construct/Closure/ReflexiveTransitive/Properties.agda", "max_line_length": 90, "max_stars_count": null, "max_stars_repo_head_hexsha": "0debb886eb5dbcd38dbeebd04b34cf9d9c5e0e71", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "omega12345/agda-mode", "max_stars_repo_path": "test/asset/agda-stdlib-1.0/Relation/Binary/Construct/Closure/ReflexiveTransitive/Properties.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 1661, "size": 4200 }
{-# OPTIONS --without-K --rewriting #-} open import HoTT {- Various lemmas that will be used in cohomology.DisjointlyPointedSet. Many of them, for example the choice lemma about coproducts, should be put into core/. -} module homotopy.DisjointlyPointedSet where module _ {i} where is-separable : (X : Ptd i) → Type i is-separable X = has-dec-onesided-eq (pt X) abstract is-separable-is-prop : {X : Ptd i} → is-prop (is-separable X) is-separable-is-prop = has-dec-onesided-eq-is-prop MinusPoint : (X : Ptd i) → Type i MinusPoint X = Σ (de⊙ X) (pt X ≠_) unite-pt : (X : Ptd i) → (⊤ ⊔ MinusPoint X → de⊙ X) unite-pt X (inl _) = pt X unite-pt X (inr (x , _)) = x has-disjoint-pt : (X : Ptd i) → Type i has-disjoint-pt X = is-equiv (unite-pt X) abstract separable-has-disjoint-pt : {X : Ptd i} → is-separable X → has-disjoint-pt X separable-has-disjoint-pt {X} dec = is-eq _ sep unite-sep sep-unite where sep : de⊙ X → ⊤ ⊔ (Σ (de⊙ X) (pt X ≠_)) sep x with dec x sep x | inl _ = inl unit sep x | inr ¬p = inr (x , ¬p) abstract sep-unite : ∀ x → sep (unite-pt X x) == x sep-unite (inl _) with dec (pt X) sep-unite (inl _) | inl _ = idp sep-unite (inl _) | inr ¬p = ⊥-rec (¬p idp) sep-unite (inr (x , ¬p)) with dec x sep-unite (inr (x , ¬p)) | inl p = ⊥-rec (¬p p) sep-unite (inr (x , ¬p)) | inr ¬p' = ap inr $ pair= idp (prop-has-all-paths ¬-is-prop ¬p' ¬p) unite-sep : ∀ x → unite-pt X (sep x) == x unite-sep x with dec x unite-sep x | inl p = p unite-sep x | inr ¬p = idp disjoint-pt-is-separable : {X : Ptd i} → has-disjoint-pt X → is-separable X disjoint-pt-is-separable unite-ise x with unite.g x | unite.f-g x where module unite = is-equiv unite-ise disjoint-pt-is-separable unite-ise x | inl unit | p = inl p disjoint-pt-is-separable unite-ise x | inr (y , pt≠y) | y=x = inr λ pt=x → pt≠y (pt=x ∙ ! y=x) separable-unite-equiv : ∀ {X} → is-separable X → (⊤ ⊔ MinusPoint X ≃ de⊙ X) separable-unite-equiv dX = _ , separable-has-disjoint-pt dX module _ {i j k} n (A : Type i) (B : Type j) where abstract ⊔-has-choice-implies-inr-has-choice : has-choice n (A ⊔ B) k → has-choice n B k ⊔-has-choice-implies-inr-has-choice ⊔-ac W = transport is-equiv (λ= lemma₃) (snd lemma₂ ∘ise ⊔-ac W' ∘ise is-equiv-inverse (snd (Trunc-emap n lemma₁))) where W' : A ⊔ B → Type k W' (inl _) = Lift {j = k} ⊤ W' (inr b) = W b lemma₁ : Π (A ⊔ B) W' ≃ Π B W lemma₁ = equiv to from to-from from-to where to : Π (A ⊔ B) W' → Π B W to f b = f (inr b) from : Π B W → Π (A ⊔ B) W' from f (inl a) = lift tt from f (inr b) = f b abstract to-from : ∀ f → to (from f) == f to-from f = λ= λ b → idp from-to : ∀ f → from (to f) == f from-to f = λ= λ{(inl a) → idp; (inr b) → idp} lemma₂ : Π (A ⊔ B) (Trunc n ∘ W') ≃ Π B (Trunc n ∘ W) lemma₂ = equiv to from to-from from-to where to : Π (A ⊔ B) (Trunc n ∘ W') → Π B (Trunc n ∘ W) to f b = f (inr b) from : Π B (Trunc n ∘ W) → Π (A ⊔ B) (Trunc n ∘ W') from f (inl a) = [ lift tt ] from f (inr b) = f b abstract to-from : ∀ f → to (from f) == f to-from f = λ= λ b → idp from-to : ∀ f → from (to f) == f from-to f = λ= λ{ (inl a) → Trunc-elim {P = λ t → [ lift tt ] == t} (λ _ → =-preserves-level Trunc-level) (λ _ → idp) (f (inl a)); (inr b) → idp} lemma₃ : ∀ f → –> lemma₂ (unchoose (<– (Trunc-emap n lemma₁) f)) == unchoose f lemma₃ = Trunc-elim {P = λ f → –> lemma₂ (unchoose (<– (Trunc-emap n lemma₁) f)) == unchoose f} (λ _ → =-preserves-level (Π-level λ _ → Trunc-level)) (λ f → λ= λ b → idp) module _ {i j} n {X : Ptd i} (X-sep : has-disjoint-pt X) where abstract MinusPoint-has-choice : has-choice n (de⊙ X) j → has-choice n (MinusPoint X) j MinusPoint-has-choice X-ac = ⊔-has-choice-implies-inr-has-choice n ⊤ (MinusPoint X) $ transport! (λ A → has-choice n A j) (ua (_ , X-sep)) X-ac
{ "alphanum_fraction": 0.5013321492, "avg_line_length": 35.1875, "ext": "agda", "hexsha": "284a2f9e5476ef6f73c06e1f0a30527dd6a3077d", "lang": "Agda", "max_forks_count": 1, "max_forks_repo_forks_event_max_datetime": "2018-12-26T21:31:57.000Z", "max_forks_repo_forks_event_min_datetime": "2018-12-26T21:31:57.000Z", "max_forks_repo_head_hexsha": "e7d663b63d89f380ab772ecb8d51c38c26952dbb", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "mikeshulman/HoTT-Agda", "max_forks_repo_path": "theorems/homotopy/DisjointlyPointedSet.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "e7d663b63d89f380ab772ecb8d51c38c26952dbb", "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": "mikeshulman/HoTT-Agda", "max_issues_repo_path": "theorems/homotopy/DisjointlyPointedSet.agda", "max_line_length": 103, "max_stars_count": null, "max_stars_repo_head_hexsha": "e7d663b63d89f380ab772ecb8d51c38c26952dbb", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "mikeshulman/HoTT-Agda", "max_stars_repo_path": "theorems/homotopy/DisjointlyPointedSet.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 1631, "size": 4504 }
module Haskell.Prim.List where open import Agda.Builtin.List public open import Agda.Builtin.Nat open import Haskell.Prim open import Haskell.Prim.Tuple open import Haskell.Prim.Bool open import Haskell.Prim.Int -------------------------------------------------- -- List map : (a → b) → List a → List b map f [] = [] map f (x ∷ xs) = f x ∷ map f xs infixr 5 _++_ _++_ : ∀ {ℓ} {a : Set ℓ} → List a → List a → List a [] ++ ys = ys (x ∷ xs) ++ ys = x ∷ xs ++ ys filter : (a → Bool) → List a → List a filter p [] = [] filter p (x ∷ xs) = if p x then x ∷ filter p xs else filter p xs scanl : (b → a → b) → b → List a → List b scanl f z [] = z ∷ [] scanl f z (x ∷ xs) = z ∷ scanl f (f z x) xs scanr : (a → b → b) → b → List a → List b scanr f z [] = z ∷ [] scanr f z (x ∷ xs) = case scanr f z xs of λ where [] → [] -- impossible qs@(q ∷ _) → f x q ∷ qs scanl1 : (a → a → a) → List a → List a scanl1 f [] = [] scanl1 f (x ∷ xs) = scanl f x xs scanr1 : (a → a → a) → List a → List a scanr1 f [] = [] scanr1 f (x ∷ []) = x ∷ [] scanr1 f (x ∷ xs) = case scanr1 f xs of λ where [] → [] -- impossible qs@(q ∷ _) → f x q ∷ qs takeWhile : (a → Bool) → List a → List a takeWhile p [] = [] takeWhile p (x ∷ xs) = if p x then x ∷ takeWhile p xs else [] dropWhile : (a → Bool) → List a → List a dropWhile p [] = [] dropWhile p (x ∷ xs) = if p x then dropWhile p xs else x ∷ xs span : (a → Bool) → List a → List a × List a span p [] = [] , [] span p (x ∷ xs) = if p x then first (x ∷_) (span p xs) else ([] , x ∷ xs) break : (a → Bool) → List a → List a × List a break p = span (not ∘ p) zipWith : (a → b → c) → List a → List b → List c zipWith f [] _ = [] zipWith f _ [] = [] zipWith f (x ∷ xs) (y ∷ ys) = f x y ∷ zipWith f xs ys zip : List a → List b → List (a × b) zip = zipWith _,_ zipWith3 : (a → b → c → d) → List a → List b → List c → List d zipWith3 f [] _ _ = [] zipWith3 f _ [] _ = [] zipWith3 f _ _ [] = [] zipWith3 f (x ∷ xs) (y ∷ ys) (z ∷ zs) = f x y z ∷ zipWith3 f xs ys zs zip3 : List a → List b → List c → List (a × b × c) zip3 = zipWith3 _,_,_ unzip : List (a × b) → List a × List b unzip [] = [] , [] unzip ((x , y) ∷ xys) = (x ∷_) *** (y ∷_) $ unzip xys unzip3 : List (a × b × c) → List a × List b × List c unzip3 [] = [] , [] , [] unzip3 ((x , y , z) ∷ xyzs) = case unzip3 xyzs of λ where (xs , ys , zs) → x ∷ xs , y ∷ ys , z ∷ zs takeNat : Nat → List a → List a takeNat n [] = [] takeNat zero xs = [] takeNat (suc n) (x ∷ xs) = x ∷ takeNat n xs take : (n : Int) → ⦃ IsNonNegativeInt n ⦄ → List a → List a take n xs = takeNat (intToNat n) xs dropNat : Nat → List a → List a dropNat n [] = [] dropNat zero xs = xs dropNat (suc n) (_ ∷ xs) = dropNat n xs drop : (n : Int) → ⦃ IsNonNegativeInt n ⦄ → List a → List a drop n xs = dropNat (intToNat n) xs splitAtNat : (n : Nat) → List a → List a × List a splitAtNat _ [] = [] , [] splitAtNat 0 xs = [] , xs splitAtNat (suc n) (x ∷ xs) = first (x ∷_) (splitAtNat n xs) splitAt : (n : Int) → ⦃ IsNonNegativeInt n ⦄ → List a → List a × List a splitAt n xs = splitAtNat (intToNat n) xs head : (xs : List a) → ⦃ NonEmpty xs ⦄ → a head (x ∷ _) = x tail : (xs : List a) → ⦃ NonEmpty xs ⦄ → List a tail (_ ∷ xs) = xs last : (xs : List a) → ⦃ NonEmpty xs ⦄ → a last (x ∷ []) = x last (_ ∷ xs@(_ ∷ _)) = last xs init : (xs : List a) → ⦃ NonEmpty xs ⦄ → List a init (x ∷ []) = [] init (x ∷ xs@(_ ∷ _)) = x ∷ init xs
{ "alphanum_fraction": 0.4885245902, "avg_line_length": 27.7272727273, "ext": "agda", "hexsha": "ebace1600de39d159021a4900969da475a95ce36", "lang": "Agda", "max_forks_count": 18, "max_forks_repo_forks_event_max_datetime": "2022-03-12T11:42:52.000Z", "max_forks_repo_forks_event_min_datetime": "2020-10-21T22:19:09.000Z", "max_forks_repo_head_hexsha": "160478a51bc78b0fdab07b968464420439f9fed6", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "seanpm2001/agda2hs", "max_forks_repo_path": "lib/Haskell/Prim/List.agda", "max_issues_count": 63, "max_issues_repo_head_hexsha": "160478a51bc78b0fdab07b968464420439f9fed6", "max_issues_repo_issues_event_max_datetime": "2022-02-25T15:47:30.000Z", "max_issues_repo_issues_event_min_datetime": "2020-10-22T05:19:27.000Z", "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "seanpm2001/agda2hs", "max_issues_repo_path": "lib/Haskell/Prim/List.agda", "max_line_length": 71, "max_stars_count": 55, "max_stars_repo_head_hexsha": "8c8f24a079ed9677dbe6893cf786e7ed52dfe8b6", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "dxts/agda2hs", "max_stars_repo_path": "lib/Haskell/Prim/List.agda", "max_stars_repo_stars_event_max_datetime": "2022-03-26T21:57:56.000Z", "max_stars_repo_stars_event_min_datetime": "2020-10-20T13:36:25.000Z", "num_tokens": 1419, "size": 3660 }
module Type.Properties.Homotopy.Proofs where import Data.Tuple as Tuple open import Functional open import Function.Axioms open import Logic open import Logic.Classical open import Logic.Predicate open import Logic.Propositional import Lvl open import Numeral.Natural open import Type open import Type.Dependent open import Type.Properties.Homotopy open import Type.Properties.MereProposition open import Type.Properties.Singleton open import Type.Properties.Singleton.Proofs open import Structure.Function.Domain open import Structure.Relator.Equivalence open import Structure.Relator.Properties open import Structure.Setoid open import Structure.Type.Identity open import Syntax.Function open import Syntax.Transitivity private variable ℓ ℓₑ ℓₑₑ ℓₚ ℓ₁ ℓ₂ : Lvl.Level private variable n : ℕ module _ {ℓ} ⦃ equiv : ∀{T : Type{ℓ}} → Equiv{ℓ}(T) ⦄ where private variable T : Type{ℓ} {- private open module EquivEquiv{T} = Equiv(equiv{T}) using () renaming (_≡_ to _≡ₑ_) module _ ⦃ identElim : ∀{ℓ}{T : Type{ℓ}} → IdentityEliminator(_≡ₑ_ {T = T}) ⦄ where constant-endofunction-existence-on-equivalence-is-hset : ∀{x y : T} → ∃{Obj = (x ≡ y) → (x ≡ y)}(Constant) → HomotopyLevel(2)(T) HomotopyLevel.proof (constant-endofunction-existence-on-equivalence-is-hset ([∃]-intro const)) {x = x} {y} {xy₁} {xy₂} = {!!} where equivalence-endofunction-invertibleₗ : ∀{f : ∀{x y : T} → (x ≡ y) → (x ≡ y)} → (∀{x y : T} → Invertibleₗ(f{x}{y})) ∃.witness (equivalence-endofunction-invertibleₗ {T = T}{f = f} {x}{y}) xy = xy 🝖 symmetry(_≡ₑ_) (f(reflexivity _)) Tuple.left (∃.proof equivalence-endofunction-invertibleₗ) = {!!} Inverseₗ.proof (Tuple.right (∃.proof (equivalence-endofunction-invertibleₗ {T = T}{f = f} {x}{y}))) {xy} = idElim(_≡ₑ_) ⦃ inst = identElim{T = T} ⦄ (xy ↦ (f(xy) 🝖 symmetry(_≡ₑ_) (f(reflexivity(_≡ₑ_))) ≡ₑ xy)) {!!} xy -} HomotopyLevel-zero-step-is-one : (∀{x y : T} → HomotopyLevel(0)(x ≡ y)) → HomotopyLevel(1)(T) HomotopyLevel.proof (HomotopyLevel-zero-step-is-one p) {x}{y} = Σ.left(HomotopyLevel.proof(p{x}{y})) HomotopyLevel-step-is-successor : (∀{x y : T} → HomotopyLevel(n)(x ≡ y)) → HomotopyLevel(𝐒(n))(T) HomotopyLevel-step-is-successor {n = 𝟎} = HomotopyLevel-zero-step-is-one HomotopyLevel-step-is-successor {n = 𝐒(n)} p = intro(\{x}{y} → HomotopyLevel.proof(p{x}{y})) module _ ⦃ equiv : ∀{ℓ}{T : Type{ℓ}} → Equiv{ℓ}(T) ⦄ ⦃ funcExt : ∀{ℓ₁ ℓ₂}{T : Type{ℓ₁}}{P : T → Stmt{ℓ₂}} → DependentImplicitFunctionExtensionality(T)(P) ⦄ ⦃ prop-eq : ∀{ℓ}{T : Type{ℓ}}{x y : T} → MereProposition(x ≡ y) ⦄ where private variable T : Type{ℓ} HomotopyLevel-prop₊ : MereProposition(Names.HomotopyLevel(𝐒(n))(T)) HomotopyLevel-prop₊ {𝟎} = prop-universal ⦃ prop-p = prop-universal ⦃ prop-p = prop-eq ⦄ ⦄ HomotopyLevel-prop₊ {𝐒(n)} = prop-universal ⦃ prop-p = prop-universal ⦃ prop-p = HomotopyLevel-prop₊ {n} ⦄ ⦄ module _ (base₁ : ∀{ℓ}{A : Type{ℓ}} → HomotopyLevel(1)(A) → HomotopyLevel(2)(A)) where HomotopyLevel-one-is-zero-step : HomotopyLevel(1)(T) → (∀{x y : T} → HomotopyLevel(0)(x ≡ y)) HomotopyLevel.proof(HomotopyLevel-one-is-zero-step h1 {x} {y}) = intro (HomotopyLevel.proof h1) (HomotopyLevel.proof(base₁ h1)) HomotopyLevel-successor-step : HomotopyLevel(𝐒(n))(T) → (∀{x y : T} → HomotopyLevel(n)(x ≡ y)) HomotopyLevel-successor-step {n = 𝟎} = HomotopyLevel-one-is-zero-step HomotopyLevel-successor-step {n = 𝐒(n)} p = intro(HomotopyLevel.proof p) HomotopyLevel-successor : HomotopyLevel(n)(T) → HomotopyLevel(𝐒(n))(T) HomotopyLevel-successor {n = 0} h0 = MereProposition.uniqueness(unit-is-prop ⦃ proof = intro (Σ.left h0) (Σ.right h0) ⦄) HomotopyLevel-successor {n = 1} = base₁ HomotopyLevel-successor {n = 𝐒(𝐒(n))} hssn = HomotopyLevel-successor {n = 𝐒(n)} hssn {- {- TODO: The zero case needs assumptions about the sigma type because it is not a mere proposition unless both A and equality are mere propositions. So first, prove if equality on the sigma type depends only on its components, and its types are mere propositions, then the sigma type is a mere proposition. Secondly, one can use that proof here HomotopyLevel-prop : MereProposition(HomotopyLevel(n)(A)) HomotopyLevel-prop {𝟎} = intro {!!} HomotopyLevel-prop {𝐒 n} = {!!} -} {- module _ ⦃ equiv : Equiv{ℓₑ}(T) ⦄ ⦃ equiv-equiv : Equiv{ℓₑ}(Equiv._≡_ equiv) ⦄ where -- TODO: ComputablyDecidable → UIP (https://homotopytypetheory.org/2012/03/30/a-direct-proof-of-hedbergs-theorem/) -- TODO: http://www.cse.chalmers.se/~nad/listings/equality/Equality.Decidable-UIP.html classical-to-uip : (∀{x y : T} → ((x ≡ y) ∨ (x ≢ y))) → UniqueIdentityProofs(T) MereProposition.uniqueness (classical-to-uip {T = T} dec {x} {y}) {xy₁} {xy₂} = {!p xy₁!} where {- p : ∀{x y : T} → (x ≡ y) → Stmt p {x}{y} eq with dec{x}{x} | dec{x}{y} ... | [∨]-introₗ xx | [∨]-introₗ xy = eq ≡ transitivity(_≡_) xx xy ... | [∨]-introₗ xx | [∨]-introᵣ nxy with () ← nxy eq ... | [∨]-introᵣ nxx | [∨]-introₗ _ with () ← nxx [≡]-intro -} dec-eq : ∀{x y} → (x ≡ y) → (x ≡ y) dec-eq {x}{y} eq with dec{x}{y} ... | [∨]-introₗ xy = xy ... | [∨]-introᵣ nxy with () ← nxy eq dec-eq-unique : ∀{x y}{xy₁ xy₂ : x ≡ y} → (dec-eq xy₁ ≡ dec-eq xy₂) dec-eq-unique {x}{y} {xy₁} with dec{x}{y} ... | [∨]-introₗ _ = ? ... | [∨]-introᵣ nxy with () ← nxy xy₁ dec-eq-unit : ∀{x y}{eq : x ≡ y} → (eq ≡ dec-eq eq) dec-eq-unit {x}{y}{eq} with dec{y}{y} | dec{x}{y} ... | [∨]-introₗ yy | [∨]-introₗ xy = {!!} ... | [∨]-introₗ yy | [∨]-introᵣ x₂ = {!!} ... | [∨]-introᵣ x₁ | [∨]-introₗ x₂ = {!!} ... | [∨]-introᵣ x₁ | [∨]-introᵣ x₂ = {!!} {- p : ∀{x y : T} → (xy : x ≡ y) → (xy ≡ dec-eq(xy)) p {x}{y} [≡]-intro with dec{x}{x} | dec{x}{y} ... | [∨]-introₗ a | [∨]-introₗ x₁ = {![≡]-intro!} ... | [∨]-introₗ a | [∨]-introᵣ x₁ = {!!} ... | [∨]-introᵣ a | [∨]-introₗ x₁ = {!!} ... | [∨]-introᵣ a | [∨]-introᵣ x₁ = {!!} -} -} -}
{ "alphanum_fraction": 0.6160184575, "avg_line_length": 48.544, "ext": "agda", "hexsha": "447eb4d7b6563f4bf25dca04a03244b8579cb39d", "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": "Type/Properties/Homotopy/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": "Type/Properties/Homotopy/Proofs.agda", "max_line_length": 348, "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": "Type/Properties/Homotopy/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": 2413, "size": 6068 }
-- -- Created by Dependently-Typed Lambda Calculus on 2019-05-15 -- records -- Author: ice10 -- {-# OPTIONS --without-K --safe #-} record List (A : Set) : Set where coinductive field head : A tail : List A open List -- | Bisimulation as equality record _==_ (x : List A) (y : List A) : Set where coinductive field refl-head : head x ≡ head y refl-tail : tail x == tail y open _==_
{ "alphanum_fraction": 0.6225490196, "avg_line_length": 17.7391304348, "ext": "agda", "hexsha": "2eb8cd6c2dcfb13a3500cbc7b85322003cfa1dc2", "lang": "Agda", "max_forks_count": 3, "max_forks_repo_forks_event_max_datetime": "2021-03-12T21:33:35.000Z", "max_forks_repo_forks_event_min_datetime": "2019-10-07T01:38:12.000Z", "max_forks_repo_head_hexsha": "ee25a3a81dacebfe4449de7a9aaff029171456be", "max_forks_repo_licenses": [ "Apache-2.0" ], "max_forks_repo_name": "dubinsky/intellij-dtlc", "max_forks_repo_path": "testData/parse/agda/records.agda", "max_issues_count": 16, "max_issues_repo_head_hexsha": "ee25a3a81dacebfe4449de7a9aaff029171456be", "max_issues_repo_issues_event_max_datetime": "2021-03-15T17:04:36.000Z", "max_issues_repo_issues_event_min_datetime": "2019-03-30T04:29:32.000Z", "max_issues_repo_licenses": [ "Apache-2.0" ], "max_issues_repo_name": "dubinsky/intellij-dtlc", "max_issues_repo_path": "testData/parse/agda/records.agda", "max_line_length": 61, "max_stars_count": 30, "max_stars_repo_head_hexsha": "ee25a3a81dacebfe4449de7a9aaff029171456be", "max_stars_repo_licenses": [ "Apache-2.0" ], "max_stars_repo_name": "dubinsky/intellij-dtlc", "max_stars_repo_path": "testData/parse/agda/records.agda", "max_stars_repo_stars_event_max_datetime": "2022-01-29T13:18:34.000Z", "max_stars_repo_stars_event_min_datetime": "2019-05-11T16:26:38.000Z", "num_tokens": 132, "size": 408 }
-- This module introduces implicit arguments. module Implicit where -- In Agda you can omit things that the type checker can figure out for itself. -- This is a crucial feature in a monomorphic language, since you would -- otherwise be overwhelmed by type arguments. -- Let's revisit the identity function from 'Introduction.Basics'. id' : (A : Set) -> A -> A id' A x = x -- Since Agda is monomorphic we have to take the type A as an argument. So when -- using the identity function we have to provide the type explicitly. data Nat : Set where zero : Nat suc : Nat -> Nat one : Nat one = id' Nat (suc zero) -- Always having to provide the type argument to the identity function would of -- course be very tedious, and seemingly unnecessary. We would expect the type -- checker to be able to figure out what it should be by looking at the second -- argument. And indeed the type checker can do this. -- One way of indicating that the type checker will have figure something out -- for itself is to write an underscore (_) instead of the term. So when -- applying the identity function we can write two : Nat two = id' _ (suc one) -- Now the type checker will try to figure out what the _ should be, and in -- this case it will have no problems doing so. If it should fail to infer the -- value of an _ it will issue an error message. -- In the case of the identity function we expect the type argument to always -- be inferrable so it would be nice if we could avoid having to write the _. -- This can be achieved by declaring the first argument as an implicit -- argument. id : {A : Set} -> A -> A -- implicit arguments are enclosed in curly braces id x = x -- now we don't have to mention A in the left-hand side three : Nat three = id (suc two) -- If, for some reason, an implicit argument cannot be inferred it can be given -- explicitly by enclosing it in curly braces : four : Nat four = id {Nat} (suc three) -- To summarise we give a bunch of possible variants of the identity function -- and its use. -- Various definitions of the identity function. Definitions 0 through 3 are -- all equivalent, as are definitions 4 through 6. id0 : (A : Set) -> A -> A id0 A x = x id1 : (A : Set) -> A -> A id1 _ x = x -- in left-hand sides _ means "don't care" id2 : (A : Set) -> A -> A id2 = \A x -> x id3 = \(A : Set)(x : A) -> x -- the type signature can be omitted for definitions -- of the form x = e if the type of e can be -- inferred. id4 : {A : Set} -> A -> A id4 x = x id5 : {A : Set} -> A -> A id5 {A} x = x id6 : {A : Set} -> A -> A id6 = \x -> x id7 = \{A : Set}(x : A) -> x id8 : {A : Set} -> A -> A id8 = \{A} x -> x -- this doesn't work since the type checker assumes -- that the implicit A has been has been omitted in -- the left-hand side (as in id6). -- Various uses of the identity function. zero0 = id0 Nat zero zero1 = id0 _ zero -- in right-hand sides _ means "go figure" zero2 = id4 zero zero3 = id4 {Nat} zero zero4 = id4 {_} zero -- This is equivalent to zero2, but it can be useful if -- a function has two implicit arguments and you need -- to provide the second one (when you provide an -- implicit argument explicitly it is assumed to be the -- left-most one). -- In this module we have looked at implicit arguments as a substitute for -- polymorphism. The implicit argument mechanism is more general than that and -- not limited to inferring the values of type arguments. For more information -- on implicit arguments see, for instance -- 'Introduction.Data.ByRecursion'
{ "alphanum_fraction": 0.6523468576, "avg_line_length": 33.972972973, "ext": "agda", "hexsha": "ef2d4fa9ec5f29ceeb0fdb3953b13f44f173c44f", "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": "dc333ed142584cf52cc885644eed34b356967d8b", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "andrejtokarcik/agda-semantics", "max_forks_repo_path": "tests/covered/Implicit.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "dc333ed142584cf52cc885644eed34b356967d8b", "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": "andrejtokarcik/agda-semantics", "max_issues_repo_path": "tests/covered/Implicit.agda", "max_line_length": 82, "max_stars_count": 3, "max_stars_repo_head_hexsha": "dc333ed142584cf52cc885644eed34b356967d8b", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "andrejtokarcik/agda-semantics", "max_stars_repo_path": "tests/covered/Implicit.agda", "max_stars_repo_stars_event_max_datetime": "2018-12-06T17:24:25.000Z", "max_stars_repo_stars_event_min_datetime": "2015-08-10T15:33:56.000Z", "num_tokens": 961, "size": 3771 }
------------------------------------------------------------------------------ -- FOTC looping (error) combinator ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTIONS --without-K #-} module FOTC.Base.Loop where open import FOTC.Base ------------------------------------------------------------------------------ postulate error : D -- Conversion rule -- -- The equation error-eq adds anything to the logic (because -- reflexivity is already an axiom of equality), therefore we won't -- add this equation as a first-order logic axiom. -- -- postulate error-eq : error ≡ error
{ "alphanum_fraction": 0.4442988204, "avg_line_length": 30.52, "ext": "agda", "hexsha": "6d47230b95b3fc3b21fc925545c35617c18947fe", "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/Base/Loop.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/Base/Loop.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/Base/Loop.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": 128, "size": 763 }
{-# OPTIONS --without-K --safe #-} open import Categories.Category module Categories.Functor.Hom.Properties {o ℓ e} (C : Category o ℓ e) where open import Categories.Functor.Hom.Properties.Covariant C public open import Categories.Functor.Hom.Properties.Contra C public
{ "alphanum_fraction": 0.7765567766, "avg_line_length": 30.3333333333, "ext": "agda", "hexsha": "2a6b3be1c95bcac1746af5515e5207647b1b11e0", "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/Functor/Hom/Properties.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/Functor/Hom/Properties.agda", "max_line_length": 75, "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/Functor/Hom/Properties.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": 67, "size": 273 }
{-# OPTIONS --safe #-} module Cubical.Data.FinData.DepFinVec where open import Cubical.Foundations.Prelude open import Cubical.Data.Nat using (ℕ; zero; suc; _+_; _·_; +-assoc) open import Cubical.Data.FinData.Base open import Cubical.Data.FinData.Properties private variable ℓ ℓ' : Level {- WARNING : If someone use dependent vector in a general case. One always think about the following definition. Yet because of the definition one to add (toℕ k). Which is going to introduce a lot of issues. One may consider depVec rather than depFinVec to avoid this issue? -} depFinVec : ((n : ℕ) → Type ℓ) → (m : ℕ) → Type ℓ depFinVec G m = (k : Fin m) → G (toℕ k)
{ "alphanum_fraction": 0.6703755216, "avg_line_length": 27.6538461538, "ext": "agda", "hexsha": "e5ce4c40d913be29617af8f24cc4e637883cdf75", "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/Data/FinData/DepFinVec.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/Data/FinData/DepFinVec.agda", "max_line_length": 78, "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/Data/FinData/DepFinVec.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 199, "size": 719 }
{-# OPTIONS --without-K --rewriting #-} open import HoTT open import homotopy.HSpace renaming (HSpaceStructure to HSS) open import homotopy.WedgeExtension module homotopy.Pi2HSusp where module Pi2HSusp {i} {X : Ptd i} {{_ : has-level 1 (de⊙ X)}} {{_ : is-connected 0 (de⊙ X)}} (H-X : HSS X) where {- TODO this belongs somewhere else, but where? -} private Type=-ext : ∀ {i} {A B : Type i} (p q : A == B) → (coe p ∼ coe q) → p == q Type=-ext p q α = ! (ua-η p) ∙ ap ua (Subtype=-out is-equiv-prop (λ= α)) ∙ ua-η q module μ = ConnectedHSpace H-X μ = μ.μ private A = de⊙ X e = pt X back : south == north back = ! (merid e) private P : Susp A → Type i P x = Trunc 1 (north == x) module Codes = SuspRec A A (λ a → ua (μ.r-equiv a)) Codes : Susp A → Type i Codes = Codes.f Codes-level : (x : Susp A) → has-level 1 (Codes x) Codes-level = Susp-elim ⟨⟩ ⟨⟩ (λ _ → prop-has-all-paths-↓) encode'₀ : {x : Susp A} → (north == x) → Codes x encode'₀ α = transport Codes α e encode' : {x : Susp A} → P x → Codes x encode' {x} = Trunc-rec {{Codes-level x}} encode'₀ import homotopy.SuspAdjointLoop as SAL η : A → north == north η = fst (SAL.η X) decodeN' : A → P north decodeN' = [_] ∘ η abstract transport-Codes-mer : (a a' : A) → transport Codes (merid a) a' == μ a a' transport-Codes-mer a a' = coe (ap Codes (merid a)) a' =⟨ Codes.merid-β a |in-ctx (λ w → coe w a') ⟩ coe (ua (μ.r-equiv a)) a' =⟨ coe-β (μ.r-equiv a) a' ⟩ μ a a' ∎ transport-Codes-mer-e-! : (a : A) → transport Codes back a == a transport-Codes-mer-e-! a = coe (ap Codes back) a =⟨ ap-! Codes (merid e) |in-ctx (λ w → coe w a) ⟩ coe (! (ap Codes (merid e))) a =⟨ Codes.merid-β e |in-ctx (λ w → coe (! w) a) ⟩ coe (! (ua (μ.r-equiv e))) a =⟨ Type=-ext (ua (μ.r-equiv e)) idp (λ x → coe-β _ x ∙ μ.unit-l x) |in-ctx (λ w → coe (! w) a) ⟩ coe (! idp) a ∎ abstract encode'-decodeN' : (a : A) → encode' (decodeN' a) == a encode'-decodeN' a = transport Codes (merid a ∙ back) e =⟨ transp-∙ {B = Codes} (merid a) back e ⟩ transport Codes back (transport Codes (merid a) e) =⟨ transport-Codes-mer a e ∙ μ.unit-r a |in-ctx (λ w → transport Codes back w) ⟩ transport Codes back a =⟨ transport-Codes-mer-e-! a ⟩ a ∎ add-path-and-inverse-l : ∀ {k} {B : Type k} {x y z : B} → (p : y == x) (q : y == z) → q == (p ∙ ! p) ∙ q add-path-and-inverse-l p q = ap (λ s → s ∙ q) (! (!-inv-r p)) add-path-and-inverse-r : ∀ {k} {B : Type k} {x y z : B} → (p : x == y) (q : z == y) → p == (p ∙ ! q) ∙ q add-path-and-inverse-r p q = ! (∙-unit-r p) ∙ ap (λ s → p ∙ s) (! (!-inv-l q)) ∙ ! (∙-assoc p (! q) q) homomorphism-l : (a' : A) → merid (μ e a') == (merid a' ∙ back) ∙ merid e homomorphism-l a' = ap merid (μ.unit-l a') ∙ add-path-and-inverse-r (merid a') (merid e) homomorphism-r : (a : A) → merid (μ a e) == (merid e ∙ back) ∙ merid a homomorphism-r a = ap merid (μ.unit-r a) ∙ add-path-and-inverse-l (merid e) (merid a) homomorphism-l₁ : (a' : A) → [ merid (μ e a') ]₁ == [ (merid a' ∙ back) ∙ merid e ]₁ homomorphism-l₁ = ap [_]₁ ∘ homomorphism-l homomorphism-r₁ : (a : A) → [ merid (μ a e) ]₁ == [ (merid e ∙ back) ∙ merid a ]₁ homomorphism-r₁ = ap [_]₁ ∘ homomorphism-r abstract homomorphism-args : args {i} {i} {A} {e} {A} {e} homomorphism-args = record { m = -1; n = -1; P = λ a a' → (Q a a' , ⟨⟩); f = homomorphism-r₁; g = homomorphism-l₁; p = ap (λ {(p₁ , p₂) → ap [_] (ap merid p₁ ∙ p₂)}) (pair×= (! μ.coh) (coh (merid e))) } where Q : A → A → Type i Q a a' = [ merid (μ a a' ) ]₁ == [ (merid a' ∙ back) ∙ merid a ]₁ coh : {B : Type i} {b b' : B} (p : b == b') → add-path-and-inverse-l p p == add-path-and-inverse-r p p coh idp = idp module HomomorphismExt = WedgeExt {i} {i} {A} {e} {A} {e} homomorphism-args homomorphism : (a a' : A) → [ merid (μ a a' ) ]₁ == [ (merid a' ∙ back) ∙ merid a ]₁ homomorphism = HomomorphismExt.ext homomorphism-β-l : (a' : A) → homomorphism e a' == homomorphism-l₁ a' homomorphism-β-l = HomomorphismExt.β-r homomorphism-β-r : (a : A) → homomorphism a e == homomorphism-r₁ a homomorphism-β-r = HomomorphismExt.β-l decode' : {x : Susp A} → Codes x → P x decode' {x} = Susp-elim {P = λ x → Codes x → P x} decodeN' (λ a → [ merid a ]) (λ a → ↓-→-from-transp (λ= $ STS a)) x where abstract STS : (a a' : A) → transport P (merid a) (decodeN' a') == [ merid (transport Codes (merid a) a') ] STS a a' = transport P (merid a) [ merid a' ∙ back ] =⟨ transport-Trunc' (north ==_) (merid a) _ ⟩ [ transport (north ==_) (merid a) (merid a' ∙ back) ] =⟨ ap [_] (transp-cst=idf {A = Susp A} (merid a) _) ⟩ [ (merid a' ∙ back) ∙ merid a ] =⟨ ! (homomorphism a a') ⟩ [ merid (μ a a') ] =⟨ ap ([_] ∘ merid) (! (transport-Codes-mer a a')) ⟩ [ merid (transport Codes (merid a) a') ] ∎ decode'-encode' : {x : Susp A} (tα : P x) → decode' {x} (encode' {x} tα) == tα decode'-encode' {x} = Trunc-elim {P = λ tα → decode' {x} (encode' {x} tα) == tα} -- FIXME: Agda very slow (looping?) when omitting the next line {{λ _ → =-preserves-level Trunc-level}} (J (λ y p → decode' {y} (encode' {y} [ p ]) == [ p ]) (ap [_] (!-inv-r (merid e)))) eq' : Trunc 1 (Ω (⊙Susp (de⊙ X))) ≃ A eq' = equiv encode' decodeN' encode'-decodeN' decode'-encode' ⊙decodeN : ⊙Trunc 1 X ⊙→ ⊙Trunc 1 (⊙Ω (⊙Susp (de⊙ X))) ⊙decodeN = ⊙Trunc-fmap (SAL.η X) decodeN : Trunc 1 A → Trunc 1 (Ω (⊙Susp (de⊙ X))) decodeN = fst ⊙decodeN encodeN : Trunc 1 (Ω (⊙Susp (de⊙ X))) → Trunc 1 A encodeN = [_] ∘ encode' {x = north} ⊙encodeN : ⊙Trunc 1 (⊙Ω (⊙Susp (de⊙ X))) ⊙→ ⊙Trunc 1 X ⊙encodeN = encodeN , idp eq : Trunc 1 (Ω (⊙Susp (de⊙ X))) ≃ Trunc 1 A eq = encodeN , replace-inverse (snd ((unTrunc-equiv A)⁻¹ ∘e eq')) {decodeN} (Trunc-elim (λ _ → idp)) ⊙eq : ⊙Trunc 1 (⊙Ω (⊙Susp (de⊙ X))) ⊙≃ ⊙Trunc 1 X ⊙eq = ≃-to-⊙≃ eq idp abstract ⊙decodeN-⊙encodeN : ⊙decodeN ⊙∘ ⊙encodeN == ⊙idf _ ⊙decodeN-⊙encodeN = ⊙λ=' {X = ⊙Trunc 1 (⊙Ω (⊙Susp (de⊙ X)))} {Y = ⊙Trunc 1 (⊙Ω (⊙Susp (de⊙ X)))} decode'-encode' $ ↓-idf=cst-in $ ! (∙-unit-r (ap [_] (!-inv-r (merid (pt X))))) ⊙<–-⊙eq : ⊙<– ⊙eq == ⊙decodeN ⊙<–-⊙eq = –>-is-inj (pre⊙∘-equiv {Z = ⊙Trunc 1 (⊙Ω (⊙Susp (de⊙ X)))} ⊙eq) (⊙<– ⊙eq) ⊙decodeN $ (⊙<– ⊙eq) ⊙∘ ⊙encodeN =⟨ ⊙<–-inv-l ⊙eq ⟩ ⊙idf _ =⟨ ! ⊙decodeN-⊙encodeN ⟩ ⊙decodeN ⊙∘ ⊙encodeN =∎ ⊙encodeN-⊙decodeN : ⊙encodeN ⊙∘ ⊙decodeN == ⊙idf _ ⊙encodeN-⊙decodeN = ⊙encodeN ⊙∘ ⊙decodeN =⟨ ap (⊙encodeN ⊙∘_) (! ⊙<–-⊙eq) ⟩ ⊙encodeN ⊙∘ ⊙<– ⊙eq =⟨ ⊙<–-inv-r ⊙eq ⟩ ⊙idf _ =∎ ⊙eq⁻¹ : ⊙Trunc 1 X ⊙≃ ⊙Trunc 1 (⊙Ω (⊙Susp (de⊙ X))) ⊙eq⁻¹ = ⊙decodeN , snd (eq ⁻¹) iso : Ω^S-group 0 (⊙Trunc 1 (⊙Ω (⊙Susp (de⊙ X)))) ≃ᴳ Ω^S-group 0 (⊙Trunc 1 X) iso = Ω^S-group-emap 0 ⊙eq abstract π₂-Susp : πS 1 (⊙Susp (de⊙ X)) ≃ᴳ πS 0 X π₂-Susp = πS 1 (⊙Susp (de⊙ X)) ≃ᴳ⟨ πS-Ω-split-iso 0 (⊙Susp (de⊙ X)) ⟩ πS 0 (⊙Ω (⊙Susp (de⊙ X))) ≃ᴳ⟨ Ω^S-group-Trunc-fuse-diag-iso 0 (⊙Ω (⊙Susp (de⊙ X))) ⁻¹ᴳ ⟩ Ω^S-group 0 (⊙Trunc 1 (⊙Ω (⊙Susp (de⊙ X)))) ≃ᴳ⟨ iso ⟩ Ω^S-group 0 (⊙Trunc 1 X) ≃ᴳ⟨ Ω^S-group-Trunc-fuse-diag-iso 0 X ⟩ πS 0 X ≃ᴳ∎ module Pi2HSuspNaturality {i} {X Y : Ptd i} (f : X ⊙→ Y) {{_ : has-level 1 (de⊙ X)}} {{_ : has-level 1 (de⊙ Y)}} {{_ : is-connected 0 (de⊙ X)}} {{_ : is-connected 0 (de⊙ Y)}} (H-X : HSS X) (H-Y : HSS Y) where import homotopy.SuspAdjointLoop as SAL private module Π₂X = Pi2HSusp H-X module Π₂Y = Pi2HSusp H-Y ⊙decodeN-natural : Π₂Y.⊙decodeN ◃⊙∘ ⊙Trunc-fmap f ◃⊙idf =⊙∘ ⊙Trunc-fmap (⊙Ω-fmap (⊙Susp-fmap (fst f))) ◃⊙∘ Π₂X.⊙decodeN ◃⊙idf ⊙decodeN-natural = =⊙∘-in $ Π₂Y.⊙decodeN ⊙∘ ⊙Trunc-fmap f =⟨ ⊙λ= (⊙Trunc-fmap-⊙∘ (SAL.η Y) f) ⟩ ⊙Trunc-fmap (SAL.η Y ⊙∘ f) =⟨ ap ⊙Trunc-fmap (SAL.η-natural f) ⟩ ⊙Trunc-fmap (⊙Ω-fmap (⊙Susp-fmap (fst f)) ⊙∘ SAL.η X) =⟨ ! (⊙λ= (⊙Trunc-fmap-⊙∘ (⊙Ω-fmap (⊙Susp-fmap (fst f))) (SAL.η X))) ⟩ ⊙Trunc-fmap (⊙Ω-fmap (⊙Susp-fmap (fst f))) ⊙∘ Π₂X.⊙decodeN =∎ ⊙encodeN-natural : Π₂Y.⊙encodeN ◃⊙∘ ⊙Trunc-fmap (⊙Ω-fmap (⊙Susp-fmap (fst f))) ◃⊙idf =⊙∘ ⊙Trunc-fmap f ◃⊙∘ Π₂X.⊙encodeN ◃⊙idf ⊙encodeN-natural = Π₂Y.⊙encodeN ◃⊙∘ ⊙Trunc-fmap (⊙Ω-fmap (⊙Susp-fmap (fst f))) ◃⊙idf =⊙∘⟨ 2 & 0 & =⊙∘-in {gs = Π₂X.⊙decodeN ◃⊙∘ Π₂X.⊙encodeN ◃⊙idf} $ ! Π₂X.⊙decodeN-⊙encodeN ⟩ Π₂Y.⊙encodeN ◃⊙∘ ⊙Trunc-fmap (⊙Ω-fmap (⊙Susp-fmap (fst f))) ◃⊙∘ Π₂X.⊙decodeN ◃⊙∘ Π₂X.⊙encodeN ◃⊙idf =⊙∘⟨ 1 & 2 & !⊙∘ ⊙decodeN-natural ⟩ Π₂Y.⊙encodeN ◃⊙∘ Π₂Y.⊙decodeN ◃⊙∘ ⊙Trunc-fmap f ◃⊙∘ Π₂X.⊙encodeN ◃⊙idf =⊙∘⟨ 0 & 2 & =⊙∘-in {gs = ⊙idf-seq} Π₂Y.⊙encodeN-⊙decodeN ⟩ ⊙Trunc-fmap f ◃⊙∘ Π₂X.⊙encodeN ◃⊙idf ∎⊙∘
{ "alphanum_fraction": 0.4922323899, "avg_line_length": 31.9659863946, "ext": "agda", "hexsha": "d86e4e7396f144839331da3f3f2dff69a829f69c", "lang": "Agda", "max_forks_count": 50, "max_forks_repo_forks_event_max_datetime": "2022-02-14T03:03:25.000Z", "max_forks_repo_forks_event_min_datetime": "2015-01-10T01:48:08.000Z", "max_forks_repo_head_hexsha": "1037d82edcf29b620677a311dcfd4fc2ade2faa6", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "AntoineAllioux/HoTT-Agda", "max_forks_repo_path": "theorems/homotopy/Pi2HSusp.agda", "max_issues_count": 31, "max_issues_repo_head_hexsha": "1037d82edcf29b620677a311dcfd4fc2ade2faa6", "max_issues_repo_issues_event_max_datetime": "2021-10-03T19:15:25.000Z", "max_issues_repo_issues_event_min_datetime": "2015-03-05T20:09:00.000Z", "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "AntoineAllioux/HoTT-Agda", "max_issues_repo_path": "theorems/homotopy/Pi2HSusp.agda", "max_line_length": 90, "max_stars_count": 294, "max_stars_repo_head_hexsha": "1037d82edcf29b620677a311dcfd4fc2ade2faa6", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "AntoineAllioux/HoTT-Agda", "max_stars_repo_path": "theorems/homotopy/Pi2HSusp.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": 4517, "size": 9398 }
module Ex2 where ---------------------------------------------------------------------------- -- EXERCISE 2 -- STRUCTURE WITH VECTORS -- -- VALUE: 15% -- DEADLINE: 5pm, Friday 23 October (week 5) -- -- DON'T SUBMIT, COMMIT! -- -- The purpose of this exercise is to introduce you to some useful -- mathematical structures and build good tools for working with -- vectors ---------------------------------------------------------------------------- open import CS410-Prelude open import CS410-Monoid open import CS410-Nat open import CS410-Vec open import CS410-Functor -- HINT: your tasks are heralded with the eminently searchable tag, "???" ---------------------------------------------------------------------------- -- ??? 2.1 replicattion to make a constant vector (score: 1 / 1) ---------------------------------------------------------------------------- vec : forall {n X} -> X -> Vec X n vec {zero} x = [] vec {suc n} x = x :: vec x -- HINT: you may need to override default invisibility -- SUSPICIOUS: no specification? why not? ---------------------------------------------------------------------------- -- ??? 2.2 vectorised application (score: 1 / 1) ---------------------------------------------------------------------------- -- implement the operator which takes the same number of functions -- and arguments and computes the applications in corresponding -- positions vapp : forall {n X Y} -> Vec (X -> Y) n -> Vec X n -> Vec Y n vapp [] xs = [] vapp (x :: fs) (y :: xs) = x y :: vapp fs xs ---------------------------------------------------------------------------- -- ??? 2.3 one-liners (score: 1 / 1) ---------------------------------------------------------------------------- -- implement map and zip for vectors using vec and vapp -- no pattern matching or recursion permitted vmap : forall {n X Y} -> (X -> Y) -> Vec X n -> Vec Y n vmap f xs = vapp (vec f) xs vzip : forall {n X Y} -> Vec X n -> Vec Y n -> Vec (X * Y) n vzip xs ys = vapp (vmap _,_ xs) ys ---------------------------------------------------------------------------- -- ??? 2.4 unzipping (score: 2 / 2) ---------------------------------------------------------------------------- -- implement unzipping as a view, showing that every vector of pairs -- is given by zipping two vectors -- you'll need to complete the view type yourselfiew type yourself data Unzippable {X Y n} : Vec (X * Y) n -> Set where unzipped : (xs : Vec X n)(ys : Vec Y n) -> Unzippable (vzip xs ys) unzip : forall {X Y n}(xys : Vec (X * Y) n) -> Unzippable xys unzip [] = unzipped [] [] unzip (fst , snd :: []) = unzipped (fst :: []) (snd :: []) -- Conor: redundant line unzip (fst , snd :: xys) with unzip xys unzip (fst , snd :: .(vapp (vapp (vec _,_) xs) ys)) | unzipped xs ys = unzipped (fst :: xs) (snd :: ys) ---------------------------------------------------------------------------- -- ??? 2.5 vectors are applicative (score: 2 / 2) ---------------------------------------------------------------------------- -- prove the Applicative laws for vectors VecApp : forall n -> Applicative \X -> Vec X n VecApp n = record { pure = vec ; _<*>_ = vapp ; identity = \ {X} v -> VecAppIdentity v ; composition = λ u v w → VecAppComposition w v u ; homomorphism = λ f x → VecAppHomomorphism n x f ; interchange = λ {X} {Y} u y → VecAppInterchange y u } where -- lemmas go here -- Goal: vapp (vec (λ x → x)) v == v VecAppIdentity : {X : Set} -> {n : Nat} -> (v : Vec X n) -> vapp (vec (\ x -> x)) v == v VecAppIdentity [] = refl VecAppIdentity (x :: v) rewrite VecAppIdentity v = refl -- Goal: vapp (vapp (vapp (vec (λ f g x → f (g x))) u) v) w == vapp u (vapp v w) VecAppComposition : {Z : Set} -> {Y : Set} -> {X : Set} -> {n : Nat} -> (w : Vec X n) -> (v : Vec (X → Z) n) -> (u : Vec (Z → Y) n)-> vapp (vapp (vapp (vec (λ f g x → f (g x))) u) v) w == vapp u (vapp v w) VecAppComposition [] [] [] = refl VecAppComposition (x :: w) (x₁ :: v) (x₂ :: u)rewrite VecAppComposition w v u = refl -- Goal: vec (f x) == vapp (vec f) (vec x) VecAppHomomorphism : {X : Set} -> {Y : Set} -> (q : Nat) -> (x : X) -> (f : X → Y) -> vec {q} (f x) == vapp (vec f) (vec x) VecAppHomomorphism zero x f = refl VecAppHomomorphism (suc q) x f rewrite VecAppHomomorphism q x f = refl -- Goal: vapp u (vec y) == vapp (vec (λ f → f y)) u VecAppInterchange : {Y : Set} -> {X : Set} -> {n : Nat} -> (y : X) -> (u : Vec (X → Y) n) -> vapp u (vec y) == vapp (vec (λ f → f y)) u VecAppInterchange u [] = refl VecAppInterchange u (x :: y) rewrite VecAppInterchange u y = refl ---------------------------------------------------------------------------- -- ??? 2.6 vectors are traversable (score: ? / 1) ---------------------------------------------------------------------------- -- show that vectors are traversable; make sure your traverse function -- acts on the elements of the input once each, left-to-right VecTrav : forall n -> Traversable \X -> Vec X n VecTrav zero = record { traverse = λ {F} z {A} {B} _ _ → Applicative.pure z [] } VecTrav (suc n) = record { traverse = λ x x₁ x₂ → {!!} } --VecTrav zero = record { traverse = λ {F} z {A} {B} _ _ → Applicative.pure z [] } --VecTrav (suc n) = record { traverse = λ {F} x y z → {!!} } ---------------------------------------------------------------------------- -- ??? 2.7 monoids make constant applicatives (score: ? / 1) ---------------------------------------------------------------------------- -- Show that every monoid gives rise to a degenerate applicative functor MonCon : forall {X} -> Monoid X -> Applicative \_ -> X MonCon M = record { pure = λ x → Monoid.e M ; _<*>_ = op ; identity = λ v → Monoid.lunit M v ; composition = λ u v w → {!!} ; homomorphism = λ f x → {!!} ; interchange = λ u y → {!!} } where open Monoid M --MonConCoposition : (w : Set) -> (v : Set) -> (u : Set) -> op (op (op e u) v) w == op u (op v w) --MonConCoposition x = ? ---------------------------------------------------------------------------- -- ??? 2.8 vector combine (score: ? / 1) ---------------------------------------------------------------------------- -- Using your answers to 2.6 and 2.7, rather than any new vector recursion, -- show how to compute the result of combining all the elements of a vector -- when they belong to some monoid. vcombine : forall {X} -> Monoid X -> forall {n} -> Vec X n -> X vcombine M = {!!} ---------------------------------------------------------------------------- -- ??? 2.9 scalar product (score: ? / 1) ---------------------------------------------------------------------------- -- Show how to compute the scalar ("dot") product of two vectors of numbers. -- (Multiply elements in corresponding positions; compute total of products.) -- HINT: think zippily, then combine vdot : forall {n} -> Vec Nat n -> Vec Nat n -> Nat vdot xs ys = ? ---------------------------------------------------------------------------- -- MATRICES ---------------------------------------------------------------------------- -- let's say that an h by w matrix is a column h high of rows w wide Matrix : Set -> Nat * Nat -> Set Matrix X (h , w) = Vec (Vec X w) h ---------------------------------------------------------------------------- -- ??? 2.11 identity matrix (score: ? / 1) ---------------------------------------------------------------------------- -- show how to construct the identity matrix of a given size, with -- 1 on the main diagonal and 0 everywhere else, e.g, -- (1 :: 0 :: 0 :: []) :: -- (0 :: 1 :: 0 :: []) :: -- (0 :: 0 :: 1 :: []) :: -- [] idMat : forall {n} -> Matrix Nat (n , n) idMat = {!!} -- HINT: you may need to do recursion on the side, but then you -- can make good use of vec and vapp ---------------------------------------------------------------------------- -- ??? 2.10 transposition (score: ? / 1) ---------------------------------------------------------------------------- -- show how to transpose matrices -- HINT: use traverse, and it's a one-liner transpose : forall {X m n} -> Matrix X (m , n) -> Matrix X (n , m) transpose = {!!} ---------------------------------------------------------------------------- -- ??? 2.11 multiplication (score: ? / 2) ---------------------------------------------------------------------------- -- implement matrix multiplication -- HINT: transpose and vdot can be useful matMult : forall {m n p} -> Matrix Nat (m , n) -> Matrix Nat (n , p) -> Matrix Nat (m , p) matMult xmn xnp = {!!}
{ "alphanum_fraction": 0.4154447703, "avg_line_length": 38.5230125523, "ext": "agda", "hexsha": "6cc3063cd82d714978a76e6a7e21f55413abfa13", "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": "523a8749f49c914bcd28402116dcbe79a78dbbf4", "max_forks_repo_licenses": [ "CC0-1.0" ], "max_forks_repo_name": "clarkdm/CS410", "max_forks_repo_path": "Ex2.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "523a8749f49c914bcd28402116dcbe79a78dbbf4", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "CC0-1.0" ], "max_issues_repo_name": "clarkdm/CS410", "max_issues_repo_path": "Ex2.agda", "max_line_length": 137, "max_stars_count": null, "max_stars_repo_head_hexsha": "523a8749f49c914bcd28402116dcbe79a78dbbf4", "max_stars_repo_licenses": [ "CC0-1.0" ], "max_stars_repo_name": "clarkdm/CS410", "max_stars_repo_path": "Ex2.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 2273, "size": 9207 }
module Data.Vec.Membership where open import Data.Vec as Vec open import Data.Vec.Any open import Data.Vec.Any.Membership.Propositional open import Data.Product as Prod hiding (map) open import Function using (_∘_; id) find : ∀ {a p}{A : Set a}{P : A → Set p}{n}{xs : Vec A n} → Any P xs → ∃ λ x → x ∈ xs × P x -- find = Prod.map id (Prod.map ∈′→∈ id) ∘ find′ find (here px) = , here , px find (there p) = Prod.map id (Prod.map there id) (find p) lose : ∀ {a p}{A : Set a}{P : A → Set p}{n x}{xs : Vec A n} → x ∈ xs → P x → Any P xs lose = lose′ ∘ ∈→∈′ open import Function.Related as Related public using (Kind; Symmetric-kind) renaming (implication to subset ; reverse-implication to superset ; equivalence to set ; injection to subbag ; reverse-injection to superbag ; bijection to bag) _∼[_]_ : ∀ {a m n}{A : Set a} → Vec A m → Kind → Vec A n → Set _ xs ∼[ k ] ys = ∀ {x} → (x ∈ xs) Related.∼[ k ] (x ∈ ys)
{ "alphanum_fraction": 0.5711462451, "avg_line_length": 32.6451612903, "ext": "agda", "hexsha": "a60c19eb29d17aab068bbe4df4e307136f9fc22b", "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": "1a60f72b9ea1dd61845311ee97dc380aa542b874", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "tizmd/agda-vector-any", "max_forks_repo_path": "src/Data/Vec/Membership.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "1a60f72b9ea1dd61845311ee97dc380aa542b874", "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-vector-any", "max_issues_repo_path": "src/Data/Vec/Membership.agda", "max_line_length": 75, "max_stars_count": null, "max_stars_repo_head_hexsha": "1a60f72b9ea1dd61845311ee97dc380aa542b874", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "tizmd/agda-vector-any", "max_stars_repo_path": "src/Data/Vec/Membership.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 336, "size": 1012 }
-- Andreas, 2022-03-02, issue #5784, reported by Trebor-Huang -- Test case by Ulf Norell -- primEraseEquality needs to normalized the sides of the equation, -- not just reduce them. open import Agda.Builtin.Nat open import Agda.Builtin.Equality open import Agda.Builtin.Equality.Erase data Wrap : Set where wrap : Nat → Wrap test : wrap (1 + 1) ≡ wrap 2 test = primEraseEquality refl thm : test ≡ refl thm = refl -- Should succeed -- WAS: primEraseEquality refl != refl
{ "alphanum_fraction": 0.730125523, "avg_line_length": 21.7272727273, "ext": "agda", "hexsha": "90b7e3749359e0352d88456721b2f0e6ef7636a9", "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/Issue5784.agda", "max_issues_count": 6, "max_issues_repo_head_hexsha": "98c9382a59f707c2c97d75919e389fc2a783ac75", "max_issues_repo_issues_event_max_datetime": "2021-11-24T08:31:10.000Z", "max_issues_repo_issues_event_min_datetime": "2021-10-18T08:12:24.000Z", "max_issues_repo_licenses": [ "BSD-2-Clause" ], "max_issues_repo_name": "KDr2/agda", "max_issues_repo_path": "test/Succeed/Issue5784.agda", "max_line_length": 67, "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/Issue5784.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 146, "size": 478 }
{-# OPTIONS --without-K --exact-split #-} module group-completion where import 15-groups open 15-groups public
{ "alphanum_fraction": 0.7280701754, "avg_line_length": 14.25, "ext": "agda", "hexsha": "28370225f138946cdbf8b7fd917e49efa00ba138", "lang": "Agda", "max_forks_count": 30, "max_forks_repo_forks_event_max_datetime": "2022-03-16T00:33:50.000Z", "max_forks_repo_forks_event_min_datetime": "2018-09-26T09:08:57.000Z", "max_forks_repo_head_hexsha": "1e1f8def50f9359928e52ebb2ee53ed1166487d9", "max_forks_repo_licenses": [ "CC-BY-4.0" ], "max_forks_repo_name": "UlrikBuchholtz/HoTT-Intro", "max_forks_repo_path": "Agda/group-completion.agda", "max_issues_count": 8, "max_issues_repo_head_hexsha": "1e1f8def50f9359928e52ebb2ee53ed1166487d9", "max_issues_repo_issues_event_max_datetime": "2020-10-16T15:27:01.000Z", "max_issues_repo_issues_event_min_datetime": "2019-06-18T04:16:04.000Z", "max_issues_repo_licenses": [ "CC-BY-4.0" ], "max_issues_repo_name": "UlrikBuchholtz/HoTT-Intro", "max_issues_repo_path": "Agda/group-completion.agda", "max_line_length": 41, "max_stars_count": 333, "max_stars_repo_head_hexsha": "1e1f8def50f9359928e52ebb2ee53ed1166487d9", "max_stars_repo_licenses": [ "CC-BY-4.0" ], "max_stars_repo_name": "UlrikBuchholtz/HoTT-Intro", "max_stars_repo_path": "Agda/group-completion.agda", "max_stars_repo_stars_event_max_datetime": "2022-03-22T23:50:15.000Z", "max_stars_repo_stars_event_min_datetime": "2018-09-26T08:33:30.000Z", "num_tokens": 26, "size": 114 }
{-# OPTIONS --without-K --safe #-} module Categories.Category.WithFamilies where -- Category With Families (as model of dependent type theory) -- see https://ncatlab.org/nlab/show/categorical+model+of+dependent+types#categories_with_families -- for more details. open import Level open import Relation.Binary.PropositionalEquality as ≡ using (_≡_) open import Categories.Category open import Categories.Functor open import Categories.NaturalTransformation.NaturalIsomorphism open import Categories.Object.Terminal open import Categories.Category.Instance.FamilyOfSets open import Categories.Functor.Presheaf open import Categories.Category.Slice open import Categories.Category.Instance.Sets private variable o ℓ e a b : Level -- We want to re-interpret the members of C as -- the various parts of a type theory -- Context, types, terms, etc. module UnpackFam {C : Category o ℓ e} (T : Presheaf C (FamilyOfSets a b)) where private module C = Category C module T = Functor T Context : Set o Context = C.Obj Ty : C.Obj → Set a Ty Γ = Fam.U (T.F₀ Γ) -- remember that context morphisms are substitutions -- which are here applied postfix _[_] : ∀ {Γ Δ} → (T : Ty Γ) → (σ : Δ C.⇒ Γ) → Ty Δ _[_] T σ = Hom.f (T.F₁ σ) T Tm : ∀ Γ → Ty Γ → Set b Tm Γ = Fam.T (T.F₀ Γ) -- substitute into a term _[_⁺] : {Γ Δ : Context} {tp : Ty Γ} → (term : Tm Γ tp) → (σ : Δ C.⇒ Γ) → Tm Δ (tp [ σ ]) _[_⁺] term σ = Hom.φ (T.F₁ σ) _ term -- This is the original definition from Dybjer. The one from nLab is too tricky to do quite yet. record CwF : Set (suc (o ⊔ ℓ ⊔ e ⊔ a ⊔ b)) where field C : Category o ℓ e T : Presheaf C (FamilyOfSets a b) Empty : Terminal C infix 5 _>_ module C = Category C module T = Functor T open UnpackFam T module Empty = Terminal Empty field -- context snoc _>_ : ∀ Γ → Ty Γ → Context -- projections p : ∀ {Γ A} → (Γ > A) C.⇒ Γ v : ∀ {Γ A} → Tm (Γ > A) (A [ p ]) -- constructor <_,_> : ∀ {Γ A} → ∀ {Δ} (γ : Δ C.⇒ Γ) (a : Tm Δ (A [ γ ])) → Δ C.⇒ (Γ > A) v[_] : ∀ {Γ A Δ} → (γ : Δ C.⇒ Γ) -> Tm (Δ > A [ γ ]) (A [ γ C.∘ p ]) v[_] {Γ} {A} {Δ} γ = ≡.subst (Tm (Δ > A [ γ ])) (Eq.g≡f (T.homomorphism {Γ})) v -- Note that the original used Heterogenenous equality (yuck). So here we use -- explicit transport. Explicit yuck. field p∘<γ,a>≡γ : ∀ {Γ A} → ∀ {Δ} {γ : Δ C.⇒ Γ} {a : Tm Δ (A [ γ ])} → p C.∘ < γ , a > C.≈ γ patch : ∀ {Γ A} → ∀ {Δ} {γ : Δ C.⇒ Γ} {δ : Δ C.⇒ (Γ > A)} (a : Tm Δ (A [ γ ])) (pδ≈γ : p C.∘ δ C.≈ γ) → Fam.T (T.F₀ Δ) ((A [ p ]) [ δ ]) patch {Γ} {A} {Δ} {γ} a pδ≈γ = ≡.subst (Fam.T (T.F₀ Δ)) (≡.trans (Eq.g≡f (T.F-resp-≈ pδ≈γ)) (≡.sym (Eq.g≡f (T.homomorphism {Γ})))) a field v[<γ,a>]≡a : ∀ {Γ A} → ∀ {Δ} {γ : Δ C.⇒ Γ} {a : Tm Δ (A [ γ ])} → v [ < γ , a > ⁺] ≡ patch a p∘<γ,a>≡γ <γ,a>-unique : ∀ {Γ A} → ∀ {Δ} {γ : Δ C.⇒ Γ} {a : Tm Δ (A [ γ ])} → (δ : Δ C.⇒ (Γ > A)) → (pδ≈γ : p C.∘ δ C.≈ γ) → ( v [ δ ⁺] ≡ patch a pδ≈γ) → δ C.≈ < γ , a > _[id] : ∀ {Γ A} -> Tm Γ A -> Tm Γ (A [ C.id ]) _[id] {Γ} {A} x = ≡.subst (Tm Γ) (Eq.g≡f (T.identity {Γ}) {A}) x open UnpackFam T public open Empty public using () renaming (⊤ to <>) -- inside a CwF, we can sort-of 'define' a λ-calculus with Π, but the results are way too -- heterogeneous to contemplate... {- record Pi {o ℓ e a b} (Cwf : CwF {o} {ℓ} {e} {a} {b}) : Set (o ⊔ ℓ ⊔ a ⊔ b) where open CwF Cwf field Π : ∀ {Γ} -> (A : Ty Γ) (B : Ty (Γ > A)) -> Ty Γ lam : ∀ {Γ} {A : Ty Γ} {B : Ty (Γ > A)} -> (b : Tm (Γ > A) B) -> Tm Γ (Π A B) _$_ : ∀ {Γ} {A : Ty Γ} {B : Ty (Γ > A)} -> (f : Tm Γ (Π A B)) (x : Tm Γ A) -> Tm Γ (B [ < C.id , x [id] > ]) -- naturality laws Π-nat : ∀ {Γ} -> (A : Ty Γ) (B : Ty (Γ > A)) -> ∀ {Δ} (γ : Δ C.⇒ Γ) -> Π A B [ γ ] ≡ Π (A [ γ ]) (B [ < (γ C.∘ p) , v[ γ ] > ]) lam-nat : ∀ {Γ} {A : Ty Γ} {B : Ty (Γ > A)} -> (b : Tm (Γ > A) B) -> ∀ {Δ} (γ : Δ C.⇒ Γ) -> lam b [ γ ⁺] ≡ {! lam {A = A [ γ ]} (b [ < γ C.∘ p , v[ γ ] > ⁺]) !} app-nat : ∀ {Γ} {A : Ty Γ} {B : Ty (Γ > A)} -> (f : Tm Γ (Π A B)) (x : Tm Γ A) -> ∀ {Δ} (γ : Δ C.⇒ Γ) -> (f $ x) [ γ ⁺] ≡ {! ≡.subst (Tm Δ) (Π-nat A B γ) (f [ γ ⁺]) $ (x [ γ ⁺]) !} -- proofs of the lam/_$_ isomorphism β : ∀ {Γ} {A : Ty Γ} {B : Ty (Γ > A)} -> (b : Tm (Γ > A) B) (x : Tm Γ A) -> (lam b $ x) ≡ b [ < C.id , x [id] > ⁺] η : ∀ {Γ} {A : Ty Γ} {B : Ty (Γ > A)} -> (f : Tm Γ (Π A B)) -> lam (≡.subst (Tm (Γ > A)) (Π-nat A B p) (f [ p ⁺]) $ v) ≡ {! f !} -}
{ "alphanum_fraction": 0.4855416487, "avg_line_length": 37.674796748, "ext": "agda", "hexsha": "f05cfc99700f8ac553ef11462a1cbca082a7639a", "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": "7672b7a3185ae77467cc30e05dbe50b36ff2af8a", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "bblfish/agda-categories", "max_forks_repo_path": "src/Categories/Category/WithFamilies.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "7672b7a3185ae77467cc30e05dbe50b36ff2af8a", "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": "bblfish/agda-categories", "max_issues_repo_path": "src/Categories/Category/WithFamilies.agda", "max_line_length": 134, "max_stars_count": 5, "max_stars_repo_head_hexsha": "7672b7a3185ae77467cc30e05dbe50b36ff2af8a", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "bblfish/agda-categories", "max_stars_repo_path": "src/Categories/Category/WithFamilies.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": 2045, "size": 4634 }
------------------------------------------------------------------------ -- Some properties about integers ------------------------------------------------------------------------ module Data.Integer.Properties where open import Algebra import Algebra.Morphism as Morphism open import Data.Empty open import Data.Function open import Data.Integer hiding (suc) open import Data.Nat as ℕ renaming (_*_ to _ℕ*_) import Data.Nat.Properties as ℕ open import Data.Sign as Sign using () renaming (_*_ to _S*_) import Data.Sign.Properties as SignProp open import Relation.Binary.PropositionalEquality open ≡-Reasoning open Morphism.Definitions ℤ ℕ _≡_ -- Some properties relating sign and ∣_∣ to _◃_. sign-◃ : ∀ s n → sign (s ◃ suc n) ≡ s sign-◃ Sign.- _ = refl sign-◃ Sign.+ _ = refl sign-cong : ∀ {s₁ s₂ n₁ n₂} → s₁ ◃ suc n₁ ≡ s₂ ◃ suc n₂ → s₁ ≡ s₂ sign-cong {s₁} {s₂} {n₁} {n₂} eq = begin s₁ ≡⟨ sym $ sign-◃ s₁ n₁ ⟩ sign (s₁ ◃ suc n₁) ≡⟨ cong sign eq ⟩ sign (s₂ ◃ suc n₂) ≡⟨ sign-◃ s₂ n₂ ⟩ s₂ ∎ abs-◃ : ∀ s n → ∣ s ◃ n ∣ ≡ n abs-◃ _ zero = refl abs-◃ Sign.- (suc n) = refl abs-◃ Sign.+ (suc n) = refl abs-cong : ∀ {s₁ s₂ n₁ n₂} → s₁ ◃ n₁ ≡ s₂ ◃ n₂ → n₁ ≡ n₂ abs-cong {s₁} {s₂} {n₁} {n₂} eq = begin n₁ ≡⟨ sym $ abs-◃ s₁ n₁ ⟩ ∣ s₁ ◃ n₁ ∣ ≡⟨ cong ∣_∣ eq ⟩ ∣ s₂ ◃ n₂ ∣ ≡⟨ abs-◃ s₂ n₂ ⟩ n₂ ∎ -- ∣_∣ commutes with multiplication. abs-*-commute : Homomorphic₂ ∣_∣ _*_ _ℕ*_ abs-*-commute i j = abs-◃ _ _ -- Multiplication is right cancellative for non-zero integers. cancel-*-right : ∀ i j k → k ≢ + 0 → i * k ≡ j * k → i ≡ j cancel-*-right i j k ≢0 eq with signAbs k cancel-*-right i j .(+ 0) ≢0 eq | s ◂ zero = ⊥-elim (≢0 refl) cancel-*-right i j .(s ◃ suc n) ≢0 eq | s ◂ suc n with ∣ s ◃ suc n ∣ | abs-◃ s (suc n) | sign (s ◃ suc n) | sign-◃ s n ... | .(suc n) | refl | .s | refl = ◃-cong (sign-i≡sign-j i j eq) $ ℕ.cancel-*-right ∣ i ∣ ∣ j ∣ $ abs-cong eq where sign-i≡sign-j : ∀ i j → sign i S* s ◃ ∣ i ∣ ℕ* suc n ≡ sign j S* s ◃ ∣ j ∣ ℕ* suc n → sign i ≡ sign j sign-i≡sign-j i j eq with signAbs i | signAbs j sign-i≡sign-j .(+ 0) .(+ 0) eq | s₁ ◂ zero | s₂ ◂ zero = refl sign-i≡sign-j .(+ 0) .(s₂ ◃ suc n₂) eq | s₁ ◂ zero | s₂ ◂ suc n₂ with ∣ s₂ ◃ suc n₂ ∣ | abs-◃ s₂ (suc n₂) ... | .(suc n₂) | refl with abs-cong {s₁} {sign (s₂ ◃ suc n₂) S* s} {0} {suc n₂ ℕ* suc n} eq ... | () sign-i≡sign-j .(s₁ ◃ suc n₁) .(+ 0) eq | s₁ ◂ suc n₁ | s₂ ◂ zero with ∣ s₁ ◃ suc n₁ ∣ | abs-◃ s₁ (suc n₁) ... | .(suc n₁) | refl with abs-cong {sign (s₁ ◃ suc n₁) S* s} {s₁} {suc n₁ ℕ* suc n} {0} eq ... | () sign-i≡sign-j .(s₁ ◃ suc n₁) .(s₂ ◃ suc n₂) eq | s₁ ◂ suc n₁ | s₂ ◂ suc n₂ with ∣ s₁ ◃ suc n₁ ∣ | abs-◃ s₁ (suc n₁) | sign (s₁ ◃ suc n₁) | sign-◃ s₁ n₁ | ∣ s₂ ◃ suc n₂ ∣ | abs-◃ s₂ (suc n₂) | sign (s₂ ◃ suc n₂) | sign-◃ s₂ n₂ ... | .(suc n₁) | refl | .s₁ | refl | .(suc n₂) | refl | .s₂ | refl = SignProp.cancel-*-right s₁ s₂ (sign-cong eq)
{ "alphanum_fraction": 0.4805235276, "avg_line_length": 36.4659090909, "ext": "agda", "hexsha": "adc0e86cf51f73b4fcec57fd0ff1f8fb5ee22bc8", "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/Integer/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/Integer/Properties.agda", "max_line_length": 83, "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/Integer/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": 1344, "size": 3209 }
{-# OPTIONS --cubical --no-import-sorts --safe --postfix-projections #-} module Cubical.Data.FinSet.Binary.Large where open import Cubical.Functions.Embedding open import Cubical.Functions.Involution open import Cubical.Foundations.Equiv open import Cubical.Foundations.HLevels open import Cubical.Foundations.Isomorphism open import Cubical.Foundations.Prelude open import Cubical.Foundations.Univalence open import Cubical.Data.Bool open import Cubical.Data.Sigma open import Cubical.HITs.PropositionalTruncation private variable ℓ : Level isBinary : Type ℓ → Type ℓ isBinary B = ∥ Bool ≃ B ∥ Binary : ∀ ℓ → Type _ Binary ℓ = Σ (Type ℓ) isBinary isBinary→isSet : ∀{B : Type ℓ} → isBinary B → isSet B isBinary→isSet {B} = rec isPropIsSet λ eqv → isOfHLevelRespectEquiv 2 eqv isSetBool private Σ≡Prop² : ∀{ℓ ℓ'} {A : Type ℓ} {B : A → Type ℓ'} → {w x : Σ A B} → isOfHLevelDep 1 B → (p q : w ≡ x) → cong fst p ≡ cong fst q → p ≡ q Σ≡Prop² _ _ _ r i j .fst = r i j Σ≡Prop² {B = B} {w} {x} Bprp p q r i j .snd = isPropDep→isSetDep Bprp (w .snd) (x .snd) (cong snd p) (cong snd q) r i j BinaryEmbedding : isEmbedding (λ(B : Binary ℓ) → map-snd isBinary→isSet B) BinaryEmbedding w x = isoToIsEquiv theIso where open Iso f = map-snd isBinary→isSet theIso : Iso (w ≡ x) (f w ≡ f x) theIso .fun = cong f theIso .inv p i .fst = p i .fst theIso .inv p i .snd = ∥∥-isPropDep (Bool ≃_) (w .snd) (x .snd) (λ i → p i .fst) i theIso .rightInv p = Σ≡Prop² (isOfHLevel→isOfHLevelDep 1 (λ _ → isPropIsSet)) _ p refl theIso .leftInv p = Σ≡Prop² (∥∥-isPropDep (Bool ≃_)) _ p refl Base : Binary _ Base .fst = Bool Base .snd = ∣ idEquiv Bool ∣ Loop : Base ≡ Base Loop i .fst = notEq i Loop i .snd = ∥∥-isPropDep (Bool ≃_) (Base .snd) (Base .snd) notEq i private notEq² : Square notEq refl refl notEq notEq² = involPath² {f = not} notnot Loop² : Square Loop refl refl Loop Loop² i j .fst = notEq² i j Loop² i j .snd = isPropDep→isSetDep' (∥∥-isPropDep (Bool ≃_)) notEq² (cong snd Loop) refl refl (cong snd Loop) i j isGroupoidBinary : isGroupoid (Binary ℓ) isGroupoidBinary = Embedding-into-hLevel→hLevel 2 (map-snd isBinary→isSet , BinaryEmbedding) (isOfHLevelTypeOfHLevel 2) record BinStructure (B : Type ℓ) : Type ℓ where field base : B loop : base ≡ base loop² : Square loop refl refl loop trunc : isGroupoid B structure₀ : BinStructure (Binary ℓ-zero) structure₀ .BinStructure.base = Base structure₀ .BinStructure.loop = Loop structure₀ .BinStructure.loop² = Loop² structure₀ .BinStructure.trunc = isGroupoidBinary module Parameterized (B : Type ℓ) where Baseᴾ : Bool ≃ B → Binary ℓ Baseᴾ P = B , ∣ P ∣ Loopᴾ : (P Q : Bool ≃ B) → Baseᴾ P ≡ Baseᴾ Q Loopᴾ P Q i = λ where .fst → ua first i .snd → ∥∥-isPropDep (Bool ≃_) ∣ P ∣ ∣ Q ∣ (ua first) i where first : B ≃ B first = compEquiv (invEquiv P) Q Loopᴾ² : (P Q R : Bool ≃ B) → Square (Loopᴾ P Q) (Loopᴾ P R) refl (Loopᴾ Q R) Loopᴾ² P Q R i = Σ≡Prop (λ _ → squash) (S i) where PQ : B ≃ B PQ = compEquiv (invEquiv P) Q PR : B ≃ B PR = compEquiv (invEquiv P) R QR : B ≃ B QR = compEquiv (invEquiv Q) R Q-Q : Bool ≃ Bool Q-Q = compEquiv Q (invEquiv Q) PQRE : compEquiv PQ QR ≡ PR PQRE = compEquiv PQ QR ≡[ i ]⟨ compEquiv-assoc (invEquiv P) Q QR (~ i) ⟩ compEquiv (invEquiv P) (compEquiv Q QR) ≡[ i ]⟨ compEquiv (invEquiv P) (compEquiv-assoc Q (invEquiv Q) R i) ⟩ compEquiv (invEquiv P) (compEquiv Q-Q R) ≡[ i ]⟨ compEquiv (invEquiv P) (compEquiv (invEquiv-is-rinv Q i) R) ⟩ compEquiv (invEquiv P) (compEquiv (idEquiv _) R) ≡[ i ]⟨ compEquiv (invEquiv P) (compEquivIdEquiv R i) ⟩ PR ∎ PQR : ua PQ ∙ ua QR ≡ ua PR PQR = ua PQ ∙ ua QR ≡[ i ]⟨ uaCompEquiv PQ QR (~ i) ⟩ ua (compEquiv PQ QR) ≡⟨ cong ua PQRE ⟩ ua PR ∎ S : Square (ua PQ) (ua PR) refl (ua QR) S i j = hcomp (λ k → λ where (j = i0) → B (i = i0) → compPath-filler (ua PQ) (ua QR) (~ k) j (i = i1) → ua PR j (j = i1) → ua QR (i ∨ ~ k)) (PQR i j)
{ "alphanum_fraction": 0.607167955, "avg_line_length": 28.8445945946, "ext": "agda", "hexsha": "9fc721f2efbcd6d561223af6606b6662a90e2bc1", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "fd8059ec3eed03f8280b4233753d00ad123ffce8", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "dan-iel-lee/cubical", "max_forks_repo_path": "Cubical/Data/FinSet/Binary/Large.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "fd8059ec3eed03f8280b4233753d00ad123ffce8", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "dan-iel-lee/cubical", "max_issues_repo_path": "Cubical/Data/FinSet/Binary/Large.agda", "max_line_length": 83, "max_stars_count": null, "max_stars_repo_head_hexsha": "fd8059ec3eed03f8280b4233753d00ad123ffce8", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "dan-iel-lee/cubical", "max_stars_repo_path": "Cubical/Data/FinSet/Binary/Large.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 1679, "size": 4269 }
module Avionics.SafetyEnvelopes.Properties where open import Data.Bool using (Bool; true; false; _∧_; T) open import Data.Empty using (⊥; ⊥-elim) open import Data.List as List using (List; []; _∷_; any) open import Data.List.Relation.Unary.Any as Any using (Any; here; there; satisfied) open import Data.Maybe using (Maybe; just; nothing; is-just; _>>=_) open import Data.Product as Prod using (∃-syntax; _×_; proj₁; proj₂) renaming (_,_ to ⟨_,_⟩) open import Data.Sum using (_⊎_; inj₁; inj₂) open import Function using (_∘_) open import Relation.Binary.PropositionalEquality as Eq using (_≡_; refl; cong; cong₂; inspect; [_]; sym; trans) open Eq.≡-Reasoning using (begin_; _≡⟨⟩_; _≡˘⟨_⟩_; _≡⟨_⟩_; _∎) open import Relation.Nullary using (Dec; yes; no; ¬_) open import Relation.Nullary.Decidable using (toWitness; fromWitness) open import Relation.Unary using (_∈_) open import Avionics.Bool using (≡→T; T∧→×; ×→T∧; lem∧) open import Avionics.List using (≡→any; any-map; any-map-rev; any→≡) open import Avionics.Real using (ℝ; _+_; _-_; -_; _*_; _÷_; _^_; _<ᵇ_; _≤_; _<_; _<?_; _≤?_; _≢0; 0ℝ; 1ℝ; 2ℝ; 1/2; abs; 1/_; _^2; √_; fromℕ; double-neg; ⟨0,∞⟩; [0,∞⟩; <-transˡ; 2>0; ⟨0,∞⟩→0<; 0<→⟨0,∞⟩; >0→≢0; >0→≥0; 0≟0≡yes0≡0; abs<x→<x∧-x<; neg-involutive; neg-distrib-+; neg-mono-<->; neg-def; m-m≡0; +-comm; +-assoc; *-comm; *-assoc; +-monoˡ-<; m÷n<o≡m<o*n; m<o÷n≡m*n<o; neg-distribˡ-*; √x^2≡absx; x*x≡x^2; x^2*y^2≡⟨xy⟩^2; 1/x^2≡⟨1/x⟩^2) open import Avionics.Probability using (NormalDist; Dist) open import Avionics.SafetyEnvelopes using (inside; inside'; mahalanobis1; z-predictable'; P[_|X=_]_; classify''; classify; M→pbs; StallClasses; Stall; NoStall; Uncertain; no-uncertain; safety-envelope; z-predictable; Model; τ-confident; Stall≡1-NoStall; NoStall≡1-Stall; ≤p→¬≤1-p; ≤1-p→¬≤p ) open NormalDist using (σ; μ) --<ᵇ→< : ∀ {x y} → T (x <ᵇ y) → x < y --<ᵇ→< = toWitness -- Preliminary defitinions -- `pi` is the prediction interval for the z score, i.e., -- pi(N (μ, σ), z) = [μ − zσ, μ + zσ] pi : NormalDist → ℝ → ℝ → Set pi nd z x = (μ nd) - z * (σ nd) < x × x < (μ nd) + z * (σ nd) extractDists : Model → List NormalDist extractDists M = List.map (proj₁ ∘ proj₂) (Model.fM M) ------------------------------ Starting point - Theorem 2 ------------------------------ -- Theorem 1 says: -- In the case of univariate normal distributions, the z-predictability condition -- > mahalanobis(μ, x, σ²-¹) < z -- reduces to -- > μ - zσ < x <ᵇ (μ + zσ) -- the prediction interval with a z-score of z z-pred-interval≡mahalanobis<z : ∀ (nd z x) → inside nd z x ≡ inside' nd z x z-pred-interval≡mahalanobis<z nd z x = begin inside nd z x ≡⟨⟩ (u - z * s <ᵇ x) ∧ (x <ᵇ (u + z * s)) ≡⟨ cong (λ e → ((u - z * s) <ᵇ x) ∧ (x <ᵇ e)) ( begin u + z * s ≡˘⟨ cong₂ (_+_) (neg-involutive _) (neg-involutive _) ⟩ -(- u) + -(-(z * s)) ≡˘⟨ neg-distrib-+ _ _ ⟩ -((- u) + (- (z * s))) ≡⟨⟩ -(- u - z * s) ∎ ) ⟩ (u - z * s <ᵇ x) ∧ (x <ᵇ -(- u - z * s)) ≡⟨ cong (λ e → (e <ᵇ x) ∧ (x <ᵇ -(- u - z * s))) ( begin u - z * s ≡˘⟨ cong (_+ (- (z * s))) (neg-involutive _) ⟩ -(- u) + (- (z * s)) ≡˘⟨ neg-distrib-+ _ _ ⟩ -(- u + z * s) ∎ ) ⟩ (-(- u + z * s) <ᵇ x) ∧ (x <ᵇ -(- u - z * s)) ≡˘⟨ cong (λ e → (-(- u + z * s) <ᵇ e) ∧ (e <ᵇ -(- u - z * s))) (neg-involutive _) ⟩ (-(- u + z * s) <ᵇ -(- x)) ∧ (-(- x) <ᵇ -(- u - z * s)) ≡˘⟨ cong ((-(- u + z * s) <ᵇ -(- x)) ∧_) (neg-mono-<-> _ _) ⟩ (-(- u + z * s) <ᵇ -(- x)) ∧ (- u - z * s <ᵇ - x) ≡˘⟨ cong (_∧ (- u - z * s <ᵇ - x)) (neg-mono-<-> _ _) ⟩ (- x <ᵇ - u + z * s) ∧ (- u - z * s <ᵇ - x) ≡⟨ cong (_∧ (- u - z * s <ᵇ - x)) ( begin - x <ᵇ - u + z * s ≡˘⟨ cong (_<ᵇ - u + z * s) (neg-def _) ⟩ 0ℝ - x <ᵇ - u + z * s ≡˘⟨ cong (λ e → e - x <ᵇ - u + z * s) (trans (+-comm _ _) (m-m≡0 _)) ⟩ (- u + u) - x <ᵇ - u + z * s ≡˘⟨ cong (_<ᵇ - u + z * s) (+-assoc _ _ _) ⟩ (- u) + (u - x) <ᵇ - u + z * s ≡˘⟨ +-monoˡ-< _ _ _ ⟩ u - x <ᵇ z * s ∎ ) ⟩ (u - x <ᵇ z * s) ∧ (- u - z * s <ᵇ - x) ≡⟨ cong ((u - x <ᵇ z * s) ∧_) ( begin - u - z * s <ᵇ - x ≡˘⟨ cong (- u - z * s <ᵇ_) (neg-def _) ⟩ - u - z * s <ᵇ 0ℝ - x ≡˘⟨ cong (λ e → - u - z * s <ᵇ e - x) (trans (+-comm _ _) (m-m≡0 _)) ⟩ - u - z * s <ᵇ (- u + u) - x ≡˘⟨ cong (- u - z * s <ᵇ_) (+-assoc _ _ _) ⟩ - u - z * s <ᵇ - u + (u - x) ≡˘⟨ +-monoˡ-< _ _ _ ⟩ - (z * s) <ᵇ u - x ∎ ) ⟩ (u - x <ᵇ z * s) ∧ (- (z * s) <ᵇ u - x) ≡˘⟨ cong ((u - x <ᵇ z * s) ∧_) ( begin - z <ᵇ (u - x) ÷ s ≡⟨ m<o÷n≡m*n<o _ _ _ ⟩ (- z) * s <ᵇ (u - x) ≡˘⟨ cong (_<ᵇ (u - x)) (neg-distribˡ-* _ _) ⟩ - (z * s) <ᵇ u - x ∎ ) ⟩ (u - x <ᵇ z * s) ∧ (- z <ᵇ (u - x) ÷ s) ≡˘⟨ cong (_∧ (- z <ᵇ (u - x) ÷ s)) (m÷n<o≡m<o*n _ _ _) ⟩ ((u - x) ÷ s <ᵇ z) ∧ (- z <ᵇ (u - x) ÷ s) ≡˘⟨ abs<x→<x∧-x< ⟩ abs ((u - x) ÷ s) <ᵇ z ≡˘⟨ cong (_<ᵇ z) (√x^2≡absx _) ⟩ √(((u - x) ÷ s)^2) <ᵇ z ≡⟨⟩ √(((u - x) * (1/ s))^2) <ᵇ z ≡˘⟨ cong (λ e → √ e <ᵇ z) ( begin (u - x) * (1/ (s * s)) * (u - x) ≡⟨ *-comm _ _ ⟩ (u - x) * ((u - x) * (1/ (s * s))) ≡⟨ *-assoc _ _ _ ⟩ (u - x) * (u - x) * (1/ (s * s)) ≡⟨ cong (λ e → (u - x) * (u - x) * (1/ e)) (x*x≡x^2 _) ⟩ (u - x) * (u - x) * (1/ (s ^2)) ≡⟨ cong ((u - x) * (u - x) *_) (1/x^2≡⟨1/x⟩^2 _) ⟩ (u - x) * (u - x) * (1/ s) ^2 ≡⟨ cong (_* (1/ s) ^2) (x*x≡x^2 _) ⟩ (u - x)^2 * (1/ s) ^2 ≡⟨ x^2*y^2≡⟨xy⟩^2 _ _ ⟩ ((u - x) * (1/ s))^2 ∎ )⟩ √((u - x) * (1/ (s * s)) * (u - x)) <ᵇ z ≡⟨⟩ mahalanobis1 u x (1/ (s * s)) <ᵇ z ≡⟨⟩ inside' nd z x ∎ where u = μ nd s = σ nd ---- ############ Theorem 1 END ############ ------------------------------ Starting point - Theorem 2 ------------------------------ -- Proof of Theorem 2 (paper) -- -- In words, the Property 1 says that: -- The energy signal x is z-predictable iff there exist ⟨α, v⟩ s.t. -- M(⟨α, v⟩)1 = di and x ∈ pi(di , z). -- -- Notice that `Any (λ nd → x ∈ pi nd z) nds` translates to: -- there exists nd such that `nd ∈ nds` and `x ∈ pi(nd, z)` follows-def←' : ∀ (nds z x) → z-predictable' nds z x ≡ ⟨ x , true ⟩ → Any (λ nd → x ∈ pi nd z) nds follows-def←' nds z x res≡x,true = Any-x∈pi where res≡true = cong proj₂ res≡x,true -- the first `toWitness` takes a result `(μ nd - z * σ nd) <ᵇ x` (a -- boolean) and produces a proof of the type `(μ nd) - z * (σ nd) < x` -- assuming we have provided an operator `<?` toWitness' = λ nd → Prod.map (toWitness {Q = (μ nd - z * σ nd) <? x}) (toWitness {Q = x <? (μ nd + z * σ nd)}) -- We find the value for which `inside z x` becomes true in the list `nds` Any-bool = ≡→any (λ nd → inside nd z x) nds res≡true -- Converting the boolean proof into a proof at the type level Any-x∈pi = Any.map (λ {nd} → toWitness' nd ∘ T∧→×) Any-bool -- forward proof follows-def→' : ∀ (nds z x) → Any (λ nd → x ∈ pi nd z) nds → z-predictable' nds z x ≡ ⟨ x , true ⟩ follows-def→' nds z x any[x∈pi-z]nds = let -- converts a tuple of `(μ nd) - z * (σ nd) < x , x < (μ nd + z * σ nd)` -- (a proof) into a boolean fromWitness' nd = λ{⟨ μ-zσ<x , x<μ+zσ ⟩ → ×→T∧ ⟨ (fromWitness {Q = (μ nd - z * σ nd) <? x} μ-zσ<x) , (fromWitness {Q = x <? (μ nd + z * σ nd)} x<μ+zσ) ⟩} -- Converting from a proof on `_<_` to a proof on `_<ᵇ_` any[inside]nds = (Any.map (λ {nd} → fromWitness' nd) any[x∈pi-z]nds) -- Transforming the prove from Any into equality (_≡_) z-pred-x≡⟨x,true⟩ = any→≡ (λ nd → inside nd z x) nds any[inside]nds -- Extending the result from a single Bool value to a pair `ℝ × Bool` in cong (⟨ x ,_⟩) z-pred-x≡⟨x,true⟩ -- From the prove above we can obtain the value `nd` and its prove `x ∈ pi nd z` -- Note: An element of ∃[ nd ] (x ∈ pi nd z) is a tuple of the form ⟨ nd , proof ⟩ --prop1← : ∀ (nds z x) -- → z-predictable' nds z x ≡ ⟨ x , true ⟩ -- → ∃[ nd ] (x ∈ pi nd z) --prop1← nds z x res≡x,true = satisfied (follows-def←' nds z x res≡x,true) -- This proofs is telling us that `z-predictable` follows from the definition follows-def← : ∀ (M z x) → z-predictable M z x ≡ ⟨ x , true ⟩ → Any (λ nd → x ∈ pi nd z) (extractDists M) follows-def← M z x res≡x,true = follows-def←' (extractDists M) z x res≡x,true follows-def→ : ∀ (M z x) → Any (λ nd → x ∈ pi nd z) (extractDists M) → z-predictable M z x ≡ ⟨ x , true ⟩ follows-def→ M z x Any[x∈pi-nd-z]M = follows-def→' (extractDists M) z x Any[x∈pi-nd-z]M -- ############ FINAL RESULT - Theorem 1 ############ -- In words: Given a Model `M` and parameter `z`, if `x` is z-predictable, then -- there exists θ (a flight state) such that they are associated to a `nd` -- (Normal Distribution) and `x` falls withing the Predictable Interval theorem1← : ∀ (M z x) → z-predictable M z x ≡ ⟨ x , true ⟩ → Any (λ{⟨ θ , ⟨ nd , p ⟩ ⟩ → x ∈ pi nd z}) (Model.fM M) theorem1← M z x res≡x,true = any-map (proj₁ ∘ proj₂) (follows-def← M z x res≡x,true) -- The reverse of theorem1← theorem1→ : ∀ (M z x) → Any (λ{⟨ θ , ⟨ nd , p ⟩ ⟩ → x ∈ pi nd z}) (Model.fM M) → z-predictable M z x ≡ ⟨ x , true ⟩ theorem1→ M z x Any[θ→x∈pi-nd-z]M = follows-def→ M z x (any-map-rev (proj₁ ∘ proj₂) Any[θ→x∈pi-nd-z]M) -- ################# Theorem 2 END ################## ------------------------------ Starting point - Theorem 2 ------------------------------ lem← : ∀ (pbs τ x k) → classify'' pbs τ x ≡ k → k ≡ Uncertain ⊎ ∃[ p ] ((P[ k |X= x ] pbs ≡ just p) × (τ ≤ p)) lem← pbs τ x k _ with P[ Stall |X= x ] pbs | inspect (P[ Stall |X=_] pbs) x lem← _ _ _ Uncertain _ | nothing | [ P[k|X=x]≡nothing ] = inj₁ refl lem← _ τ _ _ _ | just p | [ _ ] with τ ≤? p | τ ≤? (1ℝ - p) lem← _ _ _ Stall _ | just p | [ P[k|X=x]≡justp ] | yes τ≤p | no ¬τ≤1-p = inj₂ ⟨ p , ⟨ P[k|X=x]≡justp , τ≤p ⟩ ⟩ lem← _ _ _ NoStall _ | just p | [ P[k|X=x]≡justp ] | no ¬τ≤p | yes τ≤1-p = let P[NoStall|X=x]≡just1-p = Stall≡1-NoStall P[k|X=x]≡justp in inj₂ ⟨ 1ℝ - p , ⟨ P[NoStall|X=x]≡just1-p , τ≤1-p ⟩ ⟩ lem← _ _ _ Uncertain _ | _ | _ | _ | _ = inj₁ refl lem→' : ∀ (pbs τ x p) -- This line is asking for the main assumptions for the code to work properly: -- * 0.5 < τ ≤ 1 -- * 0 ≤ p ≤ 1 → (1/2 < τ × τ ≤ 1ℝ) × (0ℝ ≤ p × p ≤ 1ℝ) → (P[ Stall |X= x ] pbs) ≡ just p → τ ≤ (1ℝ - p) → classify'' pbs τ x ≡ NoStall lem→' pbs _ x _ _ _ _ with P[ Stall |X= x ] pbs lem→' _ τ _ _ _ _ _ | just p with τ ≤? p | τ ≤? (1ℝ - p) lem→' _ _ _ _ _ _ _ | just p | no _ | yes _ = refl lem→' _ _ _ _ _ refl τ≤1-p | just p | _ | no ¬τ≤1-p = ⊥-elim (¬τ≤1-p τ≤1-p) lem→' _ _ _ _ assumpts refl τ≤1-p | just p | yes τ≤p | yes _ = ⊥-elim (¬τ≤p τ≤p) where 1/2<τ = proj₁ (proj₁ assumpts) τ≤1 = proj₂ (proj₁ assumpts) 0≤p = proj₁ (proj₂ assumpts) p≤1 = proj₂ (proj₂ assumpts) ¬τ≤p = ≤1-p→¬≤p 1/2<τ τ≤1 0≤p p≤1 τ≤1-p τ≤p→τ≤1-⟨1-p⟩ : ∀ τ p → τ ≤ p → τ ≤ 1ℝ - (1ℝ - p) τ≤p→τ≤1-⟨1-p⟩ τ p τ≤p rewrite double-neg p 1ℝ = τ≤p lem→ : ∀ (pbs τ x k) → (1/2 < τ × τ ≤ 1ℝ) → ∃[ p ] (((P[ k |X= x ] pbs) ≡ just p) × (τ ≤ p)) → classify'' pbs τ x ≡ k lem→ pbs _ x Stall _ _ with P[ Stall |X= x ] pbs lem→ _ τ _ _ _ _ | just p with τ ≤? p | τ ≤? (1ℝ - p) lem→ _ _ _ _ _ _ | just p | yes _ | no _ = refl lem→ _ _ _ _ _ ⟨ _ , ⟨ refl , τ≤p ⟩ ⟩ | just p | no ¬τ≤p | _ = ⊥-elim (¬τ≤p τ≤p) lem→ _ _ _ _ 1/2<τ≤1 ⟨ _ , ⟨ refl , τ≤p ⟩ ⟩ | just p | yes _ | yes τ≤1-p = ⊥-elim (¬τ≤1-p τ≤1-p) where 1/2<τ = proj₁ 1/2<τ≤1 τ≤1 = proj₂ 1/2<τ≤1 postulate 0≤p : 0ℝ ≤ p p≤1 : p ≤ 1ℝ ¬τ≤1-p = ≤p→¬≤1-p 1/2<τ τ≤1 0≤p p≤1 τ≤p lem→ pbs τ x NoStall 1/2<τ≤1 ⟨ p , ⟨ P[k|X=x]≡justp , τ≤p ⟩ ⟩ = let P[S|X=x]≡just1-p = NoStall≡1-Stall P[k|X=x]≡justp τ≤1-⟨1-p⟩ = τ≤p→τ≤1-⟨1-p⟩ τ p τ≤p assumptions = ⟨ 1/2<τ≤1 , 0≤p≤1 ⟩ in lem→' pbs τ x (1ℝ - p) assumptions P[S|X=x]≡just1-p τ≤1-⟨1-p⟩ where postulate 0≤p≤1 : (0ℝ ≤ 1ℝ - p × 1ℝ - p ≤ 1ℝ) prop2M-prior← : ∀ (M τ x k) → classify M τ x ≡ k → k ≡ Uncertain ⊎ ∃[ p ] (((P[ k |X= x ] (M→pbs M)) ≡ just p) × (τ ≤ p)) prop2M-prior← M = lem← (M→pbs M) prop2M-prior←' : ∀ (M τ x k) → k ≡ Stall ⊎ k ≡ NoStall → classify M τ x ≡ k → ∃[ p ] (((P[ k |X= x ] (M→pbs M)) ≡ just p) × (τ ≤ p)) prop2M-prior←' M τ x k _ cMτx≡k with prop2M-prior← M τ x k cMτx≡k prop2M-prior←' _ _ _ Stall (inj₁ _) _ | inj₂ P[k|X=x]≥τ = P[k|X=x]≥τ prop2M-prior←' _ _ _ NoStall _ _ | inj₂ P[k|X=x]≥τ = P[k|X=x]≥τ prop2M-prior→ : ∀ (M τ x k) → (1/2 < τ × τ ≤ 1ℝ) → ∃[ p ] (((P[ k |X= x ] (M→pbs M)) ≡ just p) × (τ ≤ p)) → classify M τ x ≡ k prop2M-prior→ M τ x k 1/2<τ≤1 = lem→ (M→pbs M) τ x k 1/2<τ≤1 prop2M← : ∀ (M τ x) → τ-confident M τ x ≡ true → ∃[ k ] ((classify M τ x ≡ k) × (k ≡ Stall ⊎ k ≡ NoStall)) prop2M← M τ x τconf≡true with classify M τ x ... | Stall = ⟨ Stall , ⟨ refl , inj₁ refl ⟩ ⟩ ... | NoStall = ⟨ NoStall , ⟨ refl , inj₂ refl ⟩ ⟩ prop2M→ : ∀ (M τ x k) → k ≡ Stall ⊎ k ≡ NoStall → classify M τ x ≡ k → τ-confident M τ x ≡ true prop2M→ M τ x Stall (inj₁ k≡Stall) cMτx≡k = cong no-uncertain cMτx≡k prop2M→ M τ x NoStall (inj₂ k≡NoStall) cMτx≡k = cong no-uncertain cMτx≡k ---- ############ FINAL RESULT - Theorem 3 ############ -- Theorem 3 says: -- a classification k is τ-confident iff τ ≤ P[ k | X = x ] theorem2← : ∀ (M τ x) → τ-confident M τ x ≡ true → ∃[ k ] (∃[ p ] (((P[ k |X= x ] (M→pbs M)) ≡ just p) × (τ ≤ p))) -- which means: τ ≤ P[ k | X = x ] theorem2← M τ x τconf≡true = let -- prop2M-prior← M τ x k (prop2M← M τ x k τconf≡true) ⟨ k , ⟨ cMτx≡k , k≢Uncertain ⟩ ⟩ = prop2M← M τ x τconf≡true in ⟨ k , prop2M-prior←' M τ x k k≢Uncertain cMτx≡k ⟩ theorem2→ : ∀ (M τ x k) → (1/2 < τ × τ ≤ 1ℝ) → k ≡ Stall ⊎ k ≡ NoStall → ∃[ p ] (((P[ k |X= x ] (M→pbs M)) ≡ just p) × (τ ≤ p)) -- which means: τ ≤ P[ k | X = x ] → τ-confident M τ x ≡ true theorem2→ M τ x k 1/2<τ≤1 k≢Uncertain ⟨p,⟩ = prop2M→ M τ x k k≢Uncertain (prop2M-prior→ M τ x k 1/2<τ≤1 ⟨p,⟩) ---- ############ Theorem 3 END ############ ------------------------------ Starting point - Theorem 3 ------------------------------ ---- ############ FINAL RESULT - Theorem 4 ############ -- The final theorem is more a corolary. It follows from Theorem 1 and 2 prop3M← : ∀ (M z τ x) → safety-envelope M z τ x ≡ true → (Any (λ{⟨ θ , ⟨ nd , p ⟩ ⟩ → x ∈ pi nd z}) (Model.fM M)) × ∃[ k ] (∃[ p ] (((P[ k |X= x ] (M→pbs M)) ≡ just p) × (τ ≤ p))) prop3M← M z τ x seM≡true = let -- Taking from the safety-envelope definition its components ⟨ left , τ-conf ⟩ = lem∧ {a = proj₂ (z-predictable M z x)} {b = τ-confident M τ x} seM≡true z-pred-x≡⟨x,true⟩ = cong (⟨ x ,_⟩) left in ⟨ theorem1← M z x z-pred-x≡⟨x,true⟩ , theorem2← M τ x τ-conf ⟩ prop3M→ : ∀ (M z τ x k) → (1/2 < τ × τ ≤ 1ℝ) → k ≡ Stall ⊎ k ≡ NoStall → (Any (λ{⟨ θ , ⟨ nd , p ⟩ ⟩ → x ∈ pi nd z}) (Model.fM M)) × ∃[ p ] (((P[ k |X= x ] (M→pbs M)) ≡ just p) × (τ ≤ p)) → safety-envelope M z τ x ≡ true prop3M→ M z τ x k 1/2<τ≤1 k≢Uncertain ⟨ Any[θ→x∈pi-nd-z]M , ⟨p,⟩ ⟩ = let z-pred≡⟨x,true⟩ = theorem1→ M z x Any[θ→x∈pi-nd-z]M τ-conf = theorem2→ M τ x k 1/2<τ≤1 k≢Uncertain ⟨p,⟩ in cong₂ (_∧_) (cong proj₂ z-pred≡⟨x,true⟩) τ-conf ---- ############ Theorem 4 END ############
{ "alphanum_fraction": 0.4600795921, "avg_line_length": 41.3419023136, "ext": "agda", "hexsha": "e1bf054c3ad6c1b5f64a06370f441e0db763b661", "lang": "Agda", "max_forks_count": 1, "max_forks_repo_forks_event_max_datetime": "2020-09-20T00:36:09.000Z", "max_forks_repo_forks_event_min_datetime": "2020-09-20T00:36:09.000Z", "max_forks_repo_head_hexsha": "bf518286f9d06dc6ea91e111be6ddedb3e2b728f", "max_forks_repo_licenses": [ "BSD-3-Clause" ], "max_forks_repo_name": "helq/safety-envelopes-sentinels", "max_forks_repo_path": "agda/Avionics/SafetyEnvelopes/Properties.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "bf518286f9d06dc6ea91e111be6ddedb3e2b728f", "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": "helq/safety-envelopes-sentinels", "max_issues_repo_path": "agda/Avionics/SafetyEnvelopes/Properties.agda", "max_line_length": 115, "max_stars_count": null, "max_stars_repo_head_hexsha": "bf518286f9d06dc6ea91e111be6ddedb3e2b728f", "max_stars_repo_licenses": [ "BSD-3-Clause" ], "max_stars_repo_name": "helq/safety-envelopes-sentinels", "max_stars_repo_path": "agda/Avionics/SafetyEnvelopes/Properties.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 7299, "size": 16082 }
postulate _+_ : Set₁ → Set₁ → Set₁ _+ : Set₁ → Set₁ → Set₁ Foo : Set₁ → Set₁ Foo = _+ Set
{ "alphanum_fraction": 0.5625, "avg_line_length": 13.7142857143, "ext": "agda", "hexsha": "cde3d4afe9425b163567df805c9a3bbc3a2d447e", "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/Sections-7.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/Sections-7.agda", "max_line_length": 26, "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/Sections-7.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": 44, "size": 96 }
{-# OPTIONS --safe --erased-cubical #-} module Erased-cubical.Erased where open import Agda.Builtin.Cubical.Glue open import Agda.Builtin.Cubical.Path open import Agda.Primitive open import Agda.Primitive.Cubical -- Glue can be used in erased contexts. @0 _ : SSet (lsuc lzero) _ = (φ : I) (A : Set) (B : Partial φ Set) (f : PartialP φ (λ x → B x ≃ A)) → primGlue A B f -- Erased higher constructors are allowed. data ∥_∥ (A : Set) : Set where ∣_∣ : A → ∥ A ∥ @0 trivial : (x y : ∥ A ∥) → x ≡ y -- Modules that use --cubical can be imported. import Erased-cubical.Cubical as C -- Definitions from such modules can be used in erased contexts. @0 _ : {A : Set} → A → C.∥ A ∥ _ = C.∣_∣ -- One can re-export Cubical Agda code using open public. open import Erased-cubical.Cubical public renaming (∥_∥ to ∥_∥ᶜ; ∣_∣ to ∣_∣ᶜ; trivial to trivialᶜ) -- And also code that uses --without-K. open import Erased-cubical.Without-K public
{ "alphanum_fraction": 0.6624737945, "avg_line_length": 23.2682926829, "ext": "agda", "hexsha": "b346f39ee5a48dc3f9c68982b0f123ebceaac63d", "lang": "Agda", "max_forks_count": 1, "max_forks_repo_forks_event_max_datetime": "2021-04-18T13:34:07.000Z", "max_forks_repo_forks_event_min_datetime": "2021-04-18T13:34:07.000Z", "max_forks_repo_head_hexsha": "7f58030124fa99dfbf8db376659416f3ad8384de", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "cruhland/agda", "max_forks_repo_path": "test/Succeed/Erased-cubical/Erased.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "7f58030124fa99dfbf8db376659416f3ad8384de", "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": "cruhland/agda", "max_issues_repo_path": "test/Succeed/Erased-cubical/Erased.agda", "max_line_length": 64, "max_stars_count": null, "max_stars_repo_head_hexsha": "7f58030124fa99dfbf8db376659416f3ad8384de", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "cruhland/agda", "max_stars_repo_path": "test/Succeed/Erased-cubical/Erased.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 345, "size": 954 }
module Structure.Setoid.Size.Proofs where open import Data open import Data.Proofs import Data.Either as Either import Data.Either.Proofs as Either import Lvl open import Functional open import Function.Proofs open import Function.Inverseₗ open import Function.Inverse open import Function.Iteration open import Lang.Instance open import Logic open import Logic.Classical open import Logic.Propositional open import Logic.Predicate open import Structure.Setoid open import Structure.Setoid.Size open import Structure.Function.Domain open import Structure.Function.Domain.Proofs open import Structure.Function open import Structure.Relator.Equivalence open import Structure.Relator.Ordering open import Structure.Relator.Properties open import Syntax.Transitivity open import Type.Properties.Empty open import Type.Properties.Inhabited open import Type private variable ℓ ℓ₁ ℓ₂ ℓₑ ℓₑ₁ ℓₑ₂ ℓₑ₃ ℓₗ : Lvl.Level private variable A B C : Setoid{ℓₑ}{ℓ} private variable X Y Z : Type{ℓ} module _ where instance [≍]-to-[≼] : (_≍_ {ℓₑ₁}{ℓ₁}{ℓₑ₂}{ℓ₂}) ⊆₂ (_≼_) _⊆₂_.proof [≍]-to-[≼] ([∃]-intro(f) ⦃ [∧]-intro f-function f-bijective ⦄) = ([∃]-intro(f) ⦃ [∧]-intro f-function (bijective-to-injective(f) ⦃ f-bijective ⦄) ⦄) instance [≍]-to-[≽] : (_≍_ {ℓₑ₁}{ℓ₁}{ℓₑ₂}{ℓ₂}) ⊆₂ (_≽_) _⊆₂_.proof [≍]-to-[≽] ([∃]-intro(f) ⦃ [∧]-intro f-function f-bijective ⦄) = ([∃]-intro(f) ⦃ [∧]-intro f-function (bijective-to-surjective(f) ⦃ f-bijective ⦄) ⦄) [≼]-empty-is-minimal : (([∃]-intro(Empty{ℓ})) ≼ A) [≼]-empty-is-minimal = [∃]-intro empty ⦃ [∧]-intro empty-function empty-injective ⦄ [≽]-empty-is-not-minimal : ¬(∀{A : Setoid{ℓ}} → (A ≽ ([∃]-intro(Empty{ℓ})))) [≽]-empty-is-not-minimal proof with () ← [∃]-witness(proof {[∃]-intro Unit}) <> [≼]-to-[≽]-not-all : ¬((_≼_ {ℓ}) ⊆₂ swap(_≽_)) [≼]-to-[≽]-not-all (intro proof) = [≽]-empty-is-not-minimal(proof [≼]-empty-is-minimal) [≼]-to-[≽]-for-inhabited : ⦃ _ : ∀{ℓ}{P : Stmt{ℓ}} → Classical(P) ⦄ ⦃ inh-A : (◊([∃]-witness A)) ⦄ → ((A ≼ B) → (B ≽ A)) [≼]-to-[≽]-for-inhabited {A = [∃]-intro a} {B = [∃]-intro b} ([∃]-intro f ⦃ [∧]-intro f-func f-inj ⦄) = [∃]-intro (invₗ-construction(const [◊]-existence) f) ⦃ [∧]-intro (invₗ-construction-function ⦃ inj = f-inj ⦄) (inverseₗ-surjective ⦃ inverₗ = invₗ-construction-inverseₗ ⦃ inj = f-inj ⦄ ⦄) ⦄ {- TODO: Maybe this proof could be made to a proof about invertibility instead [≼][≍]-almost-antisymmetry : ⦃ _ : ∀{ℓ}{P : Stmt{ℓ}} → Classical(P) ⦄ → (A ≼ B) → (B ≼ A) → (A ≽ B) [≼][≍]-almost-antisymmetry {A = A}{B = B} ([∃]-intro f ⦃ [∧]-intro func-f inj-f ⦄) ([∃]-intro g ⦃ [∧]-intro func-g inj-g ⦄) = [∃]-intro h ⦃ [∧]-intro func-h surj-h ⦄ where h : [∃]-witness A → [∃]-witness B h(a) = Either.map1 [∃]-witness (const(f(a))) (excluded-middle(∃(b ↦ g(b) ≡ a))) func-h : Function(h) Function.congruence func-h {a₁} {a₂} a₁a₂ with excluded-middle(∃(b ↦ g(b) ≡ a₁)) | excluded-middle(∃(b ↦ g(b) ≡ a₂)) | a₁a₂ -- TODO: Not sure why the last a₁a₂ is neccessary for the result to normalize from the cases, if this is a bug in Agda or if it is intended. An alternative is to just use two-layered Either.map1-values ... | [∨]-introₗ ([∃]-intro b₁ ⦃ gba1 ⦄) | [∨]-introₗ ([∃]-intro b₂ ⦃ gba2 ⦄) | _ = injective(g) ⦃ inj-g ⦄ (gba1 🝖 a₁a₂ 🝖 symmetry(_≡_) gba2) ... | [∨]-introₗ ([∃]-intro b₁ ⦃ gba1 ⦄) | [∨]-introᵣ ngba2 | _ = [⊥]-elim(ngba2([∃]-intro b₁ ⦃ gba1 🝖 a₁a₂ ⦄)) ... | [∨]-introᵣ ngba1 | [∨]-introₗ ([∃]-intro b₂ ⦃ gba2 ⦄) | _ = [⊥]-elim(ngba1([∃]-intro b₂ ⦃ gba2 🝖 symmetry(_≡_) a₁a₂ ⦄)) ... | [∨]-introᵣ _ | [∨]-introᵣ _ | _ = congruence₁(f) ⦃ func-f ⦄ a₁a₂ {- TODO: This choice of h probably does not work for proving antisymmetry because nothing states that f and g are inverses, which is neccessary for this kind of proof inj-h : Injective(h) Injective.proof inj-h {a₁} {a₂} ha₁ha₂ with excluded-middle(∃(b ↦ g(b) ≡ a₁)) | excluded-middle(∃(b ↦ g(b) ≡ a₂)) | ha₁ha₂ ... | [∨]-introₗ ([∃]-intro b₁ ⦃ gba1 ⦄) | [∨]-introₗ ([∃]-intro b₂ ⦃ gba2 ⦄) | b₁b₂ = a₁ 🝖-[ gba1 ]-sym g(b₁) 🝖-[ congruence₁(g) ⦃ func-g ⦄ b₁b₂ ] g(b₂) 🝖-[ gba2 ] a₂ 🝖-end ... | [∨]-introₗ ([∃]-intro b₁ ⦃ gba1 ⦄) | [∨]-introᵣ nega₂ | b₁fa₂ = [⊥]-elim(nega₂ ([∃]-intro (f(a₂)) ⦃ p ⦄)) where p = g(f(a₂)) 🝖-[ congruence₁(g) ⦃ func-g ⦄ b₁fa₂ ]-sym g(b₁) 🝖-[ gba1 ] a₁ 🝖-[ {!gba1!} ] a₂ 🝖-end q = f(a₁) 🝖-[ congruence₁(f) ⦃ func-f ⦄ gba1 ]-sym f(g(b₁)) 🝖-[ {!!} ] b₁ 🝖-[ b₁fa₂ ] f(a₂) 🝖-end ... | [∨]-introᵣ nega₁ | [∨]-introₗ ([∃]-intro b₂ ⦃ gba2 ⦄) | fa₁b₂ = {!!} ... | [∨]-introᵣ nega₁ | [∨]-introᵣ nega₂ | fa₁fa₂ = injective(f) ⦃ inj-f ⦄ fa₁fa₂ -} -- TODO: Is it possible to use [≼]-to-[≽]-for-inhabited instead or maybe this should be moved out? surj-h : Surjective(h) Surjective.proof surj-h {b} with Either.map1-values{f = [∃]-witness}{g = const(f(g(b)))}{e = excluded-middle(∃(x ↦ g(x) ≡ g(b)))} ... | [∨]-introₗ ([∃]-intro ([∃]-intro b₂ ⦃ gb₂gb ⦄) ⦃ fgbb₂ ⦄) = [∃]-intro (g(b)) ⦃ fgbb₂ 🝖 injective(g) ⦃ inj-g ⦄ gb₂gb ⦄ ... | [∨]-introᵣ([∃]-intro neggb ⦃ p ⦄) = [⊥]-elim(neggb ([∃]-intro b ⦃ reflexivity(_≡_) ⦄)) -} open import Structure.Operator open import Structure.Setoid.Uniqueness module _ ⦃ equiv-X : Equiv{ℓₑ₁}(X) ⦄ ⦃ equiv-Y : Equiv{ℓₑ₂}(Y) ⦄ (P : X → Type{ℓₗ}) ⦃ classical-P : Classical(∃ P) ⦄ (c : ¬(∃ P) → Y) (f : X → Y) ⦃ func-f : Function(f) ⦄ where -- TODO: Maybe f should also be able to depend on P, so that (f : (x : X) → P(x) → Y)? -- TODO: This is a generalization of both h in [≼][≍]-antisymmetry-raw and invₗ-construction from Function.Inverseₗ existence-decider : Y existence-decider = Either.map1 (f ∘ [∃]-witness) c (excluded-middle(∃ P)) existence-decider-satisfaction-value : Unique(P) → ∀{x} → P(x) → (f(x) ≡ existence-decider) existence-decider-satisfaction-value unique-P {x} px with Classical.excluded-middle classical-P ... | Either.Left ([∃]-intro y ⦃ py ⦄) = congruence₁(f) (unique-P px py) ... | Either.Right nep with () ← nep ([∃]-intro x ⦃ px ⦄) existence-decider-unsatisfaction-value : ⦃ Constant(c) ⦄ → (p : ¬(∃ P)) → (c(p) ≡ existence-decider) existence-decider-unsatisfaction-value nep with Classical.excluded-middle classical-P ... | Either.Left ep with () ← nep ep ... | Either.Right _ = constant(c) module _ ⦃ equiv-X : Equiv{ℓₑ₁}(X) ⦄ ⦃ equiv-Y : Equiv{ℓₑ₂}(Y) ⦄ ⦃ equiv-Z : Equiv{ℓₑ₃}(Z) ⦄ (P : X → Y → Type{ℓₗ}) ⦃ classical-P : ∀{x} → Classical(∃(P(x))) ⦄ (c : (x : X) → ¬(∃(P(x))) → Z) (f : X → Y → Z) ⦃ func-f : BinaryOperator(f) ⦄ where existence-decider-fn : X → Z existence-decider-fn(x) = existence-decider (P(x)) (c(x)) (f(x)) ⦃ BinaryOperator.right func-f ⦄ open import Structure.Relator existence-decider-fn-function : (∀{x} → Unique(P(x))) → (∀{x₁ x₂}{p₁ p₂} → (x₁ ≡ x₂) → (c x₁ p₁ ≡ c x₂ p₂)) → ⦃ ∀{y} → UnaryRelator(swap P y) ⦄ → Function(existence-decider-fn) Function.congruence (existence-decider-fn-function unique constant) {x₁} {x₂} x₁x₂ with excluded-middle(∃(P(x₁))) | excluded-middle(∃(P(x₂))) | x₁x₂ ... | [∨]-introₗ ([∃]-intro y₁ ⦃ p₁ ⦄) | [∨]-introₗ ([∃]-intro y₂ ⦃ p₂ ⦄) | _ = congruence₂(f) x₁x₂ (unique (substitute₁(swap P y₁) x₁x₂ p₁) p₂) ... | [∨]-introₗ ([∃]-intro y₁ ⦃ p₁ ⦄) | [∨]-introᵣ ngba2 | _ with () ← ngba2 ([∃]-intro y₁ ⦃ substitute₁(swap P y₁) x₁x₂ p₁ ⦄) ... | [∨]-introᵣ ngba1 | [∨]-introₗ ([∃]-intro y₂ ⦃ p₂ ⦄) | _ with () ← ngba1 ([∃]-intro y₂ ⦃ substitute₁(swap P y₂) (symmetry(_≡_) x₁x₂) p₂ ⦄) ... | [∨]-introᵣ _ | [∨]-introᵣ _ | _ = constant x₁x₂ existence-decider-fn-surjective : (∀{x} → Unique(P(x))) → ⦃ ∀{x} → Constant(c(x)) ⦄ → (∀{z} → ∃(x ↦ (∀{y} → P(x)(y) → (f x y ≡ z)) ∧ ((nepx : ¬ ∃(P(x))) → (c x nepx ≡ z)))) → Surjective(existence-decider-fn) Surjective.proof (existence-decider-fn-surjective unique-p property) {z} with [∃]-intro x ⦃ px ⦄ ← property{z} with excluded-middle(∃(P(x))) ... | [∨]-introₗ ([∃]-intro y ⦃ pxy ⦄) = [∃]-intro x ⦃ symmetry(_≡_) (existence-decider-satisfaction-value(P(x)) (c(x)) (f(x)) ⦃ BinaryOperator.right func-f ⦄ unique-p pxy) 🝖 [∧]-elimₗ px pxy ⦄ ... | [∨]-introᵣ nepx = [∃]-intro x ⦃ symmetry(_≡_) (existence-decider-unsatisfaction-value(P(x)) (c(x)) (f(x)) ⦃ BinaryOperator.right func-f ⦄ nepx) 🝖 [∧]-elimᵣ px nepx ⦄ existence-decider-fn-surjective2 : (∀{x} → Unique(P(x))) → ⦃ ∀{x} → Constant(c(x)) ⦄ → (∃{Obj = Z → X}(x ↦ (∀{z}{y} → P(x(z))(y) → (f (x(z)) y ≡ z)) ∧ (∀{z} → (nepx : ¬ ∃(P(x(z)))) → (c (x(z)) nepx ≡ z)))) → Surjective(existence-decider-fn) Surjective.proof (existence-decider-fn-surjective2 unique-p property) {z} with [∃]-intro x ⦃ px ⦄ ← property with excluded-middle(∃(P(x(z)))) ... | [∨]-introₗ ([∃]-intro y ⦃ pxy ⦄) = [∃]-intro (x(z)) ⦃ symmetry(_≡_) (existence-decider-satisfaction-value(P(x(z))) (c(x(z))) (f(x(z))) ⦃ BinaryOperator.right func-f ⦄ unique-p pxy) 🝖 [∧]-elimₗ px pxy ⦄ ... | [∨]-introᵣ nepx = [∃]-intro (x(z)) ⦃ symmetry(_≡_) (existence-decider-unsatisfaction-value(P(x(z))) (c(x(z))) (f(x(z))) ⦃ BinaryOperator.right func-f ⦄ nepx) 🝖 [∧]-elimᵣ px nepx ⦄ module _ (inj-f : ∀{x₁ x₂}{y₁ y₂} → P(x₁)(y₁) → P(x₂)(y₂) → (f x₁ y₁ ≡ f x₂ y₂) → (x₁ ≡ x₂)) (inj-c : ∀{x₁ x₂} → (nep₁ : ¬ ∃(P(x₁))) → (nep₂ : ¬ ∃(P(x₂))) → (c x₁ nep₁ ≡ c x₂ nep₂) → (x₁ ≡ x₂)) (inj-mix : ∀{x₁ x₂}{y₁} → P(x₁)(y₁) → (nep₂ : ¬ ∃(P(x₂))) → (f x₁ y₁ ≡ c x₂ nep₂) → (x₁ ≡ x₂)) where existence-decider-fn-injective : Injective(existence-decider-fn) Injective.proof existence-decider-fn-injective {x₁}{x₂} dx₁dx₂ with excluded-middle(∃(P(x₁))) | excluded-middle(∃(P(x₂))) | dx₁dx₂ ... | Either.Left ([∃]-intro y₁ ⦃ p₁ ⦄) | Either.Left ([∃]-intro y₂ ⦃ p₂ ⦄) | fx₁y₁fx₂y₂ = inj-f p₁ p₂ fx₁y₁fx₂y₂ ... | Either.Left ([∃]-intro y₁ ⦃ p₁ ⦄) | Either.Right nep₂ | fxy₁cxp₂ = inj-mix p₁ nep₂ fxy₁cxp₂ ... | Either.Right nep₁ | Either.Left ([∃]-intro y₂ ⦃ p₂ ⦄) | cxp₁fxy₂ = symmetry(_≡_) (inj-mix p₂ nep₁ (symmetry(_≡_) cxp₁fxy₂)) ... | Either.Right nep₁ | Either.Right nep₂ | cxp₁cxp₂ = inj-c nep₁ nep₂ cxp₁cxp₂ -- The property of antisymmetry for injection existence. -- Also called: Cantor-Schröder-Bernstein Theorem, Schröder-Bernstein Theorem, Cantor–Bernstein theorem -- Source: https://artofproblemsolving.com/wiki/index.php/Schroeder-Bernstein_Theorem [≼][≍]-antisymmetry-raw : ⦃ _ : ∀{ℓ}{P : Stmt{ℓ}} → Classical(P) ⦄ → (A ≼ B) → (B ≼ A) → (A ≍ B) -- TODO: Not everything needs to be classical, only forall, exists, and equality [≼][≍]-antisymmetry-raw {A = [∃]-intro A}{B = [∃]-intro B} ⦃ classical ⦄ ([∃]-intro f ⦃ [∧]-intro func-f inj-f ⦄) ([∃]-intro g ⦃ [∧]-intro func-g inj-g ⦄) = [∃]-intro h ⦃ [∧]-intro func-h (injective-surjective-to-bijective(h)) ⦄ where open import Logic.Predicate.Theorems open import Function.Inverseₗ open import Numeral.Natural open import Structure.Relator -- A lone point `b` of `B` is a point not in the image of `f`. Lone : B → Stmt Lone(b) = ∀{a} → (f(a) ≢ b) -- A point `b₁` is a descendent from a point `b₀` in `B` when a number of compositions of `(f ∘ g)` on `b₀` yields `b₁`. Desc : B → B → Stmt Desc(b₁)(b₀) = ∃(n ↦ (b₁ ≡ ((f ∘ g) ^ n)(b₀))) instance lone-desc-rel : ∀{y} → UnaryRelator(x ↦ Lone(y) ∧ Desc(f(x)) y) UnaryRelator.substitution lone-desc-rel xy = [∧]-map id (ep ↦ [∃]-map-proof-dependent ep (symmetry(_≡_) (congruence₁(f) ⦃ func-f ⦄ xy) 🝖_)) f⁻¹ : B → A f⁻¹ = invₗ-construction g f g⁻¹ : A → B g⁻¹ = invₗ-construction f g instance func-f⁻¹ : Function(f⁻¹) func-f⁻¹ = invₗ-construction-function ⦃ inj = inj-f ⦄ ⦃ func-g ⦄ instance func-g⁻¹ : Function(g⁻¹) func-g⁻¹ = invₗ-construction-function ⦃ inj = inj-g ⦄ ⦃ func-f ⦄ instance inverₗ-f⁻¹ : Inverseₗ(f)(f⁻¹) inverₗ-f⁻¹ = invₗ-construction-inverseₗ ⦃ inj = inj-f ⦄ ⦃ func-g ⦄ instance inverₗ-g⁻¹ : Inverseₗ(g)(g⁻¹) inverₗ-g⁻¹ = invₗ-construction-inverseₗ ⦃ inj = inj-g ⦄ ⦃ func-f ⦄ instance func-const-invₗ-construction : BinaryOperator(const ∘ g⁻¹) func-const-invₗ-construction = functions-to-binaryOperator _ ⦃ r = const-function ⦄ -- The to-be-proven bijection. -- `h` is a mapping such that: -- • If `f(a)` is a descendent of a lonely point, then `h(a) = g⁻¹(a)`. -- • If `f(a)` is not a descendent of a lonely point, then `h(a) = f(a)`. -- Note: The construction of this function requires excluded middle. h : A → B h = existence-decider-fn (a ↦ b ↦ Lone(b) ∧ Desc(f(a))(b)) (\a _ → f(a)) (\a _ → g⁻¹(a)) -- The left inverse of `g` is a right inverse on a point `a` when `f(a)` is a descendent of a lonely point. inverᵣ-g⁻¹-specific : ∀{a}{b} → Lone(b) → Desc(f(a))(b) → (g(g⁻¹(a)) ≡ a) inverᵣ-g⁻¹-specific lone-b ([∃]-intro 𝟎 ⦃ desc-b ⦄) with () ← lone-b desc-b inverᵣ-g⁻¹-specific {a}{b} lone-b ([∃]-intro (𝐒(n)) ⦃ desc-b ⦄) = g(g⁻¹(a)) 🝖[ _≡_ ]-[ congruence₁(g) ⦃ func-g ⦄ (congruence₁(g⁻¹) (injective(f) ⦃ inj-f ⦄ desc-b)) ] g(g⁻¹(g(((f ∘ g) ^ n)(b)))) 🝖[ _≡_ ]-[ congruence₁(g) ⦃ func-g ⦄ (inverseₗ(g)(g⁻¹)) ] g(((f ∘ g) ^ n)(b)) 🝖[ _≡_ ]-[ inverseₗ(f)(f⁻¹) ]-sym f⁻¹(f(g(((f ∘ g) ^ n)(b)))) 🝖[ _≡_ ]-[] f⁻¹(((f ∘ g) ^ 𝐒(n))(b)) 🝖[ _≡_ ]-[ congruence₁(f⁻¹) desc-b ]-sym f⁻¹(f(a)) 🝖[ _≡_ ]-[ inverseₗ(f)(f⁻¹) ] a 🝖-end inj-different-fgn : ∀{n₁ n₂}{b₁ b₂} → (((f ∘ g) ^ n₁)(b₁) ≡ ((f ∘ g) ^ n₂)(b₂)) → ∃(n ↦ (b₁ ≡ ((f ∘ g) ^ 𝐒(n))(b₂)) ∨ (((f ∘ g) ^ 𝐒(n))(b₁) ≡ b₂) ∨ (b₁ ≡ b₂)) inj-different-fgn {𝟎} {𝟎} p = [∃]-intro 𝟎 ⦃ [∨]-introᵣ p ⦄ inj-different-fgn {𝟎} {𝐒 n₂} p = [∃]-intro n₂ ⦃ [∨]-introₗ([∨]-introₗ p) ⦄ inj-different-fgn {𝐒 n₁} {𝟎} p = [∃]-intro n₁ ⦃ [∨]-introₗ([∨]-introᵣ p) ⦄ inj-different-fgn {𝐒 n₁} {𝐒 n₂} p = inj-different-fgn {n₁} {n₂} (Injective.proof inj-g(Injective.proof inj-f p)) -- The lonely points are unique for all descendents from the image of `f`. unique-lone-descendant : ∀{a} → Unique(b ↦ Lone(b) ∧ Desc(f(a))(b)) unique-lone-descendant {a} {b₁} {b₂} ([∧]-intro lone-b₁ ([∃]-intro n₁ ⦃ desc-b₁ ⦄)) ([∧]-intro lone-b₂ ([∃]-intro n₂ ⦃ desc-b₂ ⦄)) with inj-different-fgn{n₁}{n₂}{b₁}{b₂} (symmetry(_≡_) desc-b₁ 🝖 desc-b₂) ... | [∃]-intro n ⦃ Either.Left(Either.Left p) ⦄ with () ← lone-b₁ (symmetry(_≡_) p) ... | [∃]-intro n ⦃ Either.Left(Either.Right p) ⦄ with () ← lone-b₂ p ... | [∃]-intro n ⦃ Either.Right b₁b₂ ⦄ = b₁b₂ instance func-h : Function(h) func-h = existence-decider-fn-function (a ↦ b ↦ Lone(b) ∧ Desc(f(a))(b)) (\x _ → f(x)) (const ∘ g⁻¹) unique-lone-descendant (congruence₁(f) ⦃ func-f ⦄) -- What it means to not have a lonely descendent. not-lone-desc : ∀{a} → ¬ ∃(b ↦ Lone(b) ∧ Desc(f(a)) b) → (∀{b} → (∃(x ↦ f(x) ≡ b) ∨ (∀{n} → (f(a) ≢ ((f ∘ g) ^ n)(b))))) not-lone-desc {z} = (\nepx {x} → (Either.map ([∃]-map-proof [¬¬]-elim ∘ [¬∀]-to-[∃¬] ⦃ classical ⦄ ⦃ classical ⦄) [¬∃]-to-[∀¬] ∘ [¬]-preserves-[∧][∨]ᵣ) (nepx{x})) ∘ [¬∃]-to-[∀¬] instance surj-h : Surjective(h) Surjective.proof surj-h {z} with excluded-middle(∃(y ↦ Lone(y) ∧ Desc(f(g(z))) y)) ... | [∨]-introₗ ([∃]-intro y ⦃ pxy ⦄) = [∃]-intro (g(z)) ⦃ symmetry(_≡_) (existence-decider-satisfaction-value(y ↦ Lone(y) ∧ Desc(f(g(z))) y) (\_ → f(g(z))) (\_ → g⁻¹(g(z))) unique-lone-descendant pxy) 🝖 inverseₗ(g)(g⁻¹) ⦄ ... | [∨]-introᵣ nepx = [∨]-elim (\([∃]-intro x ⦃ p ⦄) → [∃]-intro x ⦃ symmetry(_≡_) (existence-decider-unsatisfaction-value(y ↦ Lone(y) ∧ Desc(f(x)) y) (\_ → f(x)) (\_ → g⁻¹(x)) ⦃ const-function ⦄ ⦃ intro(reflexivity(_≡_)) ⦄ \([∃]-intro xx ⦃ [∧]-intro pp₁ ([∃]-intro n ⦃ pp₂ ⦄) ⦄) → nepx ([∃]-intro xx ⦃ [∧]-intro (\{xxx} ppp → pp₁ ppp) ([∃]-intro (𝐒(n)) ⦃ congruence₁(f) ⦃ func-f ⦄ (congruence₁(g) ⦃ func-g ⦄ (symmetry(_≡_) p 🝖 pp₂)) ⦄) ⦄)) 🝖 p ⦄) (\p → [∃]-intro (g(z)) ⦃ symmetry(_≡_) (existence-decider-unsatisfaction-value(y ↦ Lone(y) ∧ Desc(f(g(z))) y) (\_ → f(g(z))) (\_ → g⁻¹(g(z))) ⦃ const-function ⦄ ⦃ intro(reflexivity(_≡_)) ⦄ nepx) 🝖 [⊥]-elim(p{1} (reflexivity(_≡_))) ⦄) (not-lone-desc nepx {z}) {-TODO: How to define surj-h using existence-decider-fn-surjective? Should existence-decider-fn-surjective be more general? surj-h = existence-decider-fn-surjective (a ↦ b ↦ Lone(b) ∧ Desc(f(a))(b)) (\x _ → f(x)) (const ∘ invₗ-construction f g) unique-lone-descendant ⦃ intro (reflexivity(_≡_)) ⦄ (\{z} → [∃]-intro (g(z)) ⦃ [∧]-intro (\{y} ([∧]-intro lone-y desc-y) → inverseₗ(g)(g⁻¹)) -- ((\nepx → [⊥]-elim(nepx{z} ([∧]-intro (\{x} fxz → nepx{f(x)} ([∧]-intro (\{x'} p → {!!}) {!!})) ([∃]-intro 1 ⦃ reflexivity(_≡_) ⦄)))) ∘ [¬∃]-to-[∀¬]) ((\nepx → Either.map1 ((\([∃]-intro x ⦃ p ⦄) → {!!}) ∘ [∃]-map-proof [¬¬]-elim) (\p → [⊥]-elim(p{1} (reflexivity(_≡_)))) (Either.map ([¬∀]-to-[∃¬] ⦃ classical ⦄ ⦃ classical ⦄) [¬∃]-to-[∀¬] ([¬]-preserves-[∧][∨]ᵣ (nepx{z}))) ) ∘ [¬∃]-to-[∀¬]) ⦄) -} instance inj-h : Injective(h) inj-h = existence-decider-fn-injective (a ↦ b ↦ Lone(b) ∧ Desc(f(a))(b)) (\x _ → f(x)) (const ∘ invₗ-construction f g) (\{x₁ x₂}{y₁ y₂} ([∧]-intro lone₁ desc₁) ([∧]-intro lone₂ desc₂) g⁻¹x₁g⁻¹x₂ → x₁ 🝖[ _≡_ ]-[ inverᵣ-g⁻¹-specific lone₁ desc₁ ]-sym (g ∘ g⁻¹)(x₁) 🝖[ _≡_ ]-[ congruence₁(g) ⦃ func-g ⦄ g⁻¹x₁g⁻¹x₂ ] (g ∘ g⁻¹)(x₂) 🝖[ _≡_ ]-[ inverᵣ-g⁻¹-specific lone₂ desc₂ ] x₂ 🝖-end ) (\_ _ → Injective.proof inj-f) (\{ {_} {_} {_} ([∧]-intro lone₁ ([∃]-intro 𝟎 ⦃ desc₁ ⦄)) no g⁻¹x₁fx₂ → [⊥]-elim(lone₁ desc₁) ; {x₁}{x₂}{y₁} ([∧]-intro lone₁ ([∃]-intro (𝐒(n₁)) ⦃ desc₁ ⦄)) no g⁻¹x₁fx₂ → [⊥]-elim(no([∃]-intro y₁ ⦃ [∧]-intro lone₁ ([∃]-intro n₁ ⦃ f(x₂) 🝖[ _≡_ ]-[ g⁻¹x₁fx₂ ]-sym g⁻¹(x₁) 🝖[ _≡_ ]-[ congruence₁(g⁻¹) (injective(f) ⦃ inj-f ⦄ desc₁) ] g⁻¹(g(((f ∘ g) ^ n₁)(y₁))) 🝖[ _≡_ ]-[ inverseₗ(g)(g⁻¹) ] ((f ∘ g) ^ n₁)(y₁) 🝖-end ⦄) ⦄)) }) instance [≼][≍]-antisymmetry : ⦃ _ : ∀{ℓ}{P : Stmt{ℓ}} → Classical(P) ⦄ → Antisymmetry(_≼_ {ℓₑ}{ℓ})(_≍_) [≼][≍]-antisymmetry = intro [≼][≍]-antisymmetry-raw instance [≍]-reflexivity : Reflexivity(_≍_ {ℓₑ}{ℓ}) Reflexivity.proof([≍]-reflexivity) = [∃]-intro(id) ⦃ [∧]-intro id-function id-bijective ⦄ instance [≍]-symmetry : Symmetry(_≍_ {ℓₑ}{ℓ}) Symmetry.proof [≍]-symmetry ([∃]-intro(f) ⦃ [∧]-intro f-function f-bijective ⦄) = ([∃]-intro(inv f) ⦃ [∧]-intro inv-function (inv-bijective ⦃ func = f-function ⦄) ⦄) where instance f-invertible : Invertible(f) f-invertible = bijective-to-invertible ⦃ bij = f-bijective ⦄ instance invf-invertible : Invertible(inv f) ∃.witness invf-invertible = f ∃.proof invf-invertible = [∧]-intro f-function (Inverse-symmetry ([∧]-elimᵣ([∃]-proof f-invertible))) instance [≍]-transitivity : Transitivity(_≍_ {ℓₑ}{ℓ}) Transitivity.proof([≍]-transitivity) ([∃]-intro(f) ⦃ [∧]-intro f-function f-bijective ⦄) ([∃]-intro(g) ⦃ [∧]-intro g-function g-bijective ⦄) = [∃]-intro(g ∘ f) ⦃ [∧]-intro ([∘]-function {f = g}{g = f} ⦃ g-function ⦄ ⦃ f-function ⦄) ([∘]-bijective {f = g} ⦃ g-function ⦄ {g = f} ⦃ g-bijective ⦄ ⦃ f-bijective ⦄) ⦄ instance [≍]-equivalence : Equivalence(_≍_ {ℓₑ}{ℓ}) [≍]-equivalence = intro instance [≼]-reflexivity : Reflexivity(_≼_ {ℓₑ}{ℓ}) Reflexivity.proof([≼]-reflexivity) = [∃]-intro(id) ⦃ [∧]-intro id-function id-injective ⦄ instance [≼]-transitivity : Transitivity(_≼_ {ℓₑ}{ℓ}) Transitivity.proof([≼]-transitivity) ([∃]-intro(f) ⦃ [∧]-intro f-function f-injective ⦄) ([∃]-intro(g) ⦃ [∧]-intro g-function g-injective ⦄) = [∃]-intro(g ∘ f) ⦃ [∧]-intro ([∘]-function {f = g}{g = f} ⦃ g-function ⦄ ⦃ f-function ⦄) ([∘]-injective {f = g}{g = f} ⦃ g-injective ⦄ ⦃ f-injective ⦄) ⦄ instance [≽]-reflexivity : Reflexivity(_≽_ {ℓₑ}{ℓ}) Reflexivity.proof([≽]-reflexivity) = [∃]-intro(id) ⦃ [∧]-intro id-function id-surjective ⦄ instance [≽]-transitivity : Transitivity(_≽_ {ℓₑ}{ℓ}) Transitivity.proof([≽]-transitivity) ([∃]-intro(f) ⦃ [∧]-intro f-function f-surjective ⦄) ([∃]-intro(g) ⦃ [∧]-intro g-function g-surjective ⦄) = [∃]-intro(g ∘ f) ⦃ [∧]-intro ([∘]-function {f = g}{g = f} ⦃ g-function ⦄ ⦃ f-function ⦄) ([∘]-surjective {f = g} ⦃ g-function ⦄ {g = f} ⦃ g-surjective ⦄ ⦃ f-surjective ⦄) ⦄ module _ where -- This is variant of the "extensional axiom of choice" and is unprovable in Agda, though it is a possible axiom. -- A proof of `(A ≽ B)` means that a right inverse exist, but if the surjection is non-injective (it could be in general), then the right inverse is not a function (two equal values in the codomain of the surjection may point to two inequal objects in the domain). -- Example: -- For X: Set, Y: Set, f: X → Y, a: X, b: X, c₁: Y, c₂: Y -- Assume: -- X = {a,b} -- Y = {c₁,c₂} -- a ≢ b -- c₁ ≡ c₂ -- f(a) = c₁ -- f(b) = c₂ -- This means that f is surjective (maps to both c₁ and c₂) but not injective ((c₁ ≡ c₂) implies (f(a) ≡ f(b)) implies (a ≡ b) which is false). -- Then an inverse f⁻¹ to f can be constructed from the witnesses in surjectivity: -- f⁻¹: Y → X -- f⁻¹(c₁) = a -- f⁻¹(c₂) = b -- f⁻¹ is obviously injective, but it is also not a function: ((c₁ ≡ c₂) would imply (a ≡ b) if it were a function, but that is false). -- This example shows that not all surjections are injective. -- But looking at the example, there are functions that are injective: -- g₁: Y → X -- g₁(c₁) = a -- g₁(c₂) = a -- -- g₂: Y → X -- g₂(c₁) = b -- g₂(c₂) = b -- They are, because: ((a ≡ a) implies (g₁(c₁) ≡ g₁(c₂)) implies (c₁ ≡ c₂) which is true). -- and : ((b ≡ b) implies (g₂(c₁) ≡ g₂(c₂)) implies (c₁ ≡ c₂) which is true). -- This is a simplified example for finite sets, and a restriction of this proposition for finite sets is actually provable because it is possible to enumerate all functions up to function extensionality. -- The real problem comes when the sets are non-finite because then, there is no general way to enumerate the elements. How would an injection be chosen in this case? -- Note that if the surjection is injective, then it is a bijection, and therefore also an injection. record SurjectionInjectionChoice (A : Setoid{ℓₑ₁}{ℓ₁}) (B : Setoid{ℓₑ₂}{ℓ₂}) : Stmt{ℓₑ₁ Lvl.⊔ ℓ₁ Lvl.⊔ ℓₑ₂ Lvl.⊔ ℓ₂} where constructor intro field proof : (A ≽ B) → (B ≼ A) open SurjectionInjectionChoice ⦃ … ⦄ using () renaming (proof to [≽]-to-[≼]) public record SurjectionInvertibleFunctionChoice (A : Setoid{ℓₑ₁}{ℓ₁}) (B : Setoid{ℓₑ₂}{ℓ₂}) : Stmt{ℓₑ₁ Lvl.⊔ ℓ₁ Lvl.⊔ ℓₑ₂ Lvl.⊔ ℓ₂} where constructor intro field invertibleᵣ : ∀{f : ∃.witness A → ∃.witness B} → Surjective(f) → Invertibleᵣ(f) function : ∀{f : ∃.witness A → ∃.witness B}{surj : Surjective(f)} → Function(∃.witness(invertibleᵣ surj)) module _ ⦃ classical : ∀{ℓ}{P : Stmt{ℓ}} → Classical(P) ⦄ ⦃ surjChoice-ab : SurjectionInjectionChoice A B ⦄ ⦃ surjChoice-ba : SurjectionInjectionChoice B A ⦄ where [≽][≍]-antisymmetry-raw : (A ≽ B) → (B ≽ A) → (A ≍ B) [≽][≍]-antisymmetry-raw ab ba = [≼][≍]-antisymmetry-raw ([≽]-to-[≼] ba) ([≽]-to-[≼] ab) module _ ⦃ classical : ∀{ℓ}{P : Stmt{ℓ}} → Classical(P) ⦄ ⦃ surjChoice-ab : SurjectionInjectionChoice A B ⦄ where [≼][≽][≍]-antisymmetry-raw : (A ≼ B) → (A ≽ B) → (A ≍ B) [≼][≽][≍]-antisymmetry-raw lesser greater = [≼][≍]-antisymmetry-raw lesser ([≽]-to-[≼] greater) module _ ⦃ classical : ∀{ℓ}{P : Stmt{ℓ}} → Classical(P) ⦄ ⦃ surjChoice : ∀{ℓ₁ ℓ₂ ℓₑ₁ ℓₑ₂}{A : Setoid{ℓₑ₁}{ℓ₁}}{B : Setoid{ℓₑ₂}{ℓ₂}} → SurjectionInjectionChoice A B ⦄ where instance [≽][≍]-antisymmetry : Antisymmetry(_≽_ {ℓₑ}{ℓ})(_≍_) [≽][≍]-antisymmetry = intro [≽][≍]-antisymmetry-raw -- TODO: Totality of (_≼_). Is this difficult to prove? -- [≼]-total : ((A ≼ B) ∨ (B ≼ A)) -- TODO: Move global-equiv : ∀{ℓ}{T : Type{ℓ}} → Equiv{ℓₑ}(T) Equiv._≡_ global-equiv = const(const Unit) Equivalence.reflexivity (Equiv.equivalence global-equiv) = intro <> Equivalence.symmetry (Equiv.equivalence global-equiv) = intro(const <>) Equivalence.transitivity (Equiv.equivalence global-equiv) = intro(const(const <>)) [≼]-to-[≽]-for-inhabited-to-excluded-middle : (∀{ℓ₁ ℓ₂ ℓₑ₁ ℓₑ₂}{A : Setoid{ℓₑ₁}{ℓ₁}}{B : Setoid{ℓₑ₂}{ℓ₂}} → ⦃ ◊([∃]-witness A) ⦄ → (A ≼ B) → (B ≽ A)) → (∀{P : Type{ℓ}} → Classical(P)) Classical.excluded-middle ([≼]-to-[≽]-for-inhabited-to-excluded-middle p {P = P}) = proof where open import Data.Boolean open import Data.Option open import Data.Option.Setoid open import Relator.Equals.Proofs.Equivalence f : Option(◊ P) → Bool f (Option.Some _) = 𝑇 f Option.None = 𝐹 instance equiv-bool : Equiv(Bool) equiv-bool = [≡]-equiv instance equiv-pos-P : Equiv{Lvl.𝟎}(◊ P) equiv-pos-P = global-equiv func-f : Function(f) Function.congruence func-f {None} {None} _ = reflexivity(_≡_ ⦃ [≡]-equiv ⦄) Function.congruence func-f {Some _} {Some _} _ = reflexivity(_≡_ ⦃ [≡]-equiv ⦄) inj-f : Injective(f) Injective.proof inj-f {None} {None} _ = <> Injective.proof inj-f {Some _} {Some _} _ = <> surjection : ([∃]-intro Bool ⦃ [≡]-equiv ⦄) ≽ ([∃]-intro (Option(◊ P))) surjection = p ⦃ intro ⦃ None ⦄ ⦄ ([∃]-intro f ⦃ [∧]-intro func-f inj-f ⦄) g : Bool → Option(◊ P) g = [∃]-witness surjection g-value-elim : ∀{y} → (g(𝑇) ≡ y) → (g(𝐹) ≡ y) → (∀{b} → (g(b) ≡ y)) g-value-elim l r {𝑇} = l g-value-elim l r {𝐹} = r open Equiv(Option-equiv ⦃ equiv-pos-P ⦄) using () renaming (transitivity to Option-trans ; symmetry to Option-sym) proof : (P ∨ ¬ P) proof with g(𝐹) | g(𝑇) | (\p → Surjective.proof ([∧]-elimᵣ([∃]-proof surjection)) {Some(intro ⦃ p ⦄)}) | g-value-elim{Option.None} ... | Some l | Some r | _ | _ = [∨]-introₗ (◊.existence l) ... | Some l | None | _ | _ = [∨]-introₗ (◊.existence l) ... | None | Some r | _ | _ = [∨]-introₗ (◊.existence r) ... | None | None | surj | tttest = [∨]-introᵣ (\p → empty(transitivity _ ⦃ Option-trans ⦄ {Some(intro ⦃ p ⦄)}{g([∃]-witness(surj p))}{None} (symmetry _ ⦃ Option-sym ⦄ {g([∃]-witness(surj p))}{Some(intro ⦃ p ⦄)} ([∃]-proof(surj p))) (tttest <> <>)) ) {- Some(intro ⦃ p ⦄) 🝖[ Equiv._≡_ Option-equiv ]-[ [∃]-proof(surj p) ]-sym g([∃]-witness(surj p)) 🝖[ Equiv._≡_ Option-equiv ]-[ tttest <> <> ] None 🝖[ Equiv._≡_ Option-equiv ]-end -} {-module _ ⦃ surjChoice : ∀{A B : Setoid{ℓ}} → SurjectionInjectionChoice A B ⦄ where surjection-injection-choice-to-excluded-middle : ∀{P : Type{ℓ}} → Classical(P) Classical.excluded-middle (surjection-injection-choice-to-excluded-middle {P = P}) = {!!} -}
{ "alphanum_fraction": 0.5470036515, "avg_line_length": 58.4393305439, "ext": "agda", "hexsha": "0eaaed507aec516519878778ee0e89a99aefeaf7", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "70f4fba849f2fd779c5aaa5af122ccb6a5b271ba", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "Lolirofle/stuff-in-agda", "max_forks_repo_path": "Structure/Setoid/Size/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": "Structure/Setoid/Size/Proofs.agda", "max_line_length": 426, "max_stars_count": 6, "max_stars_repo_head_hexsha": "70f4fba849f2fd779c5aaa5af122ccb6a5b271ba", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "Lolirofle/stuff-in-agda", "max_stars_repo_path": "Structure/Setoid/Size/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": 11928, "size": 27934 }
------------------------------------------------------------------------------ -- Testing the conjectures inside a @where@ clause ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTIONS --without-K #-} module Where2 where infixl 6 _+_ infix 4 _≡_ postulate D : Set zero : D succ : D → D _≡_ : D → D → Set data N : D → Set where nzero : N zero nsucc : ∀ {n} → N n → N (succ n) N-ind : (A : D → Set) → A zero → (∀ {n} → A n → A (succ n)) → ∀ {n} → N n → A n N-ind A A0 h nzero = A0 N-ind A A0 h (nsucc Nn) = h (N-ind A A0 h Nn) postulate _+_ : D → D → D +-0x : ∀ n → zero + n ≡ n +-Sx : ∀ m n → succ m + n ≡ succ (m + n) {-# ATP axioms +-0x +-Sx #-} +-assoc : ∀ {m n o} → N m → N n → N o → m + n + o ≡ m + (n + o) +-assoc {n = n} {o} Nm Nn No = N-ind A A0 is Nm where A : D → Set A i = i + n + o ≡ i + (n + o) postulate A0 : zero + n + o ≡ zero + (n + o) {-# ATP prove A0 #-} postulate is : ∀ {i} → i + n + o ≡ i + (n + o) → succ i + n + o ≡ succ i + (n + o) {-# ATP prove is #-}
{ "alphanum_fraction": 0.3808392716, "avg_line_length": 25.26, "ext": "agda", "hexsha": "bf3d02b123ae33a4f870c66dabaa4b21b27df779", "lang": "Agda", "max_forks_count": 4, "max_forks_repo_forks_event_max_datetime": "2016-08-03T03:54:55.000Z", "max_forks_repo_forks_event_min_datetime": "2016-05-10T23:06:19.000Z", "max_forks_repo_head_hexsha": "a66c5ddca2ab470539fd68c42c4fbd45f720d682", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "asr/apia", "max_forks_repo_path": "test/Succeed/fol-theorems/Where2.agda", "max_issues_count": 121, "max_issues_repo_head_hexsha": "a66c5ddca2ab470539fd68c42c4fbd45f720d682", "max_issues_repo_issues_event_max_datetime": "2018-04-22T06:01:44.000Z", "max_issues_repo_issues_event_min_datetime": "2015-01-25T13:22:12.000Z", "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "asr/apia", "max_issues_repo_path": "test/Succeed/fol-theorems/Where2.agda", "max_line_length": 78, "max_stars_count": 10, "max_stars_repo_head_hexsha": "a66c5ddca2ab470539fd68c42c4fbd45f720d682", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "asr/apia", "max_stars_repo_path": "test/Succeed/fol-theorems/Where2.agda", "max_stars_repo_stars_event_max_datetime": "2019-12-03T13:44:25.000Z", "max_stars_repo_stars_event_min_datetime": "2015-09-03T20:54:16.000Z", "num_tokens": 447, "size": 1263 }
-- Andreas, 2017-07-28, issue #883 -- Was fixed by making rewrite not go through abstract syntax. open import Agda.Builtin.Equality test : (A : Set) → (a : A) → A test A a rewrite refl {x = a} = a -- WAS: -- Setω !=< Level of type Setω -- when checking that the type -- (A : Set) (a w : A) → -- _≡_ {_6 A w} {_A_9 A w} (_x_10 A w) (_x_10 A w) → A -- of the generated with function is well-formed -- Should succeed.
{ "alphanum_fraction": 0.6252983294, "avg_line_length": 24.6470588235, "ext": "agda", "hexsha": "6212a4a1faf1afe5588d37d5524063e02ed24d55", "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/Issue883.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/Issue883.agda", "max_line_length": 62, "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/Issue883.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": 148, "size": 419 }
------------------------------------------------------------------------ -- The Agda standard library -- -- The Colist type and some operations ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe --sized-types #-} module Codata.Colist where open import Level using (Level) open import Size open import Data.Unit open import Data.Nat.Base open import Data.Product using (_×_ ; _,_) open import Data.These.Base using (These; this; that; these) open import Data.Maybe.Base using (Maybe; nothing; just) open import Data.List.Base using (List; []; _∷_) open import Data.List.NonEmpty as List⁺ using (List⁺; _∷_) open import Data.Vec.Base as Vec using (Vec; []; _∷_) open import Data.Vec.Bounded as Vec≤ using (Vec≤) open import Function open import Codata.Thunk using (Thunk; force) open import Codata.Conat as Conat using (Conat ; zero ; suc) open import Codata.Cowriter as CW using (Cowriter; _∷_) open import Codata.Delay as Delay using (Delay ; now ; later) open import Codata.Stream using (Stream ; _∷_) open import Relation.Binary.PropositionalEquality using (_≡_; refl) private variable a b c w : Level i : Size A : Set a B : Set b C : Set c W : Set w data Colist (A : Set a) (i : Size) : Set a where [] : Colist A i _∷_ : A → Thunk (Colist A) i → Colist A i ------------------------------------------------------------------------ -- Relationship to Cowriter. fromCowriter : Cowriter W A i → Colist W i fromCowriter CW.[ _ ] = [] fromCowriter (w ∷ ca) = w ∷ λ where .force → fromCowriter (ca .force) toCowriter : Colist A i → Cowriter A ⊤ i toCowriter [] = CW.[ _ ] toCowriter (a ∷ as) = a ∷ λ where .force → toCowriter (as .force) ------------------------------------------------------------------------ -- Basic functions. [_] : A → Colist A ∞ [ a ] = a ∷ λ where .force → [] length : Colist A i → Conat i length [] = zero length (x ∷ xs) = suc λ where .force → length (xs .force) replicate : Conat i → A → Colist A i replicate zero a = [] replicate (suc n) a = a ∷ λ where .force → replicate (n .force) a infixr 5 _++_ _⁺++_ _++_ : Colist A i → Colist A i → Colist A i [] ++ ys = ys (x ∷ xs) ++ ys = x ∷ λ where .force → xs .force ++ ys lookup : ℕ → Colist A ∞ → Maybe A lookup n [] = nothing lookup zero (a ∷ as) = just a lookup (suc n) (a ∷ as) = lookup n (as .force) colookup : Conat i → Colist A i → Delay (Maybe A) i colookup n [] = now nothing colookup zero (a ∷ as) = now (just a) colookup (suc n) (a ∷ as) = later λ where .force → colookup (n .force) (as .force) take : (n : ℕ) → Colist A ∞ → Vec≤ A n take zero xs = Vec≤.[] take n [] = Vec≤.[] take (suc n) (x ∷ xs) = x Vec≤.∷ take n (xs .force) cotake : Conat i → Stream A i → Colist A i cotake zero xs = [] cotake (suc n) (x ∷ xs) = x ∷ λ where .force → cotake (n .force) (xs .force) drop : ℕ → Colist A ∞ → Colist A ∞ drop zero xs = xs drop (suc n) [] = [] drop (suc n) (x ∷ xs) = drop n (xs .force) fromList : List A → Colist A ∞ fromList [] = [] fromList (x ∷ xs) = x ∷ λ where .force → fromList xs fromList⁺ : List⁺ A → Colist A ∞ fromList⁺ = fromList ∘′ List⁺.toList _⁺++_ : List⁺ A → Thunk (Colist A) i → Colist A i (x ∷ xs) ⁺++ ys = x ∷ λ where .force → fromList xs ++ ys .force concat : Colist (List⁺ A) i → Colist A i concat [] = [] concat (as ∷ ass) = as ⁺++ λ where .force → concat (ass .force) fromStream : Stream A i → Colist A i fromStream = cotake Conat.infinity module ChunksOf (n : ℕ) where chunksOf : Colist A ∞ → Cowriter (Vec A n) (Vec≤ A n) i chunksOfAcc : ∀ m → -- We have two continuations but we are only ever going to use one. -- If we had linear types, we'd write the type using the & conjunction here. (k≤ : Vec≤ A m → Vec≤ A n) → (k≡ : Vec A m → Vec A n) → -- Finally we chop up the input stream. Colist A ∞ → Cowriter (Vec A n) (Vec≤ A n) i chunksOf = chunksOfAcc n id id chunksOfAcc zero k≤ k≡ as = k≡ [] ∷ λ where .force → chunksOf as chunksOfAcc (suc k) k≤ k≡ [] = CW.[ k≤ Vec≤.[] ] chunksOfAcc (suc k) k≤ k≡ (a ∷ as) = chunksOfAcc k (k≤ ∘ (a Vec≤.∷_)) (k≡ ∘ (a ∷_)) (as .force) open ChunksOf using (chunksOf) public -- Test to make sure that the values are kept in the same order _ : chunksOf 3 (fromList (1 ∷ 2 ∷ 3 ∷ 4 ∷ [])) ≡ (1 ∷ 2 ∷ 3 ∷ []) ∷ _ _ = refl map : (A → B) → Colist A i → Colist B i map f [] = [] map f (a ∷ as) = f a ∷ λ where .force → map f (as .force) unfold : (A → Maybe (A × B)) → A → Colist B i unfold next seed with next seed ... | nothing = [] ... | just (seed′ , b) = b ∷ λ where .force → unfold next seed′ scanl : (B → A → B) → B → Colist A i → Colist B i scanl c n [] = n ∷ λ where .force → [] scanl c n (a ∷ as) = n ∷ λ where .force → scanl c (c n a) (as .force) alignWith : (These A B → C) → Colist A i → Colist B i → Colist C i alignWith f [] bs = map (f ∘′ that) bs alignWith f as@(_ ∷ _) [] = map (f ∘′ this) as alignWith f (a ∷ as) (b ∷ bs) = f (these a b) ∷ λ where .force → alignWith f (as .force) (bs .force) zipWith : (A → B → C) → Colist A i → Colist B i → Colist C i zipWith f [] bs = [] zipWith f as [] = [] zipWith f (a ∷ as) (b ∷ bs) = f a b ∷ λ where .force → zipWith f (as .force) (bs .force) align : Colist A i → Colist B i → Colist (These A B) i align = alignWith id zip : Colist A i → Colist B i → Colist (A × B) i zip = zipWith _,_ ap : Colist (A → B) i → Colist A i → Colist B i ap = zipWith _$′_
{ "alphanum_fraction": 0.5534950071, "avg_line_length": 32.0457142857, "ext": "agda", "hexsha": "da95058fc6f072eeafc7e0706608a08a33dd9926", "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/Colist.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/Colist.agda", "max_line_length": 80, "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/Colist.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": 1957, "size": 5608 }
------------------------------------------------------------------------ -- INCREMENTAL λ-CALCULUS -- -- The syntax of function types (Fig. 1a). ------------------------------------------------------------------------ module Parametric.Syntax.Type where open import Base.Data.DependentList -- This is a module in the Parametric.* hierarchy, so it defines -- an extension point for plugins. In this case, the plugin can -- choose the syntax for data types. We always provide a binding -- called "Structure" that defines the type of the value that has -- to be provided by the plugin. In this case, the plugin has to -- provide a type, so we say "Structure = Set". Structure : Set₁ Structure = Set -- Here is the parametric module that defines the syntax of -- simply types in terms of the syntax of base types. In the -- Parametric.* hierarchy, we always call these parametric -- modules "Structure". Note that in Agda, there is a separate -- namespace for module names and for other bindings, so this -- doesn't clash with the "Structure" above. -- -- The idea behind all these structures is that the parametric -- module lifts some structure of the plugin to the corresponding -- structure in the full language. In this case, we lift the -- structure of base types to the structure of simple types. -- Maybe not the best choice of names, but it seemed clever at -- the time. module Structure (Base : Structure) where infixr 5 _⇒_ -- A simple type is either a base type or a function types. -- Note that we can use our module parameter "Base" here just -- like any other type. data Type : Set where base : (ι : Base) → Type _⇒_ : (σ : Type) → (τ : Type) → Type -- We also provide the definitions of contexts of the newly -- defined simple types, variables as de Bruijn indices -- pointing into such a context, and sets of bound variables. open import Base.Syntax.Context Type public open import Base.Syntax.Vars Type public -- Internalize a context to a type. -- -- Is there a better name for this function? internalizeContext : (Σ : Context) (τ′ : Type) → Type internalizeContext ∅ τ′ = τ′ internalizeContext (τ • Σ) τ′ = τ ⇒ internalizeContext Σ τ′
{ "alphanum_fraction": 0.6731818182, "avg_line_length": 38.5964912281, "ext": "agda", "hexsha": "1f617666cf5fc0d7a05ae55ccabac118f8a6072f", "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/Syntax/Type.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/Syntax/Type.agda", "max_line_length": 72, "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/Syntax/Type.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": 531, "size": 2200 }