Search is not available for this dataset
text
string
meta
dict
open import Relation.Binary.Core module TreeSort.Impl2.Correctness.Order {A : Set} (_≤_ : A → A → Set) (tot≤ : Total _≤_) (trans≤ : Transitive _≤_) where open import BBSTree _≤_ open import BBSTree.Properties _≤_ trans≤ open import Data.List open import Function using (_∘_) open import List.Sorted _≤_ open import TreeSort.Impl2 _≤_ tot≤ theorem-treeSort-sorted : (xs : List A) → Sorted (flatten (treeSort xs)) theorem-treeSort-sorted = lemma-bbst-sorted ∘ treeSort
{ "alphanum_fraction": 0.6522556391, "avg_line_length": 25.3333333333, "ext": "agda", "hexsha": "67c5b79db29e0d6c4d57252f58cbc7ab0b3ed26e", "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/TreeSort/Impl2/Correctness/Order.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/TreeSort/Impl2/Correctness/Order.agda", "max_line_length": 72, "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/TreeSort/Impl2/Correctness/Order.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": 159, "size": 532 }
module Issue637 where data Nat : Set where zero : Nat suc : Nat → Nat infixl 60 _+_ _+_ : Nat → Nat → Nat zero + n = n suc m + n = suc (n + m) data _≡_ {A : Set}(x : A) : A → Set where refl : x ≡ x `1 = suc zero `2 = suc `1 `3 = suc `2 `4 = `2 + `2 `8 = `4 + `4 `16 = `8 + `8 `32 = `16 + `16 `50 = `32 + `16 + `2 `64 = `32 + `32 `100 = `64 + `32 + `4 `200 = `100 + `100 `400 = `200 + `200 `800 = `400 + `400 `1000 = `800 + `200 `2000 = `1000 + `1000 `4000 = `2000 + `2000 prf : `16 ≡ (`4 + (`4 + `8)) prf = refl infixr 40 _∷_ data Vec : Nat → Set where [] : Vec zero _∷_ : ∀ {n} → Nat → Vec n → Vec (suc n) fromN : ∀ {n} → Nat → Vec n fromN {zero} _ = [] fromN {suc n} x = x ∷ fromN (suc x) sum : ∀ {n} → Vec n → Nat sum [] = zero sum (n ∷ ns) = n + sum ns prf₁ : sum (fromN {`100} `1) ≡ (`4000 + `1000 + `50) prf₁ = refl
{ "alphanum_fraction": 0.4798099762, "avg_line_length": 16.84, "ext": "agda", "hexsha": "d9c552f3bf1f8f808372d35ebb1e5dc38226ff71", "lang": "Agda", "max_forks_count": 371, "max_forks_repo_forks_event_max_datetime": "2022-03-30T19:00:30.000Z", "max_forks_repo_forks_event_min_datetime": "2015-01-03T14:04:08.000Z", "max_forks_repo_head_hexsha": "231d6ad8e77b67ff8c4b1cb35a6c31ccd988c3e9", "max_forks_repo_licenses": [ "BSD-3-Clause" ], "max_forks_repo_name": "Agda-zh/agda", "max_forks_repo_path": "test/interaction/Issue637.agda", "max_issues_count": 4066, "max_issues_repo_head_hexsha": "ed8ac6f4062ea8a20fa0f62d5db82d4e68278338", "max_issues_repo_issues_event_max_datetime": "2022-03-31T21:14:49.000Z", "max_issues_repo_issues_event_min_datetime": "2015-01-10T11:24:51.000Z", "max_issues_repo_licenses": [ "BSD-3-Clause" ], "max_issues_repo_name": "shlevy/agda", "max_issues_repo_path": "test/interaction/Issue637.agda", "max_line_length": 52, "max_stars_count": 1989, "max_stars_repo_head_hexsha": "ed8ac6f4062ea8a20fa0f62d5db82d4e68278338", "max_stars_repo_licenses": [ "BSD-3-Clause" ], "max_stars_repo_name": "shlevy/agda", "max_stars_repo_path": "test/interaction/Issue637.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": 407, "size": 842 }
module plfa-exercises.Practice3 where import Relation.Binary.PropositionalEquality as Eq open Eq using (_≡_; refl; sym; trans; cong) open Eq.≡-Reasoning using (_≡⟨⟩_; _≡⟨_⟩_; begin_; _∎) open import Data.Bool using (Bool; true; false; T; _∧_; _∨_; not) open import Data.Nat using (ℕ; zero; suc; _+_; _*_; _∸_; _≤_; s≤s; z≤n) open import Data.Nat.Properties using (+-assoc; +-identityˡ; +-identityʳ; *-assoc; *-identityˡ; *-identityʳ; *-distribʳ-+; +-suc; *-suc; *-comm) open import Relation.Nullary using (¬_; Dec; yes; no) open import Data.Product using (_×_; ∃; ∃-syntax) renaming (_,_ to ⟨_,_⟩) open import Function using (_∘_; flip) open import Level using (Level) open import plfa.part1.Isomorphism using (_≃_; _⇔_) --import Data.List.All using (All; []; _∷_) open import Data.List using (List; []; _∷_; _++_; length; reverse; map; foldr; downFrom; foldl) open import Axiom.Extensionality.Propositional using (Extensionality) import Data.Nat.Solver as NatSolver open import Data.Sum using (_⊎_; inj₁; inj₂) -- Exercises from plfa Lists map∘compose₀ : ∀ {A B C : Set} (f : A → B) (g : B → C) (xs : List A) → map (g ∘ f) xs ≡ (map g ∘ map f) xs map∘compose₀ f g [] = refl map∘compose₀ f g (x ∷ xs) = cong (g (f x) ∷_) (map∘compose₀ f g xs) module _ (ext : ∀ {ℓ ℓ′} → Extensionality ℓ ℓ′) where map∘compose : ∀ {A B C : Set} (f : A → B) (g : B → C) → map (g ∘ f) ≡ (map g ∘ map f) map∘compose f g = ext (map∘compose₀ f g) map-++-distribute : ∀ {A B : Set} (f : A → B) (xs ys : List A) → map f (xs ++ ys) ≡ map f xs ++ map f ys map-++-distribute f [] ys = refl map-++-distribute f (x ∷ xs) ys = cong (f x ∷_) (map-++-distribute f xs ys) data Tree (A B : Set) : Set where leaf : A → Tree A B node : Tree A B → B → Tree A B → Tree A B map-Tree : ∀ {A B C D : Set} → (A → C) → (B → D) → Tree A B → Tree C D map-Tree f g (leaf a) = leaf (f a) map-Tree f g (node lt b rt) = node (map-Tree f g lt) (g b) (map-Tree f g rt) --node (leaf 5) (3 ∷ []) (leaf 0) --map-Tree suc (6 ∷_) (node (leaf 5) (3 ∷ []) (leaf 0)) product : List ℕ → ℕ product = foldr _*_ 1 _ : product (1 ∷ 2 ∷ 3 ∷ 4 ∷ []) ≡ 24 _ = refl sum : List ℕ → ℕ sum = foldr _+_ 0 sum-downFrom : ∀ (n : ℕ) → sum (downFrom n) * 2 ≡ n * (n ∸ 1) sum-downFrom zero = refl sum-downFrom 1 = refl sum-downFrom (suc (suc n)) rewrite -- sum (downFrom (suc (suc n))) * 2 ≡ suc (suc n) * (suc (suc n) ∸ 1) -- suc (suc ((n + (n + foldr _+_ 0 (downFrom n))) * 2)) ≡ suc (n + suc (n + n * suc n)) *-distribʳ-+ 2 n (foldr _+_ 0 (downFrom (suc n))) -- suc (suc (n * 2 + (n + foldr _+_ 0 (downFrom n)) * 2)) ≡ suc (n + suc (n + n * suc n)) | sum-downFrom (suc n) -- suc (suc (n * 2 + (n + n * n))) ≡ suc (n + suc (n + n * suc n)) | +-suc n (n + n * suc n) -- suc (suc (n * 2 + (n + n * n))) ≡ suc (suc (n + (n + n * suc n))) | *-suc n n -- suc (suc (n * 2 + (n + n * n))) ≡ suc (suc (n + (n + (n + n * n)))) | *-comm n 2 -- suc (suc (n + (n + 0) + (n + n * n))) ≡ suc (suc (n + (n + (n + n * n)))) | +-identityʳ n -- suc (suc (n + n + (n + n * n))) ≡ suc (suc (n + (n + (n + n * n)))) | +-assoc n n (n + n * n) -- suc (suc (n + (n + (n + n * n)))) ≡ suc (suc (n + (n + (n + n * n)))) = refl sum-downFrom` : ∀ (n : ℕ) → sum (downFrom n) * 2 ≡ n * (n ∸ 1) sum-downFrom` zero = refl sum-downFrom` 1 = refl sum-downFrom` (suc (suc n)) rewrite -- sum (downFrom (suc (suc n))) * 2 ≡ suc (suc n) * (suc (suc n) ∸ 1) -- suc (suc ((n + (n + foldr _+_ 0 (downFrom n))) * 2)) ≡ suc (n + suc (n + n * suc n)) *-distribʳ-+ 2 n (foldr _+_ 0 (downFrom (suc n))) -- suc (suc (n * 2 + (n + foldr _+_ 0 (downFrom n)) * 2)) ≡ suc (n + suc (n + n * suc n)) | sum-downFrom` (suc n) -- suc (suc (n * 2 + (n + n * n))) ≡ suc (n + suc (n + n * suc n)) = simplified n where open NatSolver using (module +-*-Solver) open +-*-Solver using (solve; _:+_; _:*_; _:=_; con) simplified : ∀ n → 2 + (n * 2 + (n + n * n)) ≡ 1 + (n + (1 + (n + n * (1 + n)))) simplified = solve 1 (λ n → con 2 :+ (n :* con 2 :+ (n :+ n :* n)) := con 1 :+ (n :+ (con 1 :+ (n :+ n :* (con 1 :+ n))))) refl -- solve 1 (λ n → n :+ con 1 := con 1 :+ n) refl --open NatSolver using (module +-*-Solver) --open +-*-Solver using (solve; _:+_; _:*_; _:=_; con; Polynomial) -- --lemma : ∀ x y → x + y * 1 + 3 ≡ 2 + 1 + y + x --lemma = solve 2 (λ x y → x :+ y :* con 1 :+ con 3 := con 2 :+ con 1 :+ y :+ x) refl record IsMonoid {A : Set} (_⊗_ : A → A → A) (e : A) : Set where field assoc : ∀ (x y z : A) → (x ⊗ y) ⊗ z ≡ x ⊗ (y ⊗ z) identityˡ : ∀ (x : A) → e ⊗ x ≡ x identityʳ : ∀ (x : A) → x ⊗ e ≡ x open IsMonoid foldr-monoid : ∀ {A : Set} (_⊗_ : A → A → A) (e : A) → IsMonoid _⊗_ e → ∀ (xs : List A) (y : A) → foldr _⊗_ y xs ≡ foldr _⊗_ e xs ⊗ y foldr-monoid _⊗_ e ⊗-monoid [] y = begin foldr _⊗_ y [] ≡⟨⟩ y ≡⟨ sym (identityˡ ⊗-monoid y) ⟩ (e ⊗ y) ≡⟨⟩ foldr _⊗_ e [] ⊗ y ∎ foldr-monoid _⊗_ e ⊗-monoid (x ∷ xs) y = begin foldr _⊗_ y (x ∷ xs) ≡⟨⟩ x ⊗ (foldr _⊗_ y xs) ≡⟨ cong (x ⊗_) (foldr-monoid _⊗_ e ⊗-monoid xs y) ⟩ x ⊗ (foldr _⊗_ e xs ⊗ y) ≡⟨ sym (assoc ⊗-monoid x (foldr _⊗_ e xs) y) ⟩ (x ⊗ foldr _⊗_ e xs) ⊗ y ≡⟨⟩ foldr _⊗_ e (x ∷ xs) ⊗ y ∎ --foldl : {A B : Set} (f : B → A → B) → B → List A → B --foldl f b [] = b --foldl f b (a ∷ as') = foldl f (f b a) as' _ : foldl _∸_ 20 (4 ∷ 3 ∷ []) ≡ 13 _ = begin foldl _∸_ 20 (4 ∷ 3 ∷ []) ≡⟨⟩ foldl _∸_ (20 ∸ 4) (3 ∷ []) ≡⟨⟩ foldl _∸_ ((20 ∸ 4) ∸ 3) [] ≡⟨⟩ (20 ∸ 4) ∸ 3 ≡⟨⟩ 13 ∎ _ : foldr _∸_ 20 (4 ∷ 3 ∷ []) ≡ 4 _ = begin foldr _∸_ 20 (4 ∷ 3 ∷ []) ≡⟨⟩ 4 ∸ foldr _∸_ 20 (3 ∷ []) ≡⟨⟩ 4 ∸ (3 ∸ foldr _∸_ 20 []) ≡⟨⟩ 4 ∸ (3 ∸ 20) ≡⟨⟩ 4 ∸ 0 ≡⟨⟩ 4 ∎ foldl-monoid : {A : Set} (_⊗_ : A → A → A) (e : A) → IsMonoid _⊗_ e → ∀ (y : A) (xs : List A) → (y ⊗ foldl _⊗_ e xs) ≡ foldl _⊗_ y xs foldl-monoid _⊗_ e monoid-⊗ y [] = identityʳ monoid-⊗ y foldl-monoid _⊗_ e monoid-⊗ y (x ∷ xs) = begin y ⊗ foldl _⊗_ e (x ∷ xs) ≡⟨⟩ y ⊗ foldl _⊗_ (e ⊗ x) xs ≡⟨ cong (λ exp → y ⊗ foldl _⊗_ exp xs) (identityˡ monoid-⊗ x) ⟩ y ⊗ foldl _⊗_ x xs ≡⟨ cong (y ⊗_) (sym (foldl-monoid _⊗_ e monoid-⊗ x xs)) ⟩ y ⊗ (x ⊗ foldl _⊗_ e xs) ≡⟨ sym (assoc monoid-⊗ y x (foldl _⊗_ e xs)) ⟩ (y ⊗ x) ⊗ foldl _⊗_ e xs ≡⟨ foldl-monoid _⊗_ e monoid-⊗ (y ⊗ x) xs ⟩ foldl _⊗_ (y ⊗ x) xs ≡⟨⟩ foldl _⊗_ y (x ∷ xs) ∎ foldr-monoid-foldl₀ : ∀ {A : Set} {_⊗_ : A → A → A} {e : A} → (xs : List A) → IsMonoid _⊗_ e → foldr _⊗_ e xs ≡ foldl _⊗_ e xs foldr-monoid-foldl₀ [] _ = refl foldr-monoid-foldl₀ {_} {_⊗_} {e} (x ∷ xs) monoid-⊗ = begin foldr _⊗_ e (x ∷ xs) ≡⟨⟩ x ⊗ foldr _⊗_ e xs ≡⟨ cong (x ⊗_) (foldr-monoid-foldl₀ xs monoid-⊗) ⟩ x ⊗ foldl _⊗_ e xs ≡⟨ foldl-monoid _⊗_ e monoid-⊗ x xs ⟩ foldl _⊗_ x xs ≡⟨ cong (λ exp → foldl _⊗_ exp xs) (sym (identityˡ monoid-⊗ x)) ⟩ foldl _⊗_ (e ⊗ x) xs ≡⟨⟩ foldl _⊗_ e (x ∷ xs) ∎ module _ (ext : ∀ {ℓ ℓ′} → Extensionality ℓ ℓ′) where foldr-monoid-foldl : ∀ {A : Set} {_⊗_ : A → A → A} {e : A} → IsMonoid _⊗_ e → foldr _⊗_ e ≡ foldl _⊗_ e foldr-monoid-foldl monoid-⊗ = ext (λ xs → foldr-monoid-foldl₀ xs monoid-⊗) data All {A : Set} (P : A → Set) : List A → Set where [] : All P [] _∷_ : ∀ {x : A} {xs : List A} → P x → All P xs → All P (x ∷ xs) pattern [_] z = z ∷ [] pattern [_,_] y z = y ∷ z ∷ [] pattern [_,_,_] x y z = x ∷ y ∷ z ∷ [] pattern [_,_,_,_] w x y z = w ∷ x ∷ y ∷ z ∷ [] pattern [_,_,_,_,_] v w x y z = v ∷ w ∷ x ∷ y ∷ z ∷ [] pattern [_,_,_,_,_,_] u v w x y z = u ∷ v ∷ w ∷ x ∷ y ∷ z ∷ [] _ : All (_≤ 2) [ 0 , 1 , 2 ] -- These brackes desugar to ∷ and [] for List definition _ = [ z≤n , s≤s z≤n , s≤s (s≤s z≤n) ] -- ∷ and [] from All constructors ++-assoc : ∀ {A : Set} (xs ys zs : List A) → (xs ++ ys) ++ zs ≡ xs ++ (ys ++ zs) ++-assoc [] ys zs = refl ++-assoc (x ∷ xs) ys zs = begin ((x ∷ xs) ++ ys) ++ zs ≡⟨⟩ x ∷ (xs ++ ys) ++ zs ≡⟨ cong (x ∷_) (++-assoc xs ys zs) ⟩ x ∷ xs ++ ys ++ zs ≡⟨⟩ (x ∷ xs) ++ ys ++ zs ∎ length-++ : ∀ {A : Set} (xs ys : List A) → length (xs ++ ys) ≡ length xs + length ys length-++ [] ys = refl length-++ (x ∷ xs) ys = begin length ((x ∷ xs) ++ ys) ≡⟨⟩ suc (length (xs ++ ys)) ≡⟨ cong suc (length-++ xs ys) ⟩ suc (length xs + length ys) ≡⟨⟩ suc (length xs) + length ys ≡⟨⟩ length (x ∷ xs) + length ys ∎ ++-[] : ∀ {A : Set} (xs : List A) → xs ++ [] ≡ xs ++-[] [] = refl ++-[] (x ∷ xs) = cong (x ∷_) (++-[] xs) data Any {A : Set} (P : A → Set) : List A → Set where here : ∀ {x : A} {xs : List A} → P x → Any P (x ∷ xs) there : ∀ {x : A} {xs : List A} → Any P xs → Any P (x ∷ xs) infix 4 _∈_ _∉_ _∈_ : ∀ {A : Set} (x : A) (xs : List A) → Set x ∈ xs = Any (x ≡_) xs _∉_ : ∀ {A : Set} (x : A) (xs : List A) → Set x ∉ xs = ¬ (x ∈ xs) _ : 0 ∈ [ 0 , 1 , 0 , 2 ] _ = here refl --_ = there (there (here refl)) ---- Left as exercise for another day --reverse-inv : ∀ {A : Set} (x : A) (xs : List A) -- → reverse (x ∷ xs) ≡ reverse xs ++ [ x ] --reverse-inv _ [] = refl --reverse-inv y (x ∷ xs) = -- begin -- reverse (y ∷ x ∷ xs) ≡⟨⟩ -- foldl _∷`_ [ x , y ] xs ≡⟨ ? ⟩ -- LEFT FOR LATER -- foldl _∷`_ [ x ] xs ++ [ y ] ≡⟨⟩ -- reverse (x ∷ xs) ++ [ y ] -- ∎ ---- λ y x xs → ≡ ---- λ y x xs → foldl (λ y₁ x₁ → x₁ ∷ y₁) [ x , y ] xs ≡ foldl (λ y₁ x₁ → x₁ ∷ y₁) [ x ] xs ++ [ y ] -- where -- _∷`_ = flip _∷_ -- --reverse-++-distrib : ∀ {A : Set} (xs ys : List A) -- → reverse (xs ++ ys) ≡ reverse ys ++ reverse xs --reverse-++-distrib [] ys = sym (++-[] (reverse ys)) --reverse-++-distrib (x ∷ xs) ys = -- begin -- reverse ((x ∷ xs) ++ ys) ≡⟨⟩ -- reverse (x ∷ (xs ++ ys)) ≡⟨ reverse-inv x (xs ++ ys) ⟩ -- reverse (xs ++ ys) ++ [ x ] ≡⟨ cong (_++ [ x ]) (reverse-++-distrib xs ys) ⟩ -- (reverse ys ++ reverse xs) ++ [ x ] ≡⟨ ++-assoc (reverse ys) (reverse xs) [ x ] ⟩ -- reverse ys ++ (reverse xs ++ [ x ]) ≡⟨ sym (cong (reverse ys ++_) (reverse-inv x xs)) ⟩ -- reverse ys ++ reverse (x ∷ xs) -- ∎ -- --foldl _∷`_ [ x ] (xs ++ ys) ≡⟨ ? ⟩ -- --foldl _∷`_ [] ys ++ foldl _∷`_ [ x ] xs ≡⟨⟩ exercise-823→ : ∀ {A : Set} {z : A} (xs ys : List A) → z ∈ (xs ++ ys) → (z ∈ xs) ⊎ (z ∈ ys) exercise-823→ [] [] () exercise-823→ [] _ z∈[]++ys = inj₂ z∈[]++ys exercise-823→ (_ ∷ _) _ (here refl) = inj₁ (here refl) exercise-823→ (x ∷ xs) ys (there z∈xs++ys) with exercise-823→ xs ys z∈xs++ys ... | inj₁ z∈xs = inj₁ (there z∈xs) ... | inj₂ z∈ys = inj₂ z∈ys exercise-823← : ∀ {A : Set} {z : A} (xs ys : List A) → (z ∈ xs) ⊎ (z ∈ ys) → z ∈ (xs ++ ys) exercise-823← [] _ (inj₁ ()) exercise-823← [] _ (inj₂ z∈ys) = z∈ys exercise-823← (_ ∷ _) [] (inj₂ ()) exercise-823← (_ ∷ _) _ (inj₁ (here z∈xs)) = here z∈xs exercise-823← (x ∷ xs) ys (inj₁ (there z∈xs)) with exercise-823← xs ys (inj₁ z∈xs) ... | z∈xs++ys = there z∈xs++ys exercise-823← (_ ∷ xs) ys (inj₂ z∈y∷ys) with exercise-823← xs ys (inj₂ z∈y∷ys) ... | z∈xs++y∷ys = there z∈xs++y∷ys exercise-823 : ∀ {A : Set} {z : A} (xs ys : List A) → (z ∈ xs ++ ys) ⇔ (z ∈ xs ⊎ z ∈ ys) exercise-823 xs ys = record { to = exercise-823→ xs ys ; from = exercise-823← xs ys }
{ "alphanum_fraction": 0.4609868533, "avg_line_length": 36.7210031348, "ext": "agda", "hexsha": "757e5a39f520c735052a6610aeaaaa848280252f", "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/Practice3.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/Practice3.agda", "max_line_length": 131, "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/Practice3.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 5393, "size": 11714 }
{-# OPTIONS --without-K --safe #-} -- The 'Trivial' instance, with a single arrow between objects module Categories.Theory.Lawvere.Instance.Triv where open import Data.Nat using (_*_) open import Data.Unit.Polymorphic using (⊤; tt) open import Relation.Binary.PropositionalEquality using (_≡_; refl; isEquivalence) open import Categories.Theory.Lawvere using (LawvereTheory) Triv : ∀ {ℓ} → LawvereTheory ℓ ℓ Triv = record { L = record { _⇒_ = λ _ _ → ⊤ ; _≈_ = _≡_ ; assoc = refl ; sym-assoc = refl ; identityˡ = refl ; identityʳ = refl ; identity² = refl ; equiv = isEquivalence ; ∘-resp-≈ = λ _ _ → refl } ; T = record { terminal = record { ⊤ = 0 ; ⊤-is-terminal = record { ! = tt ; !-unique = λ _ → refl } } ; products = record { product = λ {m} {n} → record { A×B = m * n ; project₁ = refl ; project₂ = refl ; unique = λ _ _ → refl } } } ; I = record { F₁ = λ _ → tt ; identity = refl ; homomorphism = refl ; F-resp-≈ = λ _ → refl } ; CartF = record { F-resp-⊤ = record { ! = tt ; !-unique = λ _ → refl } ; F-resp-× = record { ⟨_,_⟩ = λ _ _ → tt ; project₁ = refl ; project₂ = refl ; unique = λ _ _ → refl } } }
{ "alphanum_fraction": 0.5221971407, "avg_line_length": 27.1224489796, "ext": "agda", "hexsha": "40c6135f876fe119b213d8d8a1a38275c7d41dc6", "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/Theory/Lawvere/Instance/Triv.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/Theory/Lawvere/Instance/Triv.agda", "max_line_length": 106, "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/Theory/Lawvere/Instance/Triv.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": 433, "size": 1329 }
{- 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.Prelude open import LibraBFT.Lemmas -- TODO-2: The following import should be eliminated and replaced -- with the necessary module parameters (PK and MetaHonestPK) open import LibraBFT.Base.PKCS -- This module brings in the base types used through libra -- and those necessary for the abstract model. module LibraBFT.Abstract.Types.EpochConfig (UID : Set) (NodeId : Set) where open import LibraBFT.Base.Types ℓ-EC : Level ℓ-EC = ℓ+1 0ℓ -- An epoch-configuration carries only simple data about the epoch; the complicated -- parts will be provided by the System, defined below. -- -- The reason for the separation is that we should be able to provide -- an EpochConfig from a single peer state. record EpochConfig : Set ℓ-EC where constructor EpochConfig∙new field genesisUID : UID epoch : Epoch authorsN : ℕ -- The set of members of this epoch. Member : Set Member = Fin authorsN -- There is a partial isomorphism between NodeIds and the -- authors participating in this epoch. field toNodeId : Member → NodeId isMember? : NodeId → Maybe Member nodeid-author-id : ∀{α} → isMember? (toNodeId α) ≡ just α author-nodeid-id : ∀{nid α} → isMember? nid ≡ just α → toNodeId α ≡ nid getPubKey : Member → PK PK-inj : ∀ {m1 m2} → getPubKey m1 ≡ getPubKey m2 → m1 ≡ m2 IsQuorum : List Member → Set bft-assumption : ∀ {xs ys} → IsQuorum xs → IsQuorum ys → ∃[ α ] (α ∈ xs × α ∈ ys × Meta-Honest-PK (getPubKey α)) open EpochConfig PK-inj-same-ECs : ∀ {𝓔₁ 𝓔₂ : EpochConfig}{mbr₁ mbr₂} → 𝓔₁ ≡ 𝓔₂ → getPubKey 𝓔₁ mbr₁ ≡ getPubKey 𝓔₂ mbr₂ → toNodeId 𝓔₁ mbr₁ ≡ toNodeId 𝓔₂ mbr₂ PK-inj-same-ECs {𝓔₁} refl pks≡ = cong (toNodeId 𝓔₁) (PK-inj 𝓔₁ pks≡) module _ (ec : EpochConfig) where NodeId-PK-OK : PK → NodeId → Set NodeId-PK-OK pk pid = ∃[ m ] (toNodeId ec m ≡ pid × getPubKey ec m ≡ pk) NodeId-PK-OK-injective : ∀ {pk pid1 pid2} → NodeId-PK-OK pk pid1 → NodeId-PK-OK pk pid2 → pid1 ≡ pid2 NodeId-PK-OK-injective (m1 , pid1 , pk1) (m2 , pid2 , pk2) rewrite PK-inj ec (trans pk1 (sym pk2)) = trans (sym pid1) pid2 module WithAbsVote (𝓔 : EpochConfig) where -- The abstract model is connected to the implementaton by means of -- 'VoteEvidence'. The record module will be parameterized by a -- v of type 'VoteEvidence 𝓔 UID'; this v will provide evidence -- that a given author voted for a given block (identified by the UID) -- on the specified round. -- -- When it comes time to instantiate the v above concretely, it will -- be something that states that we have a signature from the specified -- author voting for the specified block. record AbsVoteData : Set where constructor AbsVoteData∙new field abs-vRound : Round abs-vMember : EpochConfig.Member 𝓔 abs-vBlockUID : UID open AbsVoteData public AbsVoteData-η : ∀ {r1 r2 : Round} {m1 m2 : EpochConfig.Member 𝓔} {b1 b2 : UID} → r1 ≡ r2 → m1 ≡ m2 → b1 ≡ b2 → AbsVoteData∙new r1 m1 b1 ≡ AbsVoteData∙new r2 m2 b2 AbsVoteData-η refl refl refl = refl VoteEvidence : Set₁ VoteEvidence = AbsVoteData → Set
{ "alphanum_fraction": 0.6189591078, "avg_line_length": 35.5283018868, "ext": "agda", "hexsha": "277d913ff8766d063f8099a31bf214618611b6ba", "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": "71aa2168e4875ffdeece9ba7472ee3cee5fa9084", "max_forks_repo_licenses": [ "UPL-1.0" ], "max_forks_repo_name": "cwjnkins/bft-consensus-agda", "max_forks_repo_path": "LibraBFT/Abstract/Types/EpochConfig.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "71aa2168e4875ffdeece9ba7472ee3cee5fa9084", "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": "cwjnkins/bft-consensus-agda", "max_issues_repo_path": "LibraBFT/Abstract/Types/EpochConfig.agda", "max_line_length": 111, "max_stars_count": null, "max_stars_repo_head_hexsha": "71aa2168e4875ffdeece9ba7472ee3cee5fa9084", "max_stars_repo_licenses": [ "UPL-1.0" ], "max_stars_repo_name": "cwjnkins/bft-consensus-agda", "max_stars_repo_path": "LibraBFT/Abstract/Types/EpochConfig.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 1147, "size": 3766 }
module Agda.Builtin.Float where open import Agda.Builtin.Bool open import Agda.Builtin.Nat open import Agda.Builtin.Int open import Agda.Builtin.String postulate Float : Set {-# BUILTIN FLOAT Float #-} primitive primFloatEquality : Float → Float → Bool primFloatLess : Float → Float → Bool primNatToFloat : Nat → Float primFloatPlus : Float → Float → Float primFloatMinus : Float → Float → Float primFloatTimes : Float → Float → Float primFloatDiv : Float → Float → Float primFloatSqrt : Float → Float primRound : Float → Int primFloor : Float → Int primCeiling : Float → Int primExp : Float → Float primLog : Float → Float primSin : Float → Float primShowFloat : Float → String
{ "alphanum_fraction": 0.6465408805, "avg_line_length": 28.3928571429, "ext": "agda", "hexsha": "c37658a94301b5b6a8a3592060586a762de15640", "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": "c0ae7d20728b15d7da4efff6ffadae6fe4590016", "max_forks_repo_licenses": [ "BSD-3-Clause" ], "max_forks_repo_name": "redfish64/autonomic-agda", "max_forks_repo_path": "src/data/lib/prim/Agda/Builtin/Float.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "c0ae7d20728b15d7da4efff6ffadae6fe4590016", "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": "redfish64/autonomic-agda", "max_issues_repo_path": "src/data/lib/prim/Agda/Builtin/Float.agda", "max_line_length": 43, "max_stars_count": null, "max_stars_repo_head_hexsha": "c0ae7d20728b15d7da4efff6ffadae6fe4590016", "max_stars_repo_licenses": [ "BSD-3-Clause" ], "max_stars_repo_name": "redfish64/autonomic-agda", "max_stars_repo_path": "src/data/lib/prim/Agda/Builtin/Float.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 214, "size": 795 }
------------------------------------------------------------------------ -- The Agda standard library -- -- Coinductive "natural" numbers ------------------------------------------------------------------------ {-# OPTIONS --without-K --guardedness --sized-types #-} module Codata.Musical.Conat where open import Codata.Musical.Notation open import Data.Nat.Base using (ℕ; zero; suc) open import Function open import Relation.Binary open import Relation.Binary.PropositionalEquality as P using (_≡_) ------------------------------------------------------------------------ -- The type data Coℕ : Set where zero : Coℕ suc : (n : ∞ Coℕ) → Coℕ module Coℕ-injective where suc-injective : ∀ {m n} → (Coℕ ∋ suc m) ≡ suc n → m ≡ n suc-injective P.refl = P.refl ------------------------------------------------------------------------ -- Some operations pred : Coℕ → Coℕ pred zero = zero pred (suc n) = ♭ n fromℕ : ℕ → Coℕ fromℕ zero = zero fromℕ (suc n) = suc (♯ fromℕ n) fromℕ-injective : ∀ {m n} → fromℕ m ≡ fromℕ n → m ≡ n fromℕ-injective {zero} {zero} eq = P.refl fromℕ-injective {zero} {suc n} () fromℕ-injective {suc m} {zero} () fromℕ-injective {suc m} {suc n} eq = P.cong suc (fromℕ-injective (P.cong pred eq)) ∞ℕ : Coℕ ∞ℕ = suc (♯ ∞ℕ) infixl 6 _+_ _+_ : Coℕ → Coℕ → Coℕ zero + n = n suc m + n = suc (♯ (♭ m + n)) ------------------------------------------------------------------------ -- Equality data _≈_ : Coℕ → Coℕ → Set where zero : zero ≈ zero suc : ∀ {m n} (m≈n : ∞ (♭ m ≈ ♭ n)) → suc m ≈ suc n module ≈-injective where suc-injective : ∀ {m n p q} → (suc m ≈ suc n ∋ suc p) ≡ suc q → p ≡ q suc-injective P.refl = P.refl setoid : Setoid _ _ setoid = record { Carrier = Coℕ ; _≈_ = _≈_ ; isEquivalence = record { refl = refl ; sym = sym ; trans = trans } } where refl : Reflexive _≈_ refl {zero} = zero refl {suc n} = suc (♯ refl) sym : Symmetric _≈_ sym zero = zero sym (suc m≈n) = suc (♯ sym (♭ m≈n)) trans : Transitive _≈_ trans zero zero = zero trans (suc m≈n) (suc n≈k) = suc (♯ trans (♭ m≈n) (♭ n≈k)) ------------------------------------------------------------------------ -- Legacy import Codata.Conat as C open import Codata.Thunk import Size fromMusical : ∀ {i} → Coℕ → C.Conat i fromMusical zero = C.zero fromMusical (suc n) = C.suc λ where .force → fromMusical (♭ n) toMusical : C.Conat Size.∞ → Coℕ toMusical C.zero = zero toMusical (C.suc n) = suc (♯ toMusical (n .force))
{ "alphanum_fraction": 0.4890710383, "avg_line_length": 24.6346153846, "ext": "agda", "hexsha": "a5f0049c45fddc15e3899cd289d30073bc1f1a65", "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/Codata/Musical/Conat.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/Codata/Musical/Conat.agda", "max_line_length": 82, "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/Codata/Musical/Conat.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 872, "size": 2562 }
module index where -- A formalisation of Haskell B. Curry’s thesis Grundlagen der Kombinatorischen -- Logik. See <https://www.jstor.org/stable/2370619> (part 1) and -- <https://www.jstor.org/stable/2370716> (part 2). import CombinatoryLogic.Equality import CombinatoryLogic.Forest import CombinatoryLogic.Semantics import CombinatoryLogic.Syntax -- A formalisation of the theory and problems presented in To Mock a Mockingbird -- by Raymond Smullyan. import Mockingbird.Forest import Mockingbird.Forest.Base import Mockingbird.Forest.Birds import Mockingbird.Forest.Combination import Mockingbird.Forest.Combination.Base import Mockingbird.Forest.Combination.Properties import Mockingbird.Forest.Combination.Vec import Mockingbird.Forest.Combination.Vec.Base import Mockingbird.Forest.Combination.Vec.Properties import Mockingbird.Forest.Extensionality import Mockingbird.Problems.Chapter09 import Mockingbird.Problems.Chapter10 import Mockingbird.Problems.Chapter11 import Mockingbird.Problems.Chapter12 import Mockingbird.Problems.Chapter13 import Mockingbird.Problems.Chapter14 import Mockingbird.Problems.Chapter15 import Mockingbird.Problems.Chapter16 import Mockingbird.Problems.Chapter17 import Mockingbird.Problems.Chapter18 import Mockingbird.Problems.Chapter19 import Mockingbird.Problems.Chapter20
{ "alphanum_fraction": 0.8565980168, "avg_line_length": 37.4571428571, "ext": "agda", "hexsha": "6ae5ea846d4f5f3df1420a7863bbbf9bd3431971", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "df8bf877e60b3059532c54a247a36a3d83cd55b0", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "splintah/combinatory-logic", "max_forks_repo_path": "index.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "df8bf877e60b3059532c54a247a36a3d83cd55b0", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "splintah/combinatory-logic", "max_issues_repo_path": "index.agda", "max_line_length": 80, "max_stars_count": 1, "max_stars_repo_head_hexsha": "df8bf877e60b3059532c54a247a36a3d83cd55b0", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "splintah/combinatory-logic", "max_stars_repo_path": "index.agda", "max_stars_repo_stars_event_max_datetime": "2022-02-28T23:44:42.000Z", "max_stars_repo_stars_event_min_datetime": "2022-02-28T23:44:42.000Z", "num_tokens": 350, "size": 1311 }
------------------------------------------------------------------------ -- The Agda standard library -- -- Membership predicate for fresh lists ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Relation.Binary module Data.List.Fresh.Membership.Setoid {c ℓ} (S : Setoid c ℓ) where open import Level using (Level; _⊔_) open import Data.List.Fresh open import Data.List.Fresh.Relation.Unary.Any as Any using (Any) open import Relation.Nullary open Setoid S renaming (Carrier to A) private variable r : Level _∈_ : {R : Rel A r} → A → List# A R → Set _ x ∈ xs = Any (x ≈_) xs _∉_ : {R : Rel A r} → A → List# A R → Set _ x ∉ xs = ¬ (x ∈ xs)
{ "alphanum_fraction": 0.5256588072, "avg_line_length": 24.8620689655, "ext": "agda", "hexsha": "e974d45a4967ef430ae9ead83357039cadaac64b", "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/Fresh/Membership/Setoid.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/Fresh/Membership/Setoid.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/Fresh/Membership/Setoid.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": 186, "size": 721 }
------------------------------------------------------------------------ -- The Agda standard library -- -- Bijections on finite sets (i.e. permutations). ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Fin.Permutation where open import Data.Empty using (⊥-elim) open import Data.Fin open import Data.Fin.Properties import Data.Fin.Permutation.Components as PC open import Data.Nat using (ℕ; suc; zero) open import Data.Product using (proj₂) open import Function.Inverse as Inverse using (_↔_; Inverse; _InverseOf_) open import Function.Equality using (_⟨$⟩_) open import Function using (_∘_) open import Relation.Nullary using (¬_; yes; no) open import Relation.Nullary.Negation using (contradiction) open import Relation.Binary.PropositionalEquality as P using (_≡_; _≢_; refl; trans; sym; →-to-⟶; cong; cong₂) open P.≡-Reasoning ------------------------------------------------------------------------ -- Types -- A bijection between finite sets of potentially different sizes. -- There only exist inhabitants of this type if in fact m = n, however -- it is often easier to prove the existence of a bijection without -- first proving that the sets have the same size. Indeed such a -- bijection is a useful way to prove that the sets are in fact the same -- size. See '↔-≡' below. Permutation : ℕ → ℕ → Set Permutation m n = Fin m ↔ Fin n Permutation′ : ℕ → Set Permutation′ n = Permutation n n ------------------------------------------------------------------------ -- Helper functions permutation : ∀ {m n} (f : Fin m → Fin n) (g : Fin n → Fin m) → (→-to-⟶ g) InverseOf (→-to-⟶ f) → Permutation m n permutation f g inv = record { to = →-to-⟶ f ; from = →-to-⟶ g ; inverse-of = inv } _⟨$⟩ʳ_ : ∀ {m n} → Permutation m n → Fin m → Fin n _⟨$⟩ʳ_ = _⟨$⟩_ ∘ Inverse.to _⟨$⟩ˡ_ : ∀ {m n} → Permutation m n → Fin n → Fin m _⟨$⟩ˡ_ = _⟨$⟩_ ∘ Inverse.from inverseˡ : ∀ {m n} (π : Permutation m n) {i} → π ⟨$⟩ˡ (π ⟨$⟩ʳ i) ≡ i inverseˡ π = Inverse.left-inverse-of π _ inverseʳ : ∀ {m n} (π : Permutation m n) {i} → π ⟨$⟩ʳ (π ⟨$⟩ˡ i) ≡ i inverseʳ π = Inverse.right-inverse-of π _ ------------------------------------------------------------------------ -- Example permutations -- Identity id : ∀ {n} → Permutation′ n id = Inverse.id -- Transpose two indices transpose : ∀ {n} → Fin n → Fin n → Permutation′ n transpose i j = permutation (PC.transpose i j) (PC.transpose j i) record { left-inverse-of = λ _ → PC.transpose-inverse _ _ ; right-inverse-of = λ _ → PC.transpose-inverse _ _ } -- Reverse the order of indices reverse : ∀ {n} → Permutation′ n reverse = permutation PC.reverse PC.reverse record { left-inverse-of = PC.reverse-involutive ; right-inverse-of = PC.reverse-involutive } ------------------------------------------------------------------------ -- Operations -- Composition _∘ₚ_ : ∀ {m n o} → Permutation m n → Permutation n o → Permutation m o π₁ ∘ₚ π₂ = π₂ Inverse.∘ π₁ -- Flip flip : ∀ {m n} → Permutation m n → Permutation n m flip = Inverse.sym -- Element removal -- -- `remove k [0 ↦ i₀, …, k ↦ iₖ, …, n ↦ iₙ]` yields -- -- [0 ↦ i₀, …, k-1 ↦ iₖ₋₁, k ↦ iₖ₊₁, k+1 ↦ iₖ₊₂, …, n-1 ↦ iₙ] remove : ∀ {m n} → Fin (suc m) → Permutation (suc m) (suc n) → Permutation m n remove {m} {n} i π = permutation to from record { left-inverse-of = left-inverse-of ; right-inverse-of = right-inverse-of } where πʳ = π ⟨$⟩ʳ_ πˡ = π ⟨$⟩ˡ_ permute-≢ : ∀ {i j} → i ≢ j → πʳ i ≢ πʳ j permute-≢ p = p ∘ (Inverse.injective π) to-punchOut : ∀ {j : Fin m} → πʳ i ≢ πʳ (punchIn i j) to-punchOut = permute-≢ (punchInᵢ≢i _ _ ∘ sym) from-punchOut : ∀ {j : Fin n} → i ≢ πˡ (punchIn (πʳ i) j) from-punchOut {j} p = punchInᵢ≢i (πʳ i) j (sym (begin πʳ i ≡⟨ cong πʳ p ⟩ πʳ (πˡ (punchIn (πʳ i) j)) ≡⟨ inverseʳ π ⟩ punchIn (πʳ i) j ∎)) to : Fin m → Fin n to j = punchOut (to-punchOut {j}) from : Fin n → Fin m from j = punchOut {j = πˡ (punchIn (πʳ i) j)} from-punchOut left-inverse-of : ∀ j → from (to j) ≡ j left-inverse-of j = begin from (to j) ≡⟨⟩ punchOut {i = i} {πˡ (punchIn (πʳ i) (punchOut to-punchOut))} _ ≡⟨ punchOut-cong′ i (cong πˡ (punchIn-punchOut {i = πʳ i} _)) ⟩ punchOut {i = i} {πˡ (πʳ (punchIn i j))} _ ≡⟨ punchOut-cong i (inverseˡ π) ⟩ punchOut {i = i} {punchIn i j} _ ≡⟨ punchOut-punchIn i ⟩ j ∎ right-inverse-of : ∀ j → to (from j) ≡ j right-inverse-of j = begin to (from j) ≡⟨⟩ punchOut {i = πʳ i} {πʳ (punchIn i (punchOut from-punchOut))} _ ≡⟨ punchOut-cong′ (πʳ i) (cong πʳ (punchIn-punchOut {i = i} _)) ⟩ punchOut {i = πʳ i} {πʳ (πˡ (punchIn (πʳ i) j))} _ ≡⟨ punchOut-cong (πʳ i) (inverseʳ π) ⟩ punchOut {i = πʳ i} {punchIn (πʳ i) j} _ ≡⟨ punchOut-punchIn (πʳ i) ⟩ j ∎ ------------------------------------------------------------------------ -- Other properties module _ {m n} (π : Permutation (suc m) (suc n)) where private πʳ = π ⟨$⟩ʳ_ πˡ = π ⟨$⟩ˡ_ punchIn-permute : ∀ i j → πʳ (punchIn i j) ≡ punchIn (πʳ i) (remove i π ⟨$⟩ʳ j) punchIn-permute i j = begin πʳ (punchIn i j) ≡⟨ sym (punchIn-punchOut {i = πʳ i} _) ⟩ punchIn (πʳ i) (punchOut {i = πʳ i} {πʳ (punchIn i j)} _) ≡⟨⟩ punchIn (πʳ i) (remove i π ⟨$⟩ʳ j) ∎ punchIn-permute′ : ∀ i j → πʳ (punchIn (πˡ i) j) ≡ punchIn i (remove (πˡ i) π ⟨$⟩ʳ j) punchIn-permute′ i j = begin πʳ (punchIn (πˡ i) j) ≡⟨ punchIn-permute _ _ ⟩ punchIn (πʳ (πˡ i)) (remove (πˡ i) π ⟨$⟩ʳ j) ≡⟨ cong₂ punchIn (inverseʳ π) refl ⟩ punchIn i (remove (πˡ i) π ⟨$⟩ʳ j) ∎ ↔⇒≡ : ∀ {m n} → Permutation m n → m ≡ n ↔⇒≡ {zero} {zero} π = refl ↔⇒≡ {zero} {suc n} π = contradiction (π ⟨$⟩ˡ zero) ¬Fin0 ↔⇒≡ {suc m} {zero} π = contradiction (π ⟨$⟩ʳ zero) ¬Fin0 ↔⇒≡ {suc m} {suc n} π = cong suc (↔⇒≡ (remove zero π)) fromPermutation : ∀ {m n} → Permutation m n → Permutation′ m fromPermutation π = P.subst (Permutation _) (sym (↔⇒≡ π)) π refute : ∀ {m n} → m ≢ n → ¬ Permutation m n refute m≢n π = contradiction (↔⇒≡ π) m≢n
{ "alphanum_fraction": 0.5130168453, "avg_line_length": 35.1075268817, "ext": "agda", "hexsha": "0a79fa100d9a9ede8f18bf6650a5f928def27db4", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "0debb886eb5dbcd38dbeebd04b34cf9d9c5e0e71", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "omega12345/agda-mode", "max_forks_repo_path": "test/asset/agda-stdlib-1.0/Data/Fin/Permutation.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "0debb886eb5dbcd38dbeebd04b34cf9d9c5e0e71", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "omega12345/agda-mode", "max_issues_repo_path": "test/asset/agda-stdlib-1.0/Data/Fin/Permutation.agda", "max_line_length": 135, "max_stars_count": null, "max_stars_repo_head_hexsha": "0debb886eb5dbcd38dbeebd04b34cf9d9c5e0e71", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "omega12345/agda-mode", "max_stars_repo_path": "test/asset/agda-stdlib-1.0/Data/Fin/Permutation.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 2384, "size": 6530 }
-- Andreas, 2016-01-27 -- After complaints of Wolfram Kahl and Aaron Stump -- we decided it is imported to keep the rewrite behavior -- that does not rewrite in rewrite terms. open import Common.Equality test : ∀{A : Set}{a : A}{f : A → A} (p : f a ≡ a) → f (f a) ≡ a test p rewrite p = p -- rewrite should not happen in p itself, -- otherwise we get p : a ≡ a which is useless.
{ "alphanum_fraction": 0.6614583333, "avg_line_length": 29.5384615385, "ext": "agda", "hexsha": "28d72d0bc4ad6465593a8667b3513ed9307b9bdf", "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/Issue1692.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/Issue1692.agda", "max_line_length": 63, "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/Issue1692.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": 120, "size": 384 }
module Morphism where open import Data.Nat open import Data.Unit open import Data.Product open import Relation.Binary.PropositionalEquality open import Prelude open import Structure module _ {A B : Set} (σᴬ : Struct A) (σᴮ : Struct B) where open Struct σᴬ renaming (ℜ to ℜᴬ ; 𝔉 to 𝔉ᴬ) open Struct σᴮ renaming (ℜ to ℜᴮ ; 𝔉 to 𝔉ᴮ) record Hom : Set where field f : A → B ℜ-f : {n : ℕ} → (aⁿ : A ^ n) → ℜᴬ aⁿ → ℜᴮ (𝔉ⁿ f n aⁿ) 𝔉-f : {n : ℕ} → (aⁿ : A ^ n) → f (𝔉ᴬ aⁿ) ≡ 𝔉ᴮ (𝔉ⁿ f n aⁿ) record Embed : Set where field h : Hom open Hom h field f-inj : ∀ {x y} → f x ≡ f y → x ≡ y ℜ-f' : {n : ℕ} → (aⁿ : A ^ n) → ℜᴮ (𝔉ⁿ f n aⁿ) → ℜᴬ aⁿ record Iso : Set where field e : Embed open Embed e open Hom h field g : B → A g-inj : ∀ {x y} → g x ≡ g y → x ≡ y f-g : ∀ {x} → f (g x) ≡ x g-f : ∀ {x} → g (f x) ≡ x module _ {A : Set} (σᴬ : Struct A) where Endo : Set Endo = Hom σᴬ σᴬ Auto : Set Auto = Iso σᴬ σᴬ module Examples {A B : Set} (σᴬ : Struct A) (σᴮ : Struct B) (h : Hom σᴬ σᴮ) where open Struct σᴬ renaming (ℜ to ℜᴬ ; 𝔉 to 𝔉ᴬ) open Struct σᴮ renaming (ℜ to ℜᴮ ; 𝔉 to 𝔉ᴮ) open Hom h hrel : A → A → Set hrel x y = f x ≡ f y open import Relation.Binary hrel-equiv : IsEquivalence hrel hrel-equiv = record { refl = refl ; sym = sym ; trans = trans } module _ {x y : A} where hrel-cong : hrel x y → hrel (𝔉ᴬ (x , tt)) (𝔉ᴬ (y , tt)) hrel-cong p = trans (𝔉-f (x , tt)) (sym (trans (𝔉-f (y , tt)) (sym (cong (λ b → 𝔉ᴮ (b , tt)) p))))
{ "alphanum_fraction": 0.5391470401, "avg_line_length": 24.9365079365, "ext": "agda", "hexsha": "0a1061b58ef547b3cf109630a7e23e1fca42bd78", "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": "6cd093011923758a21663bc32b5a63ce7893e049", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "vikraman/agda-structures", "max_forks_repo_path": "Morphism.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "6cd093011923758a21663bc32b5a63ce7893e049", "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": "vikraman/agda-structures", "max_issues_repo_path": "Morphism.agda", "max_line_length": 102, "max_stars_count": null, "max_stars_repo_head_hexsha": "6cd093011923758a21663bc32b5a63ce7893e049", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "vikraman/agda-structures", "max_stars_repo_path": "Morphism.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 752, "size": 1571 }
{-# OPTIONS --warning=error --safe --without-K #-} open import LogicalFormulae open import Numbers.Naturals.Semiring open import Numbers.Naturals.Order open import Numbers.Naturals.Order.Lemmas open import Numbers.Naturals.Order.WellFounded open import Numbers.Primes.PrimeNumbers open import Semirings.Definition open import Orders.Total.Definition open import Orders.WellFounded.Induction open import Numbers.Naturals.EuclideanAlgorithm module Numbers.Primes.IntegerFactorisation where open TotalOrder ℕTotalOrder -- Represent a factorisation into increasing factors -- Note that 0 cannot be expressed this way. record factorisationNonunit (minFactor : ℕ) (a : ℕ) : Set where inductive field 1<a : 1 <N a firstFactor : ℕ firstFactorNontrivial : 1 <N firstFactor firstFactorBiggerMin : minFactor ≤N firstFactor firstFactorDivision : divisionAlgResult firstFactor a firstFactorDivides : divisionAlgResult.rem firstFactorDivision ≡ 0 firstFactorPrime : Prime firstFactor otherFactorsNumber : ℕ otherFactors : ((divisionAlgResult.quot firstFactorDivision ≡ 1) && (otherFactorsNumber ≡ 0)) || (((1 <N divisionAlgResult.quot firstFactorDivision) && (factorisationNonunit firstFactor (divisionAlgResult.quot firstFactorDivision)))) private lemma : (p : ℕ) → p *N 1 +N 0 ≡ p lemma p rewrite Semiring.sumZeroRight ℕSemiring (p *N 1) | Semiring.productOneRight ℕSemiring p = refl lemma' : {a b : ℕ} → a *N zero +N 0 ≡ b → b ≡ zero lemma' {a} {b} pr rewrite Semiring.sumZeroRight ℕSemiring (a *N zero) | Semiring.productZeroRight ℕSemiring a = equalityCommutative pr primeFactorisation : {p : ℕ} → (pr : Prime p) → factorisationNonunit 1 p primeFactorisation {p} record { p>1 = p>1 ; pr = pr } = record {1<a = p>1 ; firstFactor = p ; firstFactorNontrivial = p>1 ; firstFactorBiggerMin = inl p>1 ; firstFactorDivision = record { quot = 1 ; rem = 0 ; pr = lemma p ; remIsSmall = zeroIsValidRem p ; quotSmall = inl (TotalOrder.<Transitive ℕTotalOrder (le zero refl) p>1) } ; firstFactorDivides = refl ; firstFactorPrime = record { p>1 = p>1 ; pr = pr} ; otherFactors = inl record { fst = refl ; snd = refl } ; otherFactorsNumber = 0 } where proof : (s : ℕ) → s *N 1 +N 0 ≡ s proof s rewrite Semiring.sumZeroRight ℕSemiring (s *N 1) | multiplicationNIsCommutative s 1 | Semiring.sumZeroRight ℕSemiring s = refl twoAsFact : factorisationNonunit 2 2 factorisationNonunit.1<a twoAsFact = succPreservesInequality (succIsPositive 0) factorisationNonunit.firstFactor twoAsFact = 2 factorisationNonunit.firstFactorNontrivial twoAsFact = succPreservesInequality (succIsPositive 0) factorisationNonunit.firstFactorBiggerMin twoAsFact = inr refl factorisationNonunit.firstFactorDivision twoAsFact = record { quot = 1 ; rem = 0 ; remIsSmall = zeroIsValidRem 2 ; pr = refl ; quotSmall = inl (le 1 refl) } factorisationNonunit.firstFactorDivides twoAsFact = refl factorisationNonunit.firstFactorPrime twoAsFact = twoIsPrime factorisationNonunit.otherFactorsNumber twoAsFact = 0 factorisationNonunit.otherFactors twoAsFact = inl record { fst = refl ; snd = refl } fourFact : factorisationNonunit 1 4 factorisationNonunit.1<a fourFact = succPreservesInequality (succIsPositive 2) factorisationNonunit.firstFactor fourFact = 2 factorisationNonunit.firstFactorNontrivial fourFact = succPreservesInequality (succIsPositive 0) factorisationNonunit.firstFactorBiggerMin fourFact = inl (succPreservesInequality (succIsPositive 0)) factorisationNonunit.firstFactorDivision fourFact = record { quot = 2 ; rem = 0 ; remIsSmall = zeroIsValidRem 2 ; pr = refl ; quotSmall = inl (le 1 refl) } factorisationNonunit.firstFactorDivides fourFact = refl factorisationNonunit.firstFactorPrime fourFact = twoIsPrime factorisationNonunit.otherFactorsNumber fourFact = 1 factorisationNonunit.otherFactors fourFact = inr record { fst = succPreservesInequality (succIsPositive 0) ; snd = twoAsFact } lessLemma : {y : ℕ} → (1 <N y) → (zero <N y) lessLemma {.(succ (x +N 1))} (le x refl) = succIsPositive (x +N 1) canReduceFactorBound : {a i j : ℕ} → factorisationNonunit i a → j <N i → factorisationNonunit j a canReduceFactorBound {a} {i} {j} record { 1<a = 1<a ; firstFactor = firstFactor ; firstFactorNontrivial = firstFactorNontrivial ; firstFactorBiggerMin = inl ff<i ; firstFactorDivision = firstFactorDivision ; firstFactorDivides = firstFactorDivides ; firstFactorPrime = firstFactorPrime ; otherFactors = otherFactors } j<i = record { 1<a = 1<a ; firstFactor = firstFactor ; firstFactorNontrivial = firstFactorNontrivial ; firstFactorBiggerMin = inl (lessTransitive j<i ff<i) ; firstFactorDivision = firstFactorDivision ; firstFactorDivides = firstFactorDivides ; firstFactorPrime = firstFactorPrime ; otherFactors = otherFactors } canReduceFactorBound {a} {i} {j} record { 1<a = 1<a ; firstFactor = firstFactor ; firstFactorNontrivial = firstFactorNontrivial ; firstFactorBiggerMin = inr ff=i ; firstFactorDivision = firstFactorDivision ; firstFactorDivides = firstFactorDivides ; firstFactorPrime = firstFactorPrime ; otherFactors = otherFactors } j<i = record { 1<a = 1<a ; firstFactor = firstFactor ; firstFactorNontrivial = firstFactorNontrivial ; firstFactorBiggerMin = inl (identityOfIndiscernablesRight _<N_ j<i ff=i) ; firstFactorDivision = firstFactorDivision ; firstFactorDivides = firstFactorDivides ; firstFactorPrime = firstFactorPrime ; otherFactors = otherFactors } canReduceFactorBound' : {a i j : ℕ} → factorisationNonunit i a → j ≤N i → factorisationNonunit j a canReduceFactorBound' {a} {i} {j} factA (inl x) = canReduceFactorBound factA x canReduceFactorBound' {a} {i} {.i} factA (inr refl) = factA canIncreaseFactorBound : {a i : ℕ} → (fact : factorisationNonunit 1 a) → (∀ x → 1 <N x → x <N i → x ∣ a → False) → (i ≤N factorisationNonunit.firstFactor fact) → factorisationNonunit i a canIncreaseFactorBound {a} {i} record { 1<a = 1<a ; firstFactor = firstFactor ; firstFactorNontrivial = firstFactorNontrivial ; firstFactorBiggerMin = firstFactorBiggerMin ; firstFactorDivision = firstFactorDivision ; firstFactorDivides = firstFactorDivides ; firstFactorPrime = firstFactorPrime ; otherFactors = otherFactors } noSmaller iSmallEnough = record { 1<a = 1<a ; firstFactor = firstFactor ; firstFactorNontrivial = Prime.p>1 firstFactorPrime ; firstFactorBiggerMin = iSmallEnough ; firstFactorDivision = firstFactorDivision ; firstFactorDivides = firstFactorDivides ; firstFactorPrime = firstFactorPrime ; otherFactors = otherFactors } -- Get the smallest prime factor of the number everyNumberHasAPrimeFactor : {a : ℕ} → (1 <N a) → Sg ℕ (λ i → ((i ∣ a) && (1 <N i)) && ((Prime i) && (∀ x → x <N i → 1 <N x → x ∣ a → False))) everyNumberHasAPrimeFactor {a} 1<a with compositeOrPrime a 1<a everyNumberHasAPrimeFactor {a} 1<a | inl record { n>1 = n>1 ; divisor = divisor ; dividesN = dividesN ; divisorLessN = divisorLessN ; divisorNot1 = divisorNot1 ; divisorPrime = divisorPrime ; noSmallerDivisors = noSmallerDivisors } = ( divisor , record { fst = record { fst = dividesN ; snd = divisorNot1 } ; snd = record { fst = divisorPrime ; snd = noSmallerDivisors } } ) everyNumberHasAPrimeFactor {a} 1<a | inr x = (a , record { fst = record { fst = aDivA a ; snd = 1<a } ; snd = record { fst = x ; snd = λ y y<a 1<y y|a → irreflexive (<WellDefined (equalityCommutative (Prime.pr x y|a y<a (lessLemma 1<y))) refl 1<y) }} ) lemma2 : {a b c : ℕ} → 1 <N a → 0 <N b → a *N b +N 0 ≡ c → b <N c lemma2 {zero} {b} {c} 1<a _ pr = exFalso (zeroNeverGreater 1<a) lemma2 {succ zero} {b} {c} 1<a _ pr = exFalso (lessIrreflexive 1<a) lemma2 {succ (succ a)} {zero} {zero} 1<a t pr = exFalso (lessIrreflexive t) lemma2 {succ (succ a)} {zero} {succ c} 1<a t pr = succIsPositive c lemma2 {succ (succ a)} {succ b} {c} 1<a t pr = le (b +N (a *N succ b)) go where assocLemm : (a b c : ℕ) → (a +N b) +N c ≡ (a +N c) +N b assocLemm a b c rewrite equalityCommutative (Semiring.+Associative ℕSemiring a b c) | Semiring.commutative ℕSemiring b c | Semiring.+Associative ℕSemiring a c b = refl go : succ ((b +N a *N succ b) +N succ b) ≡ c go rewrite Semiring.sumZeroRight ℕSemiring (succ (b +N succ (b +N a *N succ b))) | equalityCommutative (assocLemm b (succ b) (a *N succ b)) | Semiring.+Associative ℕSemiring b (succ b) (a *N succ b) = pr factorIntegerLemma : (x : ℕ) (indHyp : (y : ℕ) (y<x : y <N x) → ((y <N 2) || (factorisationNonunit 1 y))) → ((x <N 2) || (factorisationNonunit 1 x)) factorIntegerLemma zero indHyp = inl (succIsPositive 1) factorIntegerLemma (succ zero) indHyp = inl (succPreservesInequality (succIsPositive 0)) factorIntegerLemma (succ (succ x)) indHyp with everyNumberHasAPrimeFactor {succ (succ x)} (succPreservesInequality (succIsPositive x)) factorIntegerLemma (succ (succ x)) indHyp | a , record { fst = record { fst = divides record {quot = zero ; rem = .0 ; pr = ssxDivA ; remIsSmall = r } refl ; snd = 1<a }; snd = record { fst = primeA ; snd = smallerFactors } } rewrite Semiring.sumZeroRight ℕSemiring (a *N zero) | multiplicationNIsCommutative a 0 = exFalso (naughtE ssxDivA) factorIntegerLemma (succ (succ x)) indHyp | a , record { fst = record { fst = divides record {quot = succ zero ; rem = .0 ; pr = ssxDivA ; remIsSmall = r } refl ; snd = 1<a }; snd = record { fst = primeA ; snd = smallerFactors } } = inr record { 1<a = succPreservesInequality (succIsPositive x) ; firstFactor = a ; firstFactorNontrivial = Prime.p>1 primeA ; firstFactorBiggerMin = inl (Prime.p>1 primeA) ; firstFactorDivision = record { quot = 1 ; rem = 0 ; pr = ssxDivA ; remIsSmall = r ; quotSmall = inl (TotalOrder.<Transitive ℕTotalOrder (le zero refl) 1<a) } ; firstFactorDivides = refl ; firstFactorPrime = record { p>1 = Prime.p>1 primeA ; pr = Prime.pr primeA } ; otherFactors = inl record { fst = refl ; snd = refl } ; otherFactorsNumber = 0 } factorIntegerLemma (succ (succ x)) indHyp | a , record { fst = record { fst = divides record {quot = succ (succ qu) ; rem = .0 ; pr = ssxDivA ; remIsSmall = remSmall } refl ; snd = 1<a }; snd = record { fst = primeA ; snd = smallerFactors } } = inr record { 1<a = succPreservesInequality (succIsPositive x) ; firstFactor = a ; firstFactorNontrivial = Prime.p>1 primeA ; firstFactorBiggerMin = inl (Prime.p>1 primeA) ; firstFactorDivision = record { quot = succ (succ qu) ; rem = 0 ; pr = ssxDivA ; remIsSmall = remSmall ; quotSmall = inl (TotalOrder.<Transitive ℕTotalOrder (le zero refl) 1<a) } ; firstFactorDivides = refl ; firstFactorPrime = record { p>1 = Prime.p>1 primeA ; pr = Prime.pr primeA } ; otherFactors = inr record {fst = succPreservesInequality (succIsPositive qu) ; snd = factNonunit} ; otherFactorsNumber = succ (factorisationNonunit.otherFactorsNumber indHypRes') } where indHypRes : ((succ (succ qu)) <N 2) || factorisationNonunit 1 (succ (succ qu)) indHypRes = indHyp (succ (succ qu)) (lemma2 {a} {succ (succ qu)} {succ (succ x)} 1<a (succIsPositive (succ qu)) ssxDivA) indHypRes' : factorisationNonunit 1 (succ (succ qu)) indHypRes' with indHypRes indHypRes' | inl y = exFalso (zeroNeverGreater (canRemoveSuccFrom<N (canRemoveSuccFrom<N y))) indHypRes' | inr y = y z|ssx : (z : ℕ) → z ∣ succ (succ qu) → z ∣ succ (succ x) z|ssx z z|ssq = (divisibilityTransitive z|ssq (divides (record { quot = a ; rem = 0 ; pr = identityOfIndiscernablesLeft _≡_ ssxDivA (applyEquality (λ t → t +N 0) (multiplicationNIsCommutative a (succ (succ qu)))) ; remIsSmall = zeroIsValidRem (succ (succ qu)) ; quotSmall = inl (succIsPositive _) }) refl)) factNonunit : factorisationNonunit a (succ (succ qu)) factNonunit with totality a (factorisationNonunit.firstFactor indHypRes') factNonunit | inl (inl a<ff) = canIncreaseFactorBound indHypRes' (λ z 1<z z<a z|ssq → smallerFactors z z<a 1<z (z|ssx z z|ssq)) (inl a<ff) factNonunit | inl (inr ff<a) = exFalso (smallerFactors (factorisationNonunit.firstFactor indHypRes') ff<a (factorisationNonunit.firstFactorNontrivial indHypRes') (z|ssx (factorisationNonunit.firstFactor indHypRes') (divides (factorisationNonunit.firstFactorDivision indHypRes') (factorisationNonunit.firstFactorDivides indHypRes')))) factNonunit | inr ff=a = canIncreaseFactorBound indHypRes' (λ z 1<z z<a z|ssq → smallerFactors z z<a 1<z (divisibilityTransitive z|ssq (divides (record { quot = a ; rem = 0 ; pr = identityOfIndiscernablesLeft _≡_ ssxDivA (applyEquality (λ t → t +N 0) (multiplicationNIsCommutative a (succ (succ qu)))) ; remIsSmall = zeroIsValidRem (succ (succ qu)) ; quotSmall = inl (succIsPositive _) }) refl))) (inr ff=a) factorInteger : (a : ℕ) → (1 <N a) → factorisationNonunit 1 a factorInteger a 1<a with (rec <NWellfounded (λ n → (n <N 2) || (factorisationNonunit 1 n))) factorIntegerLemma ... | bl with bl a factorInteger a 1<a | bl | inl x = exFalso (noIntegersBetweenXAndSuccX 1 1<a x) factorInteger a 1<a | bl | inr x = x lessTransLemma : {p i j : ℕ} → p <N i → i ≤N j → p <N j lessTransLemma {p} {i} {j} p<i (inl x) = <Transitive p<i x lessTransLemma {p} {i} {j} p<i (inr x) rewrite x = p<i lemma4' : {quot rem b : ℕ} → (quot +N quot) +N rem ≡ succ b → quot <N succ b lemma4' {zero} {rem} {b} pr = succIsPositive b lemma4' {succ quot} {rem} {b} pr rewrite equalityCommutative (Semiring.+Associative ℕSemiring quot (succ quot) rem) = succPreservesInequality (le (quot +N rem) (succInjective (transitivity (applyEquality succ (Semiring.commutative ℕSemiring _ quot)) pr))) lemma4 : {quot a rem b : ℕ} → (a *N quot +N rem ≡ succ b) → (1 <N a) → (quot <N succ b) lemma4 {quot} {zero} {rem} {b} pr 1<a = exFalso (zeroNeverGreater 1<a) lemma4 {quot} {succ zero} {rem} {b} pr 1<a = exFalso (lessIrreflexive 1<a) lemma4 {quot} {succ (succ zero)} {rem} {b} pr 1<a rewrite Semiring.sumZeroRight ℕSemiring quot = lemma4' pr lemma4 {quot} {succ (succ (succ a))} {rem} {b} pr 1<a = lemma4 {quot} {succ (succ a)} {quot +N rem} {b} p' (succPreservesInequality (succIsPositive a)) where p' : (quot +N (quot +N a *N quot)) +N (quot +N rem) ≡ succ b p' rewrite Semiring.commutative ℕSemiring quot (quot +N (quot +N a *N quot)) | Semiring.+Associative ℕSemiring (quot +N (quot +N a *N quot)) quot rem = pr noSmallerFactors : {a i p : ℕ} → (factorisationNonunit i a) → (Prime p) → (p <N i) → (p ∣ a) → False noSmallerFactors {a} {i} {p} factA pPrime p<i p|a with rec <NWellfounded (λ b → (factorisationNonunit i b) → p ∣ b → False) ... | indHyp = (indHyp prf) a factA p|a where prf : (x : ℕ) (ind : (y : ℕ) (y<x : y <N x) (factY : factorisationNonunit i y) (p|y : p ∣ y) → False) (factX : factorisationNonunit i x) (p|x : p ∣ x) → False prf x ind record { 1<a = 1<a ; firstFactor = firstFactor ; firstFactorNontrivial = firstFactorNontrivial ; firstFactorBiggerMin = firstFactorBiggerMin ; firstFactorDivision = firstFactorDivision ; firstFactorDivides = firstFactorDivides ; firstFactorPrime = firstFactorPrime ; otherFactors = (inl record { fst = quotFirstfact=1 ; snd = otherFactorsNumber }) } p|x = exFalso bad where x=firstFact : firstFactor *N 1 +N 0 ≡ x x=firstFact rewrite equalityCommutative firstFactorDivides | equalityCommutative quotFirstfact=1 = divisionAlgResult.pr firstFactorDivision x=firstFact' : firstFactor ≡ x x=firstFact' = transitivity (equalityCommutative (lemma firstFactor)) x=firstFact p|firstFact : p ∣ firstFactor p|firstFact rewrite x=firstFact' = p|x p=firstFact : p ≡ firstFactor p=firstFact = primeDivPrimeImpliesEqual pPrime firstFactorPrime p|firstFact i<=firstFactor : i ≤N p i<=firstFactor rewrite p=firstFact = firstFactorBiggerMin bad : False bad with i<=firstFactor ... | inl t = TotalOrder.irreflexive ℕTotalOrder (TotalOrder.<Transitive ℕTotalOrder t p<i) ... | inr eq rewrite eq = TotalOrder.irreflexive ℕTotalOrder p<i prf zero ind record { 1<a = 1<a ; firstFactor = firstFactor ; firstFactorNontrivial = firstFactorNontrivial ; firstFactorBiggerMin = firstFactorBiggerMin ; firstFactorDivision = firstFactorDivision ; firstFactorDivides = firstFactorDivides ; firstFactorPrime = firstFactorPrime ; otherFactors = (inr otherFact) } p|x = zeroNeverGreater 1<a prf (succ x) ind record { 1<a = 1<a ; firstFactor = firstFactor ; firstFactorNontrivial = firstFactorNontrivial ; firstFactorBiggerMin = firstFactorBiggerMin ; firstFactorDivision = firstFactorDivision ; firstFactorDivides = firstFactorDivides ; firstFactorPrime = firstFactorPrime ; otherFactors = (inr otherFact) } p|x = ind (divisionAlgResult.quot firstFactorDivision) (lemma4 {divisionAlgResult.quot firstFactorDivision} {firstFactor} {divisionAlgResult.rem firstFactorDivision} {x} (divisionAlgResult.pr (firstFactorDivision)) (primesAreBiggerThanOne firstFactorPrime)) (canReduceFactorBound' (_&&_.snd otherFact) firstFactorBiggerMin) (p|q p|ffOrQ) where succXNotSmaller : succ x <N firstFactor → False succXNotSmaller = divisorIsSmaller {firstFactor} {x} (divides firstFactorDivision firstFactorDivides) succXNotSmaller' : firstFactor ≤N succ x succXNotSmaller' = notSmallerMeansGE succXNotSmaller inter : firstFactor *N (divisionAlgResult.quot firstFactorDivision) +N divisionAlgResult.rem firstFactorDivision ≡ (succ x) inter = divisionAlgResult.pr firstFactorDivision inter' : firstFactor *N (divisionAlgResult.quot firstFactorDivision) +N 0 ≡ (succ x) inter' rewrite equalityCommutative firstFactorDivides = inter inter'' : firstFactor *N (divisionAlgResult.quot firstFactorDivision) ≡ (succ x) inter'' rewrite equalityCommutative (Semiring.sumZeroRight ℕSemiring (firstFactor *N (divisionAlgResult.quot firstFactorDivision))) = inter' p|ff*q : p ∣ firstFactor *N (divisionAlgResult.quot firstFactorDivision) p|ff*q rewrite inter'' = p|x p|ffOrQ : (p ∣ firstFactor) || (p ∣ divisionAlgResult.quot firstFactorDivision) p|ffOrQ = primesArePrime pPrime p|ff*q p|ffIsFalse : (p ∣ firstFactor) → False p|ffIsFalse p|ff = lessIrreflexive (lessTransLemma p<i i<=p) where p=ff : p ≡ firstFactor p=ff = primeDivPrimeImpliesEqual pPrime firstFactorPrime p|ff i<=p : i ≤N p i<=p rewrite p=ff = firstFactorBiggerMin p|q : ((p ∣ firstFactor) || (p ∣ divisionAlgResult.quot firstFactorDivision)) → (p ∣ divisionAlgResult.quot firstFactorDivision) p|q (inl fls) = exFalso (p|ffIsFalse fls) p|q (inr res) = res lemma3 : {a : ℕ} → a ≡ 0 → 1 <N a → False lemma3 {a} a=0 pr rewrite a=0 = zeroNeverGreater pr firstFactorUniqueLemma : {i : ℕ} → (a : ℕ) → (1 <N a) → (f1 : factorisationNonunit i a) → (f2 : factorisationNonunit i a) → (factorisationNonunit.firstFactor f1 <N factorisationNonunit.firstFactor f2) → False firstFactorUniqueLemma {i} a 1<a f1 f2 ff1<ff2 = go where p1 = factorisationNonunit.firstFactor f1 rem1 = divisionAlgResult.quot (factorisationNonunit.firstFactorDivision f1) p2 = factorisationNonunit.firstFactor f2 rem2 = divisionAlgResult.quot (factorisationNonunit.firstFactorDivision f2) p1<p2 : p1 <N p2 p1<p2 = ff1<ff2 a=p2rem2 : a ≡ p2 *N rem2 a=p2rem2 with divisionAlgResult.pr (factorisationNonunit.firstFactorDivision f2) ... | ff rewrite factorisationNonunit.firstFactorDivides f2 | Semiring.sumZeroRight ℕSemiring (factorisationNonunit.firstFactor f2 *N divisionAlgResult.quot (factorisationNonunit.firstFactorDivision f2)) = equalityCommutative ff p1|second : (p1 ∣ p2) || (p1 ∣ rem2) p1|second = primesArePrime {p1} {p2} {rem2} (factorisationNonunit.firstFactorPrime f1) lem where lem : p1 ∣ (p2 *N rem2) lem = identityOfIndiscernablesRight _∣_ (divides (factorisationNonunit.firstFactorDivision f1) (factorisationNonunit.firstFactorDivides f1)) a=p2rem2 p1|second' : ((p1 ∣ p2) || (p1 ∣ rem2)) → ((p1 ≡ p2) || (p1 ∣ rem2)) p1|second' (inl x) = inl (primeDivPrimeImpliesEqual (factorisationNonunit.firstFactorPrime f1) (factorisationNonunit.firstFactorPrime f2) x) p1|second' (inr x) = inr x p1|second'' : (p1 ≡ p2) || (p1 ∣ rem2) p1|second'' = p1|second' p1|second go : False go with p1|second'' go | inl x = irreflexive (<WellDefined x refl ff1<ff2) go | inr x with factorisationNonunit.otherFactors f2 go | inr x | inl record { fst = rem2=1 ; snd = _ } rewrite rem2=1 = exFalso (oneIsNotPrime res) where 1prime' : Prime p1 ≡ Prime 1 1prime' = applyEquality Prime (oneHasNoDivisors x) res : Prime 1 res rewrite equalityCommutative 1prime' = (factorisationNonunit.firstFactorPrime f1) go | inr x | inr p1|rem2 with factorisationNonunit.otherFactors f2 go | inr x | inr p1|rem2 | inl record { fst = rem2=1 ; snd = _ } rewrite rem2=1 = exFalso (oneIsNotPrime res) where 1prime' : Prime p1 ≡ Prime 1 1prime' = applyEquality Prime (oneHasNoDivisors x) res : Prime 1 res rewrite equalityCommutative 1prime' = (factorisationNonunit.firstFactorPrime f1) go | inr x | inr p1|rem2 | inr factorRem2 = noSmallerFactors (_&&_.snd factorRem2) (factorisationNonunit.firstFactorPrime f1) p1<p2 x firstFactorUnique : {i : ℕ} → (a : ℕ) → (1 <N a) → (f1 : factorisationNonunit i a) → (f2 : factorisationNonunit i a) → (factorisationNonunit.firstFactor f1 ≡ factorisationNonunit.firstFactor f2) firstFactorUnique {i} a 1<a f1 f2 with totality (factorisationNonunit.firstFactor f1) (factorisationNonunit.firstFactor f2) firstFactorUnique {i} a 1<a f1 f2 | inl (inl f1<f2) = exFalso (firstFactorUniqueLemma a 1<a f1 f2 f1<f2) firstFactorUnique {i} a 1<a f1 f2 | inl (inr f2<f1) = exFalso (firstFactorUniqueLemma a 1<a f2 f1 f2<f1) firstFactorUnique {i} a 1<a f1 f2 | inr x = x factorListLemma : {i : ℕ} → (a : ℕ) → (1 <N a) → (f1 : factorisationNonunit i a) → (f2 : factorisationNonunit i a) → (divisionAlgResult.quot (factorisationNonunit.firstFactorDivision f2)) ≡ (divisionAlgResult.quot (factorisationNonunit.firstFactorDivision f1)) factorListLemma {i} a 1<a f1 f2 with firstFactorUnique {i} a 1<a f1 f2 ... | firstFactEqual = res where div1 : divisionAlgResult (factorisationNonunit.firstFactor f1) a div1 = factorisationNonunit.firstFactorDivision f1 rem1=0 : divisionAlgResult.rem div1 ≡ 0 rem1=0 = factorisationNonunit.firstFactorDivides f1 pr1 : (factorisationNonunit.firstFactor f1) *N (divisionAlgResult.quot div1) +N 0 ≡ a pr1 rewrite equalityCommutative rem1=0 = divisionAlgResult.pr div1 pr1' : (factorisationNonunit.firstFactor f1) *N (divisionAlgResult.quot div1) ≡ a pr1' rewrite equalityCommutative (Semiring.sumZeroRight ℕSemiring ((factorisationNonunit.firstFactor f1) *N (divisionAlgResult.quot div1))) = pr1 div2 : divisionAlgResult (factorisationNonunit.firstFactor f2) a div2 = factorisationNonunit.firstFactorDivision f2 rem2=0 : divisionAlgResult.rem div2 ≡ 0 rem2=0 = factorisationNonunit.firstFactorDivides f2 pr2 : (factorisationNonunit.firstFactor f2) *N (divisionAlgResult.quot div2) +N 0 ≡ a pr2 rewrite equalityCommutative rem2=0 = divisionAlgResult.pr div2 pr2' : (factorisationNonunit.firstFactor f2) *N (divisionAlgResult.quot div2) ≡ a pr2' rewrite equalityCommutative (Semiring.sumZeroRight ℕSemiring ((factorisationNonunit.firstFactor f2) *N (divisionAlgResult.quot div2))) = pr2 pr : (factorisationNonunit.firstFactor f2) *N (divisionAlgResult.quot div2) ≡ (factorisationNonunit.firstFactor f1) *N (divisionAlgResult.quot div1) pr = transitivity pr2' (equalityCommutative pr1') pr' : (factorisationNonunit.firstFactor f1) *N (divisionAlgResult.quot div2) ≡ (factorisationNonunit.firstFactor f1) *N (divisionAlgResult.quot div1) pr' = identityOfIndiscernablesLeft _≡_ pr (applyEquality (λ t → t *N divisionAlgResult.quot div2) (equalityCommutative firstFactEqual)) positive : zero <N factorisationNonunit.firstFactor f1 positive = lessTransitive (succIsPositive 0) (factorisationNonunit.firstFactorNontrivial f1) res : divisionAlgResult.quot div2 ≡ divisionAlgResult.quot div1 res = productCancelsLeft (factorisationNonunit.firstFactor f1) (divisionAlgResult.quot div2) (divisionAlgResult.quot div1) positive pr' factorListSameLength : {i : ℕ} → (a : ℕ) → (1 <N a) → (f1 : factorisationNonunit i a) → (f2 : factorisationNonunit i a) → (divisionAlgResult.quot (factorisationNonunit.firstFactorDivision f1) ≡ 1) → divisionAlgResult.quot (factorisationNonunit.firstFactorDivision f2) ≡ 1 factorListSameLength {i} a 1<a f1 f2 quot=1 with firstFactorUnique {i} a 1<a f1 f2 ... | firstFactEqual with factorListLemma {i} a 1<a f1 f2 ... | eq = transitivity eq quot=1
{ "alphanum_fraction": 0.7223912074, "avg_line_length": 89.0144404332, "ext": "agda", "hexsha": "7ff4a5d34c9cc161ee000d0f15bd49cabc4e46d9", "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/Primes/IntegerFactorisation.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/Primes/IntegerFactorisation.agda", "max_line_length": 884, "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/Primes/IntegerFactorisation.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": 7911, "size": 24657 }
------------------------------------------------------------------------ -- The Agda standard library -- -- Streams ------------------------------------------------------------------------ module Data.Stream where open import Coinduction open import Data.Colist using (Colist; []; _∷_) open import Data.Vec using (Vec; []; _∷_) open import Data.Nat using (ℕ; zero; suc) open import Relation.Binary open import Relation.Binary.PropositionalEquality as P using (_≡_) ------------------------------------------------------------------------ -- The type infixr 5 _∷_ data Stream (A : Set) : Set where _∷_ : (x : A) (xs : ∞ (Stream A)) → Stream A {-# IMPORT Data.FFI #-} {-# COMPILED_DATA Stream Data.FFI.AgdaStream Data.FFI.Cons #-} ------------------------------------------------------------------------ -- Some operations head : ∀ {A} → Stream A → A head (x ∷ xs) = x tail : ∀ {A} → Stream A → Stream A tail (x ∷ xs) = ♭ xs map : ∀ {A B} → (A → B) → Stream A → Stream B map f (x ∷ xs) = f x ∷ ♯ map f (♭ xs) zipWith : ∀ {A B C} → (A → B → C) → Stream A → Stream B → Stream C zipWith _∙_ (x ∷ xs) (y ∷ ys) = (x ∙ y) ∷ ♯ zipWith _∙_ (♭ xs) (♭ ys) take : ∀ {A} n → Stream A → Vec A n take zero xs = [] take (suc n) (x ∷ xs) = x ∷ take n (♭ xs) drop : ∀ {A} → ℕ → Stream A → Stream A drop zero xs = xs drop (suc n) (x ∷ xs) = drop n (♭ xs) repeat : ∀ {A} → A → Stream A repeat x = x ∷ ♯ repeat x iterate : ∀ {A} → (A → A) → A → Stream A iterate f x = x ∷ ♯ iterate f (f x) -- Interleaves the two streams. infixr 5 _⋎_ _⋎_ : ∀ {A} → Stream A → Stream A → Stream A (x ∷ xs) ⋎ ys = x ∷ ♯ (ys ⋎ ♭ xs) mutual -- Takes every other element from the stream, starting with the -- first one. evens : ∀ {A} → Stream A → Stream A evens (x ∷ xs) = x ∷ ♯ odds (♭ xs) -- Takes every other element from the stream, starting with the -- second one. odds : ∀ {A} → Stream A → Stream A odds (x ∷ xs) = evens (♭ xs) toColist : ∀ {A} → Stream A → Colist A toColist (x ∷ xs) = x ∷ ♯ toColist (♭ xs) lookup : ∀ {A} → ℕ → Stream A → A lookup zero (x ∷ xs) = x lookup (suc n) (x ∷ xs) = lookup n (♭ xs) infixr 5 _++_ _++_ : ∀ {A} → Colist A → Stream A → Stream A [] ++ ys = ys (x ∷ xs) ++ ys = x ∷ ♯ (♭ xs ++ ys) ------------------------------------------------------------------------ -- Equality and other relations -- xs ≈ ys means that xs and ys are equal. infix 4 _≈_ data _≈_ {A} : Stream A → Stream A → Set where _∷_ : ∀ {x y xs ys} (x≡ : x ≡ y) (xs≈ : ∞ (♭ xs ≈ ♭ ys)) → x ∷ xs ≈ y ∷ ys -- x ∈ xs means that x is a member of xs. infix 4 _∈_ data _∈_ {A} : A → Stream A → Set where here : ∀ {x xs} → x ∈ x ∷ xs there : ∀ {x y xs} (x∈xs : x ∈ ♭ xs) → x ∈ y ∷ xs -- xs ⊑ ys means that xs is a prefix of ys. infix 4 _⊑_ data _⊑_ {A} : Colist A → Stream A → Set where [] : ∀ {ys} → [] ⊑ ys _∷_ : ∀ x {xs ys} (p : ∞ (♭ xs ⊑ ♭ ys)) → x ∷ xs ⊑ x ∷ ys ------------------------------------------------------------------------ -- Some proofs setoid : Set → Setoid _ _ setoid A = record { Carrier = Stream A ; _≈_ = _≈_ {A} ; isEquivalence = record { refl = refl ; sym = sym ; trans = trans } } where refl : Reflexive _≈_ refl {_ ∷ _} = P.refl ∷ ♯ refl sym : Symmetric _≈_ sym (x≡ ∷ xs≈) = P.sym x≡ ∷ ♯ sym (♭ xs≈) trans : Transitive _≈_ trans (x≡ ∷ xs≈) (y≡ ∷ ys≈) = P.trans x≡ y≡ ∷ ♯ trans (♭ xs≈) (♭ ys≈) head-cong : ∀ {A} {xs ys : Stream A} → xs ≈ ys → head xs ≡ head ys head-cong (x≡ ∷ _) = x≡ tail-cong : ∀ {A} {xs ys : Stream A} → xs ≈ ys → tail xs ≈ tail ys tail-cong (_ ∷ xs≈) = ♭ xs≈ map-cong : ∀ {A B} (f : A → B) {xs ys} → xs ≈ ys → map f xs ≈ map f ys map-cong f (x≡ ∷ xs≈) = P.cong f x≡ ∷ ♯ map-cong f (♭ xs≈) zipWith-cong : ∀ {A B C} (_∙_ : A → B → C) {xs xs′ ys ys′} → xs ≈ xs′ → ys ≈ ys′ → zipWith _∙_ xs ys ≈ zipWith _∙_ xs′ ys′ zipWith-cong _∙_ (x≡ ∷ xs≈) (y≡ ∷ ys≈) = P.cong₂ _∙_ x≡ y≡ ∷ ♯ zipWith-cong _∙_ (♭ xs≈) (♭ ys≈) infixr 5 _⋎-cong_ _⋎-cong_ : ∀ {A} {xs xs′ ys ys′ : Stream A} → xs ≈ xs′ → ys ≈ ys′ → xs ⋎ ys ≈ xs′ ⋎ ys′ (x ∷ xs≈) ⋎-cong ys≈ = x ∷ ♯ (ys≈ ⋎-cong ♭ xs≈)
{ "alphanum_fraction": 0.4512109099, "avg_line_length": 26.2530864198, "ext": "agda", "hexsha": "bc8dc41dde4b2028d090cc713357827ab8c7df40", "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/Data/Stream.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/Data/Stream.agda", "max_line_length": 72, "max_stars_count": 1, "max_stars_repo_head_hexsha": "9d4c43b1609d3f085636376fdca73093481ab882", "max_stars_repo_licenses": [ "Apache-2.0" ], "max_stars_repo_name": "qwe2/try-agda", "max_stars_repo_path": "agda-stdlib-0.9/src/Data/Stream.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": 1678, "size": 4253 }
{-# OPTIONS --cubical --safe #-} module Cubical.Data.BinNat where open import Cubical.Data.BinNat.BinNat public
{ "alphanum_fraction": 0.7522123894, "avg_line_length": 22.6, "ext": "agda", "hexsha": "45ad2a2b8fb5070d4e6f3ebdfa8cfa1113b4d1fa", "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": "df4ef7edffd1c1deb3d4ff342c7178e9901c44f1", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "limemloh/cubical", "max_forks_repo_path": "Cubical/Data/BinNat.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "df4ef7edffd1c1deb3d4ff342c7178e9901c44f1", "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": "limemloh/cubical", "max_issues_repo_path": "Cubical/Data/BinNat.agda", "max_line_length": 45, "max_stars_count": 1, "max_stars_repo_head_hexsha": "df4ef7edffd1c1deb3d4ff342c7178e9901c44f1", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "limemloh/cubical", "max_stars_repo_path": "Cubical/Data/BinNat.agda", "max_stars_repo_stars_event_max_datetime": "2020-03-23T23:52:11.000Z", "max_stars_repo_stars_event_min_datetime": "2020-03-23T23:52:11.000Z", "num_tokens": 31, "size": 113 }
{-# OPTIONS --without-K --safe #-} open import Categories.Category open import Categories.Functor hiding (id) -- Limit of a Cone over a Functor F : J → C module Categories.Diagram.Limit {o ℓ e} {o′ ℓ′ e′} {C : Category o ℓ e} {J : Category o′ ℓ′ e′} (F : Functor J C) where private module C = Category C module J = Category J open C open HomReasoning open Functor F open import Level open import Data.Product using (proj₂) open import Categories.Category.Construction.Cones F renaming (Cone⇒ to _⇨_) open import Categories.Object.Terminal as T hiding (up-to-iso; transport-by-iso) open import Categories.Morphism.Reasoning C open import Categories.Morphism C open import Categories.Morphism Cones as MC using () renaming (_≅_ to _⇔_) private variable K K′ : Cone A B : J.Obj X Y Z : Obj q : K ⇨ K′ -- A Limit is a Terminal object in the category of Cones -- (This could be unpacked...) record Limit : Set (o ⊔ ℓ ⊔ e ⊔ o′ ⊔ ℓ′ ⊔ e′) where field terminal : Terminal Cones module terminal = Terminal terminal open terminal using () renaming (⊤ to limit) public open Cone limit hiding (apex) renaming (N to apex; ψ to proj; commute to limit-commute) public rep-cone : ∀ K → K ⇨ limit rep-cone K = terminal.! {K} rep : ∀ K → Cone.N K ⇒ apex rep K = arr where open _⇨_ (rep-cone K) unrep : X ⇒ apex → Cone unrep f = record { apex = record { ψ = λ A → proj A ∘ f ; commute = λ g → pullˡ (limit-commute g) } } conify : (f : X ⇒ apex) → unrep f ⇨ limit conify f = record { arr = f ; commute = refl } commute : proj A ∘ rep K ≈ Cone.ψ K A commute {K = K} = _⇨_.commute (rep-cone K) unrep-cone : (K ⇨ limit) → Cone unrep-cone f = unrep (_⇨_.arr f) g-η : ∀ {f : X ⇒ apex} → rep (unrep f) ≈ f g-η {f = f} = terminal.!-unique (conify f) η-cone : Cones [ rep-cone limit ≈ Category.id Cones ] η-cone = terminal.⊤-id (rep-cone limit) η : rep limit ≈ id η = η-cone rep-cone∘ : Cones [ Cones [ rep-cone K ∘ q ] ≈ rep-cone K′ ] rep-cone∘ {K = K} {q = q} = Equiv.sym (terminal.!-unique (Cones [ rep-cone K ∘ q ])) rep∘ : ∀ {q : K′ ⇨ K} → rep K ∘ _⇨_.arr q ≈ rep K′ rep∘ {q = q} = rep-cone∘ {q = q} rep-cone-self-id : Cones [ rep-cone limit ≈ Cones.id ] rep-cone-self-id = terminal.!-unique Cones.id rep-self-id : rep limit ≈ id rep-self-id = rep-cone-self-id open Limit up-to-iso-cone : (L₁ L₂ : Limit) → limit L₁ ⇔ limit L₂ up-to-iso-cone L₁ L₂ = T.up-to-iso Cones (terminal L₁) (terminal L₂) up-to-iso : (L₁ L₂ : Limit) → apex L₁ ≅ apex L₂ up-to-iso L₁ L₂ = iso-cone⇒iso-apex (up-to-iso-cone L₁ L₂) transport-by-iso-cone : (L : Limit) → limit L ⇔ K → Limit transport-by-iso-cone L L⇿K = record { terminal = T.transport-by-iso Cones (terminal L) L⇿K } transport-by-iso : (L : Limit) → apex L ≅ X → Limit transport-by-iso L L≅X = transport-by-iso-cone L (proj₂ p) where p = cone-resp-iso (limit L) L≅X module _ (X : Obj) (apex₁ : Apex X) (apex₂ : Apex X) (L : Limit) where private module apex₁ = Apex apex₁ module apex₂ = Apex apex₂ module L = Limit L K₁ : Cone K₁ = record { apex = apex₁ } module K₁ = Cone K₁ K₂ : Cone K₂ = record { apex = apex₂ } module K₂ = Cone K₂ ψ-≈⇒rep-≈ : (∀ A → apex₁.ψ A ≈ apex₂.ψ A) → L.rep K₁ ≈ L.rep K₂ ψ-≈⇒rep-≈ ∀eq = trans (L.terminal.!-unique K₁⇒limit) identityʳ where K₁⇒K₂ : K₁ ⇨ K₂ K₁⇒K₂ = record { arr = id ; commute = λ {X} → trans identityʳ (sym (∀eq X)) } K₁⇒limit : K₁ ⇨ L.limit K₁⇒limit = Cones [ L.terminal.! ∘ K₁⇒K₂ ]
{ "alphanum_fraction": 0.5961117196, "avg_line_length": 27.4586466165, "ext": "agda", "hexsha": "02c4239a07e2b48f7769d8df3aabe89576bc2273", "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": "58e5ec015781be5413bdf968f7ec4fdae0ab4b21", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "MirceaS/agda-categories", "max_forks_repo_path": "src/Categories/Diagram/Limit.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "58e5ec015781be5413bdf968f7ec4fdae0ab4b21", "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": "MirceaS/agda-categories", "max_issues_repo_path": "src/Categories/Diagram/Limit.agda", "max_line_length": 96, "max_stars_count": null, "max_stars_repo_head_hexsha": "58e5ec015781be5413bdf968f7ec4fdae0ab4b21", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "MirceaS/agda-categories", "max_stars_repo_path": "src/Categories/Diagram/Limit.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 1381, "size": 3652 }
open import Data.Product using ( _,_ ) open import Data.Empty using ( ⊥ ) open import FRP.LTL.ISet.Core using ( ISet ; [_] ; _,_ ) module FRP.LTL.ISet.Empty where F : ISet F = [ (λ i → ⊥) , (λ i j i~j → λ ()) , (λ i j i⊑j → λ ()) ]
{ "alphanum_fraction": 0.5726495726, "avg_line_length": 26, "ext": "agda", "hexsha": "5e97d4bf880da15b20d8163bf62b7ace73964090", "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/ISet/Empty.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/ISet/Empty.agda", "max_line_length": 59, "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/ISet/Empty.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": 88, "size": 234 }
module ReducingConstructorsInWith where data ⊤ : Set where tt : ⊤ module RegExps where data RegExp : Set where _│_ : RegExp -> RegExp -> RegExp open module R = RegExps bypassable : (re : RegExp) -> ⊤ bypassable (re₁ │ re₂) with bypassable re₁ bypassable (re₁ │ re₂) | m = m
{ "alphanum_fraction": 0.6712802768, "avg_line_length": 17, "ext": "agda", "hexsha": "3264f0740419b4da4fb2444f6539c8de1a6efbde", "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/ReducingConstructorsInWith.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/ReducingConstructorsInWith.agda", "max_line_length": 42, "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/ReducingConstructorsInWith.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": 99, "size": 289 }
module MonoidalCat where open import Library hiding (_×_) open import Categories open import Categories.Products open import Functors open import Naturals record Monoidal {l}{m} : Set (lsuc (l ⊔ m)) where field C : Cat {l}{m} open Cat C open Fun open NatI field ⊗ : Fun (C × C) C I : Obj I⊗- : Fun C C I⊗- = functor (\ A -> OMap ⊗ (I , A)) (\ f -> HMap ⊗ (iden , f)) (fid ⊗) (trans (cong (\f -> HMap ⊗ (f , _)) (sym idl)) (fcomp ⊗)) field λ' : NatI I⊗- (IdF C) -⊗I : Fun C C -⊗I = functor (\ A -> OMap ⊗ (A , I)) (\ f -> HMap ⊗ (f , iden)) (fid ⊗) (trans (cong (\f -> HMap ⊗ (_ , f)) (sym idl)) (fcomp ⊗)) field ρ : NatI -⊗I (IdF C) [-⊗-]⊗- : Fun (C × C × C) C [-⊗-]⊗- = functor (λ {(X , Y , Z) → OMap ⊗ (OMap ⊗ (X , Y) , Z)}) (λ {(f , g , h) → HMap ⊗ (HMap ⊗ (f , g) , h)}) (trans (cong (\f -> HMap ⊗ (f , _)) (fid ⊗) ) (fid ⊗)) (trans (cong (\f -> HMap ⊗ (f , _)) (fcomp ⊗)) (fcomp ⊗)) -⊗[-⊗-] : Fun (C × C × C) C -⊗[-⊗-] = functor (λ {(X , Y , Z) → OMap ⊗ (X , OMap ⊗ (Y , Z))}) (λ {(f , g , h) → HMap ⊗ (f , HMap ⊗ (g , h))}) (trans (cong (\f -> HMap ⊗ (_ , f)) (fid ⊗) ) (fid ⊗)) (trans (cong (\f -> HMap ⊗ (_ , f)) (fcomp ⊗)) (fcomp ⊗)) field α : NatI [-⊗-]⊗- -⊗[-⊗-] triangle : ∀{A B} -> comp (HMap ⊗ (iden {A} , (cmp λ' {B}))) (cmp α {A , I , B}) ≅ HMap ⊗ (cmp ρ {A} , iden {B}) square : ∀{A B C D} -> comp (HMap ⊗ (iden {A} , cmp α {B , C , D})) (comp (cmp α {A , OMap ⊗ (B , C) , D}) (HMap ⊗ (cmp α {A , B , C} , iden {D}))) ≅ comp (cmp α {A , B , OMap ⊗ (C , D)}) (cmp α {OMap ⊗ (A , B) , C , D}) record MonoidalFun {a b c d}(M : Monoidal {a}{b})(M' : Monoidal {c}{d}) : Set (a ⊔ b ⊔ c ⊔ d) where open Monoidal open Cat field F : Fun (C M) (C M') open Fun field e : Hom (C M') (I M') (OMap F (I M)) F-⊗'F- : Fun (C M × C M) (C M') F-⊗'F- = functor (\ {(A , B) -> OMap (⊗ M') (OMap F A , OMap F B)}) (\ {(f , g) -> HMap (⊗ M') (HMap F f , HMap F g)}) (trans (cong₂ (\f g -> HMap (⊗ M') (f , g)) (fid F) (fid F)) (fid (⊗ M'))) (trans (cong₂ (\f g -> HMap (⊗ M') (f , g)) (fcomp F) (fcomp F)) (fcomp (⊗ M'))) F[-⊗-] : Fun (C M × C M) (C M') F[-⊗-] = functor (λ { (A , B) → OMap F (OMap (⊗ M) (A , B)) }) ((λ { (f , g) → HMap F (HMap (⊗ M) (f , g)) })) (trans (cong (HMap F) (fid (⊗ M))) (fid F)) (trans (cong (HMap F) (fcomp (⊗ M))) (fcomp F)) field m : NatT F-⊗'F- F[-⊗-] field square1 : ∀{A} -> NatI.cmp (ρ M') {OMap F A} ≅ comp (C M') (HMap F (NatI.cmp (ρ M) {A})) (comp (C M') (NatT.cmp m {A , I M}) (HMap (⊗ M') (iden (C M') {OMap F A} , e))) square2 : ∀{B} -> NatI.cmp (λ' M') {OMap F B} ≅ comp (C M') (HMap F (NatI.cmp (λ' M) {B})) (comp (C M') (NatT.cmp m {I M , B}) (HMap (⊗ M') (e , iden (C M') {OMap F B}))) hexagon : ∀{A B B'} -> comp (C M') (HMap F (NatI.cmp (α M) {A , B , B'})) (comp (C M') (NatT.cmp m {OMap (⊗ M) (A , B) , B'}) (HMap (⊗ M') (NatT.cmp m {A , B} , iden (C M') {OMap F B'}))) ≅ comp (C M') (NatT.cmp m {A , OMap (⊗ M) (B , B')}) (comp (C M') (HMap (⊗ M') (iden (C M') {OMap F A} , NatT.cmp m {B , B'})) (NatI.cmp (α M') {OMap F A , OMap F B , OMap F B'}))
{ "alphanum_fraction": 0.3542635659, "avg_line_length": 32.5210084034, "ext": "agda", "hexsha": "8322fe1ff21d93667e97645cb009f82011b85969", "lang": "Agda", "max_forks_count": 1, "max_forks_repo_forks_event_max_datetime": "2019-11-04T21:33:13.000Z", "max_forks_repo_forks_event_min_datetime": "2019-11-04T21:33:13.000Z", "max_forks_repo_head_hexsha": "74707d3538bf494f4bd30263d2f5515a84733865", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "jmchapman/Relative-Monads", "max_forks_repo_path": "MonoidalCat.agda", "max_issues_count": 3, "max_issues_repo_head_hexsha": "74707d3538bf494f4bd30263d2f5515a84733865", "max_issues_repo_issues_event_max_datetime": "2019-05-29T09:50:26.000Z", "max_issues_repo_issues_event_min_datetime": "2019-01-13T13:12:33.000Z", "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "jmchapman/Relative-Monads", "max_issues_repo_path": "MonoidalCat.agda", "max_line_length": 78, "max_stars_count": 21, "max_stars_repo_head_hexsha": "74707d3538bf494f4bd30263d2f5515a84733865", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "jmchapman/Relative-Monads", "max_stars_repo_path": "MonoidalCat.agda", "max_stars_repo_stars_event_max_datetime": "2021-02-13T18:02:18.000Z", "max_stars_repo_stars_event_min_datetime": "2015-07-30T01:25:12.000Z", "num_tokens": 1624, "size": 3870 }
module stateDependentObjects where open import Size renaming (Size to AgdaSize) open import Agda.Builtin.Equality open import Data.Nat.Base as N hiding (_⊔_) open import Data.Product open import Data.Vec as Vec using (Vec; []; _∷_; head; tail) open import Function open import NativeIO open import Relation.Binary.PropositionalEquality open import interactiveProgramsAgda -- open import SizedIO.Base {- State dependent interfaces, objects -} record Interfaceˢ : Set₁ where field Stateˢ : Set Methodˢ : (s : Stateˢ) → Set Resultˢ : (s : Stateˢ) → (m : Methodˢ s) → Set nextˢ : (s : Stateˢ) → (m : Methodˢ s) → (r : Resultˢ s m) → Stateˢ open Interfaceˢ public {- State-Dependent Objects -} record Objectˢ (I : Interfaceˢ) (s : Stateˢ I) : Set where coinductive field objectMethod : (m : Methodˢ I s) → Σ[ r ∈ Resultˢ I s m ] Objectˢ I (nextˢ I s m r) open Objectˢ public record IOObjectˢ (Iᵢₒ : IOInterface) (I : Interfaceˢ) (s : Stateˢ I) : Set where coinductive field method : (m : Methodˢ I s) → IO Iᵢₒ ∞ (Σ[ r ∈ Resultˢ I s m ] IOObjectˢ Iᵢₒ I (nextˢ I s m r)) {- Example of a Stack -} StackStateˢ : Set StackStateˢ = ℕ data StackMethodˢ (A : Set) : (n : StackStateˢ) → Set where push : ∀ {n} → A → StackMethodˢ A n pop : ∀ {n} → StackMethodˢ A (suc n) StackResultˢ : (A : Set) → (s : StackStateˢ) → StackMethodˢ A s → Set StackResultˢ A _ (push _) = Unit StackResultˢ A _ pop = A stackNextˢ : ∀ A n (m : StackMethodˢ A n) (r : StackResultˢ A n m) → StackStateˢ stackNextˢ A n (push x) r = suc n stackNextˢ A (suc n) pop r = n StackInterfaceˢ : (A : Set) → Interfaceˢ Stateˢ (StackInterfaceˢ A) = StackStateˢ Methodˢ (StackInterfaceˢ A) = StackMethodˢ A Resultˢ (StackInterfaceˢ A) = StackResultˢ A nextˢ (StackInterfaceˢ A) = stackNextˢ A stack : ∀{A}{n : ℕ} (as : Vec A n) → Objectˢ (StackInterfaceˢ A) n objectMethod (stack as) (push a) = _ , stack (a ∷ as) objectMethod (stack (a ∷ as)) pop = a , stack as {- Reasoning about Stateful Objects -} {- Bisimiliarity -} module Bisim (I : Interfaceˢ) (let S = Stateˢ I) (let M = Methodˢ I) (let R = Resultˢ I) (let next = nextˢ I) (let O = Objectˢ I) where data ΣR {A : Set} {B : A → Set} (R : ∀{a} (b b' : B a) → Set) : (p p' : Σ A B) → Set where eqΣ : ∀{a}{b b' : B a} → R b b' → ΣR R (a , b) (a , b') record _≅_ {s : S} (o o' : O s) : Set where coinductive field bisimMethod : (m : M s) → ΣR (_≅_) (objectMethod o m) (objectMethod o' m) open _≅_ public refl≅ : ∀{s} (o : O s) → o ≅ o bisimMethod (refl≅ o) m = let (r , o') = objectMethod o m in eqΣ (refl≅ o') module _ {E : Set} where private I = StackInterfaceˢ E S = Stateˢ I O = Objectˢ I open Bisim I {- Verifying Stack laws -} pop-after-push : ∀{n} {v : Vec E n} {e : E} → let st = stack v (_ , st₁) = objectMethod st (push e) (e₂ , st₂) = objectMethod st₁ pop in (e ≡ e₂) × (st ≅ st₂) pop-after-push = refl , refl≅ _ push-after-pop : ∀{n} {v : Vec E n} {e : E} → let st = stack (e ∷ v) (e₁ , st₁) = objectMethod st pop (_ , st₂) = objectMethod st₁ (push e₁) in st ≅ st₂ push-after-pop = refl≅ _ {- Bisimilarity of different stack implementations -} stackFState = ℕ → E pushStackF : E → stackFState → stackFState pushStackF e f = λ { 0 → e ; (suc m) → f m} popStackFe : stackFState → E popStackFe f = f 0 popStackFf : stackFState → stackFState popStackFf f = f ∘ suc tabulate : ∀ (n : ℕ) → stackFState → Vec E n tabulate 0 f = [] tabulate (suc n) f = popStackFe f ∷ tabulate n (popStackFf f) stackF : ∀ (n : ℕ) (f : ℕ → E) → Objectˢ (StackInterfaceˢ E) n objectMethod (stackF n f) (push e) = _ , stackF (suc n) (pushStackF e f) objectMethod (stackF (suc n) f) pop = popStackFe f , stackF n (popStackFf f) impl-bisim : ∀{n f} v (p : tabulate n f ≡ v) → stackF n f ≅ stack v bisimMethod (impl-bisim v p) (push e) = eqΣ (impl-bisim (e ∷ v) (cong (_∷_ e) p)) bisimMethod (impl-bisim (e ∷ v) p) pop rewrite cong head p = eqΣ (impl-bisim v (cong tail p))
{ "alphanum_fraction": 0.5487012987, "avg_line_length": 28.3435582822, "ext": "agda", "hexsha": "94c8b9e5752cc310f32b14bbc7847e64b785b6d9", "lang": "Agda", "max_forks_count": 2, "max_forks_repo_forks_event_max_datetime": "2022-03-12T11:41:00.000Z", "max_forks_repo_forks_event_min_datetime": "2018-09-01T15:02:37.000Z", "max_forks_repo_head_hexsha": "7cc45e0148a4a508d20ed67e791544c30fecd795", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "agda/ooAgda", "max_forks_repo_path": "presentationsAndExampleCode/agdaImplementorsMeetingGlasgow22April2016AntonSetzer/stateDependentObjects.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "7cc45e0148a4a508d20ed67e791544c30fecd795", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "agda/ooAgda", "max_issues_repo_path": "presentationsAndExampleCode/agdaImplementorsMeetingGlasgow22April2016AntonSetzer/stateDependentObjects.agda", "max_line_length": 83, "max_stars_count": 23, "max_stars_repo_head_hexsha": "7cc45e0148a4a508d20ed67e791544c30fecd795", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "agda/ooAgda", "max_stars_repo_path": "presentationsAndExampleCode/agdaImplementorsMeetingGlasgow22April2016AntonSetzer/stateDependentObjects.agda", "max_stars_repo_stars_event_max_datetime": "2020-10-12T23:15:25.000Z", "max_stars_repo_stars_event_min_datetime": "2016-06-19T12:57:55.000Z", "num_tokens": 1741, "size": 4620 }
{-# OPTIONS --without-K #-} open import Data.Nat.Base using (ℕ) open import Data.Product open import HoTT open import Function.Extensionality open import Algebra.Group open import Algebra.Group.Homomorphism open import Algebra.Group.Isomorphism open import Function using (id; _∘_ ; flip) open import Relation.Binary.PropositionalEquality.NP open import Explore.Core open import Explore.Properties import Explore.Explorable as E open Equivalences module Explore.Group where module FromGroupHomomorphism {ℓ}{A B : Set ℓ}(𝔾+ : Group A)(𝔾* : Group B) (φ : A → B)(φ-hom : GroupHomomorphism 𝔾+ 𝔾* φ) where open Additive-Group 𝔾+ open Multiplicative-Group 𝔾* module LiftGroupHomomorphism {i}{I : Set i} {explore : ∀ {ℓ} → Explore ℓ I} (explore-ind : ∀ {p ℓ} → ExploreInd {ℓ} p explore) (g : I → A) where open GroupHomomorphism φ-hom Σᴵ = explore 0# _+_ Πᴵ = explore 1# _*_ lift-hom : φ (Σᴵ g) ≡ Πᴵ (φ ∘ g) lift-hom = E.FromExploreInd.LiftHom.lift-hom explore-ind _≡_ refl trans 0# _+_ 1# _*_ *= φ g 0-hom-1 hom module FromExplore {ℓx} {X : Set ℓx}(z : X)(_⊕_ : X → X → X) (exploreᴬ : Explore ℓx A) (exploreᴬ= : ExploreExt exploreᴬ) (let [⊕] = exploreᴬ z _⊕_) (O : B → X) (sui : ∀ {k} → [⊕] (O ∘ φ) ≡ [⊕] (O ∘ _*_ k ∘ φ)) where +-stable : ∀ {k} → [⊕] (O ∘ φ) ≡ [⊕] (O ∘ φ ∘ _+_ k) +-stable = Algebra.Group.Homomorphism.Stability.+-stable 𝔾+ 𝔾* φ φ-hom ([⊕] ∘ _∘_ O) (exploreᴬ= _ _ ∘ _∘_ (ap O)) sui module FromGroupIsomorphism {ℓa}{ℓb}{A : Set ℓa}{B : Set ℓb}(𝔾+ : Group A)(𝔾* : Group B) (φ : A → B)(φ-iso : GroupIsomorphism 𝔾+ 𝔾* φ) where open GroupIsomorphism φ-iso open Additive-Group 𝔾+ open Multiplicative-Group 𝔾* module FromBigOp {ℓx}{X : Set ℓx}(F : BigOp X A) (F= : ∀ {g₀ g₁ : A → X} → g₀ ≗ g₁ → F g₀ ≡ F g₁) (O : B → X) (sui : ∀ {k} → F (O ∘ φ) ≡ F (O ∘ φ ∘ _+_ k)) where _≈_ : (g₀ g₁ : B → B) → Set ℓx g₀ ≈ g₁ = F (O ∘ g₀ ∘ φ) ≡ F (O ∘ g₁ ∘ φ) -- The core of the proof is there: open Algebra.Group.Isomorphism.Stability 𝔾+ 𝔾* φ φ-iso id≈k* : ∀ {k} → id ≈ _*_ k id≈k* = *-stable (F ∘ _∘_ O) (F= ∘ _∘_ (ap O)) sui k₀*≈k₁* : ∀ {k₀ k₁} → _*_ k₀ ≈ _*_ k₁ k₀*≈k₁* = ! id≈k* ∙ id≈k* module FromExplore {ℓx}{X : Set ℓx}(z : X)(_⊕_ : X → X → X) (exploreᴬ : Explore ℓx A) (exploreᴬ= : ExploreExt exploreᴬ) = FromBigOp (exploreᴬ z _⊕_) (exploreᴬ= z _⊕_) module FromAdequate-sum {ℓb}{A : Set}{B : Set ℓb}(𝔾+ : Group A)(𝔾* : Group B) (φ : A → B)(φ-iso : GroupIsomorphism 𝔾+ 𝔾* φ) {sum : Sum A} (open Adequacy _≡_) (sum-adq : Adequate-sum sum) {{_ : UA}}{{_ : FunExt}} (open E.FromAdequate-sum sum-adq) (O : B → ℕ) (open Additive-Group 𝔾+) (open FromGroupIsomorphism 𝔾+ 𝔾* φ φ-iso) = FromBigOp sum sum-ext O (! (sumStableUnder (_ , +-is-equiv) (O ∘ φ))) -- -} -- -} -- -} -- -}
{ "alphanum_fraction": 0.5746967071, "avg_line_length": 26.9626168224, "ext": "agda", "hexsha": "be92544f5bb2c083bf1e8936e338d8e3772ea901", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "16bc8333503ff9c00d47d56f4ec6113b9269a43e", "max_forks_repo_licenses": [ "BSD-3-Clause" ], "max_forks_repo_name": "crypto-agda/explore", "max_forks_repo_path": "lib/Explore/Group.agda", "max_issues_count": 1, "max_issues_repo_head_hexsha": "16bc8333503ff9c00d47d56f4ec6113b9269a43e", "max_issues_repo_issues_event_max_datetime": "2019-03-16T14:24:04.000Z", "max_issues_repo_issues_event_min_datetime": "2019-03-16T14:24:04.000Z", "max_issues_repo_licenses": [ "BSD-3-Clause" ], "max_issues_repo_name": "crypto-agda/explore", "max_issues_repo_path": "lib/Explore/Group.agda", "max_line_length": 106, "max_stars_count": 2, "max_stars_repo_head_hexsha": "16bc8333503ff9c00d47d56f4ec6113b9269a43e", "max_stars_repo_licenses": [ "BSD-3-Clause" ], "max_stars_repo_name": "crypto-agda/explore", "max_stars_repo_path": "lib/Explore/Group.agda", "max_stars_repo_stars_event_max_datetime": "2017-06-28T19:19:29.000Z", "max_stars_repo_stars_event_min_datetime": "2016-06-05T09:25:32.000Z", "num_tokens": 1287, "size": 2885 }
------------------------------------------------------------------------ -- The Agda standard library -- -- The universe polymorphic unit type and the total relation on unit ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Unit.Polymorphic where ------------------------------------------------------------------------ -- Re-export contents of Base module open import Data.Unit.Polymorphic.Base public ------------------------------------------------------------------------ -- Re-export query operations open import Data.Unit.Polymorphic.Properties public using (_≟_)
{ "alphanum_fraction": 0.4148606811, "avg_line_length": 32.3, "ext": "agda", "hexsha": "ba4f21ae0db39bb20be01628a2bfbdffab5d3e78", "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/Unit/Polymorphic.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/Unit/Polymorphic.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/Unit/Polymorphic.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": 87, "size": 646 }
open import Relation.Binary using (Decidable; DecSetoid) open import Level module CP.Session2 {a} (ChanSetoid : DecSetoid zero a) (Type : Set) where Chan : Set Chan = DecSetoid.Carrier ChanSetoid _≟Chan_ = DecSetoid._≟_ ChanSetoid _≈Chan_ = DecSetoid._≈_ ChanSetoid _≉Chan_ = DecSetoid._≉_ ChanSetoid infixl 5 _,_∶_ data Session : Set a where _,_∶_ : Session → Chan → Type → Session _++_ : Session → Session → Session ∅ : Session -- open import Data.Bool hiding (_≟_) -- open import Data.Empty -- open import Data.Unit open import Relation.Nullary open import Relation.Nullary.Decidable -- open import Relation.Binary.PropositionalEquality infix 4 _∋_ data _∋_ : (Γ : Session) → (x : Chan) → Set a where here : ∀ {Γ x y A} → x ≈Chan y → Γ , y ∶ A ∋ x there : ∀ {Γ x y A} → Γ ∋ x → Γ , y ∶ A ∋ x left : ∀ {Γ Δ x} → Γ ∋ x → Γ ++ Δ ∋ x right : ∀ {Γ Δ x} → Δ ∋ x → Γ ++ Δ ∋ x infix 4 _∋?_ _∋?_ : (Γ : Session) → (x : Chan) → Dec (Γ ∋ x) Γ , y ∶ A ∋? x with x ≟Chan y ... | yes x≈y = yes (here x≈y) ... | no ¬x≈y with Γ ∋? x ... | yes Γ∋x = yes (there Γ∋x) ... | no ¬Γ∋x = no (λ where (here x≈y) → ¬x≈y x≈y (there Γ∋x) → ¬Γ∋x Γ∋x) (Γ ++ Δ) ∋? x with Γ ∋? x ... | yes Γ∋x = yes (left Γ∋x) ... | no ¬Γ∋x with Δ ∋? x ... | yes Δ∋x = yes (right Δ∋x) ... | no ¬Δ∋x = no (λ where (left Γ∋x) → ¬Γ∋x Γ∋x (right Δ∋x) → ¬Δ∋x Δ∋x) ∅ ∋? x = no (λ ()) open import Data.Product open import Data.Empty using (⊥-elim) infix 4 _≈_ _≈_ : Session → Session → Set a Γ ≈ Δ = (∀ x → Γ ∋ x → Δ ∋ x) × (∀ x → Δ ∋ x → Γ ∋ x) ∅∌x : ∀ {x} → ¬ ∅ ∋ x ∅∌x () open DecSetoid ChanSetoid hiding (_≈_) ∅-empty : ∀ {Δ x A} → ¬ ∅ ≈ Δ , x ∶ A ∅-empty {Δ} {x} (P , Q) = ∅∌x (Q x (here refl)) <<<<<<< HEAD swap : ∀ {Γ x y A B} → Γ , x ∶ A , y ∶ B ≈ Γ , y ∶ B , x ∶ A swap {Γ} {x} {y} {A} {B} = to , from where to : ∀ v → Γ , x ∶ A , y ∶ B ∋ v → Γ , y ∶ B , x ∶ A ∋ v to v (here P) = there (here P) to v (there (here P)) = here P to v (there (there P)) = there (there P) from : ∀ v → Γ , y ∶ B , x ∶ A ∋ v → Γ , x ∶ A , y ∶ B ∋ v from v (here P) = there (here P) from v (there (here P)) = here P from v (there (there P)) = there (there P) -- contract : ∀ {Γ x y A B} → → Γ , x ∶ A ≈ Γ -- contract -- strengthen : ∀ {Γ x A v} → Γ , x ∶ A ∋ v → x ≉ v → Γ ∋ v -- strengthen (here x≈v) x≉v = ⊥-elim (x≉v (sym x≈v)) -- strengthen (there P) x≉v = P ======= >>>>>>> 40f82fd098a0c30c87ea0056baa48152aefae1f6 lookup : (Γ : Session) (x : Chan) → Dec (∃[ Δ ] ∃[ A ] (Γ ≈ (Δ , x ∶ A))) lookup (Γ , y ∶ A) x with x ≟Chan y ... | yes x≈y = yes (Γ , A , (λ where v (here v≈y) → here (trans v≈y (sym x≈y)) v (there Γ∷y∋v) → there Γ∷y∋v) , λ where v (here v≈x) → here (trans v≈x x≈y) v (there Γ∷x∋v) → there Γ∷x∋v) ... | no ¬x≈y with lookup Γ x ... | yes (Δ , B , Γ≈Δ,x∶B) = yes (Δ , y ∶ A , B , (λ where v (here v≈y) → there (here v≈y) <<<<<<< HEAD v (there Γ∋v) → proj₁ swap v (there (proj₁ Γ≈Δ,x∶B v Γ∋v))) , λ where v (here v≈x) → there (proj₂ Γ≈Δ,x∶B v (here v≈x)) v (there (here v≈y)) → here v≈y v (there (there Δ∋v)) → there (proj₂ Γ≈Δ,x∶B v (there Δ∋v))) ... | no ¬P = no (λ (Δ , B , Q) → ¬P (Δ , B , {! !})) -- (λ where v P → proj₁ Q v (there P)) -- , (λ where v P → {! proj₂ Q v P !}))) ======= v (there Γ∋v) → {! !}) , {! !}) ... | no P = {! !} >>>>>>> 40f82fd098a0c30c87ea0056baa48152aefae1f6 lookup (Γ ++ Δ) x = {! !} lookup ∅ x = no (λ where (Δ , A , P) → ∅-empty P) -- ... | yes x≈y = yes (Γ , A , λ v → (λ where (here v≈y) → here (trans v≈y (sym x≈y)) -- (there Γ∋v) → there Γ∋v) -- (λ v≈x → v≉y (trans v≈x x≈y)) -- , λ where (here v≈x) → here (trans v≈x x≈y) -- (there Γ∋v) → there Γ∋v) -- (λ v≈y → v≉x (trans v≈y (sym x≈y))) -- ... | no ¬x≈y with lookup Γ x -- ... | yes (Δ , B , Γ≈Δ,x∶B) = yes (Δ , y ∶ A , B , λ v → (λ where (here v≈y) → there (here v≈y) -- (λ v≈x → ¬x≈y (trans (sym v≈x) v≈y)) -- (there Γ∋v) → lemma-1 (proj₁ (Γ≈Δ,x∶B v) Γ∋v)) -- , λ where (here v≈x) → there (proj₂ (Γ≈Δ,x∶B v) (here v≈x)) -- (λ v≈y → ¬x≈y (trans (sym v≈x) v≈y)) -- (there Δ,y∶A∋y) → ,-weakening y A (proj₂ (Γ≈Δ,x∶B v)) (lemma-1 Δ,y∶A∋y)) -- where -- lemma-1 : ∀ {Γ x y z A B} → Γ , x ∶ A ∋ z → Γ , y ∶ B , x ∶ A ∋ z -- lemma-1 (here z≈x) = here z≈x -- lemma-1 (there Γ∋z) = there (there Γ∋z) -- ,-weakening : ∀ {Γ Δ v} x A → (Γ ∋ v → Δ ∋ v) → (Γ , x ∶ A ∋ v → Δ , x ∶ A ∋ v) -- ,-weakening x A f (here v≈x) = here v≈x -- ,-weakening x A f (there Γ∋v) = there (f Γ∋v) -- ... | no ¬P = no λ Q → {! !} -- -- GOAL : Γ , y ∶ A ≉ CTX , x ∶ TYPE -- -- ¬P Γ ≉ CTX , x : TYPE -- -- no (λ (Δ , B , Q) → ¬P (Δ , B , {! Q !})) -- -- λ v → (λ Γ∋v → proj₁ (Q v) (there Γ∋v)) -- -- , (λ Δ,x∶B∋v → {! proj₂ (Q v) Δ,x∶B∋v !}))) -- -- → (λ Γ∋v → proj₁ (Q v) (there Γ∋v)) -- -- , λ Δ,x∶B∋v → {! (proj₂ (Q v) Δ,x∶B∋v) !})) -- -- where -- -- (here P) → strengthen (proj₂ (Q v) (here P)) (λ y≈v → ¬x≈y (sym (trans y≈v P))) -- -- (there P) → {! !})) -- where -- -- GOAL : Δ , x ∶ B → Γ -- -- Q v : Δ , x ∶ B <≈> Γ , y ∶ A -- -- -- ¬P Δ A = Γ <=> Δ , x ∶ A -- -- (x₁ : Carrier) → -- -- Σ (Γ ∋ x₁ → Δ₁ , x ∶ A₁ ∋ x₁) (λ x₂ → Δ₁ , x ∶ A₁ ∋ x₁ → Γ ∋ x₁))) -- strengthen : ∀ {Γ x A v} → Γ , x ∶ A ∋ v → x ≉ v → Γ ∋ v -- strengthen (here x≈v) x≉v = ⊥-elim (x≉v (sym x≈v)) -- strengthen (there P) x≉v = P -- temp : ∀ Δ B v → (Δ ∋ v) → (f : Δ , x ∶ B ∋ v → Γ , y ∶ A ∋ v) → Γ ∋ v -- temp Δ B v Δ∋v f with v ≟Chan x -- ... | yes v≈x = strengthen (f (here v≈x)) (λ y≈v → ¬x≈y (sym (trans y≈v v≈x))) -- ... | no ¬v≈x with y ≟Chan v -- ... | yes y≈v = {! !} -- ... | no ¬y≈v = strengthen (f (there Δ∋v)) ¬y≈v -- -- strengthen (f (there Δ∈v)) λ y≈v → {! !} -- -- lemma : G -- lookup (Γ ++ Δ) x = {! !} -- lookup ∅ x = no (λ where (Δ , A , P) → ∅-empty P) -- -- _≈?_ : (Γ Δ : Session) → Dec (Γ ≈ Δ) -- -- Γ ≈? Δ = {! !} -- -- empty : ∀ {Γ x A} → ¬ (∅ ≈ (Γ , x ∶ A)) -- -- empty {Γ} {x} {A} P with x ≟ x -- -- ... | no ¬p = {! !} -- -- ... | yes p = {! !} -- -- lookup : (Γ : Session) (x : Chan) → Dec (∃[ Δ ] ∃[ A ] (Γ ≈ (Δ , x ∶ A))) -- -- lookup (Γ , y ∶ A) x = {! !} -- -- lookup (Γ ++ Δ) x with lookup Γ x -- -- ... | yes p = {! !} -- -- ... | no ¬p = {! !} -- -- lookup ∅ x = no (λ where (Γ , A , P) → {! P x !})
{ "alphanum_fraction": 0.3733705773, "avg_line_length": 39.7777777778, "ext": "agda", "hexsha": "c5262ec7cd33f3941acd848db7f1410d80aff130", "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": "0c9a6e79c23192b28ddb07315b200a94ee900ca6", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "banacorn/bidirectional", "max_forks_repo_path": "CP/Session2.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "0c9a6e79c23192b28ddb07315b200a94ee900ca6", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "banacorn/bidirectional", "max_issues_repo_path": "CP/Session2.agda", "max_line_length": 158, "max_stars_count": 2, "max_stars_repo_head_hexsha": "0c9a6e79c23192b28ddb07315b200a94ee900ca6", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "banacorn/bidirectional", "max_stars_repo_path": "CP/Session2.agda", "max_stars_repo_stars_event_max_datetime": "2020-08-25T14:05:01.000Z", "max_stars_repo_stars_event_min_datetime": "2020-08-25T07:34:40.000Z", "num_tokens": 3176, "size": 7518 }
{-# OPTIONS --safe --without-K #-} open import Relation.Binary.PropositionalEquality using (_≡_; refl; cong; sym) open import Relation.Nullary using (Dec; yes; no) open import Relation.Nullary.Decidable using (fromWitness; toWitness) open import Function using (_∘_) open import Data.Empty using (⊥-elim) import Data.Fin as Fin import Data.Unit as Unit import Data.Product as Product import Data.Vec as Vec import Data.Vec.Relation.Unary.All as All import Data.Nat as ℕ open Fin using (Fin; zero; suc) open Unit using (⊤; tt) open ℕ using (ℕ) open Product using (Σ-syntax; ∃-syntax; _,_; _×_; proj₁; proj₂) open Vec using (Vec; []; _∷_) open All using (All; []; _∷_) module PiCalculus.LinearTypeSystem.Algebras where private variable n : ℕ infixr 100 _² _² : ∀ {a} → Set a → Set a A ² = A × A record Algebra (Q : Set) : Set₁ where field 0∙ 1∙ : Q _≔_∙_ : Q → Q → Q → Set -- Given two operands, we can decide whether a third one exists ∙-computeʳ : ∀ x y → Dec (∃[ z ] (x ≔ y ∙ z)) -- If a third operand exists, it must be unique ∙-unique : ∀ {x x' y z} → x' ≔ y ∙ z → x ≔ y ∙ z → x' ≡ x ∙-uniqueˡ : ∀ {x y y' z} → x ≔ y' ∙ z → x ≔ y ∙ z → y' ≡ y -- 0 is the minimum 0∙-minˡ : ∀ {y z} → 0∙ ≔ y ∙ z → y ≡ 0∙ -- Neutral element, commutativity, associativity ∙-idˡ : ∀ {x} → x ≔ 0∙ ∙ x ∙-comm : ∀ {x y z} → x ≔ y ∙ z → x ≔ z ∙ y -- no need for right rules ∙-assoc : ∀ {x y z u v} → x ≔ y ∙ z → y ≔ u ∙ v → ∃[ w ] (x ≔ u ∙ w × w ≔ v ∙ z) ℓ∅ : Q ² ℓ∅ = 0∙ , 0∙ ℓᵢ : Q ² ℓᵢ = 1∙ , 0∙ ℓₒ : Q ² ℓₒ = 0∙ , 1∙ ℓ# : Q ² ℓ# = 1∙ , 1∙ _≔_∙²_ : Q ² → Q ² → Q ² → Set (lx , rx) ≔ (ly , ry) ∙² (lz , rz) = (lx ≔ ly ∙ lz) × (rx ≔ ry ∙ rz) ∙-idʳ : ∀ {x} → x ≔ x ∙ 0∙ ∙-idʳ = ∙-comm ∙-idˡ ∙-assoc⁻¹ : ∀ {x y z u v} → x ≔ y ∙ z → z ≔ u ∙ v → ∃[ ; ] (x ≔ ; ∙ v × ; ≔ y ∙ u) ∙-assoc⁻¹ a b = let _ , a' , b' = ∙-assoc (∙-comm a) (∙-comm b) in _ , ∙-comm a' , ∙-comm b' ∙-mut-cancel : ∀ {x y y' z} → x ≔ y ∙ z → z ≔ y' ∙ x → x ≡ z ∙-mut-cancel x≔y∙z z≔y'∙x with ∙-assoc⁻¹ x≔y∙z z≔y'∙x ∙-mut-cancel x≔y∙z z≔y'∙x | e , x≔e∙x , e≔y∙y' rewrite ∙-uniqueˡ x≔e∙x ∙-idˡ | 0∙-minˡ e≔y∙y' = ∙-unique x≔y∙z ∙-idˡ ∙²-computeʳ : ∀ x y → Dec (∃[ z ] (x ≔ y ∙² z)) ∙²-computeʳ (lx , rx) (ly , ry) with ∙-computeʳ lx ly | ∙-computeʳ rx ry ∙²-computeʳ (lx , rx) (ly , ry) | yes (_ , p) | yes (_ , q) = yes (_ , p , q) ∙²-computeʳ (lx , rx) (ly , ry) | yes p | no ¬q = no λ {(_ , _ , r) → ¬q (_ , r)} ∙²-computeʳ (lx , rx) (ly , ry) | no ¬p | _ = no λ {(_ , l , _) → ¬p (_ , l)} ∙²-unique : ∀ {x x' y z} → x' ≔ y ∙² z → x ≔ y ∙² z → x' ≡ x ∙²-unique {x = _ , _} {x' = _ , _} (ll , rl) (lr , rr) rewrite ∙-unique ll lr | ∙-unique rl rr = refl ∙²-uniqueˡ : ∀ {x y y' z} → x ≔ y' ∙² z → x ≔ y ∙² z → y' ≡ y ∙²-uniqueˡ {y = _ , _} {y' = _ , _} (ll , lr) (rl , rr) rewrite ∙-uniqueˡ ll rl | ∙-uniqueˡ lr rr = refl ∙²-idˡ : ∀ {x} → x ≔ (0∙ , 0∙) ∙² x ∙²-idˡ = ∙-idˡ , ∙-idˡ ∙²-comm : ∀ {x y z} → x ≔ y ∙² z → x ≔ z ∙² y ∙²-comm (lx , rx) = ∙-comm lx , ∙-comm rx ∙²-idʳ : ∀ {x} → x ≔ x ∙² (0∙ , 0∙) ∙²-idʳ = ∙²-comm ∙²-idˡ ∙²-assoc : ∀ {x y z u v} → x ≔ y ∙² z → y ≔ u ∙² v → ∃[ w ] (x ≔ u ∙² w × w ≔ v ∙² z) ∙²-assoc (lx , rx) (ly , ry) with ∙-assoc lx ly | ∙-assoc rx ry ∙²-assoc (lx , rx) (ly , ry) | _ , ll , rl | _ , lr , rr = _ , ((ll , lr) , (rl , rr)) ∙²-assoc⁻¹ : ∀ {x y z u v} → x ≔ y ∙² z → z ≔ u ∙² v → ∃[ ; ] (x ≔ ; ∙² v × ; ≔ y ∙² u) ∙²-assoc⁻¹ a b = let _ , a' , b' = ∙²-assoc (∙²-comm a) (∙²-comm b) in _ , ∙²-comm a' , ∙²-comm b' ∙²-mut-cancel : ∀ {x y y' z} → x ≔ y ∙² z → z ≔ y' ∙² x → x ≡ z ∙²-mut-cancel {_ , _} (lx , rx) (ly , ry) rewrite ∙-mut-cancel lx ly | ∙-mut-cancel rx ry = refl record Algebras : Set₁ where field Idx : Set ∃Idx : Idx Usage : Idx → Set UsageAlgebra : ∀ idx → Algebra (Usage idx) infixl 40 _-,_ pattern _-,_ xs x = _∷_ x xs module _ {idx : Idx} where open Algebra (UsageAlgebra idx) public
{ "alphanum_fraction": 0.4760156632, "avg_line_length": 32.4285714286, "ext": "agda", "hexsha": "114ef7506122692682fd743b314f1ba51fca84bc", "lang": "Agda", "max_forks_count": 3, "max_forks_repo_forks_event_max_datetime": "2022-03-14T16:24:07.000Z", "max_forks_repo_forks_event_min_datetime": "2021-01-25T13:57:13.000Z", "max_forks_repo_head_hexsha": "0fc3cf6bcc0cd07d4511dbe98149ac44e6a38b1a", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "guilhermehas/typing-linear-pi", "max_forks_repo_path": "src/PiCalculus/LinearTypeSystem/Algebras.agda", "max_issues_count": 1, "max_issues_repo_head_hexsha": "0fc3cf6bcc0cd07d4511dbe98149ac44e6a38b1a", "max_issues_repo_issues_event_max_datetime": "2022-03-15T09:16:14.000Z", "max_issues_repo_issues_event_min_datetime": "2022-03-15T09:16:14.000Z", "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "guilhermehas/typing-linear-pi", "max_issues_repo_path": "src/PiCalculus/LinearTypeSystem/Algebras.agda", "max_line_length": 118, "max_stars_count": 26, "max_stars_repo_head_hexsha": "0fc3cf6bcc0cd07d4511dbe98149ac44e6a38b1a", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "guilhermehas/typing-linear-pi", "max_stars_repo_path": "src/PiCalculus/LinearTypeSystem/Algebras.agda", "max_stars_repo_stars_event_max_datetime": "2022-03-14T15:18:23.000Z", "max_stars_repo_stars_event_min_datetime": "2020-05-02T23:32:11.000Z", "num_tokens": 2063, "size": 4086 }
------------------------------------------------------------------------ -- The Agda standard library -- -- Conversion of _≤_ to _<_ ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Relation.Binary module Relation.Binary.Construct.NonStrictToStrict {a ℓ₁ ℓ₂} {A : Set a} (_≈_ : Rel A ℓ₁) (_≤_ : Rel A ℓ₂) where open import Data.Product using (_×_; _,_; proj₁; proj₂) open import Data.Sum using (inj₁; inj₂) open import Function using (_∘_; flip) open import Relation.Nullary using (¬_; yes; no) ------------------------------------------------------------------------ -- _≤_ can be turned into _<_ as follows: _<_ : Rel A _ x < y = (x ≤ y) × ¬ (x ≈ y) ------------------------------------------------------------------------ -- The converted relations have certain properties -- (if the original relations have certain other properties) <⇒≤ : _<_ ⇒ _≤_ <⇒≤ = proj₁ <-irrefl : Irreflexive _≈_ _<_ <-irrefl x≈y (_ , x≉y) = x≉y x≈y <-trans : IsPartialOrder _≈_ _≤_ → Transitive _<_ <-trans po (x≤y , x≉y) (y≤z , y≉z) = (trans x≤y y≤z , x≉y ∘ antisym x≤y ∘ trans y≤z ∘ reflexive ∘ Eq.sym) where open IsPartialOrder po <-≤-trans : Symmetric _≈_ → Transitive _≤_ → Antisymmetric _≈_ _≤_ → _≤_ Respectsʳ _≈_ → Trans _<_ _≤_ _<_ <-≤-trans sym trans antisym respʳ (x≤y , x≉y) y≤z = trans x≤y y≤z , (λ x≈z → x≉y (antisym x≤y (respʳ (sym x≈z) y≤z))) ≤-<-trans : Transitive _≤_ → Antisymmetric _≈_ _≤_ → _≤_ Respectsˡ _≈_ → Trans _≤_ _<_ _<_ ≤-<-trans trans antisym respʳ x≤y (y≤z , y≉z) = trans x≤y y≤z , (λ x≈z → y≉z (antisym y≤z (respʳ x≈z x≤y))) <-asym : Antisymmetric _≈_ _≤_ → Asymmetric _<_ <-asym antisym (x≤y , x≉y) (y≤x , _) = x≉y (antisym x≤y y≤x) <-respˡ-≈ : Transitive _≈_ → _≤_ Respectsˡ _≈_ → _<_ Respectsˡ _≈_ <-respˡ-≈ trans respˡ y≈z (y≤x , y≉x) = (respˡ y≈z y≤x) , (λ z≈x → y≉x (trans y≈z z≈x)) <-respʳ-≈ : Symmetric _≈_ → Transitive _≈_ → _≤_ Respectsʳ _≈_ → _<_ Respectsʳ _≈_ <-respʳ-≈ sym trans respʳ {x} {y} {z} y≈z (x≤y , x≉y) = (respʳ y≈z x≤y) , λ x≈z → x≉y (trans x≈z (sym y≈z)) <-resp-≈ : IsEquivalence _≈_ → _≤_ Respects₂ _≈_ → _<_ Respects₂ _≈_ <-resp-≈ eq (respʳ , respˡ) = <-respʳ-≈ sym trans respʳ , <-respˡ-≈ trans respˡ where open IsEquivalence eq <-trichotomous : Symmetric _≈_ → Decidable _≈_ → Antisymmetric _≈_ _≤_ → Total _≤_ → Trichotomous _≈_ _<_ <-trichotomous ≈-sym _≟_ antisym total x y with x ≟ y ... | yes x≈y = tri≈ (<-irrefl x≈y) x≈y (<-irrefl (≈-sym x≈y)) ... | no x≉y with total x y ... | inj₁ x≤y = tri< (x≤y , x≉y) x≉y (x≉y ∘ antisym x≤y ∘ proj₁) ... | inj₂ x≥y = tri> (x≉y ∘ flip antisym x≥y ∘ proj₁) x≉y (x≥y , x≉y ∘ ≈-sym) <-decidable : Decidable _≈_ → Decidable _≤_ → Decidable _<_ <-decidable _≟_ _≤?_ x y with x ≟ y | x ≤? y ... | yes x≈y | _ = no (flip proj₂ x≈y) ... | no x≉y | yes x≤y = yes (x≤y , x≉y) ... | no x≉y | no x≰y = no (x≰y ∘ proj₁) <-isStrictPartialOrder : IsPartialOrder _≈_ _≤_ → IsStrictPartialOrder _≈_ _<_ <-isStrictPartialOrder po = record { isEquivalence = isEquivalence ; irrefl = <-irrefl ; trans = <-trans po ; <-resp-≈ = <-resp-≈ isEquivalence ≤-resp-≈ } where open IsPartialOrder po <-isStrictTotalOrder₁ : Decidable _≈_ → IsTotalOrder _≈_ _≤_ → IsStrictTotalOrder _≈_ _<_ <-isStrictTotalOrder₁ ≟ tot = record { isEquivalence = isEquivalence ; trans = <-trans isPartialOrder ; compare = <-trichotomous Eq.sym ≟ antisym total } where open IsTotalOrder tot <-isStrictTotalOrder₂ : IsDecTotalOrder _≈_ _≤_ → IsStrictTotalOrder _≈_ _<_ <-isStrictTotalOrder₂ dtot = <-isStrictTotalOrder₁ _≟_ isTotalOrder where open IsDecTotalOrder dtot ------------------------------------------------------------------------ -- DEPRECATED NAMES ------------------------------------------------------------------------ -- Please use the new names as continuing support for the old names is -- not guaranteed. -- Version 0.16 irrefl = <-irrefl {-# WARNING_ON_USAGE irrefl "Warning: irrefl was deprecated in v0.16. Please use <-irrefl instead." #-} trans = <-trans {-# WARNING_ON_USAGE trans "Warning: trans was deprecated in v0.16. Please use <-trans instead." #-} antisym⟶asym = <-asym {-# WARNING_ON_USAGE antisym⟶asym "Warning: antisym⟶asym was deprecated in v0.16. Please use <-asym instead." #-} decidable = <-decidable {-# WARNING_ON_USAGE decidable "Warning: decidable was deprecated in v0.16. Please use <-decidable instead." #-} trichotomous = <-trichotomous {-# WARNING_ON_USAGE trichotomous "Warning: trichotomous was deprecated in v0.16. Please use <-trichotomous instead." #-} isPartialOrder⟶isStrictPartialOrder = <-isStrictPartialOrder {-# WARNING_ON_USAGE isPartialOrder⟶isStrictPartialOrder "Warning: isPartialOrder⟶isStrictPartialOrder was deprecated in v0.16. Please use <-isStrictPartialOrder instead." #-} isTotalOrder⟶isStrictTotalOrder = <-isStrictTotalOrder₁ {-# WARNING_ON_USAGE isTotalOrder⟶isStrictTotalOrder "Warning: isTotalOrder⟶isStrictTotalOrder was deprecated in v0.16. Please use <-isStrictTotalOrder₁ instead." #-} isDecTotalOrder⟶isStrictTotalOrder = <-isStrictTotalOrder₂ {-# WARNING_ON_USAGE isDecTotalOrder⟶isStrictTotalOrder "Warning: isDecTotalOrder⟶isStrictTotalOrder was deprecated in v0.16. Please use <-isStrictTotalOrder₂ instead." #-}
{ "alphanum_fraction": 0.5896601591, "avg_line_length": 35.9220779221, "ext": "agda", "hexsha": "fb44fa0b638b6549c4403a61b8f1d5778d0cc2d6", "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/NonStrictToStrict.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/NonStrictToStrict.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/NonStrictToStrict.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 2049, "size": 5532 }
-- Andreas 2012-09-27, reported by Fredrik Forsberg {-# OPTIONS --sized-types #-} module Issue701-c where open import Common.Size {- If I understand correctly, unconstrained sizes should be resolved to \infty. If I define -} data U : {i : Size} -> Set where c : {i : Size} -> U {↑ i} data V : {i : Size} -> Set where d : {i : Size} -> U {∞} -> V {↑ i} works-with-explicit-infty : {i : Size} -> V {i} -> V {↑ i} works-with-explicit-infty x = x -- everything is fine. However, if I leave out {\infty}: data V' : {i : Size} -> Set where d : {i : Size} -> U -> V' {↑ i} fails-if-no-infty : {i : Size} -> V' {i} -> V' {↑ i} fails-if-no-infty x = x --.i != ↑ .i of type Size --when checking that the expression x has type V' {- V' is not detected as a sized type anymore which seems to break the promise about unconstrained sizes. Since U is just a non-inductive argument to d, I wouldn't expect it to influence whether V is a sized type or not? -}
{ "alphanum_fraction": 0.612804878, "avg_line_length": 29.8181818182, "ext": "agda", "hexsha": "2e0071bcacc977ad43d71862116b744dd5f7d0ff", "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/Issue701-c.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/Issue701-c.agda", "max_line_length": 79, "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/Issue701-c.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": 314, "size": 984 }
open import Relation.Binary.Core using (Decidable ; _≡_) module Precond (Carrier : Set) (deq : Decidable {A = Carrier} _≡_) where open import Data.Nat using (ℕ) open import Data.Fin using (Fin ; zero ; suc) open import Data.Fin.Properties using (_≟_) open import Data.List using (List ; [] ; _∷_) open import Level using () renaming (zero to ℓ₀) import Category.Monad import Category.Functor open import Data.Maybe using (Maybe ; nothing ; just ; maybe′) open Category.Monad.RawMonad {Level.zero} Data.Maybe.monad using (_>>=_) open Category.Functor.RawFunctor {Level.zero} Data.Maybe.functor using (_<$>_) open import Data.Vec using (Vec ; [] ; _∷_ ; map ; lookup ; toList) open import Data.Vec.Properties using (map-cong ; map-∘ ; tabulate-∘) import Data.List.All open import Data.List.Any using (here ; there) open Data.List.Any.Membership-≡ using (_∉_) open import Data.Maybe using (just) open import Data.Product using (∃ ; _,_ ; proj₁ ; proj₂) open import Function using (flip ; _∘_ ; id) open import Relation.Binary using (Setoid) open import Relation.Binary.PropositionalEquality using (refl ; cong ; inspect ; [_] ; sym ; decSetoid) open Relation.Binary.PropositionalEquality.≡-Reasoning using (begin_ ; _≡⟨_⟩_ ; _∎) open import Relation.Nullary using (yes ; no) open import Structures using (IsFunctor ; module Shaped ; Shaped) open import FinMap using (FinMapMaybe ; lookupM ; union ; fromFunc ; empty ; insert ; lemma-lookupM-empty ; delete-many ; lemma-tabulate-∘ ; delete ; lemma-lookupM-delete ; lemma-lookupM-fromFunc ; reshape ; lemma-reshape-id) import CheckInsert open CheckInsert (decSetoid deq) using (checkInsert ; lemma-checkInsert-new ; lemma-lookupM-checkInsert-other) import BFF import Bidir open Bidir (decSetoid deq) using (_in-domain-of_ ; lemma-assoc-domain) import GetTypes open GetTypes.PartialShapeShape using (Get ; module Get) open BFF.PartialShapeBFF (decSetoid deq) using (assoc ; enumerate ; denumerate ; bff) lemma-maybe-just : {A : Set} → (a : A) → (ma : Maybe A) → maybe′ Maybe.just (just a) ma ≡ Maybe.just (maybe′ id a ma) lemma-maybe-just a (just x) = refl lemma-maybe-just a nothing = refl lemma-union-delete-fromFunc : {m n : ℕ} {A : Set} {is : Vec (Fin n) m} {h : FinMapMaybe n A} {g : Fin n → A} → is in-domain-of h → ∃ λ v → union h (delete-many is (fromFunc g)) ≡ fromFunc v lemma-union-delete-fromFunc {is = []} {h = h} {g = g} p = _ , (lemma-tabulate-∘ (λ f → begin maybe′ just (lookupM f (fromFunc g)) (lookupM f h) ≡⟨ cong (flip (maybe′ just) (lookupM f h)) (lemma-lookupM-fromFunc g f) ⟩ maybe′ just (just (g f)) (lookupM f h) ≡⟨ lemma-maybe-just (g f) (lookupM f h) ⟩ just (maybe′ id (g f) (lookupM f h)) ∎)) lemma-union-delete-fromFunc {n = n} {is = i ∷ is} {h = h} {g = g} (Data.List.All._∷_ (x , px) ps) = _ , (begin union h (delete i (delete-many is (fromFunc g))) ≡⟨ lemma-tabulate-∘ inner ⟩ union h (delete-many is (fromFunc g)) ≡⟨ proj₂ (lemma-union-delete-fromFunc ps) ⟩ _ ∎) where inner : (f : Fin n) → maybe′ just (lookupM f (delete i (delete-many is (fromFunc g)))) (lookup f h) ≡ maybe′ just (lookupM f (delete-many is (fromFunc g))) (lookup f h) inner f with f ≟ i inner .i | yes refl = begin maybe′ just (lookupM i (delete i (delete-many is (fromFunc g)))) (lookup i h) ≡⟨ cong (maybe′ just _) px ⟩ just x ≡⟨ cong (maybe′ just _) (sym px) ⟩ maybe′ just (lookupM i (delete-many is (fromFunc g))) (lookup i h) ∎ inner f | no f≢i = cong (flip (maybe′ just) (lookup f h)) (lemma-lookupM-delete (delete-many is (fromFunc g)) f≢i) module _ (G : Get) where open Get G open Shaped ViewShapeT using () renaming (content to contentV) assoc-enough : {i : I} → (j : I) → (s : SourceContainer Carrier (gl₁ i)) → (v : ViewContainer Carrier (gl₂ j)) → ∃ (λ h → assoc (contentV (get (enumerate SourceShapeT (gl₁ j)))) (contentV v) ≡ just h) → ∃ λ u → bff G j s v ≡ just u assoc-enough {i} j s v (h , p) = _ , cong (_<$>_ ((λ f → fmapS f t) ∘ flip lookupM) ∘ _<$>_ (flip union (reshape g′ (Shaped.arity SourceShapeT (gl₁ j))))) p where g′ = delete-many (contentV (get (enumerate SourceShapeT (gl₁ i)))) (fromFunc (denumerate SourceShapeT s)) t = enumerate SourceShapeT (gl₁ j) module _ (G : Get) where open Get G open Shaped ViewShapeT using () renaming (content to contentV) assoc-enough′ : {i : I} → (s : SourceContainer Carrier (gl₁ i)) → (v : ViewContainer Carrier (gl₂ i)) → ∃ (λ h → assoc (contentV (get (enumerate SourceShapeT (gl₁ i)))) (contentV v) ≡ just h) → ∃ λ u → bff G i s v ≡ just (fmapS just u) assoc-enough′ {i} s v (h , p) = _ , (begin bff G i s v ≡⟨ proj₂ (assoc-enough G i s v (h , p)) ⟩ just (fmapS (flip lookupM (union h (reshape g′ (Shaped.arity SourceShapeT (gl₁ i))))) t) ≡⟨ cong just (begin _ ≡⟨ cong ((λ f → fmapS f t) ∘ flip lookupM ∘ union h) (lemma-reshape-id g′) ⟩ fmapS (flip lookupM (union h g′)) t ≡⟨ cong ((λ f → fmapS f t) ∘ flip lookupM) (proj₂ wp) ⟩ fmapS (flip lookupM (fromFunc (proj₁ wp))) t ≡⟨ IsFunctor.cong (Shaped.isFunctor SourceShapeT (gl₁ i)) (lemma-lookupM-fromFunc (proj₁ wp)) t ⟩ fmapS (Maybe.just ∘ proj₁ wp) t ≡⟨ IsFunctor.composition (Shaped.isFunctor SourceShapeT (gl₁ i)) just (proj₁ wp) t ⟩ fmapS Maybe.just (fmapS (proj₁ wp) t) ∎) ⟩ _ ∎) where s′ = enumerate SourceShapeT (gl₁ i) g = fromFunc (denumerate SourceShapeT s) g′ = delete-many (contentV (get s′)) g t = enumerate SourceShapeT (gl₁ i) wp = lemma-union-delete-fromFunc (lemma-assoc-domain (contentV (get t)) (contentV v) p) data All-different {A : Set} : List A → Set where different-[] : All-different [] different-∷ : {x : A} {xs : List A} → x ∉ xs → All-different xs → All-different (x ∷ xs) lemma-∉-lookupM-assoc : {m n : ℕ} → (i : Fin n) → (is : Vec (Fin n) m) → (xs : Vec Carrier m) → {h : FinMapMaybe n Carrier} → assoc is xs ≡ just h → (i ∉ toList is) → lookupM i h ≡ nothing lemma-∉-lookupM-assoc i [] [] refl i∉is = lemma-lookupM-empty i lemma-∉-lookupM-assoc i (i' ∷ is') (x' ∷ xs') ph i∉is with assoc is' xs' | inspect (assoc is') xs' lemma-∉-lookupM-assoc i (i' ∷ is') (x' ∷ xs') () i∉is | nothing | [ ph' ] lemma-∉-lookupM-assoc i (i' ∷ is') (x' ∷ xs') {h} ph i∉is | just h' | [ ph' ] = begin lookupM i h ≡⟨ lemma-lookupM-checkInsert-other i i' (i∉is ∘ here) x' h' ph ⟩ lookupM i h' ≡⟨ lemma-∉-lookupM-assoc i is' xs' ph' (i∉is ∘ there) ⟩ nothing ∎ different-assoc : {m n : ℕ} → (u : Vec (Fin n) m) → (v : Vec Carrier m) → All-different (toList u) → ∃ λ h → assoc u v ≡ just h different-assoc [] [] p = empty , refl different-assoc (u ∷ us) (v ∷ vs) (different-∷ u∉us diff-us) with different-assoc us vs diff-us different-assoc (u ∷ us) (v ∷ vs) (different-∷ u∉us diff-us) | h , p' = insert u v h , (begin assoc (u ∷ us) (v ∷ vs) ≡⟨ refl ⟩ (assoc us vs >>= checkInsert u v) ≡⟨ cong (flip _>>=_ (checkInsert u v)) p' ⟩ checkInsert u v h ≡⟨ lemma-checkInsert-new u v h (lemma-∉-lookupM-assoc u us vs p' u∉us) ⟩ just (insert u v h) ∎)
{ "alphanum_fraction": 0.627832615, "avg_line_length": 57.544, "ext": "agda", "hexsha": "70f294d3b9058f901ff217cfc4757e9bcaedfd82", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "a5abbd177f032523d1d9d3fa4b9137aefe88dee0", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "jvoigtlaender/bidiragda", "max_forks_repo_path": "Precond.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "a5abbd177f032523d1d9d3fa4b9137aefe88dee0", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "jvoigtlaender/bidiragda", "max_issues_repo_path": "Precond.agda", "max_line_length": 237, "max_stars_count": null, "max_stars_repo_head_hexsha": "a5abbd177f032523d1d9d3fa4b9137aefe88dee0", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "jvoigtlaender/bidiragda", "max_stars_repo_path": "Precond.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 2519, "size": 7193 }
module Data.Real.Properties where open import Data.Real.Base as ℝ open import Data.Real.Order open import Data.Real.Abstract.Structures using (IsOrderedHeytingField; IsArchimedanHeytingField) open import Assume open import Algebra using (IsCommutativeRing; CommutativeRing) open import Algebra.Module using (Module) open import Algebra.Module.Construct.TensorUnit using (⟨module⟩) open import Algebra.Module.Normed using (IsNormedModule; NormedModule) open import Algebra.Apartness using (IsHeytingField; HeytingField) open import Level using (0ℓ) open import Data.Product using (_,_) +-*-isCommutativeRing : IsCommutativeRing _≈_ _+_ _*_ -_ 0.0 1.0 +-*-isCommutativeRing = assume +-*-commutativeRing : CommutativeRing 0ℓ 0ℓ +-*-commutativeRing = record { isCommutativeRing = +-*-isCommutativeRing } +-*-module : Module +-*-commutativeRing 0ℓ 0ℓ +-*-module = ⟨module⟩ +-*-isHeytingField : IsHeytingField _≈_ _≉_ _+_ _*_ -_ 0.0 1.0 +-*-isHeytingField = assume +-*-heytingField : HeytingField 0ℓ 0ℓ 0ℓ +-*-heytingField = record { isHeytingField = +-*-isHeytingField } +-*-isOrderedHeytingField : IsOrderedHeytingField +-*-heytingField _<_ +-*-isOrderedHeytingField = record { isStrictTotalOrder = <-isStrictTotalOrder ; ordered = assume } +-*-isArchimedanHeytingField : IsArchimedanHeytingField +-*-heytingField _<_ +-*-isArchimedanHeytingField = record { dense = λ a b a<b → ((a + b) ÷ 2.0) , assume ; archimedan = λ a b a<0 b<0 → ∣ unsafeM ⌈ b ÷ a ⌉ ∣ , assume } where open import Data.Integer using (∣_∣) open import Data.Maybe unsafeM : ∀ {a} {A : Set a} → Maybe A → A unsafeM (just x) = x unsafeM nothing = assume abs-isNormedModule : IsNormedModule +-*-module _≤_ abs abs-isNormedModule = assume abs-normedModule : NormedModule +-*-commutativeRing _≤_ 0ℓ 0ℓ abs-normedModule = record { isNormedModule = abs-isNormedModule }
{ "alphanum_fraction": 0.7274176408, "avg_line_length": 32.4482758621, "ext": "agda", "hexsha": "313615c0c4915d4a4f774b3bca9232b022c84c86", "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/Data/Real/Properties.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/Data/Real/Properties.agda", "max_line_length": 76, "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/Data/Real/Properties.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 625, "size": 1882 }
module MalformedModuleNameInIMPORT where {-# IMPORT m #-}
{ "alphanum_fraction": 0.7627118644, "avg_line_length": 14.75, "ext": "agda", "hexsha": "7aaa40ea1d2202d42992c46fe53afc5fc8ddb268", "lang": "Agda", "max_forks_count": 1, "max_forks_repo_forks_event_max_datetime": "2019-03-05T20:02:38.000Z", "max_forks_repo_forks_event_min_datetime": "2019-03-05T20:02:38.000Z", "max_forks_repo_head_hexsha": "6043e77e4a72518711f5f808fb4eb593cbf0bb7c", "max_forks_repo_licenses": [ "BSD-3-Clause" ], "max_forks_repo_name": "alhassy/agda", "max_forks_repo_path": "test/Fail/MalformedModuleNameInIMPORT.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "6043e77e4a72518711f5f808fb4eb593cbf0bb7c", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "BSD-3-Clause" ], "max_issues_repo_name": "alhassy/agda", "max_issues_repo_path": "test/Fail/MalformedModuleNameInIMPORT.agda", "max_line_length": 40, "max_stars_count": 3, "max_stars_repo_head_hexsha": "6043e77e4a72518711f5f808fb4eb593cbf0bb7c", "max_stars_repo_licenses": [ "BSD-3-Clause" ], "max_stars_repo_name": "alhassy/agda", "max_stars_repo_path": "test/Fail/MalformedModuleNameInIMPORT.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": 12, "size": 59 }
module Numeral.Natural.TotalOper where import Lvl open import Logic.Propositional open import Logic.Predicate open import Numeral.Natural hiding (𝐏) open import Numeral.Natural.Relation.Divisibility open import Numeral.Natural.Relation.Divisibility.Proofs open import Numeral.Natural.Relation open import Numeral.Natural.Relation.Order open import Numeral.Natural.Relation.Order.Proofs open import Relator.Equals open import Relator.Equals.Proofs -- Total predecessor function (Truncated predecessor) 𝐏 : (n : ℕ) → ⦃ _ : Positive(n) ⦄ → ℕ 𝐏(𝐒(n)) = n -- Total subtraction (Truncated subtraction) _−_ : (a : ℕ) → (b : ℕ) → ⦃ _ : a ≥ b ⦄ → ℕ _−_ a 𝟎 = a _−_ 𝟎 (𝐒(b)) ⦃ 0≥𝐒b ⦄ with ([<]-to-[≱] ([<]-minimum{b})) (0≥𝐒b) ... | () _−_ (𝐒(a)) (𝐒(b)) ⦃ 𝐒b≤𝐒a ⦄ = _−_ a b ⦃ [≤]-without-[𝐒] {b} (𝐒b≤𝐒a) ⦄ -- Total division (Whole number division) _/₀_ : (a : ℕ) → (b : ℕ) → ⦃ _ : (b ∣ a) ⦄ → ℕ _/₀_ _ _ ⦃ div ⦄ = divides-quotient div
{ "alphanum_fraction": 0.6659482759, "avg_line_length": 32, "ext": "agda", "hexsha": "b1f244e4b17a32e4720101f0113a2af3587bb988", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "70f4fba849f2fd779c5aaa5af122ccb6a5b271ba", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "Lolirofle/stuff-in-agda", "max_forks_repo_path": "Numeral/Natural/TotalOper.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "70f4fba849f2fd779c5aaa5af122ccb6a5b271ba", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "Lolirofle/stuff-in-agda", "max_issues_repo_path": "Numeral/Natural/TotalOper.agda", "max_line_length": 69, "max_stars_count": 6, "max_stars_repo_head_hexsha": "70f4fba849f2fd779c5aaa5af122ccb6a5b271ba", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "Lolirofle/stuff-in-agda", "max_stars_repo_path": "Numeral/Natural/TotalOper.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": 386, "size": 928 }
{-# OPTIONS --without-K --safe #-} open import Categories.Category.Groupoid module Categories.Category.Groupoid.Properties {o ℓ e} (G : Groupoid o ℓ e) where import Categories.Morphism as Morphism import Categories.Morphism.Properties as MorphismProps import Categories.Morphism.Reasoning as MR open Groupoid G open Morphism category open MorphismProps category open HomReasoning open MR category private variable A B C : Obj mono : {f : A ⇒ B} → Mono f mono = Iso⇒Mono iso epi : {f : A ⇒ B} → Epi f epi = Iso⇒Epi iso id-inverse : id {A = A} ⁻¹ ≈ id id-inverse = ⟺ identityˡ ○ iso.isoʳ ⁻¹-involutive : {f : A ⇒ B} → f ⁻¹ ⁻¹ ≈ f ⁻¹-involutive {f = f} = begin f ⁻¹ ⁻¹ ≈⟨ introʳ iso.isoˡ ⟩ f ⁻¹ ⁻¹ ∘ f ⁻¹ ∘ f ≈⟨ sym-assoc ○ elimˡ iso.isoˡ ⟩ f ∎ ⁻¹-commute : {f : A ⇒ B} {g : C ⇒ A} → (f ∘ g) ⁻¹ ≈ g ⁻¹ ∘ f ⁻¹ ⁻¹-commute {f = f} {g} = epi _ _ ( begin (f ∘ g) ⁻¹ ∘ f ∘ g ≈⟨ iso.isoˡ ⟩ id ≈˘⟨ iso.isoˡ ⟩ g ⁻¹ ∘ g ≈˘⟨ cancelInner iso.isoˡ ⟩ (g ⁻¹ ∘ f ⁻¹) ∘ f ∘ g ∎ )
{ "alphanum_fraction": 0.5741444867, "avg_line_length": 25.6585365854, "ext": "agda", "hexsha": "f006270987ba92409fdc10e6f8aa59910de63256", "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/Category/Groupoid/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/Category/Groupoid/Properties.agda", "max_line_length": 81, "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/Category/Groupoid/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": 441, "size": 1052 }
module examplesPaperJFP.Coalgebra where open import Size F : Set → Set mapF : ∀{A B} (f : A → B) → (F A → F B) --- Dummy implementation to satisfy Agda's positivity checker. F X = X mapF f x = f x S : Set t : S → F S data S′ : Set where S = S′ t x = x record νF : Set where coinductive field force : F νF open νF using (force) {-# TERMINATING #-} unfoldF : ∀{S} (t : S → F S) → (S → νF) force (unfoldF t s) = mapF (unfoldF t) (t s)
{ "alphanum_fraction": 0.5741935484, "avg_line_length": 16.0344827586, "ext": "agda", "hexsha": "ec139514fbf0f35f9a785166b16ebd6c79012761", "lang": "Agda", "max_forks_count": 2, "max_forks_repo_forks_event_max_datetime": "2022-03-12T11:41:00.000Z", "max_forks_repo_forks_event_min_datetime": "2018-09-01T15:02:37.000Z", "max_forks_repo_head_hexsha": "7cc45e0148a4a508d20ed67e791544c30fecd795", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "agda/ooAgda", "max_forks_repo_path": "examples/examplesPaperJFP/Coalgebra.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "7cc45e0148a4a508d20ed67e791544c30fecd795", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "agda/ooAgda", "max_issues_repo_path": "examples/examplesPaperJFP/Coalgebra.agda", "max_line_length": 62, "max_stars_count": 23, "max_stars_repo_head_hexsha": "7cc45e0148a4a508d20ed67e791544c30fecd795", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "agda/ooAgda", "max_stars_repo_path": "examples/examplesPaperJFP/Coalgebra.agda", "max_stars_repo_stars_event_max_datetime": "2020-10-12T23:15:25.000Z", "max_stars_repo_stars_event_min_datetime": "2016-06-19T12:57:55.000Z", "num_tokens": 179, "size": 465 }
------------------------------------------------------------------------ -- Semantics ------------------------------------------------------------------------ module RecursiveTypes.Semantics where open import Codata.Musical.Notation open import RecursiveTypes.Syntax open import RecursiveTypes.Substitution -- The semantics of a recursive type, i.e. its possibly infinite -- unfolding. ⟦_⟧ : ∀ {n} → Ty n → Tree n ⟦ ⊥ ⟧ = ⊥ ⟦ ⊤ ⟧ = ⊤ ⟦ var x ⟧ = var x ⟦ σ ⟶ τ ⟧ = ♯ ⟦ σ ⟧ ⟶ ♯ ⟦ τ ⟧ ⟦ μ σ ⟶ τ ⟧ = ♯ ⟦ σ [0≔ χ ] ⟧ ⟶ ♯ ⟦ τ [0≔ χ ] ⟧ where χ = μ σ ⟶ τ
{ "alphanum_fraction": 0.4027072758, "avg_line_length": 26.8636363636, "ext": "agda", "hexsha": "453e0ee061a5fd279d4670e3e7966d8a392cf885", "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": "1b90445566df0d3b4ba6e31bd0bac417b4c0eb0e", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "nad/codata", "max_forks_repo_path": "RecursiveTypes/Semantics.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "1b90445566df0d3b4ba6e31bd0bac417b4c0eb0e", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "nad/codata", "max_issues_repo_path": "RecursiveTypes/Semantics.agda", "max_line_length": 72, "max_stars_count": 1, "max_stars_repo_head_hexsha": "1b90445566df0d3b4ba6e31bd0bac417b4c0eb0e", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "nad/codata", "max_stars_repo_path": "RecursiveTypes/Semantics.agda", "max_stars_repo_stars_event_max_datetime": "2021-02-13T14:48:45.000Z", "max_stars_repo_stars_event_min_datetime": "2021-02-13T14:48:45.000Z", "num_tokens": 187, "size": 591 }
module iff-erasure where open import Relation.Binary.PropositionalEquality using (_≡_; refl) open import Data.Empty using (⊥-elim) -- open import plfa.part1.Isomorphism using (_⇔_) open import decidable using (Dec; yes; no; Bool; true; false; ⌊_⌋) -- 同値 (equivalence) record _⇔_ (A B : Set) : Set where field to : A → B from : B → A open _⇔_ -- 必要十分条件 (if and only if) _iff_ : Bool → Bool → Bool true iff true = true true iff false = false false iff true = false false iff false = true -- 同値のdecidable _⇔-dec_ : ∀ {A B : Set} → Dec A → Dec B → Dec (A ⇔ B) yes a ⇔-dec yes b = yes record { to = λ _ → b ; from = λ _ → a } yes a ⇔-dec no ¬b = no λ a⇔b → ¬b (to a⇔b a) no ¬a ⇔-dec yes b = no λ a⇔b → ¬a (from a⇔b b) no ¬a ⇔-dec no ¬b = yes record { to = λ a → ⊥-elim (¬a a) ; from = λ b → ⊥-elim (¬b b) } -- erasureを使うことで真偽値の必要十分条件とdecidableの同値が等しくなることの証明 iff-⇔ : ∀ {A B : Set} (x : Dec A) (y : Dec B) → ⌊ x ⌋ iff ⌊ y ⌋ ≡ ⌊ x ⇔-dec y ⌋ iff-⇔ (yes a) (yes b) = refl iff-⇔ (yes a) (no b) = refl iff-⇔ (no a) (yes b) = refl iff-⇔ (no a) (no b) = refl
{ "alphanum_fraction": 0.5841121495, "avg_line_length": 30.5714285714, "ext": "agda", "hexsha": "dc0de19c50f032120db07b68521152fa0acb2df5", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "df7722b88a9b3dfde320a690b78c4c1ef8c7c547", "max_forks_repo_licenses": [ "Apache-2.0" ], "max_forks_repo_name": "akiomik/plfa-solutions", "max_forks_repo_path": "part1/decidable/iff-erasure.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "df7722b88a9b3dfde320a690b78c4c1ef8c7c547", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "Apache-2.0" ], "max_issues_repo_name": "akiomik/plfa-solutions", "max_issues_repo_path": "part1/decidable/iff-erasure.agda", "max_line_length": 88, "max_stars_count": 1, "max_stars_repo_head_hexsha": "df7722b88a9b3dfde320a690b78c4c1ef8c7c547", "max_stars_repo_licenses": [ "Apache-2.0" ], "max_stars_repo_name": "akiomik/plfa-solutions", "max_stars_repo_path": "part1/decidable/iff-erasure.agda", "max_stars_repo_stars_event_max_datetime": "2020-07-07T09:42:22.000Z", "max_stars_repo_stars_event_min_datetime": "2020-07-07T09:42:22.000Z", "num_tokens": 505, "size": 1070 }
{- The Inductive Version of James Construction This file contains: - An inductive family 𝕁, and its direct colimit is equivalence to James; (KANG Rongji, Feb. 2022) - The family 𝕁 can be iteratively constructed as pushouts; - Special cases of 𝕁 n for n = 0, 1 and 2; - Connectivity of inclusion maps. This file is the summary of the main results. The proof is divided into parts and put inside the fold Cubical.HITs.James.Inductive -} {-# OPTIONS --safe #-} module Cubical.HITs.James.Inductive where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv open import Cubical.Foundations.Pointed open import Cubical.Data.Nat open import Cubical.Data.Unit open import Cubical.Data.Sigma open import Cubical.HITs.Wedge open import Cubical.HITs.Pushout open import Cubical.HITs.Pushout.PushoutProduct open import Cubical.HITs.SequentialColimit open import Cubical.HITs.James.Base open import Cubical.HITs.James.Inductive.Base open import Cubical.HITs.James.Inductive.PushoutFormula renaming (isConnectedIncl to connIncl ; isConnectedInl to connInl) open import Cubical.HITs.James.Inductive.Reduced open import Cubical.HITs.James.Inductive.ColimitEquivalence open import Cubical.Homotopy.Connected private variable ℓ : Level module JamesInd (X∙@(X , x₀) : Pointed ℓ) where -- The family 𝕁 n is equivalence to Brunerie's J n, as will be shown latter. -- Instead of his inductive procedure, 𝕁 is defined directly as an indexed HIT. 𝕁 : ℕ → Type ℓ 𝕁 = 𝕁ames (X , x₀) -- This family forms a direct system. 𝕁Seq : Sequence ℓ 𝕁Seq = 𝕁amesSeq (X , x₀) -- The inductive construction of James is called 𝕁∞. -- It is the direct colimit of 𝕁 n. 𝕁∞ : Type ℓ 𝕁∞ = Lim→ 𝕁Seq -- And of course it is equivalent to James. J≃𝕁∞ : James (X , x₀) ≃ 𝕁∞ J≃𝕁∞ = compEquiv (James≃𝕁Red∞ _) (invEquiv (𝕁ames∞≃𝕁Red∞ _)) -- Special cases of 𝕁 n for n = 0, 1 and 2: 𝕁₀≃Unit : 𝕁 0 ≃ Unit 𝕁₀≃Unit = 𝕁ames0≃ _ 𝕁₁≃X : 𝕁 1 ≃ X 𝕁₁≃X = 𝕁ames1≃ _ 𝕁₂≃P[X×X←X⋁X→X] : 𝕁 2 ≃ Pushout ⋁↪ fold⋁ 𝕁₂≃P[X×X←X⋁X→X] = 𝕁ames2≃ _ -- The following is defined as pushouts of 𝕁 n. 𝕁Push : ℕ → Type ℓ 𝕁Push = 𝕁amesPush (X , x₀) -- Brunerie uses f and g to denote the following maps, so do I. module _ {n : ℕ} where f : 𝕁Push n → X × 𝕁 (1 + n) f = leftMap _ g : 𝕁Push n → 𝕁 (1 + n) g = rightMap _ -- Here we show that 𝕁 (n+2) can be made as double pushouts invoving only X, 𝕁 n and 𝕁 (n+1). -- In particular, our 𝕁 is exactly what Brunerie had defined. 𝕁ₙ₊₂≃Pushout : (n : ℕ) → 𝕁 (2 + n) ≃ Pushout f g 𝕁ₙ₊₂≃Pushout = 𝕁ames2+n≃ _ -- Connectivity of inclusion maps: module _ (d : ℕ)(conn : isConnected (1 + d) X) where -- Warning: -- The connectivity is shifted by 2 from the convention of usual homotopy theory. -- If X is (d+1)-connected, the transition incl : 𝕁 n → 𝕁 (n+1) will be (n+1)d-connected. isConnectedIncl : (n : ℕ) → isConnectedFun ((1 + n) · d) (incl {n = n}) isConnectedIncl = connIncl X∙ d conn -- If X is (d+1)-connected, the inclusion inl : 𝕁 n → 𝕁∞ will be (n+1)d-connected. inl∞ : (n : ℕ) → 𝕁 n → 𝕁∞ inl∞ _ = inl isConnectedInl : (n : ℕ) → isConnectedFun ((1 + n) · d) (inl∞ n) isConnectedInl = connInl X∙ d conn
{ "alphanum_fraction": 0.6710325921, "avg_line_length": 26.6910569106, "ext": "agda", "hexsha": "f9ff07564f28547aa827f396f8873daa18e78c2b", "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/James/Inductive.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/James/Inductive.agda", "max_line_length": 95, "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/James/Inductive.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": 1257, "size": 3283 }
{-# OPTIONS --cubical #-} open import Agda.Builtin.Cubical.Path open import Agda.Primitive open import Agda.Primitive.Cubical variable a p : Level A : Set a P : A → Set p eq₁ u v x y : A refl : x ≡ x refl {x = x} = λ _ → x subst : (P : A → Set p) → x ≡ y → P x → P y subst P x≡y p = primTransp (λ i → P (x≡y i)) i0 p hcong : (f : (x : A) → P x) (x≡y : x ≡ y) → PathP (λ i → P (x≡y i)) (f x) (f y) hcong f x≡y = λ i → f (x≡y i) dcong : (f : (x : A) → P x) (x≡y : x ≡ y) → subst P x≡y (f x) ≡ f y dcong {P = P} f x≡y = λ i → primTransp (λ j → P (x≡y (primIMax i j))) i (f (x≡y i)) -- This lemma is due to Anders Mörtberg. lemma₁ : {P : I → Set p} {p : P i0} {q : P i1} → PathP P p q ≡ (primTransp P i0 p ≡ q) lemma₁ {P = P} {p = p} {q = q} = λ i → PathP (λ j → P (primIMax i j)) (primTransp (λ j → P (primIMin i j)) (primINeg i) p) q data 𝕊¹ : Set where base : 𝕊¹ loop : base ≡ base postulate Q : 𝕊¹ → Set b : Q base ℓ : subst Q loop b ≡ b lemma₂ : {eq : x ≡ y} → subst Q eq u ≡ v → PathP (λ i → Q (eq i)) u v lemma₂ = subst (λ A → A → PathP _ _ _) lemma₁ (λ x → x) lemma₃ : (x : 𝕊¹) → Q x lemma₃ base = b lemma₃ (loop i) = lemma₂ ℓ i postulate lemma₄ : (eq₂ : subst Q eq₁ (lemma₃ x) ≡ lemma₃ y) → hcong lemma₃ eq₁ ≡ lemma₂ eq₂ → dcong lemma₃ eq₁ ≡ eq₂ works : dcong lemma₃ loop ≡ ℓ works = lemma₄ ℓ refl -- "injectivity" of lemma₃ was the problem should-work-too : dcong lemma₃ loop ≡ ℓ should-work-too = lemma₄ _ refl
{ "alphanum_fraction": 0.532247557, "avg_line_length": 20.1973684211, "ext": "agda", "hexsha": "ca27958e19d635f165b71b99f10eaea56c5c4050", "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/Issue5576.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/Issue5576.agda", "max_line_length": 57, "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/Issue5576.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": 715, "size": 1535 }
module _ where postulate C : Set → Set A : Set i : C A foo : {X : Set} {{_ : C X}} → X bar : A bar = let instance z = i in foo
{ "alphanum_fraction": 0.5144927536, "avg_line_length": 11.5, "ext": "agda", "hexsha": "1a59a4035e2e7c576ce6ac5cc7788cb01c99ead6", "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/LetInstance.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/LetInstance.agda", "max_line_length": 33, "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/LetInstance.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": 57, "size": 138 }
-- By default both sized types and constructor-based guardedness are -- available. open import Agda.Builtin.Size record Stream (A : Set) : Set where coinductive field head : A tail : Stream A open Stream repeat : ∀ {A} → A → Stream A repeat x .head = x repeat x .tail = repeat x record Sized-stream (A : Set) (i : Size) : Set where coinductive field head : A tail : {j : Size< i} → Sized-stream A j open Sized-stream postulate destroy-guardedness : {A : Set} → A → A repeat-sized : ∀ {A i} → A → Sized-stream A i repeat-sized x .head = x repeat-sized x .tail = destroy-guardedness (repeat-sized x)
{ "alphanum_fraction": 0.6598101266, "avg_line_length": 19.75, "ext": "agda", "hexsha": "86d596115413a7ad68b6105114615537e3860719", "lang": "Agda", "max_forks_count": 1, "max_forks_repo_forks_event_max_datetime": "2015-09-15T14:36:15.000Z", "max_forks_repo_forks_event_min_datetime": "2015-09-15T14:36:15.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/Issue1209-6.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/Issue1209-6.agda", "max_line_length": 68, "max_stars_count": 2, "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/Issue1209-6.agda", "max_stars_repo_stars_event_max_datetime": "2020-09-20T00:28:57.000Z", "max_stars_repo_stars_event_min_datetime": "2019-10-29T09:40:30.000Z", "num_tokens": 192, "size": 632 }
{-# OPTIONS --safe --experimental-lossy-unification #-} module Cubical.Algebra.Polynomials.Multivariate.Equiv.Poly0-A where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Isomorphism open import Cubical.Data.Nat renaming (_+_ to _+n_; _·_ to _·n_) open import Cubical.Data.Vec open import Cubical.Algebra.Ring open import Cubical.Algebra.CommRing open import Cubical.Algebra.Polynomials.Univariate.Base open import Cubical.Algebra.Polynomials.Multivariate.Base open import Cubical.Algebra.Polynomials.Multivariate.Properties open import Cubical.Algebra.CommRing.Instances.MultivariatePoly private variable ℓ : Level module Equiv-Poly0-A (A' : CommRing ℓ) where A = fst A' cra = snd A' open CommRingStr cra renaming (is-set to isSetA) open Nth-Poly-structure A' 0 ----------------------------------------------------------------------------- -- Equivalence Poly0→A : Poly A' 0 → A Poly0→A = Poly-Rec-Set.f A' 0 A isSetA 0r (λ v a → a) _+_ +Assoc +Rid +Comm (λ _ → refl) λ _ a b → refl A→Poly0 : A → Poly A' 0 A→Poly0 a = base [] a e-sect : (a : A) → Poly0→A (A→Poly0 a) ≡ a e-sect a = refl e-retr : (P : Poly A' 0) → A→Poly0 (Poly0→A P) ≡ P e-retr = Poly-Ind-Prop.f A' 0 (λ P → A→Poly0 (Poly0→A P) ≡ P) (λ _ → trunc _ _) (base-0P []) (λ { [] a → refl }) λ {U V} ind-U ind-V → (sym (base-Poly+ [] (Poly0→A U) (Poly0→A V))) ∙ (cong₂ _Poly+_ ind-U ind-V) ----------------------------------------------------------------------------- -- Ring homomorphism map-0P : Poly0→A 0P ≡ 0r map-0P = refl Poly0→A-gmorph : (P Q : Poly A' 0) → Poly0→A ( P Poly+ Q) ≡ Poly0→A P + Poly0→A Q Poly0→A-gmorph P Q = refl map-1P : Poly0→A 1P ≡ 1r map-1P = refl Poly0→A-rmorph : (P Q : Poly A' 0) → Poly0→A ( P Poly* Q) ≡ Poly0→A P · Poly0→A Q Poly0→A-rmorph = Poly-Ind-Prop.f A' 0 (λ P → (Q : Poly A' 0) → Poly0→A (P Poly* Q) ≡ Poly0→A P · Poly0→A Q) (λ P p q i Q j → isSetA (Poly0→A (P Poly* Q)) (Poly0→A P · Poly0→A Q) (p Q) (q Q) i j) (λ Q → sym (RingTheory.0LeftAnnihilates (CommRing→Ring A') (Poly0→A Q))) (λ v a → Poly-Ind-Prop.f A' 0 (λ P → Poly0→A (base v a Poly* P) ≡ Poly0→A (base v a) · Poly0→A P) (λ _ → isSetA _ _) (sym (RingTheory.0RightAnnihilates (CommRing→Ring A') (Poly0→A (base v a)))) (λ v' a' → refl) λ {U V} ind-U ind-V → (cong₂ _+_ ind-U ind-V) ∙ (sym (·Rdist+ _ _ _))) λ {U V} ind-U ind-V Q → (cong₂ _+_ (ind-U Q) (ind-V Q)) ∙ (sym (·Ldist+ _ _ _)) ----------------------------------------------------------------------------- -- 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 map-1P Poly0→A-gmorph Poly0→A-rmorph
{ "alphanum_fraction": 0.5144840072, "avg_line_length": 32.8118811881, "ext": "agda", "hexsha": "86bd3e98ea35b7119f2590cb1d79950be726eea0", "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": "1b9c97a2140fe96fe636f4c66beedfd7b8096e8f", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "howsiyu/cubical", "max_forks_repo_path": "Cubical/Algebra/Polynomials/Multivariate/Equiv/Poly0-A.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "1b9c97a2140fe96fe636f4c66beedfd7b8096e8f", "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": "howsiyu/cubical", "max_issues_repo_path": "Cubical/Algebra/Polynomials/Multivariate/Equiv/Poly0-A.agda", "max_line_length": 108, "max_stars_count": null, "max_stars_repo_head_hexsha": "1b9c97a2140fe96fe636f4c66beedfd7b8096e8f", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "howsiyu/cubical", "max_stars_repo_path": "Cubical/Algebra/Polynomials/Multivariate/Equiv/Poly0-A.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 1130, "size": 3314 }
{-# OPTIONS --cubical --safe #-} module Cubical.Relation.Everything where open import Cubical.Relation.Nullary public open import Cubical.Relation.Nullary.DecidableEq public open import Cubical.Relation.Binary public
{ "alphanum_fraction": 0.8165137615, "avg_line_length": 31.1428571429, "ext": "agda", "hexsha": "2ad6206b9ba3548ec34d3667d5da20b44a19d25a", "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": "df4ef7edffd1c1deb3d4ff342c7178e9901c44f1", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "limemloh/cubical", "max_forks_repo_path": "Cubical/Relation/Everything.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "df4ef7edffd1c1deb3d4ff342c7178e9901c44f1", "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": "limemloh/cubical", "max_issues_repo_path": "Cubical/Relation/Everything.agda", "max_line_length": 55, "max_stars_count": null, "max_stars_repo_head_hexsha": "df4ef7edffd1c1deb3d4ff342c7178e9901c44f1", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "limemloh/cubical", "max_stars_repo_path": "Cubical/Relation/Everything.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 51, "size": 218 }
open import Issue2229Base public
{ "alphanum_fraction": 0.8787878788, "avg_line_length": 16.5, "ext": "agda", "hexsha": "97d04c20282ebf3b0c9bd388ed07d953ae744289", "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/Issue2229Reexport1.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/Issue2229Reexport1.agda", "max_line_length": 32, "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/Issue2229Reexport1.agda", "max_stars_repo_stars_event_max_datetime": "2022-03-30T18:20:48.000Z", "max_stars_repo_stars_event_min_datetime": "2015-01-09T23:51:16.000Z", "num_tokens": 8, "size": 33 }
-- Andreas, 2019-08-08, issue #3962 reported (+ test case) by guillaumebrunerie -- Don't lex "{{" as instance braces if followed by "-", as this will confuse Emacs. -- Rather lex "{{-" as "{" "{-". postulate A : Set f : {{_ : A}} → Set -x : A B : Set B = f {{-x}} C : Set C = ? -- WAS: passes parser but confuses emacs, which treats everything following {- as comment. -- Expected error: Unterminated '{-'
{ "alphanum_fraction": 0.6100478469, "avg_line_length": 20.9, "ext": "agda", "hexsha": "7bec100e6111b7b9fb47e426604452133736f808", "lang": "Agda", "max_forks_count": 371, "max_forks_repo_forks_event_max_datetime": "2022-03-30T19:00:30.000Z", "max_forks_repo_forks_event_min_datetime": "2015-01-03T14:04:08.000Z", "max_forks_repo_head_hexsha": "7f58030124fa99dfbf8db376659416f3ad8384de", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "cruhland/agda", "max_forks_repo_path": "test/Fail/Issue3962.agda", "max_issues_count": 4066, "max_issues_repo_head_hexsha": "7f58030124fa99dfbf8db376659416f3ad8384de", "max_issues_repo_issues_event_max_datetime": "2022-03-31T21:14:49.000Z", "max_issues_repo_issues_event_min_datetime": "2015-01-10T11:24:51.000Z", "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "cruhland/agda", "max_issues_repo_path": "test/Fail/Issue3962.agda", "max_line_length": 90, "max_stars_count": 1989, "max_stars_repo_head_hexsha": "7f58030124fa99dfbf8db376659416f3ad8384de", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "cruhland/agda", "max_stars_repo_path": "test/Fail/Issue3962.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": 126, "size": 418 }
module Numeral.Finite.Oper.Comparisons where import Lvl open import Data.Boolean import Data.Boolean.Operators open Data.Boolean.Operators.Programming open import Functional open import Numeral.Finite open import Numeral.Sign -- Compare _⋚?_ : ∀{a b} → 𝕟(a) → 𝕟(b) → (−|0|+) 𝟎 ⋚? 𝟎 = 𝟎 𝟎 ⋚? 𝐒(b) = ➖ 𝐒(a) ⋚? 𝟎 = ➕ 𝐒(a) ⋚? 𝐒(b) = a ⋚? b -- Equality check _≡?_ : ∀{a b} → 𝕟(a) → 𝕟(b) → Bool _≡?_ = elim₃ 𝐹 𝑇 𝐹 ∘₂ (_⋚?_) -- Non-equality check _≢?_ : ∀{a b} → 𝕟(a) → 𝕟(b) → Bool _≢?_ = elim₃ 𝑇 𝐹 𝑇 ∘₂ (_⋚?_) -- Lesser-than check _<?_ : ∀{a b} → 𝕟(a) → 𝕟(b) → Bool _<?_ = elim₃ 𝑇 𝐹 𝐹 ∘₂ (_⋚?_) -- Lesser-than or equals check _≤?_ : ∀{a b} → 𝕟(a) → 𝕟(b) → Bool _≤?_ = elim₃ 𝑇 𝑇 𝐹 ∘₂ (_⋚?_) -- Greater-than check _>?_ : ∀{a b} → 𝕟(a) → 𝕟(b) → Bool _>?_ = elim₃ 𝐹 𝐹 𝑇 ∘₂ (_⋚?_) -- Greater-than or equals check _≥?_ : ∀{a b} → 𝕟(a) → 𝕟(b) → Bool _≥?_ = elim₃ 𝐹 𝑇 𝑇 ∘₂ (_⋚?_)
{ "alphanum_fraction": 0.5337763012, "avg_line_length": 22.0243902439, "ext": "agda", "hexsha": "4bd709efb9d55ffb7d305e7561d897a7530e2f1d", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "70f4fba849f2fd779c5aaa5af122ccb6a5b271ba", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "Lolirofle/stuff-in-agda", "max_forks_repo_path": "Numeral/Finite/Oper/Comparisons.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "70f4fba849f2fd779c5aaa5af122ccb6a5b271ba", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "Lolirofle/stuff-in-agda", "max_issues_repo_path": "Numeral/Finite/Oper/Comparisons.agda", "max_line_length": 46, "max_stars_count": 6, "max_stars_repo_head_hexsha": "70f4fba849f2fd779c5aaa5af122ccb6a5b271ba", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "Lolirofle/stuff-in-agda", "max_stars_repo_path": "Numeral/Finite/Oper/Comparisons.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": 513, "size": 903 }
{-# OPTIONS --without-K #-} module Universe.Utility.General where open import lib.Basics open import lib.NType2 open import lib.types.Nat hiding (_+_) open import lib.types.Pi open import lib.types.Sigma open import lib.types.Unit -- A readable notation for the join of universe levels. infixr 8 _⊔_ _⊔_ : ULevel → ULevel → ULevel _⊔_ = lmax -- Important detail: addition operator adjustment. _+_ : ℕ → ℕ → ℕ a + b = b lib.types.Nat.+ a -- n + 1 should mean S n (author preference)! {- Since natural numbers and universe levels use different types, we require a translation operation. -} 「_」 : ℕ → ULevel 「 0 」 = lzero 「 S n 」 = lsucc 「 n 」 {- The (function) exponentiation operator. For convenience, we choose to define it via postcomposition in the recursion step. -} infix 10 _^_ _^_ : ∀ {i} {A : Set i} → (A → A) → ℕ → A → A f ^ 0 = idf _ f ^ S n = f ^ n ∘ f {- The rest of this file contains the remainder of the library type material that could not yet be merged into the community's HoTT library due to organizational issues. -} module _ {i j} {A : Type i} {B : A → Type j} where module _ (h : is-contr A) where Π₁-contr : Π A B ≃ B (fst h) Π₁-contr = Π₁-Unit ∘e equiv-Π-l _ (snd (contr-equiv-Unit h ⁻¹)) ⁻¹ Σ₁-contr : Σ A B ≃ B (fst h) Σ₁-contr = Σ₁-Unit ∘e equiv-Σ-fst _ (snd (contr-equiv-Unit h ⁻¹)) ⁻¹ module _ (h : (a : A) → is-contr (B a)) where Σ₂-contr : Σ A B ≃ A Σ₂-contr = Σ₂-Unit ∘e equiv-Σ-snd (λ _ → contr-equiv-Unit (h _)) Π₂-contr : Π A B ≃ ⊤ Π₂-contr = Π₂-Unit ∘e equiv-Π-r (λ _ → contr-equiv-Unit (h _)) ×-comm : ∀ {i j} {A : Type i} {B : Type j} → (A × B) ≃ (B × A) ×-comm = equiv (λ {(a , b) → (b , a)}) (λ {(b , a) → (a , b)}) (λ _ → idp) (λ _ → idp) Σ-comm-snd : ∀ {i j k} {A : Type i} {B : A → Type j} {C : A → Type k} → Σ (Σ A B) (λ ab → C (fst ab)) ≃ Σ (Σ A C) (λ ac → B (fst ac)) Σ-comm-snd {A = A} {B} {C} = Σ (Σ A B) (λ ab → C (fst ab)) ≃⟨ Σ-assoc ⟩ Σ A (λ a → B a × C a) ≃⟨ equiv-Σ-snd (λ _ → ×-comm) ⟩ Σ A (λ a → C a × B a) ≃⟨ Σ-assoc ⁻¹ ⟩ Σ (Σ A C) (λ ac → B (fst ac)) ≃∎ flip : ∀ {i j k} {A : Type i} {B : Type j} {C : A → B → Type k} → ((a : A) (b : B) → C a b) → ((b : B) (a : A) → C a b) flip = –> (curry-equiv ∘e equiv-Π-l _ (snd ×-comm) ∘e curry-equiv ⁻¹) module _ {i j k} {A : Type i} {B : Type j} {C : A → B → Type k} where ↓-cst→app-equiv : {x x' : A} {p : x == x'} {u : (b : B) → C x b} {u' : (b : B) → C x' b} → ((b : B) → u b == u' b [ (λ x → C x b) ↓ p ]) ≃ (u == u' [ (λ x → (b : B) → C x b) ↓ p ]) ↓-cst→app-equiv {p = idp} = equiv λ= app= (! ∘ λ=-η) (λ= ∘ app=-β) module _ {i j k} {A : Type i} {B : A → Type j} {C : A → Type k} where ↓-cst2-equiv : {x y : A} (p : x == y) {b : C x} {c : C y} (q : b == c [ C ↓ p ]) {u : B x} {v : B y} → (u == v [ B ↓ p ]) ≃ (u == v [ (λ xy → B (fst xy)) ↓ (pair= p q) ]) ↓-cst2-equiv idp idp = ide _ module _ {i} {A B : Type i} (e : A ≃ B) {u : A} {v : B} where ↓-idf-ua-equiv : (–> e u == v) ≃ (u == v [ (λ x → x) ↓ (ua e) ]) ↓-idf-ua-equiv = to-transp-equiv _ _ ⁻¹ ∘e (_ , pre∙-is-equiv (ap (λ z → z u) (ap coe (ap-idf (ua e)) ∙ ap –> (coe-equiv-β e)))) -- On propositions, equivalence coincides with logical equivalence. module _ {i j} {A : Type i} {B : Type j} where prop-equiv' : (B → is-prop A) → (A → is-prop B) → (A → B) → (B → A) → A ≃ B prop-equiv' h k f g = equiv f g (λ b → prop-has-all-paths (k (g b)) _ _) (λ a → prop-has-all-paths (h (f a)) _ _) prop-equiv : is-prop A → is-prop B → (A → B) → (B → A) → A ≃ B prop-equiv h k f g = prop-equiv' (cst h) (cst k) f g -- Equivalent types have equivalent truncatedness propositions. equiv-level : ∀ {i j} {A : Type i} {B : Type j} {n : ℕ₋₂} → A ≃ B → has-level n A ≃ has-level n B equiv-level u = prop-equiv has-level-is-prop has-level-is-prop (equiv-preserves-level u) (equiv-preserves-level (u ⁻¹)) prop-equiv-inhab-to-contr : ∀ {i} {A : Type i} → is-prop A ≃ (A → is-contr A) prop-equiv-inhab-to-contr = prop-equiv is-prop-is-prop (Π-level (λ _ → is-contr-is-prop)) (flip inhab-prop-is-contr) inhab-to-contr-is-prop
{ "alphanum_fraction": 0.498981209, "avg_line_length": 38.4086956522, "ext": "agda", "hexsha": "6c1f5e74f7cd5a40e315d1c66a55688a91bb43a2", "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": "c8fb8da3354fc9e0c430ac14160161759b4c5b37", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "sattlerc/HoTT-Agda", "max_forks_repo_path": "Universe/Utility/General.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "c8fb8da3354fc9e0c430ac14160161759b4c5b37", "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": "sattlerc/HoTT-Agda", "max_issues_repo_path": "Universe/Utility/General.agda", "max_line_length": 130, "max_stars_count": null, "max_stars_repo_head_hexsha": "c8fb8da3354fc9e0c430ac14160161759b4c5b37", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "sattlerc/HoTT-Agda", "max_stars_repo_path": "Universe/Utility/General.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 1754, "size": 4417 }
module Data.ByteString.Utf8 where open import Data.ByteString.Primitive open import Data.String using (String) {-# FOREIGN GHC import qualified Data.ByteString #-} {-# FOREIGN GHC import qualified Data.Text.Encoding #-} postulate packStrict : String → ByteStringStrict unpackStrict : ByteStringStrict → String {-# COMPILE GHC packStrict = (Data.Text.Encoding.encodeUtf8) #-} {-# COMPILE GHC unpackStrict = (Data.Text.Encoding.decodeUtf8) #-}
{ "alphanum_fraction": 0.76, "avg_line_length": 30, "ext": "agda", "hexsha": "1b0e4088d9e5974fb6991f0ba53f1b4159db40b1", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "98a53f35fca27e3379cf851a9a6bdfe5bd8c9626", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "semenov-vladyslav/bytes-agda", "max_forks_repo_path": "src/Data/ByteString/Utf8.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "98a53f35fca27e3379cf851a9a6bdfe5bd8c9626", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "semenov-vladyslav/bytes-agda", "max_issues_repo_path": "src/Data/ByteString/Utf8.agda", "max_line_length": 66, "max_stars_count": null, "max_stars_repo_head_hexsha": "98a53f35fca27e3379cf851a9a6bdfe5bd8c9626", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "semenov-vladyslav/bytes-agda", "max_stars_repo_path": "src/Data/ByteString/Utf8.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 94, "size": 450 }
-------------------------------------------------------------------------------- -- This is part of Agda Inference Systems {-# OPTIONS --sized-types --guardedness #-} open import Agda.Builtin.Equality open import Data.Product open import Data.Sum open import Data.Empty open import Data.Unit open import Level open import Size open import Codata.Thunk open import Relation.Unary using (_⊆_) open import Data.Container.Indexed module is-lib.InfSys.Container {𝓁}(U : Set 𝓁) where module ISCont {𝓁p} where ISCont : {𝓁c : Level} → Set _ ISCont {𝓁c} = Container U U 𝓁c 𝓁p ISContClosed : ∀{𝓁c 𝓁'}(is : ISCont {𝓁c}) → (U → Set 𝓁') → Set _ ISContClosed is P = (⟦ is ⟧ P ⊆ P) _↾_ : ∀{𝓁c 𝓁'} → ISCont {𝓁c} → (U → Set 𝓁') → ISCont {𝓁c ⊔ 𝓁'} (is ↾ P) .Command u = is .Command u × P u (is ↾ P) .Response (c , p) = is .Response c (is ↾ P) .next (c , p) r = is .next c r _∪_ : ∀{𝓁c 𝓁c'} → ISCont {𝓁c} → ISCont {𝓁c'} → ISCont {𝓁c ⊔ 𝓁c'} (is ∪ is') .Command u = is .Command u ⊎ is' .Command u (is ∪ is') .Response = [ is .Response , is' .Response ] (is ∪ is') .next = [ is .next , is' .next ] Ind⟦_⟧ = μ -- Coinductive interpretation record CoInd⟦_⟧ {𝓁c : Level}(is : ISCont {𝓁c}) (u : U) : Set (𝓁c ⊔ 𝓁p) where coinductive constructor cofold_ field unfold : ⟦ is ⟧ CoInd⟦ is ⟧ u -- Sized coinductive interpretation record CoInd⟦_⟧^ {𝓁c : Level}(is : ISCont {𝓁c}) (i : Size) (u : U) : Set (𝓁c ⊔ 𝓁p) where coinductive constructor cofold_ field unfold : {j : Size< i} → ⟦ is ⟧ (CoInd⟦ is ⟧^ j) u -- Sized coinductive interpretation (using Thunk) data SCoInd⟦_⟧ {𝓁c : Level}(is : ISCont {𝓁c}) (u : U) (i : Size) : Set (𝓁c ⊔ 𝓁p) where sfold : ⟦ is ⟧ (λ u → Thunk (SCoInd⟦ is ⟧ u) i) u → SCoInd⟦ is ⟧ u i FCoInd⟦_,_⟧ : ∀{𝓁c 𝓁c'} → (I : ISCont {𝓁c}) (C : ISCont {𝓁c'}) → U → Set _ FCoInd⟦ I , C ⟧ = CoInd⟦ I ↾ Ind⟦ I ∪ C ⟧ ⟧ module _ {𝓁c 𝓁'} (is : ISCont {𝓁c}) (P : U → Set 𝓁') (closed : ISContClosed is P) where open import Data.W.Indexed using (iter) ind[_] : Ind⟦ is ⟧ ⊆ P ind[_] = iter is closed module _ {𝓁c 𝓁'} (is : ISCont {𝓁c}) (P : U → Set 𝓁') (consistent : P ⊆ ⟦ is ⟧ P) where open CoInd⟦_⟧ coind[] : P ⊆ CoInd⟦ is ⟧ coind[] p .unfold .proj₁ = consistent p .proj₁ coind[] p .unfold .proj₂ r = coind[] (consistent p .proj₂ r) module _ {𝓁c 𝓁c' 𝓁'}(I : ISCont {𝓁c}) (C : ISCont {𝓁c'}) (P : U → Set 𝓁') (bounded : P ⊆ Ind⟦ I ∪ C ⟧) (consistent : P ⊆ ⟦ I ⟧ P) where open CoInd⟦_⟧ bounded-coind[] : P ⊆ FCoInd⟦ I , C ⟧ bounded-coind[] p .unfold .proj₁ .proj₁ = consistent p .proj₁ bounded-coind[] p .unfold .proj₁ .proj₂ = bounded p bounded-coind[] p .unfold .proj₂ r = bounded-coind[] (consistent p .proj₂ r) module Equivalence {𝓁p 𝓁P 𝓁P'} where open ISCont {𝓁p} open import is-lib.InfSys.Base {𝓁} as IS open IS.MetaRule open IS.IS {- Every IS is an EndoContainer -} C[_] : ∀{𝓁c 𝓁n} → IS {𝓁c} {𝓁p} {𝓁n} U → ISCont {𝓁 ⊔ 𝓁c ⊔ 𝓁n} C[ is ] .Command u = Σ[ rn ∈ is .Names ] Σ[ c ∈ is .rules rn .Ctx ] u ≡ is .rules rn .conclu c C[ is ] .Response (rn , c , refl) = is .rules rn .Pos c C[ is ] .next (rn , c , refl) r = is .rules rn .prems c r {- Every EndoContainer is an IS -} IS[_] : ∀{𝓁'} → ISCont {𝓁'} → IS {zero} {𝓁p} {𝓁 ⊔ 𝓁'} U IS[_] C .Names = Σ[ u ∈ U ] C .Command u IS[ C ] .rules (u , c) = record { Ctx = ⊤ ; Pos = λ _ → C .Response c ; prems = λ _ r → C .next c r ; conclu = λ _ → u } {- Equivalence -} isf-to-c : ∀{𝓁c 𝓁n} → {is : IS {𝓁c} {𝓁p} {𝓁n} U}{P : U → Set 𝓁P} → ISF[ is ] P ⊆ ⟦ C[ is ] ⟧ P isf-to-c (rn , c , refl , pr) = (rn , c , refl) , pr c-to-isf : ∀{𝓁'}{C : ISCont {𝓁'}}{P : U → Set 𝓁P} → ⟦ C ⟧ P ⊆ ISF[ IS[ C ] ] P c-to-isf (c , pr) = (_ , c) , tt , refl , pr ∪-IS-eq : ∀{𝓁c 𝓁n 𝓁n'}{is : IS {𝓁c} {𝓁p} {𝓁n} U}{is' : IS {𝓁c} {𝓁p} {𝓁n'} U}{P : U → Set 𝓁P} → ISF[ is IS.∪ is' ] P ⊆ ⟦ C[ is ] ISCont.∪ C[ is' ] ⟧ P ∪-IS-eq (inj₁ rn , c , refl , pr) = inj₁ (rn , c , refl) , pr ∪-IS-eq (inj₂ rn , c , refl , pr) = inj₂ (rn , c , refl) , pr ∪-C-eq : ∀{𝓁1 𝓁2}{c : ISCont {𝓁1}}{c' : ISCont {𝓁2}}{P : U → Set 𝓁P} → ⟦ c ISCont.∪ c' ⟧ P ⊆ ISF[ IS[ c ] IS.∪ IS[ c' ] ] P ∪-C-eq (inj₁ c , r) = inj₁ (_ , c) , tt , refl , r ∪-C-eq (inj₂ c , r) = inj₂ (_ , c) , tt , refl , r ⊓-IS-eq : ∀{𝓁c 𝓁n}{is : IS {𝓁c} {𝓁p} {𝓁n} U}{P : U → Set 𝓁P}{P' : U → Set 𝓁P'} → ISF[ is ⊓ P ] P' ⊆ ⟦ C[ is ] ↾ P ⟧ P' ⊓-IS-eq (rn , (c , Pu) , refl , pr) = ((rn , c , refl) , Pu) , pr ↾-C-eq : ∀{𝓁c}{c : ISCont {𝓁c}}{P : U → Set 𝓁P}{P' : U → Set 𝓁P'} → ⟦ c ↾ P ⟧ P' ⊆ ISF[ IS[ c ] ⊓ P ] P' ↾-C-eq ((c , Pu) , r) = (_ , c) , (tt , Pu) , refl , r
{ "alphanum_fraction": 0.449943757, "avg_line_length": 38.652173913, "ext": "agda", "hexsha": "591036d28bc6a8ae63745919444a7426ac8c1b10", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "c4b78e70c3caf68d509f4360b9171d9f80ecb825", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "boystrange/FairSubtypingAgda", "max_forks_repo_path": "src/is-lib/InfSys/Container.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "c4b78e70c3caf68d509f4360b9171d9f80ecb825", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "boystrange/FairSubtypingAgda", "max_issues_repo_path": "src/is-lib/InfSys/Container.agda", "max_line_length": 143, "max_stars_count": 4, "max_stars_repo_head_hexsha": "c4b78e70c3caf68d509f4360b9171d9f80ecb825", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "boystrange/FairSubtypingAgda", "max_stars_repo_path": "src/is-lib/InfSys/Container.agda", "max_stars_repo_stars_event_max_datetime": "2022-01-24T14:38:47.000Z", "max_stars_repo_stars_event_min_datetime": "2021-07-29T14:32:30.000Z", "num_tokens": 2282, "size": 5334 }
?bug : Set ?bug = ? -- Andreas, 2014-04-16 -- Issue 1104 reported by Fabien Renaud. -- Emacs mode got confused by identifiers containing -- -- Problem: {!!} is not turned into hole bug-- : Set bug-- = ? another : Set another = (-- Senfgurke ? {!!})-- Noch eine Senfgurke ? _:--_ : Set → Set → Set _:--_ = {!!} bla = let x = Set ;-- bla ? y = Set in Set bug? : Set bug? = {!!}
{ "alphanum_fraction": 0.5314009662, "avg_line_length": 16.56, "ext": "agda", "hexsha": "349dd4c4e896a1cc1416edba1cd2bc6e7fe40a83", "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/Issue1104.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/Issue1104.agda", "max_line_length": 55, "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/Issue1104.agda", "max_stars_repo_stars_event_max_datetime": "2022-03-30T18:20:48.000Z", "max_stars_repo_stars_event_min_datetime": "2015-01-09T23:51:16.000Z", "num_tokens": 129, "size": 414 }
{-# OPTIONS --without-K #-} module hott.topology.loopspace where open import hott.core open import hott.types open import hott.functions -- The pointed loop space Ω∙ : ∀{ℓ} → Type● ℓ → Type● ℓ Ω∙ (A , a) = (a ≡ a , refl) -- The loops space. It is obtained by suppressing the base point of -- the corresponding pointed loop space. Ω : ∀{ℓ} → Type● ℓ → Type ℓ Ω = space ∘ Ω∙ -- -- The iterated pointed loop space Ω̂∙ : ∀{ℓ} → ℕ → Type● ℓ → Type● ℓ Ω̂∙ = iterate Ω∙ -- The iterated loop space. It is obtained by suppressing the base -- point of the iterated pointed loop space. Ω̂ : ∀{ℓ} → ℕ → Type● ℓ → Type ℓ Ω̂ n = space ∘ Ω̂∙ n -- Some short hands Ω²∙ : ∀{ℓ} → Type● ℓ → Type● ℓ; Ω²∙ = Ω̂∙ 2 Ω³∙ : ∀{ℓ} → Type● ℓ → Type● ℓ; Ω³∙ = Ω̂∙ 3 Ω⁴∙ : ∀{ℓ} → Type● ℓ → Type● ℓ; Ω⁴∙ = Ω̂∙ 4 Ω⁵∙ : ∀{ℓ} → Type● ℓ → Type● ℓ; Ω⁵∙ = Ω̂∙ 5 Ω⁶∙ : ∀{ℓ} → Type● ℓ → Type● ℓ; Ω⁶∙ = Ω̂∙ 6 Ω⁷∙ : ∀{ℓ} → Type● ℓ → Type● ℓ; Ω⁷∙ = Ω̂∙ 7 Ω⁸∙ : ∀{ℓ} → Type● ℓ → Type● ℓ; Ω⁸∙ = Ω̂∙ 8 Ω⁹∙ : ∀{ℓ} → Type● ℓ → Type● ℓ; Ω⁹∙ = Ω̂∙ 9 Ω² : ∀{ℓ} → Type● ℓ → Type ℓ; Ω² = Ω̂ 2 Ω³ : ∀{ℓ} → Type● ℓ → Type ℓ; Ω³ = Ω̂ 3 Ω⁴ : ∀{ℓ} → Type● ℓ → Type ℓ; Ω⁴ = Ω̂ 4 Ω⁵ : ∀{ℓ} → Type● ℓ → Type ℓ; Ω⁵ = Ω̂ 5 Ω⁶ : ∀{ℓ} → Type● ℓ → Type ℓ; Ω⁶ = Ω̂ 6 Ω⁷ : ∀{ℓ} → Type● ℓ → Type ℓ; Ω⁷ = Ω̂ 7 Ω⁸ : ∀{ℓ} → Type● ℓ → Type ℓ; Ω⁸ = Ω̂ 8 Ω⁹ : ∀{ℓ} → Type● ℓ → Type ℓ; Ω⁹ = Ω̂ 9
{ "alphanum_fraction": 0.5171641791, "avg_line_length": 24.3636363636, "ext": "agda", "hexsha": "a91421817c975e3091319a1cf787a1158afd98f4", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "876ecdcfddca1abf499e8f00db321c6dc3d5b2bc", "max_forks_repo_licenses": [ "BSD-3-Clause" ], "max_forks_repo_name": "piyush-kurur/hott", "max_forks_repo_path": "agda/hott/topology/loopspace.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "876ecdcfddca1abf499e8f00db321c6dc3d5b2bc", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "BSD-3-Clause" ], "max_issues_repo_name": "piyush-kurur/hott", "max_issues_repo_path": "agda/hott/topology/loopspace.agda", "max_line_length": 67, "max_stars_count": null, "max_stars_repo_head_hexsha": "876ecdcfddca1abf499e8f00db321c6dc3d5b2bc", "max_stars_repo_licenses": [ "BSD-3-Clause" ], "max_stars_repo_name": "piyush-kurur/hott", "max_stars_repo_path": "agda/hott/topology/loopspace.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 804, "size": 1340 }
{-# OPTIONS --cubical --no-import-sorts --safe #-} open import Cubical.Core.Everything open import Cubical.Foundations.HLevels module Cubical.Algebra.Group.Construct.Free {ℓ} (Aˢ : hSet ℓ) where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Isomorphism open import Cubical.Foundations.Univalence open import Cubical.Foundations.Path open import Cubical.Algebra.Group open import Cubical.Data.Empty.Polymorphic open import Cubical.Data.Prod open import Cubical.Relation.Binary.Reasoning.Equality A = ⟨ Aˢ ⟩ isSetA = Aˢ .snd data FreeG : Type ℓ where inj : A → FreeG _•_ : Op₂ FreeG ε : FreeG _⁻¹ : Op₁ FreeG •-assoc : Associative _•_ •-identityˡ : LeftIdentity ε _•_ •-identityʳ : RightIdentity ε _•_ •-inverseˡ : LeftInverse ε _⁻¹ _•_ •-inverseʳ : RightInverse ε _⁻¹ _•_ squash : isSet FreeG •-identity : Identity ε _•_ •-identity = •-identityˡ , •-identityʳ •-inverse : Inverse ε _⁻¹ _•_ •-inverse = •-inverseˡ , •-inverseʳ elim : ∀ {ℓ′} {B : FreeG → Type ℓ′} → (∀ x → isSet (B x)) → (∀ x → B (inj x)) → (op : ∀ {x y} → B x → B y → B (x • y)) → (e : B ε) → (inv : ∀ {x} → B x → B (x ⁻¹)) → (∀ {x y z} (a : B x) (b : B y) (c : B z) → PathP (λ i → B (•-assoc x y z i)) (op (op a b) c) (op a (op b c))) → (∀ {x} (a : B x) → PathP (λ i → B (•-identityˡ x i)) (op e a) a) → (∀ {x} (a : B x) → PathP (λ i → B (•-identityʳ x i)) (op a e) a) → (∀ {x} (a : B x) → PathP (λ i → B (•-inverseˡ x i)) (op (inv a) a) e) → (∀ {x} (a : B x) → PathP (λ i → B (•-inverseʳ x i)) (op a (inv a)) e) → (x : FreeG) → B x elim isSetB f op e inv assc idˡ idʳ invˡ invʳ (inj x) = f x elim isSetB f op e inv assc idˡ idʳ invˡ invʳ (x • y) = op (elim isSetB f op e inv assc idˡ idʳ invˡ invʳ x) (elim isSetB f op e inv assc idˡ idʳ invˡ invʳ y) elim isSetB f op e inv assc idˡ idʳ invˡ invʳ ε = e elim isSetB f op e inv assc idˡ idʳ invˡ invʳ (x ⁻¹) = inv (elim isSetB f op e inv assc idˡ idʳ invˡ invʳ x) elim isSetB f op e inv assc idˡ idʳ invˡ invʳ (•-assoc x y z i) = assc (elim isSetB f op e inv assc idˡ idʳ invˡ invʳ x) (elim isSetB f op e inv assc idˡ idʳ invˡ invʳ y) (elim isSetB f op e inv assc idˡ idʳ invˡ invʳ z) i elim isSetB f op e inv assc idˡ idʳ invˡ invʳ (•-identityˡ x i) = idˡ (elim isSetB f op e inv assc idˡ idʳ invˡ invʳ x) i elim isSetB f op e inv assc idˡ idʳ invˡ invʳ (•-identityʳ x i) = idʳ (elim isSetB f op e inv assc idˡ idʳ invˡ invʳ x) i elim isSetB f op e inv assc idˡ idʳ invˡ invʳ (•-inverseˡ x i) = invˡ (elim isSetB f op e inv assc idˡ idʳ invˡ invʳ x) i elim isSetB f op e inv assc idˡ idʳ invˡ invʳ (•-inverseʳ x i) = invʳ (elim isSetB f op e inv assc idˡ idʳ invˡ invʳ x) i elim isSetB f op e inv assc idˡ idʳ invˡ invʳ (squash x y p q i j) = isOfHLevel→isOfHLevelDep 2 isSetB (elim isSetB f op e inv assc idˡ idʳ invˡ invʳ x) (elim isSetB f op e inv assc idˡ idʳ invˡ invʳ y) (cong (elim isSetB f op e inv assc idˡ idʳ invˡ invʳ) p) (cong (elim isSetB f op e inv assc idˡ idʳ invˡ invʳ) q) (squash x y p q) i j FreeG-isGroup : IsGroup FreeG _•_ ε _⁻¹ FreeG-isGroup = record { isMonoid = record { isSemigroup = record { isMagma = record { is-set = squash } ; assoc = •-assoc } ; identity = •-identity } ; inverse = •-inverse } FreeGroup : Group ℓ FreeGroup = record { isGroup = FreeG-isGroup }
{ "alphanum_fraction": 0.586490939, "avg_line_length": 41.8620689655, "ext": "agda", "hexsha": "bb51c05f773434a3b1ba4787231ae823938f0c4e", "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": "737f922d925da0cd9a875cb0c97786179f1f4f61", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "bijan2005/univalent-foundations", "max_forks_repo_path": "Cubical/Algebra/Group/Construct/Free.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "737f922d925da0cd9a875cb0c97786179f1f4f61", "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": "bijan2005/univalent-foundations", "max_issues_repo_path": "Cubical/Algebra/Group/Construct/Free.agda", "max_line_length": 138, "max_stars_count": null, "max_stars_repo_head_hexsha": "737f922d925da0cd9a875cb0c97786179f1f4f61", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "bijan2005/univalent-foundations", "max_stars_repo_path": "Cubical/Algebra/Group/Construct/Free.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 1500, "size": 3642 }
{-# OPTIONS --cubical #-} module n2o.Network.Http where
{ "alphanum_fraction": 0.6724137931, "avg_line_length": 14.5, "ext": "agda", "hexsha": "c791c811edc3e703e7adcc7300320334434ebe23", "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": "d7903dfffcd66ae174eed9347afe008f892b2491", "max_forks_repo_licenses": [ "BSD-3-Clause" ], "max_forks_repo_name": "o4/n2o", "max_forks_repo_path": "n2o/Network/Http.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "d7903dfffcd66ae174eed9347afe008f892b2491", "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": "o4/n2o", "max_issues_repo_path": "n2o/Network/Http.agda", "max_line_length": 30, "max_stars_count": 3, "max_stars_repo_head_hexsha": "d7903dfffcd66ae174eed9347afe008f892b2491", "max_stars_repo_licenses": [ "BSD-3-Clause" ], "max_stars_repo_name": "o4/n2o", "max_stars_repo_path": "n2o/Network/Http.agda", "max_stars_repo_stars_event_max_datetime": "2019-01-02T06:37:47.000Z", "max_stars_repo_stars_event_min_datetime": "2018-11-30T11:37:10.000Z", "num_tokens": 15, "size": 58 }
{- This second-order term syntax was created from the following second-order syntax description: syntax PDiff | PD type * : 0-ary term zero : * | 𝟘 add : * * -> * | _⊕_ l20 one : * | 𝟙 mult : * * -> * | _⊗_ l20 neg : * -> * | ⊖_ r50 pd : *.* * -> * | ∂_∣_ theory (𝟘U⊕ᴸ) a |> add (zero, a) = a (𝟘U⊕ᴿ) a |> add (a, zero) = a (⊕A) a b c |> add (add(a, b), c) = add (a, add(b, c)) (⊕C) a b |> add(a, b) = add(b, a) (𝟙U⊗ᴸ) a |> mult (one, a) = a (𝟙U⊗ᴿ) a |> mult (a, one) = a (⊗A) a b c |> mult (mult(a, b), c) = mult (a, mult(b, c)) (⊗D⊕ᴸ) a b c |> mult (a, add (b, c)) = add (mult(a, b), mult(a, c)) (⊗D⊕ᴿ) a b c |> mult (add (a, b), c) = add (mult(a, c), mult(b, c)) (𝟘X⊗ᴸ) a |> mult (zero, a) = zero (𝟘X⊗ᴿ) a |> mult (a, zero) = zero (⊖N⊕ᴸ) a |> add (neg (a), a) = zero (⊖N⊕ᴿ) a |> add (a, neg (a)) = zero (⊗C) a b |> mult(a, b) = mult(b, a) (∂⊕) a : * |> x : * |- d0 (add (x, a)) = one (∂⊗) a : * |> x : * |- d0 (mult(a, x)) = a (∂C) f : (*,*).* |> x : * y : * |- d1 (d0 (f[x,y])) = d0 (d1 (f[x,y])) (∂Ch₂) f : (*,*).* g h : *.* |> x : * |- d0 (f[g[x], h[x]]) = add (mult(pd(z. f[z, h[x]], g[x]), d0(g[x])), mult(pd(z. f[g[x], z], h[x]), d0(h[x]))) (∂Ch₁) f g : *.* |> x : * |- d0 (f[g[x]]) = mult (pd (z. f[z], g[x]), d0(g[x])) -} module PDiff.Syntax where open import SOAS.Common open import SOAS.Context open import SOAS.Variable open import SOAS.Families.Core open import SOAS.Construction.Structure open import SOAS.ContextMaps.Inductive open import SOAS.Metatheory.Syntax open import PDiff.Signature private variable Γ Δ Π : Ctx α : *T 𝔛 : Familyₛ -- Inductive term declaration module PD:Terms (𝔛 : Familyₛ) where data PD : Familyₛ where var : ℐ ⇾̣ PD mvar : 𝔛 α Π → Sub PD Π Γ → PD α Γ 𝟘 : PD * Γ _⊕_ : PD * Γ → PD * Γ → PD * Γ 𝟙 : PD * Γ _⊗_ : PD * Γ → PD * Γ → PD * Γ ⊖_ : PD * Γ → PD * Γ ∂_∣_ : PD * (* ∙ Γ) → PD * Γ → PD * Γ infixl 20 _⊕_ infixl 30 _⊗_ infixr 50 ⊖_ open import SOAS.Metatheory.MetaAlgebra ⅀F 𝔛 PDᵃ : MetaAlg PD PDᵃ = record { 𝑎𝑙𝑔 = λ where (zeroₒ ⋮ _) → 𝟘 (addₒ ⋮ a , b) → _⊕_ a b (oneₒ ⋮ _) → 𝟙 (multₒ ⋮ a , b) → _⊗_ a b (negₒ ⋮ a) → ⊖_ a (pdₒ ⋮ a , b) → ∂_∣_ a b ; 𝑣𝑎𝑟 = var ; 𝑚𝑣𝑎𝑟 = λ 𝔪 mε → mvar 𝔪 (tabulate mε) } module PDᵃ = MetaAlg PDᵃ module _ {𝒜 : Familyₛ}(𝒜ᵃ : MetaAlg 𝒜) where open MetaAlg 𝒜ᵃ 𝕤𝕖𝕞 : PD ⇾̣ 𝒜 𝕊 : Sub PD Π Γ → Π ~[ 𝒜 ]↝ Γ 𝕊 (t ◂ σ) new = 𝕤𝕖𝕞 t 𝕊 (t ◂ σ) (old v) = 𝕊 σ v 𝕤𝕖𝕞 (mvar 𝔪 mε) = 𝑚𝑣𝑎𝑟 𝔪 (𝕊 mε) 𝕤𝕖𝕞 (var v) = 𝑣𝑎𝑟 v 𝕤𝕖𝕞 𝟘 = 𝑎𝑙𝑔 (zeroₒ ⋮ tt) 𝕤𝕖𝕞 (_⊕_ a b) = 𝑎𝑙𝑔 (addₒ ⋮ 𝕤𝕖𝕞 a , 𝕤𝕖𝕞 b) 𝕤𝕖𝕞 𝟙 = 𝑎𝑙𝑔 (oneₒ ⋮ tt) 𝕤𝕖𝕞 (_⊗_ a b) = 𝑎𝑙𝑔 (multₒ ⋮ 𝕤𝕖𝕞 a , 𝕤𝕖𝕞 b) 𝕤𝕖𝕞 (⊖_ a) = 𝑎𝑙𝑔 (negₒ ⋮ 𝕤𝕖𝕞 a) 𝕤𝕖𝕞 (∂_∣_ a b) = 𝑎𝑙𝑔 (pdₒ ⋮ 𝕤𝕖𝕞 a , 𝕤𝕖𝕞 b) 𝕤𝕖𝕞ᵃ⇒ : MetaAlg⇒ PDᵃ 𝒜ᵃ 𝕤𝕖𝕞 𝕤𝕖𝕞ᵃ⇒ = record { ⟨𝑎𝑙𝑔⟩ = λ{ {t = t} → ⟨𝑎𝑙𝑔⟩ t } ; ⟨𝑣𝑎𝑟⟩ = refl ; ⟨𝑚𝑣𝑎𝑟⟩ = λ{ {𝔪 = 𝔪}{mε} → cong (𝑚𝑣𝑎𝑟 𝔪) (dext (𝕊-tab mε)) } } where open ≡-Reasoning ⟨𝑎𝑙𝑔⟩ : (t : ⅀ PD α Γ) → 𝕤𝕖𝕞 (PDᵃ.𝑎𝑙𝑔 t) ≡ 𝑎𝑙𝑔 (⅀₁ 𝕤𝕖𝕞 t) ⟨𝑎𝑙𝑔⟩ (zeroₒ ⋮ _) = refl ⟨𝑎𝑙𝑔⟩ (addₒ ⋮ _) = refl ⟨𝑎𝑙𝑔⟩ (oneₒ ⋮ _) = refl ⟨𝑎𝑙𝑔⟩ (multₒ ⋮ _) = refl ⟨𝑎𝑙𝑔⟩ (negₒ ⋮ _) = refl ⟨𝑎𝑙𝑔⟩ (pdₒ ⋮ _) = refl 𝕊-tab : (mε : Π ~[ PD ]↝ Γ)(v : ℐ α Π) → 𝕊 (tabulate mε) v ≡ 𝕤𝕖𝕞 (mε v) 𝕊-tab mε new = refl 𝕊-tab mε (old v) = 𝕊-tab (mε ∘ old) v module _ (g : PD ⇾̣ 𝒜)(gᵃ⇒ : MetaAlg⇒ PDᵃ 𝒜ᵃ g) where open MetaAlg⇒ gᵃ⇒ 𝕤𝕖𝕞! : (t : PD α Γ) → 𝕤𝕖𝕞 t ≡ g t 𝕊-ix : (mε : Sub PD Π Γ)(v : ℐ α Π) → 𝕊 mε v ≡ g (index mε v) 𝕊-ix (x ◂ mε) new = 𝕤𝕖𝕞! x 𝕊-ix (x ◂ mε) (old v) = 𝕊-ix mε v 𝕤𝕖𝕞! (mvar 𝔪 mε) rewrite cong (𝑚𝑣𝑎𝑟 𝔪) (dext (𝕊-ix mε)) = trans (sym ⟨𝑚𝑣𝑎𝑟⟩) (cong (g ∘ mvar 𝔪) (tab∘ix≈id mε)) 𝕤𝕖𝕞! (var v) = sym ⟨𝑣𝑎𝑟⟩ 𝕤𝕖𝕞! 𝟘 = sym ⟨𝑎𝑙𝑔⟩ 𝕤𝕖𝕞! (_⊕_ a b) rewrite 𝕤𝕖𝕞! a | 𝕤𝕖𝕞! b = sym ⟨𝑎𝑙𝑔⟩ 𝕤𝕖𝕞! 𝟙 = sym ⟨𝑎𝑙𝑔⟩ 𝕤𝕖𝕞! (_⊗_ a b) rewrite 𝕤𝕖𝕞! a | 𝕤𝕖𝕞! b = sym ⟨𝑎𝑙𝑔⟩ 𝕤𝕖𝕞! (⊖_ a) rewrite 𝕤𝕖𝕞! a = sym ⟨𝑎𝑙𝑔⟩ 𝕤𝕖𝕞! (∂_∣_ a b) rewrite 𝕤𝕖𝕞! a | 𝕤𝕖𝕞! b = sym ⟨𝑎𝑙𝑔⟩ -- Syntax instance for the signature PD:Syn : Syntax PD:Syn = record { ⅀F = ⅀F ; ⅀:CS = ⅀:CompatStr ; mvarᵢ = PD:Terms.mvar ; 𝕋:Init = λ 𝔛 → let open PD:Terms 𝔛 in record { ⊥ = PD ⋉ PDᵃ ; ⊥-is-initial = record { ! = λ{ {𝒜 ⋉ 𝒜ᵃ} → 𝕤𝕖𝕞 𝒜ᵃ ⋉ 𝕤𝕖𝕞ᵃ⇒ 𝒜ᵃ } ; !-unique = λ{ {𝒜 ⋉ 𝒜ᵃ} (f ⋉ fᵃ⇒) {x = t} → 𝕤𝕖𝕞! 𝒜ᵃ f fᵃ⇒ t } } } } -- Instantiation of the syntax and metatheory open Syntax PD:Syn public open PD:Terms public open import SOAS.Families.Build public open import SOAS.Syntax.Shorthands PDᵃ public open import SOAS.Metatheory PD:Syn public -- Derived operations ∂₀_ : {𝔛 : Familyₛ} → PD 𝔛 * (* ∙ Γ) → PD 𝔛 * (* ∙ Γ) ∂₀_ {𝔛 = 𝔛} e = ∂ Theory.𝕨𝕜 𝔛 e ∣ x₀ ∂₁_ : {𝔛 : Familyₛ} → PD 𝔛 * (* ∙ * ∙ Γ) → PD 𝔛 * (* ∙ * ∙ Γ) ∂₁_ {𝔛 = 𝔛} e = ∂ Theory.𝕨𝕜 𝔛 e ∣ x₁ infix 10 ∂₀_ ∂₁_
{ "alphanum_fraction": 0.4719056189, "avg_line_length": 28.9075144509, "ext": "agda", "hexsha": "55172e0dea10c5b0ce79e05b26637c0486a31c92", "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/PDiff/Syntax.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/PDiff/Syntax.agda", "max_line_length": 151, "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/PDiff/Syntax.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": 3267, "size": 5001 }
module TruthValue where open import OscarPrelude record TruthValue : Set where constructor ⟨_⟩ field truthValue : Bool open TruthValue public
{ "alphanum_fraction": 0.7612903226, "avg_line_length": 11.9230769231, "ext": "agda", "hexsha": "0984b4e9c072cffcba02c12dc431d405e10eed46", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "52e1cdbdee54d9a8eaee04ee518a0d7f61d25afb", "max_forks_repo_licenses": [ "RSA-MD" ], "max_forks_repo_name": "m0davis/oscar", "max_forks_repo_path": "archive/agda-1/TruthValue.agda", "max_issues_count": 1, "max_issues_repo_head_hexsha": "52e1cdbdee54d9a8eaee04ee518a0d7f61d25afb", "max_issues_repo_issues_event_max_datetime": "2019-05-11T23:33:04.000Z", "max_issues_repo_issues_event_min_datetime": "2019-04-29T00:35:04.000Z", "max_issues_repo_licenses": [ "RSA-MD" ], "max_issues_repo_name": "m0davis/oscar", "max_issues_repo_path": "archive/agda-1/TruthValue.agda", "max_line_length": 24, "max_stars_count": null, "max_stars_repo_head_hexsha": "52e1cdbdee54d9a8eaee04ee518a0d7f61d25afb", "max_stars_repo_licenses": [ "RSA-MD" ], "max_stars_repo_name": "m0davis/oscar", "max_stars_repo_path": "archive/agda-1/TruthValue.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 40, "size": 155 }
module Base.Free.Instance.Identity.Properties where open import Relation.Binary.PropositionalEquality using (refl; cong) open import Base.Free using (Free; pure; impure) open import Base.Free.Instance.Identity renaming (Identity to IdentityF) open import Base.Isomorphism using (_≃_) open _≃_ -- The usual `Identity` monad representation an the free version are isomorphic. data Identity (A : Set) : Set where Ident : A → Identity A Identity≃IdentityF : ∀ {A} → Identity A ≃ IdentityF A to Identity≃IdentityF (Ident x) = pure x from Identity≃IdentityF (pure x) = Ident x from∘to Identity≃IdentityF (Ident x) = refl to∘from Identity≃IdentityF (pure x) = refl
{ "alphanum_fraction": 0.6649145861, "avg_line_length": 36.2380952381, "ext": "agda", "hexsha": "d6e3a5ce91bb1ede6182dcbc7febbd3a350080ce", "lang": "Agda", "max_forks_count": 3, "max_forks_repo_forks_event_max_datetime": "2021-05-14T07:48:41.000Z", "max_forks_repo_forks_event_min_datetime": "2020-04-08T11:23:46.000Z", "max_forks_repo_head_hexsha": "6931b9ca652a185a92dd824373f092823aea4ea9", "max_forks_repo_licenses": [ "BSD-3-Clause" ], "max_forks_repo_name": "FreeProving/free-compiler", "max_forks_repo_path": "base/agda/Base/Free/Instance/Identity/Properties.agda", "max_issues_count": 120, "max_issues_repo_head_hexsha": "6931b9ca652a185a92dd824373f092823aea4ea9", "max_issues_repo_issues_event_max_datetime": "2020-12-08T07:46:01.000Z", "max_issues_repo_issues_event_min_datetime": "2020-04-09T09:40:39.000Z", "max_issues_repo_licenses": [ "BSD-3-Clause" ], "max_issues_repo_name": "FreeProving/free-compiler", "max_issues_repo_path": "base/agda/Base/Free/Instance/Identity/Properties.agda", "max_line_length": 109, "max_stars_count": 36, "max_stars_repo_head_hexsha": "6931b9ca652a185a92dd824373f092823aea4ea9", "max_stars_repo_licenses": [ "BSD-3-Clause" ], "max_stars_repo_name": "FreeProving/free-compiler", "max_stars_repo_path": "base/agda/Base/Free/Instance/Identity/Properties.agda", "max_stars_repo_stars_event_max_datetime": "2021-08-21T13:38:23.000Z", "max_stars_repo_stars_event_min_datetime": "2020-02-06T11:03:34.000Z", "num_tokens": 187, "size": 761 }
module Nats.Multiply.Comm where open import Nats open import Equality open import Function open import Nats.Add.Comm open import Nats.Add.Assoc ------------------------------------------------------------------------ -- internal stuffs private a*0=0*a : ∀ a → a * 0 ≡ 0 a*0=0*a zero = refl a*0=0*a (suc a) = a*0=0*a a a+a*b=a*++b : ∀ a b → a + a * b ≡ a * suc b a+a*b=a*++b zero _ = refl a+a*b=a*++b (suc a) b rewrite nat-add-comm b $ a * suc b | nat-add-comm b $ a * b | sym $ nat-add-assoc a (a * b) b | a+a*b=a*++b a b = refl a*b=b*a : ∀ a b → a * b ≡ b * a a*b=b*a zero b rewrite a*0=0*a b = refl a*b=b*a (suc a) b rewrite a*b=b*a a b | a+a*b=a*++b b a = refl ------------------------------------------------------------------------ -- public aliases nat-multiply-comm : ∀ a b → a * b ≡ b * a nat-multiply-comm = a*b=b*a
{ "alphanum_fraction": 0.4258271078, "avg_line_length": 22.8536585366, "ext": "agda", "hexsha": "1ffd22b0948c2d4b391f0d333c8dd5b8454aab63", "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": "7dc0ea4782a5ff960fe31bdcb8718ce478eaddbc", "max_forks_repo_licenses": [ "Apache-2.0" ], "max_forks_repo_name": "ice1k/Theorems", "max_forks_repo_path": "src/Nats/Multiply/Comm.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "7dc0ea4782a5ff960fe31bdcb8718ce478eaddbc", "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": "ice1k/Theorems", "max_issues_repo_path": "src/Nats/Multiply/Comm.agda", "max_line_length": 72, "max_stars_count": 1, "max_stars_repo_head_hexsha": "7dc0ea4782a5ff960fe31bdcb8718ce478eaddbc", "max_stars_repo_licenses": [ "Apache-2.0" ], "max_stars_repo_name": "ice1k/Theorems", "max_stars_repo_path": "src/Nats/Multiply/Comm.agda", "max_stars_repo_stars_event_max_datetime": "2020-04-15T15:28:03.000Z", "max_stars_repo_stars_event_min_datetime": "2020-04-15T15:28:03.000Z", "num_tokens": 321, "size": 937 }
postulate A : →.B
{ "alphanum_fraction": 0.55, "avg_line_length": 6.6666666667, "ext": "agda", "hexsha": "8a4f979e346512025d11574e2e7e2857c479f859", "lang": "Agda", "max_forks_count": 371, "max_forks_repo_forks_event_max_datetime": "2022-03-30T19:00:30.000Z", "max_forks_repo_forks_event_min_datetime": "2015-01-03T14:04:08.000Z", "max_forks_repo_head_hexsha": "7f58030124fa99dfbf8db376659416f3ad8384de", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "cruhland/agda", "max_forks_repo_path": "test/Fail/Invalid-name-part2.agda", "max_issues_count": 4066, "max_issues_repo_head_hexsha": "7f58030124fa99dfbf8db376659416f3ad8384de", "max_issues_repo_issues_event_max_datetime": "2022-03-31T21:14:49.000Z", "max_issues_repo_issues_event_min_datetime": "2015-01-10T11:24:51.000Z", "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "cruhland/agda", "max_issues_repo_path": "test/Fail/Invalid-name-part2.agda", "max_line_length": 9, "max_stars_count": 1989, "max_stars_repo_head_hexsha": "7f58030124fa99dfbf8db376659416f3ad8384de", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "cruhland/agda", "max_stars_repo_path": "test/Fail/Invalid-name-part2.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": 10, "size": 20 }
{-# OPTIONS --without-K --exact-split #-} module 13-propositional-truncation where import 12-function-extensionality open 12-function-extensionality public -- Section 13 Propositional truncations, the image of a map, and the replacement axiom -------------------------------------------------------------------------------- -- Section 13.1 Propositional truncations -- Definition 13.1.1 type-hom-Prop : { l1 l2 : Level} (P : UU-Prop l1) (Q : UU-Prop l2) → UU (l1 ⊔ l2) type-hom-Prop P Q = type-Prop P → type-Prop Q hom-Prop : { l1 l2 : Level} → UU-Prop l1 → UU-Prop l2 → UU-Prop (l1 ⊔ l2) hom-Prop P Q = pair ( type-hom-Prop P Q) ( is-prop-function-type (is-prop-type-Prop Q)) is-prop-type-hom-Prop : { l1 l2 : Level} (P : UU-Prop l1) (Q : UU-Prop l2) → is-prop (type-hom-Prop P Q) is-prop-type-hom-Prop P Q = is-prop-function-type (is-prop-type-Prop Q) equiv-Prop : { l1 l2 : Level} (P : UU-Prop l1) (Q : UU-Prop l2) → UU (l1 ⊔ l2) equiv-Prop P Q = (type-Prop P) ≃ (type-Prop Q) precomp-Prop : { l1 l2 l3 : Level} {A : UU l1} (P : UU-Prop l2) → (A → type-Prop P) → (Q : UU-Prop l3) → (type-hom-Prop P Q) → (A → type-Prop Q) precomp-Prop P f Q g = g ∘ f is-propositional-truncation : ( l : Level) {l1 l2 : Level} {A : UU l1} (P : UU-Prop l2) → ( A → type-Prop P) → UU (lsuc l ⊔ l1 ⊔ l2) is-propositional-truncation l P f = (Q : UU-Prop l) → is-equiv (precomp-Prop P f Q) universal-property-propositional-truncation : ( l : Level) {l1 l2 : Level} {A : UU l1} (P : UU-Prop l2) (f : A → type-Prop P) → UU (lsuc l ⊔ l1 ⊔ l2) universal-property-propositional-truncation l {A = A} P f = (Q : UU-Prop l) (g : A → type-Prop Q) → is-contr (Σ (type-hom-Prop P Q) (λ h → (h ∘ f) ~ g)) -- Some unnumbered remarks after Definition 13.1.3 universal-property-is-propositional-truncation : (l : Level) {l1 l2 : Level} {A : UU l1} (P : UU-Prop l2) (f : A → type-Prop P) → is-propositional-truncation l P f → universal-property-propositional-truncation l P f universal-property-is-propositional-truncation l P f is-ptr-f Q g = is-contr-equiv' ( Σ (type-hom-Prop P Q) (λ h → Id (h ∘ f) g)) ( equiv-tot (λ h → equiv-funext)) ( is-contr-map-is-equiv (is-ptr-f Q) g) map-is-propositional-truncation : {l1 l2 l3 : Level} {A : UU l1} (P : UU-Prop l2) (f : A → type-Prop P) → ({l : Level} → is-propositional-truncation l P f) → (Q : UU-Prop l3) (g : A → type-Prop Q) → type-hom-Prop P Q map-is-propositional-truncation P f is-ptr-f Q g = pr1 ( center ( universal-property-is-propositional-truncation _ P f is-ptr-f Q g)) htpy-is-propositional-truncation : {l1 l2 l3 : Level} {A : UU l1} (P : UU-Prop l2) (f : A → type-Prop P) → (is-ptr-f : {l : Level} → is-propositional-truncation l P f) → (Q : UU-Prop l3) (g : A → type-Prop Q) → ((map-is-propositional-truncation P f is-ptr-f Q g) ∘ f) ~ g htpy-is-propositional-truncation P f is-ptr-f Q g = pr2 ( center ( universal-property-is-propositional-truncation _ P f is-ptr-f Q g)) is-propositional-truncation-universal-property : (l : Level) {l1 l2 : Level} {A : UU l1} (P : UU-Prop l2) (f : A → type-Prop P) → universal-property-propositional-truncation l P f → is-propositional-truncation l P f is-propositional-truncation-universal-property l P f up-f Q = is-equiv-is-contr-map ( λ g → is-contr-equiv ( Σ (type-hom-Prop P Q) (λ h → (h ∘ f) ~ g)) ( equiv-tot (λ h → equiv-funext)) ( up-f Q g)) -- Remark 13.1.2 is-propositional-truncation' : ( l : Level) {l1 l2 : Level} {A : UU l1} (P : UU-Prop l2) → ( A → type-Prop P) → UU (lsuc l ⊔ l1 ⊔ l2) is-propositional-truncation' l {A = A} P f = (Q : UU-Prop l) → (A → type-Prop Q) → (type-hom-Prop P Q) is-propositional-truncation-simpl : { l1 l2 : Level} {A : UU l1} (P : UU-Prop l2) ( f : A → type-Prop P) → ( (l : Level) → is-propositional-truncation' l P f) → ( (l : Level) → is-propositional-truncation l P f) is-propositional-truncation-simpl P f up-P l Q = is-equiv-is-prop ( is-prop-Π (λ x → is-prop-type-Prop Q)) ( is-prop-Π (λ x → is-prop-type-Prop Q)) ( up-P l Q) -- Example 13.1.3 -------------------------------------------------------------------------------- -- Section 6.3 Pointed types -- Definition 6.3.1 UU-pt : (i : Level) → UU (lsuc i) UU-pt i = Σ (UU i) (λ X → X) type-UU-pt : {i : Level} → UU-pt i → UU i type-UU-pt = pr1 pt-UU-pt : {i : Level} (A : UU-pt i) → type-UU-pt A pt-UU-pt = pr2 -- Definition 6.3.2 _→*_ : {i j : Level} → UU-pt i → UU-pt j → UU-pt (i ⊔ j) A →* B = pair ( Σ (type-UU-pt A → type-UU-pt B) (λ f → Id (f (pt-UU-pt A)) (pt-UU-pt B))) ( pair ( const (type-UU-pt A) (type-UU-pt B) (pt-UU-pt B)) ( refl)) -- Definition 6.3.3 Ω : {i : Level} → UU-pt i → UU-pt i Ω A = pair (Id (pt-UU-pt A) (pt-UU-pt A)) refl -- Definition 6.3.4 iterated-loop-space : {i : Level} → ℕ → UU-pt i → UU-pt i iterated-loop-space zero-ℕ A = A iterated-loop-space (succ-ℕ n) A = Ω (iterated-loop-space n A) -------------------------------------------------------------------------------- is-propositional-truncation-const-star : { l1 : Level} (A : UU-pt l1) ( l : Level) → is-propositional-truncation l unit-Prop (const (type-UU-pt A) unit star) is-propositional-truncation-const-star A = is-propositional-truncation-simpl ( unit-Prop) ( const (type-UU-pt A) unit star) ( λ l P f → const unit (type-Prop P) (f (pt-UU-pt A))) -- Example 13.1.4 is-propositional-truncation-id : { l1 : Level} (P : UU-Prop l1) → ( l : Level) → is-propositional-truncation l P id is-propositional-truncation-id P l Q = is-equiv-id (type-hom-Prop P Q) -- Proposition 13.1.5 abstract is-equiv-is-equiv-precomp-Prop : {l1 l2 : Level} (P : UU-Prop l1) (Q : UU-Prop l2) (f : type-hom-Prop P Q) → ((l : Level) (R : UU-Prop l) → is-equiv (precomp-Prop Q f R)) → is-equiv f is-equiv-is-equiv-precomp-Prop P Q f is-equiv-precomp-f = is-equiv-is-equiv-precomp-subuniverse id (λ l → is-prop) P Q f is-equiv-precomp-f triangle-3-for-2-is-ptruncation : {l1 l2 l3 : Level} {A : UU l1} (P : UU-Prop l2) (P' : UU-Prop l3) (f : A → type-Prop P) (f' : A → type-Prop P') (h : type-hom-Prop P P') (H : (h ∘ f) ~ f') → {l : Level} (Q : UU-Prop l) → ( precomp-Prop P' f' Q) ~ ( (precomp-Prop P f Q) ∘ (precomp h (type-Prop Q))) triangle-3-for-2-is-ptruncation P P' f f' h H Q g = eq-htpy (λ p → inv (ap g (H p))) is-equiv-is-ptruncation-is-ptruncation : {l1 l2 l3 : Level} {A : UU l1} (P : UU-Prop l2) (P' : UU-Prop l3) (f : A → type-Prop P) (f' : A → type-Prop P') (h : type-hom-Prop P P') (H : (h ∘ f) ~ f') → ((l : Level) → is-propositional-truncation l P f) → ((l : Level) → is-propositional-truncation l P' f') → is-equiv h is-equiv-is-ptruncation-is-ptruncation P P' f f' h H is-ptr-P is-ptr-P' = is-equiv-is-equiv-precomp-Prop P P' h ( λ l Q → is-equiv-right-factor ( precomp-Prop P' f' Q) ( precomp-Prop P f Q) ( precomp h (type-Prop Q)) ( triangle-3-for-2-is-ptruncation P P' f f' h H Q) ( is-ptr-P l Q) ( is-ptr-P' l Q)) is-ptruncation-is-ptruncation-is-equiv : {l1 l2 l3 : Level} {A : UU l1} (P : UU-Prop l2) (P' : UU-Prop l3) (f : A → type-Prop P) (f' : A → type-Prop P') (h : type-hom-Prop P P') (H : (h ∘ f) ~ f') → is-equiv h → ((l : Level) → is-propositional-truncation l P f) → ((l : Level) → is-propositional-truncation l P' f') is-ptruncation-is-ptruncation-is-equiv P P' f f' h H is-equiv-h is-ptr-f l Q = is-equiv-comp ( precomp-Prop P' f' Q) ( precomp-Prop P f Q) ( precomp h (type-Prop Q)) ( triangle-3-for-2-is-ptruncation P P' f f' h H Q) ( is-equiv-precomp-is-equiv h is-equiv-h (type-Prop Q)) ( is-ptr-f l Q) is-ptruncation-is-equiv-is-ptruncation : {l1 l2 l3 : Level} {A : UU l1} (P : UU-Prop l2) (P' : UU-Prop l3) (f : A → type-Prop P) (f' : A → type-Prop P') (h : type-hom-Prop P P') (H : (h ∘ f) ~ f') → ((l : Level) → is-propositional-truncation l P' f') → is-equiv h → ((l : Level) → is-propositional-truncation l P f) is-ptruncation-is-equiv-is-ptruncation P P' f f' h H is-ptr-f' is-equiv-h l Q = is-equiv-left-factor ( precomp-Prop P' f' Q) ( precomp-Prop P f Q) ( precomp h (type-Prop Q)) ( triangle-3-for-2-is-ptruncation P P' f f' h H Q) ( is-ptr-f' l Q) ( is-equiv-precomp-is-equiv h is-equiv-h (type-Prop Q)) -- Corollary 13.1.6 is-uniquely-unique-propositional-truncation : {l1 l2 l3 : Level} {A : UU l1} (P : UU-Prop l2) (P' : UU-Prop l3) (f : A → type-Prop P) (f' : A → type-Prop P') → ({l : Level} → is-propositional-truncation l P f) → ({l : Level} → is-propositional-truncation l P' f') → is-contr (Σ (equiv-Prop P P') (λ e → (map-equiv e ∘ f) ~ f')) is-uniquely-unique-propositional-truncation P P' f f' is-ptr-f is-ptr-f' = is-contr-total-Eq-substructure ( universal-property-is-propositional-truncation _ P f is-ptr-f P' f') ( is-subtype-is-equiv) ( map-is-propositional-truncation P f is-ptr-f P' f') ( htpy-is-propositional-truncation P f is-ptr-f P' f') ( is-equiv-is-ptruncation-is-ptruncation P P' f f' ( map-is-propositional-truncation P f is-ptr-f P' f') ( htpy-is-propositional-truncation P f is-ptr-f P' f') ( λ l → is-ptr-f) ( λ l → is-ptr-f')) -- Axiom 13.1.8 postulate type-trunc-Prop : {l : Level} → UU l → UU l postulate is-prop-type-trunc-Prop : {l : Level} (A : UU l) → is-prop (type-trunc-Prop A) trunc-Prop : {l : Level} → UU l → UU-Prop l trunc-Prop A = pair (type-trunc-Prop A) (is-prop-type-trunc-Prop A) postulate unit-trunc-Prop : {l : Level} (A : UU l) → A → type-Prop (trunc-Prop A) postulate is-propositional-truncation-trunc-Prop : {l1 l2 : Level} (A : UU l1) → is-propositional-truncation l2 (trunc-Prop A) (unit-trunc-Prop A) universal-property-trunc-Prop : {l1 l2 : Level} (A : UU l1) → universal-property-propositional-truncation l2 ( trunc-Prop A) ( unit-trunc-Prop A) universal-property-trunc-Prop A = universal-property-is-propositional-truncation _ ( trunc-Prop A) ( unit-trunc-Prop A) ( is-propositional-truncation-trunc-Prop A) map-universal-property-trunc-Prop : {l1 l2 : Level} {A : UU l1} (P : UU-Prop l2) → (A → type-Prop P) → type-hom-Prop (trunc-Prop A) P map-universal-property-trunc-Prop {A = A} P f = map-is-propositional-truncation ( trunc-Prop A) ( unit-trunc-Prop A) ( is-propositional-truncation-trunc-Prop A) ( P) ( f) -- Proposition 13.1.9 unique-functor-trunc-Prop : {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B) → is-contr ( Σ ( type-hom-Prop (trunc-Prop A) (trunc-Prop B)) ( λ h → (h ∘ (unit-trunc-Prop A)) ~ ((unit-trunc-Prop B) ∘ f))) unique-functor-trunc-Prop {l1} {l2} {A} {B} f = universal-property-trunc-Prop A (trunc-Prop B) ((unit-trunc-Prop B) ∘ f) functor-trunc-Prop : {l1 l2 : Level} {A : UU l1} {B : UU l2} → (A → B) → type-hom-Prop (trunc-Prop A) (trunc-Prop B) functor-trunc-Prop f = pr1 (center (unique-functor-trunc-Prop f)) htpy-functor-trunc-Prop : { l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B) → ( (functor-trunc-Prop f) ∘ (unit-trunc-Prop A)) ~ ((unit-trunc-Prop B) ∘ f) htpy-functor-trunc-Prop f = pr2 (center (unique-functor-trunc-Prop f)) htpy-uniqueness-functor-trunc-Prop : { l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B) → ( h : type-hom-Prop (trunc-Prop A) (trunc-Prop B)) → ( ( h ∘ (unit-trunc-Prop A)) ~ ((unit-trunc-Prop B) ∘ f)) → (functor-trunc-Prop f) ~ h htpy-uniqueness-functor-trunc-Prop f h H = htpy-eq (ap pr1 (contraction (unique-functor-trunc-Prop f) (pair h H))) id-functor-trunc-Prop : { l1 : Level} {A : UU l1} → functor-trunc-Prop (id {A = A}) ~ id id-functor-trunc-Prop {l1} {A} = htpy-uniqueness-functor-trunc-Prop id id refl-htpy comp-functor-trunc-Prop : { l1 l2 l3 : Level} {A : UU l1} {B : UU l2} {C : UU l3} ( g : B → C) (f : A → B) → ( functor-trunc-Prop (g ∘ f)) ~ ( (functor-trunc-Prop g) ∘ (functor-trunc-Prop f)) comp-functor-trunc-Prop g f = htpy-uniqueness-functor-trunc-Prop ( g ∘ f) ( (functor-trunc-Prop g) ∘ (functor-trunc-Prop f)) ( ( (functor-trunc-Prop g) ·l (htpy-functor-trunc-Prop f)) ∙h ( ( htpy-functor-trunc-Prop g) ·r f)) -------------------------------------------------------------------------------- -- Section 13.2 Propositional truncations as higher inductive types -- Definition 13.2.1 case-paths-induction-principle-propositional-truncation : { l : Level} {l1 l2 : Level} {A : UU l1} ( P : UU-Prop l2) (α : (p q : type-Prop P) → Id p q) (f : A → type-Prop P) → ( B : type-Prop P → UU l) → UU (l ⊔ l2) case-paths-induction-principle-propositional-truncation P α f B = (p q : type-Prop P) (x : B p) (y : B q) → Id (tr B (α p q) x) y induction-principle-propositional-truncation : (l : Level) {l1 l2 : Level} {A : UU l1} (P : UU-Prop l2) (α : (p q : type-Prop P) → Id p q) (f : A → type-Prop P) → UU (lsuc l ⊔ l1 ⊔ l2) induction-principle-propositional-truncation l {l1} {l2} {A} P α f = ( B : type-Prop P → UU l) → ( g : (x : A) → (B (f x))) → ( β : case-paths-induction-principle-propositional-truncation P α f B) → Σ ((p : type-Prop P) → B p) (λ h → (x : A) → Id (h (f x)) (g x)) -- Lemma 13.2.2 is-prop-case-paths-induction-principle-propositional-truncation : { l : Level} {l1 l2 : Level} {A : UU l1} ( P : UU-Prop l2) (α : (p q : type-Prop P) → Id p q) (f : A → type-Prop P) → ( B : type-Prop P → UU l) → case-paths-induction-principle-propositional-truncation P α f B → ( p : type-Prop P) → is-prop (B p) is-prop-case-paths-induction-principle-propositional-truncation P α f B β p = is-prop-is-contr-if-inh (λ x → pair (tr B (α p p) x) (β p p x)) case-paths-induction-principle-propositional-truncation-is-prop : { l : Level} {l1 l2 : Level} {A : UU l1} ( P : UU-Prop l2) (α : (p q : type-Prop P) → Id p q) (f : A → type-Prop P) → ( B : type-Prop P → UU l) → ( (p : type-Prop P) → is-prop (B p)) → case-paths-induction-principle-propositional-truncation P α f B case-paths-induction-principle-propositional-truncation-is-prop P α f B is-prop-B p q x y = is-prop'-is-prop (is-prop-B q) (tr B (α p q) x) y -- Definition 13.2.3 dependent-universal-property-propositional-truncation : ( l : Level) {l1 l2 : Level} {A : UU l1} ( P : UU-Prop l2) (f : A → type-Prop P) → UU (lsuc l ⊔ l1 ⊔ l2) dependent-universal-property-propositional-truncation l {l1} {l2} {A} P f = ( Q : type-Prop P → UU-Prop l) → is-equiv (precomp-Π f (type-Prop ∘ Q)) -- Theorem 13.2.4 abstract dependent-universal-property-is-propositional-truncation : { l1 l2 : Level} {A : UU l1} (P : UU-Prop l2) (f : A → type-Prop P) → ( {l : Level} → is-propositional-truncation l P f) → ( {l : Level} → dependent-universal-property-propositional-truncation l P f) dependent-universal-property-is-propositional-truncation {l1} {l2} {A} P f is-ptr-f Q = is-fiberwise-equiv-is-equiv-toto-is-equiv-base-map ( λ (g : A → type-Prop P) → (x : A) → type-Prop (Q (g x))) ( precomp f (type-Prop P)) ( λ h → precomp-Π f (λ p → type-Prop (Q (h p)))) ( is-ptr-f P) ( is-equiv-top-is-equiv-bottom-square ( inv-choice-∞ { C = λ (x : type-Prop P) (p : type-Prop P) → type-Prop (Q p)}) ( inv-choice-∞ { C = λ (x : A) (p : type-Prop P) → type-Prop (Q p)}) ( toto ( λ (g : A → type-Prop P) → (x : A) → type-Prop (Q (g x))) ( precomp f (type-Prop P)) ( λ h → precomp-Π f (λ p → type-Prop (Q (h p))))) ( precomp f (Σ (type-Prop P) (λ p → type-Prop (Q p)))) ( ind-Σ (λ h h' → refl)) ( is-equiv-inv-choice-∞) ( is-equiv-inv-choice-∞) ( is-ptr-f (Σ-Prop P Q))) ( id {A = type-Prop P}) dependent-universal-property-trunc-Prop : {l l1 : Level} (A : UU l1) → dependent-universal-property-propositional-truncation l ( trunc-Prop A) ( unit-trunc-Prop A) dependent-universal-property-trunc-Prop A = dependent-universal-property-is-propositional-truncation ( trunc-Prop A) ( unit-trunc-Prop A) ( is-propositional-truncation-trunc-Prop A) abstract is-propositional-truncation-dependent-universal-property : { l1 l2 : Level} {A : UU l1} (P : UU-Prop l2) (f : A → type-Prop P) → ( {l : Level} → dependent-universal-property-propositional-truncation l P f) → ( {l : Level} → is-propositional-truncation l P f) is-propositional-truncation-dependent-universal-property P f dup-f Q = dup-f (λ p → Q) abstract induction-principle-dependent-universal-property-propositional-truncation : { l1 l2 : Level} {A : UU l1} (P : UU-Prop l2) (f : A → type-Prop P) → ( {l : Level} → dependent-universal-property-propositional-truncation l P f) → ( {l : Level} → induction-principle-propositional-truncation l P ( is-prop'-is-prop (is-prop-type-Prop P)) f) induction-principle-dependent-universal-property-propositional-truncation P f dup-f B g α = tot ( λ h → htpy-eq) ( center ( is-contr-map-is-equiv ( dup-f ( λ p → pair ( B p) ( is-prop-case-paths-induction-principle-propositional-truncation ( P) ( is-prop'-is-prop (is-prop-type-Prop P)) f B α p))) ( g))) abstract dependent-universal-property-induction-principle-propositional-truncation : { l1 l2 : Level} {A : UU l1} (P : UU-Prop l2) (f : A → type-Prop P) → ( {l : Level} → induction-principle-propositional-truncation l P ( is-prop'-is-prop (is-prop-type-Prop P)) f) → ( {l : Level} → dependent-universal-property-propositional-truncation l P f) dependent-universal-property-induction-principle-propositional-truncation P f ind-f Q = is-equiv-is-prop ( is-prop-Π (λ p → is-prop-type-Prop (Q p))) ( is-prop-Π (λ a → is-prop-type-Prop (Q (f a)))) ( λ g → pr1 ( ind-f ( λ p → type-Prop (Q p)) ( g) ( case-paths-induction-principle-propositional-truncation-is-prop ( P) ( is-prop'-is-prop (is-prop-type-Prop P)) ( f) ( λ p → type-Prop (Q p)) ( λ p → is-prop-type-Prop (Q p))))) -------------------------------------------------------------------------------- {- We introduce the image inclusion of a map. -} comp-hom-slice : {l1 l2 l3 l4 : Level} {X : UU l1} {A : UU l2} {B : UU l3} {C : UU l4} (f : A → X) (g : B → X) (h : C → X) → hom-slice g h → hom-slice f g → hom-slice f h comp-hom-slice f g h j i = pair ( ( map-hom-slice g h j) ∘ ( map-hom-slice f g i)) ( ( triangle-hom-slice f g i) ∙h ( (triangle-hom-slice g h j) ·r (map-hom-slice f g i))) id-hom-slice : {l1 l2 : Level} {X : UU l1} {A : UU l2} (f : A → X) → hom-slice f f id-hom-slice f = pair id refl-htpy is-equiv-hom-slice : {l1 l2 l3 : Level} {X : UU l1} {A : UU l2} {B : UU l3} (f : A → X) (g : B → X) → hom-slice f g → UU (l2 ⊔ l3) is-equiv-hom-slice f g h = is-equiv (map-hom-slice f g h) precomp-emb : { l1 l2 l3 l4 : Level} {X : UU l1} {A : UU l2} (f : A → X) {B : UU l3} ( i : B ↪ X) (q : hom-slice f (map-emb i)) → {C : UU l4} ( j : C ↪ X) (r : hom-slice (map-emb i) (map-emb j)) → hom-slice f (map-emb j) precomp-emb f i q j r = pair ( ( map-hom-slice (map-emb i) (map-emb j) r) ∘ ( map-hom-slice f (map-emb i) q)) ( ( triangle-hom-slice f (map-emb i) q) ∙h ( ( triangle-hom-slice (map-emb i) (map-emb j) r) ·r ( map-hom-slice f (map-emb i) q))) is-prop-hom-slice : { l1 l2 l3 : Level} {X : UU l1} {A : UU l2} (f : A → X) → { B : UU l3} (i : B ↪ X) → is-prop (hom-slice f (map-emb i)) is-prop-hom-slice {X = X} f i = is-prop-is-equiv ( (x : X) → fib f x → fib (map-emb i) x) ( fiberwise-hom-hom-slice f (map-emb i)) ( is-equiv-fiberwise-hom-hom-slice f (map-emb i)) ( is-prop-Π ( λ x → is-prop-Π ( λ p → is-prop-map-is-emb (map-emb i) (is-emb-map-emb i) x))) universal-property-image : ( l : Level) {l1 l2 l3 : Level} {X : UU l1} {A : UU l2} (f : A → X) → { B : UU l3} (i : B ↪ X) (q : hom-slice f (map-emb i)) → UU (lsuc l ⊔ l1 ⊔ l2 ⊔ l3) universal-property-image l {X = X} f i q = ( C : UU l) (j : C ↪ X) → is-equiv (precomp-emb f i q j) universal-property-image' : ( l : Level) {l1 l2 l3 : Level} {X : UU l1} {A : UU l2} (f : A → X) → { B : UU l3} (i : B ↪ X) (q : hom-slice f (map-emb i)) → UU (lsuc l ⊔ l1 ⊔ l2 ⊔ l3) universal-property-image' l {X = X} f i q = ( C : UU l) (j : C ↪ X) → hom-slice f (map-emb j) → hom-slice (map-emb i) (map-emb j) universal-property-image-universal-property-image' : ( l : Level) {l1 l2 l3 : Level} {X : UU l1} {A : UU l2} (f : A → X) → { B : UU l3} (i : B ↪ X) (q : hom-slice f (map-emb i)) → universal-property-image' l f i q → universal-property-image l f i q universal-property-image-universal-property-image' l f i q up' C j = is-equiv-is-prop ( is-prop-hom-slice (map-emb i) j) ( is-prop-hom-slice f j) ( up' C j) {- Remark 14.4.4 -} universal-property-image-has-section : (l : Level) {l1 l2 : Level} {X : UU l1} {A : UU l2} (f : A → X) → sec f → universal-property-image l f emb-id (pair f refl-htpy) universal-property-image-has-section l f (pair g H) = universal-property-image-universal-property-image' l f emb-id (pair f refl-htpy) ( λ B m h → pair ((pr1 h) ∘ g) ( λ x → (inv (H x)) ∙ (pr2 h (g x)))) universal-property-image-is-emb : (l : Level) {l1 l2 : Level} {X : UU l1} {A : UU l2} (f : A → X) → (H : is-emb f) → universal-property-image l f (pair f H) (pair id refl-htpy) universal-property-image-is-emb l f H = universal-property-image-universal-property-image' l f (pair f H) (pair id refl-htpy) ( λ B m h → h) {- The existence of the image -} im : {l1 l2 : Level} {X : UU l1} {A : UU l2} (f : A → X) → UU (l1 ⊔ l2) im {X = X} {A} f = Σ X (λ x → type-trunc-Prop (fib f x)) inclusion-im : {l1 l2 : Level} {X : UU l1} {A : UU l2} (f : A → X) → im f → X inclusion-im f = pr1 is-emb-inclusion-im : {l1 l2 : Level} {X : UU l1} {A : UU l2} (f : A → X) → is-emb (inclusion-im f) is-emb-inclusion-im f = is-emb-pr1-is-subtype (λ x → is-prop-type-trunc-Prop (fib f x)) emb-im : {l1 l2 : Level} {X : UU l1} {A : UU l2} (f : A → X) → im f ↪ X emb-im f = pair (inclusion-im f) (is-emb-inclusion-im f) map-im : {l1 l2 : Level} {X : UU l1} {A : UU l2} (f : A → X) → A → im f map-im f a = pair (f a) (unit-trunc-Prop (fib f (f a)) (pair a refl)) triangle-im : {l1 l2 : Level} {X : UU l1} {A : UU l2} (f : A → X) → f ~ (inclusion-im f ∘ map-im f) triangle-im f a = refl hom-slice-im : {l1 l2 : Level} {X : UU l1} {A : UU l2} (f : A → X) → hom-slice f (inclusion-im f) hom-slice-im f = pair (map-im f) (triangle-im f) fiberwise-map-universal-property-im : {l1 l2 l3 : Level} {X : UU l1} {A : UU l2} {B : UU l3} (f : A → X) → (m : B ↪ X) (h : hom-slice f (map-emb m)) → (x : X) → type-trunc-Prop (fib f x) → fib (map-emb m) x fiberwise-map-universal-property-im f m h x = map-universal-property-trunc-Prop { A = (fib f x)} ( fib-prop-emb m x) ( λ t → pair ( map-hom-slice f (map-emb m) h (pr1 t)) ( ( inv (triangle-hom-slice f (map-emb m) h (pr1 t))) ∙ ( pr2 t))) map-universal-property-im : {l1 l2 l3 : Level} {X : UU l1} {A : UU l2} {B : UU l3} (f : A → X) → (m : B ↪ X) (h : hom-slice f (map-emb m)) → im f → B map-universal-property-im f m h (pair x t) = pr1 (fiberwise-map-universal-property-im f m h x t) triangle-universal-property-im : {l1 l2 l3 : Level} {X : UU l1} {A : UU l2} {B : UU l3} (f : A → X) → (m : B ↪ X) (h : hom-slice f (map-emb m)) → inclusion-im f ~ ((map-emb m) ∘ (map-universal-property-im f m h)) triangle-universal-property-im f m h (pair x t) = inv (pr2 (fiberwise-map-universal-property-im f m h x t)) universal-property-im : (l : Level) {l1 l2 : Level} {X : UU l1} {A : UU l2} (f : A → X) → universal-property-image l f (emb-im f) (hom-slice-im f) universal-property-im l f = universal-property-image-universal-property-image' l f (emb-im f) (hom-slice-im f) ( λ B m h → pair ( map-universal-property-im f m h) ( triangle-universal-property-im f m h)) {- The uniqueness of the image -} is-equiv-hom-slice-emb : {l1 l2 l3 : Level} {X : UU l1} {A : UU l2} {B : UU l3} (f : A ↪ X) (g : B ↪ X) (h : hom-slice (map-emb f) (map-emb g)) → hom-slice (map-emb g) (map-emb f) → is-equiv-hom-slice (map-emb f) (map-emb g) h is-equiv-hom-slice-emb f g h i = is-equiv-has-inverse ( map-hom-slice (map-emb g) (map-emb f) i) ( λ y → eq-emb g ( inv ( ( triangle-hom-slice ( map-emb g) ( map-emb f) ( i) ( y)) ∙ ( triangle-hom-slice ( map-emb f) ( map-emb g) ( h) ( map-hom-slice (map-emb g) (map-emb f) i y))))) ( λ x → eq-emb f ( inv ( ( triangle-hom-slice (map-emb f) (map-emb g) h x) ∙ ( triangle-hom-slice (map-emb g) (map-emb f) i ( map-hom-slice ( map-emb f) ( map-emb g) ( h) ( x)))))) is-equiv-up-image-up-image : {l1 l2 l3 l4 : Level} {X : UU l1} {A : UU l2} (f : A → X) {B : UU l3} (i : B ↪ X) (q : hom-slice f (map-emb i)) {B' : UU l4} (i' : B' ↪ X) (q' : hom-slice f (map-emb i')) (h : hom-slice (map-emb i) (map-emb i')) (p : Id (comp-hom-slice f (map-emb i) (map-emb i') h q) q') → ({l : Level} → universal-property-image l f i q) → ({l : Level} → universal-property-image l f i' q') → is-equiv (map-hom-slice (map-emb i) (map-emb i') h) is-equiv-up-image-up-image f i q i' q' h p up-i up-i' = is-equiv-hom-slice-emb i i' h (inv-is-equiv (up-i' _ i) q) up-image-up-image-is-equiv : {l1 l2 l3 l4 : Level} {X : UU l1} {A : UU l2} (f : A → X) {B : UU l3} (i : B ↪ X) (q : hom-slice f (map-emb i)) {B' : UU l4} (i' : B' ↪ X) (q' : hom-slice f (map-emb i')) (h : hom-slice (map-emb i) (map-emb i')) (p : Id (comp-hom-slice f (map-emb i) (map-emb i') h q) q') → is-equiv (map-hom-slice (map-emb i) (map-emb i') h) → ({l : Level} → universal-property-image l f i q) → ({l : Level} → universal-property-image l f i' q') up-image-up-image-is-equiv f i q i' q' h p is-equiv-h up-i {l} = universal-property-image-universal-property-image' l f i' q' ( λ C j r → comp-hom-slice ( map-emb i') ( map-emb i) ( map-emb j) ( inv-is-equiv (up-i C j) r) ( pair ( inv-is-equiv is-equiv-h) ( triangle-section ( map-emb i) ( map-emb i') ( map-hom-slice (map-emb i) (map-emb i') h) ( triangle-hom-slice (map-emb i) (map-emb i') h) ( pair ( inv-is-equiv is-equiv-h) ( issec-inv-is-equiv is-equiv-h))))) up-image-is-equiv-up-image : {l1 l2 l3 l4 : Level} {X : UU l1} {A : UU l2} (f : A → X) {B : UU l3} (i : B ↪ X) (q : hom-slice f (map-emb i)) {B' : UU l4} (i' : B' ↪ X) (q' : hom-slice f (map-emb i')) (h : hom-slice (map-emb i) (map-emb i')) (p : Id (comp-hom-slice f (map-emb i) (map-emb i') h q) q') → ({l : Level} → universal-property-image l f i' q') → is-equiv (map-hom-slice (map-emb i) (map-emb i') h) → ({l : Level} → universal-property-image l f i q) up-image-is-equiv-up-image f i q i' q' h p up-i' is-equiv-h {l} = universal-property-image-universal-property-image' l f i q ( λ C j r → comp-hom-slice ( map-emb i) ( map-emb i') ( map-emb j) ( inv-is-equiv (up-i' C j) r) ( h)) -------------------------------------------------------------------------------- {- Existential quantification -} exists-Prop : {l1 l2 : Level} {A : UU l1} (P : A → UU-Prop l2) → UU-Prop (l1 ⊔ l2) exists-Prop {l1} {l2} {A} P = trunc-Prop (Σ A (λ x → type-Prop (P x))) exists : {l1 l2 : Level} {A : UU l1} (P : A → UU-Prop l2) → UU (l1 ⊔ l2) exists P = type-Prop (exists-Prop P) is-prop-exists : {l1 l2 : Level} {A : UU l1} (P : A → UU-Prop l2) → is-prop (exists P) is-prop-exists P = is-prop-type-Prop (exists-Prop P) -------------------------------------------------------------------------------- {- Surjective maps -} -- Definition 13.5.1 is-surjective : {l1 l2 : Level} {A : UU l1} {B : UU l2} → (A → B) → UU (l1 ⊔ l2) is-surjective {B = B} f = (y : B) → type-trunc-Prop (fib f y) -- Proposition 13.5.3 dependent-universal-property-surj : (l : Level) {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B) → UU ((lsuc l) ⊔ l1 ⊔ l2) dependent-universal-property-surj l {B = B} f = (P : B → UU-Prop l) → is-equiv (λ (h : (b : B) → type-Prop (P b)) x → h (f x)) is-surjective-dependent-universal-property-surj : {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B) → ({l : Level} → dependent-universal-property-surj l f) → is-surjective f is-surjective-dependent-universal-property-surj f dup-surj-f = inv-is-equiv ( dup-surj-f (λ b → trunc-Prop (fib f b))) ( λ x → unit-trunc-Prop (fib f (f x)) (pair x refl)) square-dependent-universal-property-surj : {l1 l2 l3 : Level} {A : UU l1} {B : UU l2} (f : A → B) → (P : B → UU-Prop l3) → ( λ (h : (y : B) → type-Prop (P y)) x → h (f x)) ~ ( ( λ h x → h (f x) (pair x refl)) ∘ ( ( λ h y → (h y) ∘ (unit-trunc-Prop (fib f y))) ∘ ( λ h y → const (type-trunc-Prop (fib f y)) (type-Prop (P y)) (h y)))) square-dependent-universal-property-surj f P = refl-htpy dependent-universal-property-surj-is-surjective : {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B) → is-surjective f → ({l : Level} → dependent-universal-property-surj l f) dependent-universal-property-surj-is-surjective f is-surj-f P = is-equiv-comp' ( λ h x → h (f x) (pair x refl)) ( ( λ h y → (h y) ∘ (unit-trunc-Prop (fib f y))) ∘ ( λ h y → const (type-trunc-Prop (fib f y)) (type-Prop (P y)) (h y))) ( is-equiv-comp' ( λ h y → (h y) ∘ (unit-trunc-Prop (fib f y))) ( λ h y → const (type-trunc-Prop (fib f y)) (type-Prop (P y)) (h y)) ( is-equiv-postcomp-Π ( λ y p z → p) ( λ y → is-equiv-diagonal-is-contr ( is-surj-f y) ( is-contr-is-prop-inh ( is-prop-type-trunc-Prop (fib f y)) ( is-surj-f y)) ( type-Prop (P y)))) ( is-equiv-postcomp-Π ( λ b g → g ∘ (unit-trunc-Prop (fib f b))) ( λ b → is-propositional-truncation-trunc-Prop (fib f b) (P b)))) ( is-equiv-map-reduce-Π-fib f ( λ y z → type-Prop (P y))) -- Theorem 13.5.5 -------------------------------------------------------------------------------- {- Cantor's diagonal argument -} map-cantor : {l1 l2 : Level} (X : UU l1) (f : X → (X → UU-Prop l2)) → (X → UU-Prop l2) map-cantor X f x = neg-Prop (f x x) iff-eq : {l1 : Level} {P Q : UU-Prop l1} → Id P Q → P ↔ Q iff-eq refl = pair id id no-fixed-points-neg-Prop : {l1 : Level} (P : UU-Prop l1) → ¬ (P ↔ neg-Prop P) no-fixed-points-neg-Prop P = no-fixed-points-neg (type-Prop P) not-in-image-map-cantor : {l1 l2 : Level} (X : UU l1) (f : X → (X → UU-Prop l2)) → ( t : fib f (map-cantor X f)) → empty not-in-image-map-cantor X f (pair x α) = no-fixed-points-neg-Prop (f x x) (iff-eq (htpy-eq α x)) cantor : {l1 l2 : Level} (X : UU l1) (f : X → (X → UU-Prop l2)) → ¬ (is-surjective f) cantor X f H = ( map-universal-property-trunc-Prop empty-Prop ( not-in-image-map-cantor X f) ( H (map-cantor X f))) -------------------------------------------------------------------------------- -- Exercises -- Exercise 13.1 is-propositional-truncation-retract : {l l1 l2 : Level} {A : UU l1} (P : UU-Prop l2) → (R : (type-Prop P) retract-of A) → is-propositional-truncation l P (retraction-retract-of R) is-propositional-truncation-retract {A = A} P R Q = is-equiv-is-prop ( is-prop-function-type (is-prop-type-Prop Q)) ( is-prop-function-type (is-prop-type-Prop Q)) ( λ g → g ∘ (section-retract-of R)) -- Exercise 13.2 is-propositional-truncation-prod : {l1 l2 l3 l4 : Level} {A : UU l1} (P : UU-Prop l2) (f : A → type-Prop P) {A' : UU l3} (P' : UU-Prop l4) (f' : A' → type-Prop P') → ({l : Level} → is-propositional-truncation l P f) → ({l : Level} → is-propositional-truncation l P' f') → {l : Level} → is-propositional-truncation l (prod-Prop P P') (functor-prod f f') is-propositional-truncation-prod P f P' f' is-ptr-f is-ptr-f' Q = is-equiv-top-is-equiv-bottom-square ( ev-pair) ( ev-pair) ( precomp (functor-prod f f') (type-Prop Q)) ( λ h a a' → h (f a) (f' a')) ( refl-htpy) ( is-equiv-ev-pair) ( is-equiv-ev-pair) ( is-equiv-comp' ( λ h a a' → h a (f' a')) ( λ h a p' → h (f a) p') ( is-ptr-f (pair (type-hom-Prop P' Q) (is-prop-type-hom-Prop P' Q))) ( is-equiv-postcomp-Π ( λ a g a' → g (f' a')) ( λ a → is-ptr-f' Q))) equiv-prod-trunc-Prop : {l1 l2 : Level} (A : UU l1) (A' : UU l2) → equiv-Prop (trunc-Prop (A × A')) (prod-Prop (trunc-Prop A) (trunc-Prop A')) equiv-prod-trunc-Prop A A' = pr1 ( center ( is-uniquely-unique-propositional-truncation ( trunc-Prop (A × A')) ( prod-Prop (trunc-Prop A) (trunc-Prop A')) ( unit-trunc-Prop (A × A')) ( functor-prod (unit-trunc-Prop A) (unit-trunc-Prop A')) ( is-propositional-truncation-trunc-Prop (A × A')) ( is-propositional-truncation-prod ( trunc-Prop A) ( unit-trunc-Prop A) ( trunc-Prop A') ( unit-trunc-Prop A') ( is-propositional-truncation-trunc-Prop A) ( is-propositional-truncation-trunc-Prop A')))) -- Exercise 13.3 -- Exercise 13.3(a) conj-Prop = prod-Prop type-conj-Prop : {l1 l2 : Level} → UU-Prop l1 → UU-Prop l2 → UU (l1 ⊔ l2) type-conj-Prop P Q = type-Prop (conj-Prop P Q) disj-Prop : {l1 l2 : Level} → UU-Prop l1 → UU-Prop l2 → UU-Prop (l1 ⊔ l2) disj-Prop P Q = trunc-Prop (coprod (type-Prop P) (type-Prop Q)) type-disj-Prop : {l1 l2 : Level} → UU-Prop l1 → UU-Prop l2 → UU (l1 ⊔ l2) type-disj-Prop P Q = type-Prop (disj-Prop P Q) inl-disj-Prop : {l1 l2 : Level} (P : UU-Prop l1) (Q : UU-Prop l2) → type-hom-Prop P (disj-Prop P Q) inl-disj-Prop P Q = (unit-trunc-Prop (coprod (type-Prop P) (type-Prop Q))) ∘ inl inr-disj-Prop : {l1 l2 : Level} (P : UU-Prop l1) (Q : UU-Prop l2) → type-hom-Prop Q (disj-Prop P Q) inr-disj-Prop P Q = (unit-trunc-Prop (coprod (type-Prop P) (type-Prop Q))) ∘ inr -- Exercise 13.3(b) ev-disj-Prop : {l1 l2 l3 : Level} (P : UU-Prop l1) (Q : UU-Prop l2) (R : UU-Prop l3) → type-hom-Prop ( hom-Prop (disj-Prop P Q) R) ( conj-Prop (hom-Prop P R) (hom-Prop Q R)) ev-disj-Prop P Q R h = pair (h ∘ (inl-disj-Prop P Q)) (h ∘ (inr-disj-Prop P Q)) inv-ev-disj-Prop : {l1 l2 l3 : Level} (P : UU-Prop l1) (Q : UU-Prop l2) (R : UU-Prop l3) → type-hom-Prop ( conj-Prop (hom-Prop P R) (hom-Prop Q R)) ( hom-Prop (disj-Prop P Q) R) inv-ev-disj-Prop P Q R (pair f g) = map-universal-property-trunc-Prop R (ind-coprod (λ t → type-Prop R) f g) is-equiv-ev-disj-Prop : {l1 l2 l3 : Level} (P : UU-Prop l1) (Q : UU-Prop l2) (R : UU-Prop l3) → is-equiv (ev-disj-Prop P Q R) is-equiv-ev-disj-Prop P Q R = is-equiv-is-prop ( is-prop-type-Prop (hom-Prop (disj-Prop P Q) R)) ( is-prop-type-Prop (conj-Prop (hom-Prop P R) (hom-Prop Q R))) ( inv-ev-disj-Prop P Q R) -- Exercise 13.9 map-dn-trunc-Prop : {l : Level} (A : UU l) → ¬¬ (type-trunc-Prop A) → ¬¬ A map-dn-trunc-Prop A = dn-extend (map-universal-property-trunc-Prop (dn-Prop A) intro-dn) inv-map-dn-trunc-Prop : {l : Level} (A : UU l) → ¬¬ A → ¬¬ (type-trunc-Prop A) inv-map-dn-trunc-Prop A = dn-extend (λ a → intro-dn (unit-trunc-Prop A a)) equiv-dn-trunc-Prop : {l : Level} (A : UU l) → ¬¬ (type-trunc-Prop A) ≃ ¬¬ A equiv-dn-trunc-Prop A = equiv-iff ( dn-Prop (type-trunc-Prop A)) ( dn-Prop A) ( pair ( map-dn-trunc-Prop A) ( inv-map-dn-trunc-Prop A)) -- Exercise 13.10 -- The impredicative encoding of the propositional truncation -- impredicative-trunc-Prop : {l : Level} → UU l → UU-Prop (lsuc l) impredicative-trunc-Prop {l} A = Π-Prop ( UU-Prop l) ( λ Q → function-Prop (A → type-Prop Q) Q) type-impredicative-trunc-Prop : {l : Level} → UU l → UU (lsuc l) type-impredicative-trunc-Prop {l} A = type-Prop (impredicative-trunc-Prop A) map-impredicative-trunc-Prop : {l : Level} (A : UU l) → type-trunc-Prop A → type-impredicative-trunc-Prop A map-impredicative-trunc-Prop {l} A = map-universal-property-trunc-Prop ( impredicative-trunc-Prop A) ( λ x Q f → f x) inv-map-impredicative-trunc-Prop : {l : Level} (A : UU l) → type-impredicative-trunc-Prop A → type-trunc-Prop A inv-map-impredicative-trunc-Prop A H = H (trunc-Prop A) (unit-trunc-Prop A) equiv-impredicative-trunc-Prop : {l : Level} (A : UU l) → type-trunc-Prop A ≃ type-impredicative-trunc-Prop A equiv-impredicative-trunc-Prop A = equiv-iff ( trunc-Prop A) ( impredicative-trunc-Prop A) ( pair ( map-impredicative-trunc-Prop A) ( inv-map-impredicative-trunc-Prop A)) -- The impredicative encoding of conjunction -- impredicative-conj-Prop : {l1 l2 : Level} → UU-Prop l1 → UU-Prop l2 → UU-Prop (lsuc (l1 ⊔ l2)) impredicative-conj-Prop {l1} {l2} P1 P2 = Π-Prop ( UU-Prop (l1 ⊔ l2)) ( λ Q → function-Prop (type-Prop P1 → (type-Prop P2 → type-Prop Q)) Q) type-impredicative-conj-Prop : {l1 l2 : Level} → UU-Prop l1 → UU-Prop l2 → UU (lsuc (l1 ⊔ l2)) type-impredicative-conj-Prop P1 P2 = type-Prop (impredicative-conj-Prop P1 P2) map-impredicative-conj-Prop : {l1 l2 : Level} (P1 : UU-Prop l1) (P2 : UU-Prop l2) → type-conj-Prop P1 P2 → type-impredicative-conj-Prop P1 P2 map-impredicative-conj-Prop {l1} {l2} P1 P2 (pair p1 p2) Q f = f p1 p2 inv-map-impredicative-conj-Prop : {l1 l2 : Level} (P1 : UU-Prop l1) (P2 : UU-Prop l2) → type-impredicative-conj-Prop P1 P2 → type-conj-Prop P1 P2 inv-map-impredicative-conj-Prop P1 P2 H = H (conj-Prop P1 P2) (λ p1 p2 → pair p1 p2) equiv-impredicative-conj-Prop : {l1 l2 : Level} (P1 : UU-Prop l1) (P2 : UU-Prop l2) → type-conj-Prop P1 P2 ≃ type-impredicative-conj-Prop P1 P2 equiv-impredicative-conj-Prop P1 P2 = equiv-iff ( conj-Prop P1 P2) ( impredicative-conj-Prop P1 P2) ( pair ( map-impredicative-conj-Prop P1 P2) ( inv-map-impredicative-conj-Prop P1 P2)) -- The impredicative encoding of disjunction -- impredicative-disj-Prop : {l1 l2 : Level} → UU-Prop l1 → UU-Prop l2 → UU-Prop (lsuc (l1 ⊔ l2)) impredicative-disj-Prop {l1} {l2} P1 P2 = Π-Prop ( UU-Prop (l1 ⊔ l2)) ( λ Q → function-Prop ( type-implication-Prop P1 Q) ( function-Prop (type-implication-Prop P2 Q) Q)) type-impredicative-disj-Prop : {l1 l2 : Level} → UU-Prop l1 → UU-Prop l2 → UU (lsuc (l1 ⊔ l2)) type-impredicative-disj-Prop P1 P2 = type-Prop (impredicative-disj-Prop P1 P2) map-impredicative-disj-Prop : {l1 l2 : Level} (P1 : UU-Prop l1) (P2 : UU-Prop l2) → type-disj-Prop P1 P2 → type-impredicative-disj-Prop P1 P2 map-impredicative-disj-Prop {l1} {l2} P1 P2 = map-universal-property-trunc-Prop ( impredicative-disj-Prop P1 P2) ( ind-coprod ( λ x → type-impredicative-disj-Prop P1 P2) ( λ x Q f1 f2 → f1 x) ( λ y Q f1 f2 → f2 y)) inv-map-impredicative-disj-Prop : {l1 l2 : Level} (P1 : UU-Prop l1) (P2 : UU-Prop l2) → type-impredicative-disj-Prop P1 P2 → type-disj-Prop P1 P2 inv-map-impredicative-disj-Prop P1 P2 H = H (disj-Prop P1 P2) (inl-disj-Prop P1 P2) (inr-disj-Prop P1 P2) equiv-impredicative-disj-Prop : {l1 l2 : Level} (P1 : UU-Prop l1) (P2 : UU-Prop l2) → type-disj-Prop P1 P2 ≃ type-impredicative-disj-Prop P1 P2 equiv-impredicative-disj-Prop P1 P2 = equiv-iff ( disj-Prop P1 P2) ( impredicative-disj-Prop P1 P2) ( pair ( map-impredicative-disj-Prop P1 P2) ( inv-map-impredicative-disj-Prop P1 P2)) -- The impredicative encoding of negation -- impredicative-neg-Prop : {l : Level} → UU l → UU-Prop (lsuc l) impredicative-neg-Prop {l} A = Π-Prop (UU-Prop l) (λ Q → function-Prop A Q) type-impredicative-neg-Prop : {l : Level} → UU l → UU (lsuc l) type-impredicative-neg-Prop A = type-Prop (impredicative-neg-Prop A) map-impredicative-neg-Prop : {l : Level} (A : UU l) → ¬ A → type-impredicative-neg-Prop A map-impredicative-neg-Prop A f Q a = ex-falso (f a) inv-map-impredicative-neg-Prop : {l : Level} (A : UU l) → type-impredicative-neg-Prop A → ¬ A inv-map-impredicative-neg-Prop A H a = H (neg-Prop' A) a a equiv-impredicative-neg-Prop : {l : Level} (A : UU l) → ¬ A ≃ type-impredicative-neg-Prop A equiv-impredicative-neg-Prop A = equiv-iff ( neg-Prop' A) ( impredicative-neg-Prop A) ( pair ( map-impredicative-neg-Prop A) ( inv-map-impredicative-neg-Prop A)) -- The impredicative encoding of existential quantification -- impredicative-exists-Prop : {l1 l2 : Level} {A : UU l1} (P : A → UU-Prop l2) → UU-Prop (lsuc (l1 ⊔ l2)) impredicative-exists-Prop {l1} {l2} {A} P = Π-Prop ( UU-Prop (l1 ⊔ l2)) ( λ Q → function-Prop ((x : A) → type-Prop (P x) → type-Prop Q) Q) type-impredicative-exists-Prop : {l1 l2 : Level} {A : UU l1} (P : A → UU-Prop l2) → UU (lsuc (l1 ⊔ l2)) type-impredicative-exists-Prop P = type-Prop (impredicative-exists-Prop P) map-impredicative-exists-Prop : {l1 l2 : Level} {A : UU l1} (P : A → UU-Prop l2) → exists P → type-impredicative-exists-Prop P map-impredicative-exists-Prop {l1} {l2} {A} P = map-universal-property-trunc-Prop ( impredicative-exists-Prop P) ( ind-Σ (λ x y Q h → h x y)) inv-map-impredicative-exists-Prop : {l1 l2 : Level} {A : UU l1} (P : A → UU-Prop l2) → type-impredicative-exists-Prop P → exists P inv-map-impredicative-exists-Prop {A = A} P H = H ( exists-Prop P) ( λ x y → unit-trunc-Prop (Σ A (λ x → type-Prop (P x))) (pair x y)) equiv-impredicative-exists-Prop : {l1 l2 : Level} {A : UU l1} (P : A → UU-Prop l2) → exists P ≃ type-impredicative-exists-Prop P equiv-impredicative-exists-Prop P = equiv-iff ( exists-Prop P) ( impredicative-exists-Prop P) ( pair ( map-impredicative-exists-Prop P) ( inv-map-impredicative-exists-Prop P)) -- The impredicative encoding of the based identity type of a set -- impredicative-based-id-Prop : {l : Level} (A : UU-Set l) (a x : type-Set A) → UU-Prop (lsuc l) impredicative-based-id-Prop {l} A a x = Π-Prop (type-Set A → UU-Prop l) (λ Q → hom-Prop (Q a) (Q x)) type-impredicative-based-id-Prop : {l : Level} (A : UU-Set l) (a x : type-Set A) → UU (lsuc l) type-impredicative-based-id-Prop A a x = type-Prop (impredicative-based-id-Prop A a x) map-impredicative-based-id-Prop : {l : Level} (A : UU-Set l) (a x : type-Set A) → Id a x → type-impredicative-based-id-Prop A a x map-impredicative-based-id-Prop A a .a refl Q p = p inv-map-impredicative-based-id-Prop : {l : Level} (A : UU-Set l) (a x : type-Set A) → type-impredicative-based-id-Prop A a x → Id a x inv-map-impredicative-based-id-Prop A a x H = H (λ x → pair (Id a x) (is-set-type-Set A a x)) refl equiv-impredicative-based-id-Prop : {l : Level} (A : UU-Set l) (a x : type-Set A) → Id a x ≃ type-impredicative-based-id-Prop A a x equiv-impredicative-based-id-Prop A a x = equiv-iff ( pair (Id a x) (is-set-type-Set A a x)) ( impredicative-based-id-Prop A a x) ( pair ( map-impredicative-based-id-Prop A a x) ( inv-map-impredicative-based-id-Prop A a x)) -- The impredicative encoding of Martin-Löf's identity type of a set -- impredicative-id-Prop : {l : Level} (A : UU-Set l) (x y : type-Set A) → UU-Prop (lsuc l) impredicative-id-Prop {l} A x y = Π-Prop (type-Set A → type-Set A → UU-Prop l) (λ Q → function-Prop ((a : type-Set A) → type-Prop (Q a a)) (Q x y)) type-impredicative-id-Prop : {l : Level} (A : UU-Set l) (x y : type-Set A) → UU (lsuc l) type-impredicative-id-Prop A x y = type-Prop (impredicative-id-Prop A x y) map-impredicative-id-Prop : {l : Level} (A : UU-Set l) (x y : type-Set A) → Id x y → type-impredicative-id-Prop A x y map-impredicative-id-Prop A x .x refl Q r = r x inv-map-impredicative-id-Prop : {l : Level} (A : UU-Set l ) (x y : type-Set A) → type-impredicative-id-Prop A x y → Id x y inv-map-impredicative-id-Prop A x y H = H (λ a b → pair (Id a b) (is-set-type-Set A a b)) (λ a → refl) equiv-impredicative-id-Prop : {l : Level} (A : UU-Set l) (x y : type-Set A) → Id x y ≃ type-impredicative-id-Prop A x y equiv-impredicative-id-Prop A x y = equiv-iff ( pair (Id x y) (is-set-type-Set A x y)) ( impredicative-id-Prop A x y) ( pair ( map-impredicative-id-Prop A x y) ( inv-map-impredicative-id-Prop A x y)) -- The impredicative encoding of the based identity type of a 1-type --
{ "alphanum_fraction": 0.57550514, "avg_line_length": 35.6524486572, "ext": "agda", "hexsha": "eae63b547b7b94060df54ce0de65a362f4d2da1a", "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": "1e1f8def50f9359928e52ebb2ee53ed1166487d9", "max_forks_repo_licenses": [ "CC-BY-4.0" ], "max_forks_repo_name": "UlrikBuchholtz/HoTT-Intro", "max_forks_repo_path": "Agda/13-propositional-truncation.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "1e1f8def50f9359928e52ebb2ee53ed1166487d9", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "CC-BY-4.0" ], "max_issues_repo_name": "UlrikBuchholtz/HoTT-Intro", "max_issues_repo_path": "Agda/13-propositional-truncation.agda", "max_line_length": 146, "max_stars_count": null, "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/13-propositional-truncation.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 17844, "size": 45136 }
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Categories.Structures where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Isomorphism open import Cubical.Foundations.HLevels using (isSetΣ) open import Cubical.Data.Sigma open import Cubical.Categories.Category _∋_ : ∀ {ℓ} → (A : Type ℓ) → A → A _∋_ A x = x private variable ℓ ℓ' ℓ'' ℓ''' : Level 𝒞 : Precategory ℓ ℓ' record StructureOver (𝒞 : Precategory ℓ ℓ') ℓ'' ℓ''' : Type (ℓ-suc (ℓ-max (ℓ-max ℓ ℓ') (ℓ-max ℓ'' ℓ'''))) where field Struct : 𝒞 .ob → Type ℓ'' IsHomo : ∀ {x y} → Struct x → Struct y → 𝒞 .hom x y → Type ℓ''' isPropIsHomo : ∀ {x y α β f} → isProp (IsHomo {x} {y} α β f) idnIsHomo : ∀ {x} (α : Struct x) → IsHomo α α (𝒞 .idn x) homoSeq : ∀ {x y z α β γ} {f : 𝒞 .hom x y} {g : 𝒞 .hom y z} → IsHomo α β f → IsHomo β γ g → IsHomo α γ (𝒞 .seq f g) _⊆_ : ∀ {x} → Struct x → Struct x → Type ℓ''' _⊆_ {x} α β = IsHomo α β (𝒞 .idn x) open StructureOver public renaming (_⊆_ to _[_⊆_]) record StrIsUnivalent {𝒞 : Precategory ℓ ℓ'} (S : StructureOver 𝒞 ℓ'' ℓ''') : Type (ℓ-suc (ℓ-max (ℓ-max ℓ ℓ') (ℓ-max ℓ'' ℓ'''))) where field subAntisym : ∀ {x} {α β : S .Struct x} → S [ α ⊆ β ] → S [ β ⊆ α ] → α ≡ β open StrIsUnivalent public isPropP : {A : I → Type ℓ} {x : A i0} {y : A i1} → isProp (A i1) → PathP A x y isPropP Aprop = toPathP (Aprop _ _) STRUCTURES : (𝒞 : Precategory ℓ ℓ') → StructureOver 𝒞 ℓ'' ℓ''' → Precategory (ℓ-max ℓ ℓ'') (ℓ-max ℓ' ℓ''') STRUCTURES 𝒞 S .ob = Σ (𝒞 .ob) (S .Struct) STRUCTURES 𝒞 S .hom (x , α) (y , β) = Σ (𝒞 .hom x y) (S .IsHomo α β) STRUCTURES 𝒞 S .idn (x , α) = 𝒞 .idn x , S .idnIsHomo α STRUCTURES 𝒞 S .seq (f , hᶠ) (g , hᵍ) = 𝒞 .seq f g , S .homoSeq hᶠ hᵍ STRUCTURES 𝒞 S .seq-λ (f , hᶠ) = cong₂ _,_ (𝒞 .seq-λ f) (toPathP (S .isPropIsHomo _ _)) STRUCTURES 𝒞 S .seq-ρ (f , hᶠ) = cong₂ _,_ (𝒞 .seq-ρ f) (toPathP (S .isPropIsHomo _ _)) STRUCTURES 𝒞 S .seq-α (f , hᶠ) (g , hᵍ) (h , hʰ) = cong₂ _,_ (𝒞 .seq-α f g h) (toPathP (S .isPropIsHomo _ _)) STRUCTURESisCat : ⦃ 𝒞-cat : isCategory 𝒞 ⦄ {S : StructureOver 𝒞 ℓ'' ℓ'''} → isCategory (STRUCTURES 𝒞 S) STRUCTURESisCat {{𝒞-cat}} {S = S} .homIsSet {x = x , α} {y = y , β} = isSetΣ (𝒞-cat .homIsSet) (λ _ → isProp→isSet (S .isPropIsHomo)) SIP : ∀ ⦃ 𝒞-cat : isCategory 𝒞 ⦄ ⦃ 𝒞-univ : isUnivalent 𝒞 ⦄ → (S : StructureOver 𝒞 ℓ'' ℓ''') → ⦃ S-univ : StrIsUnivalent S ⦄ → isUnivalent (STRUCTURES 𝒞 S) SIP {𝒞 = 𝒞} {{𝒞-cat}} {{𝒞-univ}} S {{S-univ}} .univ (x , α) (y , β) = isoToIsEquiv (iso (pathToIso (x , α) (y , β)) catisoToPath sect ret) where catisoToPath : ∀ {x y : 𝒞 .ob} {α : S .Struct x} {β : S .Struct y} → CatIso (STRUCTURES 𝒞 S) (x , α) (y , β) → (x , α) ≡ (y , β) catisoToPath {x = x} {y} {α} {β} (catiso (f , hᶠ) (g , hᵍ) sec ret) = ΣPathTransport→PathΣ _ _ (x≡y , α≡β x≡y α β (subst (S .IsHomo α β) f≡h hᶠ) (subst (S .IsHomo β α) g≡h⁻¹ hᵍ)) where x≅y : CatIso 𝒞 x y x≅y = catiso f g (cong fst sec) (cong fst ret) x≡y : x ≡ y x≡y = uva 𝒞-univ x≅y f≡h : f ≡ pathMor 𝒞 x≡y f≡h = sym (uvaPathMor 𝒞-univ x≅y) g≡h⁻¹ : g ≡ pathMor⁻ 𝒞 x≡y g≡h⁻¹ = sym (uvaPathMor⁻ 𝒞-univ x≅y) α≡β : ∀ {x y : 𝒞 .ob} (p : x ≡ y) (α : S .Struct x) (β : S .Struct y) (h⇒ : S .IsHomo α β (pathMor 𝒞 p)) (h⇐ : S .IsHomo β α (pathMor⁻ 𝒞 p)) → subst (S .Struct) p α ≡ β α≡β {x} {y} = J (λ z q → ∀ (α : S .Struct x) (β : S .Struct z) (h⇒ : S .IsHomo α β (pathMor 𝒞 q)) (h⇐ : S .IsHomo β α (pathMor⁻ 𝒞 q)) → subst (S .Struct) q α ≡ β) (λ α β h⇒ h⇐ → transportRefl α ∙ subAntisym S-univ (subst (S .IsHomo α β) (pathMorRefl {𝒞 = 𝒞}) h⇒) (subst (S .IsHomo β α) (pathMor⁻Refl {𝒞 = 𝒞}) h⇐)) sect : section (pathToIso (x , α) (y , β)) catisoToPath sect (catiso h h⁻¹ sec ret) = {! !} ret : retract (pathToIso (x , α) (y , β)) catisoToPath ret = J (λ z q → catisoToPath (pathToIso (x , α) z q) ≡ q) (subst {y = (pathToIso (x , α) (x , α) refl)} (λ x → catisoToPath x ≡ refl) (sym (JRefl (λ z _ → (x , α) ≅ z) ?)))
{ "alphanum_fraction": 0.5432038835, "avg_line_length": 46.8181818182, "ext": "agda", "hexsha": "45de89b9b4fd55d453b9b0511517760272c238dc", "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": "737f922d925da0cd9a875cb0c97786179f1f4f61", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "bijan2005/univalent-foundations", "max_forks_repo_path": "Cubical/Categories/Structures.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "737f922d925da0cd9a875cb0c97786179f1f4f61", "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": "bijan2005/univalent-foundations", "max_issues_repo_path": "Cubical/Categories/Structures.agda", "max_line_length": 182, "max_stars_count": null, "max_stars_repo_head_hexsha": "737f922d925da0cd9a875cb0c97786179f1f4f61", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "bijan2005/univalent-foundations", "max_stars_repo_path": "Cubical/Categories/Structures.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 2010, "size": 4120 }
------------------------------------------------------------------------ -- The Agda standard library -- -- The reader monad ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Level module Category.Monad.Reader {r} (R : Set r) (a : Level) where open import Function open import Function.Identity.Categorical as Id using (Identity) open import Category.Applicative.Indexed open import Category.Monad.Indexed open import Category.Monad open import Data.Unit private variable ℓ : Level A B I : Set ℓ ------------------------------------------------------------------------ -- Indexed reader IReaderT : IFun I (r ⊔ a) → IFun I (r ⊔ a) IReaderT M i j A = R → M i j A module _ {M : IFun I (r ⊔ a)} where ------------------------------------------------------------------------ -- Indexed reader applicative ReaderTIApplicative : RawIApplicative M → RawIApplicative (IReaderT M) ReaderTIApplicative App = record { pure = λ x r → pure x ; _⊛_ = λ m n r → m r ⊛ n r } where open RawIApplicative App ReaderTIApplicativeZero : RawIApplicativeZero M → RawIApplicativeZero (IReaderT M) ReaderTIApplicativeZero App = record { applicative = ReaderTIApplicative applicative ; ∅ = const ∅ } where open RawIApplicativeZero App ReaderTIAlternative : RawIAlternative M → RawIAlternative (IReaderT M) ReaderTIAlternative Alt = record { applicativeZero = ReaderTIApplicativeZero applicativeZero ; _∣_ = λ m n r → m r ∣ n r } where open RawIAlternative Alt ------------------------------------------------------------------------ -- Indexed reader monad ReaderTIMonad : RawIMonad M → RawIMonad (IReaderT M) ReaderTIMonad Mon = record { return = λ x r → return x ; _>>=_ = λ m f r → m r >>= flip f r } where open RawIMonad Mon ReaderTIMonadZero : RawIMonadZero M → RawIMonadZero (IReaderT M) ReaderTIMonadZero Mon = record { monad = ReaderTIMonad monad ; applicativeZero = ReaderTIApplicativeZero applicativeZero } where open RawIMonadZero Mon ReaderTIMonadPlus : RawIMonadPlus M → RawIMonadPlus (IReaderT M) ReaderTIMonadPlus Mon = record { monad = ReaderTIMonad monad ; alternative = ReaderTIAlternative alternative } where open RawIMonadPlus Mon ------------------------------------------------------------------------ -- Reader monad operations record RawIMonadReader {I : Set ℓ} (M : IFun I (r ⊔ a)) : Set (ℓ ⊔ suc (r ⊔ a)) where field monad : RawIMonad M reader : ∀ {i} → (R → A) → M i i A local : ∀ {i j} → (R → R) → M i j A → M i j A open RawIMonad monad public ask : ∀ {i} → M i i (Lift (r ⊔ a) R) ask = reader lift asks : ∀ {i} → (R → A) → M i i A asks = reader ReaderTIMonadReader : {I : Set ℓ} {M : IFun I (r ⊔ a)} → RawIMonad M → RawIMonadReader (IReaderT M) ReaderTIMonadReader Mon = record { monad = ReaderTIMonad Mon ; reader = λ f r → return (f r) ; local = λ f m → m ∘ f } where open RawIMonad Mon ------------------------------------------------------------------------ -- Ordinary reader monads RawMonadReader : (M : Set (r ⊔ a) → Set (r ⊔ a)) → Set _ RawMonadReader M = RawIMonadReader {I = ⊤} (λ _ _ → M) module RawMonadReader {M} (Mon : RawMonadReader M) where open RawIMonadReader Mon public ReaderT : (M : Set (r ⊔ a) → Set (r ⊔ a)) → Set _ → Set _ ReaderT M = IReaderT {I = ⊤} (λ _ _ → M) _ _ ReaderTMonad : ∀ {M} → RawMonad M → RawMonad (ReaderT M) ReaderTMonad = ReaderTIMonad ReaderTMonadReader : ∀ {M} → RawMonad M → RawMonadReader (ReaderT M) ReaderTMonadReader = ReaderTIMonadReader ReaderTMonadZero : ∀ {M} → RawMonadZero M → RawMonadZero (ReaderT M) ReaderTMonadZero = ReaderTIMonadZero ReaderTMonadPlus : ∀ {M} → RawMonadPlus M → RawMonadPlus (ReaderT M) ReaderTMonadPlus = ReaderTIMonadPlus Reader : Set (r ⊔ a) → Set (r ⊔ a) Reader = ReaderT Identity ReaderMonad : RawMonad Reader ReaderMonad = ReaderTIMonad Id.monad ReaderMonadReader : RawMonadReader Reader ReaderMonadReader = ReaderTIMonadReader Id.monad
{ "alphanum_fraction": 0.5874125874, "avg_line_length": 30.947761194, "ext": "agda", "hexsha": "4863cd29b90192ff4f337e39dfff2c177d384f23", "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/Category/Monad/Reader.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/Category/Monad/Reader.agda", "max_line_length": 74, "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/Category/Monad/Reader.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": 1207, "size": 4147 }
module Data.Real.Diff where open import Level using (0ℓ) import Data.Real as ℝ open ℝ using (ℝ) open import Data.Real.Properties import Data.Nat as ℕ open ℕ using (ℕ; suc; zero; _⊓_; _⊔_) open import Data.Unit.Polymorphic using (tt; ⊤) open import Data.Product using (_×_; _,_; proj₁; proj₂) open import Function using (_∘_; id) -- TODO should move to _≈_ at some point open import Relation.Binary.PropositionalEquality hiding ([_]) open ≡-Reasoning import Data.Vec as V open V using (Vec; []; _∷_) import Data.Vec.Recursive as VR open VR using (_^_; 2+_) open import Data.Fin using (Fin; zero; suc) Tower : ℕ → Set Tower = Vec ℝ Diff : Set Diff = ∀ {d n} → Tower d ^ n → Tower d ^ n Diff2 : Set Diff2 = ∀ {d n} → Tower d ^ n → Tower d ^ n → Tower d ^ n -- utility function infix 2 _!_ _!_ : ∀ {n} → (∀ {d'} → Tower d' ^ n) → ∀ d → Tower d ^ n x ! d = x {d} lift : ∀ {n a} {A : Set a} → A → A ^ n lift {n} x = VR.replicate n x const' : ∀ {d} → ℝ → Tower d const' {zero} x = [] const' {suc d} x = x ∷ (const' 0.0) const : ∀ {n d} → ℝ ^ n → Tower d ^ n const {n} = VR.map const' n return' : ∀ {d} → ℝ → Tower (suc d) return' x = x ∷ const' 1.0 return : ∀ {n d} → ℝ ^ n → Tower (suc d) ^ n return {n} = VR.map return' n extract : ∀ {d n} → Tower (suc d) ^ n → ℝ ^ n extract {n = n} = VR.map V.head n lop : ∀ {d} → Tower (suc d) → Tower d lop {zero} _ = [] lop {suc d} (x ∷ xs) = x ∷ lop xs run : ∀ {m n} (f : Tower 1 ^ m → Tower 1 ^ n) (x : ℝ ^ m) → ℝ ^ n run f = extract ∘ f ∘ const -_ : Diff -_ {n = n} = VR.map (V.map λ x → ℝ.- x) n infixl 6 _+_ _-_ infixr 9 -_ _+_ _-_ : Diff2 _+_ {n = n} = VR.zipWith (V.zipWith ℝ._+_) n x - y = x + (- y) *T : ∀ {d} (x y : Tower d) → Tower d *T [] _ = [] *T xx@(x ∷ xs) yy@(y ∷ ys) = x ℝ.* y ∷ *T (lop xx) ys + *T (lop yy) xs infixl 7 _*_ _*_ : Diff2 _*_ {zero} {n} x _ = x _*_ {suc d} {n} = VR.zipWith *T n -- directional derivative du : ∀ {m n} (f : Tower 2 ^ m → Tower 2 ^ n) → Tower 2 ^ m → Tower 1 ^ n du {n = n} f xs = VR.map V.tail n (f xs) fins : ∀ n → Fin n ^ n fins n = VR.tabulate n id directions : ∀ {d n} → ℝ ^ n → (Tower (suc d) ^ n) ^ n directions {d} {n} x = VR.map (λ i → go i x) n (fins n) where go : ∀ {m} → Fin m → ℝ ^ m → Tower (suc d) ^ m go {1} zero y = return y go {2+ m} zero (y , ys) = return y , const ys go {2+ m} (suc i) (y , ys) = const y , go i ys outerWith : ∀ {a b c} {A : Set a} {B : Set b} {C : Set c} → (f : A → B → C) → ∀ m n → A ^ m → B ^ n → (C ^ n) ^ m outerWith f m n rm rn = VR.map (λ x → VR.map (f x) n rn) m rm -- this is all very likely very slow -- it's running `du` `m` times... jacobian grad : ∀ {m n} (f : Tower 2 ^ m → Tower 2 ^ n) → ℝ ^ m → (ℝ ^ n) ^ m jacobian {m = m} f x = VR.map (extract ∘ du f) m (directions x) grad = jacobian -- TODO -- The second derivative cross terms are not currently clear to me. -- directions2d : ∀ {d n} → ℝ ^ n → ((Tower (suc d) ^ n) ^ n) ^ n -- directions2d {d} {n} x = rotations n dirs -- -- VR.zipWith (λ y ys → {! !}) n (dirs) (rotations dirs) -- where -- dirs : (Tower (suc d) ^ n) ^ n -- dirs = directions x -- rotations : ∀ m → (Tower (suc d) ^ m) ^ m → ((Tower (suc d) ^ m) ^ m) ^ m -- rotations = {! !} -- d2u -- : ∀ {m n} (f : Tower 3 ^ m → Tower 3 ^ n) -- → Tower 3 ^ m → Tower 1 ^ n -- d2u {n = n} f xs = VR.map (V.tail ∘ V.tail) n (f xs) -- hessian -- : ∀ {m n} (f : Tower 3 ^ m → Tower 3 ^ n) -- → ℝ ^ m → ((ℝ ^ n) ^ m) ^ m -- hessian {m} {n} f x = -- VR.map (λ dir → VR.map (extract ∘ d2u f) m dir) m (directions2d x) -- outerWith (λ y z → extract (du (du f) y)) m m (directions x) (directions x) _>-<_ : (ℝ → ℝ) → (∀ {d'} → Tower d' → Tower d') → ∀ {d} → Tower d → Tower d (f >-< g) {zero} [] = [] (f >-< g) {suc d} xx@(x ∷ xs) = f x ∷ xs * g (lop xx) liftF : ∀ {d} (f : Tower d → Tower d) → ∀ {n} → Tower d ^ n → Tower d ^ n liftF f {n} = VR.map f n infixl 8 _^^_ _^^_ : ∀ {d n} → Tower d ^ n → (m : ℕ) → Tower d ^ n x ^^ zero = lift (const 1.0) x ^^ (suc d) = x * x ^^ d module Single where infixr 9 e^_ e^_ log recip sin cos sinh cosh abs sgn : ∀ {d} → Tower d → Tower d e^ [] = [] e^_ {suc d} xx@(x ∷ xs) = ℝ.e^ x ∷ xs * (e^ lop xx) log = ℝ.log >-< recip recip [] = [] recip xx@(x ∷ xs) = 1/x ∷ 1/xx where 1/x = 1.0 ℝ.÷ x 1/xx = recip (lop xx) abs = ℝ.abs >-< sgn sgn [] = [] sgn (x ∷ xs) = if does (0.0 ≤? x) then const 1.0 else const (ℝ.- 1.0) where open import Data.Bool using (if_then_else_) open import Data.Real.Order open import Relation.Nullary -- I'm not sure why I have to write these by hand. sin [] = [] sin xx@(x ∷ xs) = ℝ.sin x ∷ xs * cos (lop xx) cos [] = [] cos xx@(x ∷ xs) = ℝ.cos x ∷ - xs * sin (lop xx) sinh [] = [] sinh xx@(x ∷ xs) = ℝ.sinh x ∷ xs * cosh (lop xx) cosh [] = [] cosh xx@(x ∷ xs) = ℝ.cosh x ∷ xs * sinh (lop xx) infixr 9 e^_ e^_ log recip sin cos sinh cosh abs sgn : Diff e^_ = liftF Single.e^_ log = liftF Single.log recip = liftF Single.recip abs = liftF Single.abs sgn = liftF Single.sgn sin = liftF Single.sin cos = liftF Single.cos sinh = liftF Single.sinh cosh = liftF Single.cosh infix 8 _**_ _**_ : Diff2 x ** y = e^ (y * log x) ascend descend : ∀ {n} (f : Tower 2 ^ n → Tower 2) (δ : ℝ ^ n) (m : ℕ) (x : ℝ ^ n) → ℝ ^ n ascend f δ zero x = x ascend {n = n} f δ (suc m) x = ascend f δ m (add x (mul δ (grad f x))) where add mul : (x y : ℝ ^ n) → ℝ ^ n add = VR.zipWith ℝ._+_ n mul = VR.zipWith ℝ._*_ n descend f = ascend λ x → - f x ascend_f=_δ=_steps=_start=_ : ∀ {n} (_ : ⊤ {0ℓ}) (f : Tower 2 ^ n → Tower 2) (δ : ℝ ^ n) (m : ℕ) (x : ℝ ^ n) → ℝ ^ n ascend_f=_δ=_steps=_start=_ _ = ascend ∶ : ⊤ {0ℓ} ∶ = _ sterling : ℕ → ℝ sterling n = n' ℝ.* ℝ.log n' ℝ.- n' where n' = ℝ.fromℕ n logPoisson' logPoisson : ∀ {n} → ℕ ^ n → ∀ {d} → Tower d ^ n → Tower d ^ n -- neglecting the normalization term logPoisson' {n} k α = const k' * log α - α where k' = VR.map ℝ.fromℕ n k logPoisson {n} k α = logPoisson' k α - const (VR.map sterling n k) sum : ∀ {d n} → Tower d ^ n → Tower d sum {d} {n} = VR.foldl (λ _ → Tower d) (const 0.0) id (λ _ x y → x + y) n where open import Function using (id) binned : ∀ {d n} → ℕ ^ n → Tower d ^ n → Tower d binned n = sum ∘ logPoisson' n test : ∀ {n} → ℝ ^ n → ℝ ^ n test x = ascend ∶ f= binned (lift 10) δ= lift 1.0 steps= 1000 start= x testgrad : ∀ {n} → ℝ ^ n → ℝ ^ n testgrad = grad (binned (lift 10))
{ "alphanum_fraction": 0.5231910946, "avg_line_length": 25.0697674419, "ext": "agda", "hexsha": "cffe8231f2eb0175c3aa95a14ba4155ffa6cac89", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "78c3dec24834ffeca5e74cb75578e9b210a5be62", "max_forks_repo_licenses": [ "CC0-1.0" ], "max_forks_repo_name": "cspollard/diff", "max_forks_repo_path": "src/Data/Real/Diff.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "78c3dec24834ffeca5e74cb75578e9b210a5be62", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "CC0-1.0" ], "max_issues_repo_name": "cspollard/diff", "max_issues_repo_path": "src/Data/Real/Diff.agda", "max_line_length": 90, "max_stars_count": null, "max_stars_repo_head_hexsha": "78c3dec24834ffeca5e74cb75578e9b210a5be62", "max_stars_repo_licenses": [ "CC0-1.0" ], "max_stars_repo_name": "cspollard/diff", "max_stars_repo_path": "src/Data/Real/Diff.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 2717, "size": 6468 }
------------------------------------------------------------------------ -- INCREMENTAL λ-CALCULUS -- -- Sets of variables ------------------------------------------------------------------------ module Base.Syntax.Vars (Type : Set) where -- The notion of sets of variables -- -- This module is calculus-independent. open import Base.Syntax.Context Type open import Relation.Binary.PropositionalEquality open import Data.Unit open import Data.Sum open import Data.Bool -- Sets of variables open import Base.Data.DependentList Free : Type → Set Free _ = Bool Vars : Context → Set Vars = DependentList Free none : {Γ : Context} → Vars Γ none = tabulate (λ _ → false) singleton : ∀ {τ Γ} → Var Γ τ → Vars Γ singleton {Γ = τ • Γ₀} this = true • none singleton (that x) = false • singleton x -- Union of variable sets infixl 6 _∪_ -- just like _+_ _∪_ : ∀ {Γ} → Vars Γ → Vars Γ → Vars Γ _∪_ = zipWith _∨_ -- Test if a set of variables is empty empty? : ∀ {Γ} → (vs : Vars Γ) → (vs ≡ none) ⊎ ⊤ empty? ∅ = inj₁ refl empty? (true • vs) = inj₂ tt empty? (false • vs) with empty? vs ... | inj₁ vs=∅ = inj₁ (cong₂ _•_ refl vs=∅) ... | inj₂ _ = inj₂ tt
{ "alphanum_fraction": 0.574137931, "avg_line_length": 22.7450980392, "ext": "agda", "hexsha": "571675b7d1578c9a001465d0f31e546ca498773f", "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": "Base/Syntax/Vars.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": "Base/Syntax/Vars.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": "Base/Syntax/Vars.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": 347, "size": 1160 }
{-# OPTIONS --cubical --safe #-} module Inspect where open import Level open import Path record Reveal_·_is_ {A : Type a} {B : A → Type b} (f : (x : A) → B x) (x : A) (y : B x) : Type b where constructor 〖_〗 field eq : f x ≡ y inspect : {A : Type a} {B : A → Type b} (f : (x : A) → B x) (x : A) → Reveal f · x is f x inspect f x = 〖 refl 〗
{ "alphanum_fraction": 0.5431034483, "avg_line_length": 24.8571428571, "ext": "agda", "hexsha": "9c088419259300c94bbccafc6126d24bf330c10b", "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": "Inspect.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": "Inspect.agda", "max_line_length": 102, "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": "Inspect.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": 146, "size": 348 }
open import Prelude module Implicits.Resolution.Deterministic.Expressiveness where open import Data.Fin.Substitution open import Implicits.Syntax open import Implicits.Syntax.Type.Unification open import Implicits.Resolution.Ambiguous.Resolution as A open import Implicits.Resolution.Deterministic.Resolution as D open import Extensions.ListFirst module Deterministic⊆Ambiguous where open FirstLemmas open import Relation.Unary soundness : ∀ {ν} {Δ : ICtx ν} {r} → Δ D.⊢ᵣ r → Δ A.⊢ᵣ r soundness (r-simp r x) = lem x (r-ivar (proj₁ $ first⟶∈ r)) where lem : ∀ {ν} {a τ} {Δ : ICtx ν} → Δ ⊢ a ↓ τ → Δ A.⊢ᵣ a → Δ A.⊢ᵣ simpl τ lem (i-simp τ) hyp = hyp lem (i-iabs ih₁ ih₂) hyp = lem ih₂ (r-iapp hyp (soundness ih₁)) lem (i-tabs b ih) hyp = lem ih (r-tapp b hyp) soundness (r-iabs _ ih) = r-iabs (soundness ih) soundness (r-tabs ih) = r-tabs (soundness ih)
{ "alphanum_fraction": 0.6916201117, "avg_line_length": 35.8, "ext": "agda", "hexsha": "f9a62c1ccd0d1d62f27ab06a5e06a85e8f60fcf7", "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": "7fe638b87de26df47b6437f5ab0a8b955384958d", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "metaborg/ts.agda", "max_forks_repo_path": "src/Implicits/Resolution/Deterministic/Expressiveness.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "7fe638b87de26df47b6437f5ab0a8b955384958d", "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": "metaborg/ts.agda", "max_issues_repo_path": "src/Implicits/Resolution/Deterministic/Expressiveness.agda", "max_line_length": 76, "max_stars_count": 4, "max_stars_repo_head_hexsha": "7fe638b87de26df47b6437f5ab0a8b955384958d", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "metaborg/ts.agda", "max_stars_repo_path": "src/Implicits/Resolution/Deterministic/Expressiveness.agda", "max_stars_repo_stars_event_max_datetime": "2021-05-07T04:08:41.000Z", "max_stars_repo_stars_event_min_datetime": "2019-04-05T17:57:11.000Z", "num_tokens": 319, "size": 895 }
{-# OPTIONS --universe-polymorphism #-} open import Common.Prelude renaming (Nat to ℕ; module Nat to ℕ) using (zero; suc; _+_; _∸_; List; []; _∷_; Bool; true; false) open import Common.Level open import Common.Reflect module TermSplicing where module Library where data Box {a} (A : Set a) : Set a where box : A → Box A record ⊤ : Set where constructor tt infixr 5 _×_ record _×_ (A B : Set) : Set where constructor _,_ field proj₁ : A proj₂ : B [_] : ∀ {A : Set} → A → List A [ x ] = x ∷ [] replicate : ∀ {A : Set} → ℕ → A → List A replicate zero x = [] replicate (suc n) x = x ∷ replicate n x foldr : ∀ {A B : Set} → (A → B → B) → B → List A → B foldr c n [] = n foldr c n (x ∷ xs) = c x (foldr c n xs) foldl : ∀ {A B : Set} → (A → B → A) → A → List B → A foldl c n [] = n foldl c n (x ∷ xs) = foldl c (c n x) xs reverse : ∀ {A : Set} → List A → List A reverse = foldl (λ rev x → x ∷ rev) [] length : ∀ {A : Set} → List A → ℕ length = foldr (λ _ → suc) 0 data Maybe (A : Set) : Set where nothing : Maybe A just : A → Maybe A mapMaybe : ∀ {A B : Set} → (A → B) → Maybe A → Maybe B mapMaybe f (just x) = just (f x) mapMaybe f nothing = nothing when : ∀ {A} → Bool → Maybe A → Maybe A when true x = x when false _ = nothing data _≡_ {a} {A : Set a} (x : A) : A -> Set where refl : x ≡ x _→⟨_⟩_ : ∀ (A : Set) (n : ℕ) (B : Set) → Set A →⟨ zero ⟩ B = B A →⟨ suc n ⟩ B = A → A →⟨ n ⟩ B open Library module ReflectLibrary where lamᵛ : Term → Term lamᵛ = lam visible lamʰ : Term → Term lamʰ = lam hidden argᵛʳ : ∀{A} → A → Arg A argᵛʳ = arg (arginfo visible relevant) argʰʳ : ∀{A} → A → Arg A argʰʳ = arg (arginfo hidden relevant) app` : (Args → Term) → (hrs : List ArgInfo) → Term →⟨ length hrs ⟩ Term app` f = go [] where go : List (Arg Term) → (hrs : List ArgInfo) → Term →⟨ length hrs ⟩ Term go args [] = f (reverse args) go args (i ∷ hs) = λ t → go (arg i t ∷ args) hs con` : QName → (hrs : List ArgInfo) → Term →⟨ length hrs ⟩ Term con` x = app` (con x) def` : QName → (hrs : List ArgInfo) → Term →⟨ length hrs ⟩ Term def` x = app` (def x) var` : ℕ → (hrs : List ArgInfo) → Term →⟨ length hrs ⟩ Term var` x = app` (var x) coe : ∀ {A : Set} {z : A} n → (Term →⟨ length (replicate n z) ⟩ Term) → Term →⟨ n ⟩ Term coe zero t = t coe (suc n) f = λ t → coe n (f t) con`ⁿʳ : QName → (n : ℕ) → Term →⟨ n ⟩ Term con`ⁿʳ x n = coe n (app` (con x) (replicate n (arginfo visible relevant))) def`ⁿʳ : QName → (n : ℕ) → Term →⟨ n ⟩ Term def`ⁿʳ x n = coe n (app` (def x) (replicate n (arginfo visible relevant))) var`ⁿʳ : ℕ → (n : ℕ) → Term →⟨ n ⟩ Term var`ⁿʳ x n = coe n (app` (var x) (replicate n (arginfo visible relevant))) sort₀ : Sort sort₀ = lit 0 sort₁ : Sort sort₁ = lit 1 `Set₀ : Term `Set₀ = sort sort₀ el₀ : Term → Type el₀ = el sort₀ -- Builds a type variable (of type Set₀) ``var₀ : ℕ → Args → Type ``var₀ n args = el₀ (var n args) ``Set₀ : Type ``Set₀ = el sort₁ `Set₀ unEl : Type → Term unEl (el _ tm) = tm getSort : Type → Sort getSort (el s _) = s unArg : ∀ {A} → Arg A → A unArg (arg _ a) = a `Level : Term `Level = def (quote Level) [] ``Level : Type ``Level = el₀ `Level `sucLevel : Term → Term `sucLevel = def`ⁿʳ (quote lsuc) 1 sucSort : Sort → Sort sucSort s = set (`sucLevel (sort s)) ℕ→Level : ℕ → Level ℕ→Level zero = lzero ℕ→Level (suc n) = lsuc (ℕ→Level n) -- Can't match on Levels anymore -- Level→ℕ : Level → ℕ -- Level→ℕ zero = zero -- Level→ℕ (suc n) = suc (Level→ℕ n) setLevel : Level → Sort setLevel ℓ = lit 0 -- (Level→ℕ ℓ) _==_ : QName → QName → Bool _==_ = primQNameEquality decodeSort : Sort → Maybe Level decodeSort (set (con c [])) = when (quote lzero == c) (just lzero) decodeSort (set (con c (arg (arginfo visible relevant) s ∷ []))) = when (quote lsuc == c) (mapMaybe lsuc (decodeSort (set s))) decodeSort (set (sort s)) = decodeSort s decodeSort (set _) = nothing decodeSort (lit n) = just (ℕ→Level n) decodeSort unknown = nothing _`⊔`_ : Sort → Sort → Sort s₁ `⊔` s₂ with decodeSort s₁ | decodeSort s₂ ... | just n₁ | just n₂ = setLevel (n₁ ⊔ n₂) ... | _ | _ = set (def (quote _⊔_) (argᵛʳ (sort s₁) ∷ argᵛʳ (sort s₂) ∷ [])) Π : Arg Type → Type → Type Π t u = el (getSort (unArg t) `⊔` getSort u) (pi t u) Πᵛʳ : Type → Type → Type Πᵛʳ t u = el (getSort t `⊔` getSort u) (pi (arg (arginfo visible relevant) t) u) Πʰʳ : Type → Type → Type Πʰʳ t u = el (getSort t `⊔` getSort u) (pi (arg (arginfo hidden relevant) t) u) open ReflectLibrary `ℕ : Term `ℕ = def (quote ℕ) [] `ℕOk : (unquote `ℕ) ≡ ℕ `ℕOk = refl ``ℕ : Type ``ℕ = el₀ `ℕ idℕ : ℕ → ℕ idℕ = unquote (lamᵛ (var 0 [])) id : (A : Set) → A → A id = unquote (lamᵛ (lamᵛ (var 0 []))) idBox : Box ({A : Set} → A → A) idBox = box (unquote (lamᵛ (var 0 []))) -- builds a pair _`,_ : Term → Term → Term _`,_ = con`ⁿʳ (quote _,_) 2 `tt : Term `tt = con (quote tt) [] tuple : List Term → Term tuple = foldr _`,_ `tt `refl : Term `refl = con (quote refl) [] `zero : Term `zero = con (quote ℕ.zero) [] `[] : Term `[] = con (quote []) [] _`∷_ : (`x `xs : Term) → Term _`∷_ = con`ⁿʳ (quote _∷_) 2 `var : (`n `args : Term) → Term `var = con`ⁿʳ (quote var) 2 `lam : (`hiding `args : Term) → Term `lam = con`ⁿʳ (quote lam) 2 `visible : Term `visible = con (quote visible) [] `hidden : Term `hidden = con (quote hidden) [] `[_`] : Term → Term `[ x `] = x `∷ `[] quotedTwice : Term quotedTwice = `lam `visible (`var `zero `[]) unquoteTwice₂ : ℕ → ℕ unquoteTwice₂ = unquote (unquote quotedTwice) unquoteTwice : ℕ → ℕ unquoteTwice x = unquote (unquote (`var `zero `[])) id₂ : {A : Set} → A → A id₂ = unquote (lamᵛ (var 0 [])) id₃ : {A : Set} → A → A id₃ x = unquote (var 0 []) module Id {A : Set} (x : A) where x′ : A x′ = unquote (var 0 []) k`ℕ : ℕ → Term k`ℕ zero = `ℕ k`ℕ (suc n) = unquote (def (quote k`ℕ) [ argᵛʳ (var 0 []) ]) -- k`ℕ n test : id ≡ (λ A (x : A) → x) × unquote `Set₀ ≡ Set × unquote `ℕ ≡ ℕ × unquote (lamᵛ (var 0 [])) ≡ (λ (x : Set) → x) × id ≡ (λ A (x : A) → x) × unquote `tt ≡ tt × (λ {A} → Id.x′ {A}) ≡ (λ {A : Set} (x : A) → x) × unquote (pi (argᵛʳ ``Set₀) ``Set₀) ≡ (Set → Set) × unquoteTwice ≡ (λ (x : ℕ) → x) × unquote (k`ℕ 42) ≡ ℕ × ⊤ test = unquote (tuple (replicate n `refl)) where n = 10 Πⁿ : ℕ → Type → Type Πⁿ zero t = t Πⁿ (suc n) t = Π (argʰʳ ``Set₀) (Πⁿ n t) ƛⁿ : Hiding → ℕ → Term → Term ƛⁿ h zero t = t ƛⁿ h (suc n) t = lam h (ƛⁿ h n t) -- projᵢ : Proj i n -- projᵢ = proj i n -- Projᵢ = {A₁ ... Ai ... An : Set} → A₁ → ... → Aᵢ → ... → An → Aᵢ -- projᵢ = λ {A₁ ... Ai ... An} x₁ ... xᵢ ... xn → xᵢ Proj : (i n : ℕ) → Term Proj i n = unEl (Πⁿ n (go n)) where n∸1 = n ∸ 1 go : ℕ → Type go zero = ``var₀ ((n + n) ∸ i) [] go (suc m) = Π (argᵛʳ (``var₀ n∸1 [])) (go m) proj : (i n : ℕ) → Term proj i n = ƛⁿ visible n (var (n ∸ i) []) projFull : (i n : ℕ) → Term projFull i n = ƛⁿ hidden n (proj i n) ℕ→ℕ : Set ℕ→ℕ = unquote (unEl (Π (argᵛʳ ``ℕ) ``ℕ)) ℕ→ℕOk : ℕ→ℕ ≡ (ℕ → ℕ) ℕ→ℕOk = refl ``∀A→A : Type ``∀A→A = Π (argᵛʳ ``Set₀) (``var₀ 0 []) ∀A→A : Set₁ ∀A→A = unquote (unEl ``∀A→A) Proj₁¹ : Set₁ Proj₁¹ = unquote (Proj 1 1) Proj₁² : Set₁ Proj₁² = unquote (Proj 1 2) Proj₂² : Set₁ Proj₂² = unquote (Proj 2 2) proj₃⁵ : unquote (Proj 3 5) proj₃⁵ _ _ x _ _ = x proj₃⁵′ : Box (unquote (Proj 3 5)) proj₃⁵′ = box (unquote (proj 3 5)) proj₂⁷ : unquote (Proj 2 7) proj₂⁷ = unquote (proj 2 7) test-proj : proj₃⁵′ ≡ box (λ _ _ x _ _ → x) × Proj₁¹ ≡ ({A : Set} → A → A) × Proj₁² ≡ ({A₁ A₂ : Set} → A₁ → A₂ → A₁) × Proj₂² ≡ ({A₁ A₂ : Set} → A₁ → A₂ → A₂) × unquote (Proj 3 5) ≡ ({A₁ A₂ A₃ A₄ A₅ : Set} → A₁ → A₂ → A₃ → A₄ → A₅ → A₃) × unquote (projFull 1 1) ≡ (λ {A : Set} (x : A) → x) × unquote (projFull 1 2) ≡ (λ {A₁ A₂ : Set} (x₁ : A₁) (x₂ : A₂) → x₁) × unquote (projFull 2 2) ≡ (λ {A₁ A₂ : Set} (x₁ : A₁) (x₂ : A₂) → x₂) × ∀A→A ≡ (∀ (A : Set) → A) × ⊤ test-proj = unquote (tuple (replicate n `refl)) where n = 9 module Test where data Squash (A : Set) : Set where squash : unquote (unEl (Π (arg (arginfo visible irrelevant) (``var₀ 0 [])) (el₀ (def (quote Squash) (argᵛʳ (var 1 []) ∷ []))))) data Squash (A : Set) : Set where squash : .A → Squash A `Squash : Term → Term `Squash = def`ⁿʳ (quote Squash) 1 squash-type : Type squash-type = Π (arg (arginfo visible irrelevant) (``var₀ 0 [])) (el₀ (`Squash (var 1 []))) test-squash : ∀ {A} → (.A → Squash A) ≡ unquote (unEl squash-type) test-squash = refl `∀ℓ→Setℓ : Type `∀ℓ→Setℓ = Πᵛʳ ``Level (el₀ (sort (set (var 0 []))))
{ "alphanum_fraction": 0.5149066288, "avg_line_length": 25.1565934066, "ext": "agda", "hexsha": "5af90d04535ddc4c03d239baa68cf56420ccd66d", "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/TermSplicing.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/TermSplicing.agda", "max_line_length": 131, "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/TermSplicing.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": 3929, "size": 9157 }
module BHeap {A : Set}(_≤_ : A → A → Set) where open import Bound.Lower A open import Bound.Lower.Order _≤_ open import BTree {A} hiding (flatten) open import Data.Nat hiding (_≤_) open import Data.List open import Data.Sum renaming (_⊎_ to _∨_) open import Relation.Binary open import Relation.Binary.Core open import Relation.Binary.PropositionalEquality hiding (trans) open DecTotalOrder decTotalOrder hiding (refl ; _≤_) data BHeap : Bound → Set where lf : {b : Bound} → BHeap b nd : {b : Bound}{x : A} → LeB b (val x) → (l r : BHeap (val x)) → BHeap b forget : {b : Bound} → BHeap b → BTree forget lf = leaf forget (nd {x = x} _ l r) = node x (forget l) (forget r) # : {b : Bound} → BHeap b → ℕ # lf = zero # (nd _ l r) = suc (# l + # r) height : {b : Bound} → BHeap b → ℕ height lf = zero height (nd _ l r) with total (height l) (height r) ... | inj₁ hl≤hr = suc (height r) ... | inj₂ hr≤hl = suc (height l) merge : {b : Bound} → Total _≤_ → (l r : BHeap b) → BHeap b merge _ lf r = r merge _ l lf = l merge tot≤ (nd {x = x} b≤x l r) (nd {x = x'} b≤x' l' r') with tot≤ x x' ... | inj₁ x≤x' = nd b≤x (merge tot≤ l r) (nd (lexy x≤x') l' r') ... | inj₂ x'≤x = nd b≤x' (nd (lexy x'≤x) l r) (merge tot≤ l' r') flatten : {b : Bound}(h : BHeap b) → List A flatten lf = [] flatten (nd {x = x} b≤x l r) = x ∷ (flatten l ++ flatten r)
{ "alphanum_fraction": 0.5619777159, "avg_line_length": 28.72, "ext": "agda", "hexsha": "e66d700fbe4517caacb7a6a7f9180375cd0f0fa9", "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/BHeap.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/BHeap.agda", "max_line_length": 65, "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/BHeap.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": 537, "size": 1436 }
open import SingleSorted.AlgebraicTheory import SingleSorted.Interpretation as Interpretation import SingleSorted.SyntacticCategory as SyntacticCategory import SingleSorted.Substitution as Substitution module SingleSorted.UniversalInterpretation {ℓt} {Σ : Signature} (T : Theory ℓt Σ) where open Theory T open Substitution T open SyntacticCategory T -- The universal interpretation in the syntactic category ℐ : Interpretation.Interpretation Σ cartesian-𝒮 ℐ = record { interp-carrier = ctx-slot ; interp-pow = power-𝒮 ; interp-oper = λ f var-var → tm-oper f (λ i → tm-var i) } open Interpretation.Interpretation ℐ -- A term is essentially interpreted by itself interp-term-self : ∀ {Γ} (t : Term Γ) y → Γ ⊢ interp-term t y ≈ t interp-term-self (tm-var x) _ = eq-refl interp-term-self (tm-oper f xs) y = eq-congr (λ i → interp-term-self (xs i) var-var)
{ "alphanum_fraction": 0.7167947311, "avg_line_length": 28.46875, "ext": "agda", "hexsha": "a4e20eadc1ed1e71440100a3193bedc1248b4819", "lang": "Agda", "max_forks_count": 6, "max_forks_repo_forks_event_max_datetime": "2021-05-24T02:51:43.000Z", "max_forks_repo_forks_event_min_datetime": "2021-02-16T13:43:07.000Z", "max_forks_repo_head_hexsha": "2aaf850bb1a262681c5a232cdefae312f921b9d4", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "andrejbauer/formaltt", "max_forks_repo_path": "src/SingleSorted/UniversalInterpretation.agda", "max_issues_count": 1, "max_issues_repo_head_hexsha": "2aaf850bb1a262681c5a232cdefae312f921b9d4", "max_issues_repo_issues_event_max_datetime": "2021-05-14T16:15:17.000Z", "max_issues_repo_issues_event_min_datetime": "2021-04-30T14:18:25.000Z", "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "andrejbauer/formaltt", "max_issues_repo_path": "src/SingleSorted/UniversalInterpretation.agda", "max_line_length": 86, "max_stars_count": 21, "max_stars_repo_head_hexsha": "0a9d25e6e3965913d9b49a47c88cdfb94b55ffeb", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "cilinder/formaltt", "max_stars_repo_path": "src/SingleSorted/UniversalInterpretation.agda", "max_stars_repo_stars_event_max_datetime": "2021-11-19T15:50:08.000Z", "max_stars_repo_stars_event_min_datetime": "2021-02-16T14:07:06.000Z", "num_tokens": 268, "size": 911 }
open import Agda.Builtin.Unit open import Agda.Builtin.Nat open import Agda.Builtin.List open import Agda.Builtin.Reflection renaming (bindTC to _>>=_) open import Agda.Builtin.Equality macro macro₁ : Term -> TC ⊤ macro₁ goal = do u ← quoteTC ((1 + 2) - 3) u' ← onlyReduceDefs (quote _+_ ∷ []) (normalise u) qu' ← quoteTC u' unify qu' goal test₁ : macro₁ ≡ def (quote _-_) (arg (arg-info visible relevant) (lit (nat 3)) ∷ arg (arg-info visible relevant) (lit (nat 3)) ∷ []) test₁ = refl macro macro₂ : Term -> TC ⊤ macro₂ goal = do u ← quoteTC ((1 - 2) + 3) u' ← dontReduceDefs (quote _+_ ∷ []) (normalise u) qu' ← quoteTC u' unify qu' goal test₂ : macro₂ ≡ def (quote _+_) (arg (arg-info visible relevant) (lit (nat 0)) ∷ arg (arg-info visible relevant) (lit (nat 3)) ∷ []) test₂ = refl
{ "alphanum_fraction": 0.5736095965, "avg_line_length": 27.7878787879, "ext": "agda", "hexsha": "6f8232595e4aac1fb9e4c880685712f10e124b2c", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "ed8ac6f4062ea8a20fa0f62d5db82d4e68278338", "max_forks_repo_licenses": [ "BSD-3-Clause" ], "max_forks_repo_name": "shlevy/agda", "max_forks_repo_path": "test/Succeed/ReduceDefs.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "ed8ac6f4062ea8a20fa0f62d5db82d4e68278338", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "BSD-3-Clause" ], "max_issues_repo_name": "shlevy/agda", "max_issues_repo_path": "test/Succeed/ReduceDefs.agda", "max_line_length": 71, "max_stars_count": null, "max_stars_repo_head_hexsha": "ed8ac6f4062ea8a20fa0f62d5db82d4e68278338", "max_stars_repo_licenses": [ "BSD-3-Clause" ], "max_stars_repo_name": "shlevy/agda", "max_stars_repo_path": "test/Succeed/ReduceDefs.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 298, "size": 917 }
------------------------------------------------------------------------ -- The Agda standard library -- -- Homomorphism proofs for variables and constants over polynomials ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Tactic.RingSolver.Core.Polynomial.Parameters module Tactic.RingSolver.Core.Polynomial.Homomorphism.Variables {r₁ r₂ r₃ r₄} (homo : Homomorphism r₁ r₂ r₃ r₄) where open import Data.Product using (_,_) open import Data.Vec.Base as Vec using (Vec) open import Data.Fin using (Fin) open import Data.List.Kleene open Homomorphism homo open import Tactic.RingSolver.Core.Polynomial.Homomorphism.Lemmas homo open import Tactic.RingSolver.Core.Polynomial.Base (Homomorphism.from homo) open import Tactic.RingSolver.Core.Polynomial.Reasoning (Homomorphism.to homo) open import Tactic.RingSolver.Core.Polynomial.Semantics homo open import Algebra.Operations.Ring rawRing ι-hom : ∀ {n} (i : Fin n) (Ρ : Vec Carrier n) → ⟦ ι i ⟧ Ρ ≈ Vec.lookup Ρ i ι-hom i Ρ′ = let (ρ , Ρ) = drop-1 (space≤′n i) Ρ′ in begin ⟦ (κ Raw.1# Δ 1 ∷↓ []) ⊐↓ space≤′n i ⟧ Ρ′ ≈⟨ ⊐↓-hom (κ Raw.1# Δ 1 ∷↓ []) (space≤′n i) Ρ′ ⟩ ⅀?⟦ κ Raw.1# Δ 1 ∷↓ [] ⟧ (ρ , Ρ) ≈⟨ ∷↓-hom-s (κ Raw.1#) 0 [] ρ Ρ ⟩ ρ * ⟦ κ Raw.1# ⟧ Ρ ≈⟨ *≫ 1-homo ⟩ ρ * 1# ≈⟨ *-identityʳ ρ ⟩ ρ ≡⟨ drop-1⇒lookup i Ρ′ ⟩ Vec.lookup Ρ′ i ∎
{ "alphanum_fraction": 0.5377113134, "avg_line_length": 40.4736842105, "ext": "agda", "hexsha": "d57760c0e3271033cc6e0d793f90b03cd6b1c5d6", "lang": "Agda", "max_forks_count": 1, "max_forks_repo_forks_event_max_datetime": "2021-11-04T06:54:45.000Z", "max_forks_repo_forks_event_min_datetime": "2021-11-04T06:54:45.000Z", "max_forks_repo_head_hexsha": "fb380f2e67dcb4a94f353dbaec91624fcb5b8933", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "DreamLinuxer/popl21-artifact", "max_forks_repo_path": "agda-stdlib/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Variables.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "fb380f2e67dcb4a94f353dbaec91624fcb5b8933", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "DreamLinuxer/popl21-artifact", "max_issues_repo_path": "agda-stdlib/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Variables.agda", "max_line_length": 93, "max_stars_count": 5, "max_stars_repo_head_hexsha": "fb380f2e67dcb4a94f353dbaec91624fcb5b8933", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "DreamLinuxer/popl21-artifact", "max_stars_repo_path": "agda-stdlib/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Variables.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": 505, "size": 1538 }
{- Holey congruence for propositional equality. -} module Holes.Cong.Propositional where open import Holes.Prelude open PropEq using (_≡_; refl; cong; sym; trans) import Holes.Cong.General as Cong open Cong (quote cong) (quote sym) public using (cong!)
{ "alphanum_fraction": 0.7471264368, "avg_line_length": 16.3125, "ext": "agda", "hexsha": "8364473c0d9fad35283eef29c36befae6341960d", "lang": "Agda", "max_forks_count": 2, "max_forks_repo_forks_event_max_datetime": "2021-02-02T18:57:17.000Z", "max_forks_repo_forks_event_min_datetime": "2017-01-27T14:57:39.000Z", "max_forks_repo_head_hexsha": "b5537c29e69febd7e89580398fac38d619aab3b4", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "bch29/agda-holes", "max_forks_repo_path": "src/Holes/Cong/Propositional.agda", "max_issues_count": 2, "max_issues_repo_head_hexsha": "b5537c29e69febd7e89580398fac38d619aab3b4", "max_issues_repo_issues_event_max_datetime": "2020-08-31T20:58:33.000Z", "max_issues_repo_issues_event_min_datetime": "2019-01-16T10:47:58.000Z", "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "bch29/agda-holes", "max_issues_repo_path": "src/Holes/Cong/Propositional.agda", "max_line_length": 47, "max_stars_count": 24, "max_stars_repo_head_hexsha": "b5537c29e69febd7e89580398fac38d619aab3b4", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "bch29/agda-holes", "max_stars_repo_path": "src/Holes/Cong/Propositional.agda", "max_stars_repo_stars_event_max_datetime": "2021-11-03T15:02:41.000Z", "max_stars_repo_stars_event_min_datetime": "2017-01-28T10:56:46.000Z", "num_tokens": 74, "size": 261 }
data N : Set where suc : N → N data Val : N → Set where valSuc : ∀ n → Val (suc n) record R : Set where constructor wrap field unwrap : N data W (ft : R) : Set where immed : (v : Val (R.unwrap ft)) → W ft test : (fa : R) → W fa → R test fa (immed (valSuc a)) = fa postulate Evaluate : ∀ (ft : R) (P : (w : W ft) → Set) → Set test₂ : ∀ (fa : R) → Set test₂ fa = Evaluate fa testw where testw : W fa → Set testw (immed (valSuc a)) = W fa
{ "alphanum_fraction": 0.5596529284, "avg_line_length": 17.7307692308, "ext": "agda", "hexsha": "2dd8ef7514bb6f07c69c7dd5477eebe9bcf23931", "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/Issue2053.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/Issue2053.agda", "max_line_length": 52, "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/Issue2053.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": 180, "size": 461 }
module Operations.Combinatorial where open import Data.Bool using (true; false) import Data.Bool as B import Data.Fin as F open import Data.Nat using (ℕ; suc) open import Data.Vec using ([]; _∷_) import Data.Vec as V open import Relation.Binary.PropositionalEquality open import Types open import Eval not : Closed (𝔹 ⇒ 𝔹) not = lam (var F.zero refl nand var F.zero refl) not-prf : ∀ {n} {ctx : Ctx n} {Γ : Env ctx} b → (Γ ⟦ not ⟧) b ≡ B.not b not-prf true = refl not-prf false = refl not⁺ : ∀ n → Closed (𝔹⁺ n ⇒ 𝔹⁺ n) not⁺ 0 = lam [] not⁺ (suc n) = lam (not ∙ head (var F.zero refl) ∷ not⁺ n ∙ tail (var F.zero refl)) not⁺-prf : ∀ {n m} {ctx : Ctx m} {Γ : Env ctx} bs → (Γ ⟦ not⁺ n ⟧) bs ≡ V.map B.not bs not⁺-prf [] = refl not⁺-prf (true ∷ bs) = cong₂ _∷_ refl (not⁺-prf bs) not⁺-prf (false ∷ bs) = cong₂ _∷_ refl (not⁺-prf bs) and : Closed (𝔹 ⇒ (𝔹 ⇒ 𝔹)) and = lam (lam (not ∙ ((var (F.suc F.zero) refl) nand (var F.zero refl)))) and-prf : ∀ a b → ([] ⟦ and ⟧) a b ≡ B._∧_ a b and-prf true true = refl and-prf true false = refl and-prf false true = refl and-prf false false = refl and⁺ : ∀ n → Closed (𝔹⁺ n ⇒ (𝔹⁺ n ⇒ 𝔹⁺ n)) and⁺ 0 = lam (lam []) and⁺ (suc n) = lam (lam (x ∷ xs)) where x = and ∙ head (var (F.suc F.zero) refl) ∙ head (var F.zero refl) xs = and⁺ n ∙ tail (var (F.suc F.zero) refl) ∙ tail (var F.zero refl) and⁺-prf : ∀ {n m} {ctx : Ctx m} {Γ : Env ctx} as bs → (Γ ⟦ and⁺ n ⟧) as bs ≡ V.zipWith B._∧_ as bs and⁺-prf [] [] = refl and⁺-prf ( true ∷ as) ( true ∷ bs) = cong₂ _∷_ refl (and⁺-prf as bs) and⁺-prf ( true ∷ as) (false ∷ bs) = cong₂ _∷_ refl (and⁺-prf as bs) and⁺-prf (false ∷ as) ( true ∷ bs) = cong₂ _∷_ refl (and⁺-prf as bs) and⁺-prf (false ∷ as) (false ∷ bs) = cong₂ _∷_ refl (and⁺-prf as bs) or : Closed (𝔹 ⇒ (𝔹 ⇒ 𝔹)) or = lam (lam (l nand r)) where l = ((var (F.suc F.zero) refl) nand (var (F.suc F.zero) refl)) r = ((var F.zero refl) nand (var F.zero refl)) or-prf : ∀ a b → ([] ⟦ or ⟧) a b ≡ B._∨_ a b or-prf true true = refl or-prf true false = refl or-prf false true = refl or-prf false false = refl or⁺ : ∀ n → Closed (𝔹⁺ n ⇒ (𝔹⁺ n ⇒ 𝔹⁺ n)) or⁺ 0 = lam (lam []) or⁺ (suc n) = lam (lam (x ∷ xs)) where x = or ∙ head (var (F.suc F.zero) refl) ∙ head (var F.zero refl) xs = or⁺ n ∙ tail (var (F.suc F.zero) refl) ∙ tail (var F.zero refl) or⁺-prf : ∀ {n m} {ctx : Ctx m} {Γ : Env ctx} as bs → (Γ ⟦ or⁺ n ⟧) as bs ≡ V.zipWith B._∨_ as bs or⁺-prf [] [] = refl or⁺-prf ( true ∷ as) ( true ∷ bs) = cong₂ _∷_ refl (or⁺-prf as bs) or⁺-prf ( true ∷ as) (false ∷ bs) = cong₂ _∷_ refl (or⁺-prf as bs) or⁺-prf (false ∷ as) ( true ∷ bs) = cong₂ _∷_ refl (or⁺-prf as bs) or⁺-prf (false ∷ as) (false ∷ bs) = cong₂ _∷_ refl (or⁺-prf as bs) xor : Closed (𝔹 ⇒ (𝔹 ⇒ 𝔹)) xor = lam (lam (lam (l nand r) ∙ x)) where x = (var (F.suc F.zero) refl) nand (var F.zero refl) l = ((var (F.suc (F.suc F.zero)) refl) nand (var F.zero refl)) r = ((var F.zero refl) nand (var (F.suc F.zero) refl)) xor-prf : ∀ a b → ([] ⟦ xor ⟧) a b ≡ B._xor_ a b xor-prf true true = refl xor-prf true false = refl xor-prf false true = refl xor-prf false false = refl xor⁺ : ∀ n → Closed (𝔹⁺ n ⇒ (𝔹⁺ n ⇒ 𝔹⁺ n)) xor⁺ 0 = lam (lam []) xor⁺ (suc n) = lam (lam (x ∷ xs)) where x = xor ∙ head (var (F.suc F.zero) refl) ∙ head (var F.zero refl) xs = xor⁺ n ∙ tail (var (F.suc F.zero) refl) ∙ tail (var F.zero refl) xor⁺-prf : ∀ {n m} {ctx : Ctx m} {Γ : Env ctx} as bs → (Γ ⟦ xor⁺ n ⟧) as bs ≡ V.zipWith B._xor_ as bs xor⁺-prf [] [] = refl xor⁺-prf ( true ∷ as) ( true ∷ bs) = cong₂ _∷_ refl (xor⁺-prf as bs) xor⁺-prf ( true ∷ as) (false ∷ bs) = cong₂ _∷_ refl (xor⁺-prf as bs) xor⁺-prf (false ∷ as) ( true ∷ bs) = cong₂ _∷_ refl (xor⁺-prf as bs) xor⁺-prf (false ∷ as) (false ∷ bs) = cong₂ _∷_ refl (xor⁺-prf as bs)
{ "alphanum_fraction": 0.5629453682, "avg_line_length": 35.0833333333, "ext": "agda", "hexsha": "9f9460b93c9eff2ed7ff923d4fea33406862e0bf", "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": "6f3df71dcd958c6a1d1bf4f175dc16c220d42124", "max_forks_repo_licenses": [ "BSD-3-Clause" ], "max_forks_repo_name": "bens/hwlc", "max_forks_repo_path": "Operations/Combinatorial.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "6f3df71dcd958c6a1d1bf4f175dc16c220d42124", "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": "bens/hwlc", "max_issues_repo_path": "Operations/Combinatorial.agda", "max_line_length": 101, "max_stars_count": null, "max_stars_repo_head_hexsha": "6f3df71dcd958c6a1d1bf4f175dc16c220d42124", "max_stars_repo_licenses": [ "BSD-3-Clause" ], "max_stars_repo_name": "bens/hwlc", "max_stars_repo_path": "Operations/Combinatorial.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 1761, "size": 3789 }
{-# OPTIONS --safe --experimental-lossy-unification #-} module Cubical.Homotopy.Group.Base where open import Cubical.Homotopy.Loopspace open import Cubical.Foundations.Prelude open import Cubical.Foundations.Pointed open import Cubical.Foundations.Pointed.Homogeneous open import Cubical.Foundations.HLevels open import Cubical.Foundations.GroupoidLaws renaming (assoc to ∙assoc) open import Cubical.Foundations.Path open import Cubical.Foundations.Isomorphism open import Cubical.Foundations.Equiv open import Cubical.Foundations.Univalence open import Cubical.Foundations.Function open import Cubical.Foundations.Transport open import Cubical.Functions.Morphism open import Cubical.HITs.SetTruncation renaming (rec to sRec ; rec2 to sRec2 ; elim to sElim ; elim2 to sElim2 ; elim3 to sElim3 ; map to sMap) open import Cubical.HITs.Truncation renaming (rec to trRec ; elim to trElim ; elim2 to trElim2) open import Cubical.HITs.Sn open import Cubical.HITs.Susp renaming (toSusp to σ) open import Cubical.HITs.S1 open import Cubical.Data.Sigma open import Cubical.Data.Nat open import Cubical.Data.Bool open import Cubical.Data.Unit open import Cubical.Algebra.Group open import Cubical.Algebra.Semigroup open import Cubical.Algebra.Monoid open Iso open IsGroup open IsSemigroup open IsMonoid open GroupStr {- Homotopy group -} π : ∀ {ℓ} (n : ℕ) (A : Pointed ℓ) → Type ℓ π n A = ∥ typ ((Ω^ n) A) ∥₂ {- Alternative formulation. This will be given a group structure in the Properties file -} π' : ∀ {ℓ} (n : ℕ) (A : Pointed ℓ) → Type ℓ π' n A = ∥ S₊∙ n →∙ A ∥₂ {- π as a group -} 1π : ∀ {ℓ} (n : ℕ) {A : Pointed ℓ} → π n A 1π zero {A = A} = ∣ pt A ∣₂ 1π (suc n) = ∣ refl ∣₂ ·π : ∀ {ℓ} (n : ℕ) {A : Pointed ℓ} → π (suc n) A → π (suc n) A → π (suc n) A ·π n = sRec2 squash₂ λ p q → ∣ p ∙ q ∣₂ -π : ∀ {ℓ} (n : ℕ) {A : Pointed ℓ} → π (suc n) A → π (suc n) A -π n = sMap sym π-rUnit : ∀ {ℓ} (n : ℕ) {A : Pointed ℓ} (x : π (suc n) A) → (·π n x (1π (suc n))) ≡ x π-rUnit n = sElim (λ _ → isSetPathImplicit) λ p i → ∣ rUnit p (~ i) ∣₂ π-lUnit : ∀ {ℓ} (n : ℕ) {A : Pointed ℓ} (x : π (suc n) A) → (·π n (1π (suc n)) x) ≡ x π-lUnit n = sElim (λ _ → isSetPathImplicit) λ p i → ∣ lUnit p (~ i) ∣₂ π-rCancel : ∀ {ℓ} (n : ℕ) {A : Pointed ℓ} (x : π (suc n) A) → (·π n x (-π n x)) ≡ 1π (suc n) π-rCancel n = sElim (λ _ → isSetPathImplicit) λ p i → ∣ rCancel p i ∣₂ π-lCancel : ∀ {ℓ} (n : ℕ) {A : Pointed ℓ} (x : π (suc n) A) → (·π n (-π n x) x) ≡ 1π (suc n) π-lCancel n = sElim (λ _ → isSetPathImplicit) λ p i → ∣ lCancel p i ∣₂ π-assoc : ∀ {ℓ} (n : ℕ) {A : Pointed ℓ} (x y z : π (suc n) A) → ·π n x (·π n y z) ≡ ·π n (·π n x y) z π-assoc n = sElim3 (λ _ _ _ → isSetPathImplicit) λ p q r i → ∣ ∙assoc p q r i ∣₂ π-comm : ∀ {ℓ} (n : ℕ) {A : Pointed ℓ} (x y : π (suc (suc n)) A) → ·π (suc n) x y ≡ ·π (suc n) y x π-comm n = sElim2 (λ _ _ → isSetPathImplicit) λ p q i → ∣ EH n p q i ∣₂ -- πₙ₊₁ πGr : ∀ {ℓ} (n : ℕ) (A : Pointed ℓ) → Group ℓ fst (πGr n A) = π (suc n) A 1g (snd (πGr n A)) = 1π (suc n) GroupStr._·_ (snd (πGr n A)) = ·π n inv (snd (πGr n A)) = -π n is-set (isSemigroup (isMonoid (isGroup (snd (πGr n A))))) = squash₂ assoc (isSemigroup (isMonoid (isGroup (snd (πGr n A))))) = π-assoc n identity (isMonoid (isGroup (snd (πGr n A)))) x = (π-rUnit n x) , (π-lUnit n x) inverse (isGroup (snd (πGr n A))) x = (π-rCancel n x) , (π-lCancel n x) -- Group operations on π'. -- We define the corresponding structure on the untruncated -- (S₊∙ n →∙ A). ∙Π : ∀ {ℓ} {A : Pointed ℓ} {n : ℕ} → (S₊∙ n →∙ A) → (S₊∙ n →∙ A) → (S₊∙ n →∙ A) ∙Π {A = A} {n = zero} p q = (λ _ → pt A) , refl fst (∙Π {A = A} {n = suc zero} (f , p) (g , q)) base = pt A fst (∙Π {A = A} {n = suc zero} (f , p) (g , q)) (loop j) = ((sym p ∙∙ cong f loop ∙∙ p) ∙ (sym q ∙∙ cong g loop ∙∙ q)) j snd (∙Π {A = A} {n = suc zero} (f , p) (g , q)) = refl fst (∙Π {A = A} {n = suc (suc n)} (f , p) (g , q)) north = pt A fst (∙Π {A = A} {n = suc (suc n)} (f , p) (g , q)) south = pt A fst (∙Π {A = A} {n = suc (suc n)} (f , p) (g , q)) (merid a j) = ((sym p ∙∙ cong f (merid a ∙ sym (merid (ptSn (suc n)))) ∙∙ p) ∙ (sym q ∙∙ cong g (merid a ∙ sym (merid (ptSn (suc n)))) ∙∙ q)) j snd (∙Π {A = A} {n = suc (suc n)} (f , p) (g , q)) = refl -Π : ∀ {ℓ} {A : Pointed ℓ} {n : ℕ} → (S₊∙ n →∙ A) → (S₊∙ n →∙ A) -Π {n = zero} f = f fst (-Π {A = A} {n = suc zero} f) base = fst f base fst (-Π {A = A} {n = suc zero} f) (loop j) = fst f (loop (~ j)) snd (-Π {A = A} {n = suc zero} f) = snd f fst (-Π {A = A} {n = suc (suc n)} f) north = fst f north fst (-Π {A = A} {n = suc (suc n)} f) south = fst f north fst (-Π {A = A} {n = suc (suc n)} f) (merid a j) = fst f ((merid a ∙ sym (merid (ptSn _))) (~ j)) snd (-Π {A = A} {n = suc (suc n)} f) = snd f -- to prove that this gives a group structure on π', we first -- prove that Ωⁿ A ≃ (Sⁿ →∙ A). -- We use the following map mutual Ω→SphereMap : ∀ {ℓ} (n : ℕ) {A : Pointed ℓ} → typ ((Ω^ n) A) → (S₊∙ n →∙ A) fst (Ω→SphereMap zero a) false = a fst (Ω→SphereMap zero {A = A} a) true = pt A snd (Ω→SphereMap zero a) = refl fst (Ω→SphereMap (suc zero) {A = A} p) base = pt A fst (Ω→SphereMap (suc zero) p) (loop i) = p i snd (Ω→SphereMap (suc zero) p) = refl fst (Ω→SphereMap (suc (suc n)) {A = A} p) north = pt A fst (Ω→SphereMap (suc (suc n)) {A = A} p) south = pt A fst (Ω→SphereMap (suc (suc n)) p) (merid a i) = (sym (Ω→SphereMapId (suc n) a) ∙∙ (λ i → Ω→SphereMap (suc n) (p i) .fst a) ∙∙ Ω→SphereMapId (suc n) a) i snd (Ω→SphereMap (suc (suc n)) p) = refl Ω→SphereMapId : ∀ {ℓ} (n : ℕ) {A : Pointed ℓ} (a : _) → Ω→SphereMap n {A = A} (pt ((Ω^ n) A)) .fst a ≡ pt A Ω→SphereMapId zero false = refl Ω→SphereMapId zero true = refl Ω→SphereMapId (suc zero) base = refl Ω→SphereMapId (suc zero) (loop i) = refl Ω→SphereMapId (suc (suc n)) north = refl Ω→SphereMapId (suc (suc n)) south = refl Ω→SphereMapId (suc (suc n)) {A = A} (merid a i) j = ∙∙lCancel (Ω→SphereMapId (suc n) {A = A} a) j i Ω→SphereMapId2 : ∀ {ℓ} (n : ℕ) {A : Pointed ℓ} → Ω→SphereMap n {A = A} (pt ((Ω^ n) A)) ≡ ((λ _ → pt A) , refl) fst (Ω→SphereMapId2 n {A = A} i) a = funExt (Ω→SphereMapId n {A = A}) i a snd (Ω→SphereMapId2 zero {A = A} i) = refl snd (Ω→SphereMapId2 (suc zero) {A = A} i) = refl snd (Ω→SphereMapId2 (suc (suc n)) {A = A} i) = refl -- Pointed version Ω→SphereMap∙ : ∀ {ℓ} (n : ℕ) {A : Pointed ℓ} → ((Ω^ n) A) →∙ (S₊∙ n →∙ A ∙) Ω→SphereMap∙ n .fst = Ω→SphereMap n Ω→SphereMap∙ n .snd = Ω→SphereMapId2 n -- We define the following maps which will be used to -- show that Ω→SphereMap is an equivalence Ω→SphereMapSplit₁ : ∀ {ℓ} {A : Pointed ℓ} (n : ℕ) → typ ((Ω^ (suc n)) A) → typ (Ω (S₊∙ n →∙ A ∙)) Ω→SphereMapSplit₁ n = Ω→ (Ω→SphereMap∙ n) .fst ΩSphereMap : ∀ {ℓ} {A : Pointed ℓ} (n : ℕ) → typ (Ω (S₊∙ n →∙ A ∙)) → (S₊∙ (suc n) →∙ A) fst (ΩSphereMap {A = A} zero p) base = p i0 .fst false fst (ΩSphereMap {A = A} zero p) (loop i) = p i .fst false snd (ΩSphereMap {A = A} zero p) = refl ΩSphereMap {A = A} (suc n) = fun IsoΩFunSuspFun -- Functoriality -- The homogeneity assumption is not necessary but simplifying isNaturalΩSphereMap : ∀ {ℓ ℓ'} (A : Pointed ℓ) (B : Pointed ℓ') (homogB : isHomogeneous B) (f : A →∙ B) (n : ℕ) → ∀ g → f ∘∙ ΩSphereMap n g ≡ ΩSphereMap n (Ω→ (post∘∙ (S₊∙ n) f) .fst g) isNaturalΩSphereMap A B homogB f 0 g = →∙Homogeneous≡ homogB (funExt lem) where lem : ∀ x → f .fst (ΩSphereMap 0 g .fst x) ≡ ΩSphereMap 0 (Ω→ (post∘∙ (S₊∙ 0) f) .fst g) .fst x lem base = f .snd lem (loop i) j = hfill (λ j → λ { (i = i0) → post∘∙ _ f .snd j ; (i = i1) → post∘∙ _ f .snd j }) (inS (f ∘∙ g i)) j .fst false isNaturalΩSphereMap A B homogB f (n@(suc _)) g = →∙Homogeneous≡ homogB (funExt lem) where lem : ∀ x → f .fst (ΩSphereMap n g .fst x) ≡ ΩSphereMap n (Ω→ (post∘∙ (S₊∙ n) f) .fst g) .fst x lem north = f .snd lem south = f .snd lem (merid a i) j = hfill (λ j → λ { (i = i0) → post∘∙ _ f .snd j ; (i = i1) → post∘∙ _ f .snd j }) (inS (f ∘∙ g i)) j .fst a SphereMapΩ : ∀ {ℓ} {A : Pointed ℓ} (n : ℕ) → (S₊∙ (suc n) →∙ A) → typ (Ω (S₊∙ n →∙ A ∙)) SphereMapΩ {A = A} zero (f , p) = ΣPathP ((funExt λ { false → sym p ∙∙ cong f loop ∙∙ p ; true → refl}) , refl) SphereMapΩ {A = A} (suc n) = inv IsoΩFunSuspFun SphereMapΩIso : ∀ {ℓ} {A : Pointed ℓ} (n : ℕ) → Iso (S₊∙ (suc n) →∙ A) (typ (Ω (S₊∙ n →∙ A ∙))) fun (SphereMapΩIso n) = SphereMapΩ n inv (SphereMapΩIso n) = ΩSphereMap n fst (rightInv (SphereMapΩIso zero) f i j) false = rUnit (λ j → fst (f j) false) (~ i) j fst (rightInv (SphereMapΩIso {A = A} zero) f i j) true = snd (f j) (~ i) snd (rightInv (SphereMapΩIso {A = A} zero) f i j) k = snd (f j) (~ i ∨ k) rightInv (SphereMapΩIso (suc n)) = leftInv IsoΩFunSuspFun leftInv (SphereMapΩIso zero) f = ΣPathP ((funExt (λ { base → sym (snd f) ; (loop i) j → doubleCompPath-filler (sym (snd f)) (cong (fst f) loop) (snd f) (~ j) i})) , λ i j → snd f (~ i ∨ j)) leftInv (SphereMapΩIso (suc n)) = rightInv IsoΩFunSuspFun {- In order to show that Ω→SphereMap is an equivalence, we show that it factors Ω→SphereMapSplit₁ ΩSphereMap Ωⁿ⁺¹(Sⁿ →∙ A) ----------------> Ω (Sⁿ →∙ A) -----------> (Sⁿ⁺¹ →∙ A) -} Ω→SphereMap-split : ∀ {ℓ} {A : Pointed ℓ} (n : ℕ) (p : typ ((Ω^ (suc n)) A)) → Ω→SphereMap (suc n) p ≡ ΩSphereMap n (Ω→SphereMapSplit₁ n p) Ω→SphereMap-split {A = A} zero p = ΣPathP ((funExt (λ { base → refl ; (loop i) j → lem (~ j) i})) , refl) where lem : funExt⁻ (cong fst (Ω→SphereMapSplit₁ zero p)) false ≡ p lem = (λ i → funExt⁻ (cong-∙∙ fst (sym (Ω→SphereMapId2 zero)) (cong (Ω→SphereMap zero) p) (Ω→SphereMapId2 zero) i) false) ∙ sym (rUnit _) Ω→SphereMap-split {A = A} (suc n) p = ΣPathP ((funExt (λ { north → refl ; south → refl ; (merid a i) j → lem₂ a j i})) , refl) where lem : ∀ {ℓ} {A : Pointed ℓ} (n : ℕ) (a : S₊ (suc n)) → Ω→SphereMapId (suc n) {A = A} a ≡ (λ i → fst (Ω→SphereMapId2 (suc n) {A = A} i) a) lem zero base = refl lem zero (loop i) = refl lem (suc n) north = refl lem (suc n) south = refl lem (suc n) (merid a i) = refl lem₂ : (a : S₊ (suc n)) → ((λ i₁ → Ω→SphereMapId (suc n) {A = A} a (~ i₁)) ∙∙ (λ i₁ → Ω→SphereMap (suc n) (p i₁) .fst a) ∙∙ Ω→SphereMapId (suc n) a) ≡ (λ i → Ω→SphereMapSplit₁ (suc n) p i .fst a) lem₂ a = cong (λ x → sym x ∙∙ funExt⁻ (cong fst (λ i → Ω→SphereMap (suc n) (p i))) a ∙∙ x) (lem n a) ∙∙ sym (cong-∙∙ (λ x → x a) (cong fst (λ i → Ω→SphereMapId2 (suc n) (~ i))) (cong fst (λ i → Ω→SphereMap (suc n) (p i))) (cong fst (Ω→SphereMapId2 (suc n)))) ∙∙ (λ i → funExt⁻ (cong-∙∙ fst (sym (Ω→SphereMapId2 (suc n))) (cong (Ω→SphereMap (suc n)) p) (Ω→SphereMapId2 (suc n)) (~ i)) a) isEquiv-Ω→SphereMap₀ : ∀ {ℓ} {A : Pointed ℓ} → isEquiv (Ω→SphereMap 0 {A = A}) isEquiv-Ω→SphereMap₀ {A = A} = isoToIsEquiv (iso _ (λ f → fst f false) (λ f → ΣPathP ((funExt (λ { false → refl ; true → sym (snd f)})) , λ i j → snd f (~ i ∨ j))) λ p → refl) isEquiv-Ω→SphereMap : ∀ {ℓ} (n : ℕ) {A : Pointed ℓ} → isEquiv (Ω→SphereMap n {A = A}) isEquiv-Ω→SphereMap zero {A = A} = (isoToIsEquiv (iso _ (λ f → fst f false) (λ f → ΣPathP ((funExt (λ { false → refl ; true → sym (snd f)})) , λ i j → snd f (~ i ∨ j))) λ _ → refl)) isEquiv-Ω→SphereMap (suc zero) {A = A} = isoToIsEquiv (iso _ invFun sec λ p → sym (rUnit p)) where invFun : S₊∙ 1 →∙ A → typ (Ω A) invFun (f , p) = sym p ∙∙ cong f loop ∙∙ p sec : section (Ω→SphereMap 1) invFun sec (f , p) = ΣPathP ((funExt (λ { base → sym p ; (loop i) j → doubleCompPath-filler (sym p) (cong f loop) p (~ j) i})) , λ i j → p (~ i ∨ j)) isEquiv-Ω→SphereMap (suc (suc n)) = subst isEquiv (sym (funExt (Ω→SphereMap-split (suc n)))) (snd (compEquiv ((Ω→SphereMapSplit₁ (suc n)) , (isEquivΩ→ (Ω→SphereMap (suc n) , Ω→SphereMapId2 (suc n)) (isEquiv-Ω→SphereMap (suc n)))) (invEquiv (isoToEquiv (SphereMapΩIso (suc n)))))) IsoΩSphereMap : ∀ {ℓ} {A : Pointed ℓ} (n : ℕ) → Iso (typ ((Ω^ n) A)) (S₊∙ n →∙ A) IsoΩSphereMap n = equivToIso (_ , isEquiv-Ω→SphereMap n) IsoSphereMapΩ : ∀ {ℓ} {A : Pointed ℓ} (n : ℕ) → Iso (S₊∙ n →∙ A) (fst ((Ω^ n) A)) IsoSphereMapΩ {A = A} n = invIso (IsoΩSphereMap n) SphereMap→Ω : ∀ {ℓ} {A : Pointed ℓ} (n : ℕ) → S₊∙ n →∙ A → fst ((Ω^ n) A) SphereMap→Ω n = fun (IsoSphereMapΩ n) isHom-Ω→SphereMap : ∀ {ℓ} (n : ℕ) {A : Pointed ℓ} (p q : _) → Ω→SphereMap (suc n) {A = A} (p ∙ q) ≡ ∙Π (Ω→SphereMap (suc n) {A = A} p) (Ω→SphereMap (suc n) {A = A} q) isHom-Ω→SphereMap zero {A = A} p q = ΣPathP ((funExt (λ { base → refl ; (loop i) j → (rUnit p j ∙ rUnit q j) i})) , refl) isHom-Ω→SphereMap (suc n) {A = A} p q = ΣPathP ((funExt (λ { north → refl ; south → refl ; (merid a i) j → main a j i})) , refl) where doubleComp-lem : ∀ {ℓ} {A : Type ℓ} {x y : A} (p : x ≡ y) (q r : y ≡ y) → (p ∙∙ q ∙∙ sym p) ∙ (p ∙∙ r ∙∙ sym p) ≡ (p ∙∙ (q ∙ r) ∙∙ sym p) doubleComp-lem p q r i j = hcomp (λ k → λ { (i = i0) → (doubleCompPath-filler p q (sym p) k ∙ doubleCompPath-filler p r (sym p) k) j ; (i = i1) → doubleCompPath-filler p (q ∙ r) (sym p) k j ; (j = i0) → p (~ k) ; (j = i1) → p (~ k)}) ((q ∙ r) j) lem : (p : typ ((Ω^ (suc (suc n))) A)) → cong (fst (Ω→SphereMap (suc (suc n)) p)) (merid (ptSn _)) ≡ refl lem p = cong (sym (Ω→SphereMapId (suc n) (ptSn _)) ∙∙_∙∙ Ω→SphereMapId (suc n) (ptSn _)) (rUnit _ ∙ (λ j → (λ i → Ω→SphereMap (suc n) {A = A} refl .snd (i ∧ j)) ∙∙ (λ i → Ω→SphereMap (suc n) {A = A} (p i) .snd j) ∙∙ λ i → Ω→SphereMap (suc n) {A = A} refl .snd (~ i ∧ j)) ∙ ∙∙lCancel _) ∙ ∙∙lCancel _ main : (a : S₊ (suc n)) → sym (Ω→SphereMapId (suc n) a) ∙∙ funExt⁻ (cong fst (cong (Ω→SphereMap (suc n)) (p ∙ q))) a ∙∙ Ω→SphereMapId (suc n) a ≡ cong (fst (∙Π (Ω→SphereMap (suc (suc n)) p) (Ω→SphereMap (suc (suc n)) q))) (merid a) main a = (cong (sym (Ω→SphereMapId (suc n) a) ∙∙_∙∙ (Ω→SphereMapId (suc n) a)) (cong-∙ (λ x → Ω→SphereMap (suc n) x .fst a) p q) ∙ sym (doubleComp-lem (sym (Ω→SphereMapId (suc n) a)) _ _)) ∙∙ cong₂ _∙_ (sym (cong (cong (fst (Ω→SphereMap (suc (suc n)) p)) (merid a) ∙_) (cong sym (lem p)) ∙ sym (rUnit _))) (sym (cong (cong (fst (Ω→SphereMap (suc (suc n)) q)) (merid a) ∙_) (cong sym (lem q)) ∙ sym (rUnit _))) ∙∙ λ i → (rUnit (cong-∙ (fst (Ω→SphereMap (suc (suc n)) p)) (merid a) (sym (merid (ptSn _))) (~ i)) i) ∙ (rUnit (cong-∙ (fst (Ω→SphereMap (suc (suc n)) q)) (merid a) (sym (merid (ptSn _)))(~ i)) i) -- The iso is structure preserving IsoSphereMapΩ-pres∙Π : ∀ {ℓ} {A : Pointed ℓ} (n : ℕ) (f g : S₊∙ (suc n) →∙ A) → SphereMap→Ω (suc n) (∙Π f g) ≡ SphereMap→Ω (suc n) f ∙ SphereMap→Ω (suc n) g IsoSphereMapΩ-pres∙Π n = morphLemmas.isMorphInv _∙_ ∙Π (Ω→SphereMap (suc n)) (isHom-Ω→SphereMap n) (SphereMap→Ω (suc n)) (leftInv (IsoSphereMapΩ (suc n))) (rightInv (IsoSphereMapΩ (suc n))) -- It is useful to define the ``Group Structure'' on (S₊∙ n →∙ A) -- before doing it on π'. These will be the equivalents of the -- usual groupoid laws on Ω A. 1Π : ∀ {ℓ} {A : Pointed ℓ} {n : ℕ} → (S₊∙ n →∙ A) fst (1Π {A = A}) _ = pt A snd (1Π {A = A}) = refl ∙Π-rUnit : ∀ {ℓ} {A : Pointed ℓ} {n : ℕ} → (f : S₊∙ (suc n) →∙ A) → ∙Π f 1Π ≡ f fst (∙Π-rUnit {A = A} {n = zero} f i) base = snd f (~ i) fst (∙Π-rUnit {A = A} {n = zero} f i) (loop j) = help i j where help : PathP (λ i → snd f (~ i) ≡ snd f (~ i)) (((sym (snd f)) ∙∙ (cong (fst f) loop) ∙∙ snd f) ∙ (refl ∙ refl)) (cong (fst f) loop) help = (cong ((sym (snd f) ∙∙ cong (fst f) loop ∙∙ snd f) ∙_) (sym (rUnit refl)) ∙ sym (rUnit _)) ◁ λ i j → doubleCompPath-filler (sym (snd f)) (cong (fst f) loop) (snd f) (~ i) j snd (∙Π-rUnit {A = A} {n = zero} f i) j = snd f (~ i ∨ j) fst (∙Π-rUnit {A = A} {n = suc n} f i) north = snd f (~ i) fst (∙Π-rUnit {A = A} {n = suc n} f i) south = (sym (snd f) ∙ cong (fst f) (merid (ptSn (suc n)))) i fst (∙Π-rUnit {A = A} {n = suc n} f i) (merid a j) = help i j where help : PathP (λ i → snd f (~ i) ≡ (sym (snd f) ∙ cong (fst f) (merid (ptSn (suc n)))) i) (((sym (snd f)) ∙∙ (cong (fst f) (merid a ∙ sym (merid (ptSn (suc n))))) ∙∙ snd f) ∙ (refl ∙ refl)) (cong (fst f) (merid a)) help = (cong (((sym (snd f)) ∙∙ (cong (fst f) (merid a ∙ sym (merid (ptSn (suc n))))) ∙∙ snd f) ∙_) (sym (rUnit refl)) ∙ sym (rUnit _)) ◁ λ i j → hcomp (λ k → λ { (j = i0) → snd f (~ i ∧ k) ; (j = i1) → compPath-filler' (sym (snd f)) (cong (fst f) (merid (ptSn (suc n)))) k i ; (i = i0) → doubleCompPath-filler (sym (snd f)) (cong (fst f) (merid a ∙ sym (merid (ptSn (suc n))))) (snd f) k j ; (i = i1) → fst f (merid a j)}) (fst f (compPath-filler (merid a) (sym (merid (ptSn _))) (~ i) j)) snd (∙Π-rUnit {A = A} {n = suc n} f i) j = snd f (~ i ∨ j) ∙Π-lUnit : ∀ {ℓ} {A : Pointed ℓ} {n : ℕ} → (f : S₊∙ (suc n) →∙ A) → ∙Π 1Π f ≡ f fst (∙Π-lUnit {n = zero} f i) base = snd f (~ i) fst (∙Π-lUnit {n = zero} f i) (loop j) = s i j where s : PathP (λ i → snd f (~ i) ≡ snd f (~ i)) ((refl ∙ refl) ∙ (sym (snd f) ∙∙ cong (fst f) loop ∙∙ snd f)) (cong (fst f) loop) s = (cong (_∙ (sym (snd f) ∙∙ cong (fst f) loop ∙∙ snd f)) (sym (rUnit refl)) ∙ sym (lUnit _)) ◁ λ i j → doubleCompPath-filler (sym (snd f)) (cong (fst f) loop) (snd f) (~ i) j snd (∙Π-lUnit {n = zero} f i) j = snd f (~ i ∨ j) fst (∙Π-lUnit {n = suc n} f i) north = snd f (~ i) fst (∙Π-lUnit {n = suc n} f i) south = (sym (snd f) ∙ cong (fst f) (merid (ptSn _))) i fst (∙Π-lUnit {n = suc n} f i) (merid a j) = help i j where help : PathP (λ i → snd f (~ i) ≡ (sym (snd f) ∙ cong (fst f) (merid (ptSn (suc n)))) i) ((refl ∙ refl) ∙ ((sym (snd f)) ∙∙ (cong (fst f) (merid a ∙ sym (merid (ptSn (suc n))))) ∙∙ snd f)) (cong (fst f) (merid a)) help = (cong (_∙ ((sym (snd f)) ∙∙ (cong (fst f) (merid a ∙ sym (merid (ptSn (suc n))))) ∙∙ snd f)) (sym (rUnit refl)) ∙ sym (lUnit _)) ◁ λ i j → hcomp (λ k → λ { (j = i0) → snd f (~ i ∧ k) ; (j = i1) → compPath-filler' (sym (snd f)) (cong (fst f) (merid (ptSn (suc n)))) k i ; (i = i0) → doubleCompPath-filler (sym (snd f)) (cong (fst f) (merid a ∙ sym (merid (ptSn (suc n))))) (snd f) k j ; (i = i1) → fst f (merid a j)}) (fst f (compPath-filler (merid a) (sym (merid (ptSn _))) (~ i) j)) snd (∙Π-lUnit {n = suc n} f i) j = snd f (~ i ∨ j) ∙Π-rCancel : ∀ {ℓ} {A : Pointed ℓ} {n : ℕ} → (f : S₊∙ (suc n) →∙ A) → ∙Π f (-Π f) ≡ 1Π fst (∙Π-rCancel {A = A} {n = zero} f i) base = pt A fst (∙Π-rCancel {A = A} {n = zero} f i) (loop j) = rCancel (sym (snd f) ∙∙ cong (fst f) loop ∙∙ snd f) i j snd (∙Π-rCancel {A = A} {n = zero} f i) = refl fst (∙Π-rCancel {A = A} {n = suc n} f i) north = pt A fst (∙Π-rCancel {A = A} {n = suc n} f i) south = pt A fst (∙Π-rCancel {A = A} {n = suc n} f i) (merid a i₁) = lem i i₁ where pl = (sym (snd f) ∙∙ cong (fst f) (merid a ∙ sym (merid (ptSn _))) ∙∙ snd f) lem : pl ∙ ((sym (snd f) ∙∙ cong (fst (-Π f)) (merid a ∙ sym (merid (ptSn _))) ∙∙ snd f)) ≡ refl lem = cong (pl ∙_) (cong (sym (snd f) ∙∙_∙∙ (snd f)) (cong-∙ (fst (-Π f)) (merid a) (sym (merid (ptSn _))) ∙∙ cong₂ _∙_ refl (cong (cong (fst f)) (rCancel (merid (ptSn _)))) ∙∙ sym (rUnit _))) ∙ rCancel pl snd (∙Π-rCancel {A = A} {n = suc n} f i) = refl ∙Π-lCancel : ∀ {ℓ} {A : Pointed ℓ} {n : ℕ} → (f : S₊∙ (suc n) →∙ A) → ∙Π (-Π f) f ≡ 1Π fst (∙Π-lCancel {A = A} {n = zero} f i) base = pt A fst (∙Π-lCancel {A = A} {n = zero} f i) (loop j) = rCancel (sym (snd f) ∙∙ cong (fst f) (sym loop) ∙∙ snd f) i j fst (∙Π-lCancel {A = A} {n = suc n} f i) north = pt A fst (∙Π-lCancel {A = A} {n = suc n} f i) south = pt A fst (∙Π-lCancel {A = A} {n = suc n} f i) (merid a j) = lem i j where pl = (sym (snd f) ∙∙ cong (fst f) (merid a ∙ sym (merid (ptSn _))) ∙∙ snd f) lem : (sym (snd f) ∙∙ cong (fst (-Π f)) (merid a ∙ sym (merid (ptSn _))) ∙∙ snd f) ∙ pl ≡ refl lem = cong (_∙ pl) (cong (sym (snd f) ∙∙_∙∙ (snd f)) (cong-∙ (fst (-Π f)) (merid a) (sym (merid (ptSn _))) ∙∙ cong₂ _∙_ refl (cong (cong (fst f)) (rCancel (merid (ptSn _)))) ∙∙ sym (rUnit _))) ∙ lCancel pl snd (∙Π-lCancel {A = A} {n = zero} f i) = refl snd (∙Π-lCancel {A = A} {n = suc n} f i) = refl ∙Π-assoc : ∀ {ℓ} {A : Pointed ℓ} {n : ℕ} → (f g h : S₊∙ (suc n) →∙ A) → ∙Π f (∙Π g h) ≡ ∙Π (∙Π f g) h ∙Π-assoc {n = n} f g h = sym (leftInv (IsoSphereMapΩ (suc n)) (∙Π f (∙Π g h))) ∙∙ cong (Ω→SphereMap (suc n)) (IsoSphereMapΩ-pres∙Π n f (∙Π g h) ∙∙ cong (SphereMap→Ω (suc n) f ∙_) (IsoSphereMapΩ-pres∙Π n g h) ∙∙ ∙assoc (SphereMap→Ω (suc n) f) (SphereMap→Ω (suc n) g) (SphereMap→Ω (suc n) h) ∙∙ cong (_∙ SphereMap→Ω (suc n) h) (sym (IsoSphereMapΩ-pres∙Π n f g)) ∙∙ sym (IsoSphereMapΩ-pres∙Π n (∙Π f g) h)) ∙∙ leftInv (IsoSphereMapΩ (suc n)) (∙Π (∙Π f g) h) ∙Π-comm : ∀ {ℓ} {A : Pointed ℓ} {n : ℕ} → (f g : S₊∙ (suc (suc n)) →∙ A) → ∙Π f g ≡ ∙Π g f ∙Π-comm {A = A} {n = n} f g = sym (leftInv (IsoSphereMapΩ (suc (suc n))) (∙Π f g)) ∙∙ cong (Ω→SphereMap (suc (suc n))) (IsoSphereMapΩ-pres∙Π (suc n) f g ∙∙ EH _ _ _ ∙∙ sym (IsoSphereMapΩ-pres∙Π (suc n) g f)) ∙∙ leftInv (IsoSphereMapΩ (suc (suc n))) (∙Π g f) {- π'' as a group -} 1π' : ∀ {ℓ} (n : ℕ) {A : Pointed ℓ} → π' n A 1π' n {A = A} = ∣ 1Π ∣₂ ·π' : ∀ {ℓ} (n : ℕ) {A : Pointed ℓ} → π' (suc n) A → π' (suc n) A → π' (suc n) A ·π' n = sRec2 squash₂ λ p q → ∣ ∙Π p q ∣₂ -π' : ∀ {ℓ} (n : ℕ) {A : Pointed ℓ} → π' (suc n) A → π' (suc n) A -π' n = sMap -Π π'-rUnit : ∀ {ℓ} (n : ℕ) {A : Pointed ℓ} (x : π' (suc n) A) → (·π' n x (1π' (suc n))) ≡ x π'-rUnit n = sElim (λ _ → isSetPathImplicit) λ p i → ∣ ∙Π-rUnit p i ∣₂ π'-lUnit : ∀ {ℓ} (n : ℕ) {A : Pointed ℓ} (x : π' (suc n) A) → (·π' n (1π' (suc n)) x) ≡ x π'-lUnit n = sElim (λ _ → isSetPathImplicit) λ p i → ∣ ∙Π-lUnit p i ∣₂ π'-rCancel : ∀ {ℓ} (n : ℕ) {A : Pointed ℓ} (x : π' (suc n) A) → (·π' n x (-π' n x)) ≡ 1π' (suc n) π'-rCancel n = sElim (λ _ → isSetPathImplicit) λ p i → ∣ ∙Π-rCancel p i ∣₂ π'-lCancel : ∀ {ℓ} (n : ℕ) {A : Pointed ℓ} (x : π' (suc n) A) → (·π' n (-π' n x) x) ≡ 1π' (suc n) π'-lCancel n = sElim (λ _ → isSetPathImplicit) λ p i → ∣ ∙Π-lCancel p i ∣₂ π'-assoc : ∀ {ℓ} (n : ℕ) {A : Pointed ℓ} (x y z : π' (suc n) A) → ·π' n x (·π' n y z) ≡ ·π' n (·π' n x y) z π'-assoc n = sElim3 (λ _ _ _ → isSetPathImplicit) λ p q r i → ∣ ∙Π-assoc p q r i ∣₂ π'-comm : ∀ {ℓ} (n : ℕ) {A : Pointed ℓ} (x y : π' (suc (suc n)) A) → ·π' (suc n) x y ≡ ·π' (suc n) y x π'-comm n = sElim2 (λ _ _ → isSetPathImplicit) λ p q i → ∣ ∙Π-comm p q i ∣₂ -- We finally get the group definition π'Gr : ∀ {ℓ} (n : ℕ) (A : Pointed ℓ) → Group ℓ fst (π'Gr n A) = π' (suc n) A 1g (snd (π'Gr n A)) = 1π' (suc n) GroupStr._·_ (snd (π'Gr n A)) = ·π' n inv (snd (π'Gr n A)) = -π' n is-set (isSemigroup (isMonoid (isGroup (snd (π'Gr n A))))) = squash₂ assoc (isSemigroup (isMonoid (isGroup (snd (π'Gr n A))))) = π'-assoc n identity (isMonoid (isGroup (snd (π'Gr n A)))) x = (π'-rUnit n x) , (π'-lUnit n x) inverse (isGroup (snd (π'Gr n A))) x = (π'-rCancel n x) , (π'-lCancel n x) -- and finally, the Iso π'Gr≅πGr : ∀ {ℓ} (n : ℕ) (A : Pointed ℓ) → GroupIso (π'Gr n A) (πGr n A) fst (π'Gr≅πGr n A) = setTruncIso (IsoSphereMapΩ (suc n)) snd (π'Gr≅πGr n A) = makeIsGroupHom (sElim2 (λ _ _ → isSetPathImplicit) λ p q i → ∣ IsoSphereMapΩ-pres∙Π n p q i ∣₂) {- Proof of πₙ(ΩA) = πₙ₊₁(A) -} Iso-πΩ-π : ∀ {ℓ} {A : Pointed ℓ} (n : ℕ) → Iso (π n (Ω A)) (π (suc n) A) Iso-πΩ-π {A = A} n = setTruncIso (invIso (flipΩIso n)) GrIso-πΩ-π : ∀ {ℓ} {A : Pointed ℓ} (n : ℕ) → GroupIso (πGr n (Ω A)) (πGr (suc n) A) fst (GrIso-πΩ-π n) = Iso-πΩ-π _ snd (GrIso-πΩ-π n) = makeIsGroupHom (sElim2 (λ _ _ → isSetPathImplicit) λ p q → cong ∣_∣₂ (flipΩIso⁻pres· n p q)) {- Proof that πₙ(A) ≅ πₙ(∥ A ∥ₙ) -} isContrΩTrunc : ∀ {ℓ} {A : Pointed ℓ} (n : ℕ) → isContr (typ ((Ω^ n) (hLevelTrunc∙ n A))) isContrΩTrunc {A = A} zero = isContrUnit* isContrΩTrunc {A = A} (suc n) = subst isContr main (isContrΩTrunc {A = Ω A} n) where lem₁ : (n : ℕ) → fun (PathIdTruncIso n) (λ _ → ∣ pt A ∣) ≡ snd (hLevelTrunc∙ n (Ω A)) lem₁ zero = refl lem₁ (suc n) = transportRefl ∣ refl ∣ lem₂ : hLevelTrunc∙ n (Ω A) ≡ (Ω (hLevelTrunc∙ (suc n) A)) lem₂ = sym (ua∙ (isoToEquiv (PathIdTruncIso n)) (lem₁ n)) main : (typ ((Ω^ n) (hLevelTrunc∙ n (Ω A)))) ≡ (typ ((Ω^ suc n) (hLevelTrunc∙ (suc n) A))) main = (λ i → typ ((Ω^ n) (lem₂ i))) ∙ sym (isoToPath (flipΩIso n)) mutual ΩTruncSwitchFun : ∀ {ℓ} {A : Pointed ℓ} (n m : ℕ) → (hLevelTrunc∙ (suc (suc m)) ((Ω^ n) A)) →∙ ((Ω^ n) (hLevelTrunc∙ (suc n + suc m) A)) ΩTruncSwitchFun {A = A} n m = ((λ x → transport (λ i → fst ((Ω^ n) (hLevelTrunc∙ (+-suc n (suc m) i) A))) (Iso.fun (ΩTruncSwitch {A = A} n (suc (suc m))) x)) , cong (transport (λ i → fst ((Ω^ n) (hLevelTrunc∙ (+-suc n (suc m) i) A)))) (ΩTruncSwitch∙ n (suc (suc m))) ∙ λ j → transp (λ i → fst ((Ω^ n) (hLevelTrunc∙ (+-suc n (suc m) (i ∨ j)) A))) j (snd ((Ω^ n) (hLevelTrunc∙ (+-suc n (suc m) j) A)))) ΩTruncSwitchLem : ∀ {ℓ} {A : Pointed ℓ} (n m : ℕ) → Iso (typ (Ω (hLevelTrunc∙ (suc (suc m)) ((Ω^ n) A)))) (typ ((Ω^ suc n) (hLevelTrunc∙ (suc n + suc m) A))) ΩTruncSwitchLem {A = A} n m = (equivToIso (Ω→ (ΩTruncSwitchFun n m) .fst , isEquivΩ→ _ (compEquiv (isoToEquiv (ΩTruncSwitch {A = A} n (suc (suc m)))) (transportEquiv (λ i → typ ((Ω^ n) (hLevelTrunc∙ (+-suc n (suc m) i) A)))) .snd))) ΩTruncSwitch : ∀ {ℓ} {A : Pointed ℓ} (n m : ℕ) → Iso (hLevelTrunc m (fst ((Ω^ n) A))) (typ ((Ω^ n) (hLevelTrunc∙ (n + m) A))) ΩTruncSwitch {A = A} n zero = equivToIso (invEquiv (isContr→≃Unit* (subst isContr (λ i → (typ ((Ω^ n) (hLevelTrunc∙ (+-comm zero n i) A)))) (isContrΩTrunc n)))) ΩTruncSwitch {A = A} zero (suc m) = idIso ΩTruncSwitch {A = A} (suc n) (suc m) = compIso (invIso (PathIdTruncIso _)) (ΩTruncSwitchLem n m) ΩTruncSwitch∙ : ∀ {ℓ} {A : Pointed ℓ} (n m : ℕ) → Iso.fun (ΩTruncSwitch {A = A} n m) (snd (hLevelTrunc∙ m ((Ω^ n) A))) ≡ pt ((Ω^ n) (hLevelTrunc∙ (n + m) A)) ΩTruncSwitch∙ {A = A} n zero = isContr→isProp ((subst isContr (λ i → (typ ((Ω^ n) (hLevelTrunc∙ (+-comm zero n i) A)))) (isContrΩTrunc n))) _ _ ΩTruncSwitch∙ {A = A} zero (suc m) = refl ΩTruncSwitch∙ {A = A} (suc n) (suc m) = ∙∙lCancel _ ΩTruncSwitch-hom : ∀ {ℓ} {A : Pointed ℓ} (n m : ℕ) (p q : _) → Iso.fun (ΩTruncSwitch {A = A} (suc n) (suc m)) ∣ p ∙ q ∣ ≡ Iso.fun (ΩTruncSwitch {A = A} (suc n) (suc m)) ∣ p ∣ ∙ Iso.fun (ΩTruncSwitch {A = A} (suc n) (suc m)) ∣ q ∣ ΩTruncSwitch-hom {A = A} n m p q = cong (Iso.fun (ΩTruncSwitchLem {A = A} n m)) (cong-∙ ∣_∣ₕ p q) ∙ Ω→pres∙ (ΩTruncSwitchFun n m) (cong ∣_∣ₕ p) (cong ∣_∣ₕ q) 2TruncΩIso : ∀ {ℓ} {A : Pointed ℓ} (n : ℕ) → Iso (hLevelTrunc 2 (fst ((Ω^ n) A))) (typ ((Ω^ n) (hLevelTrunc∙ (2 + n) A))) 2TruncΩIso zero = idIso 2TruncΩIso {A = A} (suc n) = compIso (ΩTruncSwitch (suc n) 2) (pathToIso λ i → typ ((Ω^ suc n) (hLevelTrunc∙ (+-comm (suc n) 2 i) A))) hLevΩ+ : ∀ {ℓ} {A : Pointed ℓ} (n m : ℕ) → isOfHLevel (m + n) (typ A) → isOfHLevel n (typ ((Ω^ m) A)) hLevΩ+ n zero p = p hLevΩ+ {A = A} zero (suc zero) p = refl , λ _ → isProp→isSet p _ _ _ _ hLevΩ+ {A = A} zero (suc (suc zero)) p = refl , λ y → isOfHLevelSuc 2 p _ _ _ _ refl y hLevΩ+ {A = A} zero (suc (suc (suc m))) p = transport (λ i → isContr (typ (Ω (ua∙ (isoToEquiv (flipΩIso {A = A} (suc m))) (flipΩrefl m) (~ i))))) (hLevΩ+ {A = Ω A} zero (suc (suc m)) (subst (λ x → isOfHLevel x (typ (Ω A))) (+-comm zero (suc (suc m))) (lem (pt A) (pt A)))) where lem : isOfHLevel (3 + m) (typ A) lem = subst (λ x → isOfHLevel x (typ A)) (λ i → suc (+-comm (2 + m) zero i)) p hLevΩ+ {A = A} (suc n) (suc m) p = subst (isOfHLevel (suc n)) (sym (ua (isoToEquiv (flipΩIso {A = A} m)))) (hLevΩ+ {A = Ω A} (suc n) m (isOfHLevelPath' (m + suc n) p _ _)) private isSetΩ : ∀ {ℓ} {A : Pointed ℓ} (n : ℕ) → (isSet (typ (Ω ((Ω^ n) (hLevelTrunc∙ (suc (suc (suc n))) A))))) isSetΩ {A = A} zero = isOfHLevelTrunc 3 _ _ isSetΩ {A = A} (suc n) = hLevΩ+ 2 (suc (suc n)) (transport (λ i → isOfHLevel (+-comm 2 (2 + n) i) (hLevelTrunc (4 + n) (typ A))) (isOfHLevelTrunc (suc (suc (suc (suc n)))))) πTruncIso : ∀ {ℓ} {A : Pointed ℓ} (n : ℕ) → Iso (π n A) (π n (hLevelTrunc∙ (2 + n) A)) πTruncIso {A = A} zero = compIso (invIso (setTruncIdempotentIso squash₂)) (setTruncIso setTruncTrunc2Iso) πTruncIso {A = A} (suc n) = compIso setTruncTrunc2Iso (compIso (2TruncΩIso (suc n)) (invIso (setTruncIdempotentIso (isSetΩ n)))) πTruncGroupIso : ∀ {ℓ} {A : Pointed ℓ} (n : ℕ) → GroupIso (πGr n A) (πGr n (hLevelTrunc∙ (3 + n) A)) fst (πTruncGroupIso n) = πTruncIso (suc n) snd (πTruncGroupIso {A = A} n) = makeIsGroupHom (sElim2 (λ _ _ → isSetPathImplicit) λ a b → cong (inv (setTruncIdempotentIso (isSetΩ n))) (cong (transport (λ i → typ ((Ω^ suc n) (hLevelTrunc∙ (+-comm (suc n) 2 i) A)))) (ΩTruncSwitch-hom n 1 a b) ∙ transpΩTruncSwitch (λ w → ((Ω^ n) (hLevelTrunc∙ w A))) (+-comm (suc n) 2) _ _)) where transpΩTruncSwitch : ∀ {ℓ} (A : ℕ → Pointed ℓ) {n m : ℕ} (r : n ≡ m) (p q : typ (Ω (A n))) → subst (λ n → typ (Ω (A n))) r (p ∙ q) ≡ subst (λ n → typ (Ω (A n))) r p ∙ subst (λ n → typ (Ω (A n))) r q transpΩTruncSwitch A {n = n} = J (λ m r → (p q : typ (Ω (A n))) → subst (λ n → typ (Ω (A n))) r (p ∙ q) ≡ subst (λ n → typ (Ω (A n))) r p ∙ subst (λ n → typ (Ω (A n))) r q) λ p q → transportRefl _ ∙ cong₂ _∙_ (sym (transportRefl p)) (sym (transportRefl q))
{ "alphanum_fraction": 0.4919077828, "avg_line_length": 39.2648845687, "ext": "agda", "hexsha": "59acba7fb6ecc3e765d53289af78af1da5f630de", "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": "8dea02ee105b45898dbf1f77271ead38994f4d61", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "rnarkk/cubical", "max_forks_repo_path": "Cubical/Homotopy/Group/Base.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "8dea02ee105b45898dbf1f77271ead38994f4d61", "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": "rnarkk/cubical", "max_issues_repo_path": "Cubical/Homotopy/Group/Base.agda", "max_line_length": 97, "max_stars_count": null, "max_stars_repo_head_hexsha": "8dea02ee105b45898dbf1f77271ead38994f4d61", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "rnarkk/cubical", "max_stars_repo_path": "Cubical/Homotopy/Group/Base.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 14579, "size": 32315 }
{-# OPTIONS --show-implicit #-} -- {-# OPTIONS --sized-types #-} -- no longer necessary -- {-# OPTIONS --termination-depth=2 #-} -- no longer necessary -- {-# OPTIONS -v term:10 #-} module SizedBTree where open import Common.Size module Old where data BTree (A : Set) : {size : Size} → Set where leaf : {i : Size} → A → BTree A {↑ i} node : {i : Size} → BTree A {i} → BTree A {i} → BTree A {↑ i} map : ∀ {A B i} → (A → B) → BTree A {i} → BTree B {i} map f (leaf a) = leaf (f a) map f (node l r) = node (map f l) (map f r) -- deep matching deep : ∀ {i A} → BTree A {i} → A deep (leaf a) = a deep (node (leaf _) r) = deep r deep (node (node l r) _) = deep (node l r) -- nesting -- Jesper 2015-12-18: The new unifier requires the size argument of the first -- deep2 to be given explicitly. This is because otherwise the unifier gets -- stuck on an equation [↑ i₁ =?= _i_46 {i} {A} l r t]. It's not clear whether -- it is safe to instantiate the meta to [↑ _] here. deep2 : ∀ {i A} → BTree A {i} → BTree A {i} deep2 (leaf a) = leaf a deep2 (node (leaf _) r) = r deep2 (node (node {i} l r) t) with deep2 {↑ i} (deep2 (node l r)) ... | leaf a = leaf a ... | node l2 r2 = deep2 (node l2 r2) -- OUTDATED: -- increasing the termination count does the job! module New where data BTree (A : Set) {i : Size} : Set where leaf : A → BTree A node : {i' : Size< i} → BTree A {i'} → BTree A {i'} → BTree A map : ∀ {A B i} → (A → B) → BTree A {i} → BTree B {i} map f (leaf a) = leaf (f a) map f (node l r) = node (map f l) (map f r) -- deep matching deep : ∀ {i A} → BTree A {i} → A deep (leaf a) = a deep (node (leaf _) r) = deep r deep (node (node l r) _) = deep (node l r) -- nesting deep2 : ∀ {i A} → BTree A {i} → BTree A {i} deep2 (leaf a) = leaf a deep2 (node (leaf _) r) = r deep2 (node (node l r) _) with deep2 (deep2 (node l r)) ... | leaf a = leaf a ... | node l2 r2 = deep2 (node l2 r2)
{ "alphanum_fraction": 0.5446032528, "avg_line_length": 30.2835820896, "ext": "agda", "hexsha": "33c2437ca04d46f0b8bac49cf9c487e35f2dab8f", "lang": "Agda", "max_forks_count": 1, "max_forks_repo_forks_event_max_datetime": "2019-03-05T20:02:38.000Z", "max_forks_repo_forks_event_min_datetime": "2019-03-05T20:02:38.000Z", "max_forks_repo_head_hexsha": "6043e77e4a72518711f5f808fb4eb593cbf0bb7c", "max_forks_repo_licenses": [ "BSD-3-Clause" ], "max_forks_repo_name": "alhassy/agda", "max_forks_repo_path": "test/Succeed/SizedBTree.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "6043e77e4a72518711f5f808fb4eb593cbf0bb7c", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "BSD-3-Clause" ], "max_issues_repo_name": "alhassy/agda", "max_issues_repo_path": "test/Succeed/SizedBTree.agda", "max_line_length": 80, "max_stars_count": 3, "max_stars_repo_head_hexsha": "6043e77e4a72518711f5f808fb4eb593cbf0bb7c", "max_stars_repo_licenses": [ "BSD-3-Clause" ], "max_stars_repo_name": "alhassy/agda", "max_stars_repo_path": "test/Succeed/SizedBTree.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": 759, "size": 2029 }
{-# OPTIONS --safe #-} open import Relation.Ternary.Separation module Relation.Ternary.Separation.Allstar {i} {I : Set i} {c} {C : Set c} {{rc : RawSep C}} {u} {{sc : IsUnitalSep rc u}} where open import Level open import Data.Product open import Data.List hiding (concat) open import Relation.Unary {- Inductive separating forall over a list -} module _ {ℓ} where data Allstar (P : I → Pred C ℓ) : List I → SPred (ℓ ⊔ c ⊔ i) where nil : ε[ Allstar P [] ] cons : ∀ {x xs} → ∀[ P x ✴ Allstar P xs ⇒ Allstar P (x ∷ xs) ] -- not typed well in non-pattern positions infixr 5 _:⟨_⟩:_ pattern _:⟨_⟩:_ x p xs = cons (x ×⟨ p ⟩ xs) singleton : ∀ {P x} → ∀[ P x ⇒ Allstar P [ x ] ] singleton v = cons (v ×⟨ ⊎-idʳ ⟩ nil) open import Relation.Ternary.Separation.Construct.List I open import Data.List.Relation.Ternary.Interleaving.Propositional as I repartition : ∀ {P} {Σ₁ Σ₂ Σ} → Σ₁ ⊎ Σ₂ ≣ Σ → ∀[ Allstar P Σ ⇒ Allstar P Σ₁ ✴ Allstar P Σ₂ ] repartition [] nil = nil ×⟨ ⊎-idˡ ⟩ nil repartition (consˡ σ) (cons (a ×⟨ σ′ ⟩ qx)) = let xs ×⟨ σ′′ ⟩ ys = repartition σ qx _ , τ₁ , τ₂ = ⊎-unassoc σ′ σ′′ in (cons (a ×⟨ τ₁ ⟩ xs)) ×⟨ τ₂ ⟩ ys repartition (consʳ σ) (cons (a ×⟨ σ′ ⟩ qx)) = let xs ×⟨ σ′′ ⟩ ys = repartition σ qx _ , τ₁ , τ₂ = ⊎-unassoc σ′ (⊎-comm σ′′) in xs ×⟨ ⊎-comm τ₂ ⟩ (cons (a ×⟨ τ₁ ⟩ ys)) concat : ∀ {P} {Γ₁ Γ₂} → ∀[ Allstar P Γ₁ ✴ Allstar P Γ₂ ⇒ Allstar P (Γ₁ ++ Γ₂) ] concat (nil ×⟨ s ⟩ env₂) rewrite ⊎-id⁻ˡ s = env₂ concat (cons (v ×⟨ s ⟩ env₁) ×⟨ s' ⟩ env₂) = let _ , eq₁ , eq₂ = ⊎-assoc s s' in cons (v ×⟨ eq₁ ⟩ (concat (env₁ ×⟨ eq₂ ⟩ env₂)))
{ "alphanum_fraction": 0.5521945433, "avg_line_length": 34.4081632653, "ext": "agda", "hexsha": "94569716c002a931408b5dc86ba3eed617a21487", "lang": "Agda", "max_forks_count": 2, "max_forks_repo_forks_event_max_datetime": "2020-05-23T00:34:36.000Z", "max_forks_repo_forks_event_min_datetime": "2020-01-30T14:15:14.000Z", "max_forks_repo_head_hexsha": "461077552d88141ac1bba044aa55b65069c3c6c0", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "laMudri/linear.agda", "max_forks_repo_path": "src/Relation/Ternary/Separation/Allstar.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "461077552d88141ac1bba044aa55b65069c3c6c0", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "laMudri/linear.agda", "max_issues_repo_path": "src/Relation/Ternary/Separation/Allstar.agda", "max_line_length": 83, "max_stars_count": 34, "max_stars_repo_head_hexsha": "461077552d88141ac1bba044aa55b65069c3c6c0", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "laMudri/linear.agda", "max_stars_repo_path": "src/Relation/Ternary/Separation/Allstar.agda", "max_stars_repo_stars_event_max_datetime": "2021-02-03T15:22:33.000Z", "max_stars_repo_stars_event_min_datetime": "2019-12-20T13:57:50.000Z", "num_tokens": 715, "size": 1686 }
------------------------------------------------------------------------------ -- Testing the translation of 11-ary predicates symbols ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTIONS --without-K #-} module P11 where postulate D : Set P : D → D → D → D → D → D → D → D → D → D → D → Set postulate P-refl : ∀ {x₁ x₂ x₃ x₄ x₅ x₆ x₇ x₈ x₉ x₁₀ x₁₁} → P x₁ x₂ x₃ x₄ x₅ x₆ x₇ x₈ x₉ x₁₀ x₁₁ → P x₁ x₂ x₃ x₄ x₅ x₆ x₇ x₈ x₉ x₁₀ x₁₁ {-# ATP prove P-refl #-}
{ "alphanum_fraction": 0.3941176471, "avg_line_length": 34, "ext": "agda", "hexsha": "b071e50b5eaaff022b1347da80d352e507e2ef85", "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/P11.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/P11.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/P11.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": 206, "size": 680 }
-- The bug documented below was exposed by the fix to issue 274. {-# OPTIONS --universe-polymorphism #-} module Issue274 where postulate Level : Set zero : Level suc : Level → Level _⊔_ : Level → Level → Level {-# BUILTIN LEVEL Level #-} {-# BUILTIN LEVELZERO zero #-} {-# BUILTIN LEVELSUC suc #-} {-# BUILTIN LEVELMAX _⊔_ #-} record Q a : Set (a ⊔ a) where record R a : Set a where field q : Q a A : Set₁ A = Set postulate ℓ : Level r : R (ℓ ⊔ ℓ) foo : R ℓ foo = r -- Issue274.agda:32,7-8 -- ℓ ⊔ ℓ !=< ℓ of type Level -- when checking that the expression r has type R ℓ
{ "alphanum_fraction": 0.6088379705, "avg_line_length": 16.9722222222, "ext": "agda", "hexsha": "086429d7241f3c52cfa4ea4aa259cc0c67f60cf4", "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/succeed/Issue274.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/succeed/Issue274.agda", "max_line_length": 64, "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/succeed/Issue274.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": 211, "size": 611 }
{-# OPTIONS --without-K --rewriting #-} open import HoTT open import cohomology.ChainComplex open import cohomology.Theory open import groups.KernelImage open import cw.CW module cw.cohomology.ReconstructedFirstCohomologyGroup {i : ULevel} (OT : OrdinaryTheory i) where open OrdinaryTheory OT import cw.cohomology.TipCoboundary OT as TC import cw.cohomology.HigherCoboundary OT as HC import cw.cohomology.TipAndAugment OT as TAA open import cw.cohomology.WedgeOfCells OT open import cw.cohomology.Descending OT open import cw.cohomology.ReconstructedCochainComplex OT import cw.cohomology.FirstCohomologyGroup OT as FCG import cw.cohomology.FirstCohomologyGroupOnDiag OT as FCGD import cw.cohomology.CohomologyGroupsTooHigh OT as CGTH private ≤-dec-has-all-paths : {m n : ℕ} → has-all-paths (Dec (m ≤ n)) ≤-dec-has-all-paths = prop-has-all-paths (Dec-level ≤-is-prop) private abstract first-cohomology-group-descend : ∀ {n} (⊙skel : ⊙Skeleton {i} (3 + n)) → cohomology-group (cochain-complex ⊙skel) 1 == cohomology-group (cochain-complex (⊙cw-init ⊙skel)) 1 first-cohomology-group-descend {n = O} ⊙skel = ap2 (λ δ₁ δ₂ → Ker/Im δ₂ δ₁ (CXₙ/Xₙ₋₁-is-abelian (⊙cw-take (lteSR lteS) ⊙skel) 1)) (coboundary-first-template-descend-from-far {n = 2} ⊙skel (ltSR ltS) ltS) (coboundary-higher-template-descend-from-one-above ⊙skel) first-cohomology-group-descend {n = S n} ⊙skel -- n = S n = ap2 (λ δ₁ δ₂ → Ker/Im δ₂ δ₁ (CXₙ/Xₙ₋₁-is-abelian (⊙cw-take (≤-+-l 1 (lteSR $ lteSR $ inr (O<S n))) ⊙skel) 1)) (coboundary-first-template-descend-from-far {n = 3 + n} ⊙skel (ltSR (ltSR (O<S n))) (<-+-l 1 (ltSR (O<S n)))) (coboundary-higher-template-descend-from-far {n = 3 + n} ⊙skel (<-+-l 1 (ltSR (O<S n))) (<-+-l 2 (O<S n))) first-cohomology-group-β : ∀ (⊙skel : ⊙Skeleton {i} 2) → cohomology-group (cochain-complex ⊙skel) 1 == Ker/Im (HC.cw-co∂-last ⊙skel) (TC.cw-co∂-head (⊙cw-init ⊙skel)) (CXₙ/Xₙ₋₁-is-abelian (⊙cw-init ⊙skel) 1) first-cohomology-group-β ⊙skel = ap2 (λ δ₁ δ₂ → Ker/Im δ₂ δ₁ (CXₙ/Xₙ₋₁-is-abelian (⊙cw-init ⊙skel) 1)) ( coboundary-first-template-descend-from-two ⊙skel ∙ coboundary-first-template-β (⊙cw-init ⊙skel)) (coboundary-higher-template-β ⊙skel) first-cohomology-group-β-one-below : ∀ (⊙skel : ⊙Skeleton {i} 1) → cohomology-group (cochain-complex ⊙skel) 1 == Ker/Im (cst-hom {H = Lift-group {j = i} Unit-group}) (TC.cw-co∂-head ⊙skel) (CXₙ/Xₙ₋₁-is-abelian ⊙skel 1) first-cohomology-group-β-one-below ⊙skel = ap (λ δ₁ → Ker/Im (cst-hom {H = Lift-group {j = i} Unit-group}) δ₁ (CXₙ/Xₙ₋₁-is-abelian ⊙skel 1)) (coboundary-first-template-β ⊙skel) abstract first-cohomology-group : ∀ {n} (⊙skel : ⊙Skeleton {i} n) → ⊙has-cells-with-choice 0 ⊙skel i → C 1 ⊙⟦ ⊙skel ⟧ ≃ᴳ cohomology-group (cochain-complex ⊙skel) 1 first-cohomology-group {n = 0} ⊙skel ac = CGTH.C-cw-iso-ker/im 1 ltS (TAA.C2×CX₀ ⊙skel 0) ⊙skel ac first-cohomology-group {n = 1} ⊙skel ac = coe!ᴳ-iso (first-cohomology-group-β-one-below ⊙skel) ∘eᴳ FCGD.C-cw-iso-ker/im ⊙skel ac first-cohomology-group {n = 2} ⊙skel ac = coe!ᴳ-iso (first-cohomology-group-β ⊙skel) ∘eᴳ FCG.C-cw-iso-ker/im ⊙skel ac first-cohomology-group {n = S (S (S n))} ⊙skel ac = coe!ᴳ-iso (first-cohomology-group-descend ⊙skel) ∘eᴳ first-cohomology-group (⊙cw-init ⊙skel) (⊙init-has-cells-with-choice ⊙skel ac) ∘eᴳ C-cw-descend-at-lower ⊙skel (<-+-l 1 (O<S n)) ac
{ "alphanum_fraction": 0.6142212789, "avg_line_length": 46.5308641975, "ext": "agda", "hexsha": "a1f5899de0b40d5eca96a559c5c78db707816c32", "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/cw/cohomology/ReconstructedFirstCohomologyGroup.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/cw/cohomology/ReconstructedFirstCohomologyGroup.agda", "max_line_length": 122, "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/cw/cohomology/ReconstructedFirstCohomologyGroup.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 1479, "size": 3769 }
{-# OPTIONS --without-K #-} open import Base open import Homotopy.Pointed open import Homotopy.Connected module Homotopy.Cover.HomotopyGroupSetIsomorphism {i} (A⋆ : pType i) (A⋆-is-conn : is-connected⋆ ⟨0⟩ A⋆) where open pType A⋆ renaming (∣_∣ to A ; ⋆ to a) open import Algebra.Groups open import Homotopy.Truncation open import Homotopy.HomotopyGroups {i} open import Homotopy.PathTruncation open import Homotopy.Cover.Def A open import Homotopy.Cover.Ribbon A⋆ private module G = group (fundamental-group A⋆) open import Algebra.GroupSets (fundamental-group A⋆) {- Isomorphism between pi1(A)-sets and coverings. -} gset⇒covering : gset → covering gset⇒covering gset[ _ , act , _ ] = cov[ ribbon act , ribbon-is-set ] covering⇒action : ∀ cov → action (covering.fiber cov a) covering⇒action cov = act[ tracing cov , (λ _ → refl) , compose-tracing cov ] covering⇒gset : covering → gset covering⇒gset cov = let open covering cov in gset[ fiber a , covering⇒action cov , fiber-is-set a ] -- The first direction: covering -> gset -> covering -- From 0-connectedness we can get a (-1)-truncated base path. -- The challenge is to get this path. abstract [base-path] : ∀ a₂ → [ a ≡ a₂ ] [base-path] = connected-has-all-τ-paths A⋆-is-conn a -- Part 1: Show that the generated cover (ribbon) is fiberwisely -- equivalent to the original fiber. private module _ (cov : covering) where -- Suppose that we get the path, we can compute the ribbon easily. fiber+path⇒ribbon : ∀ a₂ (y : covering.fiber cov a₂) (p : a ≡ a₂) → ribbon (covering⇒action cov) a₂ fiber+path⇒ribbon a₂ y p = trace (tracing cov y (proj $ ! p)) (proj p) abstract -- Our construction is "constant" with respect to paths. fiber+path⇒ribbon-is-path-irrelevant : ∀ a₂ (y : covering.fiber cov a₂) (p₁ p₂ : a ≡ a₂) → fiber+path⇒ribbon a₂ y p₁ ≡ fiber+path⇒ribbon a₂ y p₂ fiber+path⇒ribbon-is-path-irrelevant .a y p refl = trace (tracing cov y (proj $ ! p)) (proj p) ≡⟨ paste y (proj $ ! p) (proj p) ⟩ trace y (proj $ (! p ∘ p)) ≡⟨ ap (λ x → trace y (proj x)) $ opposite-left-inverse p ⟩∎ trace y refl₀ ∎ -- Call the magical factorization library. open import Homotopy.Extensions.ToPropToConstSet -- Now we can read the (-1)-truncated path. fiber+path₋₁⇒ribbon : ∀ a₂ (y : covering.fiber cov a₂) → [ a ≡ a₂ ] → ribbon (covering⇒action cov) a₂ fiber+path₋₁⇒ribbon a₂ y = cst-extend ⦃ ribbon-is-set a₂ ⦄ (fiber+path⇒ribbon a₂ y) (fiber+path⇒ribbon-is-path-irrelevant a₂ y) -- So the conversion from fiber to ribbon is done. fiber⇒ribbon : ∀ cov a₂ → covering.fiber cov a₂ → ribbon (covering⇒action cov) a₂ fiber⇒ribbon cov a₂ y = fiber+path₋₁⇒ribbon cov a₂ y $ [base-path] a₂ -- The other direction is easy. ribbon⇒fiber : ∀ cov a₂ → ribbon (covering⇒action cov) a₂ → covering.fiber cov a₂ ribbon⇒fiber cov a₂ = let open covering cov in ribbon-rec-nondep a₂ (fiber a₂) ⦃ fiber-is-set a₂ ⦄ (tracing cov) (compose-tracing cov) private -- Some routine computations. abstract ribbon⇒fiber⇒ribbon : ∀ cov a₂ r → fiber⇒ribbon cov a₂ (ribbon⇒fiber cov a₂ r) ≡ r ribbon⇒fiber⇒ribbon cov a₂ = ribbon-rec a₂ (λ r → fiber⇒ribbon cov a₂ (ribbon⇒fiber cov a₂ r) ≡ r) ⦃ λ _ → ≡-is-set $ ribbon-is-set a₂ ⦄ (λ y p → []-extend -- All ugly things will go away when bp = proj bp′ ⦃ λ bp → ribbon-is-set a₂ (fiber+path₋₁⇒ribbon cov a₂ (tracing cov y p) bp) (trace y p) ⦄ (lemma a₂ y p) ([base-path] a₂)) (λ _ _ _ → prop-has-all-paths (ribbon-is-set a₂ _ _) _ _) where abstract lemma : ∀ a₂ (y : covering.fiber cov a) (p : a ≡₀ a₂) (bp : a ≡ a₂) → trace {act = covering⇒action cov} (tracing cov (tracing cov y p) (proj $ ! bp)) (proj bp) ≡ trace y p lemma .a y p refl = trace (tracing cov y p) refl₀ ≡⟨ paste y p refl₀ ⟩ trace y (p ∘₀ refl₀) ≡⟨ ap (trace y) $ refl₀-right-unit p ⟩∎ trace y p ∎ fiber⇒ribbon⇒fiber : ∀ cov a₂ y → ribbon⇒fiber cov a₂ (fiber⇒ribbon cov a₂ y) ≡ y fiber⇒ribbon⇒fiber cov a₂ y = let open covering cov in []-extend -- All ugly things will go away when bp = proj bp′ ⦃ λ bp → fiber-is-set a₂ (ribbon⇒fiber cov a₂ (fiber+path₋₁⇒ribbon cov a₂ y bp)) y ⦄ (lemma a₂ y) ([base-path] a₂) where abstract lemma : ∀ a₂ (y : covering.fiber cov a₂) (bp : a ≡ a₂) → tracing cov (tracing cov y (proj $ ! bp)) (proj bp) ≡ y lemma .a y refl = refl covering⇒gset⇒covering : ∀ cov → gset⇒covering (covering⇒gset cov) ≡ cov covering⇒gset⇒covering cov = covering-eq $ funext λ a₂ → eq-to-path $ ribbon⇒fiber cov a₂ , iso-is-eq (ribbon⇒fiber cov a₂) (fiber⇒ribbon cov a₂) (fiber⇒ribbon⇒fiber cov a₂) (ribbon⇒fiber⇒ribbon cov a₂) -- The second direction : gset -> covering -> gset -- Part 2.1: The fiber over the point a is the carrier. ribbon-a⇒Y : ∀ {Y} {act : action Y} ⦃ _ : is-set Y ⦄ → ribbon act a → Y ribbon-a⇒Y {Y} {act} ⦃ Y-is-set ⦄ = let open action act in ribbon-rec-nondep a Y ⦃ Y-is-set ⦄ _∙_ assoc ribbon-a≃Y : ∀ {Y} {act : action Y} ⦃ _ : is-set Y ⦄ → ribbon act a ≃ Y ribbon-a≃Y {Y} {act} ⦃ Y-is-set ⦄ = let open action act in ribbon-a⇒Y ⦃ Y-is-set ⦄ , iso-is-eq _ (λ y → trace y refl₀) (λ y → right-unit y) (ribbon-rec a (λ r → trace (ribbon-a⇒Y ⦃ Y-is-set ⦄ r) refl₀ ≡ r) ⦃ λ _ → ≡-is-set $ ribbon-is-set a ⦄ (λ y p → trace (y ∙ p) refl₀ ≡⟨ paste y p refl₀ ⟩ trace y (p G.∙ refl₀) ≡⟨ ap (trace y) $ G.right-unit p ⟩∎ trace y p ∎) (λ _ _ _ → prop-has-all-paths (ribbon-is-set a _ _) _ _)) private -- Some lemmas to simplify the proofs. trans-eq-∙ : ∀ {Y₁ Y₂ : Set i} (Y≃ : Y₁ ≃ Y₂) (_∙_ : Y₁ → G.carrier → Y₁) (y₂ : Y₂) (g : G.carrier) → transport (λ Y → Y → G.carrier → Y) (eq-to-path Y≃) _∙_ y₂ g ≡ (Y≃ ☆ (inverse Y≃ y₂ ∙ g)) trans-eq-∙ = equiv-induction (λ {Y₁ Y₂ : Set i} (Y≃ : Y₁ ≃ Y₂) → ∀ (_∙_ : Y₁ → G.carrier → Y₁) (y₂ : Y₂) (g : G.carrier) → transport (λ Y → Y → G.carrier → Y) (eq-to-path Y≃) _∙_ y₂ g ≡ (Y≃ ☆ (inverse Y≃ y₂ ∙ g))) (λ Y _∙_ y₂ g → ap (λ x → transport (λ Y → Y → G.carrier → Y) x _∙_ y₂ g) $ path-to-eq-right-inverse refl) gset⇒covering⇒gset : ∀ gs → covering⇒gset (gset⇒covering gs) ≡ gs gset⇒covering⇒gset gset[ Y , act , Y-is-set ] = let open action act _⊙_ = tracing cov[ ribbon act , ribbon-is-set {Y} {act} ] ≃Y = ribbon-a≃Y ⦃ Y-is-set ⦄ ⇒Y = ribbon-a⇒Y ⦃ Y-is-set ⦄ in gset-eq (eq-to-path ≃Y) (funext λ y → funext $ π₀-extend ⦃ λ _ → ≡-is-set Y-is-set ⦄ λ p → transport (λ Y → Y → G.carrier → Y) (eq-to-path ≃Y) _⊙_ y (proj p) ≡⟨ trans-eq-∙ ≃Y _⊙_ y (proj p) ⟩ ⇒Y (transport (ribbon act) p (trace y refl₀)) ≡⟨ ap ⇒Y $ trans-trace act p y refl₀ ⟩∎ y ∙ proj p ∎) -- Finally... gset-covering-eq : gset ≃ covering gset-covering-eq = gset⇒covering , iso-is-eq _ covering⇒gset covering⇒gset⇒covering gset⇒covering⇒gset {- Universality of the covering generated by the fundamental group itself. -} -- FIXME What's the established terminology for this? canonical-gset : gset canonical-gset = record { carrier = G.carrier ; act = record { _∙_ = _∘₀_ ; right-unit = refl₀-right-unit ; assoc = concat₀-assoc } ; set = π₀-is-set (a ≡ a) } -- FIXME What's the established terminology for this? canonical-covering : covering canonical-covering = gset⇒covering canonical-gset private module Universality where open covering canonical-covering open gset canonical-gset center′ : Σ A fiber center′ = (a , trace {act = act} refl₀ refl₀) center : τ ⟨1⟩ (Σ A fiber) center = proj center′ private -- An ugly lemma for this development only trans-fiber≡cst-proj-Σ-eq : ∀ {i} (P : Set i) (Q : P → Set i) (a : P) (c : Σ P Q) {b₁ b₂} (p : b₁ ≡ b₂) (q : a ≡ π₁ c) (r : transport Q q b₁ ≡ π₂ c) → transport (λ r → (a , r) ≡₀ c) p (proj $ Σ-eq q r) ≡ proj (Σ-eq q (ap (transport Q q) (! p) ∘ r)) trans-fiber≡cst-proj-Σ-eq P Q a c refl q r = refl abstract path-trace-fiber : ∀ {a₂} y (p : a ≡ a₂) → transport fiber (! p ∘ ! y) (trace (proj y) (proj p)) ≡ trace refl₀ refl₀ path-trace-fiber y refl = transport fiber (! y) (trace (proj y) refl₀) ≡⟨ trans-trace act (! y) (proj y) refl₀ ⟩ trace (proj y) (proj $ ! y) ≡⟨ paste refl₀ (proj y) (proj $ ! y) ⟩ trace refl₀ (proj $ y ∘ ! y) ≡⟨ ap (trace refl₀ ◯ proj) $ opposite-right-inverse y ⟩∎ trace refl₀ refl₀ ∎ path-trace : ∀ {a₂} y p → (a₂ , trace {act = act} y p) ≡₀ center′ path-trace {a₂} = π₀-extend ⦃ λ y → Π-is-set λ p → π₀-is-set ((a₂ , trace y p) ≡ center′) ⦄ (λ y → π₀-extend ⦃ λ p → π₀-is-set ((a₂ , trace (proj y) p) ≡ center′) ⦄ (λ p → proj $ Σ-eq (! p ∘ ! y) (path-trace-fiber y p))) abstract path-paste′ : ∀ {a₂} y loop p → transport (λ r → (a₂ , r) ≡₀ center′) (paste (proj y) (proj loop) (proj p)) (path-trace (proj $ y ∘ loop) (proj p)) ≡ path-trace (proj y) (proj $ loop ∘ p) path-paste′ y loop refl = transport (λ r → (a , r) ≡₀ center′) (paste (proj y) (proj loop) refl₀) (proj $ Σ-eq (! (y ∘ loop)) (path-trace-fiber (y ∘ loop) refl)) ≡⟨ trans-fiber≡cst-proj-Σ-eq A fiber a center′ (paste (proj y) (proj loop) refl₀) (! (y ∘ loop)) (path-trace-fiber (y ∘ loop) refl) ⟩ proj (Σ-eq (! (y ∘ loop)) _) ≡⟨ ap proj $ ap2 (λ p q → Σ-eq p q) (! (y ∘ loop) ≡⟨ opposite-concat y loop ⟩ ! loop ∘ ! y ≡⟨ ap (λ x → ! x ∘ ! y) $ ! $ refl-right-unit loop ⟩∎ ! (loop ∘ refl) ∘ ! y ∎) (prop-has-all-paths (ribbon-is-set a _ _) _ _) ⟩∎ proj (Σ-eq (! (loop ∘ refl) ∘ ! y) (path-trace-fiber y (loop ∘ refl))) ∎ abstract path-paste : ∀ {a₂} y loop p → transport (λ r → (a₂ , r) ≡₀ center′) (paste y loop p) (path-trace (y ∘₀ loop) p) ≡ path-trace y (loop ∘₀ p) path-paste {a₂} = π₀-extend ⦃ λ y → Π-is-set λ loop → Π-is-set λ p → ≡-is-set $ π₀-is-set _ ⦄ (λ y → π₀-extend ⦃ λ loop → Π-is-set λ p → ≡-is-set $ π₀-is-set _ ⦄ (λ loop → π₀-extend ⦃ λ p → ≡-is-set $ π₀-is-set _ ⦄ (λ p → path-paste′ y loop p))) path′ : (y : Σ A fiber) → proj {n = ⟨1⟩} y ≡ center path′ y = τ-path-equiv-path-τ-S {n = ⟨0⟩} ☆ ribbon-rec {act = act} (π₁ y) (λ r → (π₁ y , r) ≡₀ center′) ⦃ λ r → π₀-is-set ((π₁ y , r) ≡ center′) ⦄ path-trace path-paste (π₂ y) path : (y : τ ⟨1⟩ (Σ A fiber)) → y ≡ center path = τ-extend {n = ⟨1⟩} ⦃ λ _ → ≡-is-truncated ⟨1⟩ $ τ-is-truncated ⟨1⟩ _ ⦄ path′ canonical-covering-is-universal : is-universal canonical-covering canonical-covering-is-universal = Universality.center , Universality.path -- The other direction: If a covering is universal, then the fiber -- is equivalent to the fundamental group. module _ (cov : covering) (cov-is-universal : is-universal cov) where open covering cov open action (covering⇒action cov) -- We need a point! module GiveMeAPoint (center : fiber a) where -- Goal: fiber a <-> fundamental group fiber-a⇒fg : fiber a → a ≡₀ a fiber-a⇒fg y = ap₀ π₁ $ connected-has-all-τ-paths cov-is-universal (a , center) (a , y) fg⇒fiber-a : a ≡₀ a → fiber a fg⇒fiber-a = tracing cov center fg⇒fiber-a⇒fg : ∀ p → fiber-a⇒fg (fg⇒fiber-a p) ≡ p fg⇒fiber-a⇒fg = π₀-extend ⦃ λ _ → ≡-is-set $ π₀-is-set _ ⦄ λ p → ap₀ π₁ (connected-has-all-τ-paths cov-is-universal (a , center) (a , transport fiber p center)) ≡⟨ ap (ap₀ π₁) $ ! $ π₂ (connected-has-connected-paths cov-is-universal _ _) (proj $ Σ-eq p refl) ⟩ ap₀ π₁ (proj $ Σ-eq p refl) ≡⟨ ap proj $ base-path-Σ-eq p refl ⟩∎ proj p ∎ fiber-a⇒fg⇒fiber-a : ∀ y → fg⇒fiber-a (fiber-a⇒fg y) ≡ y fiber-a⇒fg⇒fiber-a y = π₀-extend ⦃ λ p → ≡-is-set {x = tracing cov center (ap₀ π₁ p)} {y = y} $ fiber-is-set a ⦄ (λ p → transport fiber (base-path p) center ≡⟨ trans-base-path p ⟩∎ y ∎) (connected-has-all-τ-paths cov-is-universal (a , center) (a , y)) fiber-a≃fg : fiber a ≃ (a ≡₀ a) fiber-a≃fg = fiber-a⇒fg , iso-is-eq _ fg⇒fiber-a fg⇒fiber-a⇒fg fiber-a⇒fg⇒fiber-a -- This is the best we can obtain, because there is no continuous -- choice of the center. [center] : [ fiber a ] [center] = τ-extend-nondep ⦃ prop-is-gpd []-is-prop ⦄ (λ y → []-extend-nondep ⦃ []-is-prop ⦄ (proj ◯ λ p → transport fiber p (π₂ y)) (connected-has-all-τ-paths A⋆-is-conn (π₁ y) a)) (π₁ cov-is-universal) -- [ isomorphism between the fiber and the fundamental group ] -- This is the best we can obtain, because there is no continuous -- choice of the center. [fiber-a≃fg] : [ fiber a ≃ (a ≡₀ a) ] [fiber-a≃fg] = []-extend-nondep ⦃ []-is-prop ⦄ (proj ◯ GiveMeAPoint.fiber-a≃fg) [center]
{ "alphanum_fraction": 0.5290192535, "avg_line_length": 38.7789757412, "ext": "agda", "hexsha": "50484ce9839918f2ca9188e117888151749a176d", "lang": "Agda", "max_forks_count": 50, "max_forks_repo_forks_event_max_datetime": "2022-02-14T03:03:25.000Z", "max_forks_repo_forks_event_min_datetime": "2015-01-10T01:48:08.000Z", "max_forks_repo_head_hexsha": "939a2d83e090fcc924f69f7dfa5b65b3b79fe633", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "nicolaikraus/HoTT-Agda", "max_forks_repo_path": "old/Homotopy/Cover/HomotopyGroupSetIsomorphism.agda", "max_issues_count": 31, "max_issues_repo_head_hexsha": "939a2d83e090fcc924f69f7dfa5b65b3b79fe633", "max_issues_repo_issues_event_max_datetime": "2021-10-03T19:15:25.000Z", "max_issues_repo_issues_event_min_datetime": "2015-03-05T20:09:00.000Z", "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "nicolaikraus/HoTT-Agda", "max_issues_repo_path": "old/Homotopy/Cover/HomotopyGroupSetIsomorphism.agda", "max_line_length": 103, "max_stars_count": 294, "max_stars_repo_head_hexsha": "66f800adef943afdf08c17b8ecfba67340fead5e", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "timjb/HoTT-Agda", "max_stars_repo_path": "old/Homotopy/Cover/HomotopyGroupSetIsomorphism.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": 5164, "size": 14387 }
{-# OPTIONS --safe #-} module Cubical.HITs.Susp.Properties where open import Cubical.Foundations.Prelude open import Cubical.Foundations.HLevels open import Cubical.Foundations.Isomorphism open import Cubical.Foundations.Equiv open import Cubical.Foundations.Path open import Cubical.Foundations.Pointed open import Cubical.Foundations.Pointed.Homogeneous open import Cubical.Foundations.GroupoidLaws open import Cubical.Data.Bool open import Cubical.Data.Sigma open import Cubical.HITs.Join open import Cubical.HITs.Susp.Base open import Cubical.Homotopy.Loopspace private variable ℓ : Level open Iso Susp-iso-joinBool : ∀ {ℓ} {A : Type ℓ} → Iso (Susp A) (join A Bool) fun Susp-iso-joinBool north = inr true fun Susp-iso-joinBool south = inr false fun Susp-iso-joinBool (merid a i) = (sym (push a true) ∙ push a false) i inv Susp-iso-joinBool (inr true ) = north inv Susp-iso-joinBool (inr false) = south inv Susp-iso-joinBool (inl _) = north inv Susp-iso-joinBool (push a true i) = north inv Susp-iso-joinBool (push a false i) = merid a i rightInv Susp-iso-joinBool (inr true ) = refl rightInv Susp-iso-joinBool (inr false) = refl rightInv Susp-iso-joinBool (inl a) = sym (push a true) rightInv Susp-iso-joinBool (push a true i) j = push a true (i ∨ ~ j) rightInv Susp-iso-joinBool (push a false i) j = hcomp (λ k → λ { (i = i0) → push a true (~ j) ; (i = i1) → push a false k ; (j = i1) → push a false (i ∧ k) }) (push a true (~ i ∧ ~ j)) leftInv Susp-iso-joinBool north = refl leftInv Susp-iso-joinBool south = refl leftInv (Susp-iso-joinBool {A = A}) (merid a i) j = hcomp (λ k → λ { (i = i0) → transp (λ _ → Susp A) (k ∨ j) north ; (i = i1) → transp (λ _ → Susp A) (k ∨ j) (merid a k) ; (j = i1) → merid a (i ∧ k) }) (transp (λ _ → Susp A) j north) Susp≃joinBool : ∀ {ℓ} {A : Type ℓ} → Susp A ≃ join A Bool Susp≃joinBool = isoToEquiv Susp-iso-joinBool Susp≡joinBool : ∀ {ℓ} {A : Type ℓ} → Susp A ≡ join A Bool Susp≡joinBool = isoToPath Susp-iso-joinBool congSuspIso : ∀ {ℓ} {A B : Type ℓ} → Iso A B → Iso (Susp A) (Susp B) fun (congSuspIso is) = suspFun (fun is) inv (congSuspIso is) = suspFun (inv is) rightInv (congSuspIso is) north = refl rightInv (congSuspIso is) south = refl rightInv (congSuspIso is) (merid a i) j = merid (rightInv is a j) i leftInv (congSuspIso is) north = refl leftInv (congSuspIso is) south = refl leftInv (congSuspIso is) (merid a i) j = merid (leftInv is a j) i congSuspEquiv : ∀ {ℓ} {A B : Type ℓ} → A ≃ B → Susp A ≃ Susp B congSuspEquiv {ℓ} {A} {B} h = isoToEquiv (congSuspIso (equivToIso h)) suspToPropElim : ∀ {ℓ ℓ'} {A : Type ℓ} {B : Susp A → Type ℓ'} (a : A) → ((x : Susp A) → isProp (B x)) → B north → (x : Susp A) → B x suspToPropElim a isProp Bnorth north = Bnorth suspToPropElim {B = B} a isProp Bnorth south = subst B (merid a) Bnorth suspToPropElim {B = B} a isProp Bnorth (merid a₁ i) = isOfHLevel→isOfHLevelDep 1 isProp Bnorth (subst B (merid a) Bnorth) (merid a₁) i suspToPropElim2 : ∀ {ℓ ℓ'} {A : Type ℓ} {B : Susp A → Susp A → Type ℓ'} (a : A) → ((x y : Susp A) → isProp (B x y)) → B north north → (x y : Susp A) → B x y suspToPropElim2 _ _ Bnorth north north = Bnorth suspToPropElim2 {B = B} a _ Bnorth north south = subst (B north) (merid a) Bnorth suspToPropElim2 {B = B} a isprop Bnorth north (merid x i) = isProp→PathP (λ i → isprop north (merid x i)) Bnorth (subst (B north) (merid a) Bnorth) i suspToPropElim2 {B = B} a _ Bnorth south north = subst (λ x → B x north) (merid a) Bnorth suspToPropElim2 {B = B} a _ Bnorth south south = subst (λ x → B x x) (merid a) Bnorth suspToPropElim2 {B = B} a isprop Bnorth south (merid x i) = isProp→PathP (λ i → isprop south (merid x i)) (subst (λ x → B x north) (merid a) Bnorth) (subst (λ x → B x x) (merid a) Bnorth) i suspToPropElim2 {B = B} a isprop Bnorth (merid x i) north = isProp→PathP (λ i → isprop (merid x i) north) Bnorth (subst (λ x → B x north) (merid a) Bnorth) i suspToPropElim2 {B = B} a isprop Bnorth (merid x i) south = isProp→PathP (λ i → isprop (merid x i) south) (subst (B north) (merid a) Bnorth) (subst (λ x → B x x) (merid a) Bnorth) i suspToPropElim2 {B = B} a isprop Bnorth (merid x i) (merid y j) = isSet→SquareP (λ i j → isOfHLevelSuc 1 (isprop _ _)) (isProp→PathP (λ i₁ → isprop north (merid y i₁)) Bnorth (subst (B north) (merid a) Bnorth)) (isProp→PathP (λ i₁ → isprop south (merid y i₁)) (subst (λ x₁ → B x₁ north) (merid a) Bnorth) (subst (λ x₁ → B x₁ x₁) (merid a) Bnorth)) (isProp→PathP (λ i₁ → isprop (merid x i₁) north) Bnorth (subst (λ x₁ → B x₁ north) (merid a) Bnorth)) (isProp→PathP (λ i₁ → isprop (merid x i₁) south) (subst (B north) (merid a) Bnorth) (subst (λ x₁ → B x₁ x₁) (merid a) Bnorth)) i j {- Clever proof: suspToPropElim2 a isProp Bnorth = suspToPropElim a (λ x → isOfHLevelΠ 1 λ y → isProp x y) (suspToPropElim a (λ x → isProp north x) Bnorth) -} funSpaceSuspIso : ∀ {ℓ ℓ'} {A : Type ℓ} {B : Type ℓ'} → Iso (Σ[ x ∈ B ] Σ[ y ∈ B ] (A → x ≡ y)) (Susp A → B) Iso.fun funSpaceSuspIso (x , y , f) north = x Iso.fun funSpaceSuspIso (x , y , f) south = y Iso.fun funSpaceSuspIso (x , y , f) (merid a i) = f a i Iso.inv funSpaceSuspIso f = (f north) , (f south , (λ x → cong f (merid x))) Iso.rightInv funSpaceSuspIso f = funExt λ {north → refl ; south → refl ; (merid a i) → refl} Iso.leftInv funSpaceSuspIso _ = refl toSusp : (A : Pointed ℓ) → typ A → typ (Ω (Susp∙ (typ A))) toSusp A x = merid x ∙ merid (pt A) ⁻¹ toSuspPointed : (A : Pointed ℓ) → A →∙ Ω (Susp∙ (typ A)) fst (toSuspPointed A) = toSusp A snd (toSuspPointed A) = rCancel (merid (pt A)) module _ {ℓ ℓ' : Level} {A : Pointed ℓ} {B : Pointed ℓ'} where fromSusp→toΩ : Susp∙ (typ A) →∙ B → (A →∙ Ω B) fst (fromSusp→toΩ f) x = sym (snd f) ∙∙ cong (fst f) (toSusp A x) ∙∙ snd f snd (fromSusp→toΩ f) = cong (sym (snd f) ∙∙_∙∙ (snd f)) (cong (cong (fst f)) (rCancel (merid (pt A)))) ∙ ∙∙lCancel (snd f) toΩ→fromSusp : A →∙ Ω B → Susp∙ (typ A) →∙ B fst (toΩ→fromSusp f) north = pt B fst (toΩ→fromSusp f) south = pt B fst (toΩ→fromSusp f) (merid a i) = fst f a i snd (toΩ→fromSusp f) = refl ΩSuspAdjointIso : Iso (A →∙ Ω B) (Susp∙ (typ A) →∙ B) fun ΩSuspAdjointIso = toΩ→fromSusp inv ΩSuspAdjointIso = fromSusp→toΩ rightInv ΩSuspAdjointIso f = ΣPathP (funExt (λ { north → sym (snd f) ; south → sym (snd f) ∙ cong (fst f) (merid (pt A)) ; (merid a i) j → hcomp (λ k → λ { (i = i0) → snd f (~ j ∧ k) ; (i = i1) → compPath-filler' (sym (snd f)) (cong (fst f) (merid (pt A))) k j ; (j = i1) → fst f (merid a i)}) (fst f (compPath-filler (merid a) (sym (merid (pt A))) (~ j) i))}) , λ i j → snd f (~ i ∨ j)) leftInv ΩSuspAdjointIso f = →∙Homogeneous≡ (isHomogeneousPath _ _) (funExt λ x → sym (rUnit _) ∙ cong-∙ (fst (toΩ→fromSusp f)) (merid x) (sym (merid (pt A))) ∙ cong (fst f x ∙_) (cong sym (snd f)) ∙ sym (rUnit _)) IsoΩFunSuspFun : Iso (typ (Ω (A →∙ B ∙))) (Susp∙ (typ A) →∙ B) IsoΩFunSuspFun = compIso (ΩfunExtIso A B) ΩSuspAdjointIso -- inversion invSusp : ∀ {ℓ} {A : Type ℓ} → Susp A → Susp A invSusp north = south invSusp south = north invSusp (merid a i) = merid a (~ i) invSusp² : ∀ {ℓ} {A : Type ℓ} (x : Susp A) → invSusp (invSusp x) ≡ x invSusp² north = refl invSusp² south = refl invSusp² (merid a i) = refl invSuspIso : ∀ {ℓ} {A : Type ℓ} → Iso (Susp A) (Susp A) fun invSuspIso = invSusp inv invSuspIso = invSusp rightInv invSuspIso = invSusp² leftInv invSuspIso = invSusp² -- Explicit definition of the iso -- join (Susp A) B ≃ Susp (join A B) -- for pointed types A and B. This is useful for obtaining a ``nice'' iso -- join Sⁿ Sᵐ ≃ Sⁿ⁺ᵐ⁺¹ module _ {A B : Pointed ℓ} where private -- some useful fillers rinv-filler : (b : typ B) → I → I → I → join (Susp (typ A)) (typ B) rinv-filler b i j k = hfill (λ k → λ {(i = i0) → push south b (~ k) ; (i = i1) → push north b (~ k ∨ j) ; (j = i0) → push (merid (pt A) (~ i)) b (~ k) ; (j = i1) → push south b (~ k ∨ i)}) (inS (inr b)) k suspJoin→joinSuspFiller : I → I → I → (a : typ A) (b : typ B) → join (Susp (typ A)) (typ B) suspJoin→joinSuspFiller i j k a b = hfill (λ k → λ {(i = i0) → push north b (~ k) ; (i = i1) → push south b (~ k) ; (j = i0) → push (merid a i) b (~ k) ; (j = i1) → push (merid (pt A) i) b (~ k)}) (inS (inr b)) k joinSuspFiller : I → I → I → (a : typ A) (b : typ B) → Susp (join (typ A) (typ B)) joinSuspFiller i j k a b = hfill (λ k → λ {(i = i0) → merid (push a b (~ k)) j ; (i = i1) → north ; (j = i0) → north ; (j = i1) → merid (push (pt A) b (~ k)) (~ i)}) (inS (merid (inr b) (~ i ∧ j))) k suspJoin→joinSusp : Susp (join (typ A) (typ B)) → join (Susp (typ A)) (typ B) suspJoin→joinSusp north = inl north suspJoin→joinSusp south = inl south suspJoin→joinSusp (merid (inl x) i) = inl ((merid x) i) suspJoin→joinSusp (merid (inr x) i) = inl (merid (pt A) i) suspJoin→joinSusp (merid (push a b j) i) = suspJoin→joinSuspFiller i j i1 a b joinSusp→suspJoin : join (Susp (typ A)) (typ B) → Susp (join (typ A) (typ B)) joinSusp→suspJoin (inl north) = north joinSusp→suspJoin (inl south) = south joinSusp→suspJoin (inl (merid a i)) = merid (inl a) i joinSusp→suspJoin (inr x) = north joinSusp→suspJoin (push north b i) = north joinSusp→suspJoin (push south b i) = merid (inl (pt A)) (~ i) joinSusp→suspJoin (push (merid a j) b i) = joinSuspFiller i j i1 a b suspJoin→joinSusp→suspJoin : (x : Susp (join (typ A) (typ B))) → joinSusp→suspJoin (suspJoin→joinSusp x) ≡ x suspJoin→joinSusp→suspJoin north = refl suspJoin→joinSusp→suspJoin south = refl suspJoin→joinSusp→suspJoin (merid (inl x) i) = refl suspJoin→joinSusp→suspJoin (merid (inr x) i) j = merid (push (pt A) x j) i suspJoin→joinSusp→suspJoin (merid (push a b j) i) k = hcomp (λ r → λ {(i = i0) → north ; (i = i1) → merid (push (snd A) b (k ∧ (~ r ∨ j))) r ; (j = i0) → joinSuspFiller (~ r) i (~ k ∨ r) a b ; (j = i1) → joinSuspFiller (~ r) i (~ k) (pt A) b ; (k = i0) → joinSusp→suspJoin (suspJoin→joinSuspFiller i j r a b) ; (k = i1) → k=i1 i j r}) north where k=i1 : Cube (λ j r → north) (λ j r → merid (push (snd A) b (~ r ∨ j)) r) (λ i r → joinSuspFiller (~ r) i r a b) (λ i r → merid (inr b) (r ∧ i)) refl λ i j → merid (push a b j) i k=i1 i j r = hcomp (λ k → λ {(i = i0) → north ; (i = i1) → merid (push (snd A) b (~ r ∨ ~ k ∨ j)) r ; (j = i0) → joinSuspFiller (~ r) i (r ∧ k) a b ; (j = i1) → merid (inr b) (r ∧ i) ; (r = i0) → north ; (r = i1) → merid (push a b (~ k ∨ j)) i}) (merid (inr b) (i ∧ r)) joinSusp→suspJoin→joinSusp : (x : join (Susp (typ A)) (typ B)) → suspJoin→joinSusp (joinSusp→suspJoin x) ≡ x joinSusp→suspJoin→joinSusp (inl north) = refl joinSusp→suspJoin→joinSusp (inl south) = refl joinSusp→suspJoin→joinSusp (inl (merid a i)) = refl joinSusp→suspJoin→joinSusp (inr x) = push north x joinSusp→suspJoin→joinSusp (push north b i) j = push north b (j ∧ i) joinSusp→suspJoin→joinSusp (push south b i) j = rinv-filler b i j i1 joinSusp→suspJoin→joinSusp (push (merid a j) b i) k = hcomp (λ r → λ { (j = i0) → push north b (k ∧ i) ; (j = i1) → lem i k r ; (i = i0) → suspJoin→joinSuspFiller j (~ r ∧ ~ k) i1 a b ; (i = i1) → push north b k ; (k = i0) → suspJoin→joinSusp (joinSuspFiller i j r a b) ; (k = i1) → push (merid a j) b i}) (hcomp (λ r → λ { (j = i0) → push north b (~ r ∨ (k ∧ i)) ; (j = i1) → rinv-filler b i k r ; (i = i0) → suspJoin→joinSuspFiller j (~ k) r a b ; (i = i1) → push north b (~ r ∨ k) ; (k = i0) → push (merid (snd A) (~ i ∧ j)) b (~ r) ; (k = i1) → push (merid a j) b (~ r ∨ i)}) (inr b)) where lem : Cube (λ k r → inl south) (λ k r → push north b k) (λ i r → suspJoin→joinSuspFiller (~ i) r i1 (pt A) b) (λ i r → push south b i) (λ i k → rinv-filler b i k i1) λ i k → rinv-filler b i k i1 lem i k r = hcomp (λ j → λ { (r = i0) → rinv-filler b i k j ; (r = i1) → rinv-filler b i k j ; (i = i0) → push south b (~ j) ; (i = i1) → push north b (k ∨ ~ j) ; (k = i0) → suspJoin→joinSuspFiller (~ i) r j (pt A) b ; (k = i1) → push south b (i ∨ ~ j)}) (inr b) Iso-joinSusp-suspJoin : Iso (join (Susp (typ A)) (typ B)) (Susp (join (typ A) (typ B))) Iso.fun Iso-joinSusp-suspJoin = joinSusp→suspJoin Iso.inv Iso-joinSusp-suspJoin = suspJoin→joinSusp Iso.rightInv Iso-joinSusp-suspJoin = suspJoin→joinSusp→suspJoin Iso.leftInv Iso-joinSusp-suspJoin = joinSusp→suspJoin→joinSusp -- interaction between invSusp and toSusp toSusp-invSusp : (A : Pointed ℓ) (x : Susp (typ A)) → toSusp (Susp∙ (typ A)) (invSusp x) ≡ sym (toSusp (Susp∙ (typ A)) x) toSusp-invSusp A north = cong (toSusp (Susp∙ (typ A))) (sym (merid (snd A))) ∙∙ rCancel (merid north) ∙∙ cong sym (sym (rCancel (merid north))) toSusp-invSusp A south = rCancel (merid north) ∙∙ cong sym (sym (rCancel (merid north))) ∙∙ cong sym (cong (toSusp (Susp∙ (typ A))) (merid (pt A))) toSusp-invSusp A (merid a i) j = lem (toSusp (Susp∙ (typ A)) north) (toSusp (Susp∙ (typ A)) south) (sym (rCancel (merid north))) (cong (toSusp (Susp∙ (typ A))) ((merid (pt A)))) (cong (toSusp (Susp∙ (typ A))) (merid a)) (~ j) i where lem : {A : Type ℓ} {x : A} (p q : x ≡ x) (l : refl ≡ p) (coh r : p ≡ q) → PathP (λ i → (cong sym (sym l) ∙∙ l ∙∙ coh) i ≡ (cong sym (sym coh) ∙∙ cong sym (sym l) ∙∙ l) i) (cong sym r) (sym r) lem p q = J (λ p l → (coh r : p ≡ q) → PathP (λ i → (cong sym (sym l) ∙∙ l ∙∙ coh) i ≡ (cong sym (sym coh) ∙∙ cong sym (sym l) ∙∙ l) i) (cong sym r) (sym r)) (J (λ q coh → (r : refl ≡ q) → PathP (λ i → (refl ∙ coh) i ≡ (cong sym (sym coh) ∙∙ refl ∙∙ refl) i) (cong sym r) (sym r)) λ r → flipSquare (sym (rUnit refl) ◁ (flipSquare (sym (sym≡cong-sym r)) ▷ rUnit refl)))
{ "alphanum_fraction": 0.5272900158, "avg_line_length": 43.4573002755, "ext": "agda", "hexsha": "f510599c11747e4d0a96f2009ee4a7d1d0c092bb", "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/Susp/Properties.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/Susp/Properties.agda", "max_line_length": 89, "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/Susp/Properties.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": 5851, "size": 15775 }
-- With functions are now inlined before termination checking. module Issue59 where open import Common.Prelude open import Common.Equality module Order (A : Set) (_≤_ : A → A → Bool) where -- This now termination checks. merge : List A → List A → List A merge [] ys = ys merge xs [] = xs merge (x ∷ xs) (y ∷ ys) with x ≤ y merge (x ∷ xs) (y ∷ ys) | false = y ∷ merge (x ∷ xs) ys merge (x ∷ []) (y ∷ ys) | true = x ∷ y ∷ ys merge (x ∷ x₁ ∷ xs) (y ∷ ys) | true = x ∷ merge (x₁ ∷ xs) (y ∷ ys) data Ordering : Nat → Nat → Set where eq : ∀ n → Ordering n n lt : ∀ n d → Ordering n (n + suc d) gt : ∀ n d → Ordering (n + suc d) n -- Just make sure we didn't mess anything up when there are dot patterns. -- Andreas, 2013-11-11: But there are no recursive calls in the clauses -- with dot patterns! compare : ∀ n m → Ordering n m compare zero zero = eq zero compare zero (suc m) = lt zero m compare (suc n) zero = gt zero n compare (suc n) (suc m) with compare n m compare (suc n) (suc .(n + suc d)) | lt .n d = lt (suc n) d compare (suc .(m + suc d)) (suc m) | gt .m d = gt (suc m) d compare (suc n) (suc .n) | eq .n = eq (suc n) -- Rewrite plus-zero : ∀ n → n + 0 ≡ n plus-zero zero = refl plus-zero (suc n) rewrite plus-zero n = refl plus-suc : ∀ n m → n + suc m ≡ suc n + m plus-suc zero m = refl plus-suc (suc n) m rewrite plus-suc n m = refl commute : ∀ m n → m + n ≡ n + m commute m zero = plus-zero m commute m (suc n) rewrite plus-suc m n | commute m n = refl
{ "alphanum_fraction": 0.5949868074, "avg_line_length": 30.9387755102, "ext": "agda", "hexsha": "eba9c20436f17700dc9efbd568b4e783bb72972f", "lang": "Agda", "max_forks_count": 1, "max_forks_repo_forks_event_max_datetime": "2019-03-05T20:02:38.000Z", "max_forks_repo_forks_event_min_datetime": "2019-03-05T20:02:38.000Z", "max_forks_repo_head_hexsha": "6043e77e4a72518711f5f808fb4eb593cbf0bb7c", "max_forks_repo_licenses": [ "BSD-3-Clause" ], "max_forks_repo_name": "alhassy/agda", "max_forks_repo_path": "test/Succeed/Issue59.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "6043e77e4a72518711f5f808fb4eb593cbf0bb7c", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "BSD-3-Clause" ], "max_issues_repo_name": "alhassy/agda", "max_issues_repo_path": "test/Succeed/Issue59.agda", "max_line_length": 73, "max_stars_count": 3, "max_stars_repo_head_hexsha": "6043e77e4a72518711f5f808fb4eb593cbf0bb7c", "max_stars_repo_licenses": [ "BSD-3-Clause" ], "max_stars_repo_name": "alhassy/agda", "max_stars_repo_path": "test/Succeed/Issue59.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": 557, "size": 1516 }
{-# OPTIONS --without-K #-} {- Favonia: I was trying to generalize OneSkeleton but failed to achieve what I wanted. Nicolai then told me this HIT which is suitable for the constancy lemma I was looking for. This construction should be attributed to Paolo Capriotti and Nicolai Kraus. [1] [1] Eliminating Higher Truncations via Constancy by Paolo Capriotti and Nicolai Kraus (in preparation/work in progress) -} open import HoTT module experimental.TwoConstancyHIT where module _ where private data #TwoConstancy-aux {i} (A : Type i) : Type i where #point : A → #TwoConstancy-aux A data #TwoConstancy {i} (A : Type i) : Type i where #two-constancy : #TwoConstancy-aux A → (Unit → Unit) → #TwoConstancy A TwoConstancy : ∀ {i} → Type i → Type i TwoConstancy = #TwoConstancy module _ {i} {A : Type i} where point : A → TwoConstancy A point a = #two-constancy (#point a) _ postulate -- HIT link₀ : ∀ a₁ a₂ → point a₁ == point a₂ link₁ : ∀ a₁ a₂ a₃ → link₀ a₁ a₂ ∙' link₀ a₂ a₃ == link₀ a₁ a₃ TwoConstancy-level : is-gpd (TwoConstancy A) module TwoConstancyElim {l} {P : TwoConstancy A → Type l} (p : ∀ x → is-gpd (P x)) (point* : ∀ a → P (point a)) (link₀* : ∀ a₁ a₂ → point* a₁ == point* a₂ [ P ↓ link₀ a₁ a₂ ]) (link₁* : ∀ a₁ a₂ a₃ → link₀* a₁ a₂ ∙'ᵈ link₀* a₂ a₃ == link₀* a₁ a₃ [ (λ p → point* a₁ == point* a₃ [ P ↓ p ]) ↓ link₁ a₁ a₂ a₃ ]) where f : Π (TwoConstancy A) P f = f-aux phantom phantom phantom where f-aux : Phantom p → Phantom link₀* → Phantom link₁* → Π (TwoConstancy A) P f-aux phantom phantom phantom (#two-constancy (#point a) _) = point* a postulate -- HIT link₀-β : ∀ a₁ a₂ → apd f (link₀ a₁ a₂) == link₀* a₁ a₂ private lemma : ∀ a₁ a₂ a₃ → apd f (link₀ a₁ a₂ ∙' link₀ a₂ a₃) == link₀* a₁ a₂ ∙'ᵈ link₀* a₂ a₃ lemma a₁ a₂ a₃ = apd f (link₀ a₁ a₂ ∙' link₀ a₂ a₃) =⟨ apd-∙' f (link₀ a₁ a₂) (link₀ a₂ a₃) ⟩ apd f (link₀ a₁ a₂) ∙'ᵈ apd f (link₀ a₂ a₃) =⟨ link₀-β a₁ a₂ |in-ctx (λ u → u ∙'ᵈ apd f (link₀ a₂ a₃)) ⟩ link₀* a₁ a₂ ∙'ᵈ apd f (link₀ a₂ a₃) =⟨ link₀-β a₂ a₃ |in-ctx (λ u → link₀* a₁ a₂ ∙'ᵈ u) ⟩ link₀* a₁ a₂ ∙'ᵈ link₀* a₂ a₃ ∎ postulate -- HIT link₁-β : ∀ a₁ a₂ a₃ → apd (apd f) (link₁ a₁ a₂ a₃) == lemma a₁ a₂ a₃ ◃ (link₁* a₁ a₂ a₃ ▹! link₀-β a₁ a₃) open TwoConstancyElim public using () renaming (f to TwoConstancy-elim) module TwoConstancyRec {i} {A : Type i} {l} {P : Type l} (p : is-gpd P) (point* : ∀ a → P) (link₀* : ∀ a₁ a₂ → point* a₁ == point* a₂) (link₁* : ∀ a₁ a₂ a₃ → link₀* a₁ a₂ ∙' link₀* a₂ a₃ == link₀* a₁ a₃) where private module M = TwoConstancyElim {A = A} {l = l} {P = λ _ → P} (λ _ → p) point* (λ a₁ a₂ → ↓-cst-in (link₀* a₁ a₂)) (λ a₁ a₂ a₃ → ↓-cst-in-∙' (link₀ a₁ a₂) (link₀ a₂ a₃) (link₀* a₁ a₂) (link₀* a₂ a₃) !◃ ↓-cst-in2 (link₁* a₁ a₂ a₃)) f : TwoConstancy A → P f = M.f link₀-β : ∀ a₁ a₂ → ap f (link₀ a₁ a₂) == link₀* a₁ a₂ link₀-β a₁ a₂ = apd=cst-in {f = f} $ M.link₀-β a₁ a₂ private lemma : ∀ a₁ a₂ a₃ → ap f (link₀ a₁ a₂ ∙' link₀ a₂ a₃) == link₀* a₁ a₂ ∙' link₀* a₂ a₃ lemma a₁ a₂ a₃ = ap f (link₀ a₁ a₂ ∙' link₀ a₂ a₃) =⟨ ap-∙' f (link₀ a₁ a₂) (link₀ a₂ a₃) ⟩ ap f (link₀ a₁ a₂) ∙' ap f (link₀ a₂ a₃) =⟨ link₀-β a₁ a₂ |in-ctx (λ u → u ∙' ap f (link₀ a₂ a₃)) ⟩ link₀* a₁ a₂ ∙' ap f (link₀ a₂ a₃) =⟨ link₀-β a₂ a₃ |in-ctx (λ u → link₀* a₁ a₂ ∙' u) ⟩ link₀* a₁ a₂ ∙' link₀* a₂ a₃ ∎ -- I am a lazy person. postulate -- HIT link₁-β : ∀ a₁ a₂ a₃ → ap (ap f) (link₁ a₁ a₂ a₃) == (lemma a₁ a₂ a₃ ∙ link₁* a₁ a₂ a₃) ∙ (! $ link₀-β a₁ a₃) open TwoConstancyRec public using () renaming (f to TwoConstancy-rec)
{ "alphanum_fraction": 0.5379123584, "avg_line_length": 31.488372093, "ext": "agda", "hexsha": "2be56f33fdae85be8174e1786ac181a4cc719fda", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "939a2d83e090fcc924f69f7dfa5b65b3b79fe633", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "nicolaikraus/HoTT-Agda", "max_forks_repo_path": "experimental/TwoConstancyHIT.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "939a2d83e090fcc924f69f7dfa5b65b3b79fe633", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "nicolaikraus/HoTT-Agda", "max_issues_repo_path": "experimental/TwoConstancyHIT.agda", "max_line_length": 82, "max_stars_count": 1, "max_stars_repo_head_hexsha": "f8fa68bf753d64d7f45556ca09d0da7976709afa", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "UlrikBuchholtz/HoTT-Agda", "max_stars_repo_path": "experimental/TwoConstancyHIT.agda", "max_stars_repo_stars_event_max_datetime": "2021-06-30T00:17:55.000Z", "max_stars_repo_stars_event_min_datetime": "2021-06-30T00:17:55.000Z", "num_tokens": 1724, "size": 4062 }
{-# OPTIONS --cubical --safe #-} module Cubical.Data.Strict2Group.Explicit.Interface where open import Cubical.Foundations.Prelude open import Cubical.Data.Group.Base open import Cubical.Data.Sigma open import Cubical.Data.Strict2Group.Explicit.Base open import Cubical.Data.Strict2Group.Explicit.Notation module S2GInterface {ℓ : Level} ((strict2groupexp C₀ C₁ s t i ∘ si ti s∘ t∘ isMorph∘ assoc∘ lUnit∘ rUnit∘) : Strict2GroupExp ℓ) where open S2GBaseNotation C₀ C₁ s t i ∘ public module Identities1 where -- to be consistent with the other notation tarId = ti srcId = si -- identity is preserved by id id1₀≡1₁ : id 1₀ ≡ 1₁ id1₀≡1₁ = morphId {G = C₀} {H = C₁} i open Identities1 public module C₁×₀C₁ where -- the composable morphisms as record type record Co : Type ℓ where constructor co field g f : TC₁ coh : CohCond g f -- syntax 𝓁 𝓇 : Co → TC₁ 𝓁 = Co.g 𝓇 = Co.f 𝒸 : (gfc : Co) → CohCond (𝓁 gfc) (𝓇 gfc) 𝒸 = Co.coh -- compose a co object using ∘ ⊙ : Co → TC₁ ⊙ gfc = ∘ (𝓁 gfc) (𝓇 gfc) (𝒸 gfc) -- basically ∘, but for the sake of interfacing, we don't want to use ∘ ⊙' : (g f : TC₁) → CohCond g f → TC₁ ⊙' g f c = ⊙ (co g f c) -- interface for those names aswell src⊙ : (gfc : Co) → src (⊙ gfc) ≡ src (𝓇 gfc) src⊙ (co g f c) = s∘ g f c tar⊙ : (gfc : Co) → tar (⊙ gfc) ≡ tar (𝓁 gfc) tar⊙ (co g f c) = t∘ g f c src⊙' : (g f : TC₁) → (c : CohCond g f) → src (⊙' g f c) ≡ src f src⊙' g f c = src⊙ (co g f c) tar⊙' : (g f : TC₁) → (c : CohCond g f) → tar (⊙' g f c) ≡ tar g tar⊙' g f c = tar⊙ (co g f c) -- multiplication in C₁×₀C₁ _∙Co_ : (gfc gfc' : Co) → Co (co g f coh) ∙Co (co g' f' coh') = co (g ∙₁ g') (f ∙₁ f') (src∙₁ g g' ∙ cong (_∙₀ src g') coh ∙ cong (tar f ∙₀_) coh' ∙ sym (tar∙₁ f f')) -- unit element w.r.t. ∙c. Too bad there is no \_c 1c : Co 1c = co 1₁ 1₁ ((cong src (sym id1₀≡1₁)) ∙∙ si 1₀ ∙∙ sym (ti 1₀) ∙ cong tar id1₀≡1₁) -- the interchange law reformulated using ⊙ isMorph⊙ : (gfc gfc' : Co) → ⊙ (gfc ∙Co gfc') ≡ ⊙ gfc ∙₁ ⊙ gfc' isMorph⊙ (co _ _ c) (co _ _ c') = isMorph∘ c c' -- associator notation assoc⊙' : (h g f : TC₁) → (c : CohCond g f) → (c' : CohCond h g) → ⊙' (⊙' h g c') f ((src⊙' h g c') ∙ c) ≡ ⊙' h (⊙' g f c) (c' ∙ (sym (tar⊙' g f c))) assoc⊙' h g f c c' = assoc∘ c c' -- the left and right unit laws reformulated using ⊙ lUnit⊙ : (f : TC₁) → ⊙ (co (id (tar f)) f (srcId (tar f))) ≡ f lUnit⊙ = lUnit∘ rUnit⊙ : (f : TC₁) → ⊙ (co f (id (src f)) (sym (tarId (src f)))) ≡ f rUnit⊙ = rUnit∘ -- the path component of f in C₁ ΣC₁p : (f : TC₁) → Type ℓ ΣC₁p f = Σ[ f' ∈ TC₁ ] (f ≡ f') private -- for given g, the type of f that g can be precomposed with _∘* : TC₁ → Type ℓ g ∘* = Σ[ f ∈ TC₁ ] (CohCond g f) -- for given f, the type of g that f can be postcomposed with *∘_ : TC₁ → Type ℓ *∘ f = Σ[ g ∈ TC₁ ] (CohCond g f) -- alternate notation for ∘ -- this is used in ∘*≡ to λ-abstract in cong _∘*_ : (g : TC₁) (fc : g ∘*) → TC₁ _∘*_ g (f , c) = ∘ g f c _*∘_ : (f : TC₁) (gc : *∘ f) → TC₁ _*∘_ f (g , c) = ∘ g f c -- since we have proof irrelevance in C₀ we can show that f ≡ f' → g∘f ≡ g∘f' ∘*≡ : (g : TC₁) → (fc : g ∘*) → (f'p : ΣC₁p (fst fc)) → g ∘* fc ≡ g ∘* ((fst f'p) , snd fc ∙ cong tar (snd f'p)) ∘*≡ g fc f'p = cong (g ∘*_) (ΣPathP (snd f'p , isProp→PathP (λ j → Group.setStruc C₀ (src g) (tar (snd f'p j))) (snd fc) (snd fc ∙ cong tar (snd f'p)))) *∘≡ : (f : TC₁) → (gc : *∘ f) → (g'p : ΣC₁p (fst gc)) → f *∘ gc ≡ f *∘ (fst g'p , ((cong src (sym (snd g'p))) ∙ snd gc)) *∘≡ f gc g'p = cong (_*∘_ f) (ΣPathP ((snd g'p) , (isProp→PathP (λ j → Group.setStruc C₀ (src (snd g'p j)) (tar f)) (snd gc) (cong src (sym (snd g'p)) ∙ snd gc)))) -- ⊙ respecs paths on the right ⊙≡ : ((co g f c) : Co) → (f'p : ΣC₁p f) → ⊙ (co g f c) ≡ ⊙ (co g (fst f'p) (c ∙ (cong tar (snd f'p)))) ⊙≡ (co g f c) (f' , f≡f') = ∘*≡ g (f , c) (f' , f≡f') -- ⊙ respects paths on the left ≡⊙ : ((co g f c) : Co) → ((g' , g≡g') : ΣC₁p g) → ⊙ (co g f c) ≡ ⊙ (co g' f (cong src (sym g≡g') ∙ c)) ≡⊙ (co g f c) (g' , g≡g') = *∘≡ f (g , c) (g' , g≡g') -- ⊙ resepcts paths on the coherence condition ⊙≡c : ((co g f c) : Co) → (c' : CohCond g f) → ⊙ (co g f c) ≡ ⊙ (co g f c') ⊙≡c (co g f c) c' = cong (λ z → ⊙ (co g f z)) (Group.setStruc C₀ (src g) (tar f) c c') -- implicit version of ⊙≡c ⊙≡c~ : {g f : TC₁} (c c' : CohCond g f) → ⊙ (co g f c) ≡ ⊙ (co g f c') ⊙≡c~ {g} {f} c c' = cong (λ z → ⊙ (co g f z)) (Group.setStruc C₀ (src g) (tar f) c c') -- ⊙ respecting paths on the left also changes the coherence condition so this should be used instead ≡⊙c* : {g g' f : TC₁} (c : CohCond g f) (g≡g' : g ≡ g') (c' : CohCond g' f) → ⊙' g f c ≡ ⊙' g' f c' ≡⊙c* {g} {g'} {f} c g≡g' c' = (≡⊙ (co g f c) (g' , g≡g')) ∙ ⊙≡c~ ((cong src (sym g≡g')) ∙ c) c' -- ⊙ respecting paths on the right also changes the coherence condition so this should be used instead ⊙≡c* : {g f f' : TC₁} (c : CohCond g f) (f≡f' : f ≡ f') (c' : CohCond g f') → ⊙' g f c ≡ ⊙' g f' c' ⊙≡c* {g} {f} {f'} c f≡f' c' = (⊙≡ (co g f c) (f' , f≡f')) ∙ ⊙≡c~ (c ∙ cong tar f≡f') c' -- use the left and right unit law with an arbitrary coherence proof c lUnit⊙c : (f : TC₁) → (c : CohCond (id (tar f)) f) → ⊙ (co (id (tar f)) f c) ≡ f lUnit⊙c f c = (⊙≡c (co (id (tar f)) f c) (srcId (tar f))) ∙ (lUnit⊙ f) rUnit⊙c : (f : TC₁) → (c : CohCond f (id (src f))) → ⊙ (co f (id (src f)) c) ≡ f rUnit⊙c f c = (⊙≡c (co f (id (src f)) c) (sym (tarId (src f)))) ∙ (rUnit⊙ f) open C₁×₀C₁ public module Identities2 where -- source and target of unit element tar1₁≡1₀ : tar 1₁ ≡ 1₀ tar1₁≡1₀ = morphId {G = C₁} {H = C₀} t src1₁≡1₀ = morphId {G = C₁} {H = C₀} s -- taking the source is the same as the target of the identity of the source src≡tarIdSrc : (f : TC₁) → CohCond f (id (src f)) src≡tarIdSrc f = sym (ti (src f)) open Identities2 public
{ "alphanum_fraction": 0.5068625868, "avg_line_length": 39.9548387097, "ext": "agda", "hexsha": "c0c9fe57fcde8c9398a4e26799b814412de2d04b", "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": "c345dc0c49d3950dc57f53ca5f7099bb53a4dc3a", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "Schippmunk/cubical", "max_forks_repo_path": "Cubical/Data/Strict2Group/Explicit/Interface.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "c345dc0c49d3950dc57f53ca5f7099bb53a4dc3a", "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": "Schippmunk/cubical", "max_issues_repo_path": "Cubical/Data/Strict2Group/Explicit/Interface.agda", "max_line_length": 169, "max_stars_count": null, "max_stars_repo_head_hexsha": "c345dc0c49d3950dc57f53ca5f7099bb53a4dc3a", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "Schippmunk/cubical", "max_stars_repo_path": "Cubical/Data/Strict2Group/Explicit/Interface.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 2913, "size": 6193 }
open import FRP.LTL.ISet.Core using ( ISet ; ⌈_⌉ ; ⌊_⌋ ) open import FRP.LTL.RSet using ( RSet ) open import FRP.LTL.Time using ( Time ; _≤_ ) module FRP.LTL.ISet.Future where data Future (A : RSet) (t : Time) : Set where _,_ : ∀ {u} .(t≤u : t ≤ u) → A u → Future A t ◇ : ISet → ISet ◇ A = ⌈ Future ⌊ A ⌋ ⌉
{ "alphanum_fraction": 0.5884244373, "avg_line_length": 28.2727272727, "ext": "agda", "hexsha": "c2bb1fb65f7923aaa7d5a017bd38fef06ba2c24a", "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/ISet/Future.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/ISet/Future.agda", "max_line_length": 56, "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/ISet/Future.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": 140, "size": 311 }
module WarningOnUsage2 where open import WarningOnUsage λx→x₂ = λx→x
{ "alphanum_fraction": 0.8028169014, "avg_line_length": 11.8333333333, "ext": "agda", "hexsha": "ebf3997f9e1afc01459ae595488815c8b0fa3b37", "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/WarningOnUsage2.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/WarningOnUsage2.agda", "max_line_length": 28, "max_stars_count": 1989, "max_stars_repo_head_hexsha": "ed8ac6f4062ea8a20fa0f62d5db82d4e68278338", "max_stars_repo_licenses": [ "BSD-3-Clause" ], "max_stars_repo_name": "shlevy/agda", "max_stars_repo_path": "test/Succeed/WarningOnUsage2.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": 24, "size": 71 }
{-# OPTIONS --without-K --rewriting #-} open import lib.Basics open import lib.NConnected open import lib.NType2 open import lib.types.FunctionSeq open import lib.types.Span open import lib.types.Pointed open import lib.types.Pushout open import lib.types.PushoutFlip open import lib.types.PushoutFmap open import lib.types.PushoutFlattening open import lib.types.Unit open import lib.types.Paths open import lib.types.Pi open import lib.types.Truncation open import lib.types.Lift open import lib.cubical.Cube open import lib.cubical.Square -- Suspension is defined as a particular case of pushout module lib.types.Suspension.Core where module _ {i} (A : Type i) where susp-span : Span susp-span = span Unit Unit A (λ _ → tt) (λ _ → tt) Susp : Type i Susp = Pushout susp-span -- [north'] and [south'] explictly ask for [A] north' : Susp north' = left tt south' : Susp south' = right tt module _ {i} {A : Type i} where north : Susp A north = north' A south : Susp A south = south' A merid : A → north == south merid x = glue x module SuspElim {j} {P : Susp A → Type j} (n : P north) (s : P south) (p : (x : A) → n == s [ P ↓ merid x ]) where private module P = PushoutElim (λ _ → n) (λ _ → s) p abstract f : Π (Susp A) P f = P.f north-β : f north ↦ n north-β = P.left-β unit {-# REWRITE north-β #-} south-β : f south ↦ s south-β = P.right-β unit {-# REWRITE south-β #-} merid-β : ∀ a → apd f (merid a) == p a merid-β = P.glue-β open SuspElim public using () renaming (f to Susp-elim) module SuspRec {j} {C : Type j} (n s : C) (p : A → n == s) where private module P = PushoutRec {d = susp-span A} (λ _ → n) (λ _ → s) p abstract f : Susp A → C f = P.f north-β : f north ↦ n north-β = P.left-β unit {-# REWRITE north-β #-} south-β : f south ↦ s south-β = P.right-β unit {-# REWRITE south-β #-} merid-β : ∀ a → ap f (merid a) == p a merid-β = P.glue-β open SuspRec public using () renaming (f to Susp-rec) module SuspRecType {j} (n s : Type j) (p : A → n ≃ s) = PushoutRecType {d = susp-span A} (λ _ → n) (λ _ → s) p module SuspPathElim {i} {j} {A : Type i} {B : Type j} (f g : Susp A → B) (n : f north == g north) (s : f south == g south) (m : ∀ a → Square n (ap f (merid a)) (ap g (merid a)) s) where private module M = SuspElim {P = λ sa → f sa == g sa} n s (λ a → ↓-='-from-square (m a)) open M public merid-square-β : ∀ a → natural-square M.f (merid a) == m a merid-square-β a = natural-square-β M.f (merid a) (M.merid-β a) module SuspDoublePathElim {i} {j} {k} {A : Type i} {B : Type j} {C : Type k} (f g : Susp A → Susp B → C) (n-n : f north north == g north north) (n-s : f north south == g north south) (s-n : f south north == g south north) (s-s : f south south == g south south) (n-m : ∀ b → Square n-n (ap (f north) (merid b)) (ap (g north) (merid b)) n-s) (s-m : ∀ b → Square s-n (ap (f south) (merid b)) (ap (g south) (merid b)) s-s) (m-n : ∀ a → Square n-n (ap (λ sa → f sa north) (merid a)) (ap (λ sa → g sa north) (merid a)) s-n) (m-s : ∀ a → Square n-s (ap (λ sa → f sa south) (merid a)) (ap (λ sa → g sa south) (merid a)) s-s) (m-m : ∀ a b → Cube (m-n a) (m-s a) (n-m b) (natural-square (λ sb → ap (λ sa → f sa sb) (merid a)) (merid b)) (natural-square (λ sb → ap (λ sa → g sa sb) (merid a)) (merid b)) (s-m b)) where private module N = SuspElim {P = λ sb → f north sb == g north sb} n-n n-s (λ b → ↓-='-from-square (n-m b)) n-natural-square : ∀ (b : B) → natural-square N.f (merid b) == n-m b n-natural-square b = natural-square-β N.f (merid b) (N.merid-β b) module S = SuspElim {P = λ sb → f south sb == g south sb} s-n s-s (λ b → ↓-='-from-square (s-m b)) s-natural-square : ∀ (b : B) → natural-square S.f (merid b) == s-m b s-natural-square b = natural-square-β S.f (merid b) (S.merid-β b) module M (sb : Susp B) = SuspElim {A = A} {P = λ sa → f sa sb == g sa sb} (N.f sb) (S.f sb) (λ a → Susp-elim {P = λ sb → N.f sb == S.f sb [ (λ sa → f sa sb == g sa sb) ↓ merid a ]} (↓-='-from-square (m-n a)) (↓-='-from-square (m-s a)) (λ b → ap↓ ↓-='-from-square $ cube-to-↓-square $ cube-shift-back (! (n-natural-square b)) $ cube-shift-front (! (s-natural-square b)) $ m-m a b) sb) abstract p : ∀ sa sb → f sa sb == g sa sb p sa sb = M.f sb sa north-north-β : p north north ↦ n-n north-north-β = N.north-β {-# REWRITE north-north-β #-} north-south-β : p north south ↦ n-s north-south-β = N.south-β {-# REWRITE north-south-β #-} south-north-β : p south north ↦ s-n south-north-β = S.north-β {-# REWRITE south-north-β #-} south-south-β : p south south ↦ s-s south-south-β = S.south-β {-# REWRITE south-south-β #-} north-merid-β : ∀ b → apd (p north) (merid b) == ↓-='-from-square (n-m b) north-merid-β = N.merid-β north-merid-square-β : ∀ b → natural-square (p north) (merid b) == n-m b north-merid-square-β b = natural-square-β (p north) (merid b) (north-merid-β b) south-merid-β : ∀ b → apd (p south) (merid b) == ↓-='-from-square (s-m b) south-merid-β = S.merid-β south-merid-square-β : ∀ b → natural-square (p south) (merid b) == s-m b south-merid-square-β b = natural-square-β (p south) (merid b) (south-merid-β b) merid-north-β : ∀ a → apd (λ sa → p sa north) (merid a) == ↓-='-from-square (m-n a) merid-north-β = M.merid-β north merid-north-square-β : ∀ a → natural-square (λ sa → p sa north) (merid a) == m-n a merid-north-square-β a = natural-square-β (λ sa → p sa north) (merid a) (merid-north-β a) merid-south-β : ∀ a → apd (λ sa → p sa south) (merid a) == ↓-='-from-square (m-s a) merid-south-β = M.merid-β south merid-south-square-β : ∀ a → natural-square (λ sa → p sa south) (merid a) == m-s a merid-south-square-β a = natural-square-β (λ sa → p sa south) (merid a) (merid-south-β a) susp-⊙span : ∀ {i} → Ptd i → ⊙Span susp-⊙span X = ⊙span ⊙Unit ⊙Unit X (⊙cst {X = X}) (⊙cst {X = X}) ⊙Susp : ∀ {i} → Type i → Ptd i ⊙Susp A = ⊙[ Susp A , north ] σloop : ∀ {i} (X : Ptd i) → de⊙ X → north' (de⊙ X) == north' (de⊙ X) σloop ⊙[ _ , x₀ ] x = merid x ∙ ! (merid x₀) σloop-pt : ∀ {i} {X : Ptd i} → σloop X (pt X) == idp σloop-pt {X = ⊙[ _ , x₀ ]} = !-inv-r (merid x₀) ⊙σloop : ∀ {i} (X : Ptd i) → X ⊙→ ⊙[ north' (de⊙ X) == north' (de⊙ X) , idp ] ⊙σloop X = σloop X , σloop-pt module _ {i j} where module SuspFmap {A : Type i} {B : Type j} (f : A → B) = SuspRec north south (merid ∘ f) Susp-fmap : {A : Type i} {B : Type j} (f : A → B) → (Susp A → Susp B) Susp-fmap = SuspFmap.f ⊙Susp-fmap : {A : Type i} {B : Type j} (f : A → B) → ⊙Susp A ⊙→ ⊙Susp B ⊙Susp-fmap f = (Susp-fmap f , idp) module _ {i} (A : Type i) where Susp-fmap-idf : ∀ a → Susp-fmap (idf A) a == a Susp-fmap-idf = Susp-elim idp idp $ λ a → ↓-='-in' (ap-idf (merid a) ∙ ! (SuspFmap.merid-β (idf A) a)) ⊙Susp-fmap-idf : ⊙Susp-fmap (idf A) ◃⊙idf =⊙∘ ⊙idf-seq ⊙Susp-fmap-idf = =⊙∘-in (⊙λ=' Susp-fmap-idf idp) transport-Susp : ∀ {i} {A B : Type i} (p : A == B) → transport Susp p ∼ Susp-fmap (coe p) transport-Susp {i} {A} {.A} p@idp sa = ! (Susp-fmap-idf A sa) ⊙transport-⊙Susp : ∀ {i} {A B : Type i} (p : A == B) → ⊙transport ⊙Susp p == ⊙Susp-fmap (coe p) ⊙transport-⊙Susp {i} {A} {.A} p@idp = ! (=⊙∘-out (⊙Susp-fmap-idf A)) module _ {i} {A : Type i} where Susp-fmap-cst : ∀ {j} {B : Type j} (b : B) (a : Susp A) → Susp-fmap (cst b) a == north Susp-fmap-cst b = Susp-elim idp (! (merid b)) $ (λ a → ↓-app=cst-from-square $ SuspFmap.merid-β (cst b) a ∙v⊡ tr-square _) ⊙Susp-fmap-cst : ∀ {j} {Y : Ptd j} → ⊙Susp-fmap {A = A} (λ _ → pt Y) == ⊙cst ⊙Susp-fmap-cst = ⊙λ=' (Susp-fmap-cst _) idp Susp-fmap-∘ : ∀ {i j k} {A : Type i} {B : Type j} {C : Type k} (g : B → C) (f : A → B) (σ : Susp A) → Susp-fmap (g ∘ f) σ == Susp-fmap g (Susp-fmap f σ) Susp-fmap-∘ g f = Susp-elim idp idp (λ a → ↓-='-in' $ ap-∘ (Susp-fmap g) (Susp-fmap f) (merid a) ∙ ap (ap (Susp-fmap g)) (SuspFmap.merid-β f a) ∙ SuspFmap.merid-β g (f a) ∙ ! (SuspFmap.merid-β (g ∘ f) a)) ⊙Susp-fmap-∘ : ∀ {i j k} {A : Type i} {B : Type j} {C : Type k} (g : B → C) (f : A → B) → ⊙Susp-fmap (g ∘ f) == ⊙Susp-fmap g ⊙∘ ⊙Susp-fmap f ⊙Susp-fmap-∘ g f = ⊙λ=' (Susp-fmap-∘ g f) idp ⊙Susp-fmap-seq : ∀ {i} {A B : Type i} → (A –→ B) → ⊙Susp A ⊙–→ ⊙Susp B ⊙Susp-fmap-seq idf-seq = ⊙idf-seq ⊙Susp-fmap-seq (f ◃∘ fs) = ⊙Susp-fmap f ◃⊙∘ ⊙Susp-fmap-seq fs abstract ⊙Susp-fmap-seq-∘ : ∀ {i} {A B : Type i} (fs : A –→ B) → ⊙Susp-fmap (compose fs) ◃⊙idf =⊙∘ ⊙Susp-fmap-seq fs ⊙Susp-fmap-seq-∘ idf-seq = ⊙Susp-fmap-idf _ ⊙Susp-fmap-seq-∘ (f ◃∘ fs) = =⊙∘-in $ ⊙Susp-fmap (f ∘ compose fs) =⟨ ⊙Susp-fmap-∘ f (compose fs) ⟩ ⊙Susp-fmap f ⊙∘ ⊙Susp-fmap (compose fs) =⟨ ap (⊙Susp-fmap f ⊙∘_) (=⊙∘-out (⊙Susp-fmap-seq-∘ fs)) ⟩ ⊙Susp-fmap f ⊙∘ ⊙compose (⊙Susp-fmap-seq fs) =∎ ⊙Susp-fmap-seq-=⊙∘ : ∀ {i} {A B : Type i} {fs gs : A –→ B} → fs =∘ gs → ⊙Susp-fmap-seq fs =⊙∘ ⊙Susp-fmap-seq gs ⊙Susp-fmap-seq-=⊙∘ {fs = fs} {gs = gs} p = ⊙Susp-fmap-seq fs =⊙∘⟨ !⊙∘ (⊙Susp-fmap-seq-∘ fs) ⟩ ⊙Susp-fmap (compose fs) ◃⊙idf =⊙∘₁⟨ ap ⊙Susp-fmap (=∘-out p) ⟩ ⊙Susp-fmap (compose gs) ◃⊙idf =⊙∘⟨ ⊙Susp-fmap-seq-∘ gs ⟩ ⊙Susp-fmap-seq gs ∎⊙∘ {- Extract the 'glue component' of a pushout -} module _ {i j k} {s : Span {i} {j} {k}} where module ExtractGlue = PushoutRec {d = s} {D = Susp (Span.C s)} (λ _ → north) (λ _ → south) merid extract-glue = ExtractGlue.f module _ {x₀ : Span.A s} where ⊙extract-glue : ⊙[ Pushout s , left x₀ ] ⊙→ ⊙[ Susp (Span.C s) , north ] ⊙extract-glue = extract-glue , idp module _ {i j} {A : Type i} {B : Type j} (eq : A ≃ B) where Susp-emap : Susp A ≃ Susp B Susp-emap = equiv (Susp-fmap (–> eq)) (Susp-fmap (<– eq)) (λ sb → Susp-fmap (–> eq) (Susp-fmap (<– eq) sb) =⟨ ! (Susp-fmap-∘ (–> eq) (<– eq) sb) ⟩ Susp-fmap ((–> eq) ∘ (<– eq)) sb =⟨ ap (λ f → Susp-fmap f sb) (λ= (<–-inv-r eq)) ⟩ Susp-fmap (idf B) sb =⟨ Susp-fmap-idf _ sb ⟩ sb =∎) (λ sa → Susp-fmap (<– eq) (Susp-fmap (–> eq) sa) =⟨ ! (Susp-fmap-∘ (<– eq) (–> eq) sa) ⟩ Susp-fmap ((<– eq) ∘ (–> eq)) sa =⟨ ap (λ f → Susp-fmap f sa) (λ= (<–-inv-l eq)) ⟩ Susp-fmap (idf A) sa =⟨ Susp-fmap-idf _ sa ⟩ sa =∎) private -- This is to make sure that we did not screw up [Susp-emap]. test₀ : fst Susp-emap == Susp-fmap (fst eq) test₀ = idp module _ {i j} {A : Type i} {B : Type j} where ⊙Susp-emap : A ≃ B → ⊙Susp A ⊙≃ ⊙Susp B ⊙Susp-emap eq = ≃-to-⊙≃ (Susp-emap eq) idp {- Interaction with [Lift] -} module _ {i j} (A : Type i) where Susp-Lift-econv : Susp (Lift {j = j} A) ≃ Lift {j = j} (Susp A) Susp-Lift-econv = lift-equiv ∘e Susp-emap lower-equiv Susp-Lift-conv : Susp (Lift {j = j} A) == Lift {j = j} (Susp A) Susp-Lift-conv = ua Susp-Lift-econv module _ {i j} (A : Type i) where ⊙Susp-Lift-econv : ⊙Susp (Lift {j = j} A) ⊙≃ ⊙Lift {j = j} (⊙Susp A) ⊙Susp-Lift-econv = ⊙lift-equiv {j = j} ⊙∘e ⊙Susp-emap {A = Lift {j = j} A} {B = A} lower-equiv ⊙Susp-Lift-conv : ⊙Susp (Lift {j = j} A) == ⊙Lift {j = j} (⊙Susp A) ⊙Susp-Lift-conv = ⊙ua ⊙Susp-Lift-econv {- Suspension of an n-connected space is n+1-connected -} abstract Susp-conn : ∀ {i} {A : Type i} {n : ℕ₋₂} → is-connected n A → is-connected (S n) (Susp A) Susp-conn {A = A} {n = n} cA = has-level-in ([ north ] , Trunc-elim (Susp-elim idp (Trunc-rec (λ a → ap [_] (merid a)) (contr-center cA)) (λ x → Trunc-elim {P = λ y → idp == Trunc-rec (λ a → ap [_] (merid a)) y [ (λ z → [ north ] == [ z ]) ↓ (merid x) ]} {{λ _ → ↓-preserves-level ⟨⟩}} (λ x' → ↓-cst=app-in (∙'-unit-l _ ∙ mers-eq n x x')) (contr-center cA)))) where instance _ = cA mers-eq : ∀ {i} {A : Type i} (n : ℕ₋₂) {{_ : is-connected n A}} → (x x' : A) → ap ([_] {n = S n}) (merid x) == Trunc-rec {{has-level-apply (Trunc-level {n = S n}) _ _}} (λ a → ap [_] (merid a)) [ x' ] mers-eq ⟨-2⟩ x x' = contr-has-all-paths _ _ mers-eq {A = A} (S n) x x' = conn-extend (pointed-conn-out A x) (λ y → ((ap [_] (merid x) == ap [_] (merid y)) , has-level-apply (has-level-apply (Trunc-level {n = S (S n)}) _ _) _ _)) (λ _ → idp) x'
{ "alphanum_fraction": 0.5152399232, "avg_line_length": 30.86492891, "ext": "agda", "hexsha": "f667ef5449a7148b8dda6f0dd27739fb78ab7b51", "lang": "Agda", "max_forks_count": 50, "max_forks_repo_forks_event_max_datetime": "2022-02-14T03:03:25.000Z", "max_forks_repo_forks_event_min_datetime": "2015-01-10T01:48:08.000Z", "max_forks_repo_head_hexsha": "1037d82edcf29b620677a311dcfd4fc2ade2faa6", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "AntoineAllioux/HoTT-Agda", "max_forks_repo_path": "core/lib/types/Suspension/Core.agda", "max_issues_count": 31, "max_issues_repo_head_hexsha": "1037d82edcf29b620677a311dcfd4fc2ade2faa6", "max_issues_repo_issues_event_max_datetime": "2021-10-03T19:15:25.000Z", "max_issues_repo_issues_event_min_datetime": "2015-03-05T20:09:00.000Z", "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "AntoineAllioux/HoTT-Agda", "max_issues_repo_path": "core/lib/types/Suspension/Core.agda", "max_line_length": 100, "max_stars_count": 294, "max_stars_repo_head_hexsha": "1037d82edcf29b620677a311dcfd4fc2ade2faa6", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "AntoineAllioux/HoTT-Agda", "max_stars_repo_path": "core/lib/types/Suspension/Core.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": 5390, "size": 13025 }
-- Type interpretation and soundness of typing. -- Proof of strong normalization for well-typed terms. module Soundness where open import Library open import Terms open import Substitution open import SN open import SN.AntiRename open import DeclSN using (sn; fromSN) open import SAT3 -- Type interpretation ⟦_⟧ : (a : Ty) → SAT a ⟦ base ⟧ = ⟦⊥⟧ ⟦ a →̂ b ⟧ = ⟦ a ⟧ ⟦→⟧ ⟦ b ⟧ -- Context interpretation (semantic substitutions) ⟦_⟧C : ∀ Γ → ∀ {Δ} (σ : Subst Γ Δ) → Set ⟦ Γ ⟧C σ = ∀ {a} (x : Var Γ a) → σ x ∈ ⟦ a ⟧ Ext : ∀ {a Δ Γ} {t : Tm Δ a} → (𝒕 : t ∈ (⟦ a ⟧)) → ∀ {σ : Subst Γ Δ} (θ : ⟦ Γ ⟧C σ) → ⟦ a ∷ Γ ⟧C (t ∷s σ) Ext {a} 𝒕 θ (zero) = 𝒕 Ext {a} 𝒕 θ (suc x) = θ x Rename : ∀ {Δ Δ'} → (ρ : Ren Δ Δ') → ∀ {Γ}{σ : Subst Γ Δ} (θ : ⟦ Γ ⟧C σ) → ⟦ Γ ⟧C (ρ •s σ) Rename ρ θ {a} x = ↿ SAT.satRename ⟦ a ⟧ ρ (⇃ θ x) sound : ∀ {a Γ} (t : Tm Γ a) {Δ} {σ : Subst Γ Δ} → (θ : ⟦ Γ ⟧C σ) → subst σ t ∈ (⟦ a ⟧) sound (var x) θ = θ x sound (abs t) {σ = σ} θ = ⟦abs⟧ {𝓐 = ⟦ _ ⟧} {𝓑 = ⟦ _ ⟧} (λ ρ {u} 𝑢 → let open ≡-Reasoning eq : subst (u ∷s (ρ •s σ)) t ≡ subst0 u (subst (lifts ρ) (subst (lifts σ) t)) eq = begin subst (u ∷s (ρ •s σ)) t ≡⟨ subst-ext (cons-to-sgs u _) t ⟩ subst (sgs u •s lifts (ρ •s σ)) t ≡⟨ subst-∙ _ _ t ⟩ subst0 u (subst (lifts (ρ •s σ)) t) ≡⟨ ≡.cong (subst0 u) (subst-ext (lifts-∙ ρ σ) t) ⟩ subst0 u (subst (lifts ρ •s lifts σ) t) ≡⟨ ≡.cong (subst0 u) (subst-∙ (lifts ρ) (lifts σ) t) ⟩ subst0 u (subst (lifts ρ) (subst (lifts σ) t)) ∎ in (≡.subst (_∈ ⟦ _ ⟧) eq (↿ (⇃ sound t (Ext (↿ (⇃ 𝑢)) ((Rename ρ θ))))))) sound (app t u) θ = ↿ (⇃ ⟦app⟧ {𝓐 = ⟦ _ ⟧} {𝓑 = ⟦ _ ⟧} (sound t θ) (↿ (⇃ sound u θ))) -- Identity environment. id-θ : ∀{Γ} → ⟦ Γ ⟧C ids id-θ {Γ} {a} x = ⟦var⟧ ⟦ a ⟧ x -- Any well-typed term inhabits its semantic type. sound' : ∀ {a Γ} (t : Tm Γ a) → t ∈ ⟦ a ⟧ sound' t rewrite ≡.sym (subst-id {vt = `Tm} t) = sound t id-θ -- Any well-typed term is strongly normalizing. strong-normalization : ∀ a {Γ} (t : Tm Γ a) → sn t strong-normalization a t = fromSN (satSN ⟦ a ⟧ (⇃ sound' t)) -- Q.E.D.
{ "alphanum_fraction": 0.4861678005, "avg_line_length": 26.8902439024, "ext": "agda", "hexsha": "36243774e22a30d7c6b90f02c705e33eadbe8f70", "lang": "Agda", "max_forks_count": 4, "max_forks_repo_forks_event_max_datetime": "2018-02-23T18:22:17.000Z", "max_forks_repo_forks_event_min_datetime": "2017-11-10T16:44:52.000Z", "max_forks_repo_head_hexsha": "79d97481f3312c2d30a823c3b1bcb8ae871c2fe2", "max_forks_repo_licenses": [ "Unlicense" ], "max_forks_repo_name": "ryanakca/strong-normalization", "max_forks_repo_path": "agda-aplas14/Soundness.agda", "max_issues_count": 2, "max_issues_repo_head_hexsha": "79d97481f3312c2d30a823c3b1bcb8ae871c2fe2", "max_issues_repo_issues_event_max_datetime": "2018-02-20T14:54:18.000Z", "max_issues_repo_issues_event_min_datetime": "2018-02-14T16:42:36.000Z", "max_issues_repo_licenses": [ "Unlicense" ], "max_issues_repo_name": "ryanakca/strong-normalization", "max_issues_repo_path": "agda-aplas14/Soundness.agda", "max_line_length": 87, "max_stars_count": 32, "max_stars_repo_head_hexsha": "79d97481f3312c2d30a823c3b1bcb8ae871c2fe2", "max_stars_repo_licenses": [ "Unlicense" ], "max_stars_repo_name": "ryanakca/strong-normalization", "max_stars_repo_path": "agda-aplas14/Soundness.agda", "max_stars_repo_stars_event_max_datetime": "2021-03-05T12:12:03.000Z", "max_stars_repo_stars_event_min_datetime": "2017-05-22T14:33:27.000Z", "num_tokens": 1029, "size": 2205 }
{-# OPTIONS --safe #-} module Cubical.Homotopy.Hopf where open import Cubical.Homotopy.HSpace open import Cubical.Foundations.Prelude open import Cubical.Foundations.HLevels open import Cubical.Foundations.Transport open import Cubical.Foundations.Function open import Cubical.Foundations.Pointed open import Cubical.Foundations.Isomorphism open import Cubical.Foundations.GroupoidLaws open import Cubical.Foundations.Equiv open import Cubical.Foundations.Univalence open import Cubical.Data.Sigma open import Cubical.Data.Unit open import Cubical.Data.Int hiding (_·_) open import Cubical.HITs.Pushout.Flattening open import Cubical.HITs.Pushout open import Cubical.HITs.Sn hiding (joinS¹S¹→S³) open import Cubical.HITs.Susp open import Cubical.HITs.S1 open import Cubical.HITs.S2 open import Cubical.HITs.S3 open import Cubical.HITs.PropositionalTruncation renaming (rec to pRec ; elim to pElim) open import Cubical.HITs.Join open import Cubical.HITs.Interval renaming ( zero to I0 ; one to I1 ) open Iso open HSpace open AssocHSpace private retEq≡secEq : ∀ {ℓ} {A B : Type ℓ} (e : A ≃ B) → (x : _) → secEq e (e .fst x) ≡ cong (e .fst) (retEq e x) retEq≡secEq {A = A} = EquivJ (λ B e → (x : _) → secEq e (e .fst x) ≡ cong (e .fst) (retEq e x)) λ _ → refl module Hopf {ℓ : Level} {A : Pointed ℓ} {e : HSpace A} (e-ass : AssocHSpace e) (conA : ((x y : typ A) → ∥ x ≡ y ∥)) where isEquiv-μ : (x : typ A) → isEquiv (λ z → (μ e z x)) isEquiv-μ x = pRec (isPropIsEquiv _) (J (λ x _ → isEquiv (λ z → μ e z x)) (subst isEquiv (funExt (λ z → sym (μᵣ e z))) (idIsEquiv (typ A)))) (conA (pt A) x) isEquiv-μ' : (x : typ A) → isEquiv (μ e x) isEquiv-μ' x = pRec (isPropIsEquiv _) (J (λ x _ → isEquiv (μ e x)) (subst isEquiv (funExt (λ x → sym (μₗ e x))) (idIsEquiv (typ A)))) (conA (pt A) x) μ-eq : (x : typ A) → typ A ≃ typ A μ-eq x = (λ z → μ e z x) , (isEquiv-μ x) μ-eq' : (x : typ A) → typ A ≃ typ A μ-eq' x = μ e x , isEquiv-μ' x Hopf : Susp (typ A) → Type ℓ Hopf north = typ A Hopf south = typ A Hopf (merid a i₁) = ua (μ-eq a) i₁ TotalSpaceHopfPush : Type _ TotalSpaceHopfPush = Pushout {A = typ A × typ A} fst λ x → μ e (fst x) (snd x) TotalSpaceHopfPush→TotalSpace : TotalSpaceHopfPush → Σ[ x ∈ Susp (typ A) ] Hopf x TotalSpaceHopfPush→TotalSpace (inl x) = north , x TotalSpaceHopfPush→TotalSpace (inr x) = south , x TotalSpaceHopfPush→TotalSpace (push (x , y) i₁) = merid y i₁ , ua-gluePt (μ-eq y) i₁ x joinIso₁ : Iso (TotalSpaceHopfPush) (join (typ A) (typ A)) joinIso₁ = theIso where F : TotalSpaceHopfPush → join (typ A) (typ A) F (inl x) = inl x F (inr x) = inr x F (push (a , x) i) = push a (μ e a x) i G : join (typ A) (typ A) → TotalSpaceHopfPush G (inl x) = inl x G (inr x) = inr x G (push a b i) = (push (a , invEq (μ-eq' a) b) ∙ cong inr (secEq (μ-eq' a) b)) i s : section F G s (inl x) = refl s (inr x) = refl s (push a b i) j = hcomp (λ k → λ { (i = i0) → inl a ; (i = i1) → inr (secEq (μ-eq' a) b (j ∨ k)) ; (j = i0) → F (compPath-filler (push (a , invEq (μ-eq' a) b)) (cong inr (secEq (μ-eq' a) b)) k i) ; (j = i1) → push a b i}) (hcomp (λ k → λ { (i = i0) → inl a ; (i = i1) → inr (secEq (μ-eq' a) b (~ k ∨ j)) ; (j = i0) → push a (secEq (μ-eq' a) b (~ k)) i ; (j = i1) → push a b i}) (push a b i)) r : retract F G r (inl x) = refl r (inr x) = refl r (push (x , y) i) j = hcomp (λ k → λ { (i = i0) → inl x ; (i = i1) → inr (μ e x y) ; (j = i0) → (push (x , invEq (μ-eq' x) (μ e x y)) ∙ (λ i₁ → inr (retEq≡secEq (μ-eq' x) y (~ k) i₁))) i ; (j = i1) → push (x , y) i}) (hcomp (λ k → λ { (i = i0) → inl x ; (i = i1) → inr (μ e x (retEq (μ-eq' x) y k)) ; (j = i1) → push (x , retEq (μ-eq' x) y k) i}) ((push (x , invEq (μ-eq' x) (μ e x y))) i)) theIso : Iso TotalSpaceHopfPush (join (typ A) (typ A)) fun theIso = F inv theIso = G rightInv theIso = s leftInv theIso = r isEquivTotalSpaceHopfPush→TotalSpace : isEquiv TotalSpaceHopfPush→TotalSpace isEquivTotalSpaceHopfPush→TotalSpace = isoToIsEquiv theIso where inv' : _ → _ inv' (north , y) = inl y inv' (south , y) = inr y inv' (merid a i , y) = hcomp (λ k → λ { (i = i0) → push (y , a) (~ k) ; (i = i1) → inr y}) (inr (ua-unglue (μ-eq a) i y)) where pp : PathP (λ i → ua (μ-eq a) i → TotalSpaceHopfPush) inl inr pp = ua→ {e = μ-eq a} {B = λ _ → TotalSpaceHopfPush} λ b → push (b , a) sect : (x : _) → TotalSpaceHopfPush→TotalSpace (inv' x) ≡ x sect (north , x) = refl sect (south , x) = refl sect (merid a i , y) j = hcomp (λ k → λ { (i = i0) → merid a (~ k ∧ ~ j) , ua-gluePt (μ-eq a) (~ k ∧ ~ j) y ; (i = i1) → south , y ; (j = i0) → TotalSpaceHopfPush→TotalSpace (hfill (λ k → λ { (i = i0) → push (y , a) (~ k) ; (i = i1) → inr y}) (inS (inr (ua-unglue (μ-eq a) i y))) k) ; (j = i1) → merid a i , y}) ((merid a (i ∨ ~ j)) , lem (μ-eq a) i j y) where lem : ∀ {ℓ} {A B : Type ℓ} (e : A ≃ B) → PathP (λ i → PathP (λ j → (y : ua e i) → ua e (i ∨ ~ j)) (λ y → ua-unglue e i y) λ y → y) (λ j y → ua-gluePt e (~ j) y) refl lem {A = A} {B = B} = EquivJ (λ B e → PathP (λ i → PathP (λ j → (y : ua e i) → ua e (i ∨ ~ j)) (λ y → ua-unglue e i y) λ y → y) (λ j y → ua-gluePt e (~ j) y) refl) λ i j a → ua-gluePt (idEquiv B) (i ∨ ~ j) (ua-unglue (idEquiv B) i a) retr : retract TotalSpaceHopfPush→TotalSpace inv' retr (inl x) = refl retr (inr x) = refl retr (push (x , y) i) j = hcomp (λ k → λ { (i = i0) → push (x , y) (~ k) ; (i = i1) → inr (μ e x y) ; (j = i1) → push (x , y) (i ∨ ~ k)}) (inr (μ e x y)) theIso : Iso TotalSpaceHopfPush (Σ (Susp (typ A)) Hopf) fun theIso = TotalSpaceHopfPush→TotalSpace inv theIso = inv' rightInv theIso = sect leftInv theIso = retr IsoTotalSpaceJoin : Iso (Σ[ x ∈ Susp (typ A) ] Hopf x) (join (typ A) (typ A)) IsoTotalSpaceJoin = compIso (equivToIso (invEquiv (_ , isEquivTotalSpaceHopfPush→TotalSpace))) joinIso₁ induced : TotalSpaceHopfPush → Susp (typ A) induced = fst ∘ TotalSpaceHopfPush→TotalSpace ua-lem : (x y z : typ A) → (i j : I) → ua (μ-eq y) i ua-lem x y z i j = fill (λ k → ua (μ-eq y) i) (λ j → λ { (i = i0) → μ e z x ; (i = i1) → μ-assoc e-ass z x y j}) (inS (ua-gluePt (μ-eq y) i (μ e z x))) j TotalSpaceHopfPush→≃Hopf : (x : TotalSpaceHopfPush) → typ A ≃ Hopf (induced x) TotalSpaceHopfPush→≃Hopf (inl x) = μ-eq x TotalSpaceHopfPush→≃Hopf (inr x) = μ-eq x TotalSpaceHopfPush→≃Hopf (push (x , y) i₁) = pp x y i₁ where pp : (x y : _) → PathP (λ i → typ A ≃ ua (μ-eq y) i) (μ-eq x) (μ-eq (μ e x y)) pp x y = ΣPathP (P , help) where P : PathP (λ z → typ A → ua (μ-eq y) z) (fst (μ-eq x)) (fst (μ-eq (μ e x y))) P i z = ua-lem x y z i i1 abstract help : PathP (λ i₂ → isEquiv (P i₂)) (snd (μ-eq x)) (snd (μ-eq (μ e x y))) help = toPathP (isPropIsEquiv _ _ _) Push→TotalSpaceHopf : (a : typ A) (x : TotalSpaceHopfPush) → Σ[ x ∈ Susp (typ A) ] Hopf x Push→TotalSpaceHopf a x = (induced x) , fst (TotalSpaceHopfPush→≃Hopf x) a Push→TotalSpaceHopf-equiv : (a : typ A) → isEquiv (Push→TotalSpaceHopf a) Push→TotalSpaceHopf-equiv a = pRec (isPropIsEquiv _) (J (λ a _ → isEquiv (Push→TotalSpaceHopf a)) (subst isEquiv (sym main) isEquivTotalSpaceHopfPush→TotalSpace)) (conA (pt A) a) where lem₁ : (x : _) → fst ((Push→TotalSpaceHopf (pt A)) x) ≡ fst (TotalSpaceHopfPush→TotalSpace x) lem₁ (inl x) = refl lem₁ (inr x) = refl lem₁ (push a i) = refl lem₂ : (x : _) → PathP (λ i → Hopf (lem₁ x i)) (snd ((Push→TotalSpaceHopf (pt A)) x)) (snd (TotalSpaceHopfPush→TotalSpace x)) lem₂ (inl x) = μₗ e x lem₂ (inr x) = μₗ e x lem₂ (push (x , y) i) j = hcomp (λ k → λ {(i = i0) → μₗ e x j ; (i = i1) → μ-assoc-filler e-ass x y j k ; (j = i0) → ua-lem x y (pt A) i k ; (j = i1) → ua-gluePt (μ-eq y) i x}) (ua-gluePt (μ-eq y) i (μₗ e x j)) main : Push→TotalSpaceHopf (pt A) ≡ TotalSpaceHopfPush→TotalSpace main i x = (lem₁ x i) , (lem₂ x i) TotalSpaceHopfPush² : Type _ TotalSpaceHopfPush² = Pushout {A = TotalSpaceHopfPush} (λ _ → tt) induced P : TotalSpaceHopfPush² → Type _ P (inl x) = typ A P (inr x) = Hopf x P (push a i) = ua (TotalSpaceHopfPush→≃Hopf a) i TotalSpacePush² : Type _ TotalSpacePush² = Σ[ x ∈ TotalSpaceHopfPush² ] P x TotalSpacePush²' : Type _ TotalSpacePush²' = Pushout {A = typ A × TotalSpaceHopfPush} {C = Σ[ x ∈ Susp (typ A) ] Hopf x} fst λ x → Push→TotalSpaceHopf (fst x) (snd x) IsoTotalSpacePush²TotalSpacePush²' : Iso TotalSpacePush² TotalSpacePush²' IsoTotalSpacePush²TotalSpacePush²' = compIso iso₂ (compIso (equivToIso fl.flatten) iso₁) where module fl = FlatteningLemma (λ _ → tt) induced (λ x → typ A) Hopf TotalSpaceHopfPush→≃Hopf iso₁ : Iso (Pushout fl.Σf fl.Σg) TotalSpacePush²' fun iso₁ (inl x) = inl (snd x) fun iso₁ (inr x) = inr x fun iso₁ (push a i) = push ((snd a) , (fst a)) i inv iso₁ (inl x) = inl (tt , x) inv iso₁ (inr x) = inr x inv iso₁ (push a i) = push (snd a , fst a) i rightInv iso₁ (inl x) = refl rightInv iso₁ (inr x) = refl rightInv iso₁ (push a i) = refl leftInv iso₁ (inl x) = refl leftInv iso₁ (inr x) = refl leftInv iso₁ (push a i) = refl iso₂ : Iso TotalSpacePush² (Σ (Pushout (λ _ → tt) induced) fl.E) fun iso₂ (inl x , y) = inl x , y fun iso₂ (inr x , y) = inr x , y fun iso₂ (push a i , y) = push a i , y inv iso₂ (inl x , y) = inl x , y inv iso₂ (inr x , y) = inr x , y inv iso₂ (push a i , y) = push a i , y rightInv iso₂ (inl x , snd₁) = refl rightInv iso₂ (inr x , snd₁) = refl rightInv iso₂ (push a i , snd₁) = refl leftInv iso₂ (inl x , snd₁) = refl leftInv iso₂ (inr x , snd₁) = refl leftInv iso₂ (push a i , snd₁) = refl F : TotalSpacePush²' → (Pushout {A = typ A × Σ (Susp (typ A)) Hopf} fst snd) F (inl x) = inl x F (inr x) = inr x F (push (x , y) i) = push (x , Push→TotalSpaceHopf x y) i G : (Pushout {A = typ A × Σ (Susp (typ A)) Hopf} fst snd) → TotalSpacePush²' G (inl x) = inl x G (inr x) = inr x G (push (x , y) i) = hcomp (λ k → λ { (i = i0) → inl x ; (i = i1) → inr (secEq (_ , Push→TotalSpaceHopf-equiv x) y k)}) (push (x , invEq (_ , Push→TotalSpaceHopf-equiv x) y) i) IsoTotalSpacePush²'ΣPush : Iso TotalSpacePush²' (Pushout {A = typ A × Σ (Susp (typ A)) Hopf} fst snd) fun IsoTotalSpacePush²'ΣPush = F inv IsoTotalSpacePush²'ΣPush = G rightInv IsoTotalSpacePush²'ΣPush (inl x) = refl rightInv IsoTotalSpacePush²'ΣPush (inr x) = refl rightInv IsoTotalSpacePush²'ΣPush (push (x , y) i) j = hcomp (λ k → λ { (i = i0) → inl x ; (i = i1) → inr (secEq (_ , Push→TotalSpaceHopf-equiv x) y k) ; (j = i0) → F ( hfill (λ k → λ { (i = i0) → inl x ; (i = i1) → inr (secEq (_ , Push→TotalSpaceHopf-equiv x) y k)}) (inS (push (x , invEq (_ , Push→TotalSpaceHopf-equiv x) y) i)) k) ; (j = i1) → push (x , (secEq (_ , Push→TotalSpaceHopf-equiv x) y k)) i}) (push (x , (secEq (_ , Push→TotalSpaceHopf-equiv x) y i0)) i) leftInv IsoTotalSpacePush²'ΣPush (inl x) = refl leftInv IsoTotalSpacePush²'ΣPush (inr x) = refl leftInv IsoTotalSpacePush²'ΣPush (push (x , y) i) j = hcomp (λ k → λ { (i = i0) → inl x ; (i = i1) → inr (secEq (Push→TotalSpaceHopf x , Push→TotalSpaceHopf-equiv x) (Push→TotalSpaceHopf x y) (j ∨ k)) ; (j = i1) → push (x , y) i}) (hcomp (λ k → λ { (i = i0) → inl x ; (i = i1) → inr (retEq≡secEq (Push→TotalSpaceHopf x , Push→TotalSpaceHopf-equiv x) y (~ k) j) ; (j = i1) → push (x , y) i ; (j = i0) → push (x , invEq (Push→TotalSpaceHopf x , Push→TotalSpaceHopf-equiv x) (Push→TotalSpaceHopf x y)) i}) (push (x , retEq (Push→TotalSpaceHopf x , Push→TotalSpaceHopf-equiv x) y j) i)) joinIso₂ : Iso TotalSpacePush² (join (typ A) (join (typ A) (typ A))) joinIso₂ = compIso IsoTotalSpacePush²TotalSpacePush²' (compIso IsoTotalSpacePush²'ΣPush (compIso (equivToIso (joinPushout≃join _ _)) (pathToIso (cong (join (typ A)) (isoToPath IsoTotalSpaceJoin))))) -- Direct construction of Hopf fibration for S¹ module S¹Hopf where Border : (x : S¹) → (j : I) → Partial (j ∨ ~ j) (Σ Type₀ (λ T → T ≃ S¹)) Border x j (j = i0) = S¹ , (x ·_) , rotIsEquiv x Border x j (j = i1) = S¹ , idEquiv S¹ -- Hopf fibration using SuspS¹ HopfSuspS¹ : SuspS¹ → Type₀ HopfSuspS¹ north = S¹ HopfSuspS¹ south = S¹ HopfSuspS¹ (merid x j) = Glue S¹ (Border x j) -- Hopf fibration using S² -- TODO : prove that it is equivalent to HopfSuspS¹ HopfS² : S² → Type₀ HopfS² base = S¹ HopfS² (surf i j) = Glue S¹ (λ { (i = i0) → _ , idEquiv S¹ ; (i = i1) → _ , idEquiv S¹ ; (j = i0) → _ , idEquiv S¹ ; (j = i1) → _ , _ , rotIsEquiv (loop i) } ) -- Hopf fibration using more direct definition of the rot equivalence -- TODO : prove that it is equivalent to HopfSuspS¹ HopfS²' : S² → Type₀ HopfS²' base = S¹ HopfS²' (surf i j) = Glue S¹ (λ { (i = i0) → _ , rotLoopEquiv i0 ; (i = i1) → _ , rotLoopEquiv i0 ; (j = i0) → _ , rotLoopEquiv i0 ; (j = i1) → _ , rotLoopEquiv i } ) -- Total space of the fibration TotalHopf : Type₀ TotalHopf = Σ SuspS¹ HopfSuspS¹ -- Forward direction filler-1 : I → (j : I) → (y : S¹) → Glue S¹ (Border y j) → join S¹ S¹ filler-1 i j y x = hfill (λ t → λ { (j = i0) → inl (rotInv-1 x y t) ; (j = i1) → inr x }) (inS (push ((unglue (j ∨ ~ j) x) · invLooper y) (unglue (j ∨ ~ j) x) j)) i TotalHopf→JoinS¹S¹ : TotalHopf → join S¹ S¹ TotalHopf→JoinS¹S¹ (north , x) = inl x TotalHopf→JoinS¹S¹ (south , x) = inr x TotalHopf→JoinS¹S¹ (merid y j , x) = filler-1 i1 j y x -- Backward direction JoinS¹S¹→TotalHopf : join S¹ S¹ → TotalHopf JoinS¹S¹→TotalHopf (inl x) = (north , x) JoinS¹S¹→TotalHopf (inr x) = (south , x) JoinS¹S¹→TotalHopf (push y x j) = (merid (invLooper y · x) j , glue (λ { (j = i0) → y ; (j = i1) → x }) (rotInv-2 x y j)) -- Now for the homotopies, we will need to fill squares indexed by x y : S¹ with value in S¹ -- Some will be extremeley tough, but happen to be easy when x = y = base -- therefore, we fill them for x = y = base and then use the connectedness of S¹ × S¹ and -- the discreteness of ΩS¹ to get general fillers. -- To proceed with that strategy, we first need a lemma : -- the sections of the trivial fibration λ (_ : S¹) (_ : S¹) → Int are constant -- this should be generalized to a constant fibration over a connected space with -- discrete fiber fibℤ : S¹ → S¹ → Type₀ fibℤ _ _ = ℤ S¹→HSet : (A : Type₀) (p : isSet A) (F : S¹ → A) (x : S¹) → F base ≡ F x S¹→HSet A p F base = refl {x = F base} S¹→HSet A p F (loop i) = f' i where f : PathP (λ i → F base ≡ F (loop i)) refl (cong F loop) f i = λ j → F (loop (i ∧ j)) L : cong F loop ≡ refl L = p (F base) (F base) (f i1) refl f' : PathP (λ i → F base ≡ F (loop i)) (refl {x = F base}) (refl {x = F base}) f' = transport (λ i → PathP (λ j → F base ≡ F (loop j)) refl (L i)) f constant-loop : (F : S¹ → S¹ → ℤ) → (x y : S¹) → F base base ≡ F x y constant-loop F x y = L0 ∙ L1 where p : isSet (S¹ → ℤ) p = isSetΠ (λ _ → isSetℤ) L : F base ≡ F x L = S¹→HSet (S¹ → ℤ) p F x L0 : F base base ≡ F x base L0 i = L i base L1 : F x base ≡ F x y L1 = S¹→HSet ℤ isSetℤ (F x) y discretefib : (F : S¹ → S¹ → Type₀) → Type₀ discretefib F = (a : (x y : S¹) → F x y) → (b : (x y : S¹) → F x y) → (a base base ≡ b base base) → (x y : S¹) → a x y ≡ b x y discretefib-fibℤ : discretefib fibℤ discretefib-fibℤ a b h x y i = hcomp (λ t → λ { (i = i0) → constant-loop a x y t ; (i = i1) → constant-loop b x y t }) (h i) -- first homotopy assocFiller-3-aux : I → I → I → I → S¹ assocFiller-3-aux x y j i = hfill (λ t → λ { (i = i0) → rotInv-1 (loop y) (loop (~ y) · loop x) t ; (i = i1) → rotInv-3 (loop y) (loop x) t ; (x = i0) (y = i0) → base ; (x = i0) (y = i1) → base ; (x = i1) (y = i0) → base ; (x = i1) (y = i1) → base }) (inS ((rotInv-2 (loop x) (loop y) i) · (invLooper (loop (~ y) · loop x)))) j -- assocFiller-3-endpoint is used only in the type of the next function, to specify the -- second endpoint. -- However, I only need the first endpoint, but I cannot specify only one of them as is. -- TODO : use cubical extension types when available to remove assocFiller-3-endpoint assocFiller-3-endpoint : (x : S¹) → (y : S¹) → y ≡ y assocFiller-3-endpoint base base i = base assocFiller-3-endpoint (loop x) base i = assocFiller-3-aux x i0 i1 i assocFiller-3-endpoint base (loop y) i = assocFiller-3-aux i0 y i1 i assocFiller-3-endpoint (loop x) (loop y) i = assocFiller-3-aux x y i1 i assocFiller-3 : (x : S¹) → (y : S¹) → PathP (λ j → rotInv-1 y (invLooper y · x) j ≡ rotInv-3 y x j) (λ i → ((rotInv-2 x y i) · (invLooper (invLooper y · x)))) (assocFiller-3-endpoint x y) assocFiller-3 base base j i = base assocFiller-3 (loop x) base j i = assocFiller-3-aux x i0 j i assocFiller-3 base (loop y) j i = assocFiller-3-aux i0 y j i assocFiller-3 (loop x) (loop y) j i = assocFiller-3-aux x y j i assoc-3 : (_ y : S¹) → basedΩS¹ y assoc-3 x y i = assocFiller-3 x y i1 i fibℤ≡fibAssoc-3 : fibℤ ≡ (λ _ y → basedΩS¹ y) fibℤ≡fibAssoc-3 i = λ x y → basedΩS¹≡ℤ y (~ i) discretefib-fibAssoc-3 : discretefib (λ _ y → basedΩS¹ y) discretefib-fibAssoc-3 = transp (λ i → discretefib (fibℤ≡fibAssoc-3 i)) i0 discretefib-fibℤ assocConst-3 : (x y : S¹) → assoc-3 x y ≡ refl assocConst-3 x y = discretefib-fibAssoc-3 assoc-3 (λ _ _ → refl) refl x y assocSquare-3 : I → I → S¹ → S¹ → S¹ assocSquare-3 i j x y = hcomp (λ t → λ { (i = i0) → assocFiller-3 x y j i0 ; (i = i1) → assocFiller-3 x y j i1 ; (j = i0) → assocFiller-3 x y i0 i ; (j = i1) → assocConst-3 x y t i }) (assocFiller-3 x y j i) filler-3 : I → I → S¹ → S¹ → join S¹ S¹ filler-3 i j y x = hcomp (λ t → λ { (i = i0) → filler-1 t j (invLooper y · x) (glue (λ { (j = i0) → y ; (j = i1) → x }) (rotInv-2 x y j)) ; (i = i1) → push (rotInv-3 y x t) x j ; (j = i0) → inl (assocSquare-3 i t x y) ; (j = i1) → inr x }) (push ((rotInv-2 x y (i ∨ j)) · (invLooper (invLooper y · x))) (rotInv-2 x y (i ∨ j)) j) JoinS¹S¹→TotalHopf→JoinS¹S¹ : ∀ x → TotalHopf→JoinS¹S¹ (JoinS¹S¹→TotalHopf x) ≡ x JoinS¹S¹→TotalHopf→JoinS¹S¹ (inl x) i = inl x JoinS¹S¹→TotalHopf→JoinS¹S¹ (inr x) i = inr x JoinS¹S¹→TotalHopf→JoinS¹S¹ (push y x j) i = filler-3 i j y x -- Second homotopy -- This HIT is the total space of the Hopf fibration but the ends of SuspS¹ have not been -- glued together yet — which makes it into a cylinder. -- This allows to write compositions that do not properly match at the endpoints. However, -- I suspect it is unnecessary. TODO : do without PseudoHopf PseudoHopf : Type₀ PseudoHopf = (S¹ × Interval) × S¹ PseudoHopf-π1 : PseudoHopf → S¹ PseudoHopf-π1 ((y , _) , _) = y PseudoHopf-π2 : PseudoHopf → S¹ PseudoHopf-π2 (_ , x) = x assocFiller-4-aux : I → I → I → I → S¹ assocFiller-4-aux x y j i = hfill (λ t → λ { (i = i0) → ((invLooper (loop y · loop x · loop (~ y))) · (loop y · loop x)) · (rotInv-1 (loop x) (loop y) t) ; (i = i1) → (rotInv-4 (loop y) (loop y · loop x) (~ t)) · loop x ; (x = i0) (y = i0) → base ; (x = i0) (y = i1) → base ; (x = i1) (y = i0) → base ; (x = i1) (y = i1) → base }) (inS (rotInv-2 (loop y · loop x) (loop y · loop x · loop (~ y)) i)) j -- See assocFiller-3-endpoint -- TODO : use cubical extension types when available to remove assocFiller-4-endpoint assocFiller-4-endpoint : (x y : S¹) → basedΩS¹ (((invLooper (y · x · invLooper y)) · (y · x)) · x) assocFiller-4-endpoint base base i = base assocFiller-4-endpoint (loop x) base i = assocFiller-4-aux x i0 i1 i assocFiller-4-endpoint base (loop y) i = assocFiller-4-aux i0 y i1 i assocFiller-4-endpoint (loop x) (loop y) i = assocFiller-4-aux x y i1 i assocFiller-4 : (x y : S¹) → PathP (λ j → ((invLooper (y · x · invLooper y)) · (y · x)) · (rotInv-1 x y j) ≡ (rotInv-4 y (y · x) (~ j)) · x) (λ i → (rotInv-2 (y · x) (y · x · invLooper y) i)) (assocFiller-4-endpoint x y) assocFiller-4 base base j i = base assocFiller-4 (loop x) base j i = assocFiller-4-aux x i0 j i assocFiller-4 base (loop y) j i = assocFiller-4-aux i0 y j i assocFiller-4 (loop x) (loop y) j i = assocFiller-4-aux x y j i assoc-4 : (x y : S¹) → basedΩS¹ (((invLooper (y · x · invLooper y)) · (y · x)) · x) assoc-4 x y i = assocFiller-4 x y i1 i fibℤ≡fibAssoc-4 : fibℤ ≡ (λ x y → basedΩS¹ (((invLooper (y · x · invLooper y)) · (y · x)) · x)) fibℤ≡fibAssoc-4 i = λ x y → basedΩS¹≡ℤ (((invLooper (y · x · invLooper y)) · (y · x)) · x) (~ i) discretefib-fibAssoc-4 : discretefib (λ x y → basedΩS¹ (((invLooper (y · x · invLooper y)) · (y · x)) · x)) discretefib-fibAssoc-4 = transp (λ i → discretefib (fibℤ≡fibAssoc-4 i)) i0 discretefib-fibℤ assocConst-4 : (x y : S¹) → assoc-4 x y ≡ refl assocConst-4 x y = discretefib-fibAssoc-4 assoc-4 (λ _ _ → refl) refl x y assocSquare-4 : I → I → S¹ → S¹ → S¹ assocSquare-4 i j x y = hcomp (λ t → λ { (i = i0) → assocFiller-4 x y j i0 ; (i = i1) → assocFiller-4 x y j i1 ; (j = i0) → assocFiller-4 x y i0 i ; (j = i1) → assocConst-4 x y t i }) (assocFiller-4 x y j i) filler-4-0 : (_ j : I) → (y : S¹) → Glue S¹ (Border y j) → PseudoHopf filler-4-0 i j y x = let x' = unglue (j ∨ ~ j) x in hfill (λ t → λ { (j = i0) → ((invLooper (y · x · invLooper y) · (y · x) , I0) , invLooper (y · x · invLooper y) · (y · x) · (rotInv-1 x y t)) ; (j = i1) → ((invLooper (x · invLooper y) · x , I1) , x) }) (inS ((invLooper (x' · invLooper y) · x' , seg j) , rotInv-2 x' (x' · invLooper y) j)) i filler-4-1 : (_ j : I) → (y : S¹) → Glue S¹ (Border y j) → PseudoHopf filler-4-1 i j y x = let x' = unglue (j ∨ ~ j) x in hfill (λ t → λ { (j = i0) → ((invLooper (y · x · invLooper y) · (y · x) , I0) , (rotInv-4 y (y · x) (~ t)) · x) ; (j = i1) → ((invLooper (x · invLooper y) · x , I1) , x) }) (inS ((invLooper (x' · invLooper y) · x' , seg j) , unglue (j ∨ ~ j) x)) i filler-4-2 : (_ j : I) → (y : S¹) → Glue S¹ (Border y j) → TotalHopf filler-4-2 i j y x = let x' = unglue (j ∨ ~ j) x in hcomp (λ t → λ { (i = i0) → JoinS¹S¹→TotalHopf (filler-1 t j y x) ; (i = i1) → (merid (PseudoHopf-π1 (filler-4-0 t j y x)) j , glue (λ { (j = i0) → rotInv-1 x y t ; (j = i1) → x }) (PseudoHopf-π2 (filler-4-0 t j y x))) ; (j = i0) → (north , rotInv-1 x y t) ; (j = i1) → (south , x) }) (merid (invLooper (x' · invLooper y) · x') j , glue (λ { (j = i0) → y · x · invLooper y ; (j = i1) → x }) (rotInv-2 x' (x' · invLooper y) j)) filler-4-3 : (_ j : I) → (y : S¹) → Glue S¹ (Border y j) → PseudoHopf filler-4-3 i j y x = let x' = unglue (j ∨ ~ j) x in hcomp (λ t → λ { (i = i0) → filler-4-0 t j y x ; (i = i1) → filler-4-1 t j y x ; (j = i0) → ((invLooper (y · x · invLooper y) · (y · x) , I0) , assocSquare-4 i t x y) ; (j = i1) → ((invLooper (x · invLooper y) · x , I1) , x) }) ((invLooper (x' · invLooper y) · x' , seg j) , rotInv-2 x' (x' · invLooper y) (i ∨ j)) filler-4-4 : (_ j : I) → (y : S¹) → Glue S¹ (Border y j) → PseudoHopf filler-4-4 i j y x = let x' = unglue (j ∨ ~ j) x in hcomp (λ t → λ { (i = i0) → filler-4-1 t j y x ; (i = i1) → ((y , seg j) , unglue (j ∨ ~ j) x) ; (j = i0) → ((rotInv-4 y (y · x) i , I0) , (rotInv-4 y (y · x) (i ∨ ~ t)) · x) ; (j = i1) → ((rotInv-4 y x i , I1) , x) }) ((rotInv-4 y x' i , seg j) , x') filler-4-5 : (_ j : I) → (y : S¹) → Glue S¹ (Border y j) → TotalHopf filler-4-5 i j y x = hcomp (λ t → λ { (i = i0) → filler-4-2 (~ t) j y x ; (i = i1) → (merid (PseudoHopf-π1 (filler-4-4 t j y x)) j , glue (λ { (j = i0) → x ; (j = i1) → x }) (PseudoHopf-π2 (filler-4-4 t j y x))) ; (j = i0) → (north , x) ; (j = i1) → (south , x) }) (merid (PseudoHopf-π1 (filler-4-3 i j y x)) j , glue (λ { (j = i0) → x ; (j = i1) → x }) (PseudoHopf-π2 (filler-4-3 i j y x))) TotalHopf→JoinS¹S¹→TotalHopf : ∀ x → JoinS¹S¹→TotalHopf (TotalHopf→JoinS¹S¹ x) ≡ x TotalHopf→JoinS¹S¹→TotalHopf (north , x) i = (north , x) TotalHopf→JoinS¹S¹→TotalHopf (south , x) i = (south , x) TotalHopf→JoinS¹S¹→TotalHopf (merid y j , x) i = filler-4-5 i j y x JoinS¹S¹≡TotalHopf : join S¹ S¹ ≡ TotalHopf JoinS¹S¹≡TotalHopf = isoToPath (iso JoinS¹S¹→TotalHopf TotalHopf→JoinS¹S¹ TotalHopf→JoinS¹S¹→TotalHopf JoinS¹S¹→TotalHopf→JoinS¹S¹) S³≡TotalHopf : S³ ≡ TotalHopf S³≡TotalHopf = S³≡joinS¹S¹ ∙ JoinS¹S¹≡TotalHopf open Iso IsoS³TotalHopf : Iso (S₊ 3) TotalHopf fun IsoS³TotalHopf x = JoinS¹S¹→TotalHopf (S³→joinS¹S¹ (inv IsoS³S3 x)) inv IsoS³TotalHopf x = fun IsoS³S3 (joinS¹S¹→S³ (TotalHopf→JoinS¹S¹ x)) rightInv IsoS³TotalHopf x = cong (JoinS¹S¹→TotalHopf ∘ S³→joinS¹S¹) (leftInv IsoS³S3 (joinS¹S¹→S³ (TotalHopf→JoinS¹S¹ x))) ∙∙ cong JoinS¹S¹→TotalHopf (joinS¹S¹→S³→joinS¹S¹ (TotalHopf→JoinS¹S¹ x)) ∙∙ TotalHopf→JoinS¹S¹→TotalHopf x leftInv IsoS³TotalHopf x = cong (fun IsoS³S3 ∘ joinS¹S¹→S³) (JoinS¹S¹→TotalHopf→JoinS¹S¹ (S³→joinS¹S¹ (inv IsoS³S3 x))) ∙∙ cong (fun IsoS³S3) (S³→joinS¹S¹→S³ (inv IsoS³S3 x)) ∙∙ Iso.rightInv IsoS³S3 x
{ "alphanum_fraction": 0.49864682, "avg_line_length": 41.9290780142, "ext": "agda", "hexsha": "0f07a73101c61c0b9376401352392ad5a209f705", "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": "1b9c97a2140fe96fe636f4c66beedfd7b8096e8f", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "howsiyu/cubical", "max_forks_repo_path": "Cubical/Homotopy/Hopf.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "1b9c97a2140fe96fe636f4c66beedfd7b8096e8f", "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": "howsiyu/cubical", "max_issues_repo_path": "Cubical/Homotopy/Hopf.agda", "max_line_length": 129, "max_stars_count": null, "max_stars_repo_head_hexsha": "1b9c97a2140fe96fe636f4c66beedfd7b8096e8f", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "howsiyu/cubical", "max_stars_repo_path": "Cubical/Homotopy/Hopf.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 11224, "size": 29560 }
{- Voevodsky's proof that univalence implies funext -} {-# OPTIONS --cubical --safe #-} module Cubical.Experiments.FunExtFromUA where open import Cubical.Core.Everything open import Cubical.Foundations.Everything variable ℓ ℓ' : Level _∼_ : {X : Type ℓ} {A : X → Type ℓ'} → (f g : (x : X) → A x) → Type (ℓ-max ℓ ℓ') f ∼ g = ∀ x → f x ≡ g x funext : ∀ ℓ ℓ' → Type (ℓ-suc(ℓ-max ℓ ℓ')) funext ℓ ℓ' = {X : Type ℓ} {Y : Type ℓ'} {f g : X → Y} → f ∼ g → f ≡ g elimEquivFun' : ∀ {ℓ} (P : (A B : Type ℓ) → (A → B) → Type ℓ) → (r : (B : Type ℓ) → P B B (λ x → x)) → (A B : Type ℓ) → (e : A ≃ B) → P A B (e .fst) elimEquivFun' P r A B = elimEquivFun B (λ A → P A B) (r B) A pre-comp-is-equiv : (X Y : Type ℓ) (f : X → Y) (Z : Type ℓ) → isEquiv f → isEquiv (λ (g : Y → Z) → g ∘ f) pre-comp-is-equiv {ℓ} X Y f Z e = elimEquivFun' P r X Y (f , e) where P : (X Y : Type ℓ) → (X → Y) → Type ℓ P X Y f = isEquiv (λ (g : Y → Z) → g ∘ f) r : (B : Type ℓ) → P B B (λ x → x) r B = idIsEquiv (B → Z) leftCancellable : {X : Type ℓ} {Y : Type ℓ'} → (X → Y) → Type (ℓ-max ℓ ℓ') leftCancellable f = ∀ {x x'} → f x ≡ f x' → x ≡ x' equivLC : {X : Type ℓ} {Y : Type ℓ'} (f : X → Y) → isEquiv f → leftCancellable f equivLC f e {x} {x'} p i = hcomp (λ j → \ {(i = i0) → secEq (f , e) x j ; (i = i1) → secEq (f , e) x' j}) (invEq (f , e) (p i)) univalence-gives-funext : funext ℓ' ℓ univalence-gives-funext {ℓ'} {ℓ} {X} {Y} {f₀} {f₁} = γ where Δ = Σ[ y₀ ∈ Y ] Σ[ y₁ ∈ Y ] y₀ ≡ y₁ δ : Y → Δ δ y = (y , y , refl) π₀ π₁ : Δ → Y π₀ (y₀ , y₁ , p) = y₀ π₁ (y₀ , y₁ , p) = y₁ δ-is-equiv : isEquiv δ δ-is-equiv = isoToIsEquiv (iso δ π₀ ε η) where η : (y : Y) → π₀ (δ y) ≡ y η y = refl ε : (d : Δ) → δ (π₀ d) ≡ d ε (y₀ , y₁ , p) i = y₀ , p i , λ j → p (i ∧ j) φ : (Δ → Y) → (Y → Y) φ π = π ∘ δ e : isEquiv φ e = pre-comp-is-equiv Y Δ δ Y δ-is-equiv p : φ π₀ ≡ φ π₁ p = refl q : π₀ ≡ π₁ q = equivLC φ e p g : (h : f₀ ∼ f₁) (π : Δ → Y) (x : X) → Y g = λ h π x → π (f₀ x , f₁ x , h x) γ : f₀ ∼ f₁ → f₀ ≡ f₁ γ h = cong (g h) q γ' : f₀ ∼ f₁ → f₀ ≡ f₁ γ' h = f₀ ≡⟨ refl ⟩ (λ x → f₀ x) ≡⟨ refl ⟩ (λ x → π₀ (f₀ x , f₁ x , h x)) ≡⟨ cong (g h) q ⟩ (λ x → π₁ (f₀ x , f₁ x , h x)) ≡⟨ refl ⟩ (λ x → f₁ x) ≡⟨ refl ⟩ f₁ ∎ {- Experiment testing univalence via funext -} private data ℕ : Type₀ where zero : ℕ succ : ℕ → ℕ f g : ℕ → ℕ f n = n g zero = zero g (succ n) = succ (g n) h : (n : ℕ) → f n ≡ g n h zero = refl h (succ n) = cong succ (h n) p : f ≡ g p = univalence-gives-funext h five : ℕ five = succ (succ (succ (succ (succ zero)))) a : Σ ℕ (λ n → f n ≡ five) a = five , refl b : Σ ℕ (λ n → g n ≡ five) b = subst (λ - → Σ ℕ (λ n → - n ≡ five)) p a c : fst b ≡ five c = refl {- It works, fast. -}
{ "alphanum_fraction": 0.4324675325, "avg_line_length": 25.0406504065, "ext": "agda", "hexsha": "2c392b56090230882388bd95e474c6fbbdca4078", "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/Experiments/FunExtFromUA.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/Experiments/FunExtFromUA.agda", "max_line_length": 80, "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/Experiments/FunExtFromUA.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 1394, "size": 3080 }
{-# OPTIONS --cubical #-} module _ where -- Test case by Ulf Norell, 16/09/2020 open import Agda.Primitive.Cubical renaming (primIMin to _∧_) open import Agda.Builtin.Cubical.Path using (_≡_) data Nat : Set where zero : Nat suc : Nat → Nat record Pos : Set where constructor 1+_ field unpos : Nat open Pos Pos→Nat : Pos → Nat Pos→Nat (1+ n) = suc n variable A : Set x : A refl : x ≡ x refl {x = x} i = x id : Pos → Pos id n = n -- (i ∧ j) in the system caused a mishandling of de Bruijn indexes. foo : (n : Pos) (i j : I) → Nat foo n i j = primHComp (λ k → primPOr (i ∧ j) (i ∧ j) (λ _ → suc (n .unpos)) (λ _ → suc (n .unpos))) (suc (n .unpos)) -- The test triggers normalization to make sure the `primHComp` in -- `foo` reduces properly. -- v foil syntactic equality check test : ∀ n i j → foo n i j ≡ foo (id n) i j test n i j = refl
{ "alphanum_fraction": 0.5548654244, "avg_line_length": 21.9545454545, "ext": "agda", "hexsha": "61ed1704063efe3a2d8dc4c4903d6dac2b123560", "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/Issue4928.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/Issue4928.agda", "max_line_length": 75, "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/Issue4928.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": 328, "size": 966 }
------------------------------------------------------------------------ -- Inductively defined beta-eta-equality ------------------------------------------------------------------------ import Level open import Data.Universe module README.DependentlyTyped.Beta-Eta (Uni₀ : Universe Level.zero Level.zero) where open import Data.Product renaming (curry to c) open import Function hiding (_∋_) import README.DependentlyTyped.Term as Term; open Term Uni₀ import README.DependentlyTyped.Term.Substitution as S; open S Uni₀ import Relation.Binary.PropositionalEquality as P open P.≡-Reasoning -- βη-equality. infixl 9 _·_ infix 4 _≈_ infixr 2 _≈⟨_⟩_ data _≈_ : ∀ {Γ₁ σ₁} → Γ₁ ⊢ σ₁ → ∀ {Γ₂ σ₂} → Γ₂ ⊢ σ₂ → Set where -- β and η. β : ∀ {Γ sp₁ sp₂} {σ : IType Γ (π sp₁ sp₂)} (t₁ : Γ ▻ fst σ ⊢ snd σ) (t₂ : Γ ⊢ fst σ) → ƛ t₁ · t₂ ≈ t₁ /⊢ sub t₂ η : ∀ {Γ sp₁ sp₂ σ} (t : Γ ⊢ (π sp₁ sp₂ , σ)) → ƛ ((t /⊢ wk[ fst σ ]) · var zero) ≈ t -- The relation is an equivalence (reflexivity is proved below). sym : ∀ {Γ₁ σ₁} {t₁ : Γ₁ ⊢ σ₁} {Γ₂ σ₂} {t₂ : Γ₂ ⊢ σ₂} (t₁≈t₂ : t₁ ≈ t₂) → t₂ ≈ t₁ _≈⟨_⟩_ : ∀ {Γ₁ σ₁} (t₁ : Γ₁ ⊢ σ₁) {Γ₂ σ₂} {t₂ : Γ₂ ⊢ σ₂} {Γ₃ σ₃} {t₃ : Γ₃ ⊢ σ₃} (t₁≈t₂ : t₁ ≈ t₂) (t₂≈t₃ : t₂ ≈ t₃) → t₁ ≈ t₃ -- The relation is a congruence. var : ∀ {Γ₁ σ₁} {x₁ : Γ₁ ∋ σ₁} {Γ₂ σ₂} {x₂ : Γ₂ ∋ σ₂} (x₁≅x₂ : x₁ ≅-∋ x₂) → var x₁ ≈ var x₂ ƛ : ∀ {Γ₁ σ₁ τ₁} {t₁ : Γ₁ ▻ σ₁ ⊢ τ₁} {Γ₂ σ₂ τ₂} {t₂ : Γ₂ ▻ σ₂ ⊢ τ₂} (t₁≈t₂ : t₁ ≈ t₂) → ƛ t₁ ≈ ƛ t₂ _·_ : ∀ {Γ₁ sp₁₁ sp₂₁ σ₁} {t₁₁ : Γ₁ ⊢ π sp₁₁ sp₂₁ , σ₁} {t₂₁ : Γ₁ ⊢ fst σ₁} {Γ₂ sp₁₂ sp₂₂ σ₂} {t₁₂ : Γ₂ ⊢ π sp₁₂ sp₂₂ , σ₂} {t₂₂ : Γ₂ ⊢ fst σ₂} (t₁₁≈t₁₂ : t₁₁ ≈ t₁₂) (t₂₁≈t₂₂ : t₂₁ ≈ t₂₂) → t₁₁ · t₂₁ ≈ t₁₂ · t₂₂ -- Reflexivity. infix 3 _□ _□ : ∀ {Γ σ} (t : Γ ⊢ σ) → t ≈ t var x □ = var P.refl ƛ t □ = ƛ (t □) t₁ · t₂ □ = (t₁ □) · (t₂ □) abstract -- βη-equal terms have the same semantics. ≈-sound : ∀ {Γ₁ σ₁} {t₁ : Γ₁ ⊢ σ₁} {Γ₂ σ₂} {t₂ : Γ₂ ⊢ σ₂} → t₁ ≈ t₂ → ⟦ t₁ ⟧ ≅-Value ⟦ t₂ ⟧ ≈-sound (β t₁ t₂) = begin [ c ⟦ t₁ ⟧ ˢ ⟦ t₂ ⟧ ] ≡⟨ corresponds (app (sub t₂)) t₁ ⟩ [ ⟦ t₁ /⊢ sub t₂ ⟧ ] ∎ ≈-sound (η t) = begin [ c (⟦ t /⊢ wk ⟧ ˢ lookup zero) ] ≡⟨ curry-cong $ ˢ-cong (P.sym $ corresponds (app wk) t) (P.refl {x = [ lookup zero ]}) ⟩ [ c ((⟦ t ⟧ /̂Val ŵk) ˢ lookup zero) ] ≡⟨ P.refl ⟩ [ ⟦ t ⟧ ] ∎ ≈-sound (sym t₁≈t₂) = P.sym $ ≈-sound t₁≈t₂ ≈-sound (t₁ ≈⟨ t₁≈t₂ ⟩ t₂≈t₃) = P.trans (≈-sound t₁≈t₂) (≈-sound t₂≈t₃) ≈-sound (var P.refl) = P.refl ≈-sound (ƛ t₁≈t₂) = curry-cong (≈-sound t₁≈t₂) ≈-sound (t₁₁≈t₁₂ · t₂₁≈t₂₂) = ˢ-cong (≈-sound t₁₁≈t₁₂) (≈-sound t₂₁≈t₂₂) -- βη-equal terms have identical contexts. ≈-⇒-≅-Ctxt : ∀ {Γ₁ σ₁} {t₁ : Γ₁ ⊢ σ₁} {Γ₂ σ₂} {t₂ : Γ₂ ⊢ σ₂} → t₁ ≈ t₂ → Γ₁ ≅-Ctxt Γ₂ ≈-⇒-≅-Ctxt t₁≈t₂ = P.cong [Value].Γ $ ≈-sound t₁≈t₂ -- βη-equal terms have identical types. ≈-⇒-≅-Type : ∀ {Γ₁ σ₁} {t₁ : Γ₁ ⊢ σ₁} {Γ₂ σ₂} {t₂ : Γ₂ ⊢ σ₂} → t₁ ≈ t₂ → σ₁ ≅-Type σ₂ ≈-⇒-≅-Type {t₁ = t₁} {t₂ = t₂} t₁≈t₂ with ⟦ t₂ ⟧ | ≈-sound t₁≈t₂ ... | .(⟦ t₁ ⟧) | P.refl = P.refl
{ "alphanum_fraction": 0.4549805564, "avg_line_length": 32.4563106796, "ext": "agda", "hexsha": "0eec7714b88dadab59a8e2765e52433deac23f25", "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": "498f8aefc570f7815fd1d6616508eeb92c52abce", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "nad/dependently-typed-syntax", "max_forks_repo_path": "README/DependentlyTyped/Beta-Eta.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "498f8aefc570f7815fd1d6616508eeb92c52abce", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "nad/dependently-typed-syntax", "max_issues_repo_path": "README/DependentlyTyped/Beta-Eta.agda", "max_line_length": 98, "max_stars_count": 5, "max_stars_repo_head_hexsha": "498f8aefc570f7815fd1d6616508eeb92c52abce", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "nad/dependently-typed-syntax", "max_stars_repo_path": "README/DependentlyTyped/Beta-Eta.agda", "max_stars_repo_stars_event_max_datetime": "2020-07-08T22:51:36.000Z", "max_stars_repo_stars_event_min_datetime": "2020-04-16T12:14:44.000Z", "num_tokens": 1685, "size": 3343 }
-- Andreas, 2012-10-19 issue #719 blame correct module -- Andreas, 2017-07-28 point to correct binding site ("as A") module Issue719 where import Common.Size as A module M where private open module A = M -- WAS: -- Duplicate definition of module A. Previous definition of module A -- at .../Common/Size.agda:7,15-19 -- when scope checking the declaration -- open module A = M -- EXPECTED: -- Duplicate definition of module A. Previous definition of module A -- at .../Issue719.agda:6,25-26 -- when scope checking the declaration -- open module A = M
{ "alphanum_fraction": 0.7079646018, "avg_line_length": 25.6818181818, "ext": "agda", "hexsha": "5313daf287421852a4335b278e43b718474178a2", "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/Fail/Issue719.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/Fail/Issue719.agda", "max_line_length": 68, "max_stars_count": 2, "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/Issue719.agda", "max_stars_repo_stars_event_max_datetime": "2020-09-20T00:28:57.000Z", "max_stars_repo_stars_event_min_datetime": "2019-10-29T09:40:30.000Z", "num_tokens": 155, "size": 565 }
{-# OPTIONS --without-K --safe #-} open import Categories.Category.Core using (Category) module Categories.Diagram.Coequalizer {o ℓ e} (𝒞 : Category o ℓ e) where open Category 𝒞 open HomReasoning open Equiv open import Categories.Morphism 𝒞 open import Categories.Morphism.Reasoning 𝒞 open import Level open import Function using (_$_) private variable A B C : Obj h i j k : A ⇒ B record IsCoequalizer {E} (f g : A ⇒ B) (arr : B ⇒ E) : Set (o ⊔ ℓ ⊔ e) where field equality : arr ∘ f ≈ arr ∘ g coequalize : {h : B ⇒ C} → h ∘ f ≈ h ∘ g → E ⇒ C universal : {h : B ⇒ C} {eq : h ∘ f ≈ h ∘ g} → h ≈ coequalize eq ∘ arr unique : {h : B ⇒ C} {i : E ⇒ C} {eq : h ∘ f ≈ h ∘ g} → h ≈ i ∘ arr → i ≈ coequalize eq unique′ : (eq eq′ : h ∘ f ≈ h ∘ g) → coequalize eq ≈ coequalize eq′ unique′ eq eq′ = unique universal id-coequalize : id ≈ coequalize equality id-coequalize = unique (⟺ identityˡ) coequalize-resp-≈ : ∀ {eq : h ∘ f ≈ h ∘ g} {eq′ : i ∘ f ≈ i ∘ g} → h ≈ i → coequalize eq ≈ coequalize eq′ coequalize-resp-≈ {h = h} {i = i} {eq = eq} {eq′ = eq′} h≈i = unique $ begin i ≈˘⟨ h≈i ⟩ h ≈⟨ universal ⟩ coequalize eq ∘ arr ∎ coequalize-resp-≈′ : (eq : h ∘ f ≈ h ∘ g) → (eq′ : i ∘ f ≈ i ∘ g) → h ≈ i → j ≈ coequalize eq → k ≈ coequalize eq′ → j ≈ k coequalize-resp-≈′ {j = j} {k = k} eq eq′ h≈i eqj eqk = begin j ≈⟨ eqj ⟩ coequalize eq ≈⟨ coequalize-resp-≈ h≈i ⟩ coequalize eq′ ≈˘⟨ eqk ⟩ k ∎ -- This could be proved via duality, but is easier to just write by hand, -- as it makes the dependency graph a lot cleaner. IsCoequalizer⇒Epi : IsCoequalizer h i j → Epi j IsCoequalizer⇒Epi coeq _ _ eq = coequalize-resp-≈′ (extendˡ equality) (extendˡ equality) eq (unique refl) (unique refl) where open IsCoequalizer coeq record Coequalizer (f g : A ⇒ B) : Set (o ⊔ ℓ ⊔ e) where field {obj} : Obj arr : B ⇒ obj isCoequalizer : IsCoequalizer f g arr open IsCoequalizer isCoequalizer public Coequalizer⇒Epi : (e : Coequalizer h i) → Epi (Coequalizer.arr e) Coequalizer⇒Epi coeq = IsCoequalizer⇒Epi isCoequalizer where open Coequalizer coeq -- Proving this via duality arguments is kind of annoying, as ≅ does not behave nicely in -- concert with op. up-to-iso : (coe₁ coe₂ : Coequalizer h i) → Coequalizer.obj coe₁ ≅ Coequalizer.obj coe₂ up-to-iso coe₁ coe₂ = record { from = repack coe₁ coe₂ ; to = repack coe₂ coe₁ ; iso = record { isoˡ = repack-cancel coe₂ coe₁ ; isoʳ = repack-cancel coe₁ coe₂ } } where open Coequalizer repack : (coe₁ coe₂ : Coequalizer h i) → obj coe₁ ⇒ obj coe₂ repack coe₁ coe₂ = coequalize coe₁ (equality coe₂) repack∘ : (coe₁ coe₂ coe₃ : Coequalizer h i) → repack coe₂ coe₃ ∘ repack coe₁ coe₂ ≈ repack coe₁ coe₃ repack∘ coe₁ coe₂ coe₃ = unique coe₁ (⟺ (glueTrianglesˡ (⟺ (universal coe₂)) (⟺ (universal coe₁)))) -- unique e₃ (⟺ (glueTrianglesʳ (⟺ (universal e₃)) (⟺ (universal e₂)))) repack-cancel : (e₁ e₂ : Coequalizer h i) → repack e₁ e₂ ∘ repack e₂ e₁ ≈ id repack-cancel coe₁ coe₂ = repack∘ coe₂ coe₁ coe₂ ○ ⟺ (id-coequalize coe₂) IsCoequalizer⇒Coequalizer : IsCoequalizer h i k → Coequalizer h i IsCoequalizer⇒Coequalizer {k = k} is-coe = record { arr = k ; isCoequalizer = is-coe }
{ "alphanum_fraction": 0.6140089419, "avg_line_length": 33.8888888889, "ext": "agda", "hexsha": "fe7161ba8ea84e59d5a849592fb1cc859481e079", "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": "8f3c844d929508040dfa21f681fa260056214b73", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "maxsnew/agda-categories", "max_forks_repo_path": "src/Categories/Diagram/Coequalizer.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "8f3c844d929508040dfa21f681fa260056214b73", "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": "maxsnew/agda-categories", "max_issues_repo_path": "src/Categories/Diagram/Coequalizer.agda", "max_line_length": 175, "max_stars_count": null, "max_stars_repo_head_hexsha": "8f3c844d929508040dfa21f681fa260056214b73", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "maxsnew/agda-categories", "max_stars_repo_path": "src/Categories/Diagram/Coequalizer.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 1395, "size": 3355 }
module Numeral.Natural.Relation.Order.Proofs where import Lvl open import Data.Tuple as Tuple using (_⨯_ ; _,_) open import Functional open import Logic open import Logic.Propositional open import Logic.Propositional.Theorems open import Logic.Predicate open import Numeral.Natural open import Numeral.Natural.Oper open import Numeral.Natural.Oper.Proofs open import Numeral.Natural.Induction open import Numeral.Natural.Relation.Order open import Relator.Equals open import Relator.Equals.Proofs open import Structure.Relator import Structure.Relator.Names as Names open import Structure.Function open import Structure.Function.Domain open import Structure.Operator.Properties open import Structure.Relator.Ordering open import Structure.Relator.Properties open import Structure.Relator.Properties.Proofs open import Syntax.Transitivity open import Type.Properties.MereProposition open import Type -- TODO: A method for pattern matching: https://stackoverflow.com/questions/20682013/agda-why-am-i-unable-to-pattern-match-on-refl instance [≤]-succ-injectivity : ∀{x y} → Injective(succ{x}{y}) Injective.proof [≤]-succ-injectivity [≡]-intro = [≡]-intro instance [≤]-mereProposition : ∀{x y} → MereProposition(x ≤ y) MereProposition.uniqueness [≤]-mereProposition {min} {min} = [≡]-intro MereProposition.uniqueness [≤]-mereProposition {succ x} {succ y} = congruence₁(succ) (MereProposition.uniqueness [≤]-mereProposition {x}{y}) instance [≤]-minimum = \{y} → _≤_.min {y} [≤]-with-[𝐒] = \{x}{y} ⦃ xy ⦄ → _≤_.succ {x}{y} xy [<]-minimum = \{y} → succ([≤]-minimum {y}) [≡]-to-[≤] : ∀{x y : ℕ} → (x ≡ y) → (x ≤ y) [≡]-to-[≤] {𝟎} {_} _ = [≤]-minimum [≡]-to-[≤] {𝐒(x)}{𝐒(y)} [≡]-intro = succ([≡]-to-[≤] {x}{y} [≡]-intro) [≡]-to-[≥] : ∀{x y : ℕ} → (x ≡ y) → (x ≥ y) [≡]-to-[≥] = [≡]-to-[≤] ∘ symmetry(_≡_) [≰]-to-[≢] : ∀{x y : ℕ} → (x ≰ y) → (x ≢ y) [≰]-to-[≢] = contrapositiveᵣ [≡]-to-[≤] [≱]-to-[≢] : ∀{x y : ℕ} → (x ≱ y) → (x ≢ y) [≱]-to-[≢] = contrapositiveᵣ [≡]-to-[≥] [≤][0]ᵣ : ∀{x : ℕ} → (x ≤ 0) → (x ≡ 0) [≤][0]ᵣ {𝟎} (_) = [≡]-intro [≤][0]ᵣ {𝐒(_)} () [≤][0]ᵣ-negation : ∀{x : ℕ} → (𝐒(x) ≰ 0) [≤][0]ᵣ-negation () [≤]-successor : ∀{x y : ℕ} → (x ≤ y) → (x ≤ 𝐒(y)) [≤]-successor {𝟎} {_} (_) = [≤]-minimum [≤]-successor {𝐒(x)}{𝟎} () [≤]-successor {𝐒(x)}{𝐒(y)} (succ proof) = succ([≤]-successor {x}{y} (proof)) [≤]-predecessor : ∀{x y : ℕ} → (𝐒(x) ≤ y) → (x ≤ y) [≤]-predecessor {x} {𝟎} () [≤]-predecessor {𝟎} {𝐒(y)} (_) = [≤]-minimum [≤]-predecessor {𝐒(x)}{𝐒(y)} (succ proof) = succ([≤]-predecessor {x}{y} (proof)) [≤]-without-[𝐒] : ∀{x y : ℕ} → (𝐒(x) ≤ 𝐒(y)) → (x ≤ y) [≤]-without-[𝐒] (succ proof) = proof [≤][𝐒]ₗ : ∀{x : ℕ} → ¬(𝐒(x) ≤ x) [≤][𝐒]ₗ {𝟎} (1≤0) = [≤][0]ᵣ-negation{0}(1≤0) [≤][𝐒]ₗ {𝐒(n)} (SSn≤Sn) = [≤][𝐒]ₗ {n} ([≤]-without-[𝐒] {𝐒(n)}{n} (SSn≤Sn)) instance [≤]-reflexivity : Reflexivity (_≤_) Reflexivity.proof([≤]-reflexivity) = [≡]-to-[≤] [≡]-intro instance [≤]-transitivity : Transitivity (_≤_) Transitivity.proof([≤]-transitivity) = proof where proof : Names.Transitivity (_≤_) proof {𝟎} {_} {_} (_)(_) = [≤]-minimum proof {𝐒(a)}{𝐒(b)}{𝐒(c)} (succ proofₗ) (succ proofᵣ ) = succ(proof {a}{b}{c} (proofₗ) (proofᵣ)) instance [≤]-antisymmetry : Antisymmetry (_≤_) (_≡_) Antisymmetry.proof([≤]-antisymmetry) = proof where proof : Names.Antisymmetry (_≤_) (_≡_) proof {𝟎} {𝟎} (_) (_) = [≡]-intro proof {𝐒(_)} {𝟎} () proof {𝟎} {𝐒(_)} (_) () proof {𝐒(a)} {𝐒(b)} (succ proofₗ) (succ proofᵣ) = [≡]-with(𝐒) (proof {a}{b} proofₗ proofᵣ) instance [≤]-totality : ConverseTotal(_≤_) ConverseTotal.proof([≤]-totality) = proof where proof : Names.ConverseTotal(_≤_) proof {𝟎} {𝟎} = [∨]-introₗ ([≡]-to-[≤] [≡]-intro) proof {𝐒(a)}{𝟎} = [∨]-introᵣ ([≤]-minimum) proof {𝟎} {𝐒(b)} = [∨]-introₗ ([≤]-minimum) proof {𝐒(a)}{𝐒(b)} = [∨]-elim ([∨]-introₗ ∘ (proof ↦ [≤]-with-[𝐒] {a}{b} ⦃ proof ⦄)) ([∨]-introᵣ ∘ (proof ↦ [≤]-with-[𝐒] {b}{a} ⦃ proof ⦄)) (proof {a}{b}) instance [≤]-weakPartialOrder : Weak.PartialOrder (_≤_) (_≡_) [≤]-weakPartialOrder = record{} instance [≤]-weakTotalOrder : Weak.TotalOrder (_≤_) (_≡_) [≤]-weakTotalOrder = record{} instance [≥]-reflexivity : Reflexivity (_≥_) Reflexivity.proof([≥]-reflexivity) = Reflexivity.proof([≤]-reflexivity) instance [≥]-transitivity : Transitivity (_≥_) Transitivity.proof([≥]-transitivity) = swap(Transitivity.proof([≤]-transitivity)) instance [≥]-antisymmetry : Antisymmetry (_≥_) (_≡_) Antisymmetry.proof([≥]-antisymmetry) = swap(Antisymmetry.proof([≤]-antisymmetry)) instance [≥]-totality : ConverseTotal(_≥_) ConverseTotal.proof([≥]-totality) = ConverseTotal.proof([≤]-totality) instance [≥]-weakPartialOrder : Weak.PartialOrder (_≥_) (_≡_) [≥]-weakPartialOrder = record{} instance [≥]-weakTotalOrder : Weak.TotalOrder (_≥_) (_≡_) [≥]-weakTotalOrder = record{} [≥]-to-[≮] : ∀{a b : ℕ} → (a ≮ b) ← (a ≥ b) [≥]-to-[≮] {a}{b} (b≤a) (𝐒a≤b) = [≤][𝐒]ₗ (transitivity(_≤_) {𝐒(a)}{b}{a} (𝐒a≤b) (b≤a)) [≤]-to-[≯] : ∀{a b : ℕ} → (a ≯ b) ← (a ≤ b) [≤]-to-[≯] {a}{b} (a≤b) (𝐒b≤a) = [≥]-to-[≮] {b}{a} (a≤b) (𝐒b≤a) [>]-to-[≰] : ∀{a b : ℕ} → (a ≰ b) ← (a > b) [>]-to-[≰] {a}{b} (𝐒b≤a) (a≤b) = [≤]-to-[≯] (a≤b) (𝐒b≤a) [<]-to-[≱] : ∀{a b : ℕ} → (a ≱ b) ← (a < b) [<]-to-[≱] {a}{b} (𝐒a≤b) (b≤a) = [≥]-to-[≮] (b≤a) (𝐒a≤b) [<]-to-[≢] : ∀{a b : ℕ} → (a < b) → (a ≢ b) [<]-to-[≢] = [≱]-to-[≢] ∘ [<]-to-[≱] [>]-to-[≢] : ∀{a b : ℕ} → (a > b) → (a ≢ b) [>]-to-[≢] = [≰]-to-[≢] ∘ [>]-to-[≰] [<][0]ᵣ : ∀{x : ℕ} → (x ≮ 0) [<][0]ᵣ = [≤][0]ᵣ-negation instance [<]-irreflexivity : Irreflexivity (_<_) Irreflexivity.proof([<]-irreflexivity) = [≤][𝐒]ₗ instance [<]-transitivity : Transitivity (_<_) Transitivity.proof([<]-transitivity) {x}{y}{z} (l) (r) = Transitivity.proof([≤]-transitivity) {𝐒(x)} {𝐒(y)} {z} ([≤]-successor (l)) (r) instance [<]-asymmetry : Asymmetry (_<_) Asymmetry.proof([<]-asymmetry) (l) (r) = Irreflexivity.proof([<]-irreflexivity) (Transitivity.proof([<]-transitivity) (l) (r)) instance [<]-converseTrichotomy : ConverseTrichotomy(_<_)(_≡_) ConverseTrichotomy.proof [<]-converseTrichotomy = p where p : Names.ConverseTrichotomy(_<_)(_≡_) p {𝟎} {𝟎} = [∨]-introₗ ([∨]-introᵣ [≡]-intro) p {𝟎} {𝐒 y} = [∨]-introₗ ([∨]-introₗ [≤]-with-[𝐒]) p {𝐒 x} {𝟎} = [∨]-introᵣ [≤]-with-[𝐒] p {𝐒 x} {𝐒 y} with p {x} {y} ... | [∨]-introₗ ([∨]-introₗ (succ xy)) = [∨]-introₗ ([∨]-introₗ (succ (succ xy))) ... | [∨]-introₗ ([∨]-introᵣ [≡]-intro) = [∨]-introₗ ([∨]-introᵣ [≡]-intro) ... | [∨]-introᵣ (succ xy) = [∨]-introᵣ (succ (succ xy)) instance [<]-strictPartialOrder : Strict.PartialOrder (_<_) [<]-strictPartialOrder = record{} instance [<]-strictTotalOrder : Strict.TotalOrder (_<_)(_≡_) [<]-strictTotalOrder = record{} instance [>]-irreflexivity : Irreflexivity (_>_) Irreflexivity.proof([>]-irreflexivity) = Irreflexivity.proof([<]-irreflexivity) instance [>]-transitivity : Transitivity (_>_) Transitivity.proof([>]-transitivity) = swap(Transitivity.proof([<]-transitivity)) instance [>]-asymmetry : Asymmetry (_>_) Asymmetry.proof([>]-asymmetry) = swap(Asymmetry.proof([<]-asymmetry)) instance [>]-strictOrder : Strict.PartialOrder (_>_) [>]-strictOrder = record{} [<]-of-[𝐒] : ∀{x : ℕ} → (x < 𝐒(x)) [<]-of-[𝐒] = reflexivity(_≤_) [<]-of-[𝟎][𝐒] : ∀{x : ℕ} → (𝟎 < 𝐒(x)) [<]-of-[𝟎][𝐒] {𝟎} = [<]-of-[𝐒] [<]-of-[𝟎][𝐒] {𝐒 x} = succ([≤]-minimum) instance [≤]-of-[𝐒] : ∀{x : ℕ} → (x ≤ 𝐒(x)) [≤]-of-[𝐒] = [≤]-successor(reflexivity(_≤_)) [<][≢]-equivalence : ∀{x} → (x > 0) ↔ (x ≢ 0) [<][≢]-equivalence {x} = [↔]-intro (l{x}) (r{x}) where l : ∀{x} → (x > 0) ← (x ≢ 0) l{𝟎} (x≢𝟎) = [⊥]-elim((x≢𝟎)([≡]-intro)) l{𝐒(x)} (𝐒x≢𝟎) = succ([≤]-minimum) r : ∀{x} → (x > 0) → (x ≢ 0) r{𝟎} () r{𝐒(x)} (𝟏≤𝐒x) (𝐒x≡𝟎) with [≡]-substitutionᵣ (𝐒x≡𝟎) {expr ↦ 1 ≤ expr} (𝟏≤𝐒x) ... | () [≤]-to-[<][≡] : ∀{a b : ℕ} → (a ≤ b) → (a < b)∨(a ≡ b) [≤]-to-[<][≡] {𝟎} {𝟎} ([≤]-minimum) = [∨]-introᵣ([≡]-intro) [≤]-to-[<][≡] {𝟎} {𝐒(b)} ([≤]-minimum) = [∨]-introₗ([<]-minimum) [≤]-to-[<][≡] {𝐒(a)}{𝐒(b)} (succ(a≤b)) with [≤]-to-[<][≡] {a}{b} (a≤b) ... | [∨]-introₗ(a<b) = [∨]-introₗ(succ(a<b)) ... | [∨]-introᵣ(a≡b) = [∨]-introᵣ([≡]-with(𝐒) (a≡b)) [≮][≢]-to-[≰] : ∀{a b : ℕ} → (a ≮ b) → (a ≢ b) → (a ≰ b) [≮][≢]-to-[≰] (a≮b) (a≢b) (a≤b) with [≤]-to-[<][≡] (a≤b) ... | [∨]-introₗ (a<b) = a≮b a<b ... | [∨]-introᵣ (a≡b) = a≢b a≡b [<][≡]-to-[≤] : ∀{a b : ℕ} → (a < b)∨(a ≡ b) → (a ≤ b) [<][≡]-to-[≤] {a} {.a} ([∨]-introᵣ([≡]-intro)) = [≡]-to-[≤] ([≡]-intro) [<][≡]-to-[≤] {a} {b} ([∨]-introₗ(a<b)) = [≤]-predecessor (a<b) instance [<][≤]-sub : (_<_) ⊆₂ (_≤_) [<][≤]-sub = intro [≤]-predecessor instance [>][≥]-sub : (_>_) ⊆₂ (_≥_) [>][≥]-sub = intro(sub₂(_<_)(_≤_)) [≰]-to-[≮] : ∀{x y : ℕ} → (x ≰ y) → (x ≮ y) [≰]-to-[≮] = contrapositiveᵣ (sub₂(_<_)(_≤_)) [≥]-to-[>][≡] : ∀{a b : ℕ} → (a ≥ b) → (a > b)∨(a ≡ b) [≥]-to-[>][≡] {a}{b} (proof) with [≤]-to-[<][≡] {b}{a} (proof) ... | [∨]-introₗ(a<b) = [∨]-introₗ(a<b) ... | [∨]-introᵣ(b≡a) = [∨]-introᵣ(symmetry(_≡_) (b≡a)) [<]-trichotomy : ∀{x y} → (x < y) ∨ (x ≡ y) ∨ (x > y) [<]-trichotomy {x}{y} with converseTotal(_≤_) ⦃ [≤]-totality ⦄ [<]-trichotomy {x}{y} | [∨]-introₗ x≤y with [≤]-to-[<][≡] {x}{y} x≤y [<]-trichotomy {x}{y} | [∨]-introₗ x≤y | [∨]-introₗ x<y = [∨]-introₗ ([∨]-introₗ x<y) [<]-trichotomy {x}{y} | [∨]-introₗ x≤y | [∨]-introᵣ x≡y = [∨]-introₗ ([∨]-introᵣ x≡y) [<]-trichotomy {x}{y} | [∨]-introᵣ y≤x with [≥]-to-[>][≡] {x}{y} y≤x [<]-trichotomy {x}{y} | [∨]-introᵣ y≤x | [∨]-introₗ y<x = [∨]-introᵣ y<x [<]-trichotomy {x}{y} | [∨]-introᵣ y≤x | [∨]-introᵣ y≡x = [∨]-introₗ ([∨]-introᵣ y≡x) [≤][>]-dichotomy : ∀{x y} → (x ≤ y) ∨ (x > y) [≤][>]-dichotomy {x}{y} with [<]-trichotomy {x}{y} [≤][>]-dichotomy {x} {y} | [∨]-introₗ ([∨]-introₗ x<y) = [∨]-introₗ(sub₂(_<_)(_≤_) x<y) [≤][>]-dichotomy {x} {y} | [∨]-introₗ ([∨]-introᵣ x≡y) = [∨]-introₗ(sub₂(_≡_)(_≤_) x≡y) [≤][>]-dichotomy {x} {y} | [∨]-introᵣ x>y = [∨]-introᵣ(x>y) [<][≥]-dichotomy : ∀{x y} → (x < y) ∨ (x ≥ y) [<][≥]-dichotomy {x}{y} = [∨]-symmetry([≤][>]-dichotomy {y}{x}) [≯][≢]-to-[≱] : ∀{a b : ℕ} → (a ≯ b) → (a ≢ b) → (a ≱ b) [≯][≢]-to-[≱] (a≯b) (a≢b) (a≥b) with [≥]-to-[>][≡] (a≥b) ... | [∨]-introₗ (a>b) = a≯b a>b ... | [∨]-introᵣ (a≡b) = a≢b a≡b [>][≡]-to-[≥] : ∀{a b : ℕ} → (a > b)∨(a ≡ b) → (a ≥ b) [>][≡]-to-[≥] {a}{b} ([∨]-introₗ(a<b)) = [<][≡]-to-[≤] {b}{a} ([∨]-introₗ(a<b)) [>][≡]-to-[≥] {a}{b} ([∨]-introᵣ(b≡a)) = [<][≡]-to-[≤] {b}{a} ([∨]-introᵣ(symmetry(_≡_)(b≡a))) [>]-to-[≥] : ∀{a b : ℕ} → (a > b) → (a ≥ b) [>]-to-[≥] {a}{b} (a<b) = [<][≡]-to-[≤] {b}{a} ([∨]-introₗ(a<b)) [≱]-to-[≯] : ∀{x y : ℕ} → (x ≱ y) → (x ≯ y) [≱]-to-[≯] = contrapositiveᵣ [>]-to-[≥] [≮][≯]-to-[≡] : ∀{a b : ℕ} → (a ≮ b) → (a ≯ b) → (a ≡ b) [≮][≯]-to-[≡] {a}{b} (a≮b) (a≯b) with [<]-trichotomy {a}{b} ... | [∨]-introₗ ([∨]-introₗ a<b) = [⊥]-elim(a≮b a<b) ... | [∨]-introₗ ([∨]-introᵣ a≡b) = a≡b ... | [∨]-introᵣ b<a = [⊥]-elim(a≯b b<a) [≮][≢][≯]-not : ∀{a b : ℕ} → (a ≮ b) → (a ≢ b) → (a ≯ b) → ⊥ [≮][≢][≯]-not {a}{b} (a≮b) (a≢b) (a≯b) with [<]-trichotomy {a}{b} ... | [∨]-introₗ ([∨]-introₗ a<b) = a≮b a<b ... | [∨]-introₗ ([∨]-introᵣ a≡b) = a≢b a≡b ... | [∨]-introᵣ b<a = a≯b b<a [≰][≯]-not : ∀{a b : ℕ} → (a ≰ b) → (a ≯ b) → ⊥ [≰][≯]-not {a}{b} (a≰b) (a≯b) = [≮][≢][≯]-not ([≰]-to-[≮] a≰b) ([≰]-to-[≢] a≰b) (a≯b) [≮][≱]-not : ∀{a b : ℕ} → (a ≮ b) → (a ≱ b) → ⊥ [≮][≱]-not {a}{b} (a≮b) (a≱b) = [≮][≢][≯]-not (a≮b) ([≱]-to-[≢] a≱b) ([≱]-to-[≯] a≱b) [<]-non-zero-existence : ∀{a b : ℕ} → (a < b) → (𝟎 < b) [<]-non-zero-existence (succ _) = [<]-of-[𝟎][𝐒] [≢]-to-[<]-of-0ᵣ : ∀{n} → (n ≢ 0) → (0 < n) [≢]-to-[<]-of-0ᵣ {𝟎} p with () ← p [≡]-intro [≢]-to-[<]-of-0ᵣ {𝐒 n} p = succ min [≤][≢]-to-[<] : ∀{a b : ℕ} → (a ≤ b) → (a ≢ b) → (a < b) [≤][≢]-to-[<] {.𝟎} {b} min ne = [≢]-to-[<]-of-0ᵣ (ne ∘ symmetry(_≡_)) [≤][≢]-to-[<] {.(𝐒 _)} {.(𝐒 _)} (succ lt) ne = succ([≤][≢]-to-[<] lt (ne ∘ congruence₁(𝐒))) instance [≤][≡]-subtransitivityₗ : Subtransitivityₗ(_≤_)(_≡_) [≤][≡]-subtransitivityₗ = subrelation-transitivity-to-subtransitivityₗ instance [≤][≡]-subtransitivityᵣ : Subtransitivityᵣ(_≤_)(_≡_) [≤][≡]-subtransitivityᵣ = subrelation-transitivity-to-subtransitivityᵣ instance [≥][≡]-subtransitivityₗ : Subtransitivityₗ(_≥_)(_≡_) [≥][≡]-subtransitivityₗ = subrelation-transitivity-to-subtransitivityₗ instance [≥][≡]-subtransitivityᵣ : Subtransitivityᵣ(_≥_)(_≡_) [≥][≡]-subtransitivityᵣ = subrelation-transitivity-to-subtransitivityᵣ instance [<][≤]-subtransitivityₗ : Subtransitivityₗ(_≤_)(_<_) [<][≤]-subtransitivityₗ = subrelation-transitivity-to-subtransitivityₗ instance [<][≤]-subtransitivityᵣ : Subtransitivityᵣ(_≤_)(_<_) [<][≤]-subtransitivityᵣ = subrelation-transitivity-to-subtransitivityᵣ instance [>][≥]-subtransitivityₗ : Subtransitivityₗ(_≥_)(_>_) [>][≥]-subtransitivityₗ = subrelation-transitivity-to-subtransitivityₗ instance [>][≥]-subtransitivityᵣ : Subtransitivityᵣ(_≥_)(_>_) [>][≥]-subtransitivityᵣ = subrelation-transitivity-to-subtransitivityᵣ instance [>][≡]-subtransitivityₗ : Subtransitivityₗ(_>_)(_≡_) Subtransitivityₗ.proof [>][≡]-subtransitivityₗ = substitute₂ₗ(_>_) ∘ symmetry(_≡_) instance [>][≡]-subtransitivityᵣ : Subtransitivityᵣ(_>_)(_≡_) Subtransitivityᵣ.proof [>][≡]-subtransitivityᵣ = swap(substitute₂ᵣ(_>_)) instance [<][≡]-subtransitivityₗ : Subtransitivityₗ(_<_)(_≡_) Subtransitivityₗ.proof [<][≡]-subtransitivityₗ = substitute₂ₗ(_<_) ∘ symmetry(_≡_) instance [<][≡]-subtransitivityᵣ : Subtransitivityᵣ(_<_)(_≡_) Subtransitivityᵣ.proof [<][≡]-subtransitivityᵣ = swap(substitute₂ᵣ(_<_))
{ "alphanum_fraction": 0.5120604475, "avg_line_length": 36.5092838196, "ext": "agda", "hexsha": "6cbf217dc44fcd80a9bbfbb074eb9473d06b5251", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "70f4fba849f2fd779c5aaa5af122ccb6a5b271ba", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "Lolirofle/stuff-in-agda", "max_forks_repo_path": "Numeral/Natural/Relation/Order/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": "Numeral/Natural/Relation/Order/Proofs.agda", "max_line_length": 158, "max_stars_count": 6, "max_stars_repo_head_hexsha": "70f4fba849f2fd779c5aaa5af122ccb6a5b271ba", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "Lolirofle/stuff-in-agda", "max_stars_repo_path": "Numeral/Natural/Relation/Order/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": 7136, "size": 13764 }
-- Andreas, 2014-05-17 open import Common.Prelude open import Common.Equality postulate bla : ∀ x → x ≡ zero P : Nat → Set p : P zero f : ∀ x → P x f x rewrite bla {!!} = {!!} -- Expected: two interaction points!
{ "alphanum_fraction": 0.6035242291, "avg_line_length": 15.1333333333, "ext": "agda", "hexsha": "5ade8e711d6cc461ed2b0b14db41626745f74212", "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/Issue1110b.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/Issue1110b.agda", "max_line_length": 36, "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/Issue1110b.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": 76, "size": 227 }
-- Andreas, 2018-11-03, issue #3364 -- Andreas, 2019-02-23, issue #3457 -- -- Better error when trying to import with new qualified module name. open import Agda.Builtin.Nat as Builtin.Nat -- WAS: Error: -- Not in scope: -- as at ... -- when scope checking as -- NOW: Warning -- `as' must be followed by an identifier; a qualified name is not allowed here -- when scope checking the declaration -- open import Agda.Builtin.Nat as Builtin.Nat import Agda.Builtin.Sigma as .as -- `as' must be followed by an identifier -- when scope checking the declaration -- import Agda.Builtin.Sigma as .as import Agda.Builtin.String as _ -- `as' must be followed by an identifier; an underscore is not allowed here -- when scope checking the declaration -- import Agda.Builtin.String as _
{ "alphanum_fraction": 0.7227848101, "avg_line_length": 27.2413793103, "ext": "agda", "hexsha": "1d01f2afaf8e4126adb42c23bf7c6e9907f4b600", "lang": "Agda", "max_forks_count": 1, "max_forks_repo_forks_event_max_datetime": "2021-04-01T18:30:09.000Z", "max_forks_repo_forks_event_min_datetime": "2021-04-01T18:30:09.000Z", "max_forks_repo_head_hexsha": "aac88412199dd4cbcb041aab499d8a6b7e3f4a2e", "max_forks_repo_licenses": [ "BSD-3-Clause" ], "max_forks_repo_name": "hborum/agda", "max_forks_repo_path": "test/Succeed/Issue3364.agda", "max_issues_count": 1, "max_issues_repo_head_hexsha": "aac88412199dd4cbcb041aab499d8a6b7e3f4a2e", "max_issues_repo_issues_event_max_datetime": "2020-01-26T18:22:08.000Z", "max_issues_repo_issues_event_min_datetime": "2020-01-26T18:22:08.000Z", "max_issues_repo_licenses": [ "BSD-3-Clause" ], "max_issues_repo_name": "hborum/agda", "max_issues_repo_path": "test/Succeed/Issue3364.agda", "max_line_length": 79, "max_stars_count": 2, "max_stars_repo_head_hexsha": "aac88412199dd4cbcb041aab499d8a6b7e3f4a2e", "max_stars_repo_licenses": [ "BSD-3-Clause" ], "max_stars_repo_name": "hborum/agda", "max_stars_repo_path": "test/Succeed/Issue3364.agda", "max_stars_repo_stars_event_max_datetime": "2020-09-20T00:28:57.000Z", "max_stars_repo_stars_event_min_datetime": "2019-10-29T09:40:30.000Z", "num_tokens": 213, "size": 790 }
module _ where record Semiring (A : Set) : Set where infixl 6 _+_ field _+_ : A → A → A open Semiring {{...}} public infix 4 _≡_ postulate Nat Bool : Set _≡_ : Nat → Nat → Set refl : ∀ {x} → x ≡ x to : ∀ {x} (y : Nat) → x ≡ y trans : {x y z : Nat} → x ≡ y → y ≡ z → x ≡ z instance _ : Semiring Nat _ : Semiring Bool bad : (a b c : Nat) → a + b ≡ c + a bad a b c = trans (to (a + c)) refl -- Should complain about a != c when checking refl, not a missing instance Semiring Nat.
{ "alphanum_fraction": 0.5335892514, "avg_line_length": 19.2962962963, "ext": "agda", "hexsha": "58725d4f9890f4b78f31775b97f57cfcc8e9d5e3", "lang": "Agda", "max_forks_count": 371, "max_forks_repo_forks_event_max_datetime": "2022-03-30T19:00:30.000Z", "max_forks_repo_forks_event_min_datetime": "2015-01-03T14:04:08.000Z", "max_forks_repo_head_hexsha": "7f58030124fa99dfbf8db376659416f3ad8384de", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "cruhland/agda", "max_forks_repo_path": "test/Fail/InstanceErrorMessage.agda", "max_issues_count": 4066, "max_issues_repo_head_hexsha": "7f58030124fa99dfbf8db376659416f3ad8384de", "max_issues_repo_issues_event_max_datetime": "2022-03-31T21:14:49.000Z", "max_issues_repo_issues_event_min_datetime": "2015-01-10T11:24:51.000Z", "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "cruhland/agda", "max_issues_repo_path": "test/Fail/InstanceErrorMessage.agda", "max_line_length": 88, "max_stars_count": 1989, "max_stars_repo_head_hexsha": "7f58030124fa99dfbf8db376659416f3ad8384de", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "cruhland/agda", "max_stars_repo_path": "test/Fail/InstanceErrorMessage.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": 203, "size": 521 }
module Text.Greek.SBLGNT.Col where open import Data.List open import Text.Greek.Bible open import Text.Greek.Script open import Text.Greek.Script.Unicode ΠΡΟΣ-ΚΟΛΟΣΣΑΕΙΣ : List (Word) ΠΡΟΣ-ΚΟΛΟΣΣΑΕΙΣ = word (Π ∷ α ∷ ῦ ∷ ∙λ ∷ ο ∷ ς ∷ []) "Col.1.1" ∷ word (ἀ ∷ π ∷ ό ∷ σ ∷ τ ∷ ο ∷ ∙λ ∷ ο ∷ ς ∷ []) "Col.1.1" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ο ∷ ῦ ∷ []) "Col.1.1" ∷ word (Ἰ ∷ η ∷ σ ∷ ο ∷ ῦ ∷ []) "Col.1.1" ∷ word (δ ∷ ι ∷ ὰ ∷ []) "Col.1.1" ∷ word (θ ∷ ε ∷ ∙λ ∷ ή ∷ μ ∷ α ∷ τ ∷ ο ∷ ς ∷ []) "Col.1.1" ∷ word (θ ∷ ε ∷ ο ∷ ῦ ∷ []) "Col.1.1" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.1.1" ∷ word (Τ ∷ ι ∷ μ ∷ ό ∷ θ ∷ ε ∷ ο ∷ ς ∷ []) "Col.1.1" ∷ word (ὁ ∷ []) "Col.1.1" ∷ word (ἀ ∷ δ ∷ ε ∷ ∙λ ∷ φ ∷ ὸ ∷ ς ∷ []) "Col.1.1" ∷ word (τ ∷ ο ∷ ῖ ∷ ς ∷ []) "Col.1.2" ∷ word (ἐ ∷ ν ∷ []) "Col.1.2" ∷ word (Κ ∷ ο ∷ ∙λ ∷ ο ∷ σ ∷ σ ∷ α ∷ ῖ ∷ ς ∷ []) "Col.1.2" ∷ word (ἁ ∷ γ ∷ ί ∷ ο ∷ ι ∷ ς ∷ []) "Col.1.2" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.1.2" ∷ word (π ∷ ι ∷ σ ∷ τ ∷ ο ∷ ῖ ∷ ς ∷ []) "Col.1.2" ∷ word (ἀ ∷ δ ∷ ε ∷ ∙λ ∷ φ ∷ ο ∷ ῖ ∷ ς ∷ []) "Col.1.2" ∷ word (ἐ ∷ ν ∷ []) "Col.1.2" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ῷ ∷ []) "Col.1.2" ∷ word (χ ∷ ά ∷ ρ ∷ ι ∷ ς ∷ []) "Col.1.2" ∷ word (ὑ ∷ μ ∷ ῖ ∷ ν ∷ []) "Col.1.2" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.1.2" ∷ word (ε ∷ ἰ ∷ ρ ∷ ή ∷ ν ∷ η ∷ []) "Col.1.2" ∷ word (ἀ ∷ π ∷ ὸ ∷ []) "Col.1.2" ∷ word (θ ∷ ε ∷ ο ∷ ῦ ∷ []) "Col.1.2" ∷ word (π ∷ α ∷ τ ∷ ρ ∷ ὸ ∷ ς ∷ []) "Col.1.2" ∷ word (ἡ ∷ μ ∷ ῶ ∷ ν ∷ []) "Col.1.2" ∷ word (Ε ∷ ὐ ∷ χ ∷ α ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ο ∷ ῦ ∷ μ ∷ ε ∷ ν ∷ []) "Col.1.3" ∷ word (τ ∷ ῷ ∷ []) "Col.1.3" ∷ word (θ ∷ ε ∷ ῷ ∷ []) "Col.1.3" ∷ word (π ∷ α ∷ τ ∷ ρ ∷ ὶ ∷ []) "Col.1.3" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "Col.1.3" ∷ word (κ ∷ υ ∷ ρ ∷ ί ∷ ο ∷ υ ∷ []) "Col.1.3" ∷ word (ἡ ∷ μ ∷ ῶ ∷ ν ∷ []) "Col.1.3" ∷ word (Ἰ ∷ η ∷ σ ∷ ο ∷ ῦ ∷ []) "Col.1.3" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ο ∷ ῦ ∷ []) "Col.1.3" ∷ word (π ∷ ά ∷ ν ∷ τ ∷ ο ∷ τ ∷ ε ∷ []) "Col.1.3" ∷ word (π ∷ ε ∷ ρ ∷ ὶ ∷ []) "Col.1.3" ∷ word (ὑ ∷ μ ∷ ῶ ∷ ν ∷ []) "Col.1.3" ∷ word (π ∷ ρ ∷ ο ∷ σ ∷ ε ∷ υ ∷ χ ∷ ό ∷ μ ∷ ε ∷ ν ∷ ο ∷ ι ∷ []) "Col.1.3" ∷ word (ἀ ∷ κ ∷ ο ∷ ύ ∷ σ ∷ α ∷ ν ∷ τ ∷ ε ∷ ς ∷ []) "Col.1.4" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "Col.1.4" ∷ word (π ∷ ί ∷ σ ∷ τ ∷ ι ∷ ν ∷ []) "Col.1.4" ∷ word (ὑ ∷ μ ∷ ῶ ∷ ν ∷ []) "Col.1.4" ∷ word (ἐ ∷ ν ∷ []) "Col.1.4" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ῷ ∷ []) "Col.1.4" ∷ word (Ἰ ∷ η ∷ σ ∷ ο ∷ ῦ ∷ []) "Col.1.4" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.1.4" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "Col.1.4" ∷ word (ἀ ∷ γ ∷ ά ∷ π ∷ η ∷ ν ∷ []) "Col.1.4" ∷ word (ἣ ∷ ν ∷ []) "Col.1.4" ∷ word (ἔ ∷ χ ∷ ε ∷ τ ∷ ε ∷ []) "Col.1.4" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "Col.1.4" ∷ word (π ∷ ά ∷ ν ∷ τ ∷ α ∷ ς ∷ []) "Col.1.4" ∷ word (τ ∷ ο ∷ ὺ ∷ ς ∷ []) "Col.1.4" ∷ word (ἁ ∷ γ ∷ ί ∷ ο ∷ υ ∷ ς ∷ []) "Col.1.4" ∷ word (δ ∷ ι ∷ ὰ ∷ []) "Col.1.5" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "Col.1.5" ∷ word (ἐ ∷ ∙λ ∷ π ∷ ί ∷ δ ∷ α ∷ []) "Col.1.5" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "Col.1.5" ∷ word (ἀ ∷ π ∷ ο ∷ κ ∷ ε ∷ ι ∷ μ ∷ έ ∷ ν ∷ η ∷ ν ∷ []) "Col.1.5" ∷ word (ὑ ∷ μ ∷ ῖ ∷ ν ∷ []) "Col.1.5" ∷ word (ἐ ∷ ν ∷ []) "Col.1.5" ∷ word (τ ∷ ο ∷ ῖ ∷ ς ∷ []) "Col.1.5" ∷ word (ο ∷ ὐ ∷ ρ ∷ α ∷ ν ∷ ο ∷ ῖ ∷ ς ∷ []) "Col.1.5" ∷ word (ἣ ∷ ν ∷ []) "Col.1.5" ∷ word (π ∷ ρ ∷ ο ∷ η ∷ κ ∷ ο ∷ ύ ∷ σ ∷ α ∷ τ ∷ ε ∷ []) "Col.1.5" ∷ word (ἐ ∷ ν ∷ []) "Col.1.5" ∷ word (τ ∷ ῷ ∷ []) "Col.1.5" ∷ word (∙λ ∷ ό ∷ γ ∷ ῳ ∷ []) "Col.1.5" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "Col.1.5" ∷ word (ἀ ∷ ∙λ ∷ η ∷ θ ∷ ε ∷ ί ∷ α ∷ ς ∷ []) "Col.1.5" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "Col.1.5" ∷ word (ε ∷ ὐ ∷ α ∷ γ ∷ γ ∷ ε ∷ ∙λ ∷ ί ∷ ο ∷ υ ∷ []) "Col.1.5" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "Col.1.6" ∷ word (π ∷ α ∷ ρ ∷ ό ∷ ν ∷ τ ∷ ο ∷ ς ∷ []) "Col.1.6" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "Col.1.6" ∷ word (ὑ ∷ μ ∷ ᾶ ∷ ς ∷ []) "Col.1.6" ∷ word (κ ∷ α ∷ θ ∷ ὼ ∷ ς ∷ []) "Col.1.6" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.1.6" ∷ word (ἐ ∷ ν ∷ []) "Col.1.6" ∷ word (π ∷ α ∷ ν ∷ τ ∷ ὶ ∷ []) "Col.1.6" ∷ word (τ ∷ ῷ ∷ []) "Col.1.6" ∷ word (κ ∷ ό ∷ σ ∷ μ ∷ ῳ ∷ []) "Col.1.6" ∷ word (ἐ ∷ σ ∷ τ ∷ ὶ ∷ ν ∷ []) "Col.1.6" ∷ word (κ ∷ α ∷ ρ ∷ π ∷ ο ∷ φ ∷ ο ∷ ρ ∷ ο ∷ ύ ∷ μ ∷ ε ∷ ν ∷ ο ∷ ν ∷ []) "Col.1.6" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.1.6" ∷ word (α ∷ ὐ ∷ ξ ∷ α ∷ ν ∷ ό ∷ μ ∷ ε ∷ ν ∷ ο ∷ ν ∷ []) "Col.1.6" ∷ word (κ ∷ α ∷ θ ∷ ὼ ∷ ς ∷ []) "Col.1.6" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.1.6" ∷ word (ἐ ∷ ν ∷ []) "Col.1.6" ∷ word (ὑ ∷ μ ∷ ῖ ∷ ν ∷ []) "Col.1.6" ∷ word (ἀ ∷ φ ∷ []) "Col.1.6" ∷ word (ἧ ∷ ς ∷ []) "Col.1.6" ∷ word (ἡ ∷ μ ∷ έ ∷ ρ ∷ α ∷ ς ∷ []) "Col.1.6" ∷ word (ἠ ∷ κ ∷ ο ∷ ύ ∷ σ ∷ α ∷ τ ∷ ε ∷ []) "Col.1.6" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.1.6" ∷ word (ἐ ∷ π ∷ έ ∷ γ ∷ ν ∷ ω ∷ τ ∷ ε ∷ []) "Col.1.6" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "Col.1.6" ∷ word (χ ∷ ά ∷ ρ ∷ ι ∷ ν ∷ []) "Col.1.6" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "Col.1.6" ∷ word (θ ∷ ε ∷ ο ∷ ῦ ∷ []) "Col.1.6" ∷ word (ἐ ∷ ν ∷ []) "Col.1.6" ∷ word (ἀ ∷ ∙λ ∷ η ∷ θ ∷ ε ∷ ί ∷ ᾳ ∷ []) "Col.1.6" ∷ word (κ ∷ α ∷ θ ∷ ὼ ∷ ς ∷ []) "Col.1.7" ∷ word (ἐ ∷ μ ∷ ά ∷ θ ∷ ε ∷ τ ∷ ε ∷ []) "Col.1.7" ∷ word (ἀ ∷ π ∷ ὸ ∷ []) "Col.1.7" ∷ word (Ἐ ∷ π ∷ α ∷ φ ∷ ρ ∷ ᾶ ∷ []) "Col.1.7" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "Col.1.7" ∷ word (ἀ ∷ γ ∷ α ∷ π ∷ η ∷ τ ∷ ο ∷ ῦ ∷ []) "Col.1.7" ∷ word (σ ∷ υ ∷ ν ∷ δ ∷ ο ∷ ύ ∷ ∙λ ∷ ο ∷ υ ∷ []) "Col.1.7" ∷ word (ἡ ∷ μ ∷ ῶ ∷ ν ∷ []) "Col.1.7" ∷ word (ὅ ∷ ς ∷ []) "Col.1.7" ∷ word (ἐ ∷ σ ∷ τ ∷ ι ∷ ν ∷ []) "Col.1.7" ∷ word (π ∷ ι ∷ σ ∷ τ ∷ ὸ ∷ ς ∷ []) "Col.1.7" ∷ word (ὑ ∷ π ∷ ὲ ∷ ρ ∷ []) "Col.1.7" ∷ word (ἡ ∷ μ ∷ ῶ ∷ ν ∷ []) "Col.1.7" ∷ word (δ ∷ ι ∷ ά ∷ κ ∷ ο ∷ ν ∷ ο ∷ ς ∷ []) "Col.1.7" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "Col.1.7" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ο ∷ ῦ ∷ []) "Col.1.7" ∷ word (ὁ ∷ []) "Col.1.8" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.1.8" ∷ word (δ ∷ η ∷ ∙λ ∷ ώ ∷ σ ∷ α ∷ ς ∷ []) "Col.1.8" ∷ word (ἡ ∷ μ ∷ ῖ ∷ ν ∷ []) "Col.1.8" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "Col.1.8" ∷ word (ὑ ∷ μ ∷ ῶ ∷ ν ∷ []) "Col.1.8" ∷ word (ἀ ∷ γ ∷ ά ∷ π ∷ η ∷ ν ∷ []) "Col.1.8" ∷ word (ἐ ∷ ν ∷ []) "Col.1.8" ∷ word (π ∷ ν ∷ ε ∷ ύ ∷ μ ∷ α ∷ τ ∷ ι ∷ []) "Col.1.8" ∷ word (Δ ∷ ι ∷ ὰ ∷ []) "Col.1.9" ∷ word (τ ∷ ο ∷ ῦ ∷ τ ∷ ο ∷ []) "Col.1.9" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.1.9" ∷ word (ἡ ∷ μ ∷ ε ∷ ῖ ∷ ς ∷ []) "Col.1.9" ∷ word (ἀ ∷ φ ∷ []) "Col.1.9" ∷ word (ἧ ∷ ς ∷ []) "Col.1.9" ∷ word (ἡ ∷ μ ∷ έ ∷ ρ ∷ α ∷ ς ∷ []) "Col.1.9" ∷ word (ἠ ∷ κ ∷ ο ∷ ύ ∷ σ ∷ α ∷ μ ∷ ε ∷ ν ∷ []) "Col.1.9" ∷ word (ο ∷ ὐ ∷ []) "Col.1.9" ∷ word (π ∷ α ∷ υ ∷ ό ∷ μ ∷ ε ∷ θ ∷ α ∷ []) "Col.1.9" ∷ word (ὑ ∷ π ∷ ὲ ∷ ρ ∷ []) "Col.1.9" ∷ word (ὑ ∷ μ ∷ ῶ ∷ ν ∷ []) "Col.1.9" ∷ word (π ∷ ρ ∷ ο ∷ σ ∷ ε ∷ υ ∷ χ ∷ ό ∷ μ ∷ ε ∷ ν ∷ ο ∷ ι ∷ []) "Col.1.9" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.1.9" ∷ word (α ∷ ἰ ∷ τ ∷ ο ∷ ύ ∷ μ ∷ ε ∷ ν ∷ ο ∷ ι ∷ []) "Col.1.9" ∷ word (ἵ ∷ ν ∷ α ∷ []) "Col.1.9" ∷ word (π ∷ ∙λ ∷ η ∷ ρ ∷ ω ∷ θ ∷ ῆ ∷ τ ∷ ε ∷ []) "Col.1.9" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "Col.1.9" ∷ word (ἐ ∷ π ∷ ί ∷ γ ∷ ν ∷ ω ∷ σ ∷ ι ∷ ν ∷ []) "Col.1.9" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "Col.1.9" ∷ word (θ ∷ ε ∷ ∙λ ∷ ή ∷ μ ∷ α ∷ τ ∷ ο ∷ ς ∷ []) "Col.1.9" ∷ word (α ∷ ὐ ∷ τ ∷ ο ∷ ῦ ∷ []) "Col.1.9" ∷ word (ἐ ∷ ν ∷ []) "Col.1.9" ∷ word (π ∷ ά ∷ σ ∷ ῃ ∷ []) "Col.1.9" ∷ word (σ ∷ ο ∷ φ ∷ ί ∷ ᾳ ∷ []) "Col.1.9" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.1.9" ∷ word (σ ∷ υ ∷ ν ∷ έ ∷ σ ∷ ε ∷ ι ∷ []) "Col.1.9" ∷ word (π ∷ ν ∷ ε ∷ υ ∷ μ ∷ α ∷ τ ∷ ι ∷ κ ∷ ῇ ∷ []) "Col.1.9" ∷ word (π ∷ ε ∷ ρ ∷ ι ∷ π ∷ α ∷ τ ∷ ῆ ∷ σ ∷ α ∷ ι ∷ []) "Col.1.10" ∷ word (ἀ ∷ ξ ∷ ί ∷ ω ∷ ς ∷ []) "Col.1.10" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "Col.1.10" ∷ word (κ ∷ υ ∷ ρ ∷ ί ∷ ο ∷ υ ∷ []) "Col.1.10" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "Col.1.10" ∷ word (π ∷ ᾶ ∷ σ ∷ α ∷ ν ∷ []) "Col.1.10" ∷ word (ἀ ∷ ρ ∷ ε ∷ σ ∷ κ ∷ ε ∷ ί ∷ α ∷ ν ∷ []) "Col.1.10" ∷ word (ἐ ∷ ν ∷ []) "Col.1.10" ∷ word (π ∷ α ∷ ν ∷ τ ∷ ὶ ∷ []) "Col.1.10" ∷ word (ἔ ∷ ρ ∷ γ ∷ ῳ ∷ []) "Col.1.10" ∷ word (ἀ ∷ γ ∷ α ∷ θ ∷ ῷ ∷ []) "Col.1.10" ∷ word (κ ∷ α ∷ ρ ∷ π ∷ ο ∷ φ ∷ ο ∷ ρ ∷ ο ∷ ῦ ∷ ν ∷ τ ∷ ε ∷ ς ∷ []) "Col.1.10" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.1.10" ∷ word (α ∷ ὐ ∷ ξ ∷ α ∷ ν ∷ ό ∷ μ ∷ ε ∷ ν ∷ ο ∷ ι ∷ []) "Col.1.10" ∷ word (τ ∷ ῇ ∷ []) "Col.1.10" ∷ word (ἐ ∷ π ∷ ι ∷ γ ∷ ν ∷ ώ ∷ σ ∷ ε ∷ ι ∷ []) "Col.1.10" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "Col.1.10" ∷ word (θ ∷ ε ∷ ο ∷ ῦ ∷ []) "Col.1.10" ∷ word (ἐ ∷ ν ∷ []) "Col.1.11" ∷ word (π ∷ ά ∷ σ ∷ ῃ ∷ []) "Col.1.11" ∷ word (δ ∷ υ ∷ ν ∷ ά ∷ μ ∷ ε ∷ ι ∷ []) "Col.1.11" ∷ word (δ ∷ υ ∷ ν ∷ α ∷ μ ∷ ο ∷ ύ ∷ μ ∷ ε ∷ ν ∷ ο ∷ ι ∷ []) "Col.1.11" ∷ word (κ ∷ α ∷ τ ∷ ὰ ∷ []) "Col.1.11" ∷ word (τ ∷ ὸ ∷ []) "Col.1.11" ∷ word (κ ∷ ρ ∷ ά ∷ τ ∷ ο ∷ ς ∷ []) "Col.1.11" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "Col.1.11" ∷ word (δ ∷ ό ∷ ξ ∷ η ∷ ς ∷ []) "Col.1.11" ∷ word (α ∷ ὐ ∷ τ ∷ ο ∷ ῦ ∷ []) "Col.1.11" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "Col.1.11" ∷ word (π ∷ ᾶ ∷ σ ∷ α ∷ ν ∷ []) "Col.1.11" ∷ word (ὑ ∷ π ∷ ο ∷ μ ∷ ο ∷ ν ∷ ὴ ∷ ν ∷ []) "Col.1.11" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.1.11" ∷ word (μ ∷ α ∷ κ ∷ ρ ∷ ο ∷ θ ∷ υ ∷ μ ∷ ί ∷ α ∷ ν ∷ []) "Col.1.11" ∷ word (μ ∷ ε ∷ τ ∷ ὰ ∷ []) "Col.1.11" ∷ word (χ ∷ α ∷ ρ ∷ ᾶ ∷ ς ∷ []) "Col.1.11" ∷ word (ε ∷ ὐ ∷ χ ∷ α ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ο ∷ ῦ ∷ ν ∷ τ ∷ ε ∷ ς ∷ []) "Col.1.12" ∷ word (τ ∷ ῷ ∷ []) "Col.1.12" ∷ word (π ∷ α ∷ τ ∷ ρ ∷ ὶ ∷ []) "Col.1.12" ∷ word (τ ∷ ῷ ∷ []) "Col.1.12" ∷ word (ἱ ∷ κ ∷ α ∷ ν ∷ ώ ∷ σ ∷ α ∷ ν ∷ τ ∷ ι ∷ []) "Col.1.12" ∷ word (ὑ ∷ μ ∷ ᾶ ∷ ς ∷ []) "Col.1.12" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "Col.1.12" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "Col.1.12" ∷ word (μ ∷ ε ∷ ρ ∷ ί ∷ δ ∷ α ∷ []) "Col.1.12" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "Col.1.12" ∷ word (κ ∷ ∙λ ∷ ή ∷ ρ ∷ ο ∷ υ ∷ []) "Col.1.12" ∷ word (τ ∷ ῶ ∷ ν ∷ []) "Col.1.12" ∷ word (ἁ ∷ γ ∷ ί ∷ ω ∷ ν ∷ []) "Col.1.12" ∷ word (ἐ ∷ ν ∷ []) "Col.1.12" ∷ word (τ ∷ ῷ ∷ []) "Col.1.12" ∷ word (φ ∷ ω ∷ τ ∷ ί ∷ []) "Col.1.12" ∷ word (ὃ ∷ ς ∷ []) "Col.1.13" ∷ word (ἐ ∷ ρ ∷ ρ ∷ ύ ∷ σ ∷ α ∷ τ ∷ ο ∷ []) "Col.1.13" ∷ word (ἡ ∷ μ ∷ ᾶ ∷ ς ∷ []) "Col.1.13" ∷ word (ἐ ∷ κ ∷ []) "Col.1.13" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "Col.1.13" ∷ word (ἐ ∷ ξ ∷ ο ∷ υ ∷ σ ∷ ί ∷ α ∷ ς ∷ []) "Col.1.13" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "Col.1.13" ∷ word (σ ∷ κ ∷ ό ∷ τ ∷ ο ∷ υ ∷ ς ∷ []) "Col.1.13" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.1.13" ∷ word (μ ∷ ε ∷ τ ∷ έ ∷ σ ∷ τ ∷ η ∷ σ ∷ ε ∷ ν ∷ []) "Col.1.13" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "Col.1.13" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "Col.1.13" ∷ word (β ∷ α ∷ σ ∷ ι ∷ ∙λ ∷ ε ∷ ί ∷ α ∷ ν ∷ []) "Col.1.13" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "Col.1.13" ∷ word (υ ∷ ἱ ∷ ο ∷ ῦ ∷ []) "Col.1.13" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "Col.1.13" ∷ word (ἀ ∷ γ ∷ ά ∷ π ∷ η ∷ ς ∷ []) "Col.1.13" ∷ word (α ∷ ὐ ∷ τ ∷ ο ∷ ῦ ∷ []) "Col.1.13" ∷ word (ἐ ∷ ν ∷ []) "Col.1.14" ∷ word (ᾧ ∷ []) "Col.1.14" ∷ word (ἔ ∷ χ ∷ ο ∷ μ ∷ ε ∷ ν ∷ []) "Col.1.14" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "Col.1.14" ∷ word (ἀ ∷ π ∷ ο ∷ ∙λ ∷ ύ ∷ τ ∷ ρ ∷ ω ∷ σ ∷ ι ∷ ν ∷ []) "Col.1.14" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "Col.1.14" ∷ word (ἄ ∷ φ ∷ ε ∷ σ ∷ ι ∷ ν ∷ []) "Col.1.14" ∷ word (τ ∷ ῶ ∷ ν ∷ []) "Col.1.14" ∷ word (ἁ ∷ μ ∷ α ∷ ρ ∷ τ ∷ ι ∷ ῶ ∷ ν ∷ []) "Col.1.14" ∷ word (ὅ ∷ ς ∷ []) "Col.1.15" ∷ word (ἐ ∷ σ ∷ τ ∷ ι ∷ ν ∷ []) "Col.1.15" ∷ word (ε ∷ ἰ ∷ κ ∷ ὼ ∷ ν ∷ []) "Col.1.15" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "Col.1.15" ∷ word (θ ∷ ε ∷ ο ∷ ῦ ∷ []) "Col.1.15" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "Col.1.15" ∷ word (ἀ ∷ ο ∷ ρ ∷ ά ∷ τ ∷ ο ∷ υ ∷ []) "Col.1.15" ∷ word (π ∷ ρ ∷ ω ∷ τ ∷ ό ∷ τ ∷ ο ∷ κ ∷ ο ∷ ς ∷ []) "Col.1.15" ∷ word (π ∷ ά ∷ σ ∷ η ∷ ς ∷ []) "Col.1.15" ∷ word (κ ∷ τ ∷ ί ∷ σ ∷ ε ∷ ω ∷ ς ∷ []) "Col.1.15" ∷ word (ὅ ∷ τ ∷ ι ∷ []) "Col.1.16" ∷ word (ἐ ∷ ν ∷ []) "Col.1.16" ∷ word (α ∷ ὐ ∷ τ ∷ ῷ ∷ []) "Col.1.16" ∷ word (ἐ ∷ κ ∷ τ ∷ ί ∷ σ ∷ θ ∷ η ∷ []) "Col.1.16" ∷ word (τ ∷ ὰ ∷ []) "Col.1.16" ∷ word (π ∷ ά ∷ ν ∷ τ ∷ α ∷ []) "Col.1.16" ∷ word (ἐ ∷ ν ∷ []) "Col.1.16" ∷ word (τ ∷ ο ∷ ῖ ∷ ς ∷ []) "Col.1.16" ∷ word (ο ∷ ὐ ∷ ρ ∷ α ∷ ν ∷ ο ∷ ῖ ∷ ς ∷ []) "Col.1.16" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.1.16" ∷ word (ἐ ∷ π ∷ ὶ ∷ []) "Col.1.16" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "Col.1.16" ∷ word (γ ∷ ῆ ∷ ς ∷ []) "Col.1.16" ∷ word (τ ∷ ὰ ∷ []) "Col.1.16" ∷ word (ὁ ∷ ρ ∷ α ∷ τ ∷ ὰ ∷ []) "Col.1.16" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.1.16" ∷ word (τ ∷ ὰ ∷ []) "Col.1.16" ∷ word (ἀ ∷ ό ∷ ρ ∷ α ∷ τ ∷ α ∷ []) "Col.1.16" ∷ word (ε ∷ ἴ ∷ τ ∷ ε ∷ []) "Col.1.16" ∷ word (θ ∷ ρ ∷ ό ∷ ν ∷ ο ∷ ι ∷ []) "Col.1.16" ∷ word (ε ∷ ἴ ∷ τ ∷ ε ∷ []) "Col.1.16" ∷ word (κ ∷ υ ∷ ρ ∷ ι ∷ ό ∷ τ ∷ η ∷ τ ∷ ε ∷ ς ∷ []) "Col.1.16" ∷ word (ε ∷ ἴ ∷ τ ∷ ε ∷ []) "Col.1.16" ∷ word (ἀ ∷ ρ ∷ χ ∷ α ∷ ὶ ∷ []) "Col.1.16" ∷ word (ε ∷ ἴ ∷ τ ∷ ε ∷ []) "Col.1.16" ∷ word (ἐ ∷ ξ ∷ ο ∷ υ ∷ σ ∷ ί ∷ α ∷ ι ∷ []) "Col.1.16" ∷ word (τ ∷ ὰ ∷ []) "Col.1.16" ∷ word (π ∷ ά ∷ ν ∷ τ ∷ α ∷ []) "Col.1.16" ∷ word (δ ∷ ι ∷ []) "Col.1.16" ∷ word (α ∷ ὐ ∷ τ ∷ ο ∷ ῦ ∷ []) "Col.1.16" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.1.16" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "Col.1.16" ∷ word (α ∷ ὐ ∷ τ ∷ ὸ ∷ ν ∷ []) "Col.1.16" ∷ word (ἔ ∷ κ ∷ τ ∷ ι ∷ σ ∷ τ ∷ α ∷ ι ∷ []) "Col.1.16" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.1.17" ∷ word (α ∷ ὐ ∷ τ ∷ ό ∷ ς ∷ []) "Col.1.17" ∷ word (ἐ ∷ σ ∷ τ ∷ ι ∷ ν ∷ []) "Col.1.17" ∷ word (π ∷ ρ ∷ ὸ ∷ []) "Col.1.17" ∷ word (π ∷ ά ∷ ν ∷ τ ∷ ω ∷ ν ∷ []) "Col.1.17" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.1.17" ∷ word (τ ∷ ὰ ∷ []) "Col.1.17" ∷ word (π ∷ ά ∷ ν ∷ τ ∷ α ∷ []) "Col.1.17" ∷ word (ἐ ∷ ν ∷ []) "Col.1.17" ∷ word (α ∷ ὐ ∷ τ ∷ ῷ ∷ []) "Col.1.17" ∷ word (σ ∷ υ ∷ ν ∷ έ ∷ σ ∷ τ ∷ η ∷ κ ∷ ε ∷ ν ∷ []) "Col.1.17" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.1.18" ∷ word (α ∷ ὐ ∷ τ ∷ ό ∷ ς ∷ []) "Col.1.18" ∷ word (ἐ ∷ σ ∷ τ ∷ ι ∷ ν ∷ []) "Col.1.18" ∷ word (ἡ ∷ []) "Col.1.18" ∷ word (κ ∷ ε ∷ φ ∷ α ∷ ∙λ ∷ ὴ ∷ []) "Col.1.18" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "Col.1.18" ∷ word (σ ∷ ώ ∷ μ ∷ α ∷ τ ∷ ο ∷ ς ∷ []) "Col.1.18" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "Col.1.18" ∷ word (ἐ ∷ κ ∷ κ ∷ ∙λ ∷ η ∷ σ ∷ ί ∷ α ∷ ς ∷ []) "Col.1.18" ∷ word (ὅ ∷ ς ∷ []) "Col.1.18" ∷ word (ἐ ∷ σ ∷ τ ∷ ι ∷ ν ∷ []) "Col.1.18" ∷ word (ἀ ∷ ρ ∷ χ ∷ ή ∷ []) "Col.1.18" ∷ word (π ∷ ρ ∷ ω ∷ τ ∷ ό ∷ τ ∷ ο ∷ κ ∷ ο ∷ ς ∷ []) "Col.1.18" ∷ word (ἐ ∷ κ ∷ []) "Col.1.18" ∷ word (τ ∷ ῶ ∷ ν ∷ []) "Col.1.18" ∷ word (ν ∷ ε ∷ κ ∷ ρ ∷ ῶ ∷ ν ∷ []) "Col.1.18" ∷ word (ἵ ∷ ν ∷ α ∷ []) "Col.1.18" ∷ word (γ ∷ έ ∷ ν ∷ η ∷ τ ∷ α ∷ ι ∷ []) "Col.1.18" ∷ word (ἐ ∷ ν ∷ []) "Col.1.18" ∷ word (π ∷ ᾶ ∷ σ ∷ ι ∷ ν ∷ []) "Col.1.18" ∷ word (α ∷ ὐ ∷ τ ∷ ὸ ∷ ς ∷ []) "Col.1.18" ∷ word (π ∷ ρ ∷ ω ∷ τ ∷ ε ∷ ύ ∷ ω ∷ ν ∷ []) "Col.1.18" ∷ word (ὅ ∷ τ ∷ ι ∷ []) "Col.1.19" ∷ word (ἐ ∷ ν ∷ []) "Col.1.19" ∷ word (α ∷ ὐ ∷ τ ∷ ῷ ∷ []) "Col.1.19" ∷ word (ε ∷ ὐ ∷ δ ∷ ό ∷ κ ∷ η ∷ σ ∷ ε ∷ ν ∷ []) "Col.1.19" ∷ word (π ∷ ᾶ ∷ ν ∷ []) "Col.1.19" ∷ word (τ ∷ ὸ ∷ []) "Col.1.19" ∷ word (π ∷ ∙λ ∷ ή ∷ ρ ∷ ω ∷ μ ∷ α ∷ []) "Col.1.19" ∷ word (κ ∷ α ∷ τ ∷ ο ∷ ι ∷ κ ∷ ῆ ∷ σ ∷ α ∷ ι ∷ []) "Col.1.19" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.1.20" ∷ word (δ ∷ ι ∷ []) "Col.1.20" ∷ word (α ∷ ὐ ∷ τ ∷ ο ∷ ῦ ∷ []) "Col.1.20" ∷ word (ἀ ∷ π ∷ ο ∷ κ ∷ α ∷ τ ∷ α ∷ ∙λ ∷ ∙λ ∷ ά ∷ ξ ∷ α ∷ ι ∷ []) "Col.1.20" ∷ word (τ ∷ ὰ ∷ []) "Col.1.20" ∷ word (π ∷ ά ∷ ν ∷ τ ∷ α ∷ []) "Col.1.20" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "Col.1.20" ∷ word (α ∷ ὐ ∷ τ ∷ ό ∷ ν ∷ []) "Col.1.20" ∷ word (ε ∷ ἰ ∷ ρ ∷ η ∷ ν ∷ ο ∷ π ∷ ο ∷ ι ∷ ή ∷ σ ∷ α ∷ ς ∷ []) "Col.1.20" ∷ word (δ ∷ ι ∷ ὰ ∷ []) "Col.1.20" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "Col.1.20" ∷ word (α ∷ ἵ ∷ μ ∷ α ∷ τ ∷ ο ∷ ς ∷ []) "Col.1.20" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "Col.1.20" ∷ word (σ ∷ τ ∷ α ∷ υ ∷ ρ ∷ ο ∷ ῦ ∷ []) "Col.1.20" ∷ word (α ∷ ὐ ∷ τ ∷ ο ∷ ῦ ∷ []) "Col.1.20" ∷ word (δ ∷ ι ∷ []) "Col.1.20" ∷ word (α ∷ ὐ ∷ τ ∷ ο ∷ ῦ ∷ []) "Col.1.20" ∷ word (ε ∷ ἴ ∷ τ ∷ ε ∷ []) "Col.1.20" ∷ word (τ ∷ ὰ ∷ []) "Col.1.20" ∷ word (ἐ ∷ π ∷ ὶ ∷ []) "Col.1.20" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "Col.1.20" ∷ word (γ ∷ ῆ ∷ ς ∷ []) "Col.1.20" ∷ word (ε ∷ ἴ ∷ τ ∷ ε ∷ []) "Col.1.20" ∷ word (τ ∷ ὰ ∷ []) "Col.1.20" ∷ word (ἐ ∷ ν ∷ []) "Col.1.20" ∷ word (τ ∷ ο ∷ ῖ ∷ ς ∷ []) "Col.1.20" ∷ word (ο ∷ ὐ ∷ ρ ∷ α ∷ ν ∷ ο ∷ ῖ ∷ ς ∷ []) "Col.1.20" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.1.21" ∷ word (ὑ ∷ μ ∷ ᾶ ∷ ς ∷ []) "Col.1.21" ∷ word (π ∷ ο ∷ τ ∷ ε ∷ []) "Col.1.21" ∷ word (ὄ ∷ ν ∷ τ ∷ α ∷ ς ∷ []) "Col.1.21" ∷ word (ἀ ∷ π ∷ η ∷ ∙λ ∷ ∙λ ∷ ο ∷ τ ∷ ρ ∷ ι ∷ ω ∷ μ ∷ έ ∷ ν ∷ ο ∷ υ ∷ ς ∷ []) "Col.1.21" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.1.21" ∷ word (ἐ ∷ χ ∷ θ ∷ ρ ∷ ο ∷ ὺ ∷ ς ∷ []) "Col.1.21" ∷ word (τ ∷ ῇ ∷ []) "Col.1.21" ∷ word (δ ∷ ι ∷ α ∷ ν ∷ ο ∷ ί ∷ ᾳ ∷ []) "Col.1.21" ∷ word (ἐ ∷ ν ∷ []) "Col.1.21" ∷ word (τ ∷ ο ∷ ῖ ∷ ς ∷ []) "Col.1.21" ∷ word (ἔ ∷ ρ ∷ γ ∷ ο ∷ ι ∷ ς ∷ []) "Col.1.21" ∷ word (τ ∷ ο ∷ ῖ ∷ ς ∷ []) "Col.1.21" ∷ word (π ∷ ο ∷ ν ∷ η ∷ ρ ∷ ο ∷ ῖ ∷ ς ∷ []) "Col.1.21" ∷ word (ν ∷ υ ∷ ν ∷ ὶ ∷ []) "Col.1.22" ∷ word (δ ∷ ὲ ∷ []) "Col.1.22" ∷ word (ἀ ∷ π ∷ ο ∷ κ ∷ α ∷ τ ∷ η ∷ ∙λ ∷ ∙λ ∷ ά ∷ γ ∷ η ∷ τ ∷ ε ∷ []) "Col.1.22" ∷ word (ἐ ∷ ν ∷ []) "Col.1.22" ∷ word (τ ∷ ῷ ∷ []) "Col.1.22" ∷ word (σ ∷ ώ ∷ μ ∷ α ∷ τ ∷ ι ∷ []) "Col.1.22" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "Col.1.22" ∷ word (σ ∷ α ∷ ρ ∷ κ ∷ ὸ ∷ ς ∷ []) "Col.1.22" ∷ word (α ∷ ὐ ∷ τ ∷ ο ∷ ῦ ∷ []) "Col.1.22" ∷ word (δ ∷ ι ∷ ὰ ∷ []) "Col.1.22" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "Col.1.22" ∷ word (θ ∷ α ∷ ν ∷ ά ∷ τ ∷ ο ∷ υ ∷ []) "Col.1.22" ∷ word (π ∷ α ∷ ρ ∷ α ∷ σ ∷ τ ∷ ῆ ∷ σ ∷ α ∷ ι ∷ []) "Col.1.22" ∷ word (ὑ ∷ μ ∷ ᾶ ∷ ς ∷ []) "Col.1.22" ∷ word (ἁ ∷ γ ∷ ί ∷ ο ∷ υ ∷ ς ∷ []) "Col.1.22" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.1.22" ∷ word (ἀ ∷ μ ∷ ώ ∷ μ ∷ ο ∷ υ ∷ ς ∷ []) "Col.1.22" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.1.22" ∷ word (ἀ ∷ ν ∷ ε ∷ γ ∷ κ ∷ ∙λ ∷ ή ∷ τ ∷ ο ∷ υ ∷ ς ∷ []) "Col.1.22" ∷ word (κ ∷ α ∷ τ ∷ ε ∷ ν ∷ ώ ∷ π ∷ ι ∷ ο ∷ ν ∷ []) "Col.1.22" ∷ word (α ∷ ὐ ∷ τ ∷ ο ∷ ῦ ∷ []) "Col.1.22" ∷ word (ε ∷ ἴ ∷ []) "Col.1.23" ∷ word (γ ∷ ε ∷ []) "Col.1.23" ∷ word (ἐ ∷ π ∷ ι ∷ μ ∷ έ ∷ ν ∷ ε ∷ τ ∷ ε ∷ []) "Col.1.23" ∷ word (τ ∷ ῇ ∷ []) "Col.1.23" ∷ word (π ∷ ί ∷ σ ∷ τ ∷ ε ∷ ι ∷ []) "Col.1.23" ∷ word (τ ∷ ε ∷ θ ∷ ε ∷ μ ∷ ε ∷ ∙λ ∷ ι ∷ ω ∷ μ ∷ έ ∷ ν ∷ ο ∷ ι ∷ []) "Col.1.23" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.1.23" ∷ word (ἑ ∷ δ ∷ ρ ∷ α ∷ ῖ ∷ ο ∷ ι ∷ []) "Col.1.23" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.1.23" ∷ word (μ ∷ ὴ ∷ []) "Col.1.23" ∷ word (μ ∷ ε ∷ τ ∷ α ∷ κ ∷ ι ∷ ν ∷ ο ∷ ύ ∷ μ ∷ ε ∷ ν ∷ ο ∷ ι ∷ []) "Col.1.23" ∷ word (ἀ ∷ π ∷ ὸ ∷ []) "Col.1.23" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "Col.1.23" ∷ word (ἐ ∷ ∙λ ∷ π ∷ ί ∷ δ ∷ ο ∷ ς ∷ []) "Col.1.23" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "Col.1.23" ∷ word (ε ∷ ὐ ∷ α ∷ γ ∷ γ ∷ ε ∷ ∙λ ∷ ί ∷ ο ∷ υ ∷ []) "Col.1.23" ∷ word (ο ∷ ὗ ∷ []) "Col.1.23" ∷ word (ἠ ∷ κ ∷ ο ∷ ύ ∷ σ ∷ α ∷ τ ∷ ε ∷ []) "Col.1.23" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "Col.1.23" ∷ word (κ ∷ η ∷ ρ ∷ υ ∷ χ ∷ θ ∷ έ ∷ ν ∷ τ ∷ ο ∷ ς ∷ []) "Col.1.23" ∷ word (ἐ ∷ ν ∷ []) "Col.1.23" ∷ word (π ∷ ά ∷ σ ∷ ῃ ∷ []) "Col.1.23" ∷ word (κ ∷ τ ∷ ί ∷ σ ∷ ε ∷ ι ∷ []) "Col.1.23" ∷ word (τ ∷ ῇ ∷ []) "Col.1.23" ∷ word (ὑ ∷ π ∷ ὸ ∷ []) "Col.1.23" ∷ word (τ ∷ ὸ ∷ ν ∷ []) "Col.1.23" ∷ word (ο ∷ ὐ ∷ ρ ∷ α ∷ ν ∷ ό ∷ ν ∷ []) "Col.1.23" ∷ word (ο ∷ ὗ ∷ []) "Col.1.23" ∷ word (ἐ ∷ γ ∷ ε ∷ ν ∷ ό ∷ μ ∷ η ∷ ν ∷ []) "Col.1.23" ∷ word (ἐ ∷ γ ∷ ὼ ∷ []) "Col.1.23" ∷ word (Π ∷ α ∷ ῦ ∷ ∙λ ∷ ο ∷ ς ∷ []) "Col.1.23" ∷ word (δ ∷ ι ∷ ά ∷ κ ∷ ο ∷ ν ∷ ο ∷ ς ∷ []) "Col.1.23" ∷ word (Ν ∷ ῦ ∷ ν ∷ []) "Col.1.24" ∷ word (χ ∷ α ∷ ί ∷ ρ ∷ ω ∷ []) "Col.1.24" ∷ word (ἐ ∷ ν ∷ []) "Col.1.24" ∷ word (τ ∷ ο ∷ ῖ ∷ ς ∷ []) "Col.1.24" ∷ word (π ∷ α ∷ θ ∷ ή ∷ μ ∷ α ∷ σ ∷ ι ∷ ν ∷ []) "Col.1.24" ∷ word (ὑ ∷ π ∷ ὲ ∷ ρ ∷ []) "Col.1.24" ∷ word (ὑ ∷ μ ∷ ῶ ∷ ν ∷ []) "Col.1.24" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.1.24" ∷ word (ἀ ∷ ν ∷ τ ∷ α ∷ ν ∷ α ∷ π ∷ ∙λ ∷ η ∷ ρ ∷ ῶ ∷ []) "Col.1.24" ∷ word (τ ∷ ὰ ∷ []) "Col.1.24" ∷ word (ὑ ∷ σ ∷ τ ∷ ε ∷ ρ ∷ ή ∷ μ ∷ α ∷ τ ∷ α ∷ []) "Col.1.24" ∷ word (τ ∷ ῶ ∷ ν ∷ []) "Col.1.24" ∷ word (θ ∷ ∙λ ∷ ί ∷ ψ ∷ ε ∷ ω ∷ ν ∷ []) "Col.1.24" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "Col.1.24" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ο ∷ ῦ ∷ []) "Col.1.24" ∷ word (ἐ ∷ ν ∷ []) "Col.1.24" ∷ word (τ ∷ ῇ ∷ []) "Col.1.24" ∷ word (σ ∷ α ∷ ρ ∷ κ ∷ ί ∷ []) "Col.1.24" ∷ word (μ ∷ ο ∷ υ ∷ []) "Col.1.24" ∷ word (ὑ ∷ π ∷ ὲ ∷ ρ ∷ []) "Col.1.24" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "Col.1.24" ∷ word (σ ∷ ώ ∷ μ ∷ α ∷ τ ∷ ο ∷ ς ∷ []) "Col.1.24" ∷ word (α ∷ ὐ ∷ τ ∷ ο ∷ ῦ ∷ []) "Col.1.24" ∷ word (ὅ ∷ []) "Col.1.24" ∷ word (ἐ ∷ σ ∷ τ ∷ ι ∷ ν ∷ []) "Col.1.24" ∷ word (ἡ ∷ []) "Col.1.24" ∷ word (ἐ ∷ κ ∷ κ ∷ ∙λ ∷ η ∷ σ ∷ ί ∷ α ∷ []) "Col.1.24" ∷ word (ἧ ∷ ς ∷ []) "Col.1.25" ∷ word (ἐ ∷ γ ∷ ε ∷ ν ∷ ό ∷ μ ∷ η ∷ ν ∷ []) "Col.1.25" ∷ word (ἐ ∷ γ ∷ ὼ ∷ []) "Col.1.25" ∷ word (δ ∷ ι ∷ ά ∷ κ ∷ ο ∷ ν ∷ ο ∷ ς ∷ []) "Col.1.25" ∷ word (κ ∷ α ∷ τ ∷ ὰ ∷ []) "Col.1.25" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "Col.1.25" ∷ word (ο ∷ ἰ ∷ κ ∷ ο ∷ ν ∷ ο ∷ μ ∷ ί ∷ α ∷ ν ∷ []) "Col.1.25" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "Col.1.25" ∷ word (θ ∷ ε ∷ ο ∷ ῦ ∷ []) "Col.1.25" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "Col.1.25" ∷ word (δ ∷ ο ∷ θ ∷ ε ∷ ῖ ∷ σ ∷ ά ∷ ν ∷ []) "Col.1.25" ∷ word (μ ∷ ο ∷ ι ∷ []) "Col.1.25" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "Col.1.25" ∷ word (ὑ ∷ μ ∷ ᾶ ∷ ς ∷ []) "Col.1.25" ∷ word (π ∷ ∙λ ∷ η ∷ ρ ∷ ῶ ∷ σ ∷ α ∷ ι ∷ []) "Col.1.25" ∷ word (τ ∷ ὸ ∷ ν ∷ []) "Col.1.25" ∷ word (∙λ ∷ ό ∷ γ ∷ ο ∷ ν ∷ []) "Col.1.25" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "Col.1.25" ∷ word (θ ∷ ε ∷ ο ∷ ῦ ∷ []) "Col.1.25" ∷ word (τ ∷ ὸ ∷ []) "Col.1.26" ∷ word (μ ∷ υ ∷ σ ∷ τ ∷ ή ∷ ρ ∷ ι ∷ ο ∷ ν ∷ []) "Col.1.26" ∷ word (τ ∷ ὸ ∷ []) "Col.1.26" ∷ word (ἀ ∷ π ∷ ο ∷ κ ∷ ε ∷ κ ∷ ρ ∷ υ ∷ μ ∷ μ ∷ έ ∷ ν ∷ ο ∷ ν ∷ []) "Col.1.26" ∷ word (ἀ ∷ π ∷ ὸ ∷ []) "Col.1.26" ∷ word (τ ∷ ῶ ∷ ν ∷ []) "Col.1.26" ∷ word (α ∷ ἰ ∷ ώ ∷ ν ∷ ω ∷ ν ∷ []) "Col.1.26" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.1.26" ∷ word (ἀ ∷ π ∷ ὸ ∷ []) "Col.1.26" ∷ word (τ ∷ ῶ ∷ ν ∷ []) "Col.1.26" ∷ word (γ ∷ ε ∷ ν ∷ ε ∷ ῶ ∷ ν ∷ []) "Col.1.26" ∷ word (ν ∷ ῦ ∷ ν ∷ []) "Col.1.26" ∷ word (δ ∷ ὲ ∷ []) "Col.1.26" ∷ word (ἐ ∷ φ ∷ α ∷ ν ∷ ε ∷ ρ ∷ ώ ∷ θ ∷ η ∷ []) "Col.1.26" ∷ word (τ ∷ ο ∷ ῖ ∷ ς ∷ []) "Col.1.26" ∷ word (ἁ ∷ γ ∷ ί ∷ ο ∷ ι ∷ ς ∷ []) "Col.1.26" ∷ word (α ∷ ὐ ∷ τ ∷ ο ∷ ῦ ∷ []) "Col.1.26" ∷ word (ο ∷ ἷ ∷ ς ∷ []) "Col.1.27" ∷ word (ἠ ∷ θ ∷ έ ∷ ∙λ ∷ η ∷ σ ∷ ε ∷ ν ∷ []) "Col.1.27" ∷ word (ὁ ∷ []) "Col.1.27" ∷ word (θ ∷ ε ∷ ὸ ∷ ς ∷ []) "Col.1.27" ∷ word (γ ∷ ν ∷ ω ∷ ρ ∷ ί ∷ σ ∷ α ∷ ι ∷ []) "Col.1.27" ∷ word (τ ∷ ί ∷ []) "Col.1.27" ∷ word (τ ∷ ὸ ∷ []) "Col.1.27" ∷ word (π ∷ ∙λ ∷ ο ∷ ῦ ∷ τ ∷ ο ∷ ς ∷ []) "Col.1.27" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "Col.1.27" ∷ word (δ ∷ ό ∷ ξ ∷ η ∷ ς ∷ []) "Col.1.27" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "Col.1.27" ∷ word (μ ∷ υ ∷ σ ∷ τ ∷ η ∷ ρ ∷ ί ∷ ο ∷ υ ∷ []) "Col.1.27" ∷ word (τ ∷ ο ∷ ύ ∷ τ ∷ ο ∷ υ ∷ []) "Col.1.27" ∷ word (ἐ ∷ ν ∷ []) "Col.1.27" ∷ word (τ ∷ ο ∷ ῖ ∷ ς ∷ []) "Col.1.27" ∷ word (ἔ ∷ θ ∷ ν ∷ ε ∷ σ ∷ ι ∷ ν ∷ []) "Col.1.27" ∷ word (ὅ ∷ []) "Col.1.27" ∷ word (ἐ ∷ σ ∷ τ ∷ ι ∷ ν ∷ []) "Col.1.27" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ὸ ∷ ς ∷ []) "Col.1.27" ∷ word (ἐ ∷ ν ∷ []) "Col.1.27" ∷ word (ὑ ∷ μ ∷ ῖ ∷ ν ∷ []) "Col.1.27" ∷ word (ἡ ∷ []) "Col.1.27" ∷ word (ἐ ∷ ∙λ ∷ π ∷ ὶ ∷ ς ∷ []) "Col.1.27" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "Col.1.27" ∷ word (δ ∷ ό ∷ ξ ∷ η ∷ ς ∷ []) "Col.1.27" ∷ word (ὃ ∷ ν ∷ []) "Col.1.28" ∷ word (ἡ ∷ μ ∷ ε ∷ ῖ ∷ ς ∷ []) "Col.1.28" ∷ word (κ ∷ α ∷ τ ∷ α ∷ γ ∷ γ ∷ έ ∷ ∙λ ∷ ∙λ ∷ ο ∷ μ ∷ ε ∷ ν ∷ []) "Col.1.28" ∷ word (ν ∷ ο ∷ υ ∷ θ ∷ ε ∷ τ ∷ ο ∷ ῦ ∷ ν ∷ τ ∷ ε ∷ ς ∷ []) "Col.1.28" ∷ word (π ∷ ά ∷ ν ∷ τ ∷ α ∷ []) "Col.1.28" ∷ word (ἄ ∷ ν ∷ θ ∷ ρ ∷ ω ∷ π ∷ ο ∷ ν ∷ []) "Col.1.28" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.1.28" ∷ word (δ ∷ ι ∷ δ ∷ ά ∷ σ ∷ κ ∷ ο ∷ ν ∷ τ ∷ ε ∷ ς ∷ []) "Col.1.28" ∷ word (π ∷ ά ∷ ν ∷ τ ∷ α ∷ []) "Col.1.28" ∷ word (ἄ ∷ ν ∷ θ ∷ ρ ∷ ω ∷ π ∷ ο ∷ ν ∷ []) "Col.1.28" ∷ word (ἐ ∷ ν ∷ []) "Col.1.28" ∷ word (π ∷ ά ∷ σ ∷ ῃ ∷ []) "Col.1.28" ∷ word (σ ∷ ο ∷ φ ∷ ί ∷ ᾳ ∷ []) "Col.1.28" ∷ word (ἵ ∷ ν ∷ α ∷ []) "Col.1.28" ∷ word (π ∷ α ∷ ρ ∷ α ∷ σ ∷ τ ∷ ή ∷ σ ∷ ω ∷ μ ∷ ε ∷ ν ∷ []) "Col.1.28" ∷ word (π ∷ ά ∷ ν ∷ τ ∷ α ∷ []) "Col.1.28" ∷ word (ἄ ∷ ν ∷ θ ∷ ρ ∷ ω ∷ π ∷ ο ∷ ν ∷ []) "Col.1.28" ∷ word (τ ∷ έ ∷ ∙λ ∷ ε ∷ ι ∷ ο ∷ ν ∷ []) "Col.1.28" ∷ word (ἐ ∷ ν ∷ []) "Col.1.28" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ῷ ∷ []) "Col.1.28" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "Col.1.29" ∷ word (ὃ ∷ []) "Col.1.29" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.1.29" ∷ word (κ ∷ ο ∷ π ∷ ι ∷ ῶ ∷ []) "Col.1.29" ∷ word (ἀ ∷ γ ∷ ω ∷ ν ∷ ι ∷ ζ ∷ ό ∷ μ ∷ ε ∷ ν ∷ ο ∷ ς ∷ []) "Col.1.29" ∷ word (κ ∷ α ∷ τ ∷ ὰ ∷ []) "Col.1.29" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "Col.1.29" ∷ word (ἐ ∷ ν ∷ έ ∷ ρ ∷ γ ∷ ε ∷ ι ∷ α ∷ ν ∷ []) "Col.1.29" ∷ word (α ∷ ὐ ∷ τ ∷ ο ∷ ῦ ∷ []) "Col.1.29" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "Col.1.29" ∷ word (ἐ ∷ ν ∷ ε ∷ ρ ∷ γ ∷ ο ∷ υ ∷ μ ∷ έ ∷ ν ∷ η ∷ ν ∷ []) "Col.1.29" ∷ word (ἐ ∷ ν ∷ []) "Col.1.29" ∷ word (ἐ ∷ μ ∷ ο ∷ ὶ ∷ []) "Col.1.29" ∷ word (ἐ ∷ ν ∷ []) "Col.1.29" ∷ word (δ ∷ υ ∷ ν ∷ ά ∷ μ ∷ ε ∷ ι ∷ []) "Col.1.29" ∷ word (Θ ∷ έ ∷ ∙λ ∷ ω ∷ []) "Col.2.1" ∷ word (γ ∷ ὰ ∷ ρ ∷ []) "Col.2.1" ∷ word (ὑ ∷ μ ∷ ᾶ ∷ ς ∷ []) "Col.2.1" ∷ word (ε ∷ ἰ ∷ δ ∷ έ ∷ ν ∷ α ∷ ι ∷ []) "Col.2.1" ∷ word (ἡ ∷ ∙λ ∷ ί ∷ κ ∷ ο ∷ ν ∷ []) "Col.2.1" ∷ word (ἀ ∷ γ ∷ ῶ ∷ ν ∷ α ∷ []) "Col.2.1" ∷ word (ἔ ∷ χ ∷ ω ∷ []) "Col.2.1" ∷ word (ὑ ∷ π ∷ ὲ ∷ ρ ∷ []) "Col.2.1" ∷ word (ὑ ∷ μ ∷ ῶ ∷ ν ∷ []) "Col.2.1" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.2.1" ∷ word (τ ∷ ῶ ∷ ν ∷ []) "Col.2.1" ∷ word (ἐ ∷ ν ∷ []) "Col.2.1" ∷ word (Λ ∷ α ∷ ο ∷ δ ∷ ι ∷ κ ∷ ε ∷ ί ∷ ᾳ ∷ []) "Col.2.1" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.2.1" ∷ word (ὅ ∷ σ ∷ ο ∷ ι ∷ []) "Col.2.1" ∷ word (ο ∷ ὐ ∷ χ ∷ []) "Col.2.1" ∷ word (ἑ ∷ ό ∷ ρ ∷ α ∷ κ ∷ α ∷ ν ∷ []) "Col.2.1" ∷ word (τ ∷ ὸ ∷ []) "Col.2.1" ∷ word (π ∷ ρ ∷ ό ∷ σ ∷ ω ∷ π ∷ ό ∷ ν ∷ []) "Col.2.1" ∷ word (μ ∷ ο ∷ υ ∷ []) "Col.2.1" ∷ word (ἐ ∷ ν ∷ []) "Col.2.1" ∷ word (σ ∷ α ∷ ρ ∷ κ ∷ ί ∷ []) "Col.2.1" ∷ word (ἵ ∷ ν ∷ α ∷ []) "Col.2.2" ∷ word (π ∷ α ∷ ρ ∷ α ∷ κ ∷ ∙λ ∷ η ∷ θ ∷ ῶ ∷ σ ∷ ι ∷ ν ∷ []) "Col.2.2" ∷ word (α ∷ ἱ ∷ []) "Col.2.2" ∷ word (κ ∷ α ∷ ρ ∷ δ ∷ ί ∷ α ∷ ι ∷ []) "Col.2.2" ∷ word (α ∷ ὐ ∷ τ ∷ ῶ ∷ ν ∷ []) "Col.2.2" ∷ word (σ ∷ υ ∷ μ ∷ β ∷ ι ∷ β ∷ α ∷ σ ∷ θ ∷ έ ∷ ν ∷ τ ∷ ε ∷ ς ∷ []) "Col.2.2" ∷ word (ἐ ∷ ν ∷ []) "Col.2.2" ∷ word (ἀ ∷ γ ∷ ά ∷ π ∷ ῃ ∷ []) "Col.2.2" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.2.2" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "Col.2.2" ∷ word (π ∷ ᾶ ∷ ν ∷ []) "Col.2.2" ∷ word (π ∷ ∙λ ∷ ο ∷ ῦ ∷ τ ∷ ο ∷ ς ∷ []) "Col.2.2" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "Col.2.2" ∷ word (π ∷ ∙λ ∷ η ∷ ρ ∷ ο ∷ φ ∷ ο ∷ ρ ∷ ί ∷ α ∷ ς ∷ []) "Col.2.2" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "Col.2.2" ∷ word (σ ∷ υ ∷ ν ∷ έ ∷ σ ∷ ε ∷ ω ∷ ς ∷ []) "Col.2.2" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "Col.2.2" ∷ word (ἐ ∷ π ∷ ί ∷ γ ∷ ν ∷ ω ∷ σ ∷ ι ∷ ν ∷ []) "Col.2.2" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "Col.2.2" ∷ word (μ ∷ υ ∷ σ ∷ τ ∷ η ∷ ρ ∷ ί ∷ ο ∷ υ ∷ []) "Col.2.2" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "Col.2.2" ∷ word (θ ∷ ε ∷ ο ∷ ῦ ∷ []) "Col.2.2" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ο ∷ ῦ ∷ []) "Col.2.2" ∷ word (ἐ ∷ ν ∷ []) "Col.2.3" ∷ word (ᾧ ∷ []) "Col.2.3" ∷ word (ε ∷ ἰ ∷ σ ∷ ι ∷ ν ∷ []) "Col.2.3" ∷ word (π ∷ ά ∷ ν ∷ τ ∷ ε ∷ ς ∷ []) "Col.2.3" ∷ word (ο ∷ ἱ ∷ []) "Col.2.3" ∷ word (θ ∷ η ∷ σ ∷ α ∷ υ ∷ ρ ∷ ο ∷ ὶ ∷ []) "Col.2.3" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "Col.2.3" ∷ word (σ ∷ ο ∷ φ ∷ ί ∷ α ∷ ς ∷ []) "Col.2.3" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.2.3" ∷ word (γ ∷ ν ∷ ώ ∷ σ ∷ ε ∷ ω ∷ ς ∷ []) "Col.2.3" ∷ word (ἀ ∷ π ∷ ό ∷ κ ∷ ρ ∷ υ ∷ φ ∷ ο ∷ ι ∷ []) "Col.2.3" ∷ word (τ ∷ ο ∷ ῦ ∷ τ ∷ ο ∷ []) "Col.2.4" ∷ word (∙λ ∷ έ ∷ γ ∷ ω ∷ []) "Col.2.4" ∷ word (ἵ ∷ ν ∷ α ∷ []) "Col.2.4" ∷ word (μ ∷ η ∷ δ ∷ ε ∷ ὶ ∷ ς ∷ []) "Col.2.4" ∷ word (ὑ ∷ μ ∷ ᾶ ∷ ς ∷ []) "Col.2.4" ∷ word (π ∷ α ∷ ρ ∷ α ∷ ∙λ ∷ ο ∷ γ ∷ ί ∷ ζ ∷ η ∷ τ ∷ α ∷ ι ∷ []) "Col.2.4" ∷ word (ἐ ∷ ν ∷ []) "Col.2.4" ∷ word (π ∷ ι ∷ θ ∷ α ∷ ν ∷ ο ∷ ∙λ ∷ ο ∷ γ ∷ ί ∷ ᾳ ∷ []) "Col.2.4" ∷ word (ε ∷ ἰ ∷ []) "Col.2.5" ∷ word (γ ∷ ὰ ∷ ρ ∷ []) "Col.2.5" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.2.5" ∷ word (τ ∷ ῇ ∷ []) "Col.2.5" ∷ word (σ ∷ α ∷ ρ ∷ κ ∷ ὶ ∷ []) "Col.2.5" ∷ word (ἄ ∷ π ∷ ε ∷ ι ∷ μ ∷ ι ∷ []) "Col.2.5" ∷ word (ἀ ∷ ∙λ ∷ ∙λ ∷ ὰ ∷ []) "Col.2.5" ∷ word (τ ∷ ῷ ∷ []) "Col.2.5" ∷ word (π ∷ ν ∷ ε ∷ ύ ∷ μ ∷ α ∷ τ ∷ ι ∷ []) "Col.2.5" ∷ word (σ ∷ ὺ ∷ ν ∷ []) "Col.2.5" ∷ word (ὑ ∷ μ ∷ ῖ ∷ ν ∷ []) "Col.2.5" ∷ word (ε ∷ ἰ ∷ μ ∷ ι ∷ []) "Col.2.5" ∷ word (χ ∷ α ∷ ί ∷ ρ ∷ ω ∷ ν ∷ []) "Col.2.5" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.2.5" ∷ word (β ∷ ∙λ ∷ έ ∷ π ∷ ω ∷ ν ∷ []) "Col.2.5" ∷ word (ὑ ∷ μ ∷ ῶ ∷ ν ∷ []) "Col.2.5" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "Col.2.5" ∷ word (τ ∷ ά ∷ ξ ∷ ι ∷ ν ∷ []) "Col.2.5" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.2.5" ∷ word (τ ∷ ὸ ∷ []) "Col.2.5" ∷ word (σ ∷ τ ∷ ε ∷ ρ ∷ έ ∷ ω ∷ μ ∷ α ∷ []) "Col.2.5" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "Col.2.5" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "Col.2.5" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ὸ ∷ ν ∷ []) "Col.2.5" ∷ word (π ∷ ί ∷ σ ∷ τ ∷ ε ∷ ω ∷ ς ∷ []) "Col.2.5" ∷ word (ὑ ∷ μ ∷ ῶ ∷ ν ∷ []) "Col.2.5" ∷ word (Ὡ ∷ ς ∷ []) "Col.2.6" ∷ word (ο ∷ ὖ ∷ ν ∷ []) "Col.2.6" ∷ word (π ∷ α ∷ ρ ∷ ε ∷ ∙λ ∷ ά ∷ β ∷ ε ∷ τ ∷ ε ∷ []) "Col.2.6" ∷ word (τ ∷ ὸ ∷ ν ∷ []) "Col.2.6" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ὸ ∷ ν ∷ []) "Col.2.6" ∷ word (Ἰ ∷ η ∷ σ ∷ ο ∷ ῦ ∷ ν ∷ []) "Col.2.6" ∷ word (τ ∷ ὸ ∷ ν ∷ []) "Col.2.6" ∷ word (κ ∷ ύ ∷ ρ ∷ ι ∷ ο ∷ ν ∷ []) "Col.2.6" ∷ word (ἐ ∷ ν ∷ []) "Col.2.6" ∷ word (α ∷ ὐ ∷ τ ∷ ῷ ∷ []) "Col.2.6" ∷ word (π ∷ ε ∷ ρ ∷ ι ∷ π ∷ α ∷ τ ∷ ε ∷ ῖ ∷ τ ∷ ε ∷ []) "Col.2.6" ∷ word (ἐ ∷ ρ ∷ ρ ∷ ι ∷ ζ ∷ ω ∷ μ ∷ έ ∷ ν ∷ ο ∷ ι ∷ []) "Col.2.7" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.2.7" ∷ word (ἐ ∷ π ∷ ο ∷ ι ∷ κ ∷ ο ∷ δ ∷ ο ∷ μ ∷ ο ∷ ύ ∷ μ ∷ ε ∷ ν ∷ ο ∷ ι ∷ []) "Col.2.7" ∷ word (ἐ ∷ ν ∷ []) "Col.2.7" ∷ word (α ∷ ὐ ∷ τ ∷ ῷ ∷ []) "Col.2.7" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.2.7" ∷ word (β ∷ ε ∷ β ∷ α ∷ ι ∷ ο ∷ ύ ∷ μ ∷ ε ∷ ν ∷ ο ∷ ι ∷ []) "Col.2.7" ∷ word (τ ∷ ῇ ∷ []) "Col.2.7" ∷ word (π ∷ ί ∷ σ ∷ τ ∷ ε ∷ ι ∷ []) "Col.2.7" ∷ word (κ ∷ α ∷ θ ∷ ὼ ∷ ς ∷ []) "Col.2.7" ∷ word (ἐ ∷ δ ∷ ι ∷ δ ∷ ά ∷ χ ∷ θ ∷ η ∷ τ ∷ ε ∷ []) "Col.2.7" ∷ word (π ∷ ε ∷ ρ ∷ ι ∷ σ ∷ σ ∷ ε ∷ ύ ∷ ο ∷ ν ∷ τ ∷ ε ∷ ς ∷ []) "Col.2.7" ∷ word (ἐ ∷ ν ∷ []) "Col.2.7" ∷ word (ε ∷ ὐ ∷ χ ∷ α ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ί ∷ ᾳ ∷ []) "Col.2.7" ∷ word (Β ∷ ∙λ ∷ έ ∷ π ∷ ε ∷ τ ∷ ε ∷ []) "Col.2.8" ∷ word (μ ∷ ή ∷ []) "Col.2.8" ∷ word (τ ∷ ι ∷ ς ∷ []) "Col.2.8" ∷ word (ὑ ∷ μ ∷ ᾶ ∷ ς ∷ []) "Col.2.8" ∷ word (ἔ ∷ σ ∷ τ ∷ α ∷ ι ∷ []) "Col.2.8" ∷ word (ὁ ∷ []) "Col.2.8" ∷ word (σ ∷ υ ∷ ∙λ ∷ α ∷ γ ∷ ω ∷ γ ∷ ῶ ∷ ν ∷ []) "Col.2.8" ∷ word (δ ∷ ι ∷ ὰ ∷ []) "Col.2.8" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "Col.2.8" ∷ word (φ ∷ ι ∷ ∙λ ∷ ο ∷ σ ∷ ο ∷ φ ∷ ί ∷ α ∷ ς ∷ []) "Col.2.8" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.2.8" ∷ word (κ ∷ ε ∷ ν ∷ ῆ ∷ ς ∷ []) "Col.2.8" ∷ word (ἀ ∷ π ∷ ά ∷ τ ∷ η ∷ ς ∷ []) "Col.2.8" ∷ word (κ ∷ α ∷ τ ∷ ὰ ∷ []) "Col.2.8" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "Col.2.8" ∷ word (π ∷ α ∷ ρ ∷ ά ∷ δ ∷ ο ∷ σ ∷ ι ∷ ν ∷ []) "Col.2.8" ∷ word (τ ∷ ῶ ∷ ν ∷ []) "Col.2.8" ∷ word (ἀ ∷ ν ∷ θ ∷ ρ ∷ ώ ∷ π ∷ ω ∷ ν ∷ []) "Col.2.8" ∷ word (κ ∷ α ∷ τ ∷ ὰ ∷ []) "Col.2.8" ∷ word (τ ∷ ὰ ∷ []) "Col.2.8" ∷ word (σ ∷ τ ∷ ο ∷ ι ∷ χ ∷ ε ∷ ῖ ∷ α ∷ []) "Col.2.8" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "Col.2.8" ∷ word (κ ∷ ό ∷ σ ∷ μ ∷ ο ∷ υ ∷ []) "Col.2.8" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.2.8" ∷ word (ο ∷ ὐ ∷ []) "Col.2.8" ∷ word (κ ∷ α ∷ τ ∷ ὰ ∷ []) "Col.2.8" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ό ∷ ν ∷ []) "Col.2.8" ∷ word (ὅ ∷ τ ∷ ι ∷ []) "Col.2.9" ∷ word (ἐ ∷ ν ∷ []) "Col.2.9" ∷ word (α ∷ ὐ ∷ τ ∷ ῷ ∷ []) "Col.2.9" ∷ word (κ ∷ α ∷ τ ∷ ο ∷ ι ∷ κ ∷ ε ∷ ῖ ∷ []) "Col.2.9" ∷ word (π ∷ ᾶ ∷ ν ∷ []) "Col.2.9" ∷ word (τ ∷ ὸ ∷ []) "Col.2.9" ∷ word (π ∷ ∙λ ∷ ή ∷ ρ ∷ ω ∷ μ ∷ α ∷ []) "Col.2.9" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "Col.2.9" ∷ word (θ ∷ ε ∷ ό ∷ τ ∷ η ∷ τ ∷ ο ∷ ς ∷ []) "Col.2.9" ∷ word (σ ∷ ω ∷ μ ∷ α ∷ τ ∷ ι ∷ κ ∷ ῶ ∷ ς ∷ []) "Col.2.9" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.2.10" ∷ word (ἐ ∷ σ ∷ τ ∷ ὲ ∷ []) "Col.2.10" ∷ word (ἐ ∷ ν ∷ []) "Col.2.10" ∷ word (α ∷ ὐ ∷ τ ∷ ῷ ∷ []) "Col.2.10" ∷ word (π ∷ ε ∷ π ∷ ∙λ ∷ η ∷ ρ ∷ ω ∷ μ ∷ έ ∷ ν ∷ ο ∷ ι ∷ []) "Col.2.10" ∷ word (ὅ ∷ ς ∷ []) "Col.2.10" ∷ word (ἐ ∷ σ ∷ τ ∷ ι ∷ ν ∷ []) "Col.2.10" ∷ word (ἡ ∷ []) "Col.2.10" ∷ word (κ ∷ ε ∷ φ ∷ α ∷ ∙λ ∷ ὴ ∷ []) "Col.2.10" ∷ word (π ∷ ά ∷ σ ∷ η ∷ ς ∷ []) "Col.2.10" ∷ word (ἀ ∷ ρ ∷ χ ∷ ῆ ∷ ς ∷ []) "Col.2.10" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.2.10" ∷ word (ἐ ∷ ξ ∷ ο ∷ υ ∷ σ ∷ ί ∷ α ∷ ς ∷ []) "Col.2.10" ∷ word (ἐ ∷ ν ∷ []) "Col.2.11" ∷ word (ᾧ ∷ []) "Col.2.11" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.2.11" ∷ word (π ∷ ε ∷ ρ ∷ ι ∷ ε ∷ τ ∷ μ ∷ ή ∷ θ ∷ η ∷ τ ∷ ε ∷ []) "Col.2.11" ∷ word (π ∷ ε ∷ ρ ∷ ι ∷ τ ∷ ο ∷ μ ∷ ῇ ∷ []) "Col.2.11" ∷ word (ἀ ∷ χ ∷ ε ∷ ι ∷ ρ ∷ ο ∷ π ∷ ο ∷ ι ∷ ή ∷ τ ∷ ῳ ∷ []) "Col.2.11" ∷ word (ἐ ∷ ν ∷ []) "Col.2.11" ∷ word (τ ∷ ῇ ∷ []) "Col.2.11" ∷ word (ἀ ∷ π ∷ ε ∷ κ ∷ δ ∷ ύ ∷ σ ∷ ε ∷ ι ∷ []) "Col.2.11" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "Col.2.11" ∷ word (σ ∷ ώ ∷ μ ∷ α ∷ τ ∷ ο ∷ ς ∷ []) "Col.2.11" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "Col.2.11" ∷ word (σ ∷ α ∷ ρ ∷ κ ∷ ό ∷ ς ∷ []) "Col.2.11" ∷ word (ἐ ∷ ν ∷ []) "Col.2.11" ∷ word (τ ∷ ῇ ∷ []) "Col.2.11" ∷ word (π ∷ ε ∷ ρ ∷ ι ∷ τ ∷ ο ∷ μ ∷ ῇ ∷ []) "Col.2.11" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "Col.2.11" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ο ∷ ῦ ∷ []) "Col.2.11" ∷ word (σ ∷ υ ∷ ν ∷ τ ∷ α ∷ φ ∷ έ ∷ ν ∷ τ ∷ ε ∷ ς ∷ []) "Col.2.12" ∷ word (α ∷ ὐ ∷ τ ∷ ῷ ∷ []) "Col.2.12" ∷ word (ἐ ∷ ν ∷ []) "Col.2.12" ∷ word (τ ∷ ῷ ∷ []) "Col.2.12" ∷ word (β ∷ α ∷ π ∷ τ ∷ ι ∷ σ ∷ μ ∷ ῷ ∷ []) "Col.2.12" ∷ word (ἐ ∷ ν ∷ []) "Col.2.12" ∷ word (ᾧ ∷ []) "Col.2.12" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.2.12" ∷ word (σ ∷ υ ∷ ν ∷ η ∷ γ ∷ έ ∷ ρ ∷ θ ∷ η ∷ τ ∷ ε ∷ []) "Col.2.12" ∷ word (δ ∷ ι ∷ ὰ ∷ []) "Col.2.12" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "Col.2.12" ∷ word (π ∷ ί ∷ σ ∷ τ ∷ ε ∷ ω ∷ ς ∷ []) "Col.2.12" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "Col.2.12" ∷ word (ἐ ∷ ν ∷ ε ∷ ρ ∷ γ ∷ ε ∷ ί ∷ α ∷ ς ∷ []) "Col.2.12" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "Col.2.12" ∷ word (θ ∷ ε ∷ ο ∷ ῦ ∷ []) "Col.2.12" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "Col.2.12" ∷ word (ἐ ∷ γ ∷ ε ∷ ί ∷ ρ ∷ α ∷ ν ∷ τ ∷ ο ∷ ς ∷ []) "Col.2.12" ∷ word (α ∷ ὐ ∷ τ ∷ ὸ ∷ ν ∷ []) "Col.2.12" ∷ word (ἐ ∷ κ ∷ []) "Col.2.12" ∷ word (ν ∷ ε ∷ κ ∷ ρ ∷ ῶ ∷ ν ∷ []) "Col.2.12" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.2.13" ∷ word (ὑ ∷ μ ∷ ᾶ ∷ ς ∷ []) "Col.2.13" ∷ word (ν ∷ ε ∷ κ ∷ ρ ∷ ο ∷ ὺ ∷ ς ∷ []) "Col.2.13" ∷ word (ὄ ∷ ν ∷ τ ∷ α ∷ ς ∷ []) "Col.2.13" ∷ word (ἐ ∷ ν ∷ []) "Col.2.13" ∷ word (τ ∷ ο ∷ ῖ ∷ ς ∷ []) "Col.2.13" ∷ word (π ∷ α ∷ ρ ∷ α ∷ π ∷ τ ∷ ώ ∷ μ ∷ α ∷ σ ∷ ι ∷ ν ∷ []) "Col.2.13" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.2.13" ∷ word (τ ∷ ῇ ∷ []) "Col.2.13" ∷ word (ἀ ∷ κ ∷ ρ ∷ ο ∷ β ∷ υ ∷ σ ∷ τ ∷ ί ∷ ᾳ ∷ []) "Col.2.13" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "Col.2.13" ∷ word (σ ∷ α ∷ ρ ∷ κ ∷ ὸ ∷ ς ∷ []) "Col.2.13" ∷ word (ὑ ∷ μ ∷ ῶ ∷ ν ∷ []) "Col.2.13" ∷ word (σ ∷ υ ∷ ν ∷ ε ∷ ζ ∷ ω ∷ ο ∷ π ∷ ο ∷ ί ∷ η ∷ σ ∷ ε ∷ ν ∷ []) "Col.2.13" ∷ word (ὑ ∷ μ ∷ ᾶ ∷ ς ∷ []) "Col.2.13" ∷ word (σ ∷ ὺ ∷ ν ∷ []) "Col.2.13" ∷ word (α ∷ ὐ ∷ τ ∷ ῷ ∷ []) "Col.2.13" ∷ word (χ ∷ α ∷ ρ ∷ ι ∷ σ ∷ ά ∷ μ ∷ ε ∷ ν ∷ ο ∷ ς ∷ []) "Col.2.13" ∷ word (ἡ ∷ μ ∷ ῖ ∷ ν ∷ []) "Col.2.13" ∷ word (π ∷ ά ∷ ν ∷ τ ∷ α ∷ []) "Col.2.13" ∷ word (τ ∷ ὰ ∷ []) "Col.2.13" ∷ word (π ∷ α ∷ ρ ∷ α ∷ π ∷ τ ∷ ώ ∷ μ ∷ α ∷ τ ∷ α ∷ []) "Col.2.13" ∷ word (ἐ ∷ ξ ∷ α ∷ ∙λ ∷ ε ∷ ί ∷ ψ ∷ α ∷ ς ∷ []) "Col.2.14" ∷ word (τ ∷ ὸ ∷ []) "Col.2.14" ∷ word (κ ∷ α ∷ θ ∷ []) "Col.2.14" ∷ word (ἡ ∷ μ ∷ ῶ ∷ ν ∷ []) "Col.2.14" ∷ word (χ ∷ ε ∷ ι ∷ ρ ∷ ό ∷ γ ∷ ρ ∷ α ∷ φ ∷ ο ∷ ν ∷ []) "Col.2.14" ∷ word (τ ∷ ο ∷ ῖ ∷ ς ∷ []) "Col.2.14" ∷ word (δ ∷ ό ∷ γ ∷ μ ∷ α ∷ σ ∷ ι ∷ ν ∷ []) "Col.2.14" ∷ word (ὃ ∷ []) "Col.2.14" ∷ word (ἦ ∷ ν ∷ []) "Col.2.14" ∷ word (ὑ ∷ π ∷ ε ∷ ν ∷ α ∷ ν ∷ τ ∷ ί ∷ ο ∷ ν ∷ []) "Col.2.14" ∷ word (ἡ ∷ μ ∷ ῖ ∷ ν ∷ []) "Col.2.14" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.2.14" ∷ word (α ∷ ὐ ∷ τ ∷ ὸ ∷ []) "Col.2.14" ∷ word (ἦ ∷ ρ ∷ κ ∷ ε ∷ ν ∷ []) "Col.2.14" ∷ word (ἐ ∷ κ ∷ []) "Col.2.14" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "Col.2.14" ∷ word (μ ∷ έ ∷ σ ∷ ο ∷ υ ∷ []) "Col.2.14" ∷ word (π ∷ ρ ∷ ο ∷ σ ∷ η ∷ ∙λ ∷ ώ ∷ σ ∷ α ∷ ς ∷ []) "Col.2.14" ∷ word (α ∷ ὐ ∷ τ ∷ ὸ ∷ []) "Col.2.14" ∷ word (τ ∷ ῷ ∷ []) "Col.2.14" ∷ word (σ ∷ τ ∷ α ∷ υ ∷ ρ ∷ ῷ ∷ []) "Col.2.14" ∷ word (ἀ ∷ π ∷ ε ∷ κ ∷ δ ∷ υ ∷ σ ∷ ά ∷ μ ∷ ε ∷ ν ∷ ο ∷ ς ∷ []) "Col.2.15" ∷ word (τ ∷ ὰ ∷ ς ∷ []) "Col.2.15" ∷ word (ἀ ∷ ρ ∷ χ ∷ ὰ ∷ ς ∷ []) "Col.2.15" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.2.15" ∷ word (τ ∷ ὰ ∷ ς ∷ []) "Col.2.15" ∷ word (ἐ ∷ ξ ∷ ο ∷ υ ∷ σ ∷ ί ∷ α ∷ ς ∷ []) "Col.2.15" ∷ word (ἐ ∷ δ ∷ ε ∷ ι ∷ γ ∷ μ ∷ ά ∷ τ ∷ ι ∷ σ ∷ ε ∷ ν ∷ []) "Col.2.15" ∷ word (ἐ ∷ ν ∷ []) "Col.2.15" ∷ word (π ∷ α ∷ ρ ∷ ρ ∷ η ∷ σ ∷ ί ∷ ᾳ ∷ []) "Col.2.15" ∷ word (θ ∷ ρ ∷ ι ∷ α ∷ μ ∷ β ∷ ε ∷ ύ ∷ σ ∷ α ∷ ς ∷ []) "Col.2.15" ∷ word (α ∷ ὐ ∷ τ ∷ ο ∷ ὺ ∷ ς ∷ []) "Col.2.15" ∷ word (ἐ ∷ ν ∷ []) "Col.2.15" ∷ word (α ∷ ὐ ∷ τ ∷ ῷ ∷ []) "Col.2.15" ∷ word (Μ ∷ ὴ ∷ []) "Col.2.16" ∷ word (ο ∷ ὖ ∷ ν ∷ []) "Col.2.16" ∷ word (τ ∷ ι ∷ ς ∷ []) "Col.2.16" ∷ word (ὑ ∷ μ ∷ ᾶ ∷ ς ∷ []) "Col.2.16" ∷ word (κ ∷ ρ ∷ ι ∷ ν ∷ έ ∷ τ ∷ ω ∷ []) "Col.2.16" ∷ word (ἐ ∷ ν ∷ []) "Col.2.16" ∷ word (β ∷ ρ ∷ ώ ∷ σ ∷ ε ∷ ι ∷ []) "Col.2.16" ∷ word (ἢ ∷ []) "Col.2.16" ∷ word (ἐ ∷ ν ∷ []) "Col.2.16" ∷ word (π ∷ ό ∷ σ ∷ ε ∷ ι ∷ []) "Col.2.16" ∷ word (ἢ ∷ []) "Col.2.16" ∷ word (ἐ ∷ ν ∷ []) "Col.2.16" ∷ word (μ ∷ έ ∷ ρ ∷ ε ∷ ι ∷ []) "Col.2.16" ∷ word (ἑ ∷ ο ∷ ρ ∷ τ ∷ ῆ ∷ ς ∷ []) "Col.2.16" ∷ word (ἢ ∷ []) "Col.2.16" ∷ word (ν ∷ ο ∷ υ ∷ μ ∷ η ∷ ν ∷ ί ∷ α ∷ ς ∷ []) "Col.2.16" ∷ word (ἢ ∷ []) "Col.2.16" ∷ word (σ ∷ α ∷ β ∷ β ∷ ά ∷ τ ∷ ω ∷ ν ∷ []) "Col.2.16" ∷ word (ἅ ∷ []) "Col.2.17" ∷ word (ἐ ∷ σ ∷ τ ∷ ι ∷ ν ∷ []) "Col.2.17" ∷ word (σ ∷ κ ∷ ι ∷ ὰ ∷ []) "Col.2.17" ∷ word (τ ∷ ῶ ∷ ν ∷ []) "Col.2.17" ∷ word (μ ∷ ε ∷ ∙λ ∷ ∙λ ∷ ό ∷ ν ∷ τ ∷ ω ∷ ν ∷ []) "Col.2.17" ∷ word (τ ∷ ὸ ∷ []) "Col.2.17" ∷ word (δ ∷ ὲ ∷ []) "Col.2.17" ∷ word (σ ∷ ῶ ∷ μ ∷ α ∷ []) "Col.2.17" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "Col.2.17" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ο ∷ ῦ ∷ []) "Col.2.17" ∷ word (μ ∷ η ∷ δ ∷ ε ∷ ὶ ∷ ς ∷ []) "Col.2.18" ∷ word (ὑ ∷ μ ∷ ᾶ ∷ ς ∷ []) "Col.2.18" ∷ word (κ ∷ α ∷ τ ∷ α ∷ β ∷ ρ ∷ α ∷ β ∷ ε ∷ υ ∷ έ ∷ τ ∷ ω ∷ []) "Col.2.18" ∷ word (θ ∷ έ ∷ ∙λ ∷ ω ∷ ν ∷ []) "Col.2.18" ∷ word (ἐ ∷ ν ∷ []) "Col.2.18" ∷ word (τ ∷ α ∷ π ∷ ε ∷ ι ∷ ν ∷ ο ∷ φ ∷ ρ ∷ ο ∷ σ ∷ ύ ∷ ν ∷ ῃ ∷ []) "Col.2.18" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.2.18" ∷ word (θ ∷ ρ ∷ η ∷ σ ∷ κ ∷ ε ∷ ί ∷ ᾳ ∷ []) "Col.2.18" ∷ word (τ ∷ ῶ ∷ ν ∷ []) "Col.2.18" ∷ word (ἀ ∷ γ ∷ γ ∷ έ ∷ ∙λ ∷ ω ∷ ν ∷ []) "Col.2.18" ∷ word (ἃ ∷ []) "Col.2.18" ∷ word (ἑ ∷ ό ∷ ρ ∷ α ∷ κ ∷ ε ∷ ν ∷ []) "Col.2.18" ∷ word (ἐ ∷ μ ∷ β ∷ α ∷ τ ∷ ε ∷ ύ ∷ ω ∷ ν ∷ []) "Col.2.18" ∷ word (ε ∷ ἰ ∷ κ ∷ ῇ ∷ []) "Col.2.18" ∷ word (φ ∷ υ ∷ σ ∷ ι ∷ ο ∷ ύ ∷ μ ∷ ε ∷ ν ∷ ο ∷ ς ∷ []) "Col.2.18" ∷ word (ὑ ∷ π ∷ ὸ ∷ []) "Col.2.18" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "Col.2.18" ∷ word (ν ∷ ο ∷ ὸ ∷ ς ∷ []) "Col.2.18" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "Col.2.18" ∷ word (σ ∷ α ∷ ρ ∷ κ ∷ ὸ ∷ ς ∷ []) "Col.2.18" ∷ word (α ∷ ὐ ∷ τ ∷ ο ∷ ῦ ∷ []) "Col.2.18" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.2.19" ∷ word (ο ∷ ὐ ∷ []) "Col.2.19" ∷ word (κ ∷ ρ ∷ α ∷ τ ∷ ῶ ∷ ν ∷ []) "Col.2.19" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "Col.2.19" ∷ word (κ ∷ ε ∷ φ ∷ α ∷ ∙λ ∷ ή ∷ ν ∷ []) "Col.2.19" ∷ word (ἐ ∷ ξ ∷ []) "Col.2.19" ∷ word (ο ∷ ὗ ∷ []) "Col.2.19" ∷ word (π ∷ ᾶ ∷ ν ∷ []) "Col.2.19" ∷ word (τ ∷ ὸ ∷ []) "Col.2.19" ∷ word (σ ∷ ῶ ∷ μ ∷ α ∷ []) "Col.2.19" ∷ word (δ ∷ ι ∷ ὰ ∷ []) "Col.2.19" ∷ word (τ ∷ ῶ ∷ ν ∷ []) "Col.2.19" ∷ word (ἁ ∷ φ ∷ ῶ ∷ ν ∷ []) "Col.2.19" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.2.19" ∷ word (σ ∷ υ ∷ ν ∷ δ ∷ έ ∷ σ ∷ μ ∷ ω ∷ ν ∷ []) "Col.2.19" ∷ word (ἐ ∷ π ∷ ι ∷ χ ∷ ο ∷ ρ ∷ η ∷ γ ∷ ο ∷ ύ ∷ μ ∷ ε ∷ ν ∷ ο ∷ ν ∷ []) "Col.2.19" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.2.19" ∷ word (σ ∷ υ ∷ μ ∷ β ∷ ι ∷ β ∷ α ∷ ζ ∷ ό ∷ μ ∷ ε ∷ ν ∷ ο ∷ ν ∷ []) "Col.2.19" ∷ word (α ∷ ὔ ∷ ξ ∷ ε ∷ ι ∷ []) "Col.2.19" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "Col.2.19" ∷ word (α ∷ ὔ ∷ ξ ∷ η ∷ σ ∷ ι ∷ ν ∷ []) "Col.2.19" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "Col.2.19" ∷ word (θ ∷ ε ∷ ο ∷ ῦ ∷ []) "Col.2.19" ∷ word (Ε ∷ ἰ ∷ []) "Col.2.20" ∷ word (ἀ ∷ π ∷ ε ∷ θ ∷ ά ∷ ν ∷ ε ∷ τ ∷ ε ∷ []) "Col.2.20" ∷ word (σ ∷ ὺ ∷ ν ∷ []) "Col.2.20" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ῷ ∷ []) "Col.2.20" ∷ word (ἀ ∷ π ∷ ὸ ∷ []) "Col.2.20" ∷ word (τ ∷ ῶ ∷ ν ∷ []) "Col.2.20" ∷ word (σ ∷ τ ∷ ο ∷ ι ∷ χ ∷ ε ∷ ί ∷ ω ∷ ν ∷ []) "Col.2.20" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "Col.2.20" ∷ word (κ ∷ ό ∷ σ ∷ μ ∷ ο ∷ υ ∷ []) "Col.2.20" ∷ word (τ ∷ ί ∷ []) "Col.2.20" ∷ word (ὡ ∷ ς ∷ []) "Col.2.20" ∷ word (ζ ∷ ῶ ∷ ν ∷ τ ∷ ε ∷ ς ∷ []) "Col.2.20" ∷ word (ἐ ∷ ν ∷ []) "Col.2.20" ∷ word (κ ∷ ό ∷ σ ∷ μ ∷ ῳ ∷ []) "Col.2.20" ∷ word (δ ∷ ο ∷ γ ∷ μ ∷ α ∷ τ ∷ ί ∷ ζ ∷ ε ∷ σ ∷ θ ∷ ε ∷ []) "Col.2.20" ∷ word (Μ ∷ ὴ ∷ []) "Col.2.21" ∷ word (ἅ ∷ ψ ∷ ῃ ∷ []) "Col.2.21" ∷ word (μ ∷ η ∷ δ ∷ ὲ ∷ []) "Col.2.21" ∷ word (γ ∷ ε ∷ ύ ∷ σ ∷ ῃ ∷ []) "Col.2.21" ∷ word (μ ∷ η ∷ δ ∷ ὲ ∷ []) "Col.2.21" ∷ word (θ ∷ ί ∷ γ ∷ ῃ ∷ ς ∷ []) "Col.2.21" ∷ word (ἅ ∷ []) "Col.2.22" ∷ word (ἐ ∷ σ ∷ τ ∷ ι ∷ ν ∷ []) "Col.2.22" ∷ word (π ∷ ά ∷ ν ∷ τ ∷ α ∷ []) "Col.2.22" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "Col.2.22" ∷ word (φ ∷ θ ∷ ο ∷ ρ ∷ ὰ ∷ ν ∷ []) "Col.2.22" ∷ word (τ ∷ ῇ ∷ []) "Col.2.22" ∷ word (ἀ ∷ π ∷ ο ∷ χ ∷ ρ ∷ ή ∷ σ ∷ ε ∷ ι ∷ []) "Col.2.22" ∷ word (κ ∷ α ∷ τ ∷ ὰ ∷ []) "Col.2.22" ∷ word (τ ∷ ὰ ∷ []) "Col.2.22" ∷ word (ἐ ∷ ν ∷ τ ∷ ά ∷ ∙λ ∷ μ ∷ α ∷ τ ∷ α ∷ []) "Col.2.22" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.2.22" ∷ word (δ ∷ ι ∷ δ ∷ α ∷ σ ∷ κ ∷ α ∷ ∙λ ∷ ί ∷ α ∷ ς ∷ []) "Col.2.22" ∷ word (τ ∷ ῶ ∷ ν ∷ []) "Col.2.22" ∷ word (ἀ ∷ ν ∷ θ ∷ ρ ∷ ώ ∷ π ∷ ω ∷ ν ∷ []) "Col.2.22" ∷ word (ἅ ∷ τ ∷ ι ∷ ν ∷ ά ∷ []) "Col.2.23" ∷ word (ἐ ∷ σ ∷ τ ∷ ι ∷ ν ∷ []) "Col.2.23" ∷ word (∙λ ∷ ό ∷ γ ∷ ο ∷ ν ∷ []) "Col.2.23" ∷ word (μ ∷ ὲ ∷ ν ∷ []) "Col.2.23" ∷ word (ἔ ∷ χ ∷ ο ∷ ν ∷ τ ∷ α ∷ []) "Col.2.23" ∷ word (σ ∷ ο ∷ φ ∷ ί ∷ α ∷ ς ∷ []) "Col.2.23" ∷ word (ἐ ∷ ν ∷ []) "Col.2.23" ∷ word (ἐ ∷ θ ∷ ε ∷ ∙λ ∷ ο ∷ θ ∷ ρ ∷ η ∷ σ ∷ κ ∷ ί ∷ ᾳ ∷ []) "Col.2.23" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.2.23" ∷ word (τ ∷ α ∷ π ∷ ε ∷ ι ∷ ν ∷ ο ∷ φ ∷ ρ ∷ ο ∷ σ ∷ ύ ∷ ν ∷ ῃ ∷ []) "Col.2.23" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.2.23" ∷ word (ἀ ∷ φ ∷ ε ∷ ι ∷ δ ∷ ί ∷ ᾳ ∷ []) "Col.2.23" ∷ word (σ ∷ ώ ∷ μ ∷ α ∷ τ ∷ ο ∷ ς ∷ []) "Col.2.23" ∷ word (ο ∷ ὐ ∷ κ ∷ []) "Col.2.23" ∷ word (ἐ ∷ ν ∷ []) "Col.2.23" ∷ word (τ ∷ ι ∷ μ ∷ ῇ ∷ []) "Col.2.23" ∷ word (τ ∷ ι ∷ ν ∷ ι ∷ []) "Col.2.23" ∷ word (π ∷ ρ ∷ ὸ ∷ ς ∷ []) "Col.2.23" ∷ word (π ∷ ∙λ ∷ η ∷ σ ∷ μ ∷ ο ∷ ν ∷ ὴ ∷ ν ∷ []) "Col.2.23" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "Col.2.23" ∷ word (σ ∷ α ∷ ρ ∷ κ ∷ ό ∷ ς ∷ []) "Col.2.23" ∷ word (Ε ∷ ἰ ∷ []) "Col.3.1" ∷ word (ο ∷ ὖ ∷ ν ∷ []) "Col.3.1" ∷ word (σ ∷ υ ∷ ν ∷ η ∷ γ ∷ έ ∷ ρ ∷ θ ∷ η ∷ τ ∷ ε ∷ []) "Col.3.1" ∷ word (τ ∷ ῷ ∷ []) "Col.3.1" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ῷ ∷ []) "Col.3.1" ∷ word (τ ∷ ὰ ∷ []) "Col.3.1" ∷ word (ἄ ∷ ν ∷ ω ∷ []) "Col.3.1" ∷ word (ζ ∷ η ∷ τ ∷ ε ∷ ῖ ∷ τ ∷ ε ∷ []) "Col.3.1" ∷ word (ο ∷ ὗ ∷ []) "Col.3.1" ∷ word (ὁ ∷ []) "Col.3.1" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ό ∷ ς ∷ []) "Col.3.1" ∷ word (ἐ ∷ σ ∷ τ ∷ ι ∷ ν ∷ []) "Col.3.1" ∷ word (ἐ ∷ ν ∷ []) "Col.3.1" ∷ word (δ ∷ ε ∷ ξ ∷ ι ∷ ᾷ ∷ []) "Col.3.1" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "Col.3.1" ∷ word (θ ∷ ε ∷ ο ∷ ῦ ∷ []) "Col.3.1" ∷ word (κ ∷ α ∷ θ ∷ ή ∷ μ ∷ ε ∷ ν ∷ ο ∷ ς ∷ []) "Col.3.1" ∷ word (τ ∷ ὰ ∷ []) "Col.3.2" ∷ word (ἄ ∷ ν ∷ ω ∷ []) "Col.3.2" ∷ word (φ ∷ ρ ∷ ο ∷ ν ∷ ε ∷ ῖ ∷ τ ∷ ε ∷ []) "Col.3.2" ∷ word (μ ∷ ὴ ∷ []) "Col.3.2" ∷ word (τ ∷ ὰ ∷ []) "Col.3.2" ∷ word (ἐ ∷ π ∷ ὶ ∷ []) "Col.3.2" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "Col.3.2" ∷ word (γ ∷ ῆ ∷ ς ∷ []) "Col.3.2" ∷ word (ἀ ∷ π ∷ ε ∷ θ ∷ ά ∷ ν ∷ ε ∷ τ ∷ ε ∷ []) "Col.3.3" ∷ word (γ ∷ ά ∷ ρ ∷ []) "Col.3.3" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.3.3" ∷ word (ἡ ∷ []) "Col.3.3" ∷ word (ζ ∷ ω ∷ ὴ ∷ []) "Col.3.3" ∷ word (ὑ ∷ μ ∷ ῶ ∷ ν ∷ []) "Col.3.3" ∷ word (κ ∷ έ ∷ κ ∷ ρ ∷ υ ∷ π ∷ τ ∷ α ∷ ι ∷ []) "Col.3.3" ∷ word (σ ∷ ὺ ∷ ν ∷ []) "Col.3.3" ∷ word (τ ∷ ῷ ∷ []) "Col.3.3" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ῷ ∷ []) "Col.3.3" ∷ word (ἐ ∷ ν ∷ []) "Col.3.3" ∷ word (τ ∷ ῷ ∷ []) "Col.3.3" ∷ word (θ ∷ ε ∷ ῷ ∷ []) "Col.3.3" ∷ word (ὅ ∷ τ ∷ α ∷ ν ∷ []) "Col.3.4" ∷ word (ὁ ∷ []) "Col.3.4" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ὸ ∷ ς ∷ []) "Col.3.4" ∷ word (φ ∷ α ∷ ν ∷ ε ∷ ρ ∷ ω ∷ θ ∷ ῇ ∷ []) "Col.3.4" ∷ word (ἡ ∷ []) "Col.3.4" ∷ word (ζ ∷ ω ∷ ὴ ∷ []) "Col.3.4" ∷ word (ὑ ∷ μ ∷ ῶ ∷ ν ∷ []) "Col.3.4" ∷ word (τ ∷ ό ∷ τ ∷ ε ∷ []) "Col.3.4" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.3.4" ∷ word (ὑ ∷ μ ∷ ε ∷ ῖ ∷ ς ∷ []) "Col.3.4" ∷ word (σ ∷ ὺ ∷ ν ∷ []) "Col.3.4" ∷ word (α ∷ ὐ ∷ τ ∷ ῷ ∷ []) "Col.3.4" ∷ word (φ ∷ α ∷ ν ∷ ε ∷ ρ ∷ ω ∷ θ ∷ ή ∷ σ ∷ ε ∷ σ ∷ θ ∷ ε ∷ []) "Col.3.4" ∷ word (ἐ ∷ ν ∷ []) "Col.3.4" ∷ word (δ ∷ ό ∷ ξ ∷ ῃ ∷ []) "Col.3.4" ∷ word (Ν ∷ ε ∷ κ ∷ ρ ∷ ώ ∷ σ ∷ α ∷ τ ∷ ε ∷ []) "Col.3.5" ∷ word (ο ∷ ὖ ∷ ν ∷ []) "Col.3.5" ∷ word (τ ∷ ὰ ∷ []) "Col.3.5" ∷ word (μ ∷ έ ∷ ∙λ ∷ η ∷ []) "Col.3.5" ∷ word (τ ∷ ὰ ∷ []) "Col.3.5" ∷ word (ἐ ∷ π ∷ ὶ ∷ []) "Col.3.5" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "Col.3.5" ∷ word (γ ∷ ῆ ∷ ς ∷ []) "Col.3.5" ∷ word (π ∷ ο ∷ ρ ∷ ν ∷ ε ∷ ί ∷ α ∷ ν ∷ []) "Col.3.5" ∷ word (ἀ ∷ κ ∷ α ∷ θ ∷ α ∷ ρ ∷ σ ∷ ί ∷ α ∷ ν ∷ []) "Col.3.5" ∷ word (π ∷ ά ∷ θ ∷ ο ∷ ς ∷ []) "Col.3.5" ∷ word (ἐ ∷ π ∷ ι ∷ θ ∷ υ ∷ μ ∷ ί ∷ α ∷ ν ∷ []) "Col.3.5" ∷ word (κ ∷ α ∷ κ ∷ ή ∷ ν ∷ []) "Col.3.5" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.3.5" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "Col.3.5" ∷ word (π ∷ ∙λ ∷ ε ∷ ο ∷ ν ∷ ε ∷ ξ ∷ ί ∷ α ∷ ν ∷ []) "Col.3.5" ∷ word (ἥ ∷ τ ∷ ι ∷ ς ∷ []) "Col.3.5" ∷ word (ἐ ∷ σ ∷ τ ∷ ὶ ∷ ν ∷ []) "Col.3.5" ∷ word (ε ∷ ἰ ∷ δ ∷ ω ∷ ∙λ ∷ ο ∷ ∙λ ∷ α ∷ τ ∷ ρ ∷ ί ∷ α ∷ []) "Col.3.5" ∷ word (δ ∷ ι ∷ []) "Col.3.6" ∷ word (ἃ ∷ []) "Col.3.6" ∷ word (ἔ ∷ ρ ∷ χ ∷ ε ∷ τ ∷ α ∷ ι ∷ []) "Col.3.6" ∷ word (ἡ ∷ []) "Col.3.6" ∷ word (ὀ ∷ ρ ∷ γ ∷ ὴ ∷ []) "Col.3.6" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "Col.3.6" ∷ word (θ ∷ ε ∷ ο ∷ ῦ ∷ []) "Col.3.6" ∷ word (ἐ ∷ π ∷ ὶ ∷ []) "Col.3.6" ∷ word (τ ∷ ο ∷ ὺ ∷ ς ∷ []) "Col.3.6" ∷ word (υ ∷ ἱ ∷ ο ∷ ὺ ∷ ς ∷ []) "Col.3.6" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "Col.3.6" ∷ word (ἀ ∷ π ∷ ε ∷ ι ∷ θ ∷ ε ∷ ί ∷ α ∷ ς ∷ []) "Col.3.6" ∷ word (ἐ ∷ ν ∷ []) "Col.3.7" ∷ word (ο ∷ ἷ ∷ ς ∷ []) "Col.3.7" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.3.7" ∷ word (ὑ ∷ μ ∷ ε ∷ ῖ ∷ ς ∷ []) "Col.3.7" ∷ word (π ∷ ε ∷ ρ ∷ ι ∷ ε ∷ π ∷ α ∷ τ ∷ ή ∷ σ ∷ α ∷ τ ∷ έ ∷ []) "Col.3.7" ∷ word (π ∷ ο ∷ τ ∷ ε ∷ []) "Col.3.7" ∷ word (ὅ ∷ τ ∷ ε ∷ []) "Col.3.7" ∷ word (ἐ ∷ ζ ∷ ῆ ∷ τ ∷ ε ∷ []) "Col.3.7" ∷ word (ἐ ∷ ν ∷ []) "Col.3.7" ∷ word (τ ∷ ο ∷ ύ ∷ τ ∷ ο ∷ ι ∷ ς ∷ []) "Col.3.7" ∷ word (ν ∷ υ ∷ ν ∷ ὶ ∷ []) "Col.3.8" ∷ word (δ ∷ ὲ ∷ []) "Col.3.8" ∷ word (ἀ ∷ π ∷ ό ∷ θ ∷ ε ∷ σ ∷ θ ∷ ε ∷ []) "Col.3.8" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.3.8" ∷ word (ὑ ∷ μ ∷ ε ∷ ῖ ∷ ς ∷ []) "Col.3.8" ∷ word (τ ∷ ὰ ∷ []) "Col.3.8" ∷ word (π ∷ ά ∷ ν ∷ τ ∷ α ∷ []) "Col.3.8" ∷ word (ὀ ∷ ρ ∷ γ ∷ ή ∷ ν ∷ []) "Col.3.8" ∷ word (θ ∷ υ ∷ μ ∷ ό ∷ ν ∷ []) "Col.3.8" ∷ word (κ ∷ α ∷ κ ∷ ί ∷ α ∷ ν ∷ []) "Col.3.8" ∷ word (β ∷ ∙λ ∷ α ∷ σ ∷ φ ∷ η ∷ μ ∷ ί ∷ α ∷ ν ∷ []) "Col.3.8" ∷ word (α ∷ ἰ ∷ σ ∷ χ ∷ ρ ∷ ο ∷ ∙λ ∷ ο ∷ γ ∷ ί ∷ α ∷ ν ∷ []) "Col.3.8" ∷ word (ἐ ∷ κ ∷ []) "Col.3.8" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "Col.3.8" ∷ word (σ ∷ τ ∷ ό ∷ μ ∷ α ∷ τ ∷ ο ∷ ς ∷ []) "Col.3.8" ∷ word (ὑ ∷ μ ∷ ῶ ∷ ν ∷ []) "Col.3.8" ∷ word (μ ∷ ὴ ∷ []) "Col.3.9" ∷ word (ψ ∷ ε ∷ ύ ∷ δ ∷ ε ∷ σ ∷ θ ∷ ε ∷ []) "Col.3.9" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "Col.3.9" ∷ word (ἀ ∷ ∙λ ∷ ∙λ ∷ ή ∷ ∙λ ∷ ο ∷ υ ∷ ς ∷ []) "Col.3.9" ∷ word (ἀ ∷ π ∷ ε ∷ κ ∷ δ ∷ υ ∷ σ ∷ ά ∷ μ ∷ ε ∷ ν ∷ ο ∷ ι ∷ []) "Col.3.9" ∷ word (τ ∷ ὸ ∷ ν ∷ []) "Col.3.9" ∷ word (π ∷ α ∷ ∙λ ∷ α ∷ ι ∷ ὸ ∷ ν ∷ []) "Col.3.9" ∷ word (ἄ ∷ ν ∷ θ ∷ ρ ∷ ω ∷ π ∷ ο ∷ ν ∷ []) "Col.3.9" ∷ word (σ ∷ ὺ ∷ ν ∷ []) "Col.3.9" ∷ word (τ ∷ α ∷ ῖ ∷ ς ∷ []) "Col.3.9" ∷ word (π ∷ ρ ∷ ά ∷ ξ ∷ ε ∷ σ ∷ ι ∷ ν ∷ []) "Col.3.9" ∷ word (α ∷ ὐ ∷ τ ∷ ο ∷ ῦ ∷ []) "Col.3.9" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.3.10" ∷ word (ἐ ∷ ν ∷ δ ∷ υ ∷ σ ∷ ά ∷ μ ∷ ε ∷ ν ∷ ο ∷ ι ∷ []) "Col.3.10" ∷ word (τ ∷ ὸ ∷ ν ∷ []) "Col.3.10" ∷ word (ν ∷ έ ∷ ο ∷ ν ∷ []) "Col.3.10" ∷ word (τ ∷ ὸ ∷ ν ∷ []) "Col.3.10" ∷ word (ἀ ∷ ν ∷ α ∷ κ ∷ α ∷ ι ∷ ν ∷ ο ∷ ύ ∷ μ ∷ ε ∷ ν ∷ ο ∷ ν ∷ []) "Col.3.10" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "Col.3.10" ∷ word (ἐ ∷ π ∷ ί ∷ γ ∷ ν ∷ ω ∷ σ ∷ ι ∷ ν ∷ []) "Col.3.10" ∷ word (κ ∷ α ∷ τ ∷ []) "Col.3.10" ∷ word (ε ∷ ἰ ∷ κ ∷ ό ∷ ν ∷ α ∷ []) "Col.3.10" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "Col.3.10" ∷ word (κ ∷ τ ∷ ί ∷ σ ∷ α ∷ ν ∷ τ ∷ ο ∷ ς ∷ []) "Col.3.10" ∷ word (α ∷ ὐ ∷ τ ∷ ό ∷ ν ∷ []) "Col.3.10" ∷ word (ὅ ∷ π ∷ ο ∷ υ ∷ []) "Col.3.11" ∷ word (ο ∷ ὐ ∷ κ ∷ []) "Col.3.11" ∷ word (ἔ ∷ ν ∷ ι ∷ []) "Col.3.11" ∷ word (Ἕ ∷ ∙λ ∷ ∙λ ∷ η ∷ ν ∷ []) "Col.3.11" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.3.11" ∷ word (Ἰ ∷ ο ∷ υ ∷ δ ∷ α ∷ ῖ ∷ ο ∷ ς ∷ []) "Col.3.11" ∷ word (π ∷ ε ∷ ρ ∷ ι ∷ τ ∷ ο ∷ μ ∷ ὴ ∷ []) "Col.3.11" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.3.11" ∷ word (ἀ ∷ κ ∷ ρ ∷ ο ∷ β ∷ υ ∷ σ ∷ τ ∷ ί ∷ α ∷ []) "Col.3.11" ∷ word (β ∷ ά ∷ ρ ∷ β ∷ α ∷ ρ ∷ ο ∷ ς ∷ []) "Col.3.11" ∷ word (Σ ∷ κ ∷ ύ ∷ θ ∷ η ∷ ς ∷ []) "Col.3.11" ∷ word (δ ∷ ο ∷ ῦ ∷ ∙λ ∷ ο ∷ ς ∷ []) "Col.3.11" ∷ word (ἐ ∷ ∙λ ∷ ε ∷ ύ ∷ θ ∷ ε ∷ ρ ∷ ο ∷ ς ∷ []) "Col.3.11" ∷ word (ἀ ∷ ∙λ ∷ ∙λ ∷ ὰ ∷ []) "Col.3.11" ∷ word (τ ∷ ὰ ∷ []) "Col.3.11" ∷ word (π ∷ ά ∷ ν ∷ τ ∷ α ∷ []) "Col.3.11" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.3.11" ∷ word (ἐ ∷ ν ∷ []) "Col.3.11" ∷ word (π ∷ ᾶ ∷ σ ∷ ι ∷ ν ∷ []) "Col.3.11" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ό ∷ ς ∷ []) "Col.3.11" ∷ word (Ἐ ∷ ν ∷ δ ∷ ύ ∷ σ ∷ α ∷ σ ∷ θ ∷ ε ∷ []) "Col.3.12" ∷ word (ο ∷ ὖ ∷ ν ∷ []) "Col.3.12" ∷ word (ὡ ∷ ς ∷ []) "Col.3.12" ∷ word (ἐ ∷ κ ∷ ∙λ ∷ ε ∷ κ ∷ τ ∷ ο ∷ ὶ ∷ []) "Col.3.12" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "Col.3.12" ∷ word (θ ∷ ε ∷ ο ∷ ῦ ∷ []) "Col.3.12" ∷ word (ἅ ∷ γ ∷ ι ∷ ο ∷ ι ∷ []) "Col.3.12" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.3.12" ∷ word (ἠ ∷ γ ∷ α ∷ π ∷ η ∷ μ ∷ έ ∷ ν ∷ ο ∷ ι ∷ []) "Col.3.12" ∷ word (σ ∷ π ∷ ∙λ ∷ ά ∷ γ ∷ χ ∷ ν ∷ α ∷ []) "Col.3.12" ∷ word (ο ∷ ἰ ∷ κ ∷ τ ∷ ι ∷ ρ ∷ μ ∷ ο ∷ ῦ ∷ []) "Col.3.12" ∷ word (χ ∷ ρ ∷ η ∷ σ ∷ τ ∷ ό ∷ τ ∷ η ∷ τ ∷ α ∷ []) "Col.3.12" ∷ word (τ ∷ α ∷ π ∷ ε ∷ ι ∷ ν ∷ ο ∷ φ ∷ ρ ∷ ο ∷ σ ∷ ύ ∷ ν ∷ η ∷ ν ∷ []) "Col.3.12" ∷ word (π ∷ ρ ∷ α ∷ ΰ ∷ τ ∷ η ∷ τ ∷ α ∷ []) "Col.3.12" ∷ word (μ ∷ α ∷ κ ∷ ρ ∷ ο ∷ θ ∷ υ ∷ μ ∷ ί ∷ α ∷ ν ∷ []) "Col.3.12" ∷ word (ἀ ∷ ν ∷ ε ∷ χ ∷ ό ∷ μ ∷ ε ∷ ν ∷ ο ∷ ι ∷ []) "Col.3.13" ∷ word (ἀ ∷ ∙λ ∷ ∙λ ∷ ή ∷ ∙λ ∷ ω ∷ ν ∷ []) "Col.3.13" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.3.13" ∷ word (χ ∷ α ∷ ρ ∷ ι ∷ ζ ∷ ό ∷ μ ∷ ε ∷ ν ∷ ο ∷ ι ∷ []) "Col.3.13" ∷ word (ἑ ∷ α ∷ υ ∷ τ ∷ ο ∷ ῖ ∷ ς ∷ []) "Col.3.13" ∷ word (ἐ ∷ ά ∷ ν ∷ []) "Col.3.13" ∷ word (τ ∷ ι ∷ ς ∷ []) "Col.3.13" ∷ word (π ∷ ρ ∷ ό ∷ ς ∷ []) "Col.3.13" ∷ word (τ ∷ ι ∷ ν ∷ α ∷ []) "Col.3.13" ∷ word (ἔ ∷ χ ∷ ῃ ∷ []) "Col.3.13" ∷ word (μ ∷ ο ∷ μ ∷ φ ∷ ή ∷ ν ∷ []) "Col.3.13" ∷ word (κ ∷ α ∷ θ ∷ ὼ ∷ ς ∷ []) "Col.3.13" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.3.13" ∷ word (ὁ ∷ []) "Col.3.13" ∷ word (κ ∷ ύ ∷ ρ ∷ ι ∷ ο ∷ ς ∷ []) "Col.3.13" ∷ word (ἐ ∷ χ ∷ α ∷ ρ ∷ ί ∷ σ ∷ α ∷ τ ∷ ο ∷ []) "Col.3.13" ∷ word (ὑ ∷ μ ∷ ῖ ∷ ν ∷ []) "Col.3.13" ∷ word (ο ∷ ὕ ∷ τ ∷ ω ∷ ς ∷ []) "Col.3.13" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.3.13" ∷ word (ὑ ∷ μ ∷ ε ∷ ῖ ∷ ς ∷ []) "Col.3.13" ∷ word (ἐ ∷ π ∷ ὶ ∷ []) "Col.3.14" ∷ word (π ∷ ᾶ ∷ σ ∷ ι ∷ ν ∷ []) "Col.3.14" ∷ word (δ ∷ ὲ ∷ []) "Col.3.14" ∷ word (τ ∷ ο ∷ ύ ∷ τ ∷ ο ∷ ι ∷ ς ∷ []) "Col.3.14" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "Col.3.14" ∷ word (ἀ ∷ γ ∷ ά ∷ π ∷ η ∷ ν ∷ []) "Col.3.14" ∷ word (ὅ ∷ []) "Col.3.14" ∷ word (ἐ ∷ σ ∷ τ ∷ ι ∷ ν ∷ []) "Col.3.14" ∷ word (σ ∷ ύ ∷ ν ∷ δ ∷ ε ∷ σ ∷ μ ∷ ο ∷ ς ∷ []) "Col.3.14" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "Col.3.14" ∷ word (τ ∷ ε ∷ ∙λ ∷ ε ∷ ι ∷ ό ∷ τ ∷ η ∷ τ ∷ ο ∷ ς ∷ []) "Col.3.14" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.3.15" ∷ word (ἡ ∷ []) "Col.3.15" ∷ word (ε ∷ ἰ ∷ ρ ∷ ή ∷ ν ∷ η ∷ []) "Col.3.15" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "Col.3.15" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ο ∷ ῦ ∷ []) "Col.3.15" ∷ word (β ∷ ρ ∷ α ∷ β ∷ ε ∷ υ ∷ έ ∷ τ ∷ ω ∷ []) "Col.3.15" ∷ word (ἐ ∷ ν ∷ []) "Col.3.15" ∷ word (τ ∷ α ∷ ῖ ∷ ς ∷ []) "Col.3.15" ∷ word (κ ∷ α ∷ ρ ∷ δ ∷ ί ∷ α ∷ ι ∷ ς ∷ []) "Col.3.15" ∷ word (ὑ ∷ μ ∷ ῶ ∷ ν ∷ []) "Col.3.15" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "Col.3.15" ∷ word (ἣ ∷ ν ∷ []) "Col.3.15" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.3.15" ∷ word (ἐ ∷ κ ∷ ∙λ ∷ ή ∷ θ ∷ η ∷ τ ∷ ε ∷ []) "Col.3.15" ∷ word (ἐ ∷ ν ∷ []) "Col.3.15" ∷ word (ἑ ∷ ν ∷ ὶ ∷ []) "Col.3.15" ∷ word (σ ∷ ώ ∷ μ ∷ α ∷ τ ∷ ι ∷ []) "Col.3.15" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.3.15" ∷ word (ε ∷ ὐ ∷ χ ∷ ά ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ο ∷ ι ∷ []) "Col.3.15" ∷ word (γ ∷ ί ∷ ν ∷ ε ∷ σ ∷ θ ∷ ε ∷ []) "Col.3.15" ∷ word (ὁ ∷ []) "Col.3.16" ∷ word (∙λ ∷ ό ∷ γ ∷ ο ∷ ς ∷ []) "Col.3.16" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "Col.3.16" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ο ∷ ῦ ∷ []) "Col.3.16" ∷ word (ἐ ∷ ν ∷ ο ∷ ι ∷ κ ∷ ε ∷ ί ∷ τ ∷ ω ∷ []) "Col.3.16" ∷ word (ἐ ∷ ν ∷ []) "Col.3.16" ∷ word (ὑ ∷ μ ∷ ῖ ∷ ν ∷ []) "Col.3.16" ∷ word (π ∷ ∙λ ∷ ο ∷ υ ∷ σ ∷ ί ∷ ω ∷ ς ∷ []) "Col.3.16" ∷ word (ἐ ∷ ν ∷ []) "Col.3.16" ∷ word (π ∷ ά ∷ σ ∷ ῃ ∷ []) "Col.3.16" ∷ word (σ ∷ ο ∷ φ ∷ ί ∷ ᾳ ∷ []) "Col.3.16" ∷ word (δ ∷ ι ∷ δ ∷ ά ∷ σ ∷ κ ∷ ο ∷ ν ∷ τ ∷ ε ∷ ς ∷ []) "Col.3.16" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.3.16" ∷ word (ν ∷ ο ∷ υ ∷ θ ∷ ε ∷ τ ∷ ο ∷ ῦ ∷ ν ∷ τ ∷ ε ∷ ς ∷ []) "Col.3.16" ∷ word (ἑ ∷ α ∷ υ ∷ τ ∷ ο ∷ ὺ ∷ ς ∷ []) "Col.3.16" ∷ word (ψ ∷ α ∷ ∙λ ∷ μ ∷ ο ∷ ῖ ∷ ς ∷ []) "Col.3.16" ∷ word (ὕ ∷ μ ∷ ν ∷ ο ∷ ι ∷ ς ∷ []) "Col.3.16" ∷ word (ᾠ ∷ δ ∷ α ∷ ῖ ∷ ς ∷ []) "Col.3.16" ∷ word (π ∷ ν ∷ ε ∷ υ ∷ μ ∷ α ∷ τ ∷ ι ∷ κ ∷ α ∷ ῖ ∷ ς ∷ []) "Col.3.16" ∷ word (ἐ ∷ ν ∷ []) "Col.3.16" ∷ word (χ ∷ ά ∷ ρ ∷ ι ∷ τ ∷ ι ∷ []) "Col.3.16" ∷ word (ᾄ ∷ δ ∷ ο ∷ ν ∷ τ ∷ ε ∷ ς ∷ []) "Col.3.16" ∷ word (ἐ ∷ ν ∷ []) "Col.3.16" ∷ word (τ ∷ α ∷ ῖ ∷ ς ∷ []) "Col.3.16" ∷ word (κ ∷ α ∷ ρ ∷ δ ∷ ί ∷ α ∷ ι ∷ ς ∷ []) "Col.3.16" ∷ word (ὑ ∷ μ ∷ ῶ ∷ ν ∷ []) "Col.3.16" ∷ word (τ ∷ ῷ ∷ []) "Col.3.16" ∷ word (θ ∷ ε ∷ ῷ ∷ []) "Col.3.16" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.3.17" ∷ word (π ∷ ᾶ ∷ ν ∷ []) "Col.3.17" ∷ word (ὅ ∷ []) "Col.3.17" ∷ word (τ ∷ ι ∷ []) "Col.3.17" ∷ word (ἐ ∷ ὰ ∷ ν ∷ []) "Col.3.17" ∷ word (π ∷ ο ∷ ι ∷ ῆ ∷ τ ∷ ε ∷ []) "Col.3.17" ∷ word (ἐ ∷ ν ∷ []) "Col.3.17" ∷ word (∙λ ∷ ό ∷ γ ∷ ῳ ∷ []) "Col.3.17" ∷ word (ἢ ∷ []) "Col.3.17" ∷ word (ἐ ∷ ν ∷ []) "Col.3.17" ∷ word (ἔ ∷ ρ ∷ γ ∷ ῳ ∷ []) "Col.3.17" ∷ word (π ∷ ά ∷ ν ∷ τ ∷ α ∷ []) "Col.3.17" ∷ word (ἐ ∷ ν ∷ []) "Col.3.17" ∷ word (ὀ ∷ ν ∷ ό ∷ μ ∷ α ∷ τ ∷ ι ∷ []) "Col.3.17" ∷ word (κ ∷ υ ∷ ρ ∷ ί ∷ ο ∷ υ ∷ []) "Col.3.17" ∷ word (Ἰ ∷ η ∷ σ ∷ ο ∷ ῦ ∷ []) "Col.3.17" ∷ word (ε ∷ ὐ ∷ χ ∷ α ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ο ∷ ῦ ∷ ν ∷ τ ∷ ε ∷ ς ∷ []) "Col.3.17" ∷ word (τ ∷ ῷ ∷ []) "Col.3.17" ∷ word (θ ∷ ε ∷ ῷ ∷ []) "Col.3.17" ∷ word (π ∷ α ∷ τ ∷ ρ ∷ ὶ ∷ []) "Col.3.17" ∷ word (δ ∷ ι ∷ []) "Col.3.17" ∷ word (α ∷ ὐ ∷ τ ∷ ο ∷ ῦ ∷ []) "Col.3.17" ∷ word (Α ∷ ἱ ∷ []) "Col.3.18" ∷ word (γ ∷ υ ∷ ν ∷ α ∷ ῖ ∷ κ ∷ ε ∷ ς ∷ []) "Col.3.18" ∷ word (ὑ ∷ π ∷ ο ∷ τ ∷ ά ∷ σ ∷ σ ∷ ε ∷ σ ∷ θ ∷ ε ∷ []) "Col.3.18" ∷ word (τ ∷ ο ∷ ῖ ∷ ς ∷ []) "Col.3.18" ∷ word (ἀ ∷ ν ∷ δ ∷ ρ ∷ ά ∷ σ ∷ ι ∷ ν ∷ []) "Col.3.18" ∷ word (ὡ ∷ ς ∷ []) "Col.3.18" ∷ word (ἀ ∷ ν ∷ ῆ ∷ κ ∷ ε ∷ ν ∷ []) "Col.3.18" ∷ word (ἐ ∷ ν ∷ []) "Col.3.18" ∷ word (κ ∷ υ ∷ ρ ∷ ί ∷ ῳ ∷ []) "Col.3.18" ∷ word (ο ∷ ἱ ∷ []) "Col.3.19" ∷ word (ἄ ∷ ν ∷ δ ∷ ρ ∷ ε ∷ ς ∷ []) "Col.3.19" ∷ word (ἀ ∷ γ ∷ α ∷ π ∷ ᾶ ∷ τ ∷ ε ∷ []) "Col.3.19" ∷ word (τ ∷ ὰ ∷ ς ∷ []) "Col.3.19" ∷ word (γ ∷ υ ∷ ν ∷ α ∷ ῖ ∷ κ ∷ α ∷ ς ∷ []) "Col.3.19" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.3.19" ∷ word (μ ∷ ὴ ∷ []) "Col.3.19" ∷ word (π ∷ ι ∷ κ ∷ ρ ∷ α ∷ ί ∷ ν ∷ ε ∷ σ ∷ θ ∷ ε ∷ []) "Col.3.19" ∷ word (π ∷ ρ ∷ ὸ ∷ ς ∷ []) "Col.3.19" ∷ word (α ∷ ὐ ∷ τ ∷ ά ∷ ς ∷ []) "Col.3.19" ∷ word (Τ ∷ ὰ ∷ []) "Col.3.20" ∷ word (τ ∷ έ ∷ κ ∷ ν ∷ α ∷ []) "Col.3.20" ∷ word (ὑ ∷ π ∷ α ∷ κ ∷ ο ∷ ύ ∷ ε ∷ τ ∷ ε ∷ []) "Col.3.20" ∷ word (τ ∷ ο ∷ ῖ ∷ ς ∷ []) "Col.3.20" ∷ word (γ ∷ ο ∷ ν ∷ ε ∷ ῦ ∷ σ ∷ ι ∷ ν ∷ []) "Col.3.20" ∷ word (κ ∷ α ∷ τ ∷ ὰ ∷ []) "Col.3.20" ∷ word (π ∷ ά ∷ ν ∷ τ ∷ α ∷ []) "Col.3.20" ∷ word (τ ∷ ο ∷ ῦ ∷ τ ∷ ο ∷ []) "Col.3.20" ∷ word (γ ∷ ὰ ∷ ρ ∷ []) "Col.3.20" ∷ word (ε ∷ ὐ ∷ ά ∷ ρ ∷ ε ∷ σ ∷ τ ∷ ό ∷ ν ∷ []) "Col.3.20" ∷ word (ἐ ∷ σ ∷ τ ∷ ι ∷ ν ∷ []) "Col.3.20" ∷ word (ἐ ∷ ν ∷ []) "Col.3.20" ∷ word (κ ∷ υ ∷ ρ ∷ ί ∷ ῳ ∷ []) "Col.3.20" ∷ word (ο ∷ ἱ ∷ []) "Col.3.21" ∷ word (π ∷ α ∷ τ ∷ έ ∷ ρ ∷ ε ∷ ς ∷ []) "Col.3.21" ∷ word (μ ∷ ὴ ∷ []) "Col.3.21" ∷ word (ἐ ∷ ρ ∷ ε ∷ θ ∷ ί ∷ ζ ∷ ε ∷ τ ∷ ε ∷ []) "Col.3.21" ∷ word (τ ∷ ὰ ∷ []) "Col.3.21" ∷ word (τ ∷ έ ∷ κ ∷ ν ∷ α ∷ []) "Col.3.21" ∷ word (ὑ ∷ μ ∷ ῶ ∷ ν ∷ []) "Col.3.21" ∷ word (ἵ ∷ ν ∷ α ∷ []) "Col.3.21" ∷ word (μ ∷ ὴ ∷ []) "Col.3.21" ∷ word (ἀ ∷ θ ∷ υ ∷ μ ∷ ῶ ∷ σ ∷ ι ∷ ν ∷ []) "Col.3.21" ∷ word (ο ∷ ἱ ∷ []) "Col.3.22" ∷ word (δ ∷ ο ∷ ῦ ∷ ∙λ ∷ ο ∷ ι ∷ []) "Col.3.22" ∷ word (ὑ ∷ π ∷ α ∷ κ ∷ ο ∷ ύ ∷ ε ∷ τ ∷ ε ∷ []) "Col.3.22" ∷ word (κ ∷ α ∷ τ ∷ ὰ ∷ []) "Col.3.22" ∷ word (π ∷ ά ∷ ν ∷ τ ∷ α ∷ []) "Col.3.22" ∷ word (τ ∷ ο ∷ ῖ ∷ ς ∷ []) "Col.3.22" ∷ word (κ ∷ α ∷ τ ∷ ὰ ∷ []) "Col.3.22" ∷ word (σ ∷ ά ∷ ρ ∷ κ ∷ α ∷ []) "Col.3.22" ∷ word (κ ∷ υ ∷ ρ ∷ ί ∷ ο ∷ ι ∷ ς ∷ []) "Col.3.22" ∷ word (μ ∷ ὴ ∷ []) "Col.3.22" ∷ word (ἐ ∷ ν ∷ []) "Col.3.22" ∷ word (ὀ ∷ φ ∷ θ ∷ α ∷ ∙λ ∷ μ ∷ ο ∷ δ ∷ ο ∷ υ ∷ ∙λ ∷ ί ∷ α ∷ ι ∷ ς ∷ []) "Col.3.22" ∷ word (ὡ ∷ ς ∷ []) "Col.3.22" ∷ word (ἀ ∷ ν ∷ θ ∷ ρ ∷ ω ∷ π ∷ ά ∷ ρ ∷ ε ∷ σ ∷ κ ∷ ο ∷ ι ∷ []) "Col.3.22" ∷ word (ἀ ∷ ∙λ ∷ ∙λ ∷ []) "Col.3.22" ∷ word (ἐ ∷ ν ∷ []) "Col.3.22" ∷ word (ἁ ∷ π ∷ ∙λ ∷ ό ∷ τ ∷ η ∷ τ ∷ ι ∷ []) "Col.3.22" ∷ word (κ ∷ α ∷ ρ ∷ δ ∷ ί ∷ α ∷ ς ∷ []) "Col.3.22" ∷ word (φ ∷ ο ∷ β ∷ ο ∷ ύ ∷ μ ∷ ε ∷ ν ∷ ο ∷ ι ∷ []) "Col.3.22" ∷ word (τ ∷ ὸ ∷ ν ∷ []) "Col.3.22" ∷ word (κ ∷ ύ ∷ ρ ∷ ι ∷ ο ∷ ν ∷ []) "Col.3.22" ∷ word (ὃ ∷ []) "Col.3.23" ∷ word (ἐ ∷ ὰ ∷ ν ∷ []) "Col.3.23" ∷ word (π ∷ ο ∷ ι ∷ ῆ ∷ τ ∷ ε ∷ []) "Col.3.23" ∷ word (ἐ ∷ κ ∷ []) "Col.3.23" ∷ word (ψ ∷ υ ∷ χ ∷ ῆ ∷ ς ∷ []) "Col.3.23" ∷ word (ἐ ∷ ρ ∷ γ ∷ ά ∷ ζ ∷ ε ∷ σ ∷ θ ∷ ε ∷ []) "Col.3.23" ∷ word (ὡ ∷ ς ∷ []) "Col.3.23" ∷ word (τ ∷ ῷ ∷ []) "Col.3.23" ∷ word (κ ∷ υ ∷ ρ ∷ ί ∷ ῳ ∷ []) "Col.3.23" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.3.23" ∷ word (ο ∷ ὐ ∷ κ ∷ []) "Col.3.23" ∷ word (ἀ ∷ ν ∷ θ ∷ ρ ∷ ώ ∷ π ∷ ο ∷ ι ∷ ς ∷ []) "Col.3.23" ∷ word (ε ∷ ἰ ∷ δ ∷ ό ∷ τ ∷ ε ∷ ς ∷ []) "Col.3.24" ∷ word (ὅ ∷ τ ∷ ι ∷ []) "Col.3.24" ∷ word (ἀ ∷ π ∷ ὸ ∷ []) "Col.3.24" ∷ word (κ ∷ υ ∷ ρ ∷ ί ∷ ο ∷ υ ∷ []) "Col.3.24" ∷ word (ἀ ∷ π ∷ ο ∷ ∙λ ∷ ή ∷ μ ∷ ψ ∷ ε ∷ σ ∷ θ ∷ ε ∷ []) "Col.3.24" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "Col.3.24" ∷ word (ἀ ∷ ν ∷ τ ∷ α ∷ π ∷ ό ∷ δ ∷ ο ∷ σ ∷ ι ∷ ν ∷ []) "Col.3.24" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "Col.3.24" ∷ word (κ ∷ ∙λ ∷ η ∷ ρ ∷ ο ∷ ν ∷ ο ∷ μ ∷ ί ∷ α ∷ ς ∷ []) "Col.3.24" ∷ word (τ ∷ ῷ ∷ []) "Col.3.24" ∷ word (κ ∷ υ ∷ ρ ∷ ί ∷ ῳ ∷ []) "Col.3.24" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ῷ ∷ []) "Col.3.24" ∷ word (δ ∷ ο ∷ υ ∷ ∙λ ∷ ε ∷ ύ ∷ ε ∷ τ ∷ ε ∷ []) "Col.3.24" ∷ word (ὁ ∷ []) "Col.3.25" ∷ word (γ ∷ ὰ ∷ ρ ∷ []) "Col.3.25" ∷ word (ἀ ∷ δ ∷ ι ∷ κ ∷ ῶ ∷ ν ∷ []) "Col.3.25" ∷ word (κ ∷ ο ∷ μ ∷ ί ∷ σ ∷ ε ∷ τ ∷ α ∷ ι ∷ []) "Col.3.25" ∷ word (ὃ ∷ []) "Col.3.25" ∷ word (ἠ ∷ δ ∷ ί ∷ κ ∷ η ∷ σ ∷ ε ∷ ν ∷ []) "Col.3.25" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.3.25" ∷ word (ο ∷ ὐ ∷ κ ∷ []) "Col.3.25" ∷ word (ἔ ∷ σ ∷ τ ∷ ι ∷ ν ∷ []) "Col.3.25" ∷ word (π ∷ ρ ∷ ο ∷ σ ∷ ω ∷ π ∷ ο ∷ ∙λ ∷ η ∷ μ ∷ ψ ∷ ί ∷ α ∷ []) "Col.3.25" ∷ word (ο ∷ ἱ ∷ []) "Col.4.1" ∷ word (κ ∷ ύ ∷ ρ ∷ ι ∷ ο ∷ ι ∷ []) "Col.4.1" ∷ word (τ ∷ ὸ ∷ []) "Col.4.1" ∷ word (δ ∷ ί ∷ κ ∷ α ∷ ι ∷ ο ∷ ν ∷ []) "Col.4.1" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.4.1" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "Col.4.1" ∷ word (ἰ ∷ σ ∷ ό ∷ τ ∷ η ∷ τ ∷ α ∷ []) "Col.4.1" ∷ word (τ ∷ ο ∷ ῖ ∷ ς ∷ []) "Col.4.1" ∷ word (δ ∷ ο ∷ ύ ∷ ∙λ ∷ ο ∷ ι ∷ ς ∷ []) "Col.4.1" ∷ word (π ∷ α ∷ ρ ∷ έ ∷ χ ∷ ε ∷ σ ∷ θ ∷ ε ∷ []) "Col.4.1" ∷ word (ε ∷ ἰ ∷ δ ∷ ό ∷ τ ∷ ε ∷ ς ∷ []) "Col.4.1" ∷ word (ὅ ∷ τ ∷ ι ∷ []) "Col.4.1" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.4.1" ∷ word (ὑ ∷ μ ∷ ε ∷ ῖ ∷ ς ∷ []) "Col.4.1" ∷ word (ἔ ∷ χ ∷ ε ∷ τ ∷ ε ∷ []) "Col.4.1" ∷ word (κ ∷ ύ ∷ ρ ∷ ι ∷ ο ∷ ν ∷ []) "Col.4.1" ∷ word (ἐ ∷ ν ∷ []) "Col.4.1" ∷ word (ο ∷ ὐ ∷ ρ ∷ α ∷ ν ∷ ῷ ∷ []) "Col.4.1" ∷ word (Τ ∷ ῇ ∷ []) "Col.4.2" ∷ word (π ∷ ρ ∷ ο ∷ σ ∷ ε ∷ υ ∷ χ ∷ ῇ ∷ []) "Col.4.2" ∷ word (π ∷ ρ ∷ ο ∷ σ ∷ κ ∷ α ∷ ρ ∷ τ ∷ ε ∷ ρ ∷ ε ∷ ῖ ∷ τ ∷ ε ∷ []) "Col.4.2" ∷ word (γ ∷ ρ ∷ η ∷ γ ∷ ο ∷ ρ ∷ ο ∷ ῦ ∷ ν ∷ τ ∷ ε ∷ ς ∷ []) "Col.4.2" ∷ word (ἐ ∷ ν ∷ []) "Col.4.2" ∷ word (α ∷ ὐ ∷ τ ∷ ῇ ∷ []) "Col.4.2" ∷ word (ἐ ∷ ν ∷ []) "Col.4.2" ∷ word (ε ∷ ὐ ∷ χ ∷ α ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ί ∷ ᾳ ∷ []) "Col.4.2" ∷ word (π ∷ ρ ∷ ο ∷ σ ∷ ε ∷ υ ∷ χ ∷ ό ∷ μ ∷ ε ∷ ν ∷ ο ∷ ι ∷ []) "Col.4.3" ∷ word (ἅ ∷ μ ∷ α ∷ []) "Col.4.3" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.4.3" ∷ word (π ∷ ε ∷ ρ ∷ ὶ ∷ []) "Col.4.3" ∷ word (ἡ ∷ μ ∷ ῶ ∷ ν ∷ []) "Col.4.3" ∷ word (ἵ ∷ ν ∷ α ∷ []) "Col.4.3" ∷ word (ὁ ∷ []) "Col.4.3" ∷ word (θ ∷ ε ∷ ὸ ∷ ς ∷ []) "Col.4.3" ∷ word (ἀ ∷ ν ∷ ο ∷ ί ∷ ξ ∷ ῃ ∷ []) "Col.4.3" ∷ word (ἡ ∷ μ ∷ ῖ ∷ ν ∷ []) "Col.4.3" ∷ word (θ ∷ ύ ∷ ρ ∷ α ∷ ν ∷ []) "Col.4.3" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "Col.4.3" ∷ word (∙λ ∷ ό ∷ γ ∷ ο ∷ υ ∷ []) "Col.4.3" ∷ word (∙λ ∷ α ∷ ∙λ ∷ ῆ ∷ σ ∷ α ∷ ι ∷ []) "Col.4.3" ∷ word (τ ∷ ὸ ∷ []) "Col.4.3" ∷ word (μ ∷ υ ∷ σ ∷ τ ∷ ή ∷ ρ ∷ ι ∷ ο ∷ ν ∷ []) "Col.4.3" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "Col.4.3" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ο ∷ ῦ ∷ []) "Col.4.3" ∷ word (δ ∷ ι ∷ []) "Col.4.3" ∷ word (ὃ ∷ []) "Col.4.3" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.4.3" ∷ word (δ ∷ έ ∷ δ ∷ ε ∷ μ ∷ α ∷ ι ∷ []) "Col.4.3" ∷ word (ἵ ∷ ν ∷ α ∷ []) "Col.4.4" ∷ word (φ ∷ α ∷ ν ∷ ε ∷ ρ ∷ ώ ∷ σ ∷ ω ∷ []) "Col.4.4" ∷ word (α ∷ ὐ ∷ τ ∷ ὸ ∷ []) "Col.4.4" ∷ word (ὡ ∷ ς ∷ []) "Col.4.4" ∷ word (δ ∷ ε ∷ ῖ ∷ []) "Col.4.4" ∷ word (μ ∷ ε ∷ []) "Col.4.4" ∷ word (∙λ ∷ α ∷ ∙λ ∷ ῆ ∷ σ ∷ α ∷ ι ∷ []) "Col.4.4" ∷ word (Ἐ ∷ ν ∷ []) "Col.4.5" ∷ word (σ ∷ ο ∷ φ ∷ ί ∷ ᾳ ∷ []) "Col.4.5" ∷ word (π ∷ ε ∷ ρ ∷ ι ∷ π ∷ α ∷ τ ∷ ε ∷ ῖ ∷ τ ∷ ε ∷ []) "Col.4.5" ∷ word (π ∷ ρ ∷ ὸ ∷ ς ∷ []) "Col.4.5" ∷ word (τ ∷ ο ∷ ὺ ∷ ς ∷ []) "Col.4.5" ∷ word (ἔ ∷ ξ ∷ ω ∷ []) "Col.4.5" ∷ word (τ ∷ ὸ ∷ ν ∷ []) "Col.4.5" ∷ word (κ ∷ α ∷ ι ∷ ρ ∷ ὸ ∷ ν ∷ []) "Col.4.5" ∷ word (ἐ ∷ ξ ∷ α ∷ γ ∷ ο ∷ ρ ∷ α ∷ ζ ∷ ό ∷ μ ∷ ε ∷ ν ∷ ο ∷ ι ∷ []) "Col.4.5" ∷ word (ὁ ∷ []) "Col.4.6" ∷ word (∙λ ∷ ό ∷ γ ∷ ο ∷ ς ∷ []) "Col.4.6" ∷ word (ὑ ∷ μ ∷ ῶ ∷ ν ∷ []) "Col.4.6" ∷ word (π ∷ ά ∷ ν ∷ τ ∷ ο ∷ τ ∷ ε ∷ []) "Col.4.6" ∷ word (ἐ ∷ ν ∷ []) "Col.4.6" ∷ word (χ ∷ ά ∷ ρ ∷ ι ∷ τ ∷ ι ∷ []) "Col.4.6" ∷ word (ἅ ∷ ∙λ ∷ α ∷ τ ∷ ι ∷ []) "Col.4.6" ∷ word (ἠ ∷ ρ ∷ τ ∷ υ ∷ μ ∷ έ ∷ ν ∷ ο ∷ ς ∷ []) "Col.4.6" ∷ word (ε ∷ ἰ ∷ δ ∷ έ ∷ ν ∷ α ∷ ι ∷ []) "Col.4.6" ∷ word (π ∷ ῶ ∷ ς ∷ []) "Col.4.6" ∷ word (δ ∷ ε ∷ ῖ ∷ []) "Col.4.6" ∷ word (ὑ ∷ μ ∷ ᾶ ∷ ς ∷ []) "Col.4.6" ∷ word (ἑ ∷ ν ∷ ὶ ∷ []) "Col.4.6" ∷ word (ἑ ∷ κ ∷ ά ∷ σ ∷ τ ∷ ῳ ∷ []) "Col.4.6" ∷ word (ἀ ∷ π ∷ ο ∷ κ ∷ ρ ∷ ί ∷ ν ∷ ε ∷ σ ∷ θ ∷ α ∷ ι ∷ []) "Col.4.6" ∷ word (Τ ∷ ὰ ∷ []) "Col.4.7" ∷ word (κ ∷ α ∷ τ ∷ []) "Col.4.7" ∷ word (ἐ ∷ μ ∷ ὲ ∷ []) "Col.4.7" ∷ word (π ∷ ά ∷ ν ∷ τ ∷ α ∷ []) "Col.4.7" ∷ word (γ ∷ ν ∷ ω ∷ ρ ∷ ί ∷ σ ∷ ε ∷ ι ∷ []) "Col.4.7" ∷ word (ὑ ∷ μ ∷ ῖ ∷ ν ∷ []) "Col.4.7" ∷ word (Τ ∷ υ ∷ χ ∷ ι ∷ κ ∷ ὸ ∷ ς ∷ []) "Col.4.7" ∷ word (ὁ ∷ []) "Col.4.7" ∷ word (ἀ ∷ γ ∷ α ∷ π ∷ η ∷ τ ∷ ὸ ∷ ς ∷ []) "Col.4.7" ∷ word (ἀ ∷ δ ∷ ε ∷ ∙λ ∷ φ ∷ ὸ ∷ ς ∷ []) "Col.4.7" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.4.7" ∷ word (π ∷ ι ∷ σ ∷ τ ∷ ὸ ∷ ς ∷ []) "Col.4.7" ∷ word (δ ∷ ι ∷ ά ∷ κ ∷ ο ∷ ν ∷ ο ∷ ς ∷ []) "Col.4.7" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.4.7" ∷ word (σ ∷ ύ ∷ ν ∷ δ ∷ ο ∷ υ ∷ ∙λ ∷ ο ∷ ς ∷ []) "Col.4.7" ∷ word (ἐ ∷ ν ∷ []) "Col.4.7" ∷ word (κ ∷ υ ∷ ρ ∷ ί ∷ ῳ ∷ []) "Col.4.7" ∷ word (ὃ ∷ ν ∷ []) "Col.4.8" ∷ word (ἔ ∷ π ∷ ε ∷ μ ∷ ψ ∷ α ∷ []) "Col.4.8" ∷ word (π ∷ ρ ∷ ὸ ∷ ς ∷ []) "Col.4.8" ∷ word (ὑ ∷ μ ∷ ᾶ ∷ ς ∷ []) "Col.4.8" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "Col.4.8" ∷ word (α ∷ ὐ ∷ τ ∷ ὸ ∷ []) "Col.4.8" ∷ word (τ ∷ ο ∷ ῦ ∷ τ ∷ ο ∷ []) "Col.4.8" ∷ word (ἵ ∷ ν ∷ α ∷ []) "Col.4.8" ∷ word (γ ∷ ν ∷ ῶ ∷ τ ∷ ε ∷ []) "Col.4.8" ∷ word (τ ∷ ὰ ∷ []) "Col.4.8" ∷ word (π ∷ ε ∷ ρ ∷ ὶ ∷ []) "Col.4.8" ∷ word (ἡ ∷ μ ∷ ῶ ∷ ν ∷ []) "Col.4.8" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.4.8" ∷ word (π ∷ α ∷ ρ ∷ α ∷ κ ∷ α ∷ ∙λ ∷ έ ∷ σ ∷ ῃ ∷ []) "Col.4.8" ∷ word (τ ∷ ὰ ∷ ς ∷ []) "Col.4.8" ∷ word (κ ∷ α ∷ ρ ∷ δ ∷ ί ∷ α ∷ ς ∷ []) "Col.4.8" ∷ word (ὑ ∷ μ ∷ ῶ ∷ ν ∷ []) "Col.4.8" ∷ word (σ ∷ ὺ ∷ ν ∷ []) "Col.4.9" ∷ word (Ὀ ∷ ν ∷ η ∷ σ ∷ ί ∷ μ ∷ ῳ ∷ []) "Col.4.9" ∷ word (τ ∷ ῷ ∷ []) "Col.4.9" ∷ word (π ∷ ι ∷ σ ∷ τ ∷ ῷ ∷ []) "Col.4.9" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.4.9" ∷ word (ἀ ∷ γ ∷ α ∷ π ∷ η ∷ τ ∷ ῷ ∷ []) "Col.4.9" ∷ word (ἀ ∷ δ ∷ ε ∷ ∙λ ∷ φ ∷ ῷ ∷ []) "Col.4.9" ∷ word (ὅ ∷ ς ∷ []) "Col.4.9" ∷ word (ἐ ∷ σ ∷ τ ∷ ι ∷ ν ∷ []) "Col.4.9" ∷ word (ἐ ∷ ξ ∷ []) "Col.4.9" ∷ word (ὑ ∷ μ ∷ ῶ ∷ ν ∷ []) "Col.4.9" ∷ word (π ∷ ά ∷ ν ∷ τ ∷ α ∷ []) "Col.4.9" ∷ word (ὑ ∷ μ ∷ ῖ ∷ ν ∷ []) "Col.4.9" ∷ word (γ ∷ ν ∷ ω ∷ ρ ∷ ί ∷ σ ∷ ο ∷ υ ∷ σ ∷ ι ∷ ν ∷ []) "Col.4.9" ∷ word (τ ∷ ὰ ∷ []) "Col.4.9" ∷ word (ὧ ∷ δ ∷ ε ∷ []) "Col.4.9" ∷ word (Ἀ ∷ σ ∷ π ∷ ά ∷ ζ ∷ ε ∷ τ ∷ α ∷ ι ∷ []) "Col.4.10" ∷ word (ὑ ∷ μ ∷ ᾶ ∷ ς ∷ []) "Col.4.10" ∷ word (Ἀ ∷ ρ ∷ ί ∷ σ ∷ τ ∷ α ∷ ρ ∷ χ ∷ ο ∷ ς ∷ []) "Col.4.10" ∷ word (ὁ ∷ []) "Col.4.10" ∷ word (σ ∷ υ ∷ ν ∷ α ∷ ι ∷ χ ∷ μ ∷ ά ∷ ∙λ ∷ ω ∷ τ ∷ ό ∷ ς ∷ []) "Col.4.10" ∷ word (μ ∷ ο ∷ υ ∷ []) "Col.4.10" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.4.10" ∷ word (Μ ∷ ᾶ ∷ ρ ∷ κ ∷ ο ∷ ς ∷ []) "Col.4.10" ∷ word (ὁ ∷ []) "Col.4.10" ∷ word (ἀ ∷ ν ∷ ε ∷ ψ ∷ ι ∷ ὸ ∷ ς ∷ []) "Col.4.10" ∷ word (Β ∷ α ∷ ρ ∷ ν ∷ α ∷ β ∷ ᾶ ∷ []) "Col.4.10" ∷ word (π ∷ ε ∷ ρ ∷ ὶ ∷ []) "Col.4.10" ∷ word (ο ∷ ὗ ∷ []) "Col.4.10" ∷ word (ἐ ∷ ∙λ ∷ ά ∷ β ∷ ε ∷ τ ∷ ε ∷ []) "Col.4.10" ∷ word (ἐ ∷ ν ∷ τ ∷ ο ∷ ∙λ ∷ ά ∷ ς ∷ []) "Col.4.10" ∷ word (ἐ ∷ ὰ ∷ ν ∷ []) "Col.4.10" ∷ word (ἔ ∷ ∙λ ∷ θ ∷ ῃ ∷ []) "Col.4.10" ∷ word (π ∷ ρ ∷ ὸ ∷ ς ∷ []) "Col.4.10" ∷ word (ὑ ∷ μ ∷ ᾶ ∷ ς ∷ []) "Col.4.10" ∷ word (δ ∷ έ ∷ ξ ∷ α ∷ σ ∷ θ ∷ ε ∷ []) "Col.4.10" ∷ word (α ∷ ὐ ∷ τ ∷ ό ∷ ν ∷ []) "Col.4.10" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.4.11" ∷ word (Ἰ ∷ η ∷ σ ∷ ο ∷ ῦ ∷ ς ∷ []) "Col.4.11" ∷ word (ὁ ∷ []) "Col.4.11" ∷ word (∙λ ∷ ε ∷ γ ∷ ό ∷ μ ∷ ε ∷ ν ∷ ο ∷ ς ∷ []) "Col.4.11" ∷ word (Ἰ ∷ ο ∷ ῦ ∷ σ ∷ τ ∷ ο ∷ ς ∷ []) "Col.4.11" ∷ word (ο ∷ ἱ ∷ []) "Col.4.11" ∷ word (ὄ ∷ ν ∷ τ ∷ ε ∷ ς ∷ []) "Col.4.11" ∷ word (ἐ ∷ κ ∷ []) "Col.4.11" ∷ word (π ∷ ε ∷ ρ ∷ ι ∷ τ ∷ ο ∷ μ ∷ ῆ ∷ ς ∷ []) "Col.4.11" ∷ word (ο ∷ ὗ ∷ τ ∷ ο ∷ ι ∷ []) "Col.4.11" ∷ word (μ ∷ ό ∷ ν ∷ ο ∷ ι ∷ []) "Col.4.11" ∷ word (σ ∷ υ ∷ ν ∷ ε ∷ ρ ∷ γ ∷ ο ∷ ὶ ∷ []) "Col.4.11" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "Col.4.11" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "Col.4.11" ∷ word (β ∷ α ∷ σ ∷ ι ∷ ∙λ ∷ ε ∷ ί ∷ α ∷ ν ∷ []) "Col.4.11" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "Col.4.11" ∷ word (θ ∷ ε ∷ ο ∷ ῦ ∷ []) "Col.4.11" ∷ word (ο ∷ ἵ ∷ τ ∷ ι ∷ ν ∷ ε ∷ ς ∷ []) "Col.4.11" ∷ word (ἐ ∷ γ ∷ ε ∷ ν ∷ ή ∷ θ ∷ η ∷ σ ∷ ά ∷ ν ∷ []) "Col.4.11" ∷ word (μ ∷ ο ∷ ι ∷ []) "Col.4.11" ∷ word (π ∷ α ∷ ρ ∷ η ∷ γ ∷ ο ∷ ρ ∷ ί ∷ α ∷ []) "Col.4.11" ∷ word (ἀ ∷ σ ∷ π ∷ ά ∷ ζ ∷ ε ∷ τ ∷ α ∷ ι ∷ []) "Col.4.12" ∷ word (ὑ ∷ μ ∷ ᾶ ∷ ς ∷ []) "Col.4.12" ∷ word (Ἐ ∷ π ∷ α ∷ φ ∷ ρ ∷ ᾶ ∷ ς ∷ []) "Col.4.12" ∷ word (ὁ ∷ []) "Col.4.12" ∷ word (ἐ ∷ ξ ∷ []) "Col.4.12" ∷ word (ὑ ∷ μ ∷ ῶ ∷ ν ∷ []) "Col.4.12" ∷ word (δ ∷ ο ∷ ῦ ∷ ∙λ ∷ ο ∷ ς ∷ []) "Col.4.12" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ο ∷ ῦ ∷ []) "Col.4.12" ∷ word (π ∷ ά ∷ ν ∷ τ ∷ ο ∷ τ ∷ ε ∷ []) "Col.4.12" ∷ word (ἀ ∷ γ ∷ ω ∷ ν ∷ ι ∷ ζ ∷ ό ∷ μ ∷ ε ∷ ν ∷ ο ∷ ς ∷ []) "Col.4.12" ∷ word (ὑ ∷ π ∷ ὲ ∷ ρ ∷ []) "Col.4.12" ∷ word (ὑ ∷ μ ∷ ῶ ∷ ν ∷ []) "Col.4.12" ∷ word (ἐ ∷ ν ∷ []) "Col.4.12" ∷ word (τ ∷ α ∷ ῖ ∷ ς ∷ []) "Col.4.12" ∷ word (π ∷ ρ ∷ ο ∷ σ ∷ ε ∷ υ ∷ χ ∷ α ∷ ῖ ∷ ς ∷ []) "Col.4.12" ∷ word (ἵ ∷ ν ∷ α ∷ []) "Col.4.12" ∷ word (σ ∷ τ ∷ α ∷ θ ∷ ῆ ∷ τ ∷ ε ∷ []) "Col.4.12" ∷ word (τ ∷ έ ∷ ∙λ ∷ ε ∷ ι ∷ ο ∷ ι ∷ []) "Col.4.12" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.4.12" ∷ word (π ∷ ε ∷ π ∷ ∙λ ∷ η ∷ ρ ∷ ο ∷ φ ∷ ο ∷ ρ ∷ η ∷ μ ∷ έ ∷ ν ∷ ο ∷ ι ∷ []) "Col.4.12" ∷ word (ἐ ∷ ν ∷ []) "Col.4.12" ∷ word (π ∷ α ∷ ν ∷ τ ∷ ὶ ∷ []) "Col.4.12" ∷ word (θ ∷ ε ∷ ∙λ ∷ ή ∷ μ ∷ α ∷ τ ∷ ι ∷ []) "Col.4.12" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "Col.4.12" ∷ word (θ ∷ ε ∷ ο ∷ ῦ ∷ []) "Col.4.12" ∷ word (μ ∷ α ∷ ρ ∷ τ ∷ υ ∷ ρ ∷ ῶ ∷ []) "Col.4.13" ∷ word (γ ∷ ὰ ∷ ρ ∷ []) "Col.4.13" ∷ word (α ∷ ὐ ∷ τ ∷ ῷ ∷ []) "Col.4.13" ∷ word (ὅ ∷ τ ∷ ι ∷ []) "Col.4.13" ∷ word (ἔ ∷ χ ∷ ε ∷ ι ∷ []) "Col.4.13" ∷ word (π ∷ ο ∷ ∙λ ∷ ὺ ∷ ν ∷ []) "Col.4.13" ∷ word (π ∷ ό ∷ ν ∷ ο ∷ ν ∷ []) "Col.4.13" ∷ word (ὑ ∷ π ∷ ὲ ∷ ρ ∷ []) "Col.4.13" ∷ word (ὑ ∷ μ ∷ ῶ ∷ ν ∷ []) "Col.4.13" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.4.13" ∷ word (τ ∷ ῶ ∷ ν ∷ []) "Col.4.13" ∷ word (ἐ ∷ ν ∷ []) "Col.4.13" ∷ word (Λ ∷ α ∷ ο ∷ δ ∷ ι ∷ κ ∷ ε ∷ ί ∷ ᾳ ∷ []) "Col.4.13" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.4.13" ∷ word (τ ∷ ῶ ∷ ν ∷ []) "Col.4.13" ∷ word (ἐ ∷ ν ∷ []) "Col.4.13" ∷ word (Ἱ ∷ ε ∷ ρ ∷ α ∷ π ∷ ό ∷ ∙λ ∷ ε ∷ ι ∷ []) "Col.4.13" ∷ word (ἀ ∷ σ ∷ π ∷ ά ∷ ζ ∷ ε ∷ τ ∷ α ∷ ι ∷ []) "Col.4.14" ∷ word (ὑ ∷ μ ∷ ᾶ ∷ ς ∷ []) "Col.4.14" ∷ word (Λ ∷ ο ∷ υ ∷ κ ∷ ᾶ ∷ ς ∷ []) "Col.4.14" ∷ word (ὁ ∷ []) "Col.4.14" ∷ word (ἰ ∷ α ∷ τ ∷ ρ ∷ ὸ ∷ ς ∷ []) "Col.4.14" ∷ word (ὁ ∷ []) "Col.4.14" ∷ word (ἀ ∷ γ ∷ α ∷ π ∷ η ∷ τ ∷ ὸ ∷ ς ∷ []) "Col.4.14" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.4.14" ∷ word (Δ ∷ η ∷ μ ∷ ᾶ ∷ ς ∷ []) "Col.4.14" ∷ word (ἀ ∷ σ ∷ π ∷ ά ∷ σ ∷ α ∷ σ ∷ θ ∷ ε ∷ []) "Col.4.15" ∷ word (τ ∷ ο ∷ ὺ ∷ ς ∷ []) "Col.4.15" ∷ word (ἐ ∷ ν ∷ []) "Col.4.15" ∷ word (Λ ∷ α ∷ ο ∷ δ ∷ ι ∷ κ ∷ ε ∷ ί ∷ ᾳ ∷ []) "Col.4.15" ∷ word (ἀ ∷ δ ∷ ε ∷ ∙λ ∷ φ ∷ ο ∷ ὺ ∷ ς ∷ []) "Col.4.15" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.4.15" ∷ word (Ν ∷ ύ ∷ μ ∷ φ ∷ α ∷ ν ∷ []) "Col.4.15" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.4.15" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "Col.4.15" ∷ word (κ ∷ α ∷ τ ∷ []) "Col.4.15" ∷ word (ο ∷ ἶ ∷ κ ∷ ο ∷ ν ∷ []) "Col.4.15" ∷ word (α ∷ ὐ ∷ τ ∷ ῆ ∷ ς ∷ []) "Col.4.15" ∷ word (ἐ ∷ κ ∷ κ ∷ ∙λ ∷ η ∷ σ ∷ ί ∷ α ∷ ν ∷ []) "Col.4.15" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.4.16" ∷ word (ὅ ∷ τ ∷ α ∷ ν ∷ []) "Col.4.16" ∷ word (ἀ ∷ ν ∷ α ∷ γ ∷ ν ∷ ω ∷ σ ∷ θ ∷ ῇ ∷ []) "Col.4.16" ∷ word (π ∷ α ∷ ρ ∷ []) "Col.4.16" ∷ word (ὑ ∷ μ ∷ ῖ ∷ ν ∷ []) "Col.4.16" ∷ word (ἡ ∷ []) "Col.4.16" ∷ word (ἐ ∷ π ∷ ι ∷ σ ∷ τ ∷ ο ∷ ∙λ ∷ ή ∷ []) "Col.4.16" ∷ word (π ∷ ο ∷ ι ∷ ή ∷ σ ∷ α ∷ τ ∷ ε ∷ []) "Col.4.16" ∷ word (ἵ ∷ ν ∷ α ∷ []) "Col.4.16" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.4.16" ∷ word (ἐ ∷ ν ∷ []) "Col.4.16" ∷ word (τ ∷ ῇ ∷ []) "Col.4.16" ∷ word (Λ ∷ α ∷ ο ∷ δ ∷ ι ∷ κ ∷ έ ∷ ω ∷ ν ∷ []) "Col.4.16" ∷ word (ἐ ∷ κ ∷ κ ∷ ∙λ ∷ η ∷ σ ∷ ί ∷ ᾳ ∷ []) "Col.4.16" ∷ word (ἀ ∷ ν ∷ α ∷ γ ∷ ν ∷ ω ∷ σ ∷ θ ∷ ῇ ∷ []) "Col.4.16" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.4.16" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "Col.4.16" ∷ word (ἐ ∷ κ ∷ []) "Col.4.16" ∷ word (Λ ∷ α ∷ ο ∷ δ ∷ ι ∷ κ ∷ ε ∷ ί ∷ α ∷ ς ∷ []) "Col.4.16" ∷ word (ἵ ∷ ν ∷ α ∷ []) "Col.4.16" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.4.16" ∷ word (ὑ ∷ μ ∷ ε ∷ ῖ ∷ ς ∷ []) "Col.4.16" ∷ word (ἀ ∷ ν ∷ α ∷ γ ∷ ν ∷ ῶ ∷ τ ∷ ε ∷ []) "Col.4.16" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Col.4.17" ∷ word (ε ∷ ἴ ∷ π ∷ α ∷ τ ∷ ε ∷ []) "Col.4.17" ∷ word (Ἀ ∷ ρ ∷ χ ∷ ί ∷ π ∷ π ∷ ῳ ∷ []) "Col.4.17" ∷ word (Β ∷ ∙λ ∷ έ ∷ π ∷ ε ∷ []) "Col.4.17" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "Col.4.17" ∷ word (δ ∷ ι ∷ α ∷ κ ∷ ο ∷ ν ∷ ί ∷ α ∷ ν ∷ []) "Col.4.17" ∷ word (ἣ ∷ ν ∷ []) "Col.4.17" ∷ word (π ∷ α ∷ ρ ∷ έ ∷ ∙λ ∷ α ∷ β ∷ ε ∷ ς ∷ []) "Col.4.17" ∷ word (ἐ ∷ ν ∷ []) "Col.4.17" ∷ word (κ ∷ υ ∷ ρ ∷ ί ∷ ῳ ∷ []) "Col.4.17" ∷ word (ἵ ∷ ν ∷ α ∷ []) "Col.4.17" ∷ word (α ∷ ὐ ∷ τ ∷ ὴ ∷ ν ∷ []) "Col.4.17" ∷ word (π ∷ ∙λ ∷ η ∷ ρ ∷ ο ∷ ῖ ∷ ς ∷ []) "Col.4.17" ∷ word (Ὁ ∷ []) "Col.4.18" ∷ word (ἀ ∷ σ ∷ π ∷ α ∷ σ ∷ μ ∷ ὸ ∷ ς ∷ []) "Col.4.18" ∷ word (τ ∷ ῇ ∷ []) "Col.4.18" ∷ word (ἐ ∷ μ ∷ ῇ ∷ []) "Col.4.18" ∷ word (χ ∷ ε ∷ ι ∷ ρ ∷ ὶ ∷ []) "Col.4.18" ∷ word (Π ∷ α ∷ ύ ∷ ∙λ ∷ ο ∷ υ ∷ []) "Col.4.18" ∷ word (μ ∷ ν ∷ η ∷ μ ∷ ο ∷ ν ∷ ε ∷ ύ ∷ ε ∷ τ ∷ έ ∷ []) "Col.4.18" ∷ word (μ ∷ ο ∷ υ ∷ []) "Col.4.18" ∷ word (τ ∷ ῶ ∷ ν ∷ []) "Col.4.18" ∷ word (δ ∷ ε ∷ σ ∷ μ ∷ ῶ ∷ ν ∷ []) "Col.4.18" ∷ word (ἡ ∷ []) "Col.4.18" ∷ word (χ ∷ ά ∷ ρ ∷ ι ∷ ς ∷ []) "Col.4.18" ∷ word (μ ∷ ε ∷ θ ∷ []) "Col.4.18" ∷ word (ὑ ∷ μ ∷ ῶ ∷ ν ∷ []) "Col.4.18" ∷ []
{ "alphanum_fraction": 0.3288091068, "avg_line_length": 44.5028284098, "ext": "agda", "hexsha": "445e816fddbc295037fcece8bdb747c0629c774b", "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/Col.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/Col.agda", "max_line_length": 90, "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/Col.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": 50027, "size": 70804 }
module ExCoinduction where open import Coinduction open import Relation.Binary.PropositionalEquality open import Data.Stream open import Data.Nat open import Data.Bool data Loc : Set where A : Loc DONE : Loc record Values : Set where field x : ℕ δ : ℕ k : ℕ data _Π_ (A B : Set) : Set where <_,_> : (a : Loc) → (b : Values) → A Π B -- The computation of x in the state -- The state machine step function funₓ : ℕ → ℕ → ℕ → ℕ funₓ x slope δ = x + δ * slope step : (Loc Π Values) → (Loc Π Values) step < A , b > with (X >= 10) where _>=_ : ℕ → ℕ → Bool zero >= zero = true zero >= suc y = false suc x >= zero = false suc x >= suc y = x >= y _==_ : ℕ → ℕ → Bool zero == zero = true zero == suc y = false suc x == zero = false suc x == suc y = x == y X : ℕ X = funₓ (Values.x b) 1 (Values.δ b) step < A , b > | false = < A , record { x = X; δ = Values.δ b ; k = Values.k b + 1 } > where X : ℕ X = funₓ (Values.x b) 1 (Values.δ b) step < A , b > | true = < DONE , record { x = X; δ = Values.δ b ; k = Values.k b + 1 } > where X : ℕ X = funₓ (Values.x b) 1 (Values.δ b) step < DONE , b > = < DONE , b > -- Just remain in this state forever -- Make a stream of runFSM -- f' : ∀ st → Stream (Loc Π Values) f' st = st ∷ ♯ (f' (step st)) from : Stream (Loc Π Values) from = f' (< A , (record { x = zero ; δ = 1 ; k = zero }) >) thm : from ≈ from thm = refl ∷ ♯ (refl ∷ (♯ (refl ∷ (♯ (refl ∷ (♯ (refl ∷ (♯ (refl ∷ (♯ (refl ∷ (♯ (refl ∷ (♯ (refl ∷ (♯ (refl ∷ ♯ (t')))))))))))))))))) where y : Stream (Loc Π Values) y = f' (< DONE , record { x = 10 ; δ = 1 ; k = 10 } > ) t' : y ≈ y t' = refl ∷ (♯ t')
{ "alphanum_fraction": 0.5220500596, "avg_line_length": 23.6338028169, "ext": "agda", "hexsha": "15280562c454e976bc277819bd378f6f9431ad8f", "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": "7128bb419cd4aa3eeacae1fae1a9eb2e57ee8166", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "amal029/agda-tutorial-dybjer", "max_forks_repo_path": "ExCoinduction.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "7128bb419cd4aa3eeacae1fae1a9eb2e57ee8166", "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": "amal029/agda-tutorial-dybjer", "max_issues_repo_path": "ExCoinduction.agda", "max_line_length": 99, "max_stars_count": 1, "max_stars_repo_head_hexsha": "7128bb419cd4aa3eeacae1fae1a9eb2e57ee8166", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "amal029/agda-tutorial-dybjer", "max_stars_repo_path": "ExCoinduction.agda", "max_stars_repo_stars_event_max_datetime": "2019-08-08T12:52:30.000Z", "max_stars_repo_stars_event_min_datetime": "2019-08-08T12:52:30.000Z", "num_tokens": 660, "size": 1678 }
{-# OPTIONS --without-K #-} open import lib.Basics open import lib.Relation module lib.types.SetQuotient where module _ {i} {A : Type i} {j} where private data #SetQuotient-aux (R : Rel A j) : Type i where #q[_] : A → #SetQuotient-aux R data #SetQuotient (R : Rel A j) : Type i where #setquot : #SetQuotient-aux R → (Unit → Unit) → #SetQuotient R SetQuotient : (R : Rel A j) → Type i SetQuotient = #SetQuotient module _ {R : Rel A j} where q[_] : (a : A) → SetQuotient R q[ a ] = #setquot #q[ a ] _ postulate -- HIT quot-rel : {a₁ a₂ : A} → R a₁ a₂ → q[ a₁ ] == q[ a₂ ] postulate -- HIT SetQuotient-level : is-set (SetQuotient R) SetQuotient-is-set = SetQuotient-level module SetQuotElim {k} {P : SetQuotient R → Type k} (p : (x : SetQuotient R) → is-set (P x)) (q[_]* : (a : A) → P q[ a ]) (rel* : ∀ {a₁ a₂} (r : R a₁ a₂) → q[ a₁ ]* == q[ a₂ ]* [ P ↓ quot-rel r ]) where f : Π (SetQuotient R) P f = f-aux phantom phantom where f-aux : Phantom p → Phantom {A = ∀ {a₁ a₂} (r : R a₁ a₂) → _} rel* → Π (SetQuotient R) P f-aux phantom phantom (#setquot #q[ a ] _) = q[ a ]* postulate -- HIT quot-rel-β : ∀ {a₁ a₂} (r : R a₁ a₂) → apd f (quot-rel r) == rel* r open SetQuotElim public renaming (f to SetQuot-elim) module SetQuotRec {i} {A : Type i} {j} {R : Rel A j} {k} {B : Type k} (p : is-set B) (q[_]* : A → B) (rel* : ∀ {a₁ a₂} (r : R a₁ a₂) → q[ a₁ ]* == q[ a₂ ]*) where private module M = SetQuotElim (λ x → p) q[_]* (λ {a₁ a₂} r → ↓-cst-in (rel* r)) f : SetQuotient R → B f = M.f open SetQuotRec public renaming (f to SetQuot-rec)
{ "alphanum_fraction": 0.5371997657, "avg_line_length": 28.45, "ext": "agda", "hexsha": "bdabf3908744a83ca10e0d51b36020f9b0f18322", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "bc849346a17b33e2679a5b3f2b8efbe7835dc4b6", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "cmknapp/HoTT-Agda", "max_forks_repo_path": "core/lib/types/SetQuotient.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "bc849346a17b33e2679a5b3f2b8efbe7835dc4b6", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "cmknapp/HoTT-Agda", "max_issues_repo_path": "core/lib/types/SetQuotient.agda", "max_line_length": 86, "max_stars_count": null, "max_stars_repo_head_hexsha": "bc849346a17b33e2679a5b3f2b8efbe7835dc4b6", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "cmknapp/HoTT-Agda", "max_stars_repo_path": "core/lib/types/SetQuotient.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 688, "size": 1707 }
-- Andreas, 2020-02-15 -- Test case by Jesper to prevent regressions when fixing #3541. -- Jesper, 2019-09-12: The fix of #3541 introduced a regression: the -- index of the equality type is treated as a positive argument. postulate X : Set module EqualityAsPredicate where data _≡_ (A : Set) : Set → Set where refl : A ≡ A data D : Set where c : D ≡ X → D data E : Set where c : X ≡ E → E module EqualityAsRelation where data _≡_ : Set → Set → Set where refl : ∀{A} → A ≡ A data D : Set where c : D ≡ X → D data E : Set where c : X ≡ E → E -- Expected: -- Positivity checker rejects D and E in both variants.
{ "alphanum_fraction": 0.6240487062, "avg_line_length": 19.3235294118, "ext": "agda", "hexsha": "e55ec5f9ae60ead8faf012f85bbcb5abdf88576a", "lang": "Agda", "max_forks_count": 371, "max_forks_repo_forks_event_max_datetime": "2022-03-30T19:00:30.000Z", "max_forks_repo_forks_event_min_datetime": "2015-01-03T14:04:08.000Z", "max_forks_repo_head_hexsha": "ed8ac6f4062ea8a20fa0f62d5db82d4e68278338", "max_forks_repo_licenses": [ "BSD-3-Clause" ], "max_forks_repo_name": "shlevy/agda", "max_forks_repo_path": "test/Fail/Issue3541EqualityNotPositive.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/Issue3541EqualityNotPositive.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/Fail/Issue3541EqualityNotPositive.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": 217, "size": 657 }
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Categories.NaturalTransformation.Properties where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Univalence open import Cubical.Foundations.HLevels open import Cubical.Foundations.Isomorphism renaming (iso to iIso) open import Cubical.Data.Sigma open import Cubical.Categories.Category open import Cubical.Categories.Functor.Base open import Cubical.Categories.Morphism renaming (isIso to isIsoC) open import Cubical.Categories.NaturalTransformation.Base private variable ℓC ℓC' ℓD ℓD' : Level open isIsoC open NatIso open NatTrans open Precategory open Functor module _ {C : Precategory ℓC ℓC'} {D : Precategory ℓD ℓD'} where private _⋆ᴰ_ : ∀ {x y z} (f : D [ x , y ]) (g : D [ y , z ]) → D [ x , z ] f ⋆ᴰ g = f ⋆⟨ D ⟩ g -- natural isomorphism is symmetric symNatIso : ∀ {F G : Functor C D} → F ≅ᶜ G → G ≅ᶜ F symNatIso η .trans .N-ob x = η .nIso x .inv symNatIso η .trans .N-hom _ = sqLL η symNatIso η .nIso x .inv = η .trans .N-ob x symNatIso η .nIso x .sec = η .nIso x .ret symNatIso η .nIso x .ret = η .nIso x .sec -- Properties -- path helpers module NatTransP where module _ {F G : Functor C D} where open Iso -- same as Sigma version NatTransΣ = Σ[ ob ∈ ((x : C .ob) → D [(F .F-ob x) , (G .F-ob x)]) ] ({x y : _ } (f : C [ x , y ]) → (F .F-hom f) ⋆ᴰ (ob y) ≡ (ob x) ⋆ᴰ (G .F-hom f)) NatTransIsoΣ : Iso (NatTrans F G) NatTransΣ NatTransIsoΣ .fun (natTrans N-ob N-hom) = N-ob , N-hom NatTransIsoΣ .inv (N-ob , N-hom) = (natTrans N-ob N-hom) NatTransIsoΣ .rightInv _ = refl NatTransIsoΣ .leftInv _ = refl NatTrans≡Σ = ua (isoToEquiv NatTransIsoΣ) -- introducing paths NatTrans-≡-intro : ∀ {αo βo : N-ob-Type F G} {αh : N-hom-Type F G αo} {βh : N-hom-Type F G βo} → (p : αo ≡ βo) → PathP (λ i → ({x y : C .ob} (f : C [ x , y ]) → (F .F-hom f) ⋆ᴰ (p i y) ≡ (p i x) ⋆ᴰ (G .F-hom f))) αh βh → natTrans {F = F} {G} αo αh ≡ natTrans βo βh NatTrans-≡-intro p q i = natTrans (p i) (q i) module _ {F G : Functor C D} {α β : NatTrans F G} where open Iso private αOb = α .N-ob βOb = β .N-ob αHom = α .N-hom βHom = β .N-hom -- path between natural transformations is the same as a pair of paths (between ob and hom) NTPathIsoPathΣ : Iso (α ≡ β) (Σ[ p ∈ (αOb ≡ βOb) ] (PathP (λ i → ({x y : _} (f : _) → F ⟪ f ⟫ ⋆ᴰ (p i y) ≡ (p i x) ⋆ᴰ G ⟪ f ⟫)) αHom βHom)) NTPathIsoPathΣ .fun p = (λ i → p i .N-ob) , (λ i → p i .N-hom) NTPathIsoPathΣ .inv (po , ph) i = record { N-ob = po i ; N-hom = ph i } NTPathIsoPathΣ .rightInv pσ = refl NTPathIsoPathΣ .leftInv p = refl NTPath≃PathΣ = isoToEquiv NTPathIsoPathΣ NTPath≡PathΣ = ua NTPath≃PathΣ module _ ⦃ isCatD : isCategory D ⦄ where open NatTransP -- if the target category has hom Sets, then any natural transformation is a set isSetNat : ∀ {F G : Functor C D} → isSet (NatTrans F G) isSetNat {F} {G} α β p1 p2 i = comp (λ i → NTPath≡PathΣ {F = F} {G} {α} {β} (~ i)) (λ j → λ {(i = i0) → transport-filler NTPath≡PathΣ p1 (~ j) ; (i = i1) → transport-filler NTPath≡PathΣ p2 (~ j)}) (p1Σ≡p2Σ i) where αOb = α .N-ob βOb = β .N-ob αHom = α .N-hom βHom = β .N-hom -- convert to sigmas so we can reason about constituent paths separately p1Σ : Σ[ p ∈ (αOb ≡ βOb) ] (PathP (λ i → ({x y : _} (f : _) → F ⟪ f ⟫ ⋆ᴰ (p i y) ≡ (p i x) ⋆ᴰ G ⟪ f ⟫)) αHom βHom) p1Σ = transport NTPath≡PathΣ p1 p2Σ : Σ[ p ∈ (αOb ≡ βOb) ] (PathP (λ i → ({x y : _} (f : _) → F ⟪ f ⟫ ⋆ᴰ (p i y) ≡ (p i x) ⋆ᴰ G ⟪ f ⟫)) αHom βHom) p2Σ = transport NTPath≡PathΣ p2 -- type aliases typeN-ob = (x : C .ob) → D [(F .F-ob x) , (G .F-ob x)] typeN-hom : typeN-ob → Type _ typeN-hom ϕ = {x y : C .ob} (f : C [ x , y ]) → (F .F-hom f) ⋆ᴰ (ϕ y) ≡ (ϕ x) ⋆ᴰ (G .F-hom f) -- the Ob function is a set isSetN-ob : isSet ((x : C .ob) → D [(F .F-ob x) , (G .F-ob x)]) isSetN-ob = isOfHLevelΠ 2 λ _ → isCatD .isSetHom -- the Hom function is a set isSetN-hom : (ϕ : typeN-ob) → isSet (typeN-hom ϕ) isSetN-hom γ = isProp→isSet (isPropImplicitΠ λ x → isPropImplicitΠ λ y → isPropΠ λ f → isCatD .isSetHom _ _) -- in fact it's a dependent Set, which we need because N-hom depends on N-ob isSetN-homP : isOfHLevelDep 2 (λ γ → {x y : C .ob} (f : C [ x , y ]) → (F .F-hom f) ⋆ᴰ (γ y) ≡ (γ x) ⋆ᴰ (G .F-hom f)) isSetN-homP = isOfHLevel→isOfHLevelDep 2 isSetN-hom -- components of the equality p1Ob≡p2Ob : fst p1Σ ≡ fst p2Σ p1Ob≡p2Ob = isSetN-ob _ _ (fst p1Σ) (fst p2Σ) p1Hom≡p2Hom : PathP (λ i → PathP (λ j → typeN-hom (p1Ob≡p2Ob i j)) αHom βHom) (snd p1Σ) (snd p2Σ) p1Hom≡p2Hom = isSetN-homP _ _ (snd p1Σ) (snd p2Σ) p1Ob≡p2Ob p1Σ≡p2Σ : p1Σ ≡ p2Σ p1Σ≡p2Σ = ΣPathP (p1Ob≡p2Ob , p1Hom≡p2Hom)
{ "alphanum_fraction": 0.5106723586, "avg_line_length": 38.2448979592, "ext": "agda", "hexsha": "4e7c3054a64d174234ebb351939ae8adbd67e814", "lang": "Agda", "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_head_hexsha": "5de11df25b79ee49d5c084fbbe6dfc66e4147a2e", "max_forks_repo_licenses": [ "MIT" ], "max_forks_repo_name": "Edlyr/cubical", "max_forks_repo_path": "Cubical/Categories/NaturalTransformation/Properties.agda", "max_issues_count": null, "max_issues_repo_head_hexsha": "5de11df25b79ee49d5c084fbbe6dfc66e4147a2e", "max_issues_repo_issues_event_max_datetime": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_licenses": [ "MIT" ], "max_issues_repo_name": "Edlyr/cubical", "max_issues_repo_path": "Cubical/Categories/NaturalTransformation/Properties.agda", "max_line_length": 130, "max_stars_count": null, "max_stars_repo_head_hexsha": "5de11df25b79ee49d5c084fbbe6dfc66e4147a2e", "max_stars_repo_licenses": [ "MIT" ], "max_stars_repo_name": "Edlyr/cubical", "max_stars_repo_path": "Cubical/Categories/NaturalTransformation/Properties.agda", "max_stars_repo_stars_event_max_datetime": null, "max_stars_repo_stars_event_min_datetime": null, "num_tokens": 2191, "size": 5622 }