diff --git a/CODINGSTYLE.md b/CODINGSTYLE.md
index e9153c0829..b02c0b2eb0 100644
--- a/CODINGSTYLE.md
+++ b/CODINGSTYLE.md
@@ -128,6 +128,49 @@ strategic endeavour to ensure the longevity, vitality, and success of the
a = construction-of-a
```
+- **Lambda expressions**: When a lambda expression appears as the argument of a
+ function, we always wrap it in parentheses. We do this even if it is the last
+ argument and thus isn't strictly required to be parenthesized. Note that in
+ some rare cases, a lambda expression might appear at the top level. In this
+ case we don't require the lambda expression to be parenthesized.
+
+ There are multiple syntaxes for writing lambda expressions in Agda. Generally,
+ you have the following options:
+
+ 1. Regular lambda expressions without pattern matching:
+
+ ```agda
+ λ x → x
+ ```
+
+ 2. Pattern matching lambda expressions on record types:
+
+ ```agda
+ λ (x , y) → x
+ ```
+
+ This syntax only applies to record types with $η$-equality.
+
+ 3. Pattern matching lambda expressions with `{...}`:
+
+ ```agda
+ λ { (inl x) → ... ; (inr y) → ...}
+ ```
+
+ 4. Pattern matching lambda expressions using the `where` keyword:
+
+ ```agda
+ λ where refl → refl
+ ```
+
+ All four syntaxes are in use in the library, although when possible we try to
+ avoid general pattern matching lambdas, i.e. syntaxes 3 and 4. If need be, we
+ prefer pattern matching using the `where` keyword over the `{...}` syntax.
+ Note that whenever syntax 3 or 4 appear in as part of a construction, the
+ definition should be marked as `abstract`. If computation is necessary for a
+ definition that has these syntaxes in them, this suggests the relevant lambda
+ expression(s) deserve to be factored out as separate definitions.
+
## Code comments
Given that the files in `agda-unimath` are literate Agda markdown files,
diff --git a/scripts/blank_line_conventions.py b/scripts/blank_line_conventions.py
index e1ff9862a0..4a39955f11 100755
--- a/scripts/blank_line_conventions.py
+++ b/scripts/blank_line_conventions.py
@@ -11,7 +11,6 @@
open_tag_pattern = re.compile(r'^```\S+\n', flags=re.MULTILINE)
close_tag_pattern = re.compile(r'\n```$', flags=re.MULTILINE)
-
if __name__ == '__main__':
status = 0
@@ -23,6 +22,10 @@
output = re.sub(r'[ \t]+$', '', inputText, flags=re.MULTILINE)
output = re.sub(r'\n(\s*\n){2,}', '\n\n', output)
+ # Remove blank lines before a `where`
+ output = re.sub(r'\n(\s*\n)+(\s+)where(\s|$)',
+ r'\n\2where\3', output, flags=re.MULTILINE)
+
# # Add blank line after `module ... where`
# output = re.sub(r'(^([ \t]*)module[\s({][^\n]*\n(\2\s[^\n]*\n)*\2\s([^\n]*[\s)}])?where)\s*\n(?=\s*[^\n\s])', r'\1\n\n',
# output, flags=re.MULTILINE)
diff --git a/src/category-theory/category-of-functors.lagda.md b/src/category-theory/category-of-functors.lagda.md
index 346c9bb498..c2486d1ff0 100644
--- a/src/category-theory/category-of-functors.lagda.md
+++ b/src/category-theory/category-of-functors.lagda.md
@@ -82,9 +82,9 @@ module _
( ( equiv-iso-functor-natural-isomorphism-Precategory C D F G) ∘e
( extensionality-functor-is-category-Precategory
C D is-category-D F G))
- ( λ { refl →
- compute-iso-functor-natural-isomorphism-eq-Precategory
- C D F G refl})
+ ( λ where
+ refl →
+ compute-iso-functor-natural-isomorphism-eq-Precategory C D F G refl)
```
## Definitions
diff --git a/src/category-theory/category-of-maps-categories.lagda.md b/src/category-theory/category-of-maps-categories.lagda.md
index 60a307aec2..660aa85375 100644
--- a/src/category-theory/category-of-maps-categories.lagda.md
+++ b/src/category-theory/category-of-maps-categories.lagda.md
@@ -66,7 +66,8 @@ module _
( ( distributive-Π-Σ) ∘e
( equiv-Π-equiv-family
( λ x →
- extensionality-obj-Category (D , is-category-D)
+ extensionality-obj-Category
+ ( D , is-category-D)
( obj-map-Precategory C D F x)
( obj-map-Precategory C D G x))))
( λ K →
@@ -113,10 +114,9 @@ module _
is-equiv-htpy-equiv
( ( equiv-iso-map-natural-isomorphism-map-Precategory C D F G) ∘e
( extensionality-map-is-category-Precategory C D is-category-D F G))
- ( λ
- { refl →
- compute-iso-map-natural-isomorphism-map-eq-Precategory
- C D F G refl})
+ ( λ where
+ refl →
+ compute-iso-map-natural-isomorphism-map-eq-Precategory C D F G refl)
```
## Definitions
diff --git a/src/category-theory/dependent-products-of-categories.lagda.md b/src/category-theory/dependent-products-of-categories.lagda.md
index b5c1aa2c16..6c44867c5b 100644
--- a/src/category-theory/dependent-products-of-categories.lagda.md
+++ b/src/category-theory/dependent-products-of-categories.lagda.md
@@ -50,7 +50,7 @@ module _
equiv-Π-equiv-family
( λ i → extensionality-obj-Category (C i) (x i) (y i)) ∘e
equiv-funext)
- ( λ {refl → refl})
+ ( λ where refl → refl)
Π-Category : Category (l1 ⊔ l2) (l1 ⊔ l3)
pr1 Π-Category = Π-Precategory I (precategory-Category ∘ C)
diff --git a/src/category-theory/dependent-products-of-large-categories.lagda.md b/src/category-theory/dependent-products-of-large-categories.lagda.md
index abb7acd962..3f81e6ee78 100644
--- a/src/category-theory/dependent-products-of-large-categories.lagda.md
+++ b/src/category-theory/dependent-products-of-large-categories.lagda.md
@@ -53,7 +53,7 @@ module _
( equiv-Π-equiv-family
( λ i → extensionality-obj-Large-Category (C i) (x i) (y i))) ∘e
( equiv-funext))
- ( λ {refl → refl})
+ ( λ where refl → refl)
Π-Large-Category : Large-Category (λ l2 → l1 ⊔ α l2) (λ l2 l3 → l1 ⊔ β l2 l3)
large-precategory-Large-Category
diff --git a/src/commutative-algebra/products-ideals-commutative-rings.lagda.md b/src/commutative-algebra/products-ideals-commutative-rings.lagda.md
index cab7a3ee8e..9b7ddaf07d 100644
--- a/src/commutative-algebra/products-ideals-commutative-rings.lagda.md
+++ b/src/commutative-algebra/products-ideals-commutative-rings.lagda.md
@@ -170,25 +170,28 @@ module _
(S : subset-Commutative-Ring l2 A) (T : subset-Commutative-Ring l3 A)
where
- forward-inclusion-preserves-product-ideal-subset-Commutative-Ring :
- leq-ideal-Commutative-Ring A
- ( ideal-subset-Commutative-Ring A (product-subset-Commutative-Ring A S T))
- ( product-ideal-Commutative-Ring A
- ( ideal-subset-Commutative-Ring A S)
- ( ideal-subset-Commutative-Ring A T))
- forward-inclusion-preserves-product-ideal-subset-Commutative-Ring =
- is-ideal-generated-by-subset-ideal-subset-Commutative-Ring A
- ( product-subset-Commutative-Ring A S T)
- ( product-ideal-Commutative-Ring A
- ( ideal-subset-Commutative-Ring A S)
- ( ideal-subset-Commutative-Ring A T))
- ( λ x H →
- apply-universal-property-trunc-Prop H
- ( subset-product-ideal-Commutative-Ring A
- ( ideal-subset-Commutative-Ring A S)
- ( ideal-subset-Commutative-Ring A T)
- ( x))
- ( λ { (s , t , refl) →
+ abstract
+ forward-inclusion-preserves-product-ideal-subset-Commutative-Ring :
+ leq-ideal-Commutative-Ring A
+ ( ideal-subset-Commutative-Ring A
+ ( product-subset-Commutative-Ring A S T))
+ ( product-ideal-Commutative-Ring A
+ ( ideal-subset-Commutative-Ring A S)
+ ( ideal-subset-Commutative-Ring A T))
+ forward-inclusion-preserves-product-ideal-subset-Commutative-Ring =
+ is-ideal-generated-by-subset-ideal-subset-Commutative-Ring A
+ ( product-subset-Commutative-Ring A S T)
+ ( product-ideal-Commutative-Ring A
+ ( ideal-subset-Commutative-Ring A S)
+ ( ideal-subset-Commutative-Ring A T))
+ ( λ x H →
+ apply-universal-property-trunc-Prop H
+ ( subset-product-ideal-Commutative-Ring A
+ ( ideal-subset-Commutative-Ring A S)
+ ( ideal-subset-Commutative-Ring A T)
+ ( x))
+ ( λ where
+ ( s , t , refl) →
contains-product-product-ideal-Commutative-Ring A
( ideal-subset-Commutative-Ring A S)
( ideal-subset-Commutative-Ring A T)
@@ -199,7 +202,7 @@ module _
( pr2 s))
( contains-subset-ideal-subset-Commutative-Ring A T
( pr1 t)
- ( pr2 t))}))
+ ( pr2 t))))
left-backward-inclusion-preserves-product-ideal-subset-Commutative-Ring :
{x s y : type-Commutative-Ring A} →
diff --git a/src/elementary-number-theory/dirichlet-convolution.lagda.md b/src/elementary-number-theory/dirichlet-convolution.lagda.md
index 737e8537a8..0745ebdfe9 100644
--- a/src/elementary-number-theory/dirichlet-convolution.lagda.md
+++ b/src/elementary-number-theory/dirichlet-convolution.lagda.md
@@ -39,8 +39,8 @@ module _
bounded-sum-arithmetic-function-Ring R
( succ-ℕ n)
( λ x → div-ℕ-Decidable-Prop (pr1 x) (succ-ℕ n) (pr2 x))
- ( λ { (pair x K) H →
- mul-Ring R
- ( f ( pair x K))
- ( g ( quotient-div-nonzero-ℕ x (succ-nonzero-ℕ' n) H))})
+ ( λ (x , K) H →
+ mul-Ring R
+ ( f ( pair x K))
+ ( g ( quotient-div-nonzero-ℕ x (succ-nonzero-ℕ' n) H)))
```
diff --git a/src/elementary-number-theory/divisibility-integers.lagda.md b/src/elementary-number-theory/divisibility-integers.lagda.md
index 174731d772..144135cf62 100644
--- a/src/elementary-number-theory/divisibility-integers.lagda.md
+++ b/src/elementary-number-theory/divisibility-integers.lagda.md
@@ -482,7 +482,7 @@ is-zero-sim-unit-ℤ {x} {y} H p =
( λ g → g (inv (β g) ∙ (ap ((u g) *ℤ_) p ∙ right-zero-law-mul-ℤ (u g))))
where
K : is-nonzero-ℤ y → presim-unit-ℤ x y
- K g = H (λ {(pair u v) → g v})
+ K g = H (λ (u , v) → g v)
u : is-nonzero-ℤ y → ℤ
u g = pr1 (pr1 (K g))
v : is-nonzero-ℤ y → ℤ
@@ -547,8 +547,8 @@ transitive-presim-unit-ℤ x y z (pair (pair v K) q) (pair (pair u H) p) =
transitive-sim-unit-ℤ : is-transitive sim-unit-ℤ
transitive-sim-unit-ℤ x y z K H f =
transitive-presim-unit-ℤ x y z
- ( K (λ {(p , q) → f (is-zero-sim-unit-ℤ' H p , q)}))
- ( H (λ {(p , q) → f (p , is-zero-sim-unit-ℤ K q)}))
+ ( K (λ (p , q) → f (is-zero-sim-unit-ℤ' H p , q)))
+ ( H (λ (p , q) → f (p , is-zero-sim-unit-ℤ K q)))
```
### `sim-unit-ℤ x y` holds if and only if `x|y` and `y|x`
diff --git a/src/elementary-number-theory/fundamental-theorem-of-arithmetic.lagda.md b/src/elementary-number-theory/fundamental-theorem-of-arithmetic.lagda.md
index 992aa4a2fa..dba98f35f5 100644
--- a/src/elementary-number-theory/fundamental-theorem-of-arithmetic.lagda.md
+++ b/src/elementary-number-theory/fundamental-theorem-of-arithmetic.lagda.md
@@ -307,14 +307,15 @@ is-minimal-least-nontrivial-divisor-ℕ n H x K d =
### The least nontrivial divisor of a number `> 1` is nonzero
```agda
-is-nonzero-least-nontrivial-divisor-ℕ :
- (n : ℕ) (H : le-ℕ 1 n) → is-nonzero-ℕ (nat-least-nontrivial-divisor-ℕ n H)
-is-nonzero-least-nontrivial-divisor-ℕ n H =
- is-nonzero-div-ℕ
- ( nat-least-nontrivial-divisor-ℕ n H)
- ( n)
- ( div-least-nontrivial-divisor-ℕ n H)
- ( λ { refl → H})
+abstract
+ is-nonzero-least-nontrivial-divisor-ℕ :
+ (n : ℕ) (H : le-ℕ 1 n) → is-nonzero-ℕ (nat-least-nontrivial-divisor-ℕ n H)
+ is-nonzero-least-nontrivial-divisor-ℕ n H =
+ is-nonzero-div-ℕ
+ ( nat-least-nontrivial-divisor-ℕ n H)
+ ( n)
+ ( div-least-nontrivial-divisor-ℕ n H)
+ ( λ where refl → H)
```
### The least nontrivial divisor of a number `> 1` is prime
diff --git a/src/elementary-number-theory/powers-of-two.lagda.md b/src/elementary-number-theory/powers-of-two.lagda.md
index 9efb3ca6ba..836612d431 100644
--- a/src/elementary-number-theory/powers-of-two.lagda.md
+++ b/src/elementary-number-theory/powers-of-two.lagda.md
@@ -55,49 +55,51 @@ is-nonzero-pair-expansion u v =
( is-nonzero-exp-ℕ 2 u is-nonzero-two-ℕ)
( is-nonzero-succ-ℕ _)
-has-pair-expansion-is-even-or-odd :
- (n : ℕ) → is-even-ℕ n + is-odd-ℕ n → pair-expansion n
-has-pair-expansion-is-even-or-odd n =
- strong-ind-ℕ
- ( λ m → (is-even-ℕ m + is-odd-ℕ m) → (pair-expansion m))
- ( λ x → (0 , 0) , refl)
- ( λ k f →
- ( λ {
- ( inl x) →
- ( let s = has-odd-expansion-is-odd k (is-odd-is-even-succ-ℕ k x)
- in pair
- ( 0 , (succ-ℕ (pr1 s)))
- ( ( ap ((succ-ℕ ∘ succ-ℕ) ∘ succ-ℕ) (left-unit-law-add-ℕ _)) ∙
- ( ( ap (succ-ℕ ∘ succ-ℕ) (pr2 s))))) ;
- ( inr x) →
- ( let e : is-even-ℕ k
- e = is-even-is-odd-succ-ℕ k x
-
- t : (pr1 e) ≤-ℕ k
- t = leq-quotient-div-ℕ' 2 k is-nonzero-two-ℕ e
-
- s : (pair-expansion (pr1 e))
- s = f (pr1 e) t (is-decidable-is-even-ℕ (pr1 e))
- in
- pair
- ( succ-ℕ (pr1 (pr1 s)) , pr2 (pr1 s))
- ( ( ap
- ( _*ℕ (succ-ℕ ((pr2 (pr1 s)) *ℕ 2)))
- ( commutative-mul-ℕ (exp-ℕ 2 (pr1 (pr1 s))) 2)) ∙
- ( ( associative-mul-ℕ 2
- ( exp-ℕ 2 (pr1 (pr1 s)))
- ( succ-ℕ ((pr2 (pr1 s)) *ℕ 2))) ∙
- ( ( ap (2 *ℕ_) (pr2 s)) ∙
- ( ( ap succ-ℕ
- ( left-successor-law-add-ℕ (0 +ℕ (pr1 e)) (pr1 e))) ∙
- ( ( ap
- ( succ-ℕ ∘ succ-ℕ)
- ( ap (_+ℕ (pr1 e)) (left-unit-law-add-ℕ (pr1 e)))) ∙
+abstract
+ has-pair-expansion-is-even-or-odd :
+ (n : ℕ) → is-even-ℕ n + is-odd-ℕ n → pair-expansion n
+ has-pair-expansion-is-even-or-odd n =
+ strong-ind-ℕ
+ ( λ m → (is-even-ℕ m + is-odd-ℕ m) → (pair-expansion m))
+ ( λ x → (0 , 0) , refl)
+ ( λ k f →
+ ( λ where
+ ( inl x) →
+ ( let s = has-odd-expansion-is-odd k (is-odd-is-even-succ-ℕ k x)
+ in
+ pair
+ ( 0 , (succ-ℕ (pr1 s)))
+ ( ( ap ((succ-ℕ ∘ succ-ℕ) ∘ succ-ℕ) (left-unit-law-add-ℕ _)) ∙
+ ( ( ap (succ-ℕ ∘ succ-ℕ) (pr2 s)))))
+ ( inr x) →
+ ( let e : is-even-ℕ k
+ e = is-even-is-odd-succ-ℕ k x
+
+ t : (pr1 e) ≤-ℕ k
+ t = leq-quotient-div-ℕ' 2 k is-nonzero-two-ℕ e
+
+ s : (pair-expansion (pr1 e))
+ s = f (pr1 e) t (is-decidable-is-even-ℕ (pr1 e))
+ in
+ pair
+ ( succ-ℕ (pr1 (pr1 s)) , pr2 (pr1 s))
+ ( ( ap
+ ( _*ℕ (succ-ℕ ((pr2 (pr1 s)) *ℕ 2)))
+ ( commutative-mul-ℕ (exp-ℕ 2 (pr1 (pr1 s))) 2)) ∙
+ ( ( associative-mul-ℕ 2
+ ( exp-ℕ 2 (pr1 (pr1 s)))
+ ( succ-ℕ ((pr2 (pr1 s)) *ℕ 2))) ∙
+ ( ( ap (2 *ℕ_) (pr2 s)) ∙
+ ( ( ap succ-ℕ
+ ( left-successor-law-add-ℕ (0 +ℕ (pr1 e)) (pr1 e))) ∙
( ( ap
( succ-ℕ ∘ succ-ℕ)
- ( inv (right-two-law-mul-ℕ (pr1 e)))) ∙
- ( ( ap (succ-ℕ ∘ succ-ℕ) (pr2 e))))))))))}))
- ( n)
+ ( ap (_+ℕ (pr1 e)) (left-unit-law-add-ℕ (pr1 e)))) ∙
+ ( ( ap
+ ( succ-ℕ ∘ succ-ℕ)
+ ( inv (right-two-law-mul-ℕ (pr1 e)))) ∙
+ ( ( ap (succ-ℕ ∘ succ-ℕ) (pr2 e))))))))))))
+ ( n)
has-pair-expansion : (n : ℕ) → pair-expansion n
has-pair-expansion n =
diff --git a/src/finite-group-theory/concrete-quaternion-group.lagda.md b/src/finite-group-theory/concrete-quaternion-group.lagda.md
index d03507a4e9..c7c9128a36 100644
--- a/src/finite-group-theory/concrete-quaternion-group.lagda.md
+++ b/src/finite-group-theory/concrete-quaternion-group.lagda.md
@@ -12,11 +12,11 @@ open import elementary-number-theory.natural-numbers
open import foundation.dependent-pair-types
open import foundation.equivalences
open import foundation.identity-types
-open import foundation.isolated-points
+open import foundation.isolated-elements
open import foundation.transport-along-identifications
open import foundation.universe-levels
-open import univalent-combinatorics.complements-isolated-points
+open import univalent-combinatorics.complements-isolated-elements
open import univalent-combinatorics.cubes
open import univalent-combinatorics.equality-finite-types
open import univalent-combinatorics.equivalences-cubes
@@ -37,7 +37,7 @@ equiv-face-cube :
( map-axis-equiv-cube (succ-ℕ k) X Y e d a))
equiv-face-cube k X Y e d a =
pair
- ( equiv-complement-point-UU-Fin k
+ ( equiv-complement-element-UU-Fin k
( pair (dim-cube-UU-Fin (succ-ℕ k) X) d)
( pair
( dim-cube-UU-Fin (succ-ℕ k) Y)
@@ -48,7 +48,7 @@ equiv-face-cube k X Y e d a =
( equiv-tr
( axis-cube (succ-ℕ k) Y)
( inv
- ( natural-inclusion-equiv-complement-isolated-point
+ ( natural-inclusion-equiv-complement-isolated-element
( dim-equiv-cube (succ-ℕ k) X Y e)
( pair d
( λ z →
@@ -68,7 +68,7 @@ equiv-face-cube k X Y e d a =
( refl)
( d')))) ∘e
( axis-equiv-cube (succ-ℕ k) X Y e
- ( inclusion-complement-point-UU-Fin k
+ ( inclusion-complement-element-UU-Fin k
( pair (dim-cube-UU-Fin (succ-ℕ k) X) d) d')))
cube-with-labeled-faces :
diff --git a/src/finite-group-theory/orbits-permutations.lagda.md b/src/finite-group-theory/orbits-permutations.lagda.md
index fb5cbb2b6e..b3549cb019 100644
--- a/src/finite-group-theory/orbits-permutations.lagda.md
+++ b/src/finite-group-theory/orbits-permutations.lagda.md
@@ -463,12 +463,11 @@ module _
apply-universal-property-trunc-Prop
( Q)
( pr1 same-orbits-permutation a c)
- ( λ { (k2 , q) →
- ( unit-trunc-Prop
- ( pair
- ( k2 +ℕ k1)
- ( (iterate-add-ℕ k2 k1 (map-equiv f) a) ∙
- ( ap (iterate k2 (map-equiv f)) p ∙ q))))}))
+ ( λ (k2 , q) →
+ unit-trunc-Prop
+ ( ( k2 +ℕ k1) ,
+ ( ( iterate-add-ℕ k2 k1 (map-equiv f) a) ∙
+ ( ap (iterate k2 (map-equiv f)) p ∙ q)))))
abstract
is-decidable-same-orbits-permutation :
@@ -1126,23 +1125,25 @@ module _
(λ pa → lemma2 g (pair (pr1 pa) (inl (pr2 pa)))))
( is-equiv-is-prop is-prop-type-trunc-Prop
( is-prop-type-Prop (coprod-sim-Equivalence-Relation-a-b-Prop g P x))
- ( λ {
- (inl T) →
- apply-universal-property-trunc-Prop T
- ( prop-Equivalence-Relation (same-orbits-permutation-count g) x a)
- ( λ pa →
- lemma3
- ( lemma2
- ( composition-transposition-a-b g)
- ( pair (pr1 pa) (inl (pr2 pa))))) ;
- (inr T) →
- apply-universal-property-trunc-Prop T
- ( prop-Equivalence-Relation (same-orbits-permutation-count g) x a)
- ( λ pa →
- lemma3
- ( lemma2
- ( composition-transposition-a-b g)
- ( pair (pr1 pa) (inr (pr2 pa)))))}))
+ ( λ where
+ ( inl T) →
+ apply-universal-property-trunc-Prop T
+ ( prop-Equivalence-Relation
+ ( same-orbits-permutation-count g) x a)
+ ( λ pa →
+ lemma3
+ ( lemma2
+ ( composition-transposition-a-b g)
+ ( pair (pr1 pa) (inl (pr2 pa)))))
+ ( inr T) →
+ apply-universal-property-trunc-Prop T
+ ( prop-Equivalence-Relation
+ ( same-orbits-permutation-count g) x a)
+ ( λ pa →
+ lemma3
+ ( lemma2
+ ( composition-transposition-a-b g)
+ ( (pr1 pa) , (inr (pr2 pa)))))))
where
minimal-element-iterate-2-a-b :
( g : X ≃ X) →
@@ -1170,17 +1171,18 @@ module _
equal-iterate-transposition-same-orbits g pa k ineq =
equal-iterate-transposition x g
( λ k' → le-ℕ k' (pr1 (minimal-element-iterate-2-a-b g pa)))
- ( λ k' p → pair
- ( λ q →
- contradiction-le-ℕ k'
- ( pr1 (minimal-element-iterate-2-a-b g pa))
- ( p)
- ( pr2 (pr2 (minimal-element-iterate-2-a-b g pa)) k' (inl q)))
- ( λ r →
- contradiction-le-ℕ k'
- ( pr1 (minimal-element-iterate-2-a-b g pa))
- ( p)
- ( pr2 (pr2 (minimal-element-iterate-2-a-b g pa)) k' (inr r))))
+ ( λ k' p →
+ pair
+ ( λ q →
+ contradiction-le-ℕ k'
+ ( pr1 (minimal-element-iterate-2-a-b g pa))
+ ( p)
+ ( pr2 (pr2 (minimal-element-iterate-2-a-b g pa)) k' (inl q)))
+ ( λ r →
+ contradiction-le-ℕ k'
+ ( pr1 (minimal-element-iterate-2-a-b g pa))
+ ( p)
+ ( pr2 (pr2 (minimal-element-iterate-2-a-b g pa)) k' (inr r))))
( λ k' ineq' _ →
transitive-le-ℕ k'
( succ-ℕ k')
diff --git a/src/finite-group-theory/transpositions.lagda.md b/src/finite-group-theory/transpositions.lagda.md
index 6e2f1f1ff4..eea267b7ed 100644
--- a/src/finite-group-theory/transpositions.lagda.md
+++ b/src/finite-group-theory/transpositions.lagda.md
@@ -263,19 +263,19 @@ module _
is-not-identity-swap-2-Element-Type
( 2-element-type-2-Element-Decidable-Subtype P)
( eq-htpy-equiv
- ( λ { (pair x p) →
- eq-pair-Σ
- ( ( ap
- ( map-transposition' P x)
- ( eq-is-prop
- ( is-prop-is-decidable
- ( is-prop-is-in-2-Element-Decidable-Subtype P x))
- { y =
- is-decidable-subtype-subtype-2-Element-Decidable-Subtype
- ( P)
- ( x)})) ∙
- ( htpy-eq f x))
- ( eq-is-in-2-Element-Decidable-Subtype P)}))
+ ( λ (x , p) →
+ eq-pair-Σ
+ ( ( ap
+ ( map-transposition' P x)
+ ( eq-is-prop
+ ( is-prop-is-decidable
+ ( is-prop-is-in-2-Element-Decidable-Subtype P x))
+ { y =
+ is-decidable-subtype-subtype-2-Element-Decidable-Subtype
+ ( P)
+ ( x)})) ∙
+ ( htpy-eq f x))
+ ( eq-is-in-2-Element-Decidable-Subtype P)))
```
### Any transposition on a type equipped with a counting is a standard transposition
diff --git a/src/foundation-core/empty-types.lagda.md b/src/foundation-core/empty-types.lagda.md
index 09db14d352..273b55df60 100644
--- a/src/foundation-core/empty-types.lagda.md
+++ b/src/foundation-core/empty-types.lagda.md
@@ -101,6 +101,9 @@ abstract
empty-Prop : Prop lzero
pr1 empty-Prop = empty
pr2 empty-Prop = is-prop-empty
+
+is-prop-is-empty : {l : Level} {A : UU l} → is-empty A → is-prop A
+is-prop-is-empty is-empty-A = ex-falso ∘ is-empty-A
```
### The empty type is a set
diff --git a/src/foundation-core/equivalences.lagda.md b/src/foundation-core/equivalences.lagda.md
index 0521f57df2..fe08804f1a 100644
--- a/src/foundation-core/equivalences.lagda.md
+++ b/src/foundation-core/equivalences.lagda.md
@@ -548,40 +548,41 @@ module _
{l1 l2 : Level} {A : UU l1} {B : UU l2}
where
- is-emb-is-equiv :
- {f : A → B} → is-equiv f → (x y : A) → is-equiv (ap f {x} {y})
- is-emb-is-equiv {f} H x y =
- is-equiv-is-invertible
- ( λ p →
- ( inv (is-retraction-map-inv-is-equiv H x)) ∙
- ( ( ap (map-inv-is-equiv H) p) ∙
- ( is-retraction-map-inv-is-equiv H y)))
- ( λ p →
- ( ap-concat f
- ( inv (is-retraction-map-inv-is-equiv H x))
- ( ap (map-inv-is-equiv H) p ∙ is-retraction-map-inv-is-equiv H y)) ∙
- ( ( ap-binary
- ( λ u v → u ∙ v)
- ( ap-inv f (is-retraction-map-inv-is-equiv H x))
- ( ( ap-concat f
- ( ap (map-inv-is-equiv H) p)
- ( is-retraction-map-inv-is-equiv H y)) ∙
- ( ap-binary
- ( λ u v → u ∙ v)
- ( inv (ap-comp f (map-inv-is-equiv H) p))
- ( inv (coherence-map-inv-is-equiv H y))))) ∙
- ( inv
- ( left-transpose-eq-concat
- ( ap f (is-retraction-map-inv-is-equiv H x))
- ( p)
- ( ( ap (f ∘ map-inv-is-equiv H) p) ∙
- ( is-section-map-inv-is-equiv H (f y)))
- ( ( ap-binary
+ abstract
+ is-emb-is-equiv :
+ {f : A → B} → is-equiv f → (x y : A) → is-equiv (ap f {x} {y})
+ is-emb-is-equiv {f} H x y =
+ is-equiv-is-invertible
+ ( λ p →
+ ( inv (is-retraction-map-inv-is-equiv H x)) ∙
+ ( ( ap (map-inv-is-equiv H) p) ∙
+ ( is-retraction-map-inv-is-equiv H y)))
+ ( λ p →
+ ( ap-concat f
+ ( inv (is-retraction-map-inv-is-equiv H x))
+ ( ap (map-inv-is-equiv H) p ∙ is-retraction-map-inv-is-equiv H y)) ∙
+ ( ( ap-binary
+ ( λ u v → u ∙ v)
+ ( ap-inv f (is-retraction-map-inv-is-equiv H x))
+ ( ( ap-concat f
+ ( ap (map-inv-is-equiv H) p)
+ ( is-retraction-map-inv-is-equiv H y)) ∙
+ ( ap-binary
( λ u v → u ∙ v)
- ( inv (coherence-map-inv-is-equiv H x))
- ( inv (ap-id p))) ∙
- ( nat-htpy (is-section-map-inv-is-equiv H) p))))))
- ( λ {refl → left-inv (is-retraction-map-inv-is-equiv H x)})
+ ( inv (ap-comp f (map-inv-is-equiv H) p))
+ ( inv (coherence-map-inv-is-equiv H y))))) ∙
+ ( inv
+ ( left-transpose-eq-concat
+ ( ap f (is-retraction-map-inv-is-equiv H x))
+ ( p)
+ ( ( ap (f ∘ map-inv-is-equiv H) p) ∙
+ ( is-section-map-inv-is-equiv H (f y)))
+ ( ( ap-binary
+ ( λ u v → u ∙ v)
+ ( inv (coherence-map-inv-is-equiv H x))
+ ( inv (ap-id p))) ∙
+ ( nat-htpy (is-section-map-inv-is-equiv H) p))))))
+ ( λ where refl → left-inv (is-retraction-map-inv-is-equiv H x))
equiv-ap :
(e : A ≃ B) (x y : A) → (x = y) ≃ (map-equiv e x = map-equiv e y)
diff --git a/src/foundation-core/propositions.lagda.md b/src/foundation-core/propositions.lagda.md
index fadb971eba..f55b64f2b5 100644
--- a/src/foundation-core/propositions.lagda.md
+++ b/src/foundation-core/propositions.lagda.md
@@ -160,7 +160,7 @@ module _
abstract
is-prop-equiv : A ≃ B → is-prop B → is-prop A
- is-prop-equiv (pair f is-equiv-f) = is-prop-is-equiv is-equiv-f
+ is-prop-equiv (f , is-equiv-f) = is-prop-is-equiv is-equiv-f
module _
{l1 l2 : Level} {A : UU l1} {B : UU l2}
@@ -173,7 +173,7 @@ module _
abstract
is-prop-equiv' : A ≃ B → is-prop A → is-prop B
- is-prop-equiv' (pair f is-equiv-f) = is-prop-is-equiv' is-equiv-f
+ is-prop-equiv' (f , is-equiv-f) = is-prop-is-equiv' is-equiv-f
```
### Propositions are closed under dependent pair types
@@ -250,8 +250,7 @@ abstract
((x : A) → is-prop (B x)) → is-prop ({x : A} → B x)
is-prop-Π' {l1} {l2} {A} {B} H =
is-prop-equiv
- ( pair
- ( λ f x → f {x})
+ ( ( λ f x → f {x}) ,
( is-equiv-is-invertible
( λ g {x} → g x)
( refl-htpy)
diff --git a/src/foundation.lagda.md b/src/foundation.lagda.md
index e243af330c..3e4e87a3c6 100644
--- a/src/foundation.lagda.md
+++ b/src/foundation.lagda.md
@@ -158,7 +158,7 @@ open import foundation.interchange-law public
open import foundation.intersections-subtypes public
open import foundation.invertible-maps public
open import foundation.involutions public
-open import foundation.isolated-points public
+open import foundation.isolated-elements public
open import foundation.isomorphisms-of-sets public
open import foundation.iterated-cartesian-product-types public
open import foundation.iterating-automorphisms public
diff --git a/src/foundation/0-connected-types.lagda.md b/src/foundation/0-connected-types.lagda.md
index 85c43e399e..021246d291 100644
--- a/src/foundation/0-connected-types.lagda.md
+++ b/src/foundation/0-connected-types.lagda.md
@@ -96,14 +96,15 @@ is-0-connected-is-surjective-point a H =
( mere-eq-Prop a x)
( λ u → unit-trunc-Prop (pr2 u)))
-is-surjective-point-is-0-connected :
- {l1 : Level} {A : UU l1} (a : A) →
- is-0-connected A → is-surjective (point a)
-is-surjective-point-is-0-connected a H x =
- apply-universal-property-trunc-Prop
- ( mere-eq-is-0-connected H a x)
- ( trunc-Prop (fiber (point a) x))
- ( λ {refl → unit-trunc-Prop (pair star refl)})
+abstract
+ is-surjective-point-is-0-connected :
+ {l1 : Level} {A : UU l1} (a : A) →
+ is-0-connected A → is-surjective (point a)
+ is-surjective-point-is-0-connected a H x =
+ apply-universal-property-trunc-Prop
+ ( mere-eq-is-0-connected H a x)
+ ( trunc-Prop (fiber (point a) x))
+ ( λ where refl → unit-trunc-Prop (star , refl))
is-trunc-map-ev-point-is-connected :
{l1 l2 : Level} (k : 𝕋) {A : UU l1} {B : UU l2} (a : A) →
@@ -117,7 +118,7 @@ is-trunc-map-ev-point-is-connected k {A} {B} a H K =
( universal-property-contr-is-contr star is-contr-unit B))
( is-trunc-map-precomp-Π-is-surjective k
( is-surjective-point-is-0-connected a H)
- ( λ _ → pair B K))
+ ( λ _ → (B , K)))
equiv-dependent-universal-property-is-0-connected :
{l1 : Level} {A : UU l1} (a : A) → is-0-connected A →
@@ -140,11 +141,11 @@ abstract
is-surjective-fiber-inclusion :
{l1 l2 : Level} {A : UU l1} {B : A → UU l2} →
is-0-connected A → (a : A) → is-surjective (fiber-inclusion B a)
- is-surjective-fiber-inclusion {B = B} C a (pair x b) =
+ is-surjective-fiber-inclusion {B = B} C a (x , b) =
apply-universal-property-trunc-Prop
( mere-eq-is-0-connected C a x)
- ( trunc-Prop (fiber (fiber-inclusion B a) (pair x b)))
- ( λ { refl → unit-trunc-Prop (pair b refl)})
+ ( trunc-Prop (fiber (fiber-inclusion B a) (x , b)))
+ ( λ where refl → unit-trunc-Prop (b , refl))
abstract
mere-eq-is-surjective-fiber-inclusion :
@@ -153,7 +154,7 @@ abstract
(x : A) → mere-eq a x
mere-eq-is-surjective-fiber-inclusion a H x =
apply-universal-property-trunc-Prop
- ( H (λ x → unit) (pair x star))
+ ( H (λ x → unit) (x , star))
( mere-eq-Prop a x)
( λ u → unit-trunc-Prop (ap pr1 (pr2 u)))
diff --git a/src/foundation/apartness-relations.lagda.md b/src/foundation/apartness-relations.lagda.md
index cdeaaa2db6..b2dcc72e84 100644
--- a/src/foundation/apartness-relations.lagda.md
+++ b/src/foundation/apartness-relations.lagda.md
@@ -186,29 +186,31 @@ module _
unit-trunc-Prop
( x , symmetric-apart-Type-With-Apartness Y (f x) (g x) a))
- is-cotransitive-apart-function-into-Type-With-Apartness :
- is-cotransitive (rel-apart-function-into-Type-With-Apartness X Y)
- is-cotransitive-apart-function-into-Type-With-Apartness f g h H =
- apply-universal-property-trunc-Prop H
- ( disj-Prop
- ( rel-apart-function-into-Type-With-Apartness X Y f h)
- ( rel-apart-function-into-Type-With-Apartness X Y g h))
- ( λ (x , a) →
- apply-universal-property-trunc-Prop
- ( cotransitive-apart-Type-With-Apartness Y (f x) (g x) (h x) a)
- ( disj-Prop
- ( rel-apart-function-into-Type-With-Apartness X Y f h)
- ( rel-apart-function-into-Type-With-Apartness X Y g h))
- ( λ { (inl b) →
+ abstract
+ is-cotransitive-apart-function-into-Type-With-Apartness :
+ is-cotransitive (rel-apart-function-into-Type-With-Apartness X Y)
+ is-cotransitive-apart-function-into-Type-With-Apartness f g h H =
+ apply-universal-property-trunc-Prop H
+ ( disj-Prop
+ ( rel-apart-function-into-Type-With-Apartness X Y f h)
+ ( rel-apart-function-into-Type-With-Apartness X Y g h))
+ ( λ (x , a) →
+ apply-universal-property-trunc-Prop
+ ( cotransitive-apart-Type-With-Apartness Y (f x) (g x) (h x) a)
+ ( disj-Prop
+ ( rel-apart-function-into-Type-With-Apartness X Y f h)
+ ( rel-apart-function-into-Type-With-Apartness X Y g h))
+ ( λ where
+ ( inl b) →
inl-disj-Prop
( rel-apart-function-into-Type-With-Apartness X Y f h)
( rel-apart-function-into-Type-With-Apartness X Y g h)
- ( unit-trunc-Prop (x , b)) ;
- (inr b) →
+ ( unit-trunc-Prop (x , b))
+ ( inr b) →
inr-disj-Prop
( rel-apart-function-into-Type-With-Apartness X Y f h)
( rel-apart-function-into-Type-With-Apartness X Y g h)
- ( unit-trunc-Prop (x , b))}))
+ ( unit-trunc-Prop (x , b))))
exp-Type-With-Apartness : Type-With-Apartness (l1 ⊔ l2) (l1 ⊔ l3)
pr1 exp-Type-With-Apartness = X → type-Type-With-Apartness Y
diff --git a/src/foundation/connected-types.lagda.md b/src/foundation/connected-types.lagda.md
index 5aaa57af12..fe2331b54d 100644
--- a/src/foundation/connected-types.lagda.md
+++ b/src/foundation/connected-types.lagda.md
@@ -106,6 +106,6 @@ module _
( trunc (succ-𝕋 k) A)
( unit-trunc a)
( unit-trunc x))
- ( λ { refl → refl})
+ ( λ where refl → refl)
( center (K a x)))))
```
diff --git a/src/foundation/coproduct-decompositions-subuniverse.lagda.md b/src/foundation/coproduct-decompositions-subuniverse.lagda.md
index 16e7edb589..cd0f85fdbe 100644
--- a/src/foundation/coproduct-decompositions-subuniverse.lagda.md
+++ b/src/foundation/coproduct-decompositions-subuniverse.lagda.md
@@ -511,7 +511,7 @@ module _
( inclusion-subuniverse P (pr1 x))
( equiv-is-empty is-empty-raise-empty ( pr2 x)))
( eq-is-prop (is-prop-type-Prop (P _))))
- ( eq-is-prop is-prop-is-empty)))
+ ( eq-is-prop is-property-is-empty)))
( ( raise-empty l1 , C1) , is-empty-raise-empty)) ∘e
( ( inv-associative-Σ _ _ _) ∘e
( ( equiv-tot (λ _ → commutative-prod)) ∘e
diff --git a/src/foundation/embeddings.lagda.md b/src/foundation/embeddings.lagda.md
index 718e1505c1..8d29fe181e 100644
--- a/src/foundation/embeddings.lagda.md
+++ b/src/foundation/embeddings.lagda.md
@@ -276,10 +276,11 @@ module _
is-emb f
is-emb-equiv-refl-to-refl e p x y =
is-equiv-htpy-equiv
- (inv-equiv (e x y))
- λ { refl →
- inv (is-retraction-map-inv-equiv (e x x) refl) ∙
- ap (map-equiv (inv-equiv (e x x))) (p x)}
+ ( inv-equiv (e x y))
+ ( λ where
+ refl →
+ inv (is-retraction-map-inv-equiv (e x x) refl) ∙
+ ap (map-equiv (inv-equiv (e x x))) (p x))
```
### Embeddings are closed under pullback
diff --git a/src/foundation/empty-types.lagda.md b/src/foundation/empty-types.lagda.md
index fdd6b8876b..5f689d7bfa 100644
--- a/src/foundation/empty-types.lagda.md
+++ b/src/foundation/empty-types.lagda.md
@@ -93,16 +93,16 @@ raise-ex-falso-emb l =
### Being empty is a proposition
```agda
-is-prop-is-empty : {l : Level} {A : UU l} → is-prop (is-empty A)
-is-prop-is-empty = is-prop-function-type is-prop-empty
+is-property-is-empty : {l : Level} {A : UU l} → is-prop (is-empty A)
+is-property-is-empty = is-prop-function-type is-prop-empty
is-empty-Prop : {l1 : Level} → UU l1 → Prop l1
pr1 (is-empty-Prop A) = is-empty A
-pr2 (is-empty-Prop A) = is-prop-is-empty
+pr2 (is-empty-Prop A) = is-property-is-empty
is-nonempty-Prop : {l1 : Level} → UU l1 → Prop l1
pr1 (is-nonempty-Prop A) = is-nonempty A
-pr2 (is-nonempty-Prop A) = is-prop-is-empty
+pr2 (is-nonempty-Prop A) = is-property-is-empty
```
```agda
@@ -163,5 +163,5 @@ pr2 (is-contr-type-is-empty l) x =
( equiv-is-empty
is-empty-raise-empty
( is-in-subuniverse-inclusion-subuniverse is-empty-Prop x)))
- ( eq-is-prop is-prop-is-empty)
+ ( eq-is-prop is-property-is-empty)
```
diff --git a/src/foundation/functoriality-coproduct-types.lagda.md b/src/foundation/functoriality-coproduct-types.lagda.md
index 0cb0368127..ff730932bc 100644
--- a/src/foundation/functoriality-coproduct-types.lagda.md
+++ b/src/foundation/functoriality-coproduct-types.lagda.md
@@ -247,11 +247,11 @@ module _
is-surjective-map-coprod s s' (inl x) =
apply-universal-property-trunc-Prop (s x)
( trunc-Prop (fiber (map-coprod _ _) (inl x)))
- ( λ {(a , p) → unit-trunc-Prop (inl a , ap inl p)})
+ ( λ (a , p) → unit-trunc-Prop (inl a , ap inl p))
is-surjective-map-coprod s s' (inr x) =
apply-universal-property-trunc-Prop (s' x)
( trunc-Prop (fiber (map-coprod _ _) (inr x)))
- ( λ {(a , p) → unit-trunc-Prop (inr a , ap inr p)})
+ ( λ (a , p) → unit-trunc-Prop (inr a , ap inr p))
```
### For any two maps `f : A → B` and `g : C → D`, there is at most one pair of maps `f' : A → B` and `g' : C → D` such that `f' + g' = f + g`
@@ -517,20 +517,22 @@ module _
(eq-equiv-eq-map-equiv refl)
(eq-equiv-eq-map-equiv refl)
- is-section-map-inv-mutually-exclusive-coprod :
- (map-inv-mutually-exclusive-coprod ∘ map-mutually-exclusive-coprod) ~ id
- is-section-map-inv-mutually-exclusive-coprod e =
- eq-htpy-equiv (
- λ { (inl p) →
+ abstract
+ is-section-map-inv-mutually-exclusive-coprod :
+ (map-inv-mutually-exclusive-coprod ∘ map-mutually-exclusive-coprod) ~ id
+ is-section-map-inv-mutually-exclusive-coprod e =
+ eq-htpy-equiv
+ ( λ where
+ ( inl p) →
ap
( pr1)
( is-retraction-map-inv-equiv-left-summand
- ( map-equiv e (inl p) , left-to-left ¬PQ' e (inl p) star)) ;
- (inr q) →
+ ( map-equiv e (inl p) , left-to-left ¬PQ' e (inl p) star))
+ ( inr q) →
ap
( pr1)
( is-retraction-map-inv-equiv-right-summand
- ( map-equiv e (inr q) , right-to-right ¬P'Q e (inr q) star))})
+ ( map-equiv e (inr q) , right-to-right ¬P'Q e (inr q) star)))
equiv-mutually-exclusive-coprod :
((P + Q) ≃ (P' + Q')) ≃ ((P ≃ P') × (Q ≃ Q'))
diff --git a/src/foundation/functoriality-set-truncation.lagda.md b/src/foundation/functoriality-set-truncation.lagda.md
index 9756288cf2..c7bd3f85a4 100644
--- a/src/foundation/functoriality-set-truncation.lagda.md
+++ b/src/foundation/functoriality-set-truncation.lagda.md
@@ -199,11 +199,10 @@ module _
apply-universal-property-trunc-Prop
( H b)
( trunc-Prop (fiber (map-trunc-Set f) (unit-trunc-Set b)))
- ( λ { (pair a p) →
- unit-trunc-Prop
- ( pair
- ( unit-trunc-Set a)
- ( naturality-unit-trunc-Set f a ∙ ap unit-trunc-Set p))}))
+ ( λ (a , p) →
+ unit-trunc-Prop
+ ( ( unit-trunc-Set a) ,
+ ( naturality-unit-trunc-Set f a ∙ ap unit-trunc-Set p))))
```
### If the set truncation of a map `f` is surjective, then `f` is surjective
@@ -216,16 +215,17 @@ module _
apply-universal-property-trunc-Prop
( H (unit-trunc-Set b))
( trunc-Prop (fiber f b))
- ( λ { (pair x p) →
- apply-universal-property-trunc-Prop
- ( is-surjective-unit-trunc-Set A x)
- ( trunc-Prop (fiber f b))
- ( λ { (pair a refl) →
- apply-universal-property-trunc-Prop
- ( apply-effectiveness-unit-trunc-Set
- ( inv (naturality-unit-trunc-Set f a) ∙ p))
- ( trunc-Prop (fiber f b))
- ( λ q → unit-trunc-Prop (pair a q))})})
+ ( λ (x , p) →
+ apply-universal-property-trunc-Prop
+ ( is-surjective-unit-trunc-Set A x)
+ ( trunc-Prop (fiber f b))
+ ( λ where
+ ( a , refl) →
+ apply-universal-property-trunc-Prop
+ ( apply-effectiveness-unit-trunc-Set
+ ( inv (naturality-unit-trunc-Set f a) ∙ p))
+ ( trunc-Prop (fiber f b))
+ ( λ q → unit-trunc-Prop (a , q))))
```
### Set truncation preserves the image of a map
@@ -248,7 +248,8 @@ module _
( is-injective-is-emb (is-emb-inclusion-im f)))
emb-trunc-im-Set : type-trunc-Set (im f) ↪ type-trunc-Set B
- emb-trunc-im-Set = pair inclusion-trunc-im-Set is-emb-inclusion-trunc-im-Set
+ pr1 emb-trunc-im-Set = inclusion-trunc-im-Set
+ pr2 emb-trunc-im-Set = is-emb-inclusion-trunc-im-Set
abstract
is-injective-inclusion-trunc-im-Set : is-injective inclusion-trunc-im-Set
@@ -265,8 +266,8 @@ module _
( preserves-comp-map-trunc-Set (inclusion-im f) (map-unit-im f))
hom-slice-trunc-im-Set : hom-slice (map-trunc-Set f) inclusion-trunc-im-Set
- hom-slice-trunc-im-Set =
- pair map-hom-slice-trunc-im-Set triangle-hom-slice-trunc-im-Set
+ pr1 hom-slice-trunc-im-Set = map-hom-slice-trunc-im-Set
+ pr2 hom-slice-trunc-im-Set = triangle-hom-slice-trunc-im-Set
abstract
is-surjective-map-hom-slice-trunc-im-Set :
@@ -361,17 +362,15 @@ module _
unit-im-map-trunc-Set :
im f → im (map-trunc-Set f)
- unit-im-map-trunc-Set x =
- pair
- ( unit-trunc-Set (pr1 x))
- ( apply-universal-property-trunc-Prop (pr2 x)
- ( trunc-Prop (fiber (map-trunc-Set f) (unit-trunc-Set (pr1 x))))
- ( λ u →
- unit-trunc-Prop
- ( pair
- ( unit-trunc-Set (pr1 u))
- ( naturality-unit-trunc-Set f (pr1 u) ∙
- ap unit-trunc-Set (pr2 u)))))
+ pr1 (unit-im-map-trunc-Set x) = unit-trunc-Set (pr1 x)
+ pr2 (unit-im-map-trunc-Set x) =
+ apply-universal-property-trunc-Prop (pr2 x)
+ ( trunc-Prop (fiber (map-trunc-Set f) (unit-trunc-Set (pr1 x))))
+ ( λ u →
+ unit-trunc-Prop
+ ( ( unit-trunc-Set (pr1 u)) ,
+ ( naturality-unit-trunc-Set f (pr1 u) ∙
+ ap unit-trunc-Set (pr2 u))))
left-square-unit-im-map-trunc-Set :
( map-unit-im (map-trunc-Set f) ∘ unit-trunc-Set) ~
diff --git a/src/foundation/identity-types.lagda.md b/src/foundation/identity-types.lagda.md
index ef44d6ca31..2d48de1898 100644
--- a/src/foundation/identity-types.lagda.md
+++ b/src/foundation/identity-types.lagda.md
@@ -97,14 +97,33 @@ module _
pr1 (equiv-concat p z) = concat p z
pr2 (equiv-concat p z) = is-equiv-concat p z
+ map-equiv-concat-equiv :
+ {x x' : A} → ((y : A) → (x = y) ≃ (x' = y)) → (x' = x)
+ map-equiv-concat-equiv {x} e = map-equiv (e x) refl
+
+ is-section-equiv-concat :
+ {x x' : A} → map-equiv-concat-equiv {x} {x'} ∘ equiv-concat ~ id
+ is-section-equiv-concat refl = refl
+
+ abstract
+ is-retraction-equiv-concat :
+ {x x' : A} → equiv-concat ∘ map-equiv-concat-equiv {x} {x'} ~ id
+ is-retraction-equiv-concat e =
+ eq-htpy (λ y → eq-htpy-equiv (λ where refl → right-unit))
+
+ abstract
+ is-equiv-map-equiv-concat-equiv :
+ {x x' : A} → is-equiv (map-equiv-concat-equiv {x} {x'})
+ is-equiv-map-equiv-concat-equiv =
+ is-equiv-is-invertible
+ ( equiv-concat)
+ ( is-section-equiv-concat)
+ ( is-retraction-equiv-concat)
+
equiv-concat-equiv :
{x x' : A} → ((y : A) → (x = y) ≃ (x' = y)) ≃ (x' = x)
- pr1 (equiv-concat-equiv {x}) e = map-equiv (e x) refl
- pr2 equiv-concat-equiv =
- is-equiv-is-invertible
- equiv-concat
- (λ { refl → refl})
- (λ e → eq-htpy (λ y → eq-htpy-equiv (λ { refl → right-unit})))
+ pr1 equiv-concat-equiv = map-equiv-concat-equiv
+ pr2 equiv-concat-equiv = is-equiv-map-equiv-concat-equiv
inv-concat' : (x : A) {y z : A} → y = z → x = z → x = y
inv-concat' x q = concat' x (inv q)
diff --git a/src/foundation/isolated-elements.lagda.md b/src/foundation/isolated-elements.lagda.md
new file mode 100644
index 0000000000..db5c06554f
--- /dev/null
+++ b/src/foundation/isolated-elements.lagda.md
@@ -0,0 +1,393 @@
+# Isolated elements
+
+```agda
+module foundation.isolated-elements where
+```
+
+Imports
+
+```agda
+open import foundation.action-on-identifications-functions
+open import foundation.constant-maps
+open import foundation.decidable-embeddings
+open import foundation.decidable-equality
+open import foundation.decidable-maps
+open import foundation.decidable-types
+open import foundation.dependent-pair-types
+open import foundation.embeddings
+open import foundation.fundamental-theorem-of-identity-types
+open import foundation.identity-types
+open import foundation.maybe
+open import foundation.negation
+open import foundation.type-arithmetic-unit-type
+open import foundation.unit-type
+open import foundation.universe-levels
+
+open import foundation-core.contractible-types
+open import foundation-core.coproduct-types
+open import foundation-core.decidable-propositions
+open import foundation-core.empty-types
+open import foundation-core.equivalences
+open import foundation-core.function-types
+open import foundation-core.functoriality-dependent-pair-types
+open import foundation-core.homotopies
+open import foundation-core.injective-maps
+open import foundation-core.propositions
+open import foundation-core.sets
+open import foundation-core.subtypes
+open import foundation-core.transport-along-identifications
+```
+
+
+
+## Idea
+
+An element `a : A` is considered to be **isolated** if `a = x` is
+[decidable](foundation.decidable-types.md) for any `x`.
+
+## Definitions
+
+### Isolated elements
+
+```agda
+is-isolated :
+ {l1 : Level} {X : UU l1} (a : X) → UU l1
+is-isolated {l1} {X} a = (x : X) → is-decidable (a = x)
+
+isolated-element :
+ {l1 : Level} (X : UU l1) → UU l1
+isolated-element X = Σ X is-isolated
+
+module _
+ {l : Level} {X : UU l} (x : isolated-element X)
+ where
+
+ element-isolated-element : X
+ element-isolated-element = pr1 x
+
+ is-isolated-isolated-element : is-isolated element-isolated-element
+ is-isolated-isolated-element = pr2 x
+```
+
+### Complements of isolated elements
+
+```agda
+complement-isolated-element :
+ {l1 : Level} (X : UU l1) → isolated-element X → UU l1
+complement-isolated-element X x =
+ Σ X (λ y → ¬ (element-isolated-element x = y))
+```
+
+## Properties
+
+### An element is isolated if and only if the constant map pointing at it is decidable
+
+```agda
+module _
+ {l1 : Level} {A : UU l1} (a : A)
+ where
+
+ is-decidable-point-is-isolated :
+ is-isolated a → is-decidable-map (point a)
+ is-decidable-point-is-isolated d x =
+ is-decidable-equiv (fiber-const a x) (d x)
+
+ is-isolated-is-decidable-point :
+ is-decidable-map (point a) → is-isolated a
+ is-isolated-is-decidable-point d x =
+ is-decidable-equiv' (fiber-const a x) (d x)
+
+ cases-Eq-isolated-element :
+ is-isolated a → (x : A) → is-decidable (a = x) → UU lzero
+ cases-Eq-isolated-element H x (inl p) = unit
+ cases-Eq-isolated-element H x (inr f) = empty
+
+ abstract
+ is-prop-cases-Eq-isolated-element :
+ (d : is-isolated a) (x : A) (dx : is-decidable (a = x)) →
+ is-prop (cases-Eq-isolated-element d x dx)
+ is-prop-cases-Eq-isolated-element d x (inl p) = is-prop-unit
+ is-prop-cases-Eq-isolated-element d x (inr f) = is-prop-empty
+
+ Eq-isolated-element : is-isolated a → A → UU lzero
+ Eq-isolated-element d x = cases-Eq-isolated-element d x (d x)
+
+ abstract
+ is-prop-Eq-isolated-element :
+ (d : is-isolated a) (x : A) → is-prop (Eq-isolated-element d x)
+ is-prop-Eq-isolated-element d x =
+ is-prop-cases-Eq-isolated-element d x (d x)
+
+ Eq-isolated-element-Prop : is-isolated a → A → Prop lzero
+ pr1 (Eq-isolated-element-Prop d x) = Eq-isolated-element d x
+ pr2 (Eq-isolated-element-Prop d x) = is-prop-Eq-isolated-element d x
+
+ decide-reflexivity :
+ (d : is-decidable (a = a)) → Σ (a = a) (λ p → inl p = d)
+ pr1 (decide-reflexivity (inl p)) = p
+ pr2 (decide-reflexivity (inl p)) = refl
+ decide-reflexivity (inr f) = ex-falso (f refl)
+
+ abstract
+ refl-Eq-isolated-element : (d : is-isolated a) → Eq-isolated-element d a
+ refl-Eq-isolated-element d =
+ tr
+ ( cases-Eq-isolated-element d a)
+ ( pr2 (decide-reflexivity (d a)))
+ ( star)
+
+ abstract
+ Eq-eq-isolated-element :
+ (d : is-isolated a) {x : A} → a = x → Eq-isolated-element d x
+ Eq-eq-isolated-element d refl = refl-Eq-isolated-element d
+
+ abstract
+ center-total-Eq-isolated-element :
+ (d : is-isolated a) → Σ A (Eq-isolated-element d)
+ pr1 (center-total-Eq-isolated-element d) = a
+ pr2 (center-total-Eq-isolated-element d) = refl-Eq-isolated-element d
+
+ cases-contraction-total-Eq-isolated-element :
+ (d : is-isolated a) (x : A) (dx : is-decidable (a = x))
+ (e : cases-Eq-isolated-element d x dx) → a = x
+ cases-contraction-total-Eq-isolated-element d x (inl p) e = p
+
+ contraction-total-Eq-isolated-element :
+ (d : is-isolated a) (t : Σ A (Eq-isolated-element d)) →
+ center-total-Eq-isolated-element d = t
+ contraction-total-Eq-isolated-element d (x , e) =
+ eq-type-subtype
+ ( Eq-isolated-element-Prop d)
+ ( cases-contraction-total-Eq-isolated-element d x (d x) e)
+
+ is-contr-total-Eq-isolated-element :
+ (d : is-isolated a) → is-contr (Σ A (Eq-isolated-element d))
+ pr1 (is-contr-total-Eq-isolated-element d) =
+ center-total-Eq-isolated-element d
+ pr2 (is-contr-total-Eq-isolated-element d) =
+ contraction-total-Eq-isolated-element d
+
+ abstract
+ is-equiv-Eq-eq-isolated-element :
+ (d : is-isolated a) (x : A) → is-equiv (Eq-eq-isolated-element d {x})
+ is-equiv-Eq-eq-isolated-element d =
+ fundamental-theorem-id
+ ( is-contr-total-Eq-isolated-element d)
+ ( λ x → Eq-eq-isolated-element d {x})
+
+ abstract
+ equiv-Eq-eq-isolated-element :
+ (d : is-isolated a) (x : A) → (a = x) ≃ Eq-isolated-element d x
+ pr1 (equiv-Eq-eq-isolated-element d x) = Eq-eq-isolated-element d
+ pr2 (equiv-Eq-eq-isolated-element d x) = is-equiv-Eq-eq-isolated-element d x
+
+ abstract
+ is-prop-eq-isolated-element : (d : is-isolated a) (x : A) → is-prop (a = x)
+ is-prop-eq-isolated-element d x =
+ is-prop-equiv
+ ( equiv-Eq-eq-isolated-element d x)
+ ( is-prop-Eq-isolated-element d x)
+
+ is-contr-loop-space-isolated-element :
+ (d : is-isolated a) → is-contr (a = a)
+ is-contr-loop-space-isolated-element d =
+ is-proof-irrelevant-is-prop (is-prop-eq-isolated-element d a) refl
+
+ abstract
+ is-emb-point-is-isolated : is-isolated a → is-emb (point a)
+ is-emb-point-is-isolated d star =
+ fundamental-theorem-id
+ ( is-contr-equiv
+ ( a = a)
+ ( left-unit-law-prod)
+ ( is-proof-irrelevant-is-prop
+ ( is-prop-eq-isolated-element d a)
+ ( refl)))
+ ( λ x → ap (λ y → a))
+```
+
+### Being an isolated element is a property
+
+```agda
+is-prop-is-isolated :
+ {l1 : Level} {A : UU l1} (a : A) → is-prop (is-isolated a)
+is-prop-is-isolated a =
+ is-prop-is-inhabited
+ ( λ H → is-prop-Π (is-prop-is-decidable ∘ is-prop-eq-isolated-element a H))
+
+is-isolated-Prop :
+ {l1 : Level} {A : UU l1} (a : A) → Prop l1
+pr1 (is-isolated-Prop a) = is-isolated a
+pr2 (is-isolated-Prop a) = is-prop-is-isolated a
+
+inclusion-isolated-element :
+ {l1 : Level} (A : UU l1) → isolated-element A → A
+inclusion-isolated-element A = pr1
+
+is-emb-inclusion-isolated-element :
+ {l1 : Level} (A : UU l1) → is-emb (inclusion-isolated-element A)
+is-emb-inclusion-isolated-element A = is-emb-inclusion-subtype is-isolated-Prop
+
+has-decidable-equality-isolated-element :
+ {l1 : Level} (A : UU l1) → has-decidable-equality (isolated-element A)
+has-decidable-equality-isolated-element A (x , dx) (y , dy) =
+ is-decidable-equiv
+ ( equiv-ap-inclusion-subtype is-isolated-Prop)
+ ( dx y)
+
+is-set-isolated-element :
+ {l1 : Level} (A : UU l1) → is-set (isolated-element A)
+is-set-isolated-element A =
+ is-set-has-decidable-equality (has-decidable-equality-isolated-element A)
+
+module _
+ {l1 : Level} {A : UU l1} (a : isolated-element A)
+ where
+
+ point-isolated-element : unit → A
+ point-isolated-element = point (element-isolated-element a)
+
+ is-emb-point-isolated-element : is-emb point-isolated-element
+ is-emb-point-isolated-element =
+ is-emb-comp
+ ( inclusion-isolated-element A)
+ ( const unit (isolated-element A) a)
+ ( is-emb-inclusion-isolated-element A)
+ ( is-emb-is-injective
+ ( is-set-isolated-element A)
+ ( λ {star} {star} p → refl))
+
+ emb-point-isolated-element : unit ↪ A
+ pr1 emb-point-isolated-element = point-isolated-element
+ pr2 emb-point-isolated-element = is-emb-point-isolated-element
+
+ is-decidable-point-isolated-element :
+ is-decidable-map point-isolated-element
+ is-decidable-point-isolated-element x =
+ is-decidable-prod is-decidable-unit (is-isolated-isolated-element a x)
+
+ is-decidable-emb-point-isolated-element :
+ is-decidable-emb point-isolated-element
+ pr1 is-decidable-emb-point-isolated-element =
+ is-emb-point-isolated-element
+ pr2 is-decidable-emb-point-isolated-element =
+ is-decidable-point-isolated-element
+
+ decidable-emb-point-isolated-element : unit ↪ᵈ A
+ pr1 decidable-emb-point-isolated-element =
+ point-isolated-element
+ pr2 decidable-emb-point-isolated-element =
+ is-decidable-emb-point-isolated-element
+```
+
+### Types with isolated elements can be equipped with a Maybe-structure
+
+```agda
+map-maybe-structure-isolated-element :
+ {l1 : Level} (X : UU l1) (x : isolated-element X) →
+ Maybe (complement-isolated-element X x) → X
+map-maybe-structure-isolated-element X (x , d) (inl (y , f)) = y
+map-maybe-structure-isolated-element X (x , d) (inr star) = x
+
+cases-map-inv-maybe-structure-isolated-element :
+ {l1 : Level} (X : UU l1) (x : isolated-element X) →
+ (y : X) → is-decidable (pr1 x = y) → Maybe (complement-isolated-element X x)
+cases-map-inv-maybe-structure-isolated-element X (x , dx) y (inl p) =
+ inr star
+cases-map-inv-maybe-structure-isolated-element X (x , dx) y (inr f) =
+ inl (y , f)
+
+map-inv-maybe-structure-isolated-element :
+ {l1 : Level} (X : UU l1) (x : isolated-element X) →
+ X → Maybe (complement-isolated-element X x)
+map-inv-maybe-structure-isolated-element X (x , d) y =
+ cases-map-inv-maybe-structure-isolated-element X (x , d) y (d y)
+
+cases-is-section-map-inv-maybe-structure-isolated-element :
+ {l1 : Level} (X : UU l1) (x : isolated-element X) →
+ (y : X) (d : is-decidable (pr1 x = y)) →
+ ( map-maybe-structure-isolated-element X x
+ ( cases-map-inv-maybe-structure-isolated-element X x y d)) =
+ ( y)
+cases-is-section-map-inv-maybe-structure-isolated-element X
+ (x , dx) .x (inl refl) =
+ refl
+cases-is-section-map-inv-maybe-structure-isolated-element X (x , dx) y (inr f) =
+ refl
+
+is-section-map-inv-maybe-structure-isolated-element :
+ {l1 : Level} (X : UU l1) (x : isolated-element X) →
+ ( map-maybe-structure-isolated-element X x ∘
+ map-inv-maybe-structure-isolated-element X x) ~ id
+is-section-map-inv-maybe-structure-isolated-element X (x , d) y =
+ cases-is-section-map-inv-maybe-structure-isolated-element X (x , d) y (d y)
+
+is-retraction-map-inv-maybe-structure-isolated-element :
+ {l1 : Level} (X : UU l1) (x : isolated-element X) →
+ ( map-inv-maybe-structure-isolated-element X x ∘
+ map-maybe-structure-isolated-element X x) ~ id
+is-retraction-map-inv-maybe-structure-isolated-element
+ X (x , dx) (inl (y , f)) =
+ ap
+ ( cases-map-inv-maybe-structure-isolated-element X (x , dx) y)
+ ( eq-is-prop (is-prop-is-decidable (is-prop-eq-isolated-element x dx y)))
+is-retraction-map-inv-maybe-structure-isolated-element X (x , dx) (inr star) =
+ ap
+ ( cases-map-inv-maybe-structure-isolated-element X (x , dx) x)
+ { x = dx (map-maybe-structure-isolated-element X (x , dx) (inr star))}
+ { y = inl refl}
+ ( eq-is-prop (is-prop-is-decidable (is-prop-eq-isolated-element x dx x)))
+
+is-equiv-map-maybe-structure-isolated-element :
+ {l1 : Level} (X : UU l1) (x : isolated-element X) →
+ is-equiv (map-maybe-structure-isolated-element X x)
+is-equiv-map-maybe-structure-isolated-element X x =
+ is-equiv-is-invertible
+ ( map-inv-maybe-structure-isolated-element X x)
+ ( is-section-map-inv-maybe-structure-isolated-element X x)
+ ( is-retraction-map-inv-maybe-structure-isolated-element X x)
+
+equiv-maybe-structure-isolated-element :
+ {l1 : Level} (X : UU l1) (x : isolated-element X) →
+ Maybe (complement-isolated-element X x) ≃ X
+pr1 (equiv-maybe-structure-isolated-element X x) =
+ map-maybe-structure-isolated-element X x
+pr2 (equiv-maybe-structure-isolated-element X x) =
+ is-equiv-map-maybe-structure-isolated-element X x
+
+maybe-structure-isolated-element :
+ {l1 : Level} {X : UU l1} → isolated-element X → maybe-structure X
+pr1 (maybe-structure-isolated-element {l1} {X} x) =
+ complement-isolated-element X x
+pr2 (maybe-structure-isolated-element {l1} {X} x) =
+ equiv-maybe-structure-isolated-element X x
+```
+
+```agda
+equiv-complement-isolated-element :
+ {l1 l2 : Level} {X : UU l1} {Y : UU l2} (e : X ≃ Y) (x : isolated-element X)
+ (y : isolated-element Y) (p : map-equiv e (pr1 x) = pr1 y) →
+ complement-isolated-element X x ≃ complement-isolated-element Y y
+equiv-complement-isolated-element e x y p =
+ equiv-Σ
+ ( λ z → ¬ (pr1 y = z))
+ ( e)
+ ( λ z →
+ equiv-neg
+ ( equiv-concat (inv p) (map-equiv e z) ∘e (equiv-ap e (pr1 x) z)))
+```
+
+```agda
+inclusion-complement-isolated-element :
+ {l1 : Level} {X : UU l1} (x : isolated-element X) →
+ complement-isolated-element X x → X
+inclusion-complement-isolated-element x = pr1
+
+natural-inclusion-equiv-complement-isolated-element :
+ {l1 l2 : Level} {X : UU l1} {Y : UU l2} (e : X ≃ Y) (x : isolated-element X)
+ (y : isolated-element Y) (p : map-equiv e (pr1 x) = pr1 y) →
+ ( inclusion-complement-isolated-element y ∘
+ map-equiv (equiv-complement-isolated-element e x y p)) ~
+ ( map-equiv e ∘ inclusion-complement-isolated-element x)
+natural-inclusion-equiv-complement-isolated-element e x y p (x' , f) = refl
+```
diff --git a/src/foundation/isolated-points.lagda.md b/src/foundation/isolated-points.lagda.md
deleted file mode 100644
index 1ee694deca..0000000000
--- a/src/foundation/isolated-points.lagda.md
+++ /dev/null
@@ -1,368 +0,0 @@
-# Isolated points
-
-```agda
-module foundation.isolated-points where
-```
-
-Imports
-
-```agda
-open import foundation.action-on-identifications-functions
-open import foundation.constant-maps
-open import foundation.decidable-embeddings
-open import foundation.decidable-equality
-open import foundation.decidable-maps
-open import foundation.decidable-types
-open import foundation.dependent-pair-types
-open import foundation.embeddings
-open import foundation.fundamental-theorem-of-identity-types
-open import foundation.identity-types
-open import foundation.maybe
-open import foundation.negation
-open import foundation.type-arithmetic-unit-type
-open import foundation.unit-type
-open import foundation.universe-levels
-
-open import foundation-core.contractible-types
-open import foundation-core.coproduct-types
-open import foundation-core.decidable-propositions
-open import foundation-core.empty-types
-open import foundation-core.equivalences
-open import foundation-core.function-types
-open import foundation-core.functoriality-dependent-pair-types
-open import foundation-core.homotopies
-open import foundation-core.injective-maps
-open import foundation-core.propositions
-open import foundation-core.sets
-open import foundation-core.subtypes
-open import foundation-core.transport-along-identifications
-```
-
-
-
-## Idea
-
-A point `a : A` is considered to be isolated if `Id a x` is decidable for any
-`x`.
-
-## Definitions
-
-### Isolated points
-
-```agda
-is-isolated :
- {l1 : Level} {X : UU l1} (a : X) → UU l1
-is-isolated {l1} {X} a = (x : X) → is-decidable (a = x)
-
-isolated-point :
- {l1 : Level} (X : UU l1) → UU l1
-isolated-point X = Σ X is-isolated
-
-module _
- {l : Level} {X : UU l} (x : isolated-point X)
- where
-
- point-isolated-point : X
- point-isolated-point = pr1 x
-
- is-isolated-isolated-point : is-isolated point-isolated-point
- is-isolated-isolated-point = pr2 x
-```
-
-### Complements of isolated points
-
-```agda
-complement-isolated-point :
- {l1 : Level} (X : UU l1) → isolated-point X → UU l1
-complement-isolated-point X x =
- Σ X (λ y → ¬ (point-isolated-point x = y))
-```
-
-## Properties
-
-### A point is decidable if and only if the constant map pointing at it is decidable
-
-```agda
-module _
- {l1 : Level} {A : UU l1} (a : A)
- where
-
- is-decidable-map-const-is-isolated :
- is-isolated a → is-decidable-map (const unit A a)
- is-decidable-map-const-is-isolated d x =
- is-decidable-equiv (fiber-const a x) (d x)
-
- is-isolated-is-decidable-map-const :
- is-decidable-map (const unit A a) → is-isolated a
- is-isolated-is-decidable-map-const d x =
- is-decidable-equiv' (fiber-const a x) (d x)
-
- cases-Eq-isolated-point :
- is-isolated a → (x : A) → is-decidable (a = x) → UU lzero
- cases-Eq-isolated-point H x (inl p) = unit
- cases-Eq-isolated-point H x (inr f) = empty
-
- abstract
- is-prop-cases-Eq-isolated-point :
- (d : is-isolated a) (x : A) (dx : is-decidable (a = x)) →
- is-prop (cases-Eq-isolated-point d x dx)
- is-prop-cases-Eq-isolated-point d x (inl p) = is-prop-unit
- is-prop-cases-Eq-isolated-point d x (inr f) = is-prop-empty
-
- Eq-isolated-point : is-isolated a → A → UU lzero
- Eq-isolated-point d x = cases-Eq-isolated-point d x (d x)
-
- abstract
- is-prop-Eq-isolated-point :
- (d : is-isolated a) (x : A) → is-prop (Eq-isolated-point d x)
- is-prop-Eq-isolated-point d x =
- is-prop-cases-Eq-isolated-point d x (d x)
-
- Eq-isolated-point-Prop : is-isolated a → A → Prop lzero
- pr1 (Eq-isolated-point-Prop d x) = Eq-isolated-point d x
- pr2 (Eq-isolated-point-Prop d x) = is-prop-Eq-isolated-point d x
-
- decide-reflexivity :
- (d : is-decidable (a = a)) → Σ (a = a) (λ p → inl p = d)
- pr1 (decide-reflexivity (inl p)) = p
- pr2 (decide-reflexivity (inl p)) = refl
- decide-reflexivity (inr f) = ex-falso (f refl)
-
- abstract
- refl-Eq-isolated-point : (d : is-isolated a) → Eq-isolated-point d a
- refl-Eq-isolated-point d =
- tr
- ( cases-Eq-isolated-point d a)
- ( pr2 (decide-reflexivity (d a)))
- ( star)
-
- abstract
- Eq-eq-isolated-point :
- (d : is-isolated a) {x : A} → a = x → Eq-isolated-point d x
- Eq-eq-isolated-point d refl = refl-Eq-isolated-point d
-
- abstract
- center-total-Eq-isolated-point :
- (d : is-isolated a) → Σ A (Eq-isolated-point d)
- pr1 (center-total-Eq-isolated-point d) = a
- pr2 (center-total-Eq-isolated-point d) = refl-Eq-isolated-point d
-
- cases-contraction-total-Eq-isolated-point :
- (d : is-isolated a) (x : A) (dx : is-decidable (a = x))
- (e : cases-Eq-isolated-point d x dx) → a = x
- cases-contraction-total-Eq-isolated-point d x (inl p) e = p
-
- contraction-total-Eq-isolated-point :
- (d : is-isolated a) (t : Σ A (Eq-isolated-point d)) →
- center-total-Eq-isolated-point d = t
- contraction-total-Eq-isolated-point d (x , e) =
- eq-type-subtype
- ( Eq-isolated-point-Prop d)
- ( cases-contraction-total-Eq-isolated-point d x (d x) e)
-
- is-contr-total-Eq-isolated-point :
- (d : is-isolated a) → is-contr (Σ A (Eq-isolated-point d))
- pr1 (is-contr-total-Eq-isolated-point d) = center-total-Eq-isolated-point d
- pr2 (is-contr-total-Eq-isolated-point d) =
- contraction-total-Eq-isolated-point d
-
- abstract
- is-equiv-Eq-eq-isolated-point :
- (d : is-isolated a) (x : A) → is-equiv (Eq-eq-isolated-point d {x})
- is-equiv-Eq-eq-isolated-point d =
- fundamental-theorem-id
- ( is-contr-total-Eq-isolated-point d)
- ( λ x → Eq-eq-isolated-point d {x})
-
- abstract
- equiv-Eq-eq-isolated-point :
- (d : is-isolated a) (x : A) → (a = x) ≃ Eq-isolated-point d x
- pr1 (equiv-Eq-eq-isolated-point d x) = Eq-eq-isolated-point d
- pr2 (equiv-Eq-eq-isolated-point d x) = is-equiv-Eq-eq-isolated-point d x
-
- abstract
- is-prop-eq-isolated-point : (d : is-isolated a) (x : A) → is-prop (a = x)
- is-prop-eq-isolated-point d x =
- is-prop-equiv
- ( equiv-Eq-eq-isolated-point d x)
- ( is-prop-Eq-isolated-point d x)
-
- is-contr-loop-space-isolated-point :
- (d : is-isolated a) → is-contr (a = a)
- is-contr-loop-space-isolated-point d =
- is-proof-irrelevant-is-prop (is-prop-eq-isolated-point d a) refl
-
- abstract
- is-emb-const-is-isolated : is-isolated a → is-emb (const unit A a)
- is-emb-const-is-isolated d star =
- fundamental-theorem-id
- ( is-contr-equiv
- ( a = a)
- ( left-unit-law-prod)
- ( is-proof-irrelevant-is-prop
- ( is-prop-eq-isolated-point d a)
- ( refl)))
- ( λ x → ap (λ y → a))
-```
-
-### Being an isolated point is a property
-
-```agda
-is-prop-is-isolated :
- {l1 : Level} {A : UU l1} (a : A) → is-prop (is-isolated a)
-is-prop-is-isolated a =
- is-prop-is-inhabited
- ( λ H →
- is-prop-Π (λ x → is-prop-is-decidable (is-prop-eq-isolated-point a H x)))
-
-is-isolated-Prop :
- {l1 : Level} {A : UU l1} (a : A) → Prop l1
-pr1 (is-isolated-Prop a) = is-isolated a
-pr2 (is-isolated-Prop a) = is-prop-is-isolated a
-
-inclusion-isolated-point :
- {l1 : Level} (A : UU l1) → isolated-point A → A
-inclusion-isolated-point A = pr1
-
-is-emb-inclusion-isolated-point :
- {l1 : Level} (A : UU l1) → is-emb (inclusion-isolated-point A)
-is-emb-inclusion-isolated-point A = is-emb-inclusion-subtype is-isolated-Prop
-
-has-decidable-equality-isolated-point :
- {l1 : Level} (A : UU l1) → has-decidable-equality (isolated-point A)
-has-decidable-equality-isolated-point A (x , dx) (y , dy) =
- is-decidable-equiv
- ( equiv-ap-inclusion-subtype is-isolated-Prop)
- ( dx y)
-
-is-set-isolated-point :
- {l1 : Level} (A : UU l1) → is-set (isolated-point A)
-is-set-isolated-point A =
- is-set-has-decidable-equality (has-decidable-equality-isolated-point A)
-
-decidable-emb-isolated-point :
- {l1 : Level} {A : UU l1} (a : isolated-point A) → unit ↪ᵈ A
-pr1 (decidable-emb-isolated-point {l1} {A} a) =
- const unit A (pr1 a)
-pr1 (pr2 (decidable-emb-isolated-point {l1} {A} a)) =
- is-emb-comp
- ( inclusion-isolated-point A)
- ( const unit (isolated-point A) a)
- ( is-emb-inclusion-isolated-point A)
- ( is-emb-is-injective
- ( is-set-isolated-point A)
- ( λ { {star} {star} p → refl}))
-pr2 (pr2 (decidable-emb-isolated-point {l1} {A} a)) x =
- is-decidable-prod is-decidable-unit (pr2 a x)
-```
-
-### Types with isolated points can be equipped with a Maybe-structure
-
-```agda
-map-maybe-structure-isolated-point :
- {l1 : Level} (X : UU l1) (x : isolated-point X) →
- Maybe (complement-isolated-point X x) → X
-map-maybe-structure-isolated-point X (x , d) (inl (y , f)) = y
-map-maybe-structure-isolated-point X (x , d) (inr star) = x
-
-cases-map-inv-maybe-structure-isolated-point :
- {l1 : Level} (X : UU l1) (x : isolated-point X) →
- (y : X) → is-decidable (pr1 x = y) → Maybe (complement-isolated-point X x)
-cases-map-inv-maybe-structure-isolated-point X (x , dx) y (inl p) =
- inr star
-cases-map-inv-maybe-structure-isolated-point X (x , dx) y (inr f) =
- inl (y , f)
-
-map-inv-maybe-structure-isolated-point :
- {l1 : Level} (X : UU l1) (x : isolated-point X) →
- X → Maybe (complement-isolated-point X x)
-map-inv-maybe-structure-isolated-point X (x , d) y =
- cases-map-inv-maybe-structure-isolated-point X (x , d) y (d y)
-
-cases-is-section-map-inv-maybe-structure-isolated-point :
- {l1 : Level} (X : UU l1) (x : isolated-point X) →
- (y : X) (d : is-decidable (pr1 x = y)) →
- ( map-maybe-structure-isolated-point X x
- ( cases-map-inv-maybe-structure-isolated-point X x y d)) =
- ( y)
-cases-is-section-map-inv-maybe-structure-isolated-point X
- (x , dx) .x (inl refl) =
- refl
-cases-is-section-map-inv-maybe-structure-isolated-point X (x , dx) y (inr f) =
- refl
-
-is-section-map-inv-maybe-structure-isolated-point :
- {l1 : Level} (X : UU l1) (x : isolated-point X) →
- ( map-maybe-structure-isolated-point X x ∘
- map-inv-maybe-structure-isolated-point X x) ~ id
-is-section-map-inv-maybe-structure-isolated-point X (x , d) y =
- cases-is-section-map-inv-maybe-structure-isolated-point X (x , d) y (d y)
-
-is-retraction-map-inv-maybe-structure-isolated-point :
- {l1 : Level} (X : UU l1) (x : isolated-point X) →
- ( map-inv-maybe-structure-isolated-point X x ∘
- map-maybe-structure-isolated-point X x) ~ id
-is-retraction-map-inv-maybe-structure-isolated-point X (x , dx) (inl (y , f)) =
- ap
- ( cases-map-inv-maybe-structure-isolated-point X (x , dx) y)
- ( eq-is-prop (is-prop-is-decidable (is-prop-eq-isolated-point x dx y)))
-is-retraction-map-inv-maybe-structure-isolated-point X (x , dx) (inr star) =
- ap
- ( cases-map-inv-maybe-structure-isolated-point X (x , dx) x)
- { x = dx (map-maybe-structure-isolated-point X (x , dx) (inr star))}
- { y = inl refl}
- ( eq-is-prop (is-prop-is-decidable (is-prop-eq-isolated-point x dx x)))
-
-is-equiv-map-maybe-structure-isolated-point :
- {l1 : Level} (X : UU l1) (x : isolated-point X) →
- is-equiv (map-maybe-structure-isolated-point X x)
-is-equiv-map-maybe-structure-isolated-point X x =
- is-equiv-is-invertible
- ( map-inv-maybe-structure-isolated-point X x)
- ( is-section-map-inv-maybe-structure-isolated-point X x)
- ( is-retraction-map-inv-maybe-structure-isolated-point X x)
-
-equiv-maybe-structure-isolated-point :
- {l1 : Level} (X : UU l1) (x : isolated-point X) →
- Maybe (complement-isolated-point X x) ≃ X
-pr1 (equiv-maybe-structure-isolated-point X x) =
- map-maybe-structure-isolated-point X x
-pr2 (equiv-maybe-structure-isolated-point X x) =
- is-equiv-map-maybe-structure-isolated-point X x
-
-maybe-structure-isolated-point :
- {l1 : Level} {X : UU l1} → isolated-point X → maybe-structure X
-pr1 (maybe-structure-isolated-point {l1} {X} x) =
- complement-isolated-point X x
-pr2 (maybe-structure-isolated-point {l1} {X} x) =
- equiv-maybe-structure-isolated-point X x
-```
-
-```agda
-equiv-complement-isolated-point :
- {l1 l2 : Level} {X : UU l1} {Y : UU l2} (e : X ≃ Y) (x : isolated-point X)
- (y : isolated-point Y) (p : map-equiv e (pr1 x) = pr1 y) →
- complement-isolated-point X x ≃ complement-isolated-point Y y
-equiv-complement-isolated-point e x y p =
- equiv-Σ
- ( λ z → ¬ (pr1 y = z))
- ( e)
- ( λ z →
- equiv-neg
- ( equiv-concat (inv p) (map-equiv e z) ∘e (equiv-ap e (pr1 x) z)))
-```
-
-```agda
-inclusion-complement-isolated-point :
- {l1 : Level} {X : UU l1} (x : isolated-point X) →
- complement-isolated-point X x → X
-inclusion-complement-isolated-point x = pr1
-
-natural-inclusion-equiv-complement-isolated-point :
- {l1 l2 : Level} {X : UU l1} {Y : UU l2} (e : X ≃ Y) (x : isolated-point X)
- (y : isolated-point Y) (p : map-equiv e (pr1 x) = pr1 y) →
- ( inclusion-complement-isolated-point y ∘
- map-equiv (equiv-complement-isolated-point e x y p)) ~
- ( map-equiv e ∘ inclusion-complement-isolated-point x)
-natural-inclusion-equiv-complement-isolated-point e x y p (x' , f) = refl
-```
diff --git a/src/foundation/pointed-torsorial-type-families.lagda.md b/src/foundation/pointed-torsorial-type-families.lagda.md
index 2df25c9047..bbaf1dd88e 100644
--- a/src/foundation/pointed-torsorial-type-families.lagda.md
+++ b/src/foundation/pointed-torsorial-type-families.lagda.md
@@ -135,14 +135,15 @@ module _
(T : is-pointed-torsorial-family-of-types B E)
where
- is-locally-small-is-pointed-torsorial-family-of-types :
- is-0-connected (type-Pointed-Type B) →
- is-locally-small l2 (type-Pointed-Type B)
- is-locally-small-is-pointed-torsorial-family-of-types H x y =
- apply-universal-property-trunc-Prop
- ( mere-eq-is-0-connected H (point-Pointed-Type B) x)
- ( is-small-Prop l2 (x = y))
- ( λ { refl → (E y , inv-equiv (T y))})
+ abstract
+ is-locally-small-is-pointed-torsorial-family-of-types :
+ is-0-connected (type-Pointed-Type B) →
+ is-locally-small l2 (type-Pointed-Type B)
+ is-locally-small-is-pointed-torsorial-family-of-types H x y =
+ apply-universal-property-trunc-Prop
+ ( mere-eq-is-0-connected H (point-Pointed-Type B) x)
+ ( is-small-Prop l2 (x = y))
+ ( λ where refl → (E y , inv-equiv (T y)))
```
### The type of pointed torsorial type families of universe level `l` over a pointed connected type is equivalent to the proposition that `B` is locally `l`-small
diff --git a/src/foundation/products-unordered-tuples-of-types.lagda.md b/src/foundation/products-unordered-tuples-of-types.lagda.md
index 9fb480d64f..b0be1de823 100644
--- a/src/foundation/products-unordered-tuples-of-types.lagda.md
+++ b/src/foundation/products-unordered-tuples-of-types.lagda.md
@@ -19,7 +19,7 @@ open import foundation.unordered-tuples-of-types
open import foundation-core.cartesian-product-types
open import foundation-core.equivalences
-open import univalent-combinatorics.complements-isolated-points
+open import univalent-combinatorics.complements-isolated-elements
```
@@ -53,14 +53,14 @@ equiv-pr-product-unordered-tuple-types :
equiv-pr-product-unordered-tuple-types n A i =
( equiv-Π
( element-unordered-tuple (succ-ℕ n) A)
- ( equiv-maybe-structure-point-UU-Fin n
+ ( equiv-maybe-structure-element-UU-Fin n
( type-unordered-tuple-UU-Fin (succ-ℕ n) A) i)
( λ x → id-equiv)) ∘e
( inv-equiv
( equiv-dependent-universal-property-Maybe
( λ j →
element-unordered-tuple (succ-ℕ n) A
- ( map-equiv (equiv-maybe-structure-point-UU-Fin n
+ ( map-equiv (equiv-maybe-structure-element-UU-Fin n
( type-unordered-tuple-UU-Fin (succ-ℕ n) A) i)
( j)))))
diff --git a/src/foundation/regensburg-extension-fundamental-theorem-of-identity-types.lagda.md b/src/foundation/regensburg-extension-fundamental-theorem-of-identity-types.lagda.md
index 5bef830d57..3e8347a4c7 100644
--- a/src/foundation/regensburg-extension-fundamental-theorem-of-identity-types.lagda.md
+++ b/src/foundation/regensburg-extension-fundamental-theorem-of-identity-types.lagda.md
@@ -94,13 +94,14 @@ module _
apply-universal-property-trunc-Prop
( mere-eq-is-0-connected H a x)
( P _)
- ( λ { refl →
- is-in-subuniverse-equiv P
- ( compute-fiber-map-out-of-identity-type
- ( ind-Id a (λ u v → B u) y)
- ( x')
- ( y'))
- ( K (ind-Id a (λ u v → B u) y) x' y')})
+ ( λ where
+ refl →
+ is-in-subuniverse-equiv P
+ ( compute-fiber-map-out-of-identity-type
+ ( ind-Id a (λ u v → B u) y)
+ ( x')
+ ( y'))
+ ( K (ind-Id a (λ u v → B u) y) x' y'))
abstract
backward-implication-extended-fundamental-theorem-id :
diff --git a/src/foundation/russells-paradox.lagda.md b/src/foundation/russells-paradox.lagda.md
index 2a24d52393..3317c299f2 100644
--- a/src/foundation/russells-paradox.lagda.md
+++ b/src/foundation/russells-paradox.lagda.md
@@ -100,7 +100,6 @@ paradox-Russell {l} H =
no-fixed-points-neg
( R ∈-𝕍 R)
( pair (map-equiv β) (map-inv-equiv β))
-
where
K : is-small-universe l l
diff --git a/src/foundation/surjective-maps.lagda.md b/src/foundation/surjective-maps.lagda.md
index b9fdc14f7a..ec46eebd71 100644
--- a/src/foundation/surjective-maps.lagda.md
+++ b/src/foundation/surjective-maps.lagda.md
@@ -415,12 +415,12 @@ module _
apply-universal-property-trunc-Prop
( is-surj-g x)
( trunc-Prop (fiber f x))
- ( λ { (b , refl) →
- apply-universal-property-trunc-Prop
- ( is-surj-h b)
- ( trunc-Prop (fiber f (g b)))
- ( λ { (a , refl) →
- unit-trunc-Prop (a , H a)})})
+ ( λ where
+ ( b , refl) →
+ apply-universal-property-trunc-Prop
+ ( is-surj-h b)
+ ( trunc-Prop (fiber f (g b)))
+ ( λ where (a , refl) → unit-trunc-Prop (a , H a)))
is-surjective-comp :
{g : B → X} {h : A → B} →
@@ -483,8 +483,7 @@ module _
apply-universal-property-trunc-Prop
( is-surj-f x)
( trunc-Prop (fiber g x))
- ( λ { (a , refl) →
- unit-trunc-Prop (h a , inv (H a))})
+ ( λ where (a , refl) → unit-trunc-Prop (h a , inv (H a)))
is-surjective-left-factor :
{g : B → X} (h : A → B) → is-surjective (g ∘ h) → is-surjective g
diff --git a/src/foundation/symmetric-identity-types.lagda.md b/src/foundation/symmetric-identity-types.lagda.md
index 13f4b12391..94d4b91dd4 100644
--- a/src/foundation/symmetric-identity-types.lagda.md
+++ b/src/foundation/symmetric-identity-types.lagda.md
@@ -109,16 +109,18 @@ module _
( map-compute-symmetric-Id ∘ map-inv-compute-symmetric-Id) ~ id
is-section-map-inv-compute-symmetric-Id refl = refl
- is-retraction-map-inv-compute-symmetric-Id :
- ( map-inv-compute-symmetric-Id ∘ map-compute-symmetric-Id) ~ id
- is-retraction-map-inv-compute-symmetric-Id (x , f) =
- eq-Eq-symmetric-Id
- ( standard-unordered-pair a b)
- ( map-inv-compute-symmetric-Id (map-compute-symmetric-Id (x , f)))
- ( x , f)
- ( ( inv (f (zero-Fin 1))) ,
- ( λ { ( inl (inr star)) → inv (left-inv (f (zero-Fin 1))) ;
- ( inr star) → refl}))
+ abstract
+ is-retraction-map-inv-compute-symmetric-Id :
+ ( map-inv-compute-symmetric-Id ∘ map-compute-symmetric-Id) ~ id
+ is-retraction-map-inv-compute-symmetric-Id (x , f) =
+ eq-Eq-symmetric-Id
+ ( standard-unordered-pair a b)
+ ( map-inv-compute-symmetric-Id (map-compute-symmetric-Id (x , f)))
+ ( x , f)
+ ( ( inv (f (zero-Fin 1))) ,
+ ( λ where
+ ( inl (inr star)) → inv (left-inv (f (zero-Fin 1)))
+ ( inr star) → refl))
is-equiv-map-compute-symmetric-Id :
is-equiv (map-compute-symmetric-Id)
diff --git a/src/foundation/symmetric-operations.lagda.md b/src/foundation/symmetric-operations.lagda.md
index 804aa8eaa0..78211eaa74 100644
--- a/src/foundation/symmetric-operations.lagda.md
+++ b/src/foundation/symmetric-operations.lagda.md
@@ -195,20 +195,21 @@ module _
pr1 center-total-htpy-symmetric-operation-Set = f
pr2 center-total-htpy-symmetric-operation-Set x y = refl
- contraction-total-htpy-symmetric-operation-Set :
- ( t :
- Σ ( symmetric-operation A (type-Set B))
- ( htpy-symmetric-operation-Set)) →
- center-total-htpy-symmetric-operation-Set = t
- contraction-total-htpy-symmetric-operation-Set (g , H) =
- eq-type-subtype
- htpy-symmetric-operation-Set-Prop
- ( eq-htpy
- ( λ p →
- apply-universal-property-trunc-Prop
- ( is-surjective-standard-unordered-pair p)
- ( Id-Prop B (f p) (g p))
- ( λ { (x , y , refl) → H x y})))
+ abstract
+ contraction-total-htpy-symmetric-operation-Set :
+ ( t :
+ Σ ( symmetric-operation A (type-Set B))
+ ( htpy-symmetric-operation-Set)) →
+ center-total-htpy-symmetric-operation-Set = t
+ contraction-total-htpy-symmetric-operation-Set (g , H) =
+ eq-type-subtype
+ htpy-symmetric-operation-Set-Prop
+ ( eq-htpy
+ ( λ p →
+ apply-universal-property-trunc-Prop
+ ( is-surjective-standard-unordered-pair p)
+ ( Id-Prop B (f p) (g p))
+ ( λ where (x , y , refl) → H x y)))
is-contr-total-htpy-symmetric-operation-Set :
is-contr
diff --git a/src/foundation/type-arithmetic-unit-type.lagda.md b/src/foundation/type-arithmetic-unit-type.lagda.md
index a83bf154ad..767358fec4 100644
--- a/src/foundation/type-arithmetic-unit-type.lagda.md
+++ b/src/foundation/type-arithmetic-unit-type.lagda.md
@@ -166,7 +166,7 @@ module _
is-retraction-map-inv-left-unit-law-Π :
( map-inv-left-unit-law-Π ∘ map-left-unit-law-Π) ~ id
- is-retraction-map-inv-left-unit-law-Π f = eq-htpy (λ { star → refl})
+ is-retraction-map-inv-left-unit-law-Π f = eq-htpy (λ star → refl)
is-equiv-map-left-unit-law-Π : is-equiv map-left-unit-law-Π
is-equiv-map-left-unit-law-Π =
diff --git a/src/foundation/uniqueness-image.lagda.md b/src/foundation/uniqueness-image.lagda.md
index 9d9a1547f7..935e6f27e2 100644
--- a/src/foundation/uniqueness-image.lagda.md
+++ b/src/foundation/uniqueness-image.lagda.md
@@ -122,7 +122,7 @@ module _
( comp-hom-slice f (map-emb i) (map-emb i') (pr1 h) q)
( q'))
( equiv-right-swap-Σ)
- ( λ { (pair (pair e E) H) → id-equiv})))
+ ( λ ((e , E) , H) → id-equiv)))
( is-contr-equiv
( is-equiv
( map-hom-slice-universal-property-image f i q Hi i' q'))
diff --git a/src/foundation/universal-property-image.lagda.md b/src/foundation/universal-property-image.lagda.md
index 9670cd212b..b76f1e211b 100644
--- a/src/foundation/universal-property-image.lagda.md
+++ b/src/foundation/universal-property-image.lagda.md
@@ -200,7 +200,7 @@ module _
{l : Level} (B : subtype l X) →
((a : A) → is-in-subtype B (f a)) → subtype-im f ⊆ B
backward-implication-is-image-subtype-subtype-im B H x K =
- apply-universal-property-trunc-Prop K (B x) (λ {(a , refl) → H a})
+ apply-universal-property-trunc-Prop K (B x) (λ where (a , refl) → H a)
is-image-subtype-subtype-im : is-image-subtype f (subtype-im f)
pr1 (is-image-subtype-subtype-im B) =
diff --git a/src/foundation/unordered-pairs.lagda.md b/src/foundation/unordered-pairs.lagda.md
index 1a5794fd7d..96db918c7c 100644
--- a/src/foundation/unordered-pairs.lagda.md
+++ b/src/foundation/unordered-pairs.lagda.md
@@ -522,24 +522,27 @@ unordered-distinct-pair A =
### Every unordered pair is merely equal to a standard unordered pair
```agda
-is-surjective-standard-unordered-pair :
- {l : Level} {A : UU l} (p : unordered-pair A) →
- type-trunc-Prop
- ( Σ A (λ x → Σ A (λ y → standard-unordered-pair x y = p)))
-is-surjective-standard-unordered-pair (I , a) =
- apply-universal-property-trunc-Prop
- ( has-two-elements-type-2-Element-Type I)
- ( trunc-Prop
- ( Σ _ (λ x → Σ _ (λ y → standard-unordered-pair x y = (I , a)))))
- ( λ e →
- unit-trunc-Prop
- ( a (map-equiv e (zero-Fin 1)) ,
- a (map-equiv e (one-Fin 1)) ,
- eq-Eq-unordered-pair
- ( standard-unordered-pair _ _)
- ( I , a)
- ( e)
- ( λ { (inl (inr star)) → refl ; (inr star) → refl})))
+abstract
+ is-surjective-standard-unordered-pair :
+ {l : Level} {A : UU l} (p : unordered-pair A) →
+ type-trunc-Prop
+ ( Σ A (λ x → Σ A (λ y → standard-unordered-pair x y = p)))
+ is-surjective-standard-unordered-pair (I , a) =
+ apply-universal-property-trunc-Prop
+ ( has-two-elements-type-2-Element-Type I)
+ ( trunc-Prop
+ ( Σ _ (λ x → Σ _ (λ y → standard-unordered-pair x y = (I , a)))))
+ ( λ e →
+ unit-trunc-Prop
+ ( a (map-equiv e (zero-Fin 1)) ,
+ a (map-equiv e (one-Fin 1)) ,
+ eq-Eq-unordered-pair
+ ( standard-unordered-pair _ _)
+ ( I , a)
+ ( e)
+ ( λ where
+ ( inl (inr star)) → refl
+ ( inr star) → refl)))
```
### For every unordered pair `p` and every element `i` in its underlying type, `p` is equal to a standard unordered pair
diff --git a/src/foundation/unordered-tuples.lagda.md b/src/foundation/unordered-tuples.lagda.md
index 3f0ce1a080..ac5fa9d23b 100644
--- a/src/foundation/unordered-tuples.lagda.md
+++ b/src/foundation/unordered-tuples.lagda.md
@@ -26,7 +26,7 @@ open import foundation-core.identity-types
open import foundation-core.sets
open import foundation-core.whiskering-homotopies
-open import univalent-combinatorics.complements-isolated-points
+open import univalent-combinatorics.complements-isolated-elements
open import univalent-combinatorics.equality-finite-types
open import univalent-combinatorics.finite-types
open import univalent-combinatorics.standard-finite-types
@@ -84,7 +84,7 @@ module _
type-complement-point-unordered-tuple-UU-Fin : UU-Fin lzero n
type-complement-point-unordered-tuple-UU-Fin =
- complement-point-UU-Fin n
+ complement-element-UU-Fin n
( pair (type-unordered-tuple-UU-Fin (succ-ℕ n) t) i)
type-complement-point-unordered-tuple : UU lzero
@@ -94,13 +94,13 @@ module _
inclusion-complement-point-unordered-tuple :
type-complement-point-unordered-tuple → type-unordered-tuple (succ-ℕ n) t
inclusion-complement-point-unordered-tuple =
- inclusion-complement-point-UU-Fin n
+ inclusion-complement-element-UU-Fin n
( pair (type-unordered-tuple-UU-Fin (succ-ℕ n) t) i)
unordered-tuple-complement-point-type-unordered-tuple :
unordered-tuple n A
pr1 unordered-tuple-complement-point-type-unordered-tuple =
- complement-point-UU-Fin n
+ complement-element-UU-Fin n
( pair (type-unordered-tuple-UU-Fin (succ-ℕ n) t) i)
pr2 unordered-tuple-complement-point-type-unordered-tuple =
( element-unordered-tuple (succ-ℕ n) t) ∘
diff --git a/src/foundation/vectors-set-quotients.lagda.md b/src/foundation/vectors-set-quotients.lagda.md
index f5f074b4f4..4d56e123e6 100644
--- a/src/foundation/vectors-set-quotients.lagda.md
+++ b/src/foundation/vectors-set-quotients.lagda.md
@@ -255,188 +255,206 @@ inv-precomp-vector-set-quotient (succ-ℕ n) A R X f (qa0 , qa) =
( f)
( qa0 , map-equiv (equiv-set-quotient-vector n _ _) qa)
-is-section-inv-precomp-vector-set-quotient :
- { l l1 l2 : Level}
- ( n : ℕ)
- ( A : functional-vec (UU l1) n)
- ( R : (i : Fin n) → Equivalence-Relation l2 (A i)) →
- ( X : Set l) →
- ( section
+abstract
+ is-section-inv-precomp-vector-set-quotient :
+ { l l1 l2 : Level}
+ ( n : ℕ)
+ ( A : functional-vec (UU l1) n)
+ ( R : (i : Fin n) → Equivalence-Relation l2 (A i)) →
+ ( X : Set l) →
( precomp-Set-Quotient
( all-sim-Equivalence-Relation n A R)
( set-quotient-vector-Set n A R)
( reflecting-map-quotient-vector-map n A R)
- ( X)))
-pr1 (is-section-inv-precomp-vector-set-quotient n A R X) =
- inv-precomp-vector-set-quotient n A R X
-pr2 (is-section-inv-precomp-vector-set-quotient {l} {l1} {l2} zero-ℕ A R X) f =
- eq-pair-Σ
- ( eq-htpy (λ {(map-raise star) → refl}))
- ( eq-is-prop
- ( is-prop-reflects-Equivalence-Relation
- ( raise-indiscrete-Equivalence-Relation l2 (raise-unit l1))
- ( X)
- ( map-reflecting-map-Equivalence-Relation _ f)))
-pr2 (is-section-inv-precomp-vector-set-quotient (succ-ℕ n) A R X) f =
- eq-pair-Σ
- ( eq-htpy
- ( λ (a0 , a) →
- ( ap
- ( inv-precomp-set-quotient-prod-set-quotient
- ( R (inr star))
- ( all-sim-Equivalence-Relation n
- ( tail-functional-vec n A)
- ( λ x → R (inl x))) X f)
- ( eq-pair-Σ refl
- ( map-equiv-equiv-set-quotient-vector-quotient-map n _ _ a)) ∙
- ( htpy-eq
+ ( X)) ∘
+ ( inv-precomp-vector-set-quotient n A R X) ~
+ ( id)
+ is-section-inv-precomp-vector-set-quotient {l} {l1} {l2} 0 A R X f =
+ eq-pair-Σ
+ ( eq-htpy (λ where (map-raise star) → refl))
+ ( eq-is-prop
+ ( is-prop-reflects-Equivalence-Relation
+ ( raise-indiscrete-Equivalence-Relation l2 (raise-unit l1))
+ ( X)
+ ( map-reflecting-map-Equivalence-Relation _ f)))
+ is-section-inv-precomp-vector-set-quotient (succ-ℕ n) A R X f =
+ eq-pair-Σ
+ ( eq-htpy
+ ( λ (a0 , a) →
( ap
- ( map-reflecting-map-Equivalence-Relation _)
- ( is-section-inv-precomp-set-quotient-prod-set-quotient
+ ( inv-precomp-set-quotient-prod-set-quotient
( R (inr star))
( all-sim-Equivalence-Relation n
- ( tail-functional-vec n A)
- ( λ x → R (inl x))) X f))
- ( a0 , a)))))
- ( eq-is-prop
- ( is-prop-reflects-Equivalence-Relation
- ( all-sim-Equivalence-Relation (succ-ℕ n) A R)
- ( X)
- ( map-reflecting-map-Equivalence-Relation _ f)))
+ ( tail-functional-vec n A)
+ ( λ x → R (inl x))) X f)
+ ( eq-pair-Σ refl
+ ( map-equiv-equiv-set-quotient-vector-quotient-map n _ _ a)) ∙
+ ( htpy-eq
+ ( ap
+ ( map-reflecting-map-Equivalence-Relation _)
+ ( is-section-inv-precomp-set-quotient-prod-set-quotient
+ ( R (inr star))
+ ( all-sim-Equivalence-Relation n
+ ( tail-functional-vec n A)
+ ( λ x → R (inl x))) X f))
+ ( a0 , a)))))
+ ( eq-is-prop
+ ( is-prop-reflects-Equivalence-Relation
+ ( all-sim-Equivalence-Relation (succ-ℕ n) A R)
+ ( X)
+ ( map-reflecting-map-Equivalence-Relation _ f)))
-is-retraction-inv-precomp-vector-set-quotient :
+section-precomp-vector-set-quotient :
{ l l1 l2 : Level}
( n : ℕ)
( A : functional-vec (UU l1) n)
( R : (i : Fin n) → Equivalence-Relation l2 (A i)) →
( X : Set l) →
- ( retraction
+ ( section
( precomp-Set-Quotient
( all-sim-Equivalence-Relation n A R)
( set-quotient-vector-Set n A R)
( reflecting-map-quotient-vector-map n A R)
( X)))
-pr1 (is-retraction-inv-precomp-vector-set-quotient n A R X) =
+pr1 (section-precomp-vector-set-quotient n A R X) =
inv-precomp-vector-set-quotient n A R X
-pr2 (is-retraction-inv-precomp-vector-set-quotient zero-ℕ A R X) f =
- eq-htpy (λ {(map-raise star) → refl})
-pr2 (is-retraction-inv-precomp-vector-set-quotient (succ-ℕ n) A R X) f =
- ap (_∘ set-quotient-vector-prod-set-quotient)
- is-inv-map-inv-equiv-f ∙ lemma-f
- where
- precomp-f :
- reflecting-map-Equivalence-Relation
- ( prod-Equivalence-Relation (R (inr star))
- ( all-sim-Equivalence-Relation n
- ( tail-functional-vec n A)
- ( λ x → R (inl x))))
- ( type-Set X)
- precomp-f =
- precomp-Set-Quotient
- ( prod-Equivalence-Relation (R (inr star))
- ( all-sim-Equivalence-Relation n
- ( tail-functional-vec n A)
- ( λ x → R (inl x))))
- ( set-quotient-vector-Set (succ-ℕ n) A R)
- ( reflecting-map-quotient-vector-map (succ-ℕ n) A R) X f
-
- set-quotient-vector-prod-set-quotient :
- ( set-quotient-vector (succ-ℕ n) A R) →
- ( prod-set-quotient
- ( R (inr star))
- ( all-sim-Equivalence-Relation n
- ( tail-functional-vec n A)
- ( λ x → R (inl x))))
- set-quotient-vector-prod-set-quotient (qa0' , qa') =
- (qa0' , map-equiv (equiv-set-quotient-vector n _ _) qa')
+pr2 (section-precomp-vector-set-quotient n A R X) =
+ is-section-inv-precomp-vector-set-quotient n A R X
- map-inv-equiv-f :
- ( prod-set-quotient
- ( R (inr star))
- ( all-sim-Equivalence-Relation n
- ( tail-functional-vec n A)
- ( λ x → R (inl x)))) →
- ( type-Set X)
- map-inv-equiv-f (qa0 , qa) =
- f (qa0 , map-inv-equiv (equiv-set-quotient-vector n _ _) qa)
-
- lemma-f : (map-inv-equiv-f ∘ set-quotient-vector-prod-set-quotient) = f
- lemma-f =
- eq-htpy
- ( λ (qa0 , qa) →
- ( ap f
- ( eq-pair-Σ
- ( refl)
- ( is-retraction-map-inv-equiv
- ( equiv-set-quotient-vector n _ _)
- ( qa)))))
-
- is-retraction-inv-precomp-f :
- ( inv-precomp-set-quotient-prod-set-quotient
- ( R (inr star))
- ( all-sim-Equivalence-Relation n
- ( tail-functional-vec n A)
- ( λ x → R (inl x)))
- ( X)
+abstract
+ is-retraction-inv-precomp-vector-set-quotient :
+ { l l1 l2 : Level}
+ ( n : ℕ)
+ ( A : functional-vec (UU l1) n)
+ ( R : (i : Fin n) → Equivalence-Relation l2 (A i)) →
+ ( X : Set l) →
+ ( retraction
( precomp-Set-Quotient
+ ( all-sim-Equivalence-Relation n A R)
+ ( set-quotient-vector-Set n A R)
+ ( reflecting-map-quotient-vector-map n A R)
+ ( X)))
+ pr1 (is-retraction-inv-precomp-vector-set-quotient n A R X) =
+ inv-precomp-vector-set-quotient n A R X
+ pr2 (is-retraction-inv-precomp-vector-set-quotient zero-ℕ A R X) f =
+ eq-htpy (λ where (map-raise star) → refl)
+ pr2 (is-retraction-inv-precomp-vector-set-quotient (succ-ℕ n) A R X) f =
+ ap (_∘ set-quotient-vector-prod-set-quotient)
+ is-inv-map-inv-equiv-f ∙ lemma-f
+ where
+ precomp-f :
+ reflecting-map-Equivalence-Relation
( prod-Equivalence-Relation (R (inr star))
( all-sim-Equivalence-Relation n
( tail-functional-vec n A)
( λ x → R (inl x))))
- ( prod-set-quotient-Set
- ( R (inr star))
- ( all-sim-Equivalence-Relation n
- ( tail-functional-vec n A)
- ( λ x → R (inl x))))
- ( reflecting-map-prod-quotient-map (R (inr star))
+ ( type-Set X)
+ precomp-f =
+ precomp-Set-Quotient
+ ( prod-Equivalence-Relation (R (inr star))
+ ( all-sim-Equivalence-Relation n
+ ( tail-functional-vec n A)
+ ( λ x → R (inl x))))
+ ( set-quotient-vector-Set (succ-ℕ n) A R)
+ ( reflecting-map-quotient-vector-map (succ-ℕ n) A R) X f
+
+ set-quotient-vector-prod-set-quotient :
+ ( set-quotient-vector (succ-ℕ n) A R) →
+ ( prod-set-quotient
+ ( R (inr star))
+ ( all-sim-Equivalence-Relation n
+ ( tail-functional-vec n A)
+ ( λ x → R (inl x))))
+ set-quotient-vector-prod-set-quotient (qa0' , qa') =
+ (qa0' , map-equiv (equiv-set-quotient-vector n _ _) qa')
+
+ map-inv-equiv-f :
+ ( prod-set-quotient
+ ( R (inr star))
+ ( all-sim-Equivalence-Relation n
+ ( tail-functional-vec n A)
+ ( λ x → R (inl x)))) →
+ ( type-Set X)
+ map-inv-equiv-f (qa0 , qa) =
+ f (qa0 , map-inv-equiv (equiv-set-quotient-vector n _ _) qa)
+
+ lemma-f : (map-inv-equiv-f ∘ set-quotient-vector-prod-set-quotient) = f
+ lemma-f =
+ eq-htpy
+ ( λ (qa0 , qa) →
+ ( ap f
+ ( eq-pair-Σ
+ ( refl)
+ ( is-retraction-map-inv-equiv
+ ( equiv-set-quotient-vector n _ _)
+ ( qa)))))
+
+ is-retraction-inv-precomp-f :
+ ( inv-precomp-set-quotient-prod-set-quotient
+ ( R (inr star))
+ ( all-sim-Equivalence-Relation n
+ ( tail-functional-vec n A)
+ ( λ x → R (inl x)))
+ ( X)
+ ( precomp-Set-Quotient
+ ( prod-Equivalence-Relation (R (inr star))
( all-sim-Equivalence-Relation n
( tail-functional-vec n A)
( λ x → R (inl x))))
- ( X)
- ( map-inv-equiv-f))) =
- map-inv-equiv-f
- is-retraction-inv-precomp-f =
- is-retraction-inv-precomp-set-quotient-prod-set-quotient
+ ( prod-set-quotient-Set
+ ( R (inr star))
+ ( all-sim-Equivalence-Relation n
+ ( tail-functional-vec n A)
+ ( λ x → R (inl x))))
+ ( reflecting-map-prod-quotient-map (R (inr star))
+ ( all-sim-Equivalence-Relation n
+ ( tail-functional-vec n A)
+ ( λ x → R (inl x))))
+ ( X)
+ ( map-inv-equiv-f))) =
+ map-inv-equiv-f
+ is-retraction-inv-precomp-f =
+ is-retraction-inv-precomp-set-quotient-prod-set-quotient
+ ( R (inr star))
+ ( all-sim-Equivalence-Relation n
+ ( tail-functional-vec n A)
+ ( λ x → R (inl x)))
+ ( X)
+ ( map-inv-equiv-f)
+
+ is-inv-map-inv-equiv-f :
+ ( inv-precomp-set-quotient-prod-set-quotient
( R (inr star))
( all-sim-Equivalence-Relation n
( tail-functional-vec n A)
( λ x → R (inl x)))
- ( X)
- ( map-inv-equiv-f)
-
- is-inv-map-inv-equiv-f :
- ( inv-precomp-set-quotient-prod-set-quotient
- ( R (inr star))
- ( all-sim-Equivalence-Relation n
- ( tail-functional-vec n A)
- ( λ x → R (inl x)))
- ( X)
- ( precomp-f)) =
- map-inv-equiv-f
- is-inv-map-inv-equiv-f =
- ap
- ( inv-precomp-set-quotient-prod-set-quotient
- ( R (inr star))
- ( all-sim-Equivalence-Relation n (tail-functional-vec n A)
- ( λ x → R (inl x)))
- ( X))
- ( eq-pair-Σ
- ( ap ( _∘ quotient-vector-map _ A R) (inv lemma-f) ∙
- ( ap
- ( map-inv-equiv-f ∘_)
- ( eq-htpy
- ( λ (a0 , a) →
- ( eq-pair-Σ
- ( refl)
- ( map-equiv-equiv-set-quotient-vector-quotient-map
- _ _ _ a))))))
- ( eq-is-prop
- ( is-prop-reflects-Equivalence-Relation
- ( prod-Equivalence-Relation
- ( R (inr star))
- ( all-sim-Equivalence-Relation n _ _))
- ( X) _))) ∙
- is-retraction-inv-precomp-f
+ ( X)
+ ( precomp-f)) =
+ map-inv-equiv-f
+ is-inv-map-inv-equiv-f =
+ ap
+ ( inv-precomp-set-quotient-prod-set-quotient
+ ( R (inr star))
+ ( all-sim-Equivalence-Relation n (tail-functional-vec n A)
+ ( λ x → R (inl x)))
+ ( X))
+ ( eq-pair-Σ
+ ( ap ( _∘ quotient-vector-map _ A R) (inv lemma-f) ∙
+ ( ap
+ ( map-inv-equiv-f ∘_)
+ ( eq-htpy
+ ( λ (a0 , a) →
+ ( eq-pair-Σ
+ ( refl)
+ ( map-equiv-equiv-set-quotient-vector-quotient-map
+ _ _ _ a))))))
+ ( eq-is-prop
+ ( is-prop-reflects-Equivalence-Relation
+ ( prod-Equivalence-Relation
+ ( R (inr star))
+ ( all-sim-Equivalence-Relation n _ _))
+ ( X) _))) ∙
+ is-retraction-inv-precomp-f
is-set-quotient-vector-set-quotient :
{ l l1 l2 : Level}
@@ -448,7 +466,7 @@ is-set-quotient-vector-set-quotient :
( set-quotient-vector-Set n A R)
( reflecting-map-quotient-vector-map n A R))
pr1 (is-set-quotient-vector-set-quotient n A R X) =
- is-section-inv-precomp-vector-set-quotient n A R X
+ section-precomp-vector-set-quotient n A R X
pr2 (is-set-quotient-vector-set-quotient n A R X) =
is-retraction-inv-precomp-vector-set-quotient n A R X
```
diff --git a/src/group-theory/cartesian-products-concrete-groups.lagda.md b/src/group-theory/cartesian-products-concrete-groups.lagda.md
index 49b78857e1..5c6deb5bd2 100644
--- a/src/group-theory/cartesian-products-concrete-groups.lagda.md
+++ b/src/group-theory/cartesian-products-concrete-groups.lagda.md
@@ -102,21 +102,23 @@ module _
set-product-Concrete-Group =
pair type-product-Concrete-Group is-set-type-product-Concrete-Group
- is-1-type-classifying-type-product-Concrete-Group :
- is-trunc one-𝕋 classifying-type-product-Concrete-Group
- is-1-type-classifying-type-product-Concrete-Group X Y =
- apply-universal-property-trunc-Prop
- ( mere-eq-classifying-type-product-Concrete-Group
- shape-product-Concrete-Group
- X)
- ( is-set-Prop (Id X Y))
- ( λ { refl →
+ abstract
+ is-1-type-classifying-type-product-Concrete-Group :
+ is-trunc one-𝕋 classifying-type-product-Concrete-Group
+ is-1-type-classifying-type-product-Concrete-Group X Y =
+ apply-universal-property-trunc-Prop
+ ( mere-eq-classifying-type-product-Concrete-Group
+ shape-product-Concrete-Group
+ X)
+ ( is-set-Prop (Id X Y))
+ ( λ where
+ refl →
apply-universal-property-trunc-Prop
( mere-eq-classifying-type-product-Concrete-Group
shape-product-Concrete-Group
Y)
( is-set-Prop (Id shape-product-Concrete-Group Y))
- ( λ { refl → is-set-type-product-Concrete-Group})})
+ ( λ where refl → is-set-type-product-Concrete-Group))
classifying-1-type-product-Concrete-Group : Truncated-Type (l1 ⊔ l2) one-𝕋
classifying-1-type-product-Concrete-Group =
diff --git a/src/group-theory/concrete-groups.lagda.md b/src/group-theory/concrete-groups.lagda.md
index 00e4cc3604..cb880865e1 100644
--- a/src/group-theory/concrete-groups.lagda.md
+++ b/src/group-theory/concrete-groups.lagda.md
@@ -93,12 +93,12 @@ module _
apply-universal-property-trunc-Prop
( mere-eq-classifying-type-Concrete-Group shape-Concrete-Group X)
( is-set-Prop (X = Y))
- ( λ
- { refl →
+ ( λ where
+ refl →
apply-universal-property-trunc-Prop
( mere-eq-classifying-type-Concrete-Group shape-Concrete-Group Y)
( is-set-Prop (shape-Concrete-Group = Y))
- ( λ { refl → is-set-type-Concrete-Group})})
+ ( λ where refl → is-set-type-Concrete-Group))
classifying-1-type-Concrete-Group : Truncated-Type l one-𝕋
pr1 classifying-1-type-Concrete-Group =
diff --git a/src/group-theory/equivalences-group-actions.lagda.md b/src/group-theory/equivalences-group-actions.lagda.md
index 81b43dbe6b..4a1a52e144 100644
--- a/src/group-theory/equivalences-group-actions.lagda.md
+++ b/src/group-theory/equivalences-group-actions.lagda.md
@@ -143,7 +143,7 @@ module _
( hom-equiv-Abstract-Group-Action G X Y e)
( pr1 f))
( equiv-right-swap-Σ)
- ( λ { (pair (pair f E) H) → id-equiv}))
+ ( λ ((f , E) , H) → id-equiv))
( is-contr-total-Eq-subtype
( is-contr-total-htpy-hom-Abstract-Group-Action G X Y
( hom-equiv-Abstract-Group-Action G X Y e))
diff --git a/src/group-theory/generating-elements-groups.lagda.md b/src/group-theory/generating-elements-groups.lagda.md
index 2fc67eec29..2692b16491 100644
--- a/src/group-theory/generating-elements-groups.lagda.md
+++ b/src/group-theory/generating-elements-groups.lagda.md
@@ -364,13 +364,14 @@ module _
is-normal-image-hom-element-is-emb-ev-element-hom-Group x (y , p) =
apply-universal-property-trunc-Prop p
( subset-image-hom-element-Group G g (conjugation-Group G x y))
- ( λ { (k , refl) →
- is-closed-under-eq-image-hom-element-Group' G g
- ( unit-trunc-Prop (k , refl))
- ( ( preserves-integer-powers-conjugation-Group G k x g) ∙
- ( ap
- ( integer-power-Group G k)
- ( compute-conjugation-is-emb-ev-element-hom-Group' x)))})
+ ( λ where
+ ( k , refl) →
+ is-closed-under-eq-image-hom-element-Group' G g
+ ( unit-trunc-Prop (k , refl))
+ ( ( preserves-integer-powers-conjugation-Group G k x g) ∙
+ ( ap
+ ( integer-power-Group G k)
+ ( compute-conjugation-is-emb-ev-element-hom-Group' x))))
private
N : Normal-Subgroup l G
@@ -408,23 +409,26 @@ module _
{l : Level} (G : Group l) (g : type-Group G)
where
- is-prop-map-ev-element-is-generating-element-Group :
- is-generating-element-Group G g → is-prop-map-ev-element-hom-Group G g
- is-prop-map-ev-element-is-generating-element-Group U H y =
- is-prop-all-elements-equal
- ( λ (h , p) (k , q) →
- eq-type-subtype
- ( λ u → Id-Prop (set-Group H) (ev-element-hom-Group G H g u) y)
- ( eq-htpy-hom-Group G H
- ( λ x →
- apply-universal-property-trunc-Prop
- ( is-surjective-hom-element-is-generating-element-Group G g U x)
- ( Id-Prop
- ( set-Group H)
- ( map-hom-Group G H h x)
- ( map-hom-Group G H k x))
- ( λ { (z , refl) →
- eq-integer-power-hom-Group G H h k z g (p ∙ inv q)}))))
+ abstract
+ is-prop-map-ev-element-is-generating-element-Group :
+ is-generating-element-Group G g → is-prop-map-ev-element-hom-Group G g
+ is-prop-map-ev-element-is-generating-element-Group U H y =
+ is-prop-all-elements-equal
+ ( λ (h , p) (k , q) →
+ eq-type-subtype
+ ( λ u → Id-Prop (set-Group H) (ev-element-hom-Group G H g u) y)
+ ( eq-htpy-hom-Group G H
+ ( λ x →
+ apply-universal-property-trunc-Prop
+ ( is-surjective-hom-element-is-generating-element-Group
+ G g U x)
+ ( Id-Prop
+ ( set-Group H)
+ ( map-hom-Group G H h x)
+ ( map-hom-Group G H k x))
+ ( λ where
+ ( z , refl) →
+ eq-integer-power-hom-Group G H h k z g (p ∙ inv q)))))
is-emb-ev-element-is-generating-element-Group :
is-generating-element-Group G g → is-emb-ev-element-hom-Group G g
@@ -465,8 +469,9 @@ module _
( U x)
( U y)
( Id-Prop (set-Group G) (mul-Group G x y) (mul-Group G y x))
- ( λ { (k , refl) (l , refl) →
- commute-integer-powers-Group G k l refl})
+ ( λ where
+ ( k , refl) (l , refl) →
+ commute-integer-powers-Group G k l refl)
commutative-mul-is-generating-element-Group :
(U : is-generating-element-Group G g) →
@@ -561,12 +566,13 @@ module _
( ev-element-hom-Group-With-Generating-Element G
( group-Group-With-Generating-Element G))
( x))
- ( λ { (k , refl) →
- unit-trunc-Prop
- ( hom-integer-multiple-Ab
- ( abelian-group-Group-With-Generating-Element G)
- ( k) ,
- refl)})
+ ( λ where
+ ( k , refl) →
+ unit-trunc-Prop
+ ( hom-integer-multiple-Ab
+ ( abelian-group-Group-With-Generating-Element G)
+ ( k) ,
+ refl))
is-equiv-ev-element-Group-With-Generating-Element :
is-equiv
@@ -644,20 +650,22 @@ module _
mul-Group-With-Generating-Element =
mul-Ring ring-Group-With-Generating-Element
- commutative-mul-Group-With-Generating-Element :
- (x y : type-Group-With-Generating-Element G) →
- mul-Group-With-Generating-Element x y =
- mul-Group-With-Generating-Element y x
- commutative-mul-Group-With-Generating-Element x y =
- apply-twice-universal-property-trunc-Prop
- ( is-surjective-hom-element-Group-With-Generating-Element G x)
- ( is-surjective-hom-element-Group-With-Generating-Element G y)
- ( Id-Prop (set-Group-With-Generating-Element G) _ _)
- ( λ { (k , refl) (l , refl) →
+ abstract
+ commutative-mul-Group-With-Generating-Element :
+ (x y : type-Group-With-Generating-Element G) →
+ mul-Group-With-Generating-Element x y =
+ mul-Group-With-Generating-Element y x
+ commutative-mul-Group-With-Generating-Element x y =
+ apply-twice-universal-property-trunc-Prop
+ ( is-surjective-hom-element-Group-With-Generating-Element G x)
+ ( is-surjective-hom-element-Group-With-Generating-Element G y)
+ ( Id-Prop (set-Group-With-Generating-Element G) _ _)
+ ( λ where
+ ( k , refl) (l , refl) →
commute-integer-multiples-diagonal-Ring
( ring-Group-With-Generating-Element)
( k)
- ( l)})
+ ( l))
commutative-ring-Group-With-Generating-Element : Commutative-Ring l
pr1 commutative-ring-Group-With-Generating-Element =
diff --git a/src/group-theory/images-of-group-homomorphisms.lagda.md b/src/group-theory/images-of-group-homomorphisms.lagda.md
index dcb55de5c4..a10218a290 100644
--- a/src/group-theory/images-of-group-homomorphisms.lagda.md
+++ b/src/group-theory/images-of-group-homomorphisms.lagda.md
@@ -78,9 +78,10 @@ module _
is-closed-under-multiplication-image-hom-Group x y K L =
apply-twice-universal-property-trunc-Prop K L
( subset-image-hom-Group (mul-Group H x y))
- ( λ { (g , refl) (h , refl) →
- unit-trunc-Prop
- ( mul-Group G g h , preserves-mul-hom-Group G H f g h)})
+ ( λ where
+ ( g , refl) (h , refl) →
+ unit-trunc-Prop
+ ( mul-Group G g h , preserves-mul-hom-Group G H f g h))
abstract
is-closed-under-inverses-image-hom-Group :
@@ -88,9 +89,10 @@ module _
is-closed-under-inverses-image-hom-Group x K =
apply-universal-property-trunc-Prop K
( subset-image-hom-Group (inv-Group H x))
- ( λ { (g , refl) →
- unit-trunc-Prop
- ( inv-Group G g , preserves-inv-hom-Group G H f g)})
+ ( λ where
+ ( g , refl) →
+ unit-trunc-Prop
+ ( inv-Group G g , preserves-inv-hom-Group G H f g))
is-subgroup-image-hom-Group :
is-subgroup-subset-Group H subset-image-hom-Group
diff --git a/src/group-theory/iterated-cartesian-products-concrete-groups.lagda.md b/src/group-theory/iterated-cartesian-products-concrete-groups.lagda.md
index 68fc89f09b..444472481c 100644
--- a/src/group-theory/iterated-cartesian-products-concrete-groups.lagda.md
+++ b/src/group-theory/iterated-cartesian-products-concrete-groups.lagda.md
@@ -113,21 +113,23 @@ module _
type-iterated-product-Concrete-Group ,
is-set-type-iterated-product-Concrete-Group
- is-1-type-classifying-type-iterated-product-Concrete-Group :
- is-trunc one-𝕋 classifying-type-iterated-product-Concrete-Group
- is-1-type-classifying-type-iterated-product-Concrete-Group X Y =
- apply-universal-property-trunc-Prop
- ( mere-eq-classifying-type-iterated-product-Concrete-Group
- shape-iterated-product-Concrete-Group
- X)
- ( is-set-Prop (Id X Y))
- ( λ { refl →
+ abstract
+ is-1-type-classifying-type-iterated-product-Concrete-Group :
+ is-trunc one-𝕋 classifying-type-iterated-product-Concrete-Group
+ is-1-type-classifying-type-iterated-product-Concrete-Group X Y =
+ apply-universal-property-trunc-Prop
+ ( mere-eq-classifying-type-iterated-product-Concrete-Group
+ shape-iterated-product-Concrete-Group
+ X)
+ ( is-set-Prop (Id X Y))
+ ( λ where
+ refl →
apply-universal-property-trunc-Prop
( mere-eq-classifying-type-iterated-product-Concrete-Group
shape-iterated-product-Concrete-Group
Y)
( is-set-Prop (Id shape-iterated-product-Concrete-Group Y))
- ( λ { refl → is-set-type-iterated-product-Concrete-Group})})
+ ( λ where refl → is-set-type-iterated-product-Concrete-Group))
classifying-1-type-iterated-product-Concrete-Group : Truncated-Type l one-𝕋
classifying-1-type-iterated-product-Concrete-Group =
diff --git a/src/group-theory/normal-closures-subgroups.lagda.md b/src/group-theory/normal-closures-subgroups.lagda.md
index 29990ecd76..86131f9e8d 100644
--- a/src/group-theory/normal-closures-subgroups.lagda.md
+++ b/src/group-theory/normal-closures-subgroups.lagda.md
@@ -85,17 +85,20 @@ module _
unit-trunc-Prop
( unit-Group G , (x , h) , compute-conjugation-unit-Group G x)
- is-closed-under-conjugation-generating-subset-normal-closure-Subgroup :
- is-closed-under-conjugation-subset-Group G
- generating-subset-normal-closure-Subgroup
- is-closed-under-conjugation-generating-subset-normal-closure-Subgroup x y s =
- apply-universal-property-trunc-Prop s
- ( generating-subset-normal-closure-Subgroup (conjugation-Group G x y))
- ( λ { (z , h , refl) →
+ abstract
+ is-closed-under-conjugation-generating-subset-normal-closure-Subgroup :
+ is-closed-under-conjugation-subset-Group G
+ generating-subset-normal-closure-Subgroup
+ is-closed-under-conjugation-generating-subset-normal-closure-Subgroup
+ x y s =
+ apply-universal-property-trunc-Prop s
+ ( generating-subset-normal-closure-Subgroup (conjugation-Group G x y))
+ ( λ where
+ ( z , h , refl) →
unit-trunc-Prop
( mul-Group G x z ,
h ,
- compute-conjugation-mul-Group G x z (pr1 h))})
+ compute-conjugation-mul-Group G x z (pr1 h)))
subgroup-normal-closure-Subgroup : Subgroup (l1 ⊔ l2) G
subgroup-normal-closure-Subgroup =
@@ -185,15 +188,16 @@ module _
( u)
( contains-subgroup-normal-closure-Subgroup)
- contains-generating-subset-normal-closure-Normal-Subgroup :
- {l : Level} (N : Normal-Subgroup l G) →
- leq-Subgroup G H (subgroup-Normal-Subgroup G N) →
- generating-subset-normal-closure-Subgroup ⊆ subset-Normal-Subgroup G N
- contains-generating-subset-normal-closure-Normal-Subgroup N u x g =
- apply-universal-property-trunc-Prop g
- ( subset-Normal-Subgroup G N x)
- ( λ { (z , (y , h) , refl) →
- is-normal-Normal-Subgroup G N z y (u y h)})
+ abstract
+ contains-generating-subset-normal-closure-Normal-Subgroup :
+ {l : Level} (N : Normal-Subgroup l G) →
+ leq-Subgroup G H (subgroup-Normal-Subgroup G N) →
+ generating-subset-normal-closure-Subgroup ⊆ subset-Normal-Subgroup G N
+ contains-generating-subset-normal-closure-Normal-Subgroup N u x g =
+ apply-universal-property-trunc-Prop g
+ ( subset-Normal-Subgroup G N x)
+ ( λ where
+ ( z , (y , h) , refl) → is-normal-Normal-Subgroup G N z y (u y h))
backward-implication-is-normal-closure-normal-closure-Subgroup :
{l : Level} (N : Normal-Subgroup l G) →
diff --git a/src/group-theory/substitution-functor-group-actions.lagda.md b/src/group-theory/substitution-functor-group-actions.lagda.md
index f707712704..94ff4fc9dd 100644
--- a/src/group-theory/substitution-functor-group-actions.lagda.md
+++ b/src/group-theory/substitution-functor-group-actions.lagda.md
@@ -158,15 +158,14 @@ module _
( Equivalence-Relation-obj-left-adjoint-subst-Abstract-Group-Action X)
( h' , x')
( h , x))
- ( λ { (g , p , q) →
- intro-∃
- ( inv-Group G g)
- ( pair
- ( ( ap
- ( mul-Group' H h')
- ( preserves-inv-hom-Group G H f g)) ∙
- ( inv (transpose-eq-mul-Group' H p)))
- ( inv (transpose-eq-mul-Abstract-Group-Action G X g x x' q)))})
+ ( λ (g , p , q) →
+ intro-∃
+ ( inv-Group G g)
+ ( ( ( ap
+ ( mul-Group' H h')
+ ( preserves-inv-hom-Group G H f g)) ∙
+ ( inv (transpose-eq-mul-Group' H p))) ,
+ ( inv (transpose-eq-mul-Abstract-Group-Action G X g x x' q))))
pr2
( pr2
( pr2
@@ -177,28 +176,27 @@ module _
( Equivalence-Relation-obj-left-adjoint-subst-Abstract-Group-Action X)
( h , x)
( h'' , x''))
- ( λ { (g , p , q) →
- apply-universal-property-trunc-Prop d
- ( pr1
- ( Equivalence-Relation-obj-left-adjoint-subst-Abstract-Group-Action
- ( X))
- ( h , x)
- ( h'' , x''))
- ( λ { (g' , p' , q') →
- intro-∃
- ( mul-Group G g' g)
- ( pair
- ( ( ap
- ( mul-Group' H h)
- ( preserves-mul-hom-Group G H f g' g)) ∙
- ( ( associative-mul-Group H
- ( map-hom-Group G H f g')
- ( map-hom-Group G H f g)
- ( h)) ∙
- ( ( ap (mul-Group H (map-hom-Group G H f g')) p) ∙
- ( p'))))
- ( ( preserves-mul-Abstract-Group-Action G X g' g x) ∙
- ( ap (mul-Abstract-Group-Action G X g') q ∙ q')))})})
+ ( λ (g , p , q) →
+ apply-universal-property-trunc-Prop d
+ ( pr1
+ ( Equivalence-Relation-obj-left-adjoint-subst-Abstract-Group-Action
+ ( X))
+ ( h , x)
+ ( h'' , x''))
+ ( λ (g' , p' , q') →
+ intro-∃
+ ( mul-Group G g' g)
+ ( ( ( ap
+ ( mul-Group' H h)
+ ( preserves-mul-hom-Group G H f g' g)) ∙
+ ( ( associative-mul-Group H
+ ( map-hom-Group G H f g')
+ ( map-hom-Group G H f g)
+ ( h)) ∙
+ ( ( ap (mul-Group H (map-hom-Group G H f g')) p) ∙
+ ( p')))) ,
+ ( ( preserves-mul-Abstract-Group-Action G X g' g x) ∙
+ ( ap (mul-Abstract-Group-Action G X g') q ∙ q')))))
set-left-adjoint-subst-Abstract-Group-Action :
{l3 : Level} → Abstract-Group-Action G l3 →
diff --git a/src/group-theory/torsion-free-groups.lagda.md b/src/group-theory/torsion-free-groups.lagda.md
index a265dbd1b5..deed7a3d08 100644
--- a/src/group-theory/torsion-free-groups.lagda.md
+++ b/src/group-theory/torsion-free-groups.lagda.md
@@ -151,17 +151,18 @@ module _
is-torsion-free-has-unique-torsion-element-Group H x k p =
ap pr1 (eq-is-contr H {x , intro-∃ k p} {unit-torsion-element-Group G})
- has-unique-torsion-element-is-torsion-free-Group :
- is-torsion-free-Group G → has-unique-torsion-element-Group G
- has-unique-torsion-element-is-torsion-free-Group H =
- fundamental-theorem-id'
- ( λ where x refl → is-torsion-element-unit-Group G)
- ( λ x →
- is-equiv-is-prop
- ( is-set-type-Group G _ _)
- ( is-prop-is-torsion-element-Group G x)
- ( elim-exists-Prop
- ( λ k → Id-Prop (set-Group G) _ _)
- ( Id-Prop (set-Group G) _ _)
- ( λ k p → inv (H x k p))))
+ abstract
+ has-unique-torsion-element-is-torsion-free-Group :
+ is-torsion-free-Group G → has-unique-torsion-element-Group G
+ has-unique-torsion-element-is-torsion-free-Group H =
+ fundamental-theorem-id'
+ ( λ where x refl → is-torsion-element-unit-Group G)
+ ( λ x →
+ is-equiv-is-prop
+ ( is-set-type-Group G _ _)
+ ( is-prop-is-torsion-element-Group G x)
+ ( elim-exists-Prop
+ ( λ k → Id-Prop (set-Group G) _ _)
+ ( Id-Prop (set-Group G) _ _)
+ ( λ k p → inv (H x k p))))
```
diff --git a/src/group-theory/trivial-groups.lagda.md b/src/group-theory/trivial-groups.lagda.md
index 66840434a0..49f9288f18 100644
--- a/src/group-theory/trivial-groups.lagda.md
+++ b/src/group-theory/trivial-groups.lagda.md
@@ -54,19 +54,20 @@ module _
{l1 : Level} (G : Group l1)
where
- is-contr-subgroup-is-trivial-Group :
- is-trivial-Group G → is-contr (Subgroup l1 G)
- pr1 (is-contr-subgroup-is-trivial-Group H) =
- trivial-Subgroup G
- pr2 (is-contr-subgroup-is-trivial-Group H) K =
- eq-has-same-elements-Subgroup G
- ( trivial-Subgroup G)
- ( K)
- ( λ x →
- ( λ where refl → contains-unit-Subgroup G K) ,
- ( λ _ →
- is-closed-under-eq-Subgroup G
- ( trivial-Subgroup G)
- ( contains-unit-Subgroup G (trivial-Subgroup G))
- ( eq-is-contr H)))
+ abstract
+ is-contr-subgroup-is-trivial-Group :
+ is-trivial-Group G → is-contr (Subgroup l1 G)
+ pr1 (is-contr-subgroup-is-trivial-Group H) =
+ trivial-Subgroup G
+ pr2 (is-contr-subgroup-is-trivial-Group H) K =
+ eq-has-same-elements-Subgroup G
+ ( trivial-Subgroup G)
+ ( K)
+ ( λ x →
+ ( λ where refl → contains-unit-Subgroup G K) ,
+ ( λ _ →
+ is-closed-under-eq-Subgroup G
+ ( trivial-Subgroup G)
+ ( contains-unit-Subgroup G (trivial-Subgroup G))
+ ( eq-is-contr H)))
```
diff --git a/src/higher-group-theory/transitive-higher-group-actions.lagda.md b/src/higher-group-theory/transitive-higher-group-actions.lagda.md
index 8114fad3b9..70373a28b8 100644
--- a/src/higher-group-theory/transitive-higher-group-actions.lagda.md
+++ b/src/higher-group-theory/transitive-higher-group-actions.lagda.md
@@ -187,17 +187,18 @@ module _
( f (shape-∞-Group G) refl)))
( H)
- is-inhabited-is-transitive-action-∞-Group :
- is-transitive-action-∞-Group G X → is-inhabited (type-action-∞-Group G X)
- is-inhabited-is-transitive-action-∞-Group H =
- apply-universal-property-trunc-Prop
- ( is-inhabited-is-0-connected H)
- ( is-inhabited-Prop _)
- ( λ (u , x) →
- apply-universal-property-trunc-Prop
- ( mere-eq-classifying-type-∞-Group G (shape-∞-Group G) u)
- ( is-inhabited-Prop _)
- ( λ where refl → unit-trunc-Prop x))
+ abstract
+ is-inhabited-is-transitive-action-∞-Group :
+ is-transitive-action-∞-Group G X → is-inhabited (type-action-∞-Group G X)
+ is-inhabited-is-transitive-action-∞-Group H =
+ apply-universal-property-trunc-Prop
+ ( is-inhabited-is-0-connected H)
+ ( is-inhabited-Prop _)
+ ( λ (u , x) →
+ apply-universal-property-trunc-Prop
+ ( mere-eq-classifying-type-∞-Group G (shape-∞-Group G) u)
+ ( is-inhabited-Prop _)
+ ( λ where refl → unit-trunc-Prop x))
is-surjective-mul-right-is-transitive-action-∞-Group :
is-transitive-action-∞-Group G X →
diff --git a/src/linear-algebra/vectors.lagda.md b/src/linear-algebra/vectors.lagda.md
index ae492a1cef..3a7bb0216b 100644
--- a/src/linear-algebra/vectors.lagda.md
+++ b/src/linear-algebra/vectors.lagda.md
@@ -230,16 +230,18 @@ module _
is-section-functional-vec-vec .(succ-ℕ _) (a ∷ v) =
ap (λ u → a ∷ u) (is-section-functional-vec-vec _ v)
- is-retraction-functional-vec-vec :
- (n : ℕ) → (functional-vec-vec n ∘ listed-vec-functional-vec n) ~ id
- is-retraction-functional-vec-vec zero-ℕ v = eq-htpy (λ ())
- is-retraction-functional-vec-vec (succ-ℕ n) v =
- eq-htpy
- ( λ { ( inl x) →
+ abstract
+ is-retraction-functional-vec-vec :
+ (n : ℕ) → (functional-vec-vec n ∘ listed-vec-functional-vec n) ~ id
+ is-retraction-functional-vec-vec zero-ℕ v = eq-htpy (λ ())
+ is-retraction-functional-vec-vec (succ-ℕ n) v =
+ eq-htpy
+ ( λ where
+ ( inl x) →
htpy-eq
( is-retraction-functional-vec-vec n (tail-functional-vec n v))
- ( x) ;
- ( inr star) → refl})
+ ( x)
+ ( inr star) → refl)
is-equiv-listed-vec-functional-vec :
(n : ℕ) → is-equiv (listed-vec-functional-vec n)
diff --git a/src/order-theory/decidable-total-preorders.lagda.md b/src/order-theory/decidable-total-preorders.lagda.md
index 490c5e1931..48f671424d 100644
--- a/src/order-theory/decidable-total-preorders.lagda.md
+++ b/src/order-theory/decidable-total-preorders.lagda.md
@@ -117,22 +117,23 @@ module _
leq-or-strict-greater-Decidable-Preorder x y =
leq-Decidable-Total-Preorder x y + le-Decidable-Total-Preorder y x
- helper-is-leq-or-strict-greater-Decidable-Total-Preorder :
- (x y : type-Decidable-Total-Preorder) →
- is-decidable (leq-Decidable-Total-Preorder x y) →
- leq-or-strict-greater-Decidable-Preorder x y
- helper-is-leq-or-strict-greater-Decidable-Total-Preorder x y (inl p) =
- inl p
- helper-is-leq-or-strict-greater-Decidable-Total-Preorder x y (inr p) =
- inr
- ( ( λ {refl → p (refl-leq-Decidable-Total-Preorder x)}) ,
- ( apply-universal-property-trunc-Prop
- ( is-total-Decidable-Total-Preorder y x)
- ( leq-Decidable-Total-Preorder-Prop y x)
- ( ind-coprod
- ( λ _ → leq-Decidable-Total-Preorder y x)
- ( id)
- ( λ q → ex-falso (p q)))))
+ abstract
+ helper-is-leq-or-strict-greater-Decidable-Total-Preorder :
+ (x y : type-Decidable-Total-Preorder) →
+ is-decidable (leq-Decidable-Total-Preorder x y) →
+ leq-or-strict-greater-Decidable-Preorder x y
+ helper-is-leq-or-strict-greater-Decidable-Total-Preorder x y (inl p) =
+ inl p
+ helper-is-leq-or-strict-greater-Decidable-Total-Preorder x y (inr p) =
+ inr
+ ( ( λ where refl → p (refl-leq-Decidable-Total-Preorder x)) ,
+ ( apply-universal-property-trunc-Prop
+ ( is-total-Decidable-Total-Preorder y x)
+ ( leq-Decidable-Total-Preorder-Prop y x)
+ ( ind-coprod
+ ( λ _ → leq-Decidable-Total-Preorder y x)
+ ( id)
+ ( ex-falso ∘ p))))
is-leq-or-strict-greater-Decidable-Total-Preorder :
(x y : type-Decidable-Total-Preorder) →
diff --git a/src/order-theory/posets.lagda.md b/src/order-theory/posets.lagda.md
index 2123e07862..0c945aee5c 100644
--- a/src/order-theory/posets.lagda.md
+++ b/src/order-theory/posets.lagda.md
@@ -93,7 +93,7 @@ module _
( λ x y → leq-Poset x y × leq-Poset y x)
( λ x y → is-prop-prod (is-prop-leq-Poset x y) (is-prop-leq-Poset y x))
( λ x → refl-leq-Poset x , refl-leq-Poset x)
- ( λ {x y (H , K) → antisymmetric-leq-Poset x y H K})
+ ( λ x y (H , K) → antisymmetric-leq-Poset x y H K)
set-Poset : Set l1
pr1 set-Poset = type-Poset
diff --git a/src/organic-chemistry/ethane.lagda.md b/src/organic-chemistry/ethane.lagda.md
index a284da7eff..180e7c8d0c 100644
--- a/src/organic-chemistry/ethane.lagda.md
+++ b/src/organic-chemistry/ethane.lagda.md
@@ -86,37 +86,38 @@ module _
is-prop-standard-edge-ethane c c' =
is-prop-type-Prop (standard-edge-ethane-Prop c c')
- is-decidable-edge-ethane-eq-Fin-two :
- (p : unordered-pair vertex-ethane) →
- type-unordered-pair p = Fin 2 →
- is-decidable (edge-ethane p)
- is-decidable-edge-ethane-eq-Fin-two p refl with
- is-zero-or-one-Fin-two-ℕ (element-unordered-pair p (zero-Fin 1)) |
- is-zero-or-one-Fin-two-ℕ (element-unordered-pair p (one-Fin 1))
- ... | inl is-zero | inl is-zero' =
- inr
- ( λ P →
- apply-universal-property-trunc-Prop (pr2 P) empty-Prop
- ( λ where
- (inl (inr star) , is-one) → neq-inl-inr (inv is-zero ∙ is-one)
- (inr star , is-one) → neq-inl-inr (inv is-zero' ∙ is-one)))
- ... | inl is-zero | inr is-one' =
- inl
- ( pair
- ( unit-trunc-Prop (zero-Fin 1 , is-zero))
- ( unit-trunc-Prop (one-Fin 1 , is-one')))
- ... | inr is-one | inl is-zero' =
- inl
- ( pair
- ( unit-trunc-Prop (one-Fin 1 , is-zero'))
- ( unit-trunc-Prop (zero-Fin 1 , is-one)))
- ... | inr is-one | inr is-one' =
- inr
- ( λ P →
- apply-universal-property-trunc-Prop (pr1 P) empty-Prop
- ( λ where
- (inl (inr star) , is-zero) → neq-inl-inr (inv is-zero ∙ is-one)
- (inr star , is-zero) → neq-inl-inr (inv is-zero ∙ is-one')))
+ abstract
+ is-decidable-edge-ethane-eq-Fin-two :
+ (p : unordered-pair vertex-ethane) →
+ type-unordered-pair p = Fin 2 →
+ is-decidable (edge-ethane p)
+ is-decidable-edge-ethane-eq-Fin-two p refl with
+ is-zero-or-one-Fin-two-ℕ (element-unordered-pair p (zero-Fin 1)) |
+ is-zero-or-one-Fin-two-ℕ (element-unordered-pair p (one-Fin 1))
+ ... | inl is-zero | inl is-zero' =
+ inr
+ ( λ P →
+ apply-universal-property-trunc-Prop (pr2 P) empty-Prop
+ ( λ where
+ ( inl (inr star) , is-one) → neq-inl-inr (inv is-zero ∙ is-one)
+ ( inr star , is-one) → neq-inl-inr (inv is-zero' ∙ is-one)))
+ ... | inl is-zero | inr is-one' =
+ inl
+ ( pair
+ ( unit-trunc-Prop (zero-Fin 1 , is-zero))
+ ( unit-trunc-Prop (one-Fin 1 , is-one')))
+ ... | inr is-one | inl is-zero' =
+ inl
+ ( pair
+ ( unit-trunc-Prop (one-Fin 1 , is-zero'))
+ ( unit-trunc-Prop (zero-Fin 1 , is-one)))
+ ... | inr is-one | inr is-one' =
+ inr
+ ( λ P →
+ apply-universal-property-trunc-Prop (pr1 P) empty-Prop
+ ( λ where
+ ( inl (inr star) , is-zero) → neq-inl-inr (inv is-zero ∙ is-one)
+ ( inr star , is-zero) → neq-inl-inr (inv is-zero ∙ is-one')))
is-decidable-standard-edge-ethane :
(c c' : vertex-ethane) → is-decidable (standard-edge-ethane c c')
@@ -150,41 +151,42 @@ module _
vertex-tetrahedron-in-3-space t
bonding-ethane c e = v
- is-contr-standard-edge-ethane :
- (c : vertex-ethane) →
- is-contr (Σ (vertex-ethane) (λ c' → standard-edge-ethane c c'))
- pr1 (pr1 (is-contr-standard-edge-ethane (inl (inr star)))) = one-Fin 1
- pr1 (pr2 (pr1 (is-contr-standard-edge-ethane (inl (inr star))))) =
- unit-trunc-Prop (zero-Fin 1 , refl)
- pr2 (pr2 (pr1 (is-contr-standard-edge-ethane (inl (inr star))))) =
- unit-trunc-Prop (one-Fin 1 , refl)
- pr2 (is-contr-standard-edge-ethane (inl (inr star))) (inl (inr star) , P) =
- ex-falso
- ( apply-universal-property-trunc-Prop (pr2 P) empty-Prop
- ( λ where
- (inl (inr star) , is-one) → neq-inl-inr is-one
- (inr star , is-one) → neq-inl-inr is-one))
- pr2 (is-contr-standard-edge-ethane (inl (inr star))) (inr star , P) =
- eq-pair-Σ refl
- ( eq-is-prop
- ( is-prop-edge-ethane
- ( standard-unordered-pair (inl (inr star)) (inr star))))
- pr1 (pr1 (is-contr-standard-edge-ethane (inr star))) = zero-Fin 1
- pr1 (pr2 (pr1 (is-contr-standard-edge-ethane (inr star)))) =
- unit-trunc-Prop (one-Fin 1 , refl)
- pr2 (pr2 (pr1 (is-contr-standard-edge-ethane (inr star)))) =
- unit-trunc-Prop (zero-Fin 1 , refl)
- pr2 (is-contr-standard-edge-ethane (inr star)) (inl (inr star) , P) =
- eq-pair-Σ refl
- ( eq-is-prop
- ( is-prop-edge-ethane
- ( standard-unordered-pair (inr star) (inl (inr star)))))
- pr2 (is-contr-standard-edge-ethane (inr star)) (inr star , P) =
- ex-falso
- ( apply-universal-property-trunc-Prop (pr1 P) empty-Prop
- ( λ where
- (inl (inr star) , is-zero) → neq-inr-inl is-zero
- (inr star , is-zero) → neq-inr-inl is-zero))
+ abstract
+ is-contr-standard-edge-ethane :
+ (c : vertex-ethane) →
+ is-contr (Σ (vertex-ethane) (λ c' → standard-edge-ethane c c'))
+ pr1 (pr1 (is-contr-standard-edge-ethane (inl (inr star)))) = one-Fin 1
+ pr1 (pr2 (pr1 (is-contr-standard-edge-ethane (inl (inr star))))) =
+ unit-trunc-Prop (zero-Fin 1 , refl)
+ pr2 (pr2 (pr1 (is-contr-standard-edge-ethane (inl (inr star))))) =
+ unit-trunc-Prop (one-Fin 1 , refl)
+ pr2 (is-contr-standard-edge-ethane (inl (inr star))) (inl (inr star) , P) =
+ ex-falso
+ ( apply-universal-property-trunc-Prop (pr2 P) empty-Prop
+ ( λ where
+ ( inl (inr star) , is-one) → neq-inl-inr is-one
+ ( inr star , is-one) → neq-inl-inr is-one))
+ pr2 (is-contr-standard-edge-ethane (inl (inr star))) (inr star , P) =
+ eq-pair-Σ refl
+ ( eq-is-prop
+ ( is-prop-edge-ethane
+ ( standard-unordered-pair (inl (inr star)) (inr star))))
+ pr1 (pr1 (is-contr-standard-edge-ethane (inr star))) = zero-Fin 1
+ pr1 (pr2 (pr1 (is-contr-standard-edge-ethane (inr star)))) =
+ unit-trunc-Prop (one-Fin 1 , refl)
+ pr2 (pr2 (pr1 (is-contr-standard-edge-ethane (inr star)))) =
+ unit-trunc-Prop (zero-Fin 1 , refl)
+ pr2 (is-contr-standard-edge-ethane (inr star)) (inl (inr star) , P) =
+ eq-pair-Σ refl
+ ( eq-is-prop
+ ( is-prop-edge-ethane
+ ( standard-unordered-pair (inr star) (inl (inr star)))))
+ pr2 (is-contr-standard-edge-ethane (inr star)) (inr star , P) =
+ ex-falso
+ ( apply-universal-property-trunc-Prop (pr1 P) empty-Prop
+ ( λ where
+ ( inl (inr star) , is-zero) → neq-inr-inl is-zero
+ ( inr star , is-zero) → neq-inr-inl is-zero))
abstract
is-emb-bonding-ethane : (c : vertex-ethane) → is-emb (bonding-ethane c)
@@ -231,13 +233,13 @@ module _
pr1 (pr2 (pr2 (pr2 ethane))) (inl (inr star)) P =
apply-universal-property-trunc-Prop (pr2 P) empty-Prop
( λ where
- (inl (inr star) , is-one) → neq-inl-inr is-one
- (inr star , is-one) → neq-inl-inr is-one)
+ ( inl (inr star) , is-one) → neq-inl-inr is-one
+ ( inr star , is-one) → neq-inl-inr is-one)
pr1 (pr2 (pr2 (pr2 ethane))) (inr star) P =
apply-universal-property-trunc-Prop (pr1 P) empty-Prop
( λ where
- (inl (inr star) , is-zero) → neq-inr-inl is-zero
- (inr star , is-zero) → neq-inr-inl is-zero)
+ ( inl (inr star) , is-zero) → neq-inr-inl is-zero
+ ( inr star , is-zero) → neq-inr-inl is-zero)
pr1 (pr2 (pr2 (pr2 (pr2 ethane)))) c c' =
concatenate-eq-leq-ℕ 3
( inv
@@ -262,8 +264,7 @@ module _
( neq-inl-inr))
( cons-walk-Undirected-Graph
( standard-unordered-pair (zero-Fin 1) (one-Fin 1))
- ( pair
- ( unit-trunc-Prop (zero-Fin 1 , refl))
+ ( ( unit-trunc-Prop (zero-Fin 1 , refl)) ,
( unit-trunc-Prop (one-Fin 1 , refl)))
{ zero-Fin 1}
( refl-walk-Undirected-Graph)))
@@ -282,8 +283,7 @@ module _
( neq-inl-inr))
( cons-walk-Undirected-Graph
( standard-unordered-pair (one-Fin 1) (zero-Fin 1))
- ( pair
- ( unit-trunc-Prop (one-Fin 1 , refl))
+ ( ( unit-trunc-Prop (one-Fin 1 , refl)) ,
( unit-trunc-Prop (zero-Fin 1 , refl)))
{ zero-Fin 1}
( refl-walk-Undirected-Graph)))
diff --git a/src/organic-chemistry/methane.lagda.md b/src/organic-chemistry/methane.lagda.md
index ebe63254e6..8375a68df0 100644
--- a/src/organic-chemistry/methane.lagda.md
+++ b/src/organic-chemistry/methane.lagda.md
@@ -30,7 +30,7 @@ open import univalent-combinatorics.finite-types
## Idea
-**Methane** is the simpliest hydrocarbon, and the first alkane.
+**Methane** is the simplest hydrocarbon, and the first alkane.
## Definition
@@ -40,18 +40,19 @@ module _
where
methane : hydrocarbon lzero lzero
- methane =
- ( unit-𝔽 , (λ x → empty-𝔽)) ,
- ( λ c → t) ,
- ( λ c → (λ e → ex-falso (pr2 e)) , λ e _ → ex-falso (pr2 e)) ,
- ( λ c x → x) ,
- ( λ c c' →
- concatenate-eq-leq-ℕ
- ( 3)
- ( inv
- ( compute-number-of-elements-is-finite count-empty is-finite-empty))
- ( star)) ,
- ( λ {star star → unit-trunc-Prop refl-walk-Undirected-Graph})
+ pr1 (pr1 methane) = unit-𝔽
+ pr2 (pr1 methane) x = empty-𝔽
+ pr1 (pr2 methane) c = t
+ pr1 (pr1 (pr2 (pr2 methane)) c) e = ex-falso (pr2 e)
+ pr2 (pr1 (pr2 (pr2 methane)) c) e = ex-falso (pr2 e)
+ pr1 (pr2 (pr2 (pr2 methane))) c x = x
+ pr1 (pr2 (pr2 (pr2 (pr2 methane)))) c c' =
+ concatenate-eq-leq-ℕ
+ ( 3)
+ ( inv (compute-number-of-elements-is-finite count-empty is-finite-empty))
+ ( star)
+ pr2 (pr2 (pr2 (pr2 (pr2 methane)))) star star =
+ unit-trunc-Prop refl-walk-Undirected-Graph
is-alkane-methane : is-alkane-hydrocarbon methane
is-alkane-methane c c' e e' = is-prop-empty e e'
diff --git a/src/reflection/group-solver.lagda.md b/src/reflection/group-solver.lagda.md
index 9893269ff5..9b2ca9c4d9 100644
--- a/src/reflection/group-solver.lagda.md
+++ b/src/reflection/group-solver.lagda.md
@@ -45,7 +45,7 @@ finEq zero-Fin (succ-Fin b) = inr (λ ())
finEq (succ-Fin a) zero-Fin = inr (λ ())
finEq (succ-Fin a) (succ-Fin b) with finEq a b
... | inl eq = inl (ap succ-Fin eq)
-... | inr neq = inr (λ { refl → neq refl})
+... | inr neq = inr (λ where refl → neq refl)
getVec : ∀ {n} {l} {A : UU l} → vec A n → Fin n → A
getVec (x ∷ v) zero-Fin = x
diff --git a/src/ring-theory/cyclic-rings.lagda.md b/src/ring-theory/cyclic-rings.lagda.md
index a9824d826b..c91b2430af 100644
--- a/src/ring-theory/cyclic-rings.lagda.md
+++ b/src/ring-theory/cyclic-rings.lagda.md
@@ -341,36 +341,35 @@ module _
( mul-Cyclic-Ring R g x))
( trunc-Prop
( fiber (map-initial-hom-Ring (ring-Cyclic-Ring R)) x))
- ( λ { (n , p) (k , q) →
- unit-trunc-Prop
- ( ( k) ,
- ( equational-reasoning
- integer-multiple-Cyclic-Ring R k
- ( one-Cyclic-Ring R)
- = integer-multiple-Cyclic-Ring R k
- ( integer-multiple-Cyclic-Ring R n g)
- by
- ap
- ( integer-multiple-Cyclic-Ring R k)
- ( inv p)
- = integer-multiple-Cyclic-Ring R n
- ( integer-multiple-Cyclic-Ring R k g)
- by
- swap-integer-multiple-Cyclic-Ring R k n g
- = integer-multiple-Cyclic-Ring R n
- ( mul-Cyclic-Ring R g x)
- by
- ap (integer-multiple-Cyclic-Ring R n) q
- = mul-Cyclic-Ring R
- ( integer-multiple-Cyclic-Ring R n g)
- ( x)
- by
- inv
- ( left-integer-multiple-law-mul-Cyclic-Ring R n g x)
- = mul-Cyclic-Ring R (one-Cyclic-Ring R) x
- by ap (mul-Cyclic-Ring' R x) p
- = x
- by left-unit-law-mul-Cyclic-Ring R x))}))
+ ( λ (n , p) (k , q) →
+ unit-trunc-Prop
+ ( ( k) ,
+ ( equational-reasoning
+ integer-multiple-Cyclic-Ring R k
+ ( one-Cyclic-Ring R)
+ = integer-multiple-Cyclic-Ring R k
+ ( integer-multiple-Cyclic-Ring R n g)
+ by
+ ap
+ ( integer-multiple-Cyclic-Ring R k)
+ ( inv p)
+ = integer-multiple-Cyclic-Ring R n
+ ( integer-multiple-Cyclic-Ring R k g)
+ by
+ swap-integer-multiple-Cyclic-Ring R k n g
+ = integer-multiple-Cyclic-Ring R n
+ ( mul-Cyclic-Ring R g x)
+ by
+ ap (integer-multiple-Cyclic-Ring R n) q
+ = mul-Cyclic-Ring R
+ ( integer-multiple-Cyclic-Ring R n g)
+ ( x)
+ by
+ inv (left-integer-multiple-law-mul-Cyclic-Ring R n g x)
+ = mul-Cyclic-Ring R (one-Cyclic-Ring R) x
+ by ap (mul-Cyclic-Ring' R x) p
+ = x
+ by left-unit-law-mul-Cyclic-Ring R x))))
abstract
is-generating-element-one-Cyclic-Ring :
@@ -482,8 +481,9 @@ module _
( is-surjective-initial-hom-Cyclic-Ring R x)
( is-surjective-initial-hom-Cyclic-Ring R y)
( Id-Prop (set-Cyclic-Ring R) _ _)
- ( λ { (n , refl) (m , refl) →
- commute-integer-multiples-diagonal-Ring (ring-Cyclic-Ring R) n m})
+ ( λ where
+ ( n , refl) (m , refl) →
+ commute-integer-multiples-diagonal-Ring (ring-Cyclic-Ring R) n m)
commutative-ring-Cyclic-Ring : Commutative-Ring l
pr1 commutative-ring-Cyclic-Ring = ring-Cyclic-Ring R
diff --git a/src/ring-theory/homomorphisms-cyclic-rings.lagda.md b/src/ring-theory/homomorphisms-cyclic-rings.lagda.md
index 01cb073ae0..9896912b0a 100644
--- a/src/ring-theory/homomorphisms-cyclic-rings.lagda.md
+++ b/src/ring-theory/homomorphisms-cyclic-rings.lagda.md
@@ -114,27 +114,28 @@ module _
( set-Ring S)
( map-hom-Ring (ring-Cyclic-Ring R) S f x)
( map-hom-Ring (ring-Cyclic-Ring R) S g x))
- ( λ { (n , refl) →
+ ( λ where
+ ( n , refl) →
+ ( preserves-integer-multiples-hom-Ring
+ ( ring-Cyclic-Ring R)
+ ( S)
+ ( f)
+ ( n)
+ ( one-Cyclic-Ring R)) ∙
+ ( ap
+ ( integer-multiple-Ring S n)
+ ( preserves-one-hom-Ring (ring-Cyclic-Ring R) S f)) ∙
+ ( inv
+ ( ap
+ ( integer-multiple-Ring S n)
+ ( preserves-one-hom-Ring (ring-Cyclic-Ring R) S g))) ∙
+ ( inv
( preserves-integer-multiples-hom-Ring
( ring-Cyclic-Ring R)
( S)
- ( f)
+ ( g)
( n)
- ( one-Cyclic-Ring R)) ∙
- ( ap
- ( integer-multiple-Ring S n)
- ( preserves-one-hom-Ring (ring-Cyclic-Ring R) S f)) ∙
- ( inv
- ( ap
- ( integer-multiple-Ring S n)
- ( preserves-one-hom-Ring (ring-Cyclic-Ring R) S g))) ∙
- ( inv
- ( preserves-integer-multiples-hom-Ring
- ( ring-Cyclic-Ring R)
- ( S)
- ( g)
- ( n)
- ( one-Cyclic-Ring R)))})
+ ( one-Cyclic-Ring R))))
all-elements-equal-hom-Cyclic-Ring-Ring :
all-elements-equal (hom-Ring (ring-Cyclic-Ring R) S)
diff --git a/src/ring-theory/ideals-generated-by-subsets-rings.lagda.md b/src/ring-theory/ideals-generated-by-subsets-rings.lagda.md
index ed5a44efae..4f72a0479e 100644
--- a/src/ring-theory/ideals-generated-by-subsets-rings.lagda.md
+++ b/src/ring-theory/ideals-generated-by-subsets-rings.lagda.md
@@ -520,18 +520,19 @@ module _
( a i)
( unit-trunc-Prop (i , refl))
- is-ideal-generated-by-family-of-elements-ideal-family-of-elements-Ring :
- is-ideal-generated-by-family-of-elements-Ring R a
- ideal-family-of-elements-Ring
- contains-element-ideal-family-of-elements-Ring
- is-ideal-generated-by-family-of-elements-ideal-family-of-elements-Ring J H =
- is-ideal-generated-by-subset-ideal-subset-Ring R
- ( generating-subset-ideal-family-of-elements-Ring)
- ( J)
- ( λ x p →
- apply-universal-property-trunc-Prop p
- ( subset-ideal-Ring R J x)
- ( λ { (i , refl) → H}))
+ abstract
+ is-ideal-generated-by-family-of-elements-ideal-family-of-elements-Ring :
+ is-ideal-generated-by-family-of-elements-Ring R a
+ ideal-family-of-elements-Ring
+ contains-element-ideal-family-of-elements-Ring
+ is-ideal-generated-by-family-of-elements-ideal-family-of-elements-Ring J H =
+ is-ideal-generated-by-subset-ideal-subset-Ring R
+ ( generating-subset-ideal-family-of-elements-Ring)
+ ( J)
+ ( λ x p →
+ apply-universal-property-trunc-Prop p
+ ( subset-ideal-Ring R J x)
+ ( λ where (i , refl) → H))
```
## Properties
@@ -556,15 +557,16 @@ module _
( is-closed-under-left-multiplication-ideal-Ring R I _ _ (pr2 u)))
( cases-forward-inclusion-idempotent-ideal-subset-Ring l)
- forward-inclusion-idempotent-ideal-subset-Ring :
- leq-ideal-Ring R
- ( ideal-subset-Ring R (subset-ideal-Ring R I))
- ( I)
- forward-inclusion-idempotent-ideal-subset-Ring x H =
- apply-universal-property-trunc-Prop H
- ( subset-ideal-Ring R I x)
- ( λ { (l , refl) →
- cases-forward-inclusion-idempotent-ideal-subset-Ring l})
+ abstract
+ forward-inclusion-idempotent-ideal-subset-Ring :
+ leq-ideal-Ring R
+ ( ideal-subset-Ring R (subset-ideal-Ring R I))
+ ( I)
+ forward-inclusion-idempotent-ideal-subset-Ring x H =
+ apply-universal-property-trunc-Prop H
+ ( subset-ideal-Ring R I x)
+ ( λ where
+ ( l , refl) → cases-forward-inclusion-idempotent-ideal-subset-Ring l)
backward-inclusion-idempotent-ideal-subset-Ring :
leq-ideal-Ring R
diff --git a/src/ring-theory/left-ideals-generated-by-subsets-rings.lagda.md b/src/ring-theory/left-ideals-generated-by-subsets-rings.lagda.md
index 5a23030247..a506870555 100644
--- a/src/ring-theory/left-ideals-generated-by-subsets-rings.lagda.md
+++ b/src/ring-theory/left-ideals-generated-by-subsets-rings.lagda.md
@@ -485,19 +485,20 @@ module _
( a i)
( unit-trunc-Prop (i , refl))
- is-left-ideal-generated-by-family-of-elements-left-ideal-family-of-elements-Ring :
- is-left-ideal-generated-by-family-of-elements-Ring R a
- left-ideal-family-of-elements-Ring
- contains-element-left-ideal-family-of-elements-Ring
- is-left-ideal-generated-by-family-of-elements-left-ideal-family-of-elements-Ring
- J H =
- is-left-ideal-generated-by-subset-left-ideal-subset-Ring R
- ( generating-subset-left-ideal-family-of-elements-Ring)
- ( J)
- ( λ x p →
- apply-universal-property-trunc-Prop p
- ( subset-left-ideal-Ring R J x)
- ( λ { (i , refl) → H i}))
+ abstract
+ is-left-ideal-generated-by-family-of-elements-left-ideal-family-of-elements-Ring :
+ is-left-ideal-generated-by-family-of-elements-Ring R a
+ left-ideal-family-of-elements-Ring
+ contains-element-left-ideal-family-of-elements-Ring
+ is-left-ideal-generated-by-family-of-elements-left-ideal-family-of-elements-Ring
+ J H =
+ is-left-ideal-generated-by-subset-left-ideal-subset-Ring R
+ ( generating-subset-left-ideal-family-of-elements-Ring)
+ ( J)
+ ( λ x p →
+ apply-universal-property-trunc-Prop p
+ ( subset-left-ideal-Ring R J x)
+ ( λ where (i , refl) → H i))
```
## Properties
@@ -521,15 +522,17 @@ module _
( is-closed-under-left-multiplication-left-ideal-Ring R I x y u)
( cases-forward-inclusion-idempotent-left-ideal-subset-Ring l)
- forward-inclusion-idempotent-left-ideal-subset-Ring :
- leq-left-ideal-Ring R
- ( left-ideal-subset-Ring R (subset-left-ideal-Ring R I))
- ( I)
- forward-inclusion-idempotent-left-ideal-subset-Ring x H =
- apply-universal-property-trunc-Prop H
- ( subset-left-ideal-Ring R I x)
- ( λ { (l , refl) →
- cases-forward-inclusion-idempotent-left-ideal-subset-Ring l})
+ abstract
+ forward-inclusion-idempotent-left-ideal-subset-Ring :
+ leq-left-ideal-Ring R
+ ( left-ideal-subset-Ring R (subset-left-ideal-Ring R I))
+ ( I)
+ forward-inclusion-idempotent-left-ideal-subset-Ring x H =
+ apply-universal-property-trunc-Prop H
+ ( subset-left-ideal-Ring R I x)
+ ( λ where
+ ( l , refl) →
+ cases-forward-inclusion-idempotent-left-ideal-subset-Ring l)
backward-inclusion-idempotent-left-ideal-subset-Ring :
leq-left-ideal-Ring R
diff --git a/src/ring-theory/products-subsets-rings.lagda.md b/src/ring-theory/products-subsets-rings.lagda.md
index 8afbf82847..157d8910ef 100644
--- a/src/ring-theory/products-subsets-rings.lagda.md
+++ b/src/ring-theory/products-subsets-rings.lagda.md
@@ -53,31 +53,37 @@ module _
{I : UU l3} (T : I → subset-Ring l4 A)
where
- forward-inclusion-distributive-product-union-family-of-subsets-Ring :
- product-subset-Ring A S (union-family-of-subtypes T) ⊆
- union-family-of-subtypes (λ i → product-subset-Ring A S (T i))
- forward-inclusion-distributive-product-union-family-of-subsets-Ring x p =
- apply-universal-property-trunc-Prop p
- ( union-family-of-subtypes (λ i → product-subset-Ring A S (T i)) x)
- ( λ { ((s , Hs) , (t , Ht) , refl) →
- apply-universal-property-trunc-Prop Ht
- ( union-family-of-subtypes (λ i → product-subset-Ring A S (T i)) x)
- ( λ (i , Ht') →
- unit-trunc-Prop
- ( i , unit-trunc-Prop ((s , Hs) , (t , Ht') , refl)))})
-
- backward-inclusion-distributive-product-union-family-of-subsets-Ring :
- union-family-of-subtypes (λ i → product-subset-Ring A S (T i)) ⊆
- product-subset-Ring A S (union-family-of-subtypes T)
- backward-inclusion-distributive-product-union-family-of-subsets-Ring x p =
- apply-universal-property-trunc-Prop p
- ( product-subset-Ring A S (union-family-of-subtypes T) x)
- ( λ (i , u) →
- apply-universal-property-trunc-Prop u
- ( product-subset-Ring A S (union-family-of-subtypes T) x)
- ( λ {((s , Hs) , (t , Ht) , refl) →
- unit-trunc-Prop
- ( (s , Hs) , (t , unit-trunc-Prop (i , Ht)) , refl)}))
+ abstract
+ forward-inclusion-distributive-product-union-family-of-subsets-Ring :
+ product-subset-Ring A S (union-family-of-subtypes T) ⊆
+ union-family-of-subtypes (λ i → product-subset-Ring A S (T i))
+ forward-inclusion-distributive-product-union-family-of-subsets-Ring x p =
+ apply-universal-property-trunc-Prop p
+ ( union-family-of-subtypes (λ i → product-subset-Ring A S (T i)) x)
+ ( λ where
+ ( ( s , Hs) , (t , Ht) , refl) →
+ apply-universal-property-trunc-Prop Ht
+ ( union-family-of-subtypes
+ ( λ i → product-subset-Ring A S (T i))
+ ( x))
+ ( λ (i , Ht') →
+ unit-trunc-Prop
+ ( i , unit-trunc-Prop ((s , Hs) , (t , Ht') , refl))))
+
+ abstract
+ backward-inclusion-distributive-product-union-family-of-subsets-Ring :
+ union-family-of-subtypes (λ i → product-subset-Ring A S (T i)) ⊆
+ product-subset-Ring A S (union-family-of-subtypes T)
+ backward-inclusion-distributive-product-union-family-of-subsets-Ring x p =
+ apply-universal-property-trunc-Prop p
+ ( product-subset-Ring A S (union-family-of-subtypes T) x)
+ ( λ (i , u) →
+ apply-universal-property-trunc-Prop u
+ ( product-subset-Ring A S (union-family-of-subtypes T) x)
+ ( λ where
+ ( ( s , Hs) , (t , Ht) , refl) →
+ unit-trunc-Prop
+ ( (s , Hs) , (t , unit-trunc-Prop (i , Ht)) , refl)))
distributive-product-union-family-of-subsets-Ring :
product-subset-Ring A S (union-family-of-subtypes T) =
@@ -100,57 +106,61 @@ module _
(T : subset-Ring l4 A)
where
- forward-inclusion-associative-product-subset-Ring :
- ( product-subset-Ring A
- ( product-subset-Ring A R S)
- ( T)) ⊆
- ( product-subset-Ring A
- ( R)
- ( product-subset-Ring A S T))
- forward-inclusion-associative-product-subset-Ring x H =
- apply-universal-property-trunc-Prop H
- ( product-subset-Ring A R
- ( product-subset-Ring A S T)
- ( x))
- ( λ { ((u , K) , (t , Ht) , refl) →
+ abstract
+ forward-inclusion-associative-product-subset-Ring :
+ ( product-subset-Ring A
+ ( product-subset-Ring A R S)
+ ( T)) ⊆
+ ( product-subset-Ring A
+ ( R)
+ ( product-subset-Ring A S T))
+ forward-inclusion-associative-product-subset-Ring x H =
+ apply-universal-property-trunc-Prop H
+ ( product-subset-Ring A R
+ ( product-subset-Ring A S T)
+ ( x))
+ ( λ where
+ ( ( u , K) , (t , Ht) , refl) →
apply-universal-property-trunc-Prop K
( product-subset-Ring A R
( product-subset-Ring A S T)
( _))
- ( λ { ((r , Hr) , (s , Hs) , refl) →
- unit-trunc-Prop
- ( ( r , Hr) ,
- ( mul-Ring A s t ,
- unit-trunc-Prop
- ( (s , Hs) , (t , Ht) , refl)) ,
- ( associative-mul-Ring A r s t))})})
-
- backward-inclusion-associative-product-subset-Ring :
- ( product-subset-Ring A
- ( R)
- ( product-subset-Ring A S T)) ⊆
- ( product-subset-Ring A
- ( product-subset-Ring A R S)
- ( T))
- backward-inclusion-associative-product-subset-Ring x H =
- apply-universal-property-trunc-Prop H
+ ( λ where
+ ( ( r , Hr) , (s , Hs) , refl) →
+ unit-trunc-Prop
+ ( ( r , Hr) ,
+ ( ( mul-Ring A s t) ,
+ ( unit-trunc-Prop ((s , Hs) , (t , Ht) , refl))) ,
+ ( associative-mul-Ring A r s t))))
+
+ abstract
+ backward-inclusion-associative-product-subset-Ring :
+ ( product-subset-Ring A
+ ( R)
+ ( product-subset-Ring A S T)) ⊆
( product-subset-Ring A
( product-subset-Ring A R S)
- ( T)
- ( x))
- ( λ { ((r , Hr) , (v , K) , refl) →
- apply-universal-property-trunc-Prop K
- ( product-subset-Ring A
- ( product-subset-Ring A R S)
- ( T)
- ( _))
- ( λ { ((s , Hs) , (t , Ht) , refl) →
- unit-trunc-Prop
- ( ( mul-Ring A r s ,
+ ( T))
+ backward-inclusion-associative-product-subset-Ring x H =
+ apply-universal-property-trunc-Prop H
+ ( product-subset-Ring A
+ ( product-subset-Ring A R S)
+ ( T)
+ ( x))
+ ( λ where
+ ( ( r , Hr) , (v , K) , refl) →
+ apply-universal-property-trunc-Prop K
+ ( product-subset-Ring A
+ ( product-subset-Ring A R S)
+ ( T)
+ ( _))
+ ( λ where
+ ( ( s , Hs) , (t , Ht) , refl) →
unit-trunc-Prop
- ( (r , Hr) , (s , Hs) , refl)) ,
- ( t , Ht) ,
- ( inv (associative-mul-Ring A r s t)))})})
+ ( ( ( mul-Ring A r s) ,
+ ( unit-trunc-Prop ((r , Hr) , (s , Hs) , refl))) ,
+ ( t , Ht) ,
+ ( inv (associative-mul-Ring A r s t)))))
associative-product-subset-Ring :
product-subset-Ring A
diff --git a/src/ring-theory/right-ideals-generated-by-subsets-rings.lagda.md b/src/ring-theory/right-ideals-generated-by-subsets-rings.lagda.md
index 1bd74b6b2b..237aaa0d0a 100644
--- a/src/ring-theory/right-ideals-generated-by-subsets-rings.lagda.md
+++ b/src/ring-theory/right-ideals-generated-by-subsets-rings.lagda.md
@@ -484,19 +484,20 @@ module _
( a i)
( unit-trunc-Prop (i , refl))
- is-right-ideal-generated-by-family-of-elements-right-ideal-family-of-elements-Ring :
- is-right-ideal-generated-by-family-of-elements-Ring R a
- right-ideal-family-of-elements-Ring
- contains-element-right-ideal-family-of-elements-Ring
- is-right-ideal-generated-by-family-of-elements-right-ideal-family-of-elements-Ring
- J H =
- is-right-ideal-generated-by-subset-right-ideal-subset-Ring R
- ( generating-subset-right-ideal-family-of-elements-Ring)
- ( J)
- ( λ x p →
- apply-universal-property-trunc-Prop p
- ( subset-right-ideal-Ring R J x)
- ( λ { (i , refl) → H i}))
+ abstract
+ is-right-ideal-generated-by-family-of-elements-right-ideal-family-of-elements-Ring :
+ is-right-ideal-generated-by-family-of-elements-Ring R a
+ right-ideal-family-of-elements-Ring
+ contains-element-right-ideal-family-of-elements-Ring
+ is-right-ideal-generated-by-family-of-elements-right-ideal-family-of-elements-Ring
+ J H =
+ is-right-ideal-generated-by-subset-right-ideal-subset-Ring R
+ ( generating-subset-right-ideal-family-of-elements-Ring)
+ ( J)
+ ( λ x p →
+ apply-universal-property-trunc-Prop p
+ ( subset-right-ideal-Ring R J x)
+ ( λ where (i , refl) → H i))
```
## Properties
@@ -521,15 +522,17 @@ module _
( is-closed-under-right-multiplication-right-ideal-Ring R I x y u)
( cases-forward-inclusion-idempotent-right-ideal-subset-Ring l)
- forward-inclusion-idempotent-right-ideal-subset-Ring :
- leq-right-ideal-Ring R
- ( right-ideal-subset-Ring R (subset-right-ideal-Ring R I))
- ( I)
- forward-inclusion-idempotent-right-ideal-subset-Ring x H =
- apply-universal-property-trunc-Prop H
- ( subset-right-ideal-Ring R I x)
- ( λ { (l , refl) →
- cases-forward-inclusion-idempotent-right-ideal-subset-Ring l})
+ abstract
+ forward-inclusion-idempotent-right-ideal-subset-Ring :
+ leq-right-ideal-Ring R
+ ( right-ideal-subset-Ring R (subset-right-ideal-Ring R I))
+ ( I)
+ forward-inclusion-idempotent-right-ideal-subset-Ring x H =
+ apply-universal-property-trunc-Prop H
+ ( subset-right-ideal-Ring R I x)
+ ( λ where
+ ( l , refl) →
+ cases-forward-inclusion-idempotent-right-ideal-subset-Ring l)
backward-inclusion-idempotent-right-ideal-subset-Ring :
leq-right-ideal-Ring R
diff --git a/src/set-theory/countable-sets.lagda.md b/src/set-theory/countable-sets.lagda.md
index 38b116dc60..b80c9c5341 100644
--- a/src/set-theory/countable-sets.lagda.md
+++ b/src/set-theory/countable-sets.lagda.md
@@ -143,25 +143,25 @@ module _
is-surjective-f : is-surjective f
is-surjective-f x = unit-trunc-Prop (pair (inl x) refl)
- is-countable-is-directly-countable :
- is-directly-countable X → is-countable X
- is-countable-is-directly-countable H =
- apply-universal-property-trunc-Prop H
- ( is-countable-Prop X)
- ( λ P →
- unit-trunc-Prop
- ( pair
- ( λ {
- zero-ℕ → inr star ;
- (succ-ℕ n) → inl ((shift-ℕ a (pr1 P)) n)})
- ( λ {
- (inl x) →
- apply-universal-property-trunc-Prop (pr2 P x)
- ( trunc-Prop (fiber _ (inl x)))
- ( λ { (pair n p) →
- unit-trunc-Prop
- ( pair (succ-ℕ (succ-ℕ n)) (ap inl p))}) ;
- (inr star) → unit-trunc-Prop (pair zero-ℕ refl)})))
+ abstract
+ is-countable-is-directly-countable :
+ is-directly-countable X → is-countable X
+ is-countable-is-directly-countable H =
+ apply-universal-property-trunc-Prop H
+ ( is-countable-Prop X)
+ ( λ P →
+ unit-trunc-Prop
+ ( ( λ where
+ zero-ℕ → inr star
+ (succ-ℕ n) → inl ((shift-ℕ a (pr1 P)) n)) ,
+ ( λ where
+ ( inl x) →
+ apply-universal-property-trunc-Prop (pr2 P x)
+ ( trunc-Prop (fiber _ (inl x)))
+ ( λ (n , p) →
+ unit-trunc-Prop
+ ( succ-ℕ (succ-ℕ n) , ap inl p))
+ ( inr star) → unit-trunc-Prop (zero-ℕ , refl))))
```
## Properties
@@ -177,37 +177,33 @@ module _
decidable-subprojection-ℕ-enumeration :
enumeration X → decidable-subprojection-ℕ X
- decidable-subprojection-ℕ-enumeration (f , H) =
- pair
- ( λ n →
- ( ¬ ((f n) = (inr star))) ,
- ( ( is-prop-neg) ,
- ( is-decidable-is-not-exception-Maybe (f n))))
- ( pair
- ( λ {(n , p) → value-is-not-exception-Maybe (f n) p})
- ( λ x →
- ( apply-universal-property-trunc-Prop (H (inl x))
- ( trunc-Prop (fiber _ x))
- ( λ (n , p) →
- ( unit-trunc-Prop
- ( pair
- ( pair n
- ( is-not-exception-is-value-Maybe
- ( f n) (x , inv p)))
- ( is-injective-inl
- ( ( eq-is-not-exception-Maybe
- ( f n)
- ( is-not-exception-is-value-Maybe
- ( f n) (x , inv p))) ∙
- ( p)))))))))
+ pr1 (pr1 (decidable-subprojection-ℕ-enumeration (f , H)) n) =
+ ¬ ((f n) = (inr star))
+ pr1 (pr2 (pr1 (decidable-subprojection-ℕ-enumeration (f , H)) n)) =
+ is-prop-neg
+ pr2 (pr2 (pr1 (decidable-subprojection-ℕ-enumeration (f , H)) n)) =
+ is-decidable-is-not-exception-Maybe (f n)
+ pr1 (pr2 (decidable-subprojection-ℕ-enumeration (f , H))) (n , p) =
+ value-is-not-exception-Maybe (f n) p
+ pr2 (pr2 (decidable-subprojection-ℕ-enumeration (f , H))) x =
+ apply-universal-property-trunc-Prop (H (inl x))
+ ( trunc-Prop (fiber _ x))
+ ( λ (n , p) →
+ unit-trunc-Prop
+ ( ( n , is-not-exception-is-value-Maybe (f n) (x , inv p)) ,
+ ( is-injective-inl
+ ( ( eq-is-not-exception-Maybe
+ ( f n)
+ ( is-not-exception-is-value-Maybe
+ ( f n) (x , inv p))) ∙
+ ( p)))))
is-countable'-is-countable :
is-countable X → is-countable' X
is-countable'-is-countable H =
apply-universal-property-trunc-Prop H
( is-countable-Prop' X)
- ( λ E →
- ( unit-trunc-Prop (decidable-subprojection-ℕ-enumeration E)))
+ ( λ E → unit-trunc-Prop (decidable-subprojection-ℕ-enumeration E))
```
Second, we will prove `is-countable' X → is-countable X`.
@@ -248,26 +244,28 @@ module _
( n)
(pr2 (pr2 (shift-decidable-subtype-ℕ n)))
- is-surjective-map-enumeration-decidable-subprojection-ℕ :
- ( is-surjective f) →
- ( is-surjective map-enumeration-decidable-subprojection-ℕ)
- is-surjective-map-enumeration-decidable-subprojection-ℕ H (inl x) =
- ( apply-universal-property-trunc-Prop (H x)
- (trunc-Prop (fiber map-enumeration-decidable-subprojection-ℕ (inl x)))
- ( λ { ((n , s) , refl) →
- ( unit-trunc-Prop
- ( succ-ℕ n ,
- ( ap
- ( cases-map-decidable-subtype-ℕ X
- ( shift-decidable-subtype-ℕ)
- ( map-shift-decidable-subtype-ℕ)
- (succ-ℕ n))
- ( pr1
- ( is-prop-is-decidable (pr1 (pr2 (P n)))
- ( pr2 (pr2 (P n)))
- ( inl s))))))}))
- is-surjective-map-enumeration-decidable-subprojection-ℕ H (inr star) =
- ( unit-trunc-Prop (0 , refl))
+ abstract
+ is-surjective-map-enumeration-decidable-subprojection-ℕ :
+ ( is-surjective f) →
+ ( is-surjective map-enumeration-decidable-subprojection-ℕ)
+ is-surjective-map-enumeration-decidable-subprojection-ℕ H (inl x) =
+ ( apply-universal-property-trunc-Prop (H x)
+ ( trunc-Prop (fiber map-enumeration-decidable-subprojection-ℕ (inl x)))
+ ( λ where
+ ( ( n , s) , refl) →
+ unit-trunc-Prop
+ ( ( succ-ℕ n) ,
+ ( ap
+ ( cases-map-decidable-subtype-ℕ X
+ ( shift-decidable-subtype-ℕ)
+ ( map-shift-decidable-subtype-ℕ)
+ (succ-ℕ n))
+ ( pr1
+ ( is-prop-is-decidable (pr1 (pr2 (P n)))
+ ( pr2 (pr2 (P n)))
+ ( inl s)))))))
+ is-surjective-map-enumeration-decidable-subprojection-ℕ H (inr star) =
+ ( unit-trunc-Prop (0 , refl))
module _
{l : Level} (X : Set l)
@@ -337,14 +335,16 @@ module _
The set of natural numbers ℕ is itself countable.
```agda
-is-countable-ℕ : is-countable ℕ-Set
-is-countable-ℕ =
- unit-trunc-Prop
- ( pair
- ( λ { zero-ℕ → inr star ; (succ-ℕ n) → inl n})
- ( λ {
- (inl n) → unit-trunc-Prop (pair (succ-ℕ n) refl) ;
- (inr star) → unit-trunc-Prop (pair zero-ℕ refl)}))
+abstract
+ is-countable-ℕ : is-countable ℕ-Set
+ is-countable-ℕ =
+ unit-trunc-Prop
+ ( ( λ where
+ zero-ℕ → inr star
+ (succ-ℕ n) → inl n) ,
+ ( λ where
+ ( inl n) → unit-trunc-Prop (succ-ℕ n , refl)
+ ( inr star) → unit-trunc-Prop (zero-ℕ , refl)))
```
The empty set is countable.
@@ -352,22 +352,24 @@ The empty set is countable.
```agda
is-countable-empty : is-countable empty-Set
is-countable-empty =
- is-countable-is-countable' empty-Set
- (unit-trunc-Prop
- ( ( λ x → empty-Decidable-Prop) ,
- ( λ {()}) , λ {()}))
+ is-countable-is-countable'
+ ( empty-Set)
+ ( unit-trunc-Prop ((λ _ → empty-Decidable-Prop) , (λ ()) , (λ ())))
```
The unit set is countable.
```agda
-is-countable-unit : is-countable unit-Set
-is-countable-unit =
- unit-trunc-Prop
- ( ( λ { zero-ℕ → inl star ; (succ-ℕ x) → inr star}) ,
- ( λ {
- ( inl star) → unit-trunc-Prop (0 , refl) ;
- ( inr star) → unit-trunc-Prop (1 , refl)}))
+abstract
+ is-countable-unit : is-countable unit-Set
+ is-countable-unit =
+ unit-trunc-Prop
+ ( ( λ where
+ zero-ℕ → inl star
+ (succ-ℕ x) → inr star) ,
+ ( λ where
+ ( inl star) → unit-trunc-Prop (0 , refl)
+ ( inr star) → unit-trunc-Prop (1 , refl)))
```
If `X` and `Y` are countable sets, then so is their coproduct `X + Y`.
diff --git a/src/set-theory/cumulative-hierarchy.lagda.md b/src/set-theory/cumulative-hierarchy.lagda.md
index 6ce0932a89..7dae074724 100644
--- a/src/set-theory/cumulative-hierarchy.lagda.md
+++ b/src/set-theory/cumulative-hierarchy.lagda.md
@@ -625,22 +625,25 @@ needed.
bool-map (map-raise true) = x
bool-map (map-raise false) = y
- pair-axiom-cumulative-hierarchy :
- ( x y v : type-pseudo-cumulative-hierarchy V) →
- ( ∈-cumulative-hierarchy v (pair-cumulative-hierarchy x y) ↔
- type-trunc-Prop ( (v = x) + (v = y)))
- pair-axiom-cumulative-hierarchy x y v =
- pair
- ( λ H → map-universal-property-trunc-Prop
+ abstract
+ pair-axiom-cumulative-hierarchy :
+ ( x y v : type-pseudo-cumulative-hierarchy V) →
+ ( ∈-cumulative-hierarchy v (pair-cumulative-hierarchy x y) ↔
+ type-trunc-Prop ( (v = x) + (v = y)))
+ pr1 (pair-axiom-cumulative-hierarchy x y v) H =
+ map-universal-property-trunc-Prop
( trunc-Prop ((v = x) + (v = y)))
- ( λ { ( map-raise true , p) → unit-trunc-Prop (inl (inv p)) ;
- ( map-raise false , p) → unit-trunc-Prop (inr (inv p))})
- ( ∈-cumulative-hierarchy-mere-preimage H))
- ( λ H → mere-preimage-∈-cumulative-hierarchy
+ ( λ where
+ ( map-raise true , p) → unit-trunc-Prop (inl (inv p))
+ ( map-raise false , p) → unit-trunc-Prop (inr (inv p)))
+ ( ∈-cumulative-hierarchy-mere-preimage H)
+ pr2 (pair-axiom-cumulative-hierarchy x y v) H =
+ mere-preimage-∈-cumulative-hierarchy
( map-trunc-Prop
- ( λ { ( inl p) → (map-raise true , inv p) ;
- ( inr p) → (map-raise false , inv p)})
- ( H)))
+ ( λ where
+ ( inl p) → (map-raise true , inv p)
+ ( inr p) → (map-raise false , inv p))
+ ( H))
```
### Singleton function
@@ -668,26 +671,25 @@ needed.
( ℕ-map (map-raise x))
( singleton-cumulative-hierarchy (ℕ-map (map-raise x)))
- infinity-axiom-cumulative-hierarchy :
- ( ∈-cumulative-hierarchy
- empty-set-cumulative-hierarchy
- infinity-cumulative-hierarchy) ×
- ( ( x : type-pseudo-cumulative-hierarchy V) →
- ∈-cumulative-hierarchy x infinity-cumulative-hierarchy →
- ∈-cumulative-hierarchy
- ( pair-cumulative-hierarchy x
- ( singleton-cumulative-hierarchy x))
- ( infinity-cumulative-hierarchy))
- infinity-axiom-cumulative-hierarchy =
- pair
- ( mere-preimage-∈-cumulative-hierarchy
- ( unit-trunc-Prop (map-raise zero-ℕ , refl)))
- ( λ x H →
- mere-preimage-∈-cumulative-hierarchy
- ( map-trunc-Prop
- ( λ {((map-raise n) , refl) →
- map-raise (succ-ℕ n) , refl})
- ( ∈-cumulative-hierarchy-mere-preimage H)))
+ abstract
+ infinity-axiom-cumulative-hierarchy :
+ ( ∈-cumulative-hierarchy
+ empty-set-cumulative-hierarchy
+ infinity-cumulative-hierarchy) ×
+ ( ( x : type-pseudo-cumulative-hierarchy V) →
+ ∈-cumulative-hierarchy x infinity-cumulative-hierarchy →
+ ∈-cumulative-hierarchy
+ ( pair-cumulative-hierarchy x
+ ( singleton-cumulative-hierarchy x))
+ ( infinity-cumulative-hierarchy))
+ pr1 infinity-axiom-cumulative-hierarchy =
+ mere-preimage-∈-cumulative-hierarchy
+ ( unit-trunc-Prop (map-raise zero-ℕ , refl))
+ pr2 infinity-axiom-cumulative-hierarchy x H =
+ mere-preimage-∈-cumulative-hierarchy
+ ( map-trunc-Prop
+ ( λ where ((map-raise n) , refl) → (map-raise (succ-ℕ n) , refl))
+ ( ∈-cumulative-hierarchy-mere-preimage H))
```
### Cumulative hierarchies satisfy the ∈-induction axiom
@@ -716,43 +718,46 @@ needed.
### Cumulative hierarchies satisfy the replacement axiom
```agda
- replacement-cumulative-hierarchy :
- ( x : type-pseudo-cumulative-hierarchy V) →
- ( r : type-pseudo-cumulative-hierarchy V →
- type-pseudo-cumulative-hierarchy V) →
- ∃ ( type-pseudo-cumulative-hierarchy V)
- ( λ v →
- ( y : type-pseudo-cumulative-hierarchy V) →
- ∈-cumulative-hierarchy y v ↔
- ∃ ( type-pseudo-cumulative-hierarchy V)
- ( λ z → (∈-cumulative-hierarchy z x) × (y = r z)))
- replacement-cumulative-hierarchy x r =
- map-universal-property-trunc-Prop
- ( ∃-Prop (type-pseudo-cumulative-hierarchy V) _)
- ( λ {(A , f , refl) →
- unit-trunc-Prop
- ( pair
- ( set-pseudo-cumulative-hierarchy V (r ∘ f))
- ( λ y →
- ( pair
- ( λ H →
- map-trunc-Prop
- ( λ {(a , refl) →
- pair (f a)
- ( pair
- ( mere-preimage-∈-cumulative-hierarchy
- ( unit-trunc-Prop (a , refl)))
- ( refl))})
- ( ∈-cumulative-hierarchy-mere-preimage H))
- ( λ H → mere-preimage-∈-cumulative-hierarchy
- ( map-universal-property-trunc-Prop
- ( ∃-Prop A _)
- ( λ {(z , K , refl) →
- ( map-trunc-Prop
- ( λ {(a , refl) → (a , refl)})
- ( ∈-cumulative-hierarchy-mere-preimage K))})
- ( H))))))})
- ( underlying-function-cumulative-hierarchy x)
+ abstract
+ replacement-cumulative-hierarchy :
+ ( x : type-pseudo-cumulative-hierarchy V) →
+ ( r : type-pseudo-cumulative-hierarchy V →
+ type-pseudo-cumulative-hierarchy V) →
+ ∃ ( type-pseudo-cumulative-hierarchy V)
+ ( λ v →
+ ( y : type-pseudo-cumulative-hierarchy V) →
+ ∈-cumulative-hierarchy y v ↔
+ ∃ ( type-pseudo-cumulative-hierarchy V)
+ ( λ z → (∈-cumulative-hierarchy z x) × (y = r z)))
+ replacement-cumulative-hierarchy x r =
+ map-universal-property-trunc-Prop
+ ( ∃-Prop (type-pseudo-cumulative-hierarchy V) _)
+ ( λ where
+ ( A , f , refl) →
+ unit-trunc-Prop
+ ( ( set-pseudo-cumulative-hierarchy V (r ∘ f)) ,
+ ( λ y →
+ ( pair
+ ( λ H →
+ map-trunc-Prop
+ ( λ where
+ ( a , refl) →
+ (f a) ,
+ ( mere-preimage-∈-cumulative-hierarchy
+ ( unit-trunc-Prop (a , refl))) ,
+ ( refl))
+ ( ∈-cumulative-hierarchy-mere-preimage H))
+ ( λ H →
+ mere-preimage-∈-cumulative-hierarchy
+ ( map-universal-property-trunc-Prop
+ ( ∃-Prop A _)
+ ( λ where
+ ( z , K , refl) →
+ map-trunc-Prop
+ ( λ where (a , refl) → (a , refl))
+ ( ∈-cumulative-hierarchy-mere-preimage K))
+ ( H)))))))
+ ( underlying-function-cumulative-hierarchy x)
```
## References
diff --git a/src/synthetic-homotopy-theory/coforks.lagda.md b/src/synthetic-homotopy-theory/coforks.lagda.md
index e0d242d305..00aadf444e 100644
--- a/src/synthetic-homotopy-theory/coforks.lagda.md
+++ b/src/synthetic-homotopy-theory/coforks.lagda.md
@@ -276,16 +276,16 @@ module _
( c))) ·r
( inl)) ,
( refl-htpy) ,
- ( λ {
- (inl a) →
+ ( λ where
+ ( inl a) →
inv
( left-inv
( coherence-square-cocone
( codiagonal A)
( ind-coprod (λ _ → B) f g)
( c)
- ( inl a))) ;
- (inr a) → right-unit}))
+ ( inl a)))
+ ( inr a) → right-unit))
is-equiv-cofork-cocone-codiagonal :
is-equiv cofork-cocone-codiagonal
diff --git a/src/synthetic-homotopy-theory/dependent-coforks.lagda.md b/src/synthetic-homotopy-theory/dependent-coforks.lagda.md
index 6dbe72ff61..f21a37d7fa 100644
--- a/src/synthetic-homotopy-theory/dependent-coforks.lagda.md
+++ b/src/synthetic-homotopy-theory/dependent-coforks.lagda.md
@@ -350,8 +350,8 @@ module _
( inl)) ,
( refl-htpy) ,
( right-unit-htpy ∙h
- ( λ {
- (inl a) →
+ ( λ where
+ ( inl a) →
inv
( ( ap
( _∙
@@ -378,8 +378,8 @@ module _
( cocone-codiagonal-cofork f g e)
( P)
( d)
- ( inl a)))) ;
- (inr a) →
+ ( inl a))))
+ ( inr a) →
ap
( _∙
coherence-square-dependent-cocone
@@ -398,7 +398,7 @@ module _
( cocone-codiagonal-cofork f g e)
( P)
( d)
- ( inl a))))})))
+ ( inl a)))))))
is-equiv-dependent-cofork-dependent-cocone-codiagonal :
is-equiv dependent-cofork-dependent-cocone-codiagonal
diff --git a/src/trees/combinator-directed-trees.lagda.md b/src/trees/combinator-directed-trees.lagda.md
index ba130ca49a..8e018d6c5f 100644
--- a/src/trees/combinator-directed-trees.lagda.md
+++ b/src/trees/combinator-directed-trees.lagda.md
@@ -19,7 +19,7 @@ open import foundation.function-types
open import foundation.functoriality-dependent-pair-types
open import foundation.homotopies
open import foundation.identity-types
-open import foundation.isolated-points
+open import foundation.isolated-elements
open import foundation.maybe
open import foundation.negation
open import foundation.propositions
diff --git a/src/trees/directed-trees.lagda.md b/src/trees/directed-trees.lagda.md
index 629fb4c5bb..629b588104 100644
--- a/src/trees/directed-trees.lagda.md
+++ b/src/trees/directed-trees.lagda.md
@@ -21,7 +21,7 @@ open import foundation.equivalences
open import foundation.function-types
open import foundation.functoriality-coproduct-types
open import foundation.identity-types
-open import foundation.isolated-points
+open import foundation.isolated-elements
open import foundation.negation
open import foundation.propositions
open import foundation.subtypes
@@ -253,23 +253,25 @@ module _
{l1 l2 : Level} (T : Directed-Tree l1 l2)
where
- is-decidable-is-root-walk-Directed-Tree :
- (x : node-Directed-Tree T)
- (w : walk-Directed-Tree T x (root-Directed-Tree T)) →
- is-decidable (is-root-Directed-Tree T x)
- is-decidable-is-root-walk-Directed-Tree ._ refl-walk-Directed-Graph =
- inl refl
- is-decidable-is-root-walk-Directed-Tree x
- ( cons-walk-Directed-Graph {.x} {y} e w) =
- inr
- ( λ { refl →
+ abstract
+ is-decidable-is-root-walk-Directed-Tree :
+ (x : node-Directed-Tree T)
+ (w : walk-Directed-Tree T x (root-Directed-Tree T)) →
+ is-decidable (is-root-Directed-Tree T x)
+ is-decidable-is-root-walk-Directed-Tree ._ refl-walk-Directed-Graph =
+ inl refl
+ is-decidable-is-root-walk-Directed-Tree x
+ ( cons-walk-Directed-Graph {.x} {y} e w) =
+ inr
+ ( λ where
+ refl →
neq-cons-refl-walk-Directed-Graph
( graph-Directed-Tree T)
( x)
( y)
( e)
( w)
- ( eq-is-contr (unique-walk-to-root-Directed-Tree T x))})
+ ( eq-is-contr (unique-walk-to-root-Directed-Tree T x)))
is-isolated-root-Directed-Tree : is-isolated (root-Directed-Tree T)
is-isolated-root-Directed-Tree x =
@@ -278,7 +280,7 @@ module _
is-prop-is-root-Directed-Tree :
(x : node-Directed-Tree T) → is-prop (is-root-Directed-Tree T x)
is-prop-is-root-Directed-Tree =
- is-prop-eq-isolated-point
+ is-prop-eq-isolated-element
( root-Directed-Tree T)
( is-isolated-root-Directed-Tree)
@@ -290,7 +292,7 @@ module _
is-contr-loop-space-root-Directed-Tree :
is-contr (root-Directed-Tree T = root-Directed-Tree T)
is-contr-loop-space-root-Directed-Tree =
- is-contr-loop-space-isolated-point
+ is-contr-loop-space-isolated-element
( root-Directed-Tree T)
( is-isolated-root-Directed-Tree)
@@ -403,7 +405,7 @@ module _
is-contr-loop-space-root-unique-direct-successor-Directed-Graph :
unique-direct-successor-Directed-Graph → is-contr (r = r)
is-contr-loop-space-root-unique-direct-successor-Directed-Graph H =
- is-contr-loop-space-isolated-point r
+ is-contr-loop-space-isolated-element r
( is-isolated-root-unique-direct-successor-Directed-Graph H)
is-not-root-has-unique-direct-successor-Directed-Graph :
@@ -590,12 +592,13 @@ module _
( f))
( unique-direct-successor-Directed-Tree x)
- is-proof-irrelevant-direct-successor-Directed-Tree :
- (x : node-Directed-Tree T) →
- is-proof-irrelevant (Σ (node-Directed-Tree T) (edge-Directed-Tree T x))
- is-proof-irrelevant-direct-successor-Directed-Tree x (y , e) =
- unique-direct-successor-is-proper-node-Directed-Tree x
- ( λ { refl → no-direct-successor-root-Directed-Tree T (y , e)})
+ abstract
+ is-proof-irrelevant-direct-successor-Directed-Tree :
+ (x : node-Directed-Tree T) →
+ is-proof-irrelevant (Σ (node-Directed-Tree T) (edge-Directed-Tree T x))
+ is-proof-irrelevant-direct-successor-Directed-Tree x (y , e) =
+ unique-direct-successor-is-proper-node-Directed-Tree x
+ ( λ where refl → no-direct-successor-root-Directed-Tree T (y , e))
is-prop-direct-successor-Directed-Tree :
(x : node-Directed-Tree T) →
diff --git a/src/trees/enriched-directed-trees.lagda.md b/src/trees/enriched-directed-trees.lagda.md
index 570286771d..f17320ca15 100644
--- a/src/trees/enriched-directed-trees.lagda.md
+++ b/src/trees/enriched-directed-trees.lagda.md
@@ -17,7 +17,7 @@ open import foundation.equivalences
open import foundation.functoriality-dependent-pair-types
open import foundation.homotopies
open import foundation.identity-types
-open import foundation.isolated-points
+open import foundation.isolated-elements
open import foundation.negation
open import foundation.propositions
open import foundation.transport-along-identifications
diff --git a/src/trees/underlying-trees-elements-coalgebras-polynomial-endofunctors.lagda.md b/src/trees/underlying-trees-elements-coalgebras-polynomial-endofunctors.lagda.md
index 0c7f181af9..3a64e11856 100644
--- a/src/trees/underlying-trees-elements-coalgebras-polynomial-endofunctors.lagda.md
+++ b/src/trees/underlying-trees-elements-coalgebras-polynomial-endofunctors.lagda.md
@@ -20,7 +20,7 @@ open import foundation.functoriality-dependent-pair-types
open import foundation.fundamental-theorem-of-identity-types
open import foundation.homotopies
open import foundation.identity-types
-open import foundation.isolated-points
+open import foundation.isolated-elements
open import foundation.negation
open import foundation.propositions
open import foundation.transport-along-identifications
@@ -165,7 +165,7 @@ module _
( root-coalgebra w =
root-coalgebra w)
is-contr-loop-space-root-element-coalgebra w =
- is-contr-loop-space-isolated-point
+ is-contr-loop-space-isolated-element
( root-coalgebra w)
( is-isolated-root-element-coalgebra w)
```
diff --git a/src/trees/underlying-trees-of-elements-of-w-types.lagda.md b/src/trees/underlying-trees-of-elements-of-w-types.lagda.md
index 6579f766cd..434129da4b 100644
--- a/src/trees/underlying-trees-of-elements-of-w-types.lagda.md
+++ b/src/trees/underlying-trees-of-elements-of-w-types.lagda.md
@@ -16,7 +16,7 @@ open import foundation.equivalences
open import foundation.function-types
open import foundation.homotopies
open import foundation.identity-types
-open import foundation.isolated-points
+open import foundation.isolated-elements
open import foundation.negation
open import foundation.propositions
open import foundation.transport-along-identifications
diff --git a/src/univalent-combinatorics.lagda.md b/src/univalent-combinatorics.lagda.md
index 9764775769..008ad5b3b2 100644
--- a/src/univalent-combinatorics.lagda.md
+++ b/src/univalent-combinatorics.lagda.md
@@ -27,7 +27,7 @@ open import univalent-combinatorics.binomial-types public
open import univalent-combinatorics.bracelets public
open import univalent-combinatorics.cartesian-product-types public
open import univalent-combinatorics.classical-finite-types public
-open import univalent-combinatorics.complements-isolated-points public
+open import univalent-combinatorics.complements-isolated-elements public
open import univalent-combinatorics.coproduct-types public
open import univalent-combinatorics.counting public
open import univalent-combinatorics.counting-decidable-subtypes public
diff --git a/src/univalent-combinatorics/complements-isolated-points.lagda.md b/src/univalent-combinatorics/complements-isolated-elements.lagda.md
similarity index 57%
rename from src/univalent-combinatorics/complements-isolated-points.lagda.md
rename to src/univalent-combinatorics/complements-isolated-elements.lagda.md
index 9319f3c6ec..d0893d63cb 100644
--- a/src/univalent-combinatorics/complements-isolated-points.lagda.md
+++ b/src/univalent-combinatorics/complements-isolated-elements.lagda.md
@@ -1,7 +1,7 @@
-# Complements of isolated points of finite types
+# Complements of isolated elements of finite types
```agda
-module univalent-combinatorics.complements-isolated-points where
+module univalent-combinatorics.complements-isolated-elements where
```
Imports
@@ -13,7 +13,7 @@ open import foundation.dependent-pair-types
open import foundation.equivalences
open import foundation.equivalences-maybe
open import foundation.identity-types
-open import foundation.isolated-points
+open import foundation.isolated-elements
open import foundation.maybe
open import foundation.propositional-truncations
open import foundation.universe-levels
@@ -26,89 +26,89 @@ open import univalent-combinatorics.finite-types
## Idea
-For any point `x` in a [finite type](univalent-combinatorics.finite-types.md)
+For any element `x` in a [finite type](univalent-combinatorics.finite-types.md)
`X` of [cardinality](set-theory.cardinalities.md) `n+1`, we can construct its
**complement**, which is a type of cardinality `n`.
## Definition
-### The complement of a point in a k-element type of arbitrary universe level
+### The complement of a element in a `k`-element type of arbitrary universe level
```agda
-isolated-point-UU-Fin :
+isolated-element-UU-Fin :
{l : Level} (k : ℕ) (X : UU-Fin l (succ-ℕ k)) →
type-UU-Fin (succ-ℕ k) X →
- isolated-point (type-UU-Fin (succ-ℕ k) X)
-pr1 (isolated-point-UU-Fin k X x) = x
-pr2 (isolated-point-UU-Fin k X x) =
+ isolated-element (type-UU-Fin (succ-ℕ k) X)
+pr1 (isolated-element-UU-Fin k X x) = x
+pr2 (isolated-element-UU-Fin k X x) =
has-decidable-equality-has-cardinality
( succ-ℕ k)
( has-cardinality-type-UU-Fin (succ-ℕ k) X)
( x)
-type-complement-point-UU-Fin :
+type-complement-element-UU-Fin :
{l1 : Level} (k : ℕ) →
Σ (UU-Fin l1 (succ-ℕ k)) (type-UU-Fin (succ-ℕ k)) → UU l1
-type-complement-point-UU-Fin k (X , x) =
- complement-isolated-point
+type-complement-element-UU-Fin k (X , x) =
+ complement-isolated-element
( type-UU-Fin (succ-ℕ k) X)
- ( isolated-point-UU-Fin k X x)
+ ( isolated-element-UU-Fin k X x)
-equiv-maybe-structure-point-UU-Fin :
+equiv-maybe-structure-element-UU-Fin :
{l : Level} (k : ℕ) (X : UU-Fin l (succ-ℕ k)) →
(x : type-UU-Fin (succ-ℕ k) X) →
- Maybe (type-complement-point-UU-Fin k (pair X x)) ≃
+ Maybe (type-complement-element-UU-Fin k (pair X x)) ≃
type-UU-Fin (succ-ℕ k) X
-equiv-maybe-structure-point-UU-Fin k X x =
- equiv-maybe-structure-isolated-point
+equiv-maybe-structure-element-UU-Fin k X x =
+ equiv-maybe-structure-isolated-element
( type-UU-Fin (succ-ℕ k) X)
- ( isolated-point-UU-Fin k X x)
+ ( isolated-element-UU-Fin k X x)
-has-cardinality-type-complement-point-UU-Fin :
+has-cardinality-type-complement-element-UU-Fin :
{l1 : Level} (k : ℕ)
(X : Σ (UU-Fin l1 (succ-ℕ k)) (type-UU-Fin (succ-ℕ k))) →
- has-cardinality k (type-complement-point-UU-Fin k X)
-has-cardinality-type-complement-point-UU-Fin k (pair (pair X H) x) =
+ has-cardinality k (type-complement-element-UU-Fin k X)
+has-cardinality-type-complement-element-UU-Fin k (pair (pair X H) x) =
apply-universal-property-trunc-Prop H
( has-cardinality-Prop k
- ( type-complement-point-UU-Fin k (pair (pair X H) x)))
+ ( type-complement-element-UU-Fin k (pair (pair X H) x)))
( λ e →
unit-trunc-Prop
( equiv-equiv-Maybe
( ( inv-equiv
- ( equiv-maybe-structure-point-UU-Fin k (pair X H) x)) ∘e
+ ( equiv-maybe-structure-element-UU-Fin k (pair X H) x)) ∘e
( e))))
-complement-point-UU-Fin :
+complement-element-UU-Fin :
{l1 : Level} (k : ℕ) →
Σ (UU-Fin l1 (succ-ℕ k)) (type-UU-Fin (succ-ℕ k)) →
UU-Fin l1 k
-pr1 (complement-point-UU-Fin k T) =
- type-complement-point-UU-Fin k T
-pr2 (complement-point-UU-Fin k T) =
- has-cardinality-type-complement-point-UU-Fin k T
+pr1 (complement-element-UU-Fin k T) =
+ type-complement-element-UU-Fin k T
+pr2 (complement-element-UU-Fin k T) =
+ has-cardinality-type-complement-element-UU-Fin k T
-inclusion-complement-point-UU-Fin :
+inclusion-complement-element-UU-Fin :
{l1 : Level} (k : ℕ)
(X : Σ (UU-Fin l1 (succ-ℕ k)) (type-UU-Fin (succ-ℕ k))) →
- type-complement-point-UU-Fin k X → type-UU-Fin (succ-ℕ k) (pr1 X)
-inclusion-complement-point-UU-Fin k X x = pr1 x
+ type-complement-element-UU-Fin k X → type-UU-Fin (succ-ℕ k) (pr1 X)
+inclusion-complement-element-UU-Fin k X x = pr1 x
```
### The action of equivalences on complements of isolated points
```agda
-equiv-complement-point-UU-Fin :
+equiv-complement-element-UU-Fin :
{l1 : Level} (k : ℕ)
(X Y : Σ (UU-Fin l1 (succ-ℕ k)) (type-UU-Fin (succ-ℕ k))) →
(e : equiv-UU-Fin (succ-ℕ k) (pr1 X) (pr1 Y))
(p : Id (map-equiv e (pr2 X)) (pr2 Y)) →
equiv-UU-Fin k
- ( complement-point-UU-Fin k X)
- ( complement-point-UU-Fin k Y)
-equiv-complement-point-UU-Fin
+ ( complement-element-UU-Fin k X)
+ ( complement-element-UU-Fin k Y)
+equiv-complement-element-UU-Fin
k S T e p =
- equiv-complement-isolated-point e
+ equiv-complement-isolated-element e
( pair x (λ x' → has-decidable-equality-has-cardinality (succ-ℕ k) H x x'))
( pair y (λ y' → has-decidable-equality-has-cardinality (succ-ℕ k) K y y'))
( p)
@@ -121,7 +121,7 @@ equiv-complement-point-UU-Fin
## Properties
-### The map from a pointed `k+1`-element type to the complement of the point is an equivalence
+### The map from a pointed `k+1`-element type to the complement of the element is an equivalence
This remains to be shown.
[#744](https://github.com/UniMath/agda-unimath/issues/744)
diff --git a/src/univalent-combinatorics/counting-decidable-subtypes.lagda.md b/src/univalent-combinatorics/counting-decidable-subtypes.lagda.md
index 113a923e90..8739e219ca 100644
--- a/src/univalent-combinatorics/counting-decidable-subtypes.lagda.md
+++ b/src/univalent-combinatorics/counting-decidable-subtypes.lagda.md
@@ -45,63 +45,64 @@ open import univalent-combinatorics.standard-finite-types
### The elements of a decidable subtype of a type equipped with a counting can be counted
```agda
-count-decidable-subtype' :
- {l1 l2 : Level} {X : UU l1} (P : decidable-subtype l2 X) →
- (k : ℕ) (e : Fin k ≃ X) → count (type-decidable-subtype P)
-count-decidable-subtype' P zero-ℕ e =
- count-is-empty
- ( is-empty-is-zero-number-of-elements-count (pair zero-ℕ e) refl ∘ pr1)
-count-decidable-subtype' P (succ-ℕ k) e
- with is-decidable-decidable-subtype P (map-equiv e (inr star))
-... | inl p =
- count-equiv
- ( equiv-Σ (is-in-decidable-subtype P) e (λ x → id-equiv))
- ( count-equiv'
- ( right-distributive-Σ-coprod
- ( Fin k)
- ( unit)
- ( λ x → is-in-decidable-subtype P (map-equiv e x)))
- ( pair
- ( succ-ℕ
- ( number-of-elements-count
- ( count-decidable-subtype'
- ( λ x → P (map-equiv e (inl x)))
- ( k)
- ( id-equiv))))
- ( equiv-coprod
- ( equiv-count
- ( count-decidable-subtype'
- ( λ x → P (map-equiv e (inl x)))
- ( k)
- ( id-equiv)))
- ( equiv-is-contr
- ( is-contr-unit)
- ( is-contr-Σ
+abstract
+ count-decidable-subtype' :
+ {l1 l2 : Level} {X : UU l1} (P : decidable-subtype l2 X) →
+ (k : ℕ) (e : Fin k ≃ X) → count (type-decidable-subtype P)
+ count-decidable-subtype' P zero-ℕ e =
+ count-is-empty
+ ( is-empty-is-zero-number-of-elements-count (pair zero-ℕ e) refl ∘ pr1)
+ count-decidable-subtype' P (succ-ℕ k) e
+ with is-decidable-decidable-subtype P (map-equiv e (inr star))
+ ... | inl p =
+ count-equiv
+ ( equiv-Σ (is-in-decidable-subtype P) e (λ x → id-equiv))
+ ( count-equiv'
+ ( right-distributive-Σ-coprod
+ ( Fin k)
+ ( unit)
+ ( λ x → is-in-decidable-subtype P (map-equiv e x)))
+ ( pair
+ ( succ-ℕ
+ ( number-of-elements-count
+ ( count-decidable-subtype'
+ ( λ x → P (map-equiv e (inl x)))
+ ( k)
+ ( id-equiv))))
+ ( equiv-coprod
+ ( equiv-count
+ ( count-decidable-subtype'
+ ( λ x → P (map-equiv e (inl x)))
+ ( k)
+ ( id-equiv)))
+ ( equiv-is-contr
( is-contr-unit)
- ( star)
- ( is-proof-irrelevant-is-prop
- ( is-prop-is-in-decidable-subtype P
- ( map-equiv e (inr star)))
- ( p)))))))
-... | inr f =
- count-equiv
- ( equiv-Σ (is-in-decidable-subtype P) e (λ x → id-equiv))
- ( count-equiv'
- ( right-distributive-Σ-coprod
- ( Fin k)
- ( unit)
- ( λ x → is-in-decidable-subtype P (map-equiv e x)))
+ ( is-contr-Σ
+ ( is-contr-unit)
+ ( star)
+ ( is-proof-irrelevant-is-prop
+ ( is-prop-is-in-decidable-subtype P
+ ( map-equiv e (inr star)))
+ ( p)))))))
+ ... | inr f =
+ count-equiv
+ ( equiv-Σ (is-in-decidable-subtype P) e (λ x → id-equiv))
( count-equiv'
- ( right-unit-law-coprod-is-empty
- ( Σ ( Fin k)
- ( λ x → is-in-decidable-subtype P (map-equiv e (inl x))))
- ( Σ ( unit)
- ( λ x → is-in-decidable-subtype P (map-equiv e (inr x))))
- ( λ { (pair star p) → f p}))
- ( count-decidable-subtype'
- ( λ x → P (map-equiv e (inl x)))
- ( k)
- ( id-equiv))))
+ ( right-distributive-Σ-coprod
+ ( Fin k)
+ ( unit)
+ ( λ x → is-in-decidable-subtype P (map-equiv e x)))
+ ( count-equiv'
+ ( right-unit-law-coprod-is-empty
+ ( Σ ( Fin k)
+ ( λ x → is-in-decidable-subtype P (map-equiv e (inl x))))
+ ( Σ ( unit)
+ ( λ x → is-in-decidable-subtype P (map-equiv e (inr x))))
+ ( λ where (star , p) → f p))
+ ( count-decidable-subtype'
+ ( λ x → P (map-equiv e (inl x)))
+ ( k)
+ ( id-equiv))))
count-decidable-subtype :
{l1 l2 : Level} {X : UU l1} (P : decidable-subtype l2 X) →
diff --git a/src/univalent-combinatorics/cubes.lagda.md b/src/univalent-combinatorics/cubes.lagda.md
index 921803394c..0c9ea342e7 100644
--- a/src/univalent-combinatorics/cubes.lagda.md
+++ b/src/univalent-combinatorics/cubes.lagda.md
@@ -12,7 +12,7 @@ open import elementary-number-theory.natural-numbers
open import foundation.dependent-pair-types
open import foundation.universe-levels
-open import univalent-combinatorics.complements-isolated-points
+open import univalent-combinatorics.complements-isolated-elements
open import univalent-combinatorics.finite-types
```
@@ -106,9 +106,9 @@ face-cube :
(k : ℕ) (X : cube (succ-ℕ k)) (d : dim-cube (succ-ℕ k) X)
(a : axis-cube (succ-ℕ k) X d) → cube k
pr1 (face-cube k X d a) =
- complement-point-UU-Fin k (pair (dim-cube-UU-Fin (succ-ℕ k) X) d)
+ complement-element-UU-Fin k (pair (dim-cube-UU-Fin (succ-ℕ k) X) d)
pr2 (face-cube k X d a) d' =
axis-cube-UU-2 (succ-ℕ k) X
- ( inclusion-complement-point-UU-Fin k
+ ( inclusion-complement-element-UU-Fin k
( pair (dim-cube-UU-Fin (succ-ℕ k) X) d) d')
```
diff --git a/src/univalent-combinatorics/cyclic-types.lagda.md b/src/univalent-combinatorics/cyclic-types.lagda.md
index 478cb328e5..a543df9eea 100644
--- a/src/univalent-combinatorics/cyclic-types.lagda.md
+++ b/src/univalent-combinatorics/cyclic-types.lagda.md
@@ -493,17 +493,19 @@ is-retraction-equiv-Eq-Cyclic-Type k e =
( ℤ-Mod-Cyclic-Type k)
( e)))
-is-equiv-Eq-equiv-Cyclic-Type :
- (k : ℕ) (X : Cyclic-Type lzero k) → is-equiv (Eq-equiv-Cyclic-Type k X)
-is-equiv-Eq-equiv-Cyclic-Type k X =
- apply-universal-property-trunc-Prop
- ( mere-eq-Cyclic-Type k (ℤ-Mod-Cyclic-Type k) X)
- ( is-equiv-Prop (Eq-equiv-Cyclic-Type k X))
- ( λ { refl →
+abstract
+ is-equiv-Eq-equiv-Cyclic-Type :
+ (k : ℕ) (X : Cyclic-Type lzero k) → is-equiv (Eq-equiv-Cyclic-Type k X)
+ is-equiv-Eq-equiv-Cyclic-Type k X =
+ apply-universal-property-trunc-Prop
+ ( mere-eq-Cyclic-Type k (ℤ-Mod-Cyclic-Type k) X)
+ ( is-equiv-Prop (Eq-equiv-Cyclic-Type k X))
+ ( λ where
+ refl →
is-equiv-is-invertible
( equiv-Eq-Cyclic-Type k)
( is-section-equiv-Eq-Cyclic-Type k)
- ( is-retraction-equiv-Eq-Cyclic-Type k)})
+ ( is-retraction-equiv-Eq-Cyclic-Type k))
equiv-compute-Ω-Cyclic-Type :
(k : ℕ) → type-Ω (pair (Cyclic-Type lzero k) (ℤ-Mod-Cyclic-Type k)) ≃ ℤ-Mod k
diff --git a/src/univalent-combinatorics/finitely-presented-types.lagda.md b/src/univalent-combinatorics/finitely-presented-types.lagda.md
index 10aa729402..f5963031c2 100644
--- a/src/univalent-combinatorics/finitely-presented-types.lagda.md
+++ b/src/univalent-combinatorics/finitely-presented-types.lagda.md
@@ -92,7 +92,7 @@ has-cardinality-components-has-presentation-of-cardinality :
has-cardinality-components-has-presentation-of-cardinality {l} k {A} H =
apply-universal-property-trunc-Prop H
( has-cardinality-components-Prop k A)
- ( λ { (pair f E) → unit-trunc-Prop (pair (unit-trunc-Set ∘ f) E)})
+ ( λ (f , E) → unit-trunc-Prop (unit-trunc-Set ∘ f , E))
```
### To be finitely presented is a property
diff --git a/src/univalent-combinatorics/main-classes-of-latin-hypercubes.lagda.md b/src/univalent-combinatorics/main-classes-of-latin-hypercubes.lagda.md
index cea1c935a0..dee4973e2e 100644
--- a/src/univalent-combinatorics/main-classes-of-latin-hypercubes.lagda.md
+++ b/src/univalent-combinatorics/main-classes-of-latin-hypercubes.lagda.md
@@ -19,7 +19,7 @@ open import foundation.set-truncations
open import foundation.universe-levels
open import foundation.unordered-tuples
-open import univalent-combinatorics.complements-isolated-points
+open import univalent-combinatorics.complements-isolated-elements
open import univalent-combinatorics.decidable-subtypes
open import univalent-combinatorics.dependent-function-types
open import univalent-combinatorics.finite-types
@@ -122,7 +122,7 @@ is-π-finite-Main-Class-Latin-Hypercube-of-Order k n m =
is-finite-Π
( is-finite-Π
( is-finite-has-cardinality n
- ( has-cardinality-type-complement-point-UU-Fin n
+ ( has-cardinality-type-complement-element-UU-Fin n
( pair (type-unordered-tuple-UU-Fin (succ-ℕ n) A) i)))
( λ j →
is-finite-type-UU-Fin m
diff --git a/src/univalent-combinatorics/pi-finite-types.lagda.md b/src/univalent-combinatorics/pi-finite-types.lagda.md
index b084ebfc98..e51a3e9f56 100644
--- a/src/univalent-combinatorics/pi-finite-types.lagda.md
+++ b/src/univalent-combinatorics/pi-finite-types.lagda.md
@@ -368,7 +368,7 @@ pr2 (Fin-π-Finite k n) = is-π-finite-Fin k n
```agda
is-π-finite-count :
{l : Level} (k : ℕ) {A : UU l} → count A → is-π-finite k A
-is-π-finite-count k (pair n e) =
+is-π-finite-count k (n , e) =
is-π-finite-equiv' k e (is-π-finite-Fin k n)
```
@@ -411,14 +411,14 @@ pr2 (is-π-finite-UU-Fin (succ-ℕ k) n) x y =
( equiv-equiv-eq-UU-Fin n x y)
( is-π-finite-is-finite k
( is-finite-≃
- ( is-finite-has-finite-cardinality (pair n (pr2 x)))
- ( is-finite-has-finite-cardinality (pair n (pr2 y)))))
+ ( is-finite-has-finite-cardinality (n , (pr2 x)))
+ ( is-finite-has-finite-cardinality (n , (pr2 y)))))
is-finite-has-finite-connected-components :
{l : Level} {A : UU l} →
is-set A → has-finite-connected-components A → is-finite A
is-finite-has-finite-connected-components H =
- is-finite-equiv' (equiv-unit-trunc-Set (pair _ H))
+ is-finite-equiv' (equiv-unit-trunc-Set (_ , H))
has-finite-connected-components-is-π-finite :
{l : Level} (k : ℕ) {A : UU l} →
@@ -449,7 +449,7 @@ is-finite-is-π-finite :
is-π-finite k A → is-finite A
is-finite-is-π-finite k H K =
is-finite-equiv'
- ( equiv-unit-trunc-Set (pair _ H))
+ ( equiv-unit-trunc-Set (_ , H))
( has-finite-connected-components-is-π-finite k K)
is-truncated-π-finite-is-π-finite :
@@ -466,7 +466,7 @@ is-π-finite-is-truncated-π-finite :
is-truncated-π-finite k A → is-π-finite k A
is-π-finite-is-truncated-π-finite zero-ℕ H =
is-finite-equiv
- ( equiv-unit-trunc-Set (pair _ (is-set-is-finite H)))
+ ( equiv-unit-trunc-Set (_ , (is-set-is-finite H)))
( H)
pr1 (is-π-finite-is-truncated-π-finite (succ-ℕ k) H) = pr1 H
pr2 (is-π-finite-is-truncated-π-finite (succ-ℕ k) H) x y =
@@ -504,7 +504,7 @@ is-locally-finite-Π-Fin {l1} (succ-ℕ k) {B} f =
is-locally-finite-Π-count :
{l1 l2 : Level} {A : UU l1} {B : A → UU l2} → count A →
((x : A) → is-locally-finite (B x)) → is-locally-finite ((x : A) → B x)
-is-locally-finite-Π-count {l1} {l2} {A} {B} (pair k e) g =
+is-locally-finite-Π-count {l1} {l2} {A} {B} (k , e) g =
is-locally-finite-equiv
( equiv-precomp-Π e B)
( is-locally-finite-Π-Fin k (λ x → g (map-equiv e x)))
@@ -553,9 +553,9 @@ is-locally-finite-Σ :
{l1 l2 : Level} {A : UU l1} {B : A → UU l2} →
is-locally-finite A → ((x : A) → is-locally-finite (B x)) →
is-locally-finite (Σ A B)
-is-locally-finite-Σ {B = B} H K (pair x y) (pair x' y') =
+is-locally-finite-Σ {B = B} H K (x , y) (x' , y') =
is-finite-equiv'
- ( equiv-pair-eq-Σ (pair x y) (pair x' y'))
+ ( equiv-pair-eq-Σ (x , y) (x' , y'))
( is-finite-Σ (H x x') (λ p → K x' (tr B p y) y'))
```
@@ -572,7 +572,6 @@ has-finite-connected-components-Σ-is-0-connected {A = A} {B} C H K =
( is-inhabited-is-0-connected C)
( is-π-finite-Prop zero-ℕ (Σ A B))
( α)
-
where
α : A → is-π-finite zero-ℕ (Σ A B)
α a =
@@ -588,51 +587,46 @@ has-finite-connected-components-Σ-is-0-connected {A = A} {B} C H K =
( type-trunc-Set (Σ A B))
( λ y → is-decidable-Prop (Id-Prop (trunc-Set (Σ A B)) x y))))
( β))
-
where
β : (x : Σ A B) (v : type-trunc-Set (Σ A B)) →
is-decidable (Id (unit-trunc-Set x) v)
- β (pair x y) =
+ β (x , y) =
apply-dependent-universal-property-trunc-Set'
( λ u →
set-Prop
( is-decidable-Prop
- ( Id-Prop (trunc-Set (Σ A B)) (unit-trunc-Set (pair x y)) u)))
+ ( Id-Prop (trunc-Set (Σ A B)) (unit-trunc-Set (x , y)) u)))
( γ)
-
where
γ : (v : Σ A B) →
- is-decidable (Id (unit-trunc-Set (pair x y)) (unit-trunc-Set v))
- γ (pair x' y') =
+ is-decidable (Id (unit-trunc-Set (x , y)) (unit-trunc-Set v))
+ γ (x' , y') =
is-decidable-equiv
( is-effective-unit-trunc-Set
( Σ A B)
- ( pair x y)
- ( pair x' y'))
+ ( x , y)
+ ( x' , y'))
( apply-universal-property-trunc-Prop
( mere-eq-is-0-connected C a x)
( is-decidable-Prop
- ( mere-eq-Prop (pair x y) (pair x' y')))
+ ( mere-eq-Prop (x , y) (x' , y')))
( δ))
-
where
- δ : Id a x → is-decidable (mere-eq (pair x y) (pair x' y'))
+ δ : Id a x → is-decidable (mere-eq (x , y) (x' , y'))
δ refl =
apply-universal-property-trunc-Prop
( mere-eq-is-0-connected C a x')
( is-decidable-Prop
- ( mere-eq-Prop (pair a y) (pair x' y')))
+ ( mere-eq-Prop (a , y) (x' , y')))
( ε)
-
where
- ε : Id a x' → is-decidable (mere-eq (pair x y) (pair x' y'))
+ ε : Id a x' → is-decidable (mere-eq (x , y) (x' , y'))
ε refl =
is-decidable-equiv e
( is-decidable-type-trunc-Prop-is-finite
( is-finite-Σ
( pr2 H a a)
( λ ω → is-finite-is-decidable-Prop (P ω) (d ω))))
-
where
ℙ : is-contr
( Σ ( type-hom-Set (trunc-Set (Id a a)) (Prop-Set _))
@@ -664,38 +658,37 @@ has-finite-connected-components-Σ-is-0-connected {A = A} {B} C H K =
( unit-trunc-Set y'))))
f : type-hom-Prop
( trunc-Prop (Σ (type-trunc-Set (Id a a)) (type-Prop ∘ P)))
- ( mere-eq-Prop {A = Σ A B} (pair a y) (pair a y'))
+ ( mere-eq-Prop {A = Σ A B} (a , y) (a , y'))
f t = apply-universal-property-trunc-Prop t
- ( mere-eq-Prop (pair a y) (pair a y'))
- λ { (pair u v) →
- apply-dependent-universal-property-trunc-Set'
- ( λ u' →
- hom-Set
- ( set-Prop (P u'))
- ( set-Prop
- ( mere-eq-Prop (pair a y) (pair a y'))))
- ( λ ω v' →
- apply-universal-property-trunc-Prop
- ( map-equiv (compute-P ω) v')
- ( mere-eq-Prop (pair a y) (pair a y'))
- ( λ p → unit-trunc-Prop (eq-pair-Σ ω p)))
- ( u)
- ( v)}
- e : mere-eq {A = Σ A B} (pair a y) (pair a y') ≃
+ ( mere-eq-Prop (a , y) (a , y'))
+ λ (u , v) →
+ apply-dependent-universal-property-trunc-Set'
+ ( λ u' →
+ hom-Set
+ ( set-Prop (P u'))
+ ( set-Prop
+ ( mere-eq-Prop (a , y) (a , y'))))
+ ( λ ω v' →
+ apply-universal-property-trunc-Prop
+ ( map-equiv (compute-P ω) v')
+ ( mere-eq-Prop (a , y) (a , y'))
+ ( λ p → unit-trunc-Prop (eq-pair-Σ ω p)))
+ ( u)
+ ( v)
+ e : mere-eq {A = Σ A B} (a , y) (a , y') ≃
type-trunc-Prop (Σ (type-trunc-Set (Id a a)) (type-Prop ∘ P))
e = equiv-iff
- ( mere-eq-Prop (pair a y) (pair a y'))
+ ( mere-eq-Prop (a , y) (a , y'))
( trunc-Prop (Σ (type-trunc-Set (Id a a)) (type-Prop ∘ P)))
( λ t →
apply-universal-property-trunc-Prop t
( trunc-Prop _)
- ( ( λ { (pair ω r) →
- unit-trunc-Prop
- ( pair
- ( unit-trunc-Set ω)
- ( map-inv-equiv
- ( compute-P ω)
- ( unit-trunc-Prop r)))}) ∘
+ ( ( λ ( ω , r) →
+ unit-trunc-Prop
+ ( ( unit-trunc-Set ω) ,
+ ( map-inv-equiv
+ ( compute-P ω)
+ ( unit-trunc-Prop r)))) ∘
( pair-eq-Σ)))
( f)
```
@@ -718,26 +711,27 @@ module _
triangle-is-coprod-codomain (inl x) = refl
triangle-is-coprod-codomain (inr x) = refl
- is-emb-map-is-coprod-codomain : is-emb map-is-coprod-codomain
- is-emb-map-is-coprod-codomain =
- is-emb-coprod
- ( is-emb-inclusion-subtype (λ b → trunc-Prop _))
- ( is-emb-inclusion-subtype (λ b → trunc-Prop _))
- ( λ { (pair b1 u) (pair b2 v) →
+ abstract
+ is-emb-map-is-coprod-codomain : is-emb map-is-coprod-codomain
+ is-emb-map-is-coprod-codomain =
+ is-emb-coprod
+ ( is-emb-inclusion-subtype (λ b → trunc-Prop _))
+ ( is-emb-inclusion-subtype (λ b → trunc-Prop _))
+ ( λ (b1 , u) (b2 , v) →
apply-universal-property-trunc-Prop u
( function-Prop _ empty-Prop)
- ( λ
- { (pair x refl) →
+ ( λ where
+ ( x , refl) →
apply-universal-property-trunc-Prop v
( function-Prop _ empty-Prop)
- ( λ
- { (pair y refl) r →
+ ( λ where
+ ( y , refl) r →
is-empty-eq-coprod-inl-inr x y
( is-injective-is-equiv
( is-equiv-map-equiv e)
( ( inv (H (inl x))) ∙
- ( ( ap unit-trunc-Set r) ∙
- ( H (inr y)))))})})})
+ ( ap unit-trunc-Set r) ∙
+ ( H (inr y)))))))
is-surjective-map-is-coprod-codomain : is-surjective map-is-coprod-codomain
is-surjective-map-is-coprod-codomain b =
@@ -747,8 +741,7 @@ module _
( trunc-Prop (fiber map-is-coprod-codomain b))
( λ p →
unit-trunc-Prop
- ( pair
- ( map-coprod (map-unit-im (f ∘ inl)) (map-unit-im (f ∘ inr)) a)
+ ( ( map-coprod (map-unit-im (f ∘ inl)) (map-unit-im (f ∘ inr)) a) ,
( triangle-is-coprod-codomain a ∙ inv p)))
where
a = map-inv-equiv e (unit-trunc-Set b)
@@ -764,137 +757,137 @@ is-0-connected-unit : is-0-connected unit
is-0-connected-unit =
is-contr-equiv' unit equiv-unit-trunc-unit-Set is-contr-unit
-is-contr-im :
- {l1 l2 : Level} {A : UU l1} (B : Set l2) {f : A → type-Set B}
- (a : A) (H : f ~ const A (type-Set B) (f a)) → is-contr (im f)
-pr1 (is-contr-im B {f} a H) = map-unit-im f a
-pr2 (is-contr-im B {f} a H) (pair x u) =
- apply-dependent-universal-property-trunc-Prop
- ( λ v → Id-Prop (im-Set B f) (map-unit-im f a) (pair x v))
- ( u)
- ( λ { (pair a' refl) →
- eq-Eq-im f (map-unit-im f a) (map-unit-im f a') (inv (H a'))})
-
-is-0-connected-im :
- {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B) →
- is-0-connected A → is-0-connected (im f)
-is-0-connected-im {l1} {l2} {A} {B} f C =
- apply-universal-property-trunc-Prop
- ( is-inhabited-is-0-connected C)
- ( is-contr-Prop _)
- ( λ a →
- is-contr-equiv'
- ( im (map-trunc-Set f))
- ( equiv-trunc-im-Set f)
- ( is-contr-im
- ( trunc-Set B)
- ( unit-trunc-Set a)
- ( apply-dependent-universal-property-trunc-Set'
- ( λ x →
- set-Prop
- ( Id-Prop
- ( trunc-Set B)
- ( map-trunc-Set f x)
- ( map-trunc-Set f (unit-trunc-Set a))))
- ( λ a' →
- apply-universal-property-trunc-Prop
- ( mere-eq-is-0-connected C a' a)
- ( Id-Prop
- ( trunc-Set B)
- ( map-trunc-Set f (unit-trunc-Set a'))
- ( map-trunc-Set f (unit-trunc-Set a)))
- ( λ {refl → refl})))))
+abstract
+ is-contr-im :
+ {l1 l2 : Level} {A : UU l1} (B : Set l2) {f : A → type-Set B}
+ (a : A) (H : f ~ const A (type-Set B) (f a)) → is-contr (im f)
+ pr1 (is-contr-im B {f} a H) = map-unit-im f a
+ pr2 (is-contr-im B {f} a H) (x , u) =
+ apply-dependent-universal-property-trunc-Prop
+ ( λ v → Id-Prop (im-Set B f) (map-unit-im f a) (x , v))
+ ( u)
+ ( λ where
+ ( a' , refl) →
+ eq-Eq-im f (map-unit-im f a) (map-unit-im f a') (inv (H a')))
+
+abstract
+ is-0-connected-im :
+ {l1 l2 : Level} {A : UU l1} {B : UU l2} (f : A → B) →
+ is-0-connected A → is-0-connected (im f)
+ is-0-connected-im {l1} {l2} {A} {B} f C =
+ apply-universal-property-trunc-Prop
+ ( is-inhabited-is-0-connected C)
+ ( is-contr-Prop _)
+ ( λ a →
+ is-contr-equiv'
+ ( im (map-trunc-Set f))
+ ( equiv-trunc-im-Set f)
+ ( is-contr-im
+ ( trunc-Set B)
+ ( unit-trunc-Set a)
+ ( apply-dependent-universal-property-trunc-Set'
+ ( λ x →
+ set-Prop
+ ( Id-Prop
+ ( trunc-Set B)
+ ( map-trunc-Set f x)
+ ( map-trunc-Set f (unit-trunc-Set a))))
+ ( λ a' →
+ apply-universal-property-trunc-Prop
+ ( mere-eq-is-0-connected C a' a)
+ ( Id-Prop
+ ( trunc-Set B)
+ ( map-trunc-Set f (unit-trunc-Set a'))
+ ( map-trunc-Set f (unit-trunc-Set a)))
+ ( λ where refl → refl)))))
is-0-connected-im-unit :
{l1 : Level} {A : UU l1} (f : unit → A) → is-0-connected (im f)
is-0-connected-im-unit f =
is-0-connected-im f is-0-connected-unit
-has-finite-connected-components-Σ' :
- {l1 l2 : Level} {A : UU l1} {B : A → UU l2} →
- (k : ℕ) → (Fin k ≃ (type-trunc-Set A)) →
- ((x y : A) → has-finite-connected-components (Id x y)) →
- ((x : A) → has-finite-connected-components (B x)) →
- has-finite-connected-components (Σ A B)
-has-finite-connected-components-Σ' zero-ℕ e H K =
- is-π-finite-is-empty zero-ℕ
- ( is-empty-is-empty-trunc-Set (map-inv-equiv e) ∘ pr1)
-has-finite-connected-components-Σ' {l1} {l2} {A} {B} (succ-ℕ k) e H K =
- apply-universal-property-trunc-Prop
- ( has-presentation-of-cardinality-has-cardinality-components
- ( succ-ℕ k)
- ( unit-trunc-Prop e))
- ( has-finite-connected-components-Prop (Σ A B))
- ( α)
- where
- α : Σ (Fin (succ-ℕ k) → A) (λ f → is-equiv (unit-trunc-Set ∘ f)) →
- has-finite-connected-components (Σ A B)
- α (pair f Eηf) =
- is-finite-equiv
- ( equiv-trunc-Set g)
- ( is-finite-equiv'
- ( equiv-distributive-trunc-coprod-Set
- ( Σ (im (f ∘ inl)) (B ∘ pr1))
- ( Σ (im (f ∘ inr)) (B ∘ pr1)))
- ( is-finite-coprod
- ( has-finite-connected-components-Σ' k
- ( h)
- ( λ x y →
- is-finite-equiv'
- ( equiv-trunc-Set
- ( equiv-ap-emb
- ( pair pr1
- ( is-emb-inclusion-subtype
- ( λ u → trunc-Prop _)))))
- ( H (pr1 x) (pr1 y)))
- ( λ x → K (pr1 x)))
- ( has-finite-connected-components-Σ-is-0-connected
- ( is-0-connected-im (f ∘ inr) is-0-connected-unit)
- ( pair
- ( is-finite-is-contr
- ( is-0-connected-im (f ∘ inr) is-0-connected-unit))
- ( λ x y →
- is-π-finite-equiv zero-ℕ
- ( equiv-Eq-eq-im (f ∘ inr) x y)
- ( H (pr1 x) (pr1 y))))
- ( λ x → K (pr1 x)))))
+abstract
+ has-finite-connected-components-Σ' :
+ {l1 l2 : Level} {A : UU l1} {B : A → UU l2} →
+ (k : ℕ) → (Fin k ≃ (type-trunc-Set A)) →
+ ((x y : A) → has-finite-connected-components (Id x y)) →
+ ((x : A) → has-finite-connected-components (B x)) →
+ has-finite-connected-components (Σ A B)
+ has-finite-connected-components-Σ' zero-ℕ e H K =
+ is-π-finite-is-empty zero-ℕ
+ ( is-empty-is-empty-trunc-Set (map-inv-equiv e) ∘ pr1)
+ has-finite-connected-components-Σ' {l1} {l2} {A} {B} (succ-ℕ k) e H K =
+ apply-universal-property-trunc-Prop
+ ( has-presentation-of-cardinality-has-cardinality-components
+ ( succ-ℕ k)
+ ( unit-trunc-Prop e))
+ ( has-finite-connected-components-Prop (Σ A B))
+ ( α)
where
- g : ((Σ (im (f ∘ inl)) (B ∘ pr1)) + (Σ (im (f ∘ inr)) (B ∘ pr1))) ≃
- Σ A B
- g = ( equiv-Σ B
- ( is-coprod-codomain f
- ( pair (unit-trunc-Set ∘ f) Eηf)
- ( refl-htpy))
- ( λ { (inl x) → id-equiv ;
- (inr x) → id-equiv})) ∘e
- ( inv-equiv
- ( right-distributive-Σ-coprod
- ( im (f ∘ inl))
- ( im (f ∘ inr))
- ( ind-coprod (λ x → UU l2) (B ∘ pr1) (B ∘ pr1))))
- i : Fin k → type-trunc-Set (im (f ∘ inl))
- i = unit-trunc-Set ∘ map-unit-im (f ∘ inl)
- is-surjective-i : is-surjective i
- is-surjective-i =
- is-surjective-comp
- ( is-surjective-unit-trunc-Set (im (f ∘ inl)))
- ( is-surjective-map-unit-im (f ∘ inl))
- is-emb-i : is-emb i
- is-emb-i =
- is-emb-right-factor-htpy
- ( (unit-trunc-Set ∘ f) ∘ inl)
- ( inclusion-trunc-im-Set (f ∘ inl))
- ( i)
- ( ( inv-htpy (naturality-unit-trunc-Set (inclusion-im (f ∘ inl)))) ·r
- ( map-unit-im (f ∘ inl)))
- ( is-emb-inclusion-trunc-im-Set (f ∘ inl))
- ( is-emb-comp
- ( unit-trunc-Set ∘ f)
- ( inl)
- ( is-emb-is-equiv Eηf)
- ( is-emb-inl (Fin k) unit))
- h : Fin k ≃ type-trunc-Set (im (f ∘ inl))
- h = pair i (is-equiv-is-emb-is-surjective is-surjective-i is-emb-i)
+ α : Σ (Fin (succ-ℕ k) → A) (λ f → is-equiv (unit-trunc-Set ∘ f)) →
+ has-finite-connected-components (Σ A B)
+ α (f , Eηf) =
+ is-finite-equiv
+ ( equiv-trunc-Set g)
+ ( is-finite-equiv'
+ ( equiv-distributive-trunc-coprod-Set
+ ( Σ (im (f ∘ inl)) (B ∘ pr1))
+ ( Σ (im (f ∘ inr)) (B ∘ pr1)))
+ ( is-finite-coprod
+ ( has-finite-connected-components-Σ' k
+ ( h)
+ ( λ x y →
+ is-finite-equiv'
+ ( equiv-trunc-Set
+ ( equiv-ap-emb
+ ( pr1 , is-emb-inclusion-subtype ( λ u → trunc-Prop _))))
+ ( H (pr1 x) (pr1 y)))
+ ( λ x → K (pr1 x)))
+ ( has-finite-connected-components-Σ-is-0-connected
+ ( is-0-connected-im (f ∘ inr) is-0-connected-unit)
+ ( ( is-finite-is-contr
+ ( is-0-connected-im (f ∘ inr) is-0-connected-unit)) ,
+ ( λ x y →
+ is-π-finite-equiv zero-ℕ
+ ( equiv-Eq-eq-im (f ∘ inr) x y)
+ ( H (pr1 x) (pr1 y))))
+ ( λ x → K (pr1 x)))))
+ where
+ g : ((Σ (im (f ∘ inl)) (B ∘ pr1)) + (Σ (im (f ∘ inr)) (B ∘ pr1))) ≃
+ Σ A B
+ g = ( equiv-Σ B
+ ( is-coprod-codomain f
+ ( unit-trunc-Set ∘ f , Eηf)
+ ( refl-htpy))
+ ( λ { (inl x) → id-equiv ; (inr x) → id-equiv})) ∘e
+ ( inv-equiv
+ ( right-distributive-Σ-coprod
+ ( im (f ∘ inl))
+ ( im (f ∘ inr))
+ ( ind-coprod (λ x → UU l2) (B ∘ pr1) (B ∘ pr1))))
+ i : Fin k → type-trunc-Set (im (f ∘ inl))
+ i = unit-trunc-Set ∘ map-unit-im (f ∘ inl)
+ is-surjective-i : is-surjective i
+ is-surjective-i =
+ is-surjective-comp
+ ( is-surjective-unit-trunc-Set (im (f ∘ inl)))
+ ( is-surjective-map-unit-im (f ∘ inl))
+ is-emb-i : is-emb i
+ is-emb-i =
+ is-emb-right-factor-htpy
+ ( (unit-trunc-Set ∘ f) ∘ inl)
+ ( inclusion-trunc-im-Set (f ∘ inl))
+ ( i)
+ ( ( inv-htpy (naturality-unit-trunc-Set (inclusion-im (f ∘ inl)))) ·r
+ ( map-unit-im (f ∘ inl)))
+ ( is-emb-inclusion-trunc-im-Set (f ∘ inl))
+ ( is-emb-comp
+ ( unit-trunc-Set ∘ f)
+ ( inl)
+ ( is-emb-is-equiv Eηf)
+ ( is-emb-inl (Fin k) unit))
+ h : Fin k ≃ type-trunc-Set (im (f ∘ inl))
+ h = i , (is-equiv-is-emb-is-surjective is-surjective-i is-emb-i)
has-finite-connected-components-Σ :
{l1 l2 : Level} {A : UU l1} {B : A → UU l2} → is-π-finite 1 A →
@@ -904,25 +897,25 @@ has-finite-connected-components-Σ {l1} {l2} {A} {B} H K =
apply-universal-property-trunc-Prop
( pr1 H)
( has-finite-connected-components-Prop (Σ A B))
- ( λ { (pair k e) →
- has-finite-connected-components-Σ' k e (λ x y → pr2 H x y) K})
-
-is-π-finite-Σ :
- {l1 l2 : Level} (k : ℕ) {A : UU l1} {B : A → UU l2} →
- is-π-finite (succ-ℕ k) A → ((x : A) → is-π-finite k (B x)) →
- is-π-finite k (Σ A B)
-is-π-finite-Σ zero-ℕ {A} {B} H K = has-finite-connected-components-Σ H K
-pr1 (is-π-finite-Σ (succ-ℕ k) H K) =
- has-finite-connected-components-Σ
- ( is-π-finite-one-is-π-finite-succ-ℕ (succ-ℕ k) H)
- ( λ x →
- has-finite-connected-components-is-π-finite (succ-ℕ k) (K x))
-pr2 (is-π-finite-Σ (succ-ℕ k) H K) (pair x u) (pair y v) =
- is-π-finite-equiv k
- ( equiv-pair-eq-Σ (pair x u) (pair y v))
- ( is-π-finite-Σ k
- ( pr2 H x y)
- ( λ { refl → pr2 (K x) u v}))
+ ( λ (k , e) → has-finite-connected-components-Σ' k e (λ x y → pr2 H x y) K)
+
+abstract
+ is-π-finite-Σ :
+ {l1 l2 : Level} (k : ℕ) {A : UU l1} {B : A → UU l2} →
+ is-π-finite (succ-ℕ k) A → ((x : A) → is-π-finite k (B x)) →
+ is-π-finite k (Σ A B)
+ is-π-finite-Σ zero-ℕ {A} {B} H K = has-finite-connected-components-Σ H K
+ pr1 (is-π-finite-Σ (succ-ℕ k) H K) =
+ has-finite-connected-components-Σ
+ ( is-π-finite-one-is-π-finite-succ-ℕ (succ-ℕ k) H)
+ ( λ x →
+ has-finite-connected-components-is-π-finite (succ-ℕ k) (K x))
+ pr2 (is-π-finite-Σ (succ-ℕ k) H K) (x , u) (y , v) =
+ is-π-finite-equiv k
+ ( equiv-pair-eq-Σ (x , u) (y , v))
+ ( is-π-finite-Σ k
+ ( pr2 H x y)
+ ( λ where refl → pr2 (K x) u v))
π-Finite-Σ :
{l1 l2 : Level} (k : ℕ) (A : π-Finite l1 (succ-ℕ k))
diff --git a/src/univalent-combinatorics/symmetric-difference.lagda.md b/src/univalent-combinatorics/symmetric-difference.lagda.md
index 3625fab642..cda7db8697 100644
--- a/src/univalent-combinatorics/symmetric-difference.lagda.md
+++ b/src/univalent-combinatorics/symmetric-difference.lagda.md
@@ -35,7 +35,6 @@ module _
{l l1 l2 : Level} (X : UU l) (F : is-finite X)
(P : decidable-subtype l1 X)
(Q : decidable-subtype l2 X)
-
where
eq-symmetric-difference :
diff --git a/src/univalent-combinatorics/universal-property-standard-finite-types.lagda.md b/src/univalent-combinatorics/universal-property-standard-finite-types.lagda.md
index 2126d8134a..414fa68110 100644
--- a/src/univalent-combinatorics/universal-property-standard-finite-types.lagda.md
+++ b/src/univalent-combinatorics/universal-property-standard-finite-types.lagda.md
@@ -94,8 +94,7 @@ module _
is-retraction-map-inv-ev-zero-one-Fin-two-ℕ :
map-inv-ev-zero-one-Fin-two-ℕ ∘ ev-zero-one-Fin-two-ℕ ~ id
is-retraction-map-inv-ev-zero-one-Fin-two-ℕ f =
- eq-htpy
- ( λ { (inl (inr star)) → refl ; (inr star) → refl})
+ eq-htpy (λ { (inl (inr star)) → refl ; (inr star) → refl})
dependent-universal-property-Fin-two-ℕ :
is-equiv ev-zero-one-Fin-two-ℕ
diff --git a/src/universal-algebra/algebraic-theory-of-groups.lagda.md b/src/universal-algebra/algebraic-theory-of-groups.lagda.md
index ac491c3c8f..90bf61b51d 100644
--- a/src/universal-algebra/algebraic-theory-of-groups.lagda.md
+++ b/src/universal-algebra/algebraic-theory-of-groups.lagda.md
@@ -43,12 +43,10 @@ data group-ops : UU lzero where
unit-group-op mul-group-op inv-group-op : group-ops
group-signature : signature lzero
-group-signature =
- pair
- group-ops
- ( λ { unit-group-op → 0 ;
- mul-group-op → 2 ;
- inv-group-op → 1})
+pr1 group-signature = group-ops
+pr2 group-signature unit-group-op = 0
+pr2 group-signature mul-group-op = 2
+pr2 group-signature inv-group-op = 1
data group-laws : UU lzero where
associative-l-group-laws : group-laws
@@ -58,39 +56,31 @@ data group-laws : UU lzero where
idr-r-group-laws : group-laws
group-Theory : Theory group-signature lzero
-group-Theory =
- pair
- ( group-laws)
- ( λ { associative-l-group-laws →
- pair
- ( op mul-group-op
- ( ( op mul-group-op
- ( var 0 ∷ var 1 ∷ empty-vec)) ∷
- ( var 2) ∷ empty-vec))
- ( op mul-group-op
- ( var 0 ∷
- ( op mul-group-op (var 1 ∷ var 2 ∷ empty-vec)) ∷ empty-vec)) ;
- invl-l-group-laws →
- pair
- ( op mul-group-op
- ( op inv-group-op (var 0 ∷ empty-vec) ∷ var 0 ∷ empty-vec))
- (op unit-group-op empty-vec) ;
- invr-r-group-laws →
- pair
- ( op mul-group-op
- ( var 0 ∷ op inv-group-op (var 0 ∷ empty-vec) ∷ empty-vec))
- (op unit-group-op empty-vec) ;
- idl-l-group-laws →
- pair
- (op mul-group-op (op unit-group-op empty-vec ∷ var 0 ∷ empty-vec))
- (var 0) ;
- idr-r-group-laws →
- pair
- (op mul-group-op (var 0 ∷ op unit-group-op empty-vec ∷ empty-vec))
- (var 0)})
- where
- op = op-Term
- var = var-Term
+pr1 group-Theory = group-laws
+pr2 group-Theory =
+ λ where
+ associative-l-group-laws →
+ ( op mul-group-op
+ ( ( op mul-group-op (var 0 ∷ var 1 ∷ empty-vec)) ∷ var 2 ∷ empty-vec)) ,
+ ( op mul-group-op
+ ( var 0 ∷ (op mul-group-op (var 1 ∷ var 2 ∷ empty-vec)) ∷ empty-vec))
+ invl-l-group-laws →
+ ( op mul-group-op
+ ( op inv-group-op (var 0 ∷ empty-vec) ∷ var 0 ∷ empty-vec)) ,
+ ( op unit-group-op empty-vec)
+ invr-r-group-laws →
+ ( op mul-group-op
+ ( var 0 ∷ op inv-group-op (var 0 ∷ empty-vec) ∷ empty-vec)) ,
+ ( op unit-group-op empty-vec)
+ idl-l-group-laws →
+ ( op mul-group-op (op unit-group-op empty-vec ∷ var 0 ∷ empty-vec)) ,
+ ( var 0)
+ idr-r-group-laws →
+ ( op mul-group-op (var 0 ∷ op unit-group-op empty-vec ∷ empty-vec)) ,
+ ( var 0)
+ where
+ op = op-Term
+ var = var-Term
group-Algebra : (l : Level) → UU (lsuc l)
group-Algebra l = Algebra group-signature group-Theory l
@@ -105,29 +95,24 @@ group-Algebra-Group :
{l : Level} →
Algebra group-signature group-Theory l →
Group l
-group-Algebra-Group (((A , is-set-A) , models-A) , satisfies-A) =
- pair
- ( pair
- ( pair A is-set-A)
- ( pair
- ( λ x y →
- ( models-A mul-group-op (x ∷ y ∷ empty-vec)))
- ( λ x y z →
- ( satisfies-A associative-l-group-laws
- ( λ { zero-ℕ → x ;
- ( succ-ℕ zero-ℕ) → y ;
- ( succ-ℕ (succ-ℕ n)) → z})))))
- ( pair
- ( pair
- ( models-A unit-group-op empty-vec)
- ( pair
- ( λ x → satisfies-A idl-l-group-laws (λ _ → x))
- ( λ x → satisfies-A idr-r-group-laws (λ _ → x))))
- ( pair
- ( λ x → models-A inv-group-op (x ∷ empty-vec))
- ( pair
- ( λ x → satisfies-A invl-l-group-laws (λ _ → x))
- ( λ x → satisfies-A invr-r-group-laws (λ _ → x)))))
+pr1 (pr1 (group-Algebra-Group ((A-Set , models-A) , satisfies-A))) = A-Set
+pr1 (pr2 (pr1 (group-Algebra-Group ((A-Set , models-A) , satisfies-A)))) x y =
+ models-A mul-group-op (x ∷ y ∷ empty-vec)
+pr2 (pr2 (pr1 (group-Algebra-Group ((A-Set , models-A) , satisfies-A)))) x y z =
+ satisfies-A associative-l-group-laws
+ ( λ { 0 → x ; 1 → y ; (succ-ℕ (succ-ℕ n)) → z})
+pr1 (pr1 (pr2 (group-Algebra-Group ((A-Set , models-A) , satisfies-A)))) =
+ models-A unit-group-op empty-vec
+pr1 (pr2 (pr1 (pr2 (group-Algebra-Group (_ , satisfies-A))))) x =
+ satisfies-A idl-l-group-laws (λ _ → x)
+pr2 (pr2 (pr1 (pr2 (group-Algebra-Group (_ , satisfies-A))))) x =
+ satisfies-A idr-r-group-laws (λ _ → x)
+pr1 (pr2 (pr2 (group-Algebra-Group ((A-Set , models-A) , satisfies-A)))) x =
+ models-A inv-group-op (x ∷ empty-vec)
+pr1 (pr2 (pr2 (pr2 (group-Algebra-Group (_ , satisfies-A))))) x =
+ satisfies-A invl-l-group-laws (λ _ → x)
+pr2 (pr2 (pr2 (pr2 (group-Algebra-Group (_ , satisfies-A))))) x =
+ satisfies-A invr-r-group-laws (λ _ → x)
Group-group-Algebra :
{l : Level} →
@@ -137,42 +122,43 @@ Group-group-Algebra G =
pair
( pair
( ( set-Group G))
- ( λ { unit-group-op v → unit-Group G ;
- mul-group-op (x ∷ y ∷ empty-vec) → mul-Group G x y ;
- inv-group-op (x ∷ empty-vec) → inv-Group G x}))
- ( λ { associative-l-group-laws assign →
- associative-mul-Group G (assign 0) (assign 1) (assign 2) ;
- invl-l-group-laws assign →
- left-inverse-law-mul-Group G (assign 0) ;
- invr-r-group-laws assign →
- right-inverse-law-mul-Group G (assign 0) ;
- idl-l-group-laws assign →
- left-unit-law-mul-Group G (assign 0) ;
- idr-r-group-laws assign →
- right-unit-law-mul-Group G (assign 0)})
-
-equiv-group-Algebra-Group :
- {l : Level} →
- Algebra group-signature group-Theory l ≃
- Group l
-pr1 equiv-group-Algebra-Group = group-Algebra-Group
-pr1 (pr1 (pr2 equiv-group-Algebra-Group)) = Group-group-Algebra
-pr2 (pr1 (pr2 equiv-group-Algebra-Group)) G =
- eq-pair-Σ refl (eq-is-prop (is-prop-is-group (semigroup-Group G)))
-pr1 (pr2 (pr2 equiv-group-Algebra-Group)) = Group-group-Algebra
-pr2 (pr2 (pr2 equiv-group-Algebra-Group)) A =
- eq-pair-Σ
- ( eq-pair-Σ
- ( refl)
- ( eq-htpy
- ( λ { unit-group-op →
- ( eq-htpy λ {empty-vec → refl}) ;
- mul-group-op →
- ( eq-htpy λ { (x ∷ y ∷ empty-vec) → refl}) ;
- inv-group-op →
- ( eq-htpy λ { (x ∷ empty-vec) → refl})})))
- ( eq-is-prop
- ( is-prop-is-algebra
- ( group-signature) ( group-Theory)
- ( model-Algebra group-signature group-Theory A)))
+ ( λ where
+ unit-group-op v → unit-Group G
+ mul-group-op (x ∷ y ∷ empty-vec) → mul-Group G x y
+ inv-group-op (x ∷ empty-vec) → inv-Group G x))
+ ( λ where
+ associative-l-group-laws assign →
+ associative-mul-Group G (assign 0) (assign 1) (assign 2)
+ invl-l-group-laws assign →
+ left-inverse-law-mul-Group G (assign 0)
+ invr-r-group-laws assign →
+ right-inverse-law-mul-Group G (assign 0)
+ idl-l-group-laws assign →
+ left-unit-law-mul-Group G (assign 0)
+ idr-r-group-laws assign →
+ right-unit-law-mul-Group G (assign 0))
+
+abstract
+ equiv-group-Algebra-Group :
+ {l : Level} →
+ Algebra group-signature group-Theory l ≃
+ Group l
+ pr1 equiv-group-Algebra-Group = group-Algebra-Group
+ pr1 (pr1 (pr2 equiv-group-Algebra-Group)) = Group-group-Algebra
+ pr2 (pr1 (pr2 equiv-group-Algebra-Group)) G =
+ eq-pair-Σ refl (eq-is-prop (is-prop-is-group (semigroup-Group G)))
+ pr1 (pr2 (pr2 equiv-group-Algebra-Group)) = Group-group-Algebra
+ pr2 (pr2 (pr2 equiv-group-Algebra-Group)) A =
+ eq-pair-Σ
+ ( eq-pair-Σ
+ ( refl)
+ ( eq-htpy
+ ( λ where
+ unit-group-op → eq-htpy (λ where empty-vec → refl)
+ mul-group-op → eq-htpy (λ where (x ∷ y ∷ empty-vec) → refl)
+ inv-group-op → eq-htpy (λ where (x ∷ empty-vec) → refl))))
+ ( eq-is-prop
+ ( is-prop-is-algebra
+ ( group-signature) ( group-Theory)
+ ( model-Algebra group-signature group-Theory A)))
```