Proof Assistant Projects
Collection
Digesting proof assistant libraries for AI ingestion.
•
79 items
•
Updated
•
2
fact
stringlengths 7
7.74k
| type
stringclasses 3
values | library
stringclasses 4
values | imports
listlengths 0
17
| filename
stringlengths 14
69
| symbolic_name
stringlengths 1
27
| docstring
stringclasses 1
value |
|---|---|---|---|---|---|---|
ua-in : ∀ {i} {A B : Set i} → A ≃ B → A == B
|
function
|
old
|
[
"open import Base public hiding (apd; Σ-eq)"
] |
old/BaseOver.agda
|
ua-in
| |
ua-out : ∀ {i} {A B : Set i} → A == B → A ≃ B
|
function
|
old
|
[
"open import Base public hiding (apd; Σ-eq)"
] |
old/BaseOver.agda
|
ua-out
| |
_ ∼_ {i j} (A : Set i) (B : Set j) : Set (max i j) where constructor _,_,_ field to : A → B from : B → A eq : ∞ ((a : A) (b : B) → ((to a ≡ b) ∼ (a ≡ from b))) -- Identity id-∼ : ∀ {i} (A : Set i) → A ∼ A id-∼ A = (id A) , (id A) , ♯ (λ a b → id-∼ (a ≡ b)) -- Transitivity trans-∼ : ∀ {i} {A B C : Set i} → A ∼ B → B ∼ C → A ∼ C trans-∼ (to , from , eq) (to' , from' , eq') = ((to' ◯ to) , (from ◯ from') , ♯ (λ a c → trans-∼ (♭ eq' (to a) c) (♭ eq a (from' c))) ) --(λ a c → ♯ trans-∼ (♭ (eq' (to a) c)) (♭ (eq a (from' c))))) -- -- Left unity -- left-unit-∼ : ∀ {i} {A B : Set i} (f : A ∼ B) → trans-∼ (id-∼ A) f ≡ f -- left-unit-∼ f = {!!} postulate !-≡ : ∀ {i} {A : Set i} {u v : A} → (u ≡ v) ≡ (v ≡ u) -- Symmetry is harder sym-∼ : ∀ {i} {A B : Set i} → A ∼ B → B ∼ A sym-∼ (to , from , eq) = (from , to , ♯ (λ b a → let (too , fromo , eqo) = sym-∼ (♭ eq a b) in ((! ◯ (too ◯ !)) , {!!} , {!!}))) --(λ a b → transport (λ u → ∞ (u ∼ (a ≡ to b))) !-≡ (transport (λ u → ∞ ((b ≡ from a) ∼ u)) !-≡ (♯ (sym-∼ (♭ (eq b a))))))) --♯ trans-∼ {!!} (trans-∼ (sym-∼ (♭ (eq b a))) {!!}))) -- Logical equivalence with the usual notion of equivalences ∼-to-≃ : ∀ {i j} {A : Set i} {B : Set j} → (A ∼ B → A ≃ B) ∼-to-≃ (to , from , eq) = (to , iso-is-eq to from (λ b → _∼_.from (♭ eq (from b) b) refl) (λ a → ! (_∼_.to (♭ eq a (to a)) refl))) ≃-to-∼ : ∀ {i j} {A : Set i} {B : Set j} → (A ≃ B → A ∼ B) ≃-to-∼ e = (π₁ e) , (inverse e) , ♯ (λ a b → ≃-to-∼ (equiv-compose (path-to-eq (ap (λ b → e ☆ a ≡ b) (! (inverse-right-inverse e b)))) ((equiv-ap e a (inverse e b))⁻¹))) -- Unfinished attempt to prove that this notion is coherent ∼-eq-raw : ∀ {i j} {A : Set i} {B : Set j} {f f' : A → B} (p : f ≡ f') {g g' : B → A} (q : g ≡ g') {eq : ∞ ((a : A) (b : B) → ((f a ≡ b) ∼ (a ≡ g b)))} {eq' : ∞ ((a : A) (b : B) → ((f' a ≡ b) ∼ (a ≡ g' b)))} (r : transport _ p (transport _ q eq) ≡ eq') → (f , g , eq) ≡ (f' , g' , eq') ∼-eq-raw refl refl refl = refl -- ∼-eq : ∀ {i j} {A : Set i} {B : Set j} -- {f f' : A → B} (p : (a : A) → f a ≡ f' a) -- {g g' : B → A} (q : (b : B) → g b ≡ g' b) -- {eq : (a : A) (b : B) → ∞ ((f a ≡ b) ∼ (a ≡ g b))} -- {eq' : (a : A) (b : B) → ∞ ((f' a ≡ b) ∼ (a ≡ g' b))} -- (r : (a : A) (b : B) → -- transport (λ u → (u ≡ b) ∼ (a ≡ g' b)) (p a) ( -- transport (λ u → (f a ≡ b) ∼ (a ≡ u)) (q b) (♭ (eq a b))) -- ≡ ♭ (eq' a b)) -- → (f , g , eq) ≡ (f' , g' , eq') -- ∼-eq p q r = ∼-eq-raw (funext p) (funext q) -- (funext (λ a → (funext (λ b → {!r a b!})))) -- coherent : ∀ {i j} (A : Set i) (B : Set j) → ((A ≃ B) ≃ (A ∼ B)) -- coherent A B = (≃-to-∼ A B , iso-is-eq _ (∼-to-≃ A B) -- (λ y → ∼-eq (λ a → refl _) -- (λ b → happly (inverse-iso-is-eq (_∼_.to y) (_∼_.from y) _ _) b) -- (λ a b → {!!})) -- (λ e → Σ-eq (refl _) (π₁ (is-equiv-is-prop _ _ _))))
|
record
|
old
|
[
"open import Base",
"open import Coinduction"
] |
old/CoindEquiv.agda
|
_
| |
hfiber : ∀ {i j} {A : Set i} {B : Set j} (f : A → B) (y : B) → Set (max i j)
|
function
|
old
|
[
"open import Types",
"open import Functions",
"open import Paths",
"open import HLevel"
] |
old/Equivalences.agda
|
hfiber
| |
is-equiv : ∀ {i j} {A : Set i} {B : Set j} (f : A → B) → Set (max i j)
|
function
|
old
|
[
"open import Types",
"open import Functions",
"open import Paths",
"open import HLevel"
] |
old/Equivalences.agda
|
is-equiv
| |
is-iso : ∀ {i j} {A : Set i} {B : Set j} (f : A → B) → Set (max i j)
|
function
|
old
|
[
"open import Types",
"open import Functions",
"open import Paths",
"open import HLevel"
] |
old/Equivalences.agda
|
is-iso
| |
is-hae : ∀ {i j} {A : Set i} {B : Set j} (f : A → B) → Set (max i j)
|
function
|
old
|
[
"open import Types",
"open import Functions",
"open import Paths",
"open import HLevel"
] |
old/Equivalences.agda
|
is-hae
| |
iso-is-hae : ∀ {i j} {A : Set i} {B : Set j} → (f : A → B) → is-iso f → is-hae f
|
function
|
old
|
[
"open import Types",
"open import Functions",
"open import Paths",
"open import HLevel"
] |
old/Equivalences.agda
|
iso-is-hae
| |
hae-is-eq : ∀ {i j} {A : Set i} {B : Set j} → (f : A → B) → is-hae f → is-equiv f
|
function
|
old
|
[
"open import Types",
"open import Functions",
"open import Paths",
"open import HLevel"
] |
old/Equivalences.agda
|
hae-is-eq
| |
id-is-equiv : ∀ {i} (A : Set i) → is-equiv (id A)
|
function
|
old
|
[
"open import Types",
"open import Functions",
"open import Paths",
"open import HLevel"
] |
old/Equivalences.agda
|
id-is-equiv
| |
id-equiv : ∀ {i} (A : Set i) → A ≃ A
|
function
|
old
|
[
"open import Types",
"open import Functions",
"open import Paths",
"open import HLevel"
] |
old/Equivalences.agda
|
id-equiv
| |
path-to-eq : ∀ {i} {A B : Set i} → (A ≡ B → A ≃ B)
|
function
|
old
|
[
"open import Types",
"open import Functions",
"open import Paths",
"open import HLevel"
] |
old/Equivalences.agda
|
path-to-eq
| |
contr-equiv-unit : ∀ {i j} {A : Set i} → (is-contr A → A ≃ unit {j})
|
function
|
old
|
[
"open import Types",
"open import Functions",
"open import Paths",
"open import HLevel"
] |
old/Equivalences.agda
|
contr-equiv-unit
| |
total-map : Σ A P → Σ A Q
|
function
|
old
|
[
"open import Types",
"open import Functions",
"open import Paths",
"open import HLevel",
"open import Equivalences"
] |
old/FiberEquivalences.agda
|
total-map
| |
fiberwise-is-equiv : is-equiv total-map → ((x : A) → is-equiv (f x))
|
function
|
old
|
[
"open import Types",
"open import Functions",
"open import Paths",
"open import HLevel",
"open import Equivalences"
] |
old/FiberEquivalences.agda
|
fiberwise-is-equiv
| |
id : ∀ {i} (A : Set i) → (A → A)
|
function
|
old
|
[
"open import Types"
] |
old/Functions.agda
|
id
| |
cst : ∀ {i j} {A : Set i} {B : Set j} (b : B) → (A → B)
|
function
|
old
|
[
"open import Types"
] |
old/Functions.agda
|
cst
| |
happly : ∀ {j} {P : A → Set j} {f g : Π A P} (p : f ≡ g) → ((x : A) → f x ≡ g x)
|
function
|
old
|
[
"open import Types",
"open import Paths",
"open import HLevel",
"open import Equivalences",
"open import Univalence"
] |
old/Funext.agda
|
happly
| |
is-contr : Set i → Set i
|
function
|
old
|
[
"open import Types",
"open import Paths"
] |
old/HLevel.agda
|
is-contr
| |
is-truncated : ℕ₋₂ → (Set i → Set i)
|
function
|
old
|
[
"open import Types",
"open import Paths"
] |
old/HLevel.agda
|
is-truncated
| |
is-hlevel : ℕ → (Set i → Set i)
|
function
|
old
|
[
"open import Types",
"open import Paths"
] |
old/HLevel.agda
|
is-hlevel
| |
has-all-paths : Set i → Set i
|
function
|
old
|
[
"open import Types",
"open import Paths"
] |
old/HLevel.agda
|
has-all-paths
| |
has-dec-eq : Set i → Set i
|
function
|
old
|
[
"open import Types",
"open import Paths"
] |
old/HLevel.agda
|
has-dec-eq
| |
hProp : (i : Level) → Set (suc i)
|
function
|
old
|
[
"open import Types",
"open import Functions",
"open import Paths",
"open import HLevel",
"open import Equivalences",
"open import Univalence",
"open import Funext"
] |
old/HLevelBis.agda
|
hProp
| |
hSet : (i : Level) → Set (suc i)
|
function
|
old
|
[
"open import Types",
"open import Functions",
"open import Paths",
"open import HLevel",
"open import Equivalences",
"open import Univalence",
"open import Funext"
] |
old/HLevelBis.agda
|
hSet
| |
_ <_ : ℕ → ℕ → Set where <n : {n : ℕ} → n < S n <S : {n m : ℕ} → (n < m) → (n < S m) _+_ : ℕ → ℕ → ℕ 0 + m = m S n + m = S (n + m) +S-is-S+ : (n m : ℕ) → n + S m ≡ S n + m +S-is-S+ O m = refl +S-is-S+ (S n) m = ap S (+S-is-S+ n m) +0-is-id : (n : ℕ) → n + 0 ≡ n +0-is-id O = refl +0-is-id (S n) = ap S (+0-is-id n) private ℤ-get-pos : ℤ → ℕ ℤ-get-pos O = 0 ℤ-get-pos (pos n) = n ℤ-get-pos (neg n) = 0 pos-injective : (n m : ℕ) (p : pos n ≡ pos m) → n ≡ m pos-injective n m p = ap ℤ-get-pos p ℤ-get-neg : ℤ → ℕ ℤ-get-neg O = 0 ℤ-get-neg (pos n) = 0 ℤ-get-neg (neg n) = n neg-injective : (n m : ℕ) (p : neg n ≡ neg m) → n ≡ m neg-injective n m p = ap ℤ-get-neg p ℤ-neg≢O≢pos-type : ℤ → Set ℤ-neg≢O≢pos-type O = unit ℤ-neg≢O≢pos-type (pos n) = ⊥ ℤ-neg≢O≢pos-type (neg n) = ⊥ ℤ-neg≢pos-type : ℤ → Set ℤ-neg≢pos-type O = unit ℤ-neg≢pos-type (pos n) = ⊥ ℤ-neg≢pos-type (neg n) = unit abstract ℤ-O≢pos : (n : ℕ) → O ≢ pos n ℤ-O≢pos n p = transport ℤ-neg≢O≢pos-type p tt ℤ-pos≢O : (n : ℕ) → pos n ≢ O ℤ-pos≢O n p = transport ℤ-neg≢O≢pos-type (! p) tt ℤ-O≢neg : (n : ℕ) → O ≢ neg n ℤ-O≢neg n p = transport ℤ-neg≢O≢pos-type p tt ℤ-neg≢O : (n : ℕ) → neg n ≢ O ℤ-neg≢O n p = transport ℤ-neg≢O≢pos-type (! p) tt ℤ-neg≢pos : (n m : ℕ) → neg n ≢ pos m ℤ-neg≢pos n m p = transport ℤ-neg≢pos-type p tt ℤ-pos≢neg : (n m : ℕ) → pos n ≢ neg m ℤ-pos≢neg n m p = transport ℤ-neg≢pos-type (! p) tt ℤ-has-dec-eq : has-dec-eq ℤ ℤ-has-dec-eq O O = inl refl ℤ-has-dec-eq O (pos n) = inr (ℤ-O≢pos n) ℤ-has-dec-eq O (neg n) = inr (ℤ-O≢neg n) ℤ-has-dec-eq (pos n) O = inr (ℤ-pos≢O n) ℤ-has-dec-eq (pos n) (pos m) with ℕ-has-dec-eq n m ℤ-has-dec-eq (pos n) (pos m) | inl p = inl (ap pos p) ℤ-has-dec-eq (pos n) (pos m) | inr p⊥ = inr (λ p → p⊥ (pos-injective n m p)) ℤ-has-dec-eq (pos n) (neg m) = inr (ℤ-pos≢neg n m) ℤ-has-dec-eq (neg n) O = inr (ℤ-neg≢O n) ℤ-has-dec-eq (neg n) (pos m) = inr (ℤ-neg≢pos n m) ℤ-has-dec-eq (neg n) (neg m) with ℕ-has-dec-eq n m ℤ-has-dec-eq (neg n) (neg m) | inl p = inl (ap neg p) ℤ-has-dec-eq (neg n) (neg m) | inr p⊥ = inr (λ p → p⊥ (neg-injective n m p)) ℤ-is-set : is-set ℤ ℤ-is-set = dec-eq-is-set ℤ-has-dec-eq
|
data
|
old
|
[
"open import Base"
] |
old/Integers.agda
|
_
| |
succ : ℤ → ℤ
|
function
|
old
|
[
"open import Base"
] |
old/Integers.agda
|
succ
| |
pred : ℤ → ℤ
|
function
|
old
|
[
"open import Base"
] |
old/Integers.agda
|
pred
| |
succ-is-equiv : is-equiv succ
|
function
|
old
|
[
"open import Base"
] |
old/Integers.agda
|
succ-is-equiv
| |
succ-equiv : ℤ ≃ ℤ
|
function
|
old
|
[
"open import Base"
] |
old/Integers.agda
|
succ-equiv
| |
_ ≡_ {i} {A : Set i} (a : A) : A → Set i where refl : a ≡ a _==_ = _≡_ _≢_ : ∀ {i} {A : Set i} → (A → A → Set i) x ≢ y = ¬ (x ≡ y) -- -- This should not be provable -- K : {A : Set} → (x : A) → (p : x ≡ x) → p ≡ refl x -- K .x (refl x) = refl -- Composition and opposite of paths infixr 8 _∘_ -- \o _∘_ : ∀ {i} {A : Set i} {x y z : A} → (x ≡ y → y ≡ z → x ≡ z) refl ∘ q = q -- Composition with the opposite definitional behaviour _∘'_ : ∀ {i} {A : Set i} {x y z : A} → (x ≡ y → y ≡ z → x ≡ z) q ∘' refl = q ! : ∀ {i} {A : Set i} {x y : A} → (x ≡ y → y ≡ x) ! refl = refl -- Equational reasoning combinator infix 2 _∎ infixr 2 _≡⟨_⟩_ _≡⟨_⟩_ : ∀ {i} {A : Set i} (x : A) {y z : A} → x ≡ y → y ≡ z → x ≡ z _ ≡⟨ p1 ⟩ p2 = p1 ∘ p2 _∎ : ∀ {i} {A : Set i} (x : A) → x ≡ x _∎ _ = refl -- Obsolete, for retrocompatibility only infixr 2 _≡⟨_⟩∎_ _≡⟨_⟩∎_ : ∀ {i} {A : Set i} (x : A) {y z : A} → x ≡ y → y ≡ z → x ≡ z _≡⟨_⟩∎_ = _≡⟨_⟩_ -- Transport and ap ap : ∀ {i j} {A : Set i} {B : Set j} (f : A → B) {x y : A} → (x ≡ y → f x ≡ f y) ap f refl = refl -- Make equational reasoning much more readable syntax ap f p = p |in-ctx f transport : ∀ {i j} {A : Set i} (P : A → Set j) {x y : A} → (x ≡ y → P x → P y) transport P refl t = t apd : ∀ {i j} {A : Set i} {P : A → Set j} (f : (a : A) → P a) {x y : A} → (p : x ≡ y) → transport P p (f x) ≡ f y apd f refl = refl apd! : ∀ {i j} {A : Set i} {P : A → Set j} (f : (a : A) → P a) {x y : A} → (p : x ≡ y) → f x ≡ transport P (! p) (f y) apd! f refl = refl -- Paths in Sigma types
|
data
|
old
|
[
"open import Types",
"open import Functions"
] |
old/Paths.agda
|
_
| |
bool {i} : Set i where true : bool false : bool -- Dependent sum
|
data
|
old
|
[] |
old/Types.agda
|
bool
| |
_ ⊔_ {i j} (A : Set i) (B : Set j) : Set (max i j) where -- \sqcup inl : A → A ⊔ B inr : B → A ⊔ B -- Product _×_ : ∀ {i j} (A : Set i) (B : Set j) → Set (max i j) -- \times A × B = Σ A (λ _ → B) -- Dependent product Π : ∀ {i j} (A : Set i) (P : A → Set j) → Set (max i j) Π A P = (x : A) → P x -- Natural numbers
|
data
|
old
|
[] |
old/Types.agda
|
_
| |
ℕ : Set where -- \bn O : ℕ S : (n : ℕ) → ℕ {-# BUILTIN NATURAL ℕ #-} {-# BUILTIN ZERO O #-} {-# BUILTIN SUC S #-} -- Truncation index (isomorphic to the type of integers ≥ -2)
|
data
|
old
|
[] |
old/Types.agda
|
ℕ
| |
ℕ ₋₂ : Set where ⟨-2⟩ : ℕ₋₂ S : (n : ℕ₋₂) → ℕ₋₂ ⟨-1⟩ : ℕ₋₂ ⟨-1⟩ = S ⟨-2⟩ ⟨0⟩ : ℕ₋₂ ⟨0⟩ = S ⟨-1⟩ _-1 : ℕ → ℕ₋₂ O -1 = ⟨-1⟩ (S n) -1 = S (n -1) ⟨_⟩ : ℕ → ℕ₋₂ ⟨ n ⟩ = S (n -1) ⟨1⟩ = ⟨ 1 ⟩ ⟨2⟩ = ⟨ 2 ⟩ _+2+_ : ℕ₋₂ → ℕ₋₂ → ℕ₋₂ ⟨-2⟩ +2+ n = n S m +2+ n = S (m +2+ n) -- Integers
|
data
|
old
|
[] |
old/Types.agda
|
ℕ
| |
ℤ : Set where -- \bz O : ℤ pos : (n : ℕ) → ℤ neg : (n : ℕ) → ℤ -- Lifting
|
data
|
old
|
[] |
old/Types.agda
|
ℤ
| |
unit {i} : Set i where constructor tt ⊤ = unit -- \top -- Booleans
|
record
|
old
|
[] |
old/Types.agda
|
unit
| |
Σ {i j} (A : Set i) (P : A → Set j) : Set (max i j) where -- \Sigma constructor _,_ field π₁ : A -- \pi\_1 π₂ : P (π₁) -- \pi\_2
|
record
|
old
|
[] |
old/Types.agda
|
Σ
| |
lift {i} (j : Level) (A : Set i) : Set (max i j) where constructor ↑ -- \u field ↓ : A -- \d
|
record
|
old
|
[] |
old/Types.agda
|
lift
| |
abort : ∀ {i j} {P : ⊥ {i} → Set j} → ((x : ⊥) → P x)
|
function
|
old
|
[] |
old/Types.agda
|
abort
| |
abort-nondep : ∀ {i j} {A : Set j} → (⊥ {i} → A)
|
function
|
old
|
[] |
old/Types.agda
|
abort-nondep
| |
Π : ∀ {i j} (A : Set i) (P : A → Set j) → Set (max i j)
|
function
|
old
|
[] |
old/Types.agda
|
Π
| |
_-1 : ℕ → ℕ₋₂
|
function
|
old
|
[] |
old/Types.agda
|
_-1
| |
path-to-eq-equiv : {A B : Set i} → ((A ≡ B) ≃ (A ≃ B))
|
function
|
old
|
[
"open import Types",
"open import Functions",
"open import Paths",
"open import HLevel",
"open import Equivalences"
] |
old/Univalence.agda
|
path-to-eq-equiv
| |
eq-to-path-equiv : {A B : Set i} → ((A ≃ B) ≃ (A ≡ B))
|
function
|
old
|
[
"open import Types",
"open import Functions",
"open import Paths",
"open import HLevel",
"open import Equivalences"
] |
old/Univalence.agda
|
eq-to-path-equiv
| |
eq-to-path : {A B : Set i} → (A ≃ B → A ≡ B)
|
function
|
old
|
[
"open import Types",
"open import Functions",
"open import Paths",
"open import HLevel",
"open import Equivalences"
] |
old/Univalence.agda
|
eq-to-path
| |
_ ==_ {i} {A : Type i} (a : A) : A → Type i where idp : a == a Path = _==_ {-# BUILTIN EQUALITY _==_ #-} {- Paulin-Mohring J rule At the time I’m writing this (July 2013), the identity type is somehow broken in Agda dev, it behaves more or less as the Martin-Löf identity type instead of behaving like the Paulin-Mohring identity type. So here is the Paulin-Mohring J rule -} J : ∀ {i j} {A : Type i} {a : A} (B : (a' : A) (p : a == a') → Type j) (d : B a idp) {a' : A} (p : a == a') → B a' p J B d idp = d J' : ∀ {i j} {A : Type i} {a : A} (B : (a' : A) (p : a' == a) → Type j) (d : B a idp) {a' : A} (p : a' == a) → B a' p J' B d idp = d infixr 80 _∙_ _∙_ : ∀ {i} {A : Type i} {x y z : A} → (x == y → y == z → x == z) idp ∙ q = q {- Rewriting This is a new pragma added to Agda to help create higher inductive types. -} infix 30 _↦_ postulate -- HIT _↦_ : ∀ {i} {A : Type i} → A → A → Type i {-# BUILTIN REWRITE _↦_ #-} {- Unit type The unit type is defined as record so that we also get the η-rule definitionally. -}
|
data
|
core
|
[
"open import Agda.Primitive public using (lzero)"
] |
core/lib/Base.agda
|
_
| |
ℕ : Type₀ where O : ℕ S : (n : ℕ) → ℕ Nat = ℕ {-# BUILTIN NATURAL ℕ #-} {- Lifting to a higher universe level The operation of lifting enjoys both β and η definitionally. It’s a bit annoying to use, but it’s not used much (for now). -}
|
data
|
core
|
[
"open import Agda.Primitive public using (lzero)"
] |
core/lib/Base.agda
|
ℕ
| |
TLevel : Type₀ where ⟨-2⟩ : TLevel S : (n : TLevel) → TLevel ℕ₋₂ = TLevel ⟨_⟩₋₂ : ℕ → ℕ₋₂ ⟨ O ⟩₋₂ = ⟨-2⟩ ⟨ S n ⟩₋₂ = S ⟨ n ⟩₋₂ {- Coproducts and case analysis -}
|
data
|
core
|
[
"open import Agda.Primitive public using (lzero)"
] |
core/lib/Base.agda
|
TLevel
| |
Coprod {i j} (A : Type i) (B : Type j) : Type (lmax i j) where inl : A → Coprod A B inr : B → Coprod A B infixr 80 _⊔_ _⊔_ = Coprod Dec : ∀ {i} (P : Type i) → Type i Dec P = P ⊔ ¬ P {- Pointed types and pointed maps. [A ⊙→ B] was pointed, but it was never used as a pointed type. -} infix 60 ⊙[_,_]
|
data
|
core
|
[
"open import Agda.Primitive public using (lzero)"
] |
core/lib/Base.agda
|
Coprod
| |
Phantom {i} {A : Type i} (a : A) : Type₀ where phantom : Phantom a {- Numeric literal overloading This enables writing numeric literals -}
|
data
|
core
|
[
"open import Agda.Primitive public using (lzero)"
] |
core/lib/Base.agda
|
Phantom
| |
Σ {i j} (A : Type i) (B : A → Type j) : Type (lmax i j) where constructor _,_ field fst : A snd : B fst
|
record
|
core
|
[
"open import Agda.Primitive public using (lzero)"
] |
core/lib/Base.agda
|
Σ
| |
Lift {i j} (A : Type i) : Type (lmax i j) where instance constructor lift field lower : A
|
record
|
core
|
[
"open import Agda.Primitive public using (lzero)"
] |
core/lib/Base.agda
|
Lift
| |
Ptd (i : ULevel) : Type (lsucc i) where constructor ⊙[_,_] field de⊙ : Type i pt : de⊙
|
record
|
core
|
[
"open import Agda.Primitive public using (lzero)"
] |
core/lib/Base.agda
|
Ptd
| |
FromNat {i} (A : Type i) : Type (lsucc i) where field in-range : ℕ → Type i read : ∀ n → ⦃ _ : in-range n ⦄ → A
|
record
|
core
|
[
"open import Agda.Primitive public using (lzero)"
] |
core/lib/Base.agda
|
FromNat
| |
FromNeg {i} (A : Type i) : Type (lsucc i) where field in-range : ℕ → Type i read : ∀ n → ⦃ _ : in-range n ⦄ → A
|
record
|
core
|
[
"open import Agda.Primitive public using (lzero)"
] |
core/lib/Base.agda
|
FromNeg
| |
Type : (i : ULevel) → Set (lsucc i)
|
function
|
core
|
[
"open import Agda.Primitive public using (lzero)"
] |
core/lib/Base.agda
|
Type
| |
of-type : ∀ {i} (A : Type i) (u : A) → A
|
function
|
core
|
[
"open import Agda.Primitive public using (lzero)"
] |
core/lib/Base.agda
|
of-type
| |
coe : ∀ {i} {A B : Type i} (p : A == B) → A → B
|
function
|
core
|
[
"open import Agda.Primitive public using (lzero)"
] |
core/lib/Base.agda
|
coe
| |
Π : ∀ {i j} (A : Type i) (P : A → Type j) → Type (lmax i j)
|
function
|
core
|
[
"open import Agda.Primitive public using (lzero)"
] |
core/lib/Base.agda
|
Π
| |
idf : ∀ {i} (A : Type i) → (A → A)
|
function
|
core
|
[
"open import Agda.Primitive public using (lzero)"
] |
core/lib/Base.agda
|
idf
| |
cst : ∀ {i j} {A : Type i} {B : Type j} (b : B) → (A → B)
|
function
|
core
|
[
"open import Agda.Primitive public using (lzero)"
] |
core/lib/Base.agda
|
cst
| |
Dec : ∀ {i} (P : Type i) → Type i
|
function
|
core
|
[
"open import Agda.Primitive public using (lzero)"
] |
core/lib/Base.agda
|
Dec
| |
ptd : ∀ {i} (A : Type i) → A → Ptd i
|
function
|
core
|
[
"open import Agda.Primitive public using (lzero)"
] |
core/lib/Base.agda
|
ptd
| |
idf-is-equiv : ∀ {i} (A : Type i) → is-equiv (idf A)
|
function
|
core
|
[
"open import lib.Base",
"open import lib.NType",
"open import lib.PathFunctor",
"open import lib.PathGroupoid",
"open import lib.Function"
] |
core/lib/Equivalence.agda
|
idf-is-equiv
| |
ide : ∀ {i} (A : Type i) → A ≃ A
|
function
|
core
|
[
"open import lib.Base",
"open import lib.NType",
"open import lib.PathFunctor",
"open import lib.PathGroupoid",
"open import lib.Function"
] |
core/lib/Equivalence.agda
|
ide
| |
lower-equiv : ∀ {i j} {A : Type i} → Lift {j = j} A ≃ A
|
function
|
core
|
[
"open import lib.Base",
"open import lib.NType",
"open import lib.PathFunctor",
"open import lib.PathGroupoid",
"open import lib.Function"
] |
core/lib/Equivalence.agda
|
lower-equiv
| |
Σ₂-Empty : ∀ {i} {A : Type i} → Σ A (λ _ → Empty) ≃ Empty
|
function
|
core
|
[
"open import lib.Basics",
"open import lib.types.Sigma",
"open import lib.types.Pi",
"open import lib.types.Paths",
"open import lib.types.Unit",
"open import lib.types.Empty"
] |
core/lib/Equivalence2.agda
|
Σ₂-Empty
| |
CommSquare {i₀ i₁ j₀ j₁} {A₀ : Type i₀} {A₁ : Type i₁} {B₀ : Type j₀} {B₁ : Type j₁} (f₀ : A₀ → B₀) (f₁ : A₁ → B₁) (hA : A₀ → A₁) (hB : B₀ → B₁) : Type (lmax (lmax i₀ i₁) (lmax j₀ j₁)) where constructor comm-sqr field commutes : hB ∘ f₀ ∼ f₁ ∘ hA
|
record
|
core
|
[
"open import lib.Base",
"open import lib.PathGroupoid"
] |
core/lib/Function.agda
|
CommSquare
| |
is-surj : ∀ {i j} {A : Type i} {B : Type j} (f : A → B) → Type (lmax i j)
|
function
|
core
|
[
"open import lib.Basics",
"open import lib.types.Truncation"
] |
core/lib/Function2.agda
|
is-surj
| |
is-connected : ∀ {i} → ℕ₋₂ → Type i → Type i
|
function
|
core
|
[
"open import lib.Basics",
"open import lib.NType2",
"open import lib.Equivalence2",
"open import lib.path-seq.Rotations",
"open import lib.types.Unit",
"open import lib.types.Nat",
"open import lib.types.Pi",
"open import lib.types.Pointed",
"open import lib.types.Sigma",
"open import lib.types.Paths",
"open import lib.types.TLevel",
"open import lib.types.Truncation"
] |
core/lib/NConnected.agda
|
is-connected
| |
has-conn-fibers : ∀ {i j} {A : Type i} {B : Type j} → ℕ₋₂ → (A → B) → Type (lmax i j)
|
function
|
core
|
[
"open import lib.Basics",
"open import lib.NType2",
"open import lib.Equivalence2",
"open import lib.path-seq.Rotations",
"open import lib.types.Unit",
"open import lib.types.Nat",
"open import lib.types.Pi",
"open import lib.types.Pointed",
"open import lib.types.Sigma",
"open import lib.types.Paths",
"open import lib.types.TLevel",
"open import lib.types.Truncation"
] |
core/lib/NConnected.agda
|
has-conn-fibers
| |
-2-conn : ∀ {i} (A : Type i) → is-connected -2 A
|
function
|
core
|
[
"open import lib.Basics",
"open import lib.NType2",
"open import lib.Equivalence2",
"open import lib.path-seq.Rotations",
"open import lib.types.Unit",
"open import lib.types.Nat",
"open import lib.types.Pi",
"open import lib.types.Pointed",
"open import lib.types.Sigma",
"open import lib.types.Paths",
"open import lib.types.TLevel",
"open import lib.types.Truncation"
] |
core/lib/NConnected.agda
|
-2-conn
| |
inhab-conn : ∀ {i} {A : Type i} (a : A) → is-connected -1 A
|
function
|
core
|
[
"open import lib.Basics",
"open import lib.NType2",
"open import lib.Equivalence2",
"open import lib.path-seq.Rotations",
"open import lib.types.Unit",
"open import lib.types.Nat",
"open import lib.types.Pi",
"open import lib.types.Pointed",
"open import lib.types.Sigma",
"open import lib.types.Paths",
"open import lib.types.TLevel",
"open import lib.types.Truncation"
] |
core/lib/NConnected.agda
|
inhab-conn
| |
is-gpd : {i : ULevel} → Type i → Type i
|
function
|
core
|
[
"open import lib.Basics",
"open import lib.Equivalence2",
"open import lib.Relation2",
"open import lib.types.Paths",
"open import lib.types.Pi",
"open import lib.types.Sigma",
"open import lib.types.TLevel"
] |
core/lib/NType2.agda
|
is-gpd
| |
has-level-prop : ∀ {i} → ℕ₋₂ → SubtypeProp (Type i) i
|
function
|
core
|
[
"open import lib.Basics",
"open import lib.Equivalence2",
"open import lib.Relation2",
"open import lib.types.Paths",
"open import lib.types.Pi",
"open import lib.types.Sigma",
"open import lib.types.TLevel"
] |
core/lib/NType2.agda
|
has-level-prop
| |
_-Type_ : (n : ℕ₋₂) (i : ULevel) → Type (lsucc i)
|
function
|
core
|
[
"open import lib.Basics",
"open import lib.Equivalence2",
"open import lib.Relation2",
"open import lib.types.Paths",
"open import lib.types.Pi",
"open import lib.types.Sigma",
"open import lib.types.TLevel"
] |
core/lib/NType2.agda
|
_-Type_
| |
hProp : (i : ULevel) → Type (lsucc i)
|
function
|
core
|
[
"open import lib.Basics",
"open import lib.Equivalence2",
"open import lib.Relation2",
"open import lib.types.Paths",
"open import lib.types.Pi",
"open import lib.types.Sigma",
"open import lib.types.TLevel"
] |
core/lib/NType2.agda
|
hProp
| |
hSet : (i : ULevel) → Type (lsucc i)
|
function
|
core
|
[
"open import lib.Basics",
"open import lib.Equivalence2",
"open import lib.Relation2",
"open import lib.types.Paths",
"open import lib.types.Pi",
"open import lib.types.Sigma",
"open import lib.types.TLevel"
] |
core/lib/NType2.agda
|
hSet
| |
_-Type₀ : (n : ℕ₋₂) → Type₁
|
function
|
core
|
[
"open import lib.Basics",
"open import lib.Equivalence2",
"open import lib.Relation2",
"open import lib.types.Paths",
"open import lib.types.Pi",
"open import lib.types.Sigma",
"open import lib.types.TLevel"
] |
core/lib/NType2.agda
|
_-Type₀
| |
hProp-is-set : (i : ULevel) → is-set (hProp i)
|
function
|
core
|
[
"open import lib.Basics",
"open import lib.Equivalence2",
"open import lib.Relation2",
"open import lib.types.Paths",
"open import lib.types.Pi",
"open import lib.types.Sigma",
"open import lib.types.TLevel"
] |
core/lib/NType2.agda
|
hProp-is-set
| |
hSet-level : (i : ULevel) → has-level 1 (hSet i)
|
function
|
core
|
[
"open import lib.Basics",
"open import lib.Equivalence2",
"open import lib.Relation2",
"open import lib.types.Paths",
"open import lib.types.Pi",
"open import lib.types.Sigma",
"open import lib.types.TLevel"
] |
core/lib/NType2.agda
|
hSet-level
| |
ap-idf : ∀ {i} {A : Type i} {u v : A} (p : u == v) → ap (idf A) p == p
|
function
|
core
|
[
"open import lib.Base",
"open import lib.PathGroupoid"
] |
core/lib/PathFunctor.agda
|
ap-idf
| |
Rel : ∀ (A : Type i) j → Type (lmax i (lsucc j))
|
function
|
core
|
[
"open import lib.Base"
] |
core/lib/Relation.agda
|
Rel
| |
empty-rel : ∀ {A : Type i} → Rel A lzero
|
function
|
core
|
[
"open import lib.Base"
] |
core/lib/Relation.agda
|
empty-rel
| |
coe-equiv : ∀ {i} {A B : Type i} → A == B → A ≃ B
|
function
|
core
|
[
"open import lib.Base",
"open import lib.PathGroupoid",
"open import lib.PathFunctor",
"open import lib.Equivalence",
"open import lib.PathOver"
] |
core/lib/Univalence.agda
|
coe-equiv
| |
ua-equiv : ∀ {i} {A B : Type i} → (A ≃ B) ≃ (A == B)
|
function
|
core
|
[
"open import lib.Base",
"open import lib.PathGroupoid",
"open import lib.PathFunctor",
"open import lib.Equivalence",
"open import lib.PathOver"
] |
core/lib/Univalence.agda
|
ua-equiv
| |
Cube {i} {A : Type i} {a₀₀₀ : A} : {a₀₁₀ a₁₀₀ a₁₁₀ a₀₀₁ a₀₁₁ a₁₀₁ a₁₁₁ : A} {p₀₋₀ : a₀₀₀ == a₀₁₀} {p₋₀₀ : a₀₀₀ == a₁₀₀} {p₋₁₀ : a₀₁₀ == a₁₁₀} {p₁₋₀ : a₁₀₀ == a₁₁₀} (sq₋₋₀ : Square p₀₋₀ p₋₀₀ p₋₁₀ p₁₋₀) -- left {p₀₋₁ : a₀₀₁ == a₀₁₁} {p₋₀₁ : a₀₀₁ == a₁₀₁} {p₋₁₁ : a₀₁₁ == a₁₁₁} {p₁₋₁ : a₁₀₁ == a₁₁₁} (sq₋₋₁ : Square p₀₋₁ p₋₀₁ p₋₁₁ p₁₋₁) -- right {p₀₀₋ : a₀₀₀ == a₀₀₁} {p₀₁₋ : a₀₁₀ == a₀₁₁} {p₁₀₋ : a₁₀₀ == a₁₀₁} {p₁₁₋ : a₁₁₀ == a₁₁₁} (sq₀₋₋ : Square p₀₋₀ p₀₀₋ p₀₁₋ p₀₋₁) -- back (sq₋₀₋ : Square p₋₀₀ p₀₀₋ p₁₀₋ p₋₀₁) -- top (sq₋₁₋ : Square p₋₁₀ p₀₁₋ p₁₁₋ p₋₁₁) -- bottom (sq₁₋₋ : Square p₁₋₀ p₁₀₋ p₁₁₋ p₁₋₁) -- front → Type i where idc : Cube ids ids ids ids ids ids {- Just transport, but less clutter to use -}
|
data
|
core
|
[
"open import lib.Base",
"open import lib.PathGroupoid",
"open import lib.cubical.Square"
] |
core/lib/cubical/Cube.agda
|
Cube
| |
Square {i} {A : Type i} {a₀₀ : A} : {a₀₁ a₁₀ a₁₁ : A} → a₀₀ == a₀₁ → a₀₀ == a₁₀ → a₀₁ == a₁₁ → a₁₀ == a₁₁ → Type i where ids : Square idp idp idp idp hid-square : ∀ {i} {A : Type i} {a₀₀ a₀₁ : A} {p : a₀₀ == a₀₁} → Square p idp idp p hid-square {p = idp} = ids vid-square : ∀ {i} {A : Type i} {a₀₀ a₁₀ : A} {p : a₀₀ == a₁₀} → Square idp p p idp vid-square {p = idp} = ids square-to-disc : ∀ {i} {A : Type i} {a₀₀ a₀₁ a₁₀ a₁₁ : A} {p₀₋ : a₀₀ == a₀₁} {p₋₀ : a₀₀ == a₁₀} {p₋₁ : a₀₁ == a₁₁} {p₁₋ : a₁₀ == a₁₁} → Square p₀₋ p₋₀ p₋₁ p₁₋ → p₀₋ ∙ p₋₁ == p₋₀ ∙ p₁₋ square-to-disc ids = idp disc-to-square : ∀ {i} {A : Type i} {a₀₀ a₀₁ a₁₀ a₁₁ : A} {p₀₋ : a₀₀ == a₀₁} {p₋₀ : a₀₀ == a₁₀} {p₋₁ : a₀₁ == a₁₁} {p₁₋ : a₁₀ == a₁₁} → p₀₋ ∙ p₋₁ == p₋₀ ∙ p₁₋ → Square p₀₋ p₋₀ p₋₁ p₁₋ disc-to-square {p₀₋ = idp} {p₋₀ = idp} {p₋₁ = idp} {p₁₋ = .idp} idp = ids square-to-disc-β : ∀ {i} {A : Type i} {a₀₀ a₀₁ a₁₀ a₁₁ : A} {p₀₋ : a₀₀ == a₀₁} {p₋₀ : a₀₀ == a₁₀} {p₋₁ : a₀₁ == a₁₁} {p₁₋ : a₁₀ == a₁₁} (α : p₀₋ ∙ p₋₁ == p₋₀ ∙ p₁₋) → square-to-disc (disc-to-square {p₀₋ = p₀₋} {p₋₀ = p₋₀} α) == α square-to-disc-β {p₀₋ = idp} {p₋₀ = idp} {p₋₁ = idp} {p₁₋ = .idp} idp = idp disc-to-square-β : ∀ {i} {A : Type i} {a₀₀ a₀₁ a₁₀ a₁₁ : A} {p₀₋ : a₀₀ == a₀₁} {p₋₀ : a₀₀ == a₁₀} {p₋₁ : a₀₁ == a₁₁} {p₁₋ : a₁₀ == a₁₁} (sq : Square p₀₋ p₋₀ p₋₁ p₁₋) → disc-to-square (square-to-disc sq) == sq disc-to-square-β ids = idp square-disc-equiv : ∀ {i} {A : Type i} {a₀₀ a₀₁ a₁₀ a₁₁ : A} {p₀₋ : a₀₀ == a₀₁} {p₋₀ : a₀₀ == a₁₀} {p₋₁ : a₀₁ == a₁₁} {p₁₋ : a₁₀ == a₁₁} → (Square p₀₋ p₋₀ p₋₁ p₁₋) ≃ (p₀₋ ∙ p₋₁ == p₋₀ ∙ p₁₋) square-disc-equiv = equiv square-to-disc disc-to-square square-to-disc-β disc-to-square-β Square-level : ∀ {n : ℕ₋₂} {i} {A : Type i} {a₀₀ a₀₁ a₁₀ a₁₁ : A} {p₀₋ : a₀₀ == a₀₁} {p₋₀ : a₀₀ == a₁₀} {p₋₁ : a₀₁ == a₁₁} {p₁₋ : a₁₀ == a₁₁} → has-level (S (S n)) A → has-level n (Square p₀₋ p₋₀ p₋₁ p₁₋) Square-level {n} A-level = transport (has-level n) (! (ua square-disc-equiv)) $ has-level-apply (has-level-apply A-level _ _) _ _ ap-square : ∀ {i j} {A : Type i} {B : Type j} (f : A → B) {a₀₀ a₀₁ a₁₀ a₁₁ : A} {p₀₋ : a₀₀ == a₀₁} {p₋₀ : a₀₀ == a₁₀} {p₋₁ : a₀₁ == a₁₁} {p₁₋ : a₁₀ == a₁₁} → Square p₀₋ p₋₀ p₋₁ p₁₋ → Square (ap f p₀₋) (ap f p₋₀) (ap f p₋₁) (ap f p₁₋) ap-square f ids = ids ap-square-hid : ∀ {i j} {A : Type i} {B : Type j} {f : A → B} {a₀ a₁ : A} {p : a₀ == a₁} → ap-square f (hid-square {p = p}) == hid-square ap-square-hid {p = idp} = idp ap-square-vid : ∀ {i j} {A : Type i} {B : Type j} {f : A → B} {a₀ a₁ : A} {p : a₀ == a₁} → ap-square f (vid-square {p = p}) == vid-square ap-square-vid {p = idp} = idp
|
data
|
core
|
[
"open import lib.Base",
"open import lib.Equivalence",
"open import lib.NType",
"open import lib.PathFunctor",
"open import lib.PathGroupoid",
"open import lib.PathOver",
"open import lib.Univalence"
] |
core/lib/cubical/Square.agda
|
Square
| |
CommSquareᴳ {i₀ i₁ j₀ j₁} {G₀ : Group i₀} {G₁ : Group i₁} {H₀ : Group j₀} {H₁ : Group j₁} (φ₀ : G₀ →ᴳ H₀) (φ₁ : G₁ →ᴳ H₁) (ξG : G₀ →ᴳ G₁) (ξH : H₀ →ᴳ H₁) : Type (lmax (lmax i₀ i₁) (lmax j₀ j₁)) where constructor comm-sqrᴳ field commutesᴳ : ∀ g₀ → GroupHom.f (ξH ∘ᴳ φ₀) g₀ == GroupHom.f (φ₁ ∘ᴳ ξG) g₀ infixr 0 _□$ᴳ_ _□$ᴳ_ = CommSquareᴳ.commutesᴳ is-csᴳ-equiv : ∀ {i₀ i₁ j₀ j₁} {G₀ : Group i₀} {G₁ : Group i₁} {H₀ : Group j₀} {H₁ : Group j₁} {φ₀ : G₀ →ᴳ H₀} {φ₁ : G₁ →ᴳ H₁} {ξG : G₀ →ᴳ G₁} {ξH : H₀ →ᴳ H₁} → CommSquareᴳ φ₀ φ₁ ξG ξH → Type (lmax (lmax i₀ i₁) (lmax j₀ j₁)) is-csᴳ-equiv {ξG = ξG} {ξH} _ = is-equiv (GroupHom.f ξG) × is-equiv (GroupHom.f ξH) CommSquareEquivᴳ : ∀ {i₀ i₁ j₀ j₁} {G₀ : Group i₀} {G₁ : Group i₁} {H₀ : Group j₀} {H₁ : Group j₁} (φ₀ : G₀ →ᴳ H₀) (φ₁ : G₁ →ᴳ H₁) (ξG : G₀ →ᴳ G₁) (ξH : H₀ →ᴳ H₁) → Type (lmax (lmax i₀ i₁) (lmax j₀ j₁)) CommSquareEquivᴳ φ₀ φ₁ ξG ξH = Σ (CommSquareᴳ φ₀ φ₁ ξG ξH) is-csᴳ-equiv abstract CommSquareᴳ-∘v : ∀ {i₀ i₁ i₂ j₀ j₁ j₂} {G₀ : Group i₀} {G₁ : Group i₁} {G₂ : Group i₂} {H₀ : Group j₀} {H₁ : Group j₁} {H₂ : Group j₂} {φ : G₀ →ᴳ H₀} {ψ : G₁ →ᴳ H₁} {χ : G₂ →ᴳ H₂} {ξG : G₀ →ᴳ G₁} {ξH : H₀ →ᴳ H₁} {μA : G₁ →ᴳ G₂} {μB : H₁ →ᴳ H₂} → CommSquareᴳ ψ χ μA μB → CommSquareᴳ φ ψ ξG ξH → CommSquareᴳ φ χ (μA ∘ᴳ ξG) (μB ∘ᴳ ξH) CommSquareᴳ-∘v {ξG = ξG} {μB = μB} (comm-sqrᴳ □₁₂) (comm-sqrᴳ □₀₁) = comm-sqrᴳ λ g₀ → ap (GroupHom.f μB) (□₀₁ g₀) ∙ □₁₂ (GroupHom.f ξG g₀) CommSquareEquivᴳ-inverse-v : ∀ {i₀ i₁ j₀ j₁} {G₀ : Group i₀} {G₁ : Group i₁} {H₀ : Group j₀} {H₁ : Group j₁} {φ₀ : G₀ →ᴳ H₀} {φ₁ : G₁ →ᴳ H₁} {ξG : G₀ →ᴳ G₁} {ξH : H₀ →ᴳ H₁} → (cse : CommSquareEquivᴳ φ₀ φ₁ ξG ξH) → CommSquareEquivᴳ φ₁ φ₀ (GroupIso.g-hom (ξG , fst (snd cse))) (GroupIso.g-hom (ξH , snd (snd cse))) CommSquareEquivᴳ-inverse-v (comm-sqrᴳ cs , ise) with CommSquareEquiv-inverse-v (comm-sqr cs , ise) ... | (comm-sqr cs' , ise') = cs'' , ise' where abstract cs'' = comm-sqrᴳ cs' CommSquareᴳ-inverse-v : ∀ {i₀ i₁ j₀ j₁} {G₀ : Group i₀} {G₁ : Group i₁} {H₀ : Group j₀} {H₁ : Group j₁} {φ₀ : G₀ →ᴳ H₀} {φ₁ : G₁ →ᴳ H₁} {ξG : G₀ →ᴳ G₁} {ξH : H₀ →ᴳ H₁} → CommSquareᴳ φ₀ φ₁ ξG ξH → (ξG-ise : is-equiv (GroupHom.f ξG)) (ξH-ise : is-equiv (GroupHom.f ξH)) → CommSquareᴳ φ₁ φ₀ (GroupIso.g-hom (ξG , ξG-ise)) (GroupIso.g-hom (ξH , ξH-ise)) CommSquareᴳ-inverse-v cs ξG-ise ξH-ise = fst (CommSquareEquivᴳ-inverse-v (cs , ξG-ise , ξH-ise)) -- basic facts nicely represented in commuting squares inv-hom-natural-comm-sqr : ∀ {i j} (G : AbGroup i) (H : AbGroup j) (φ : AbGroup.grp G →ᴳ AbGroup.grp H) → CommSquareᴳ φ φ (inv-hom G) (inv-hom H) inv-hom-natural-comm-sqr _ _ φ = comm-sqrᴳ λ g → ! (GroupHom.pres-inv φ g)
|
record
|
core
|
[
"open import lib.Basics",
"open import lib.types.Sigma",
"open import lib.types.Group",
"open import lib.types.CommutingSquare",
"open import lib.groups.Homomorphism",
"open import lib.groups.Isomorphism"
] |
core/lib/groups/CommutingSquare.agda
|
CommSquareᴳ
| |
Πᴳ : ∀ {i j} (I : Type i) (F : I → Group j) → Group (lmax i j)
|
function
|
core
|
[
"open import lib.Basics",
"open import lib.types.Bool",
"open import lib.types.Group",
"open import lib.types.Nat",
"open import lib.types.Pi",
"open import lib.types.Sigma",
"open import lib.types.Coproduct",
"open import lib.types.Truncation",
"open import lib.groups.Homomorphism",
"open import lib.groups.Isomorphism",
"open import lib.groups.SubgroupProp",
"open import lib.groups.Lift",
"open import lib.groups.Unit"
] |
core/lib/groups/GroupProduct.agda
|
Πᴳ
| |
GroupStructureHom {i j} {GEl : Type i} {HEl : Type j} (GS : GroupStructure GEl) (HS : GroupStructure HEl) : Type (lmax i j) where constructor group-structure-hom private module G = GroupStructure GS module H = GroupStructure HS field f : GEl → HEl pres-comp : preserves-comp G.comp H.comp f abstract pres-ident : f G.ident == H.ident pres-ident = H.cancel-l (f G.ident) $ H.comp (f G.ident) (f G.ident) =⟨ ! (pres-comp G.ident G.ident) ⟩ f (G.comp G.ident G.ident) =⟨ ap f (G.unit-l G.ident) ⟩ f G.ident =⟨ ! (H.unit-r (f G.ident)) ⟩ H.comp (f G.ident) H.ident =∎ pres-inv : ∀ g → f (G.inv g) == H.inv (f g) pres-inv g = ! $ H.inv-unique-l _ _ $ H.comp (f (G.inv g)) (f g) =⟨ ! (pres-comp (G.inv g) g) ⟩ f (G.comp (G.inv g) g) =⟨ ap f (G.inv-l g) ⟩ f G.ident =⟨ pres-ident ⟩ H.ident =∎ pres-exp : ∀ g i → f (G.exp g i) == H.exp (f g) i pres-exp g (pos O) = pres-ident pres-exp g (pos (S O)) = idp pres-exp g (pos (S (S n))) = pres-comp g (G.exp g (pos (S n))) ∙ ap (H.comp (f g)) (pres-exp g (pos (S n))) pres-exp g (negsucc O) = pres-inv g pres-exp g (negsucc (S n)) = pres-comp (G.inv g) (G.exp g (negsucc n)) ∙ ap2 H.comp (pres-inv g) (pres-exp g (negsucc n)) pres-conj : ∀ g h → f (G.conj g h) == H.conj (f g) (f h) pres-conj g h = pres-comp (G.comp g h) (G.inv g) ∙ ap2 H.comp (pres-comp g h) (pres-inv g) pres-diff : ∀ g h → f (G.diff g h) == H.diff (f g) (f h) pres-diff g h = pres-comp g (G.inv h) ∙ ap (H.comp (f g)) (pres-inv h) pres-sum : ∀ {I : ℕ} (g : Fin I → GEl) → f (G.sum g) == H.sum (f ∘ g) pres-sum {I = O} _ = pres-ident pres-sum {I = S I} g = pres-comp (G.sum (g ∘ Fin-S)) (g (_ , ltS)) ∙ ap (λ h → H.comp h (f (g (_ , ltS)))) (pres-sum (g ∘ Fin-S)) pres-subsum-r : ∀ {k l} {I : ℕ} {A : Type k} {B : Type l} → (p : Fin I → Coprod A B) (g : B → GEl) → f (G.subsum-r p g) == H.subsum-r p (f ∘ g) pres-subsum-r p g = pres-sum (Coprod-rec (λ _ → G.ident) g ∘ p) ∙ ap H.sum (λ= λ x → Coprod-rec-post∘ f (λ _ → G.ident) g (p x) ∙ ap (λ h → Coprod-rec h (f ∘ g) (p x)) (λ= λ _ → pres-ident)) ⊙f : ⊙[ GEl , G.ident ] ⊙→ ⊙[ HEl , H.ident ] ⊙f = f , pres-ident infix 0 _→ᴳˢ_ -- [ˢ] for structures _→ᴳˢ_ = GroupStructureHom
|
record
|
core
|
[
"open import lib.Basics",
"open import lib.Equivalence2",
"open import lib.Function2",
"open import lib.NType2",
"open import lib.types.Coproduct",
"open import lib.types.Fin",
"open import lib.types.Group",
"open import lib.types.Int",
"open import lib.types.Nat",
"open import lib.types.Pi",
"open import lib.types.Subtype",
"open import lib.types.Truncation",
"open import lib.groups.SubgroupProp"
] |
core/lib/groups/Homomorphism.agda
|
GroupStructureHom
| |
GroupHom {i j} (G : Group i) (H : Group j) : Type (lmax i j) where constructor group-hom private module G = Group G module H = Group H field f : G.El → H.El pres-comp : ∀ g₁ g₂ → f (G.comp g₁ g₂) == H.comp (f g₁) (f g₂) open GroupStructureHom {GS = G.group-struct} {HS = H.group-struct} record {f = f ; pres-comp = pres-comp} hiding (f ; pres-comp) public infix 0 _→ᴳ_ _→ᴬᴳ_ _→ᴳ_ = GroupHom _→ᴬᴳ_ : ∀ {i} {j} (G : AbGroup i) (H : AbGroup j) → Type (lmax i j) _→ᴬᴳ_ G H = AbGroup.grp G →ᴳ AbGroup.grp H →ᴳˢ-to-→ᴳ : ∀ {i j} {G : Group i} {H : Group j} → (Group.group-struct G →ᴳˢ Group.group-struct H) → (G →ᴳ H) →ᴳˢ-to-→ᴳ (group-structure-hom f pres-comp) = group-hom f pres-comp idhom : ∀ {i} (G : Group i) → (G →ᴳ G) idhom G = group-hom (idf _) (λ _ _ → idp) idshom : ∀ {i} {GEl : Type i} (GS : GroupStructure GEl) → (GS →ᴳˢ GS) idshom GS = group-structure-hom (idf _) (λ _ _ → idp) {- constant (zero) homomorphism -}
|
record
|
core
|
[
"open import lib.Basics",
"open import lib.Equivalence2",
"open import lib.Function2",
"open import lib.NType2",
"open import lib.types.Coproduct",
"open import lib.types.Fin",
"open import lib.types.Group",
"open import lib.types.Int",
"open import lib.types.Nat",
"open import lib.types.Pi",
"open import lib.types.Subtype",
"open import lib.types.Truncation",
"open import lib.groups.SubgroupProp"
] |
core/lib/groups/Homomorphism.agda
|
GroupHom
| |
idhom : ∀ {i} (G : Group i) → (G →ᴳ G)
|
function
|
core
|
[
"open import lib.Basics",
"open import lib.Equivalence2",
"open import lib.Function2",
"open import lib.NType2",
"open import lib.types.Coproduct",
"open import lib.types.Fin",
"open import lib.types.Group",
"open import lib.types.Int",
"open import lib.types.Nat",
"open import lib.types.Pi",
"open import lib.types.Subtype",
"open import lib.types.Truncation",
"open import lib.groups.SubgroupProp"
] |
core/lib/groups/Homomorphism.agda
|
idhom
| |
idshom : ∀ {i} {GEl : Type i} (GS : GroupStructure GEl) → (GS →ᴳˢ GS)
|
function
|
core
|
[
"open import lib.Basics",
"open import lib.Equivalence2",
"open import lib.Function2",
"open import lib.NType2",
"open import lib.types.Coproduct",
"open import lib.types.Fin",
"open import lib.types.Group",
"open import lib.types.Int",
"open import lib.types.Nat",
"open import lib.types.Pi",
"open import lib.types.Subtype",
"open import lib.types.Truncation",
"open import lib.groups.SubgroupProp"
] |
core/lib/groups/Homomorphism.agda
|
idshom
| |
inv-hom : ∀ {i} (G : AbGroup i) → GroupHom (AbGroup.grp G) (AbGroup.grp G)
|
function
|
core
|
[
"open import lib.Basics",
"open import lib.Equivalence2",
"open import lib.Function2",
"open import lib.NType2",
"open import lib.types.Coproduct",
"open import lib.types.Fin",
"open import lib.types.Group",
"open import lib.types.Int",
"open import lib.types.Nat",
"open import lib.types.Pi",
"open import lib.types.Subtype",
"open import lib.types.Truncation",
"open import lib.groups.SubgroupProp"
] |
core/lib/groups/Homomorphism.agda
|
inv-hom
| |
ℤ-group-structure : GroupStructure ℤ
|
function
|
core
|
[
"open import lib.Basics",
"open import lib.NType2",
"open import lib.types.Int",
"open import lib.types.Group",
"open import lib.types.List",
"open import lib.types.Word",
"open import lib.groups.Homomorphism",
"open import lib.groups.Isomorphism",
"open import lib.groups.FreeAbelianGroup",
"open import lib.groups.GeneratedGroup",
"open import lib.types.SetQuotient"
] |
core/lib/groups/Int.agda
|
ℤ-group-structure
| |
ℤ-group : Group₀
|
function
|
core
|
[
"open import lib.Basics",
"open import lib.NType2",
"open import lib.types.Int",
"open import lib.types.Group",
"open import lib.types.List",
"open import lib.types.Word",
"open import lib.groups.Homomorphism",
"open import lib.groups.Isomorphism",
"open import lib.groups.FreeAbelianGroup",
"open import lib.groups.GeneratedGroup",
"open import lib.types.SetQuotient"
] |
core/lib/groups/Int.agda
|
ℤ-group
| |
ℤ-group-is-abelian : is-abelian ℤ-group
|
function
|
core
|
[
"open import lib.Basics",
"open import lib.NType2",
"open import lib.types.Int",
"open import lib.types.Group",
"open import lib.types.List",
"open import lib.types.Word",
"open import lib.groups.Homomorphism",
"open import lib.groups.Isomorphism",
"open import lib.groups.FreeAbelianGroup",
"open import lib.groups.GeneratedGroup",
"open import lib.types.SetQuotient"
] |
core/lib/groups/Int.agda
|
ℤ-group-is-abelian
| |
ℤ-abgroup : AbGroup₀
|
function
|
core
|
[
"open import lib.Basics",
"open import lib.NType2",
"open import lib.types.Int",
"open import lib.types.Group",
"open import lib.types.List",
"open import lib.types.Word",
"open import lib.groups.Homomorphism",
"open import lib.groups.Isomorphism",
"open import lib.groups.FreeAbelianGroup",
"open import lib.groups.GeneratedGroup",
"open import lib.types.SetQuotient"
] |
core/lib/groups/Int.agda
|
ℤ-abgroup
|
Structured dataset from HoTT-Agda — Homotopy Type Theory.
604 declarations extracted from Agda source files.
| Column | Type | Description |
|---|---|---|
| fact | string | Declaration body |
| type | string | data, record, function |
| library | string | Source module |
| imports | list | Required imports |
| filename | string | Source file path |
| symbolic_name | string | Identifier |