Locally finite types
Content created by Fredrik Bakke.
Created on 2024-08-22.
Last modified on 2024-08-22.
module univalent-combinatorics.locally-finite-types where
Imports
open import elementary-number-theory.natural-numbers open import foundation.0-connected-types open import foundation.1-types open import foundation.action-on-identifications-functions open import foundation.cartesian-product-types open import foundation.constant-maps open import foundation.contractible-types open import foundation.coproduct-types open import foundation.decidable-equality open import foundation.decidable-propositions open import foundation.decidable-types open import foundation.dependent-universal-property-equivalences open import foundation.embeddings open import foundation.empty-types open import foundation.equality-cartesian-product-types open import foundation.equality-coproduct-types open import foundation.equality-dependent-pair-types open import foundation.equivalences open import foundation.fiber-inclusions open import foundation.fibers-of-maps open import foundation.function-extensionality open import foundation.function-types open import foundation.functoriality-coproduct-types open import foundation.functoriality-dependent-pair-types open import foundation.functoriality-set-truncation open import foundation.homotopies open import foundation.identity-types open import foundation.injective-maps open import foundation.logical-equivalences open import foundation.maybe open import foundation.mere-equality open import foundation.mere-equivalences open import foundation.propositional-extensionality open import foundation.propositional-truncations open import foundation.propositions open import foundation.set-truncations open import foundation.sets open import foundation.subtypes open import foundation.surjective-maps open import foundation.transport-along-identifications open import foundation.truncated-types open import foundation.truncation-levels open import foundation.type-arithmetic-coproduct-types open import foundation.unit-type open import foundation.univalence open import foundation.universal-property-coproduct-types open import foundation.universal-property-empty-type open import foundation.universal-property-unit-type open import foundation.universe-levels open import foundation.whiskering-homotopies-composition open import univalent-combinatorics.cartesian-product-types open import univalent-combinatorics.coproduct-types open import univalent-combinatorics.counting open import univalent-combinatorics.dependent-function-types open import univalent-combinatorics.dependent-pair-types open import univalent-combinatorics.distributivity-of-set-truncation-over-finite-products open import univalent-combinatorics.equality-finite-types open import univalent-combinatorics.finite-types open import univalent-combinatorics.finitely-presented-types open import univalent-combinatorics.function-types open import univalent-combinatorics.image-of-maps open import univalent-combinatorics.standard-finite-types
Idea
A type is locally finite¶ if its identity types are finite.
Definitions
Locally finite types
is-locally-finite-Prop : {l : Level} → UU l → Prop l is-locally-finite-Prop A = Π-Prop A (λ x → Π-Prop A (λ y → is-finite-Prop (x = y))) is-locally-finite : {l : Level} → UU l → UU l is-locally-finite A = type-Prop (is-locally-finite-Prop A) is-prop-is-locally-finite : {l : Level} (A : UU l) → is-prop (is-locally-finite A) is-prop-is-locally-finite A = is-prop-type-Prop (is-locally-finite-Prop A)
Properties
Locally finite types are closed under equivalences
is-locally-finite-equiv : {l1 l2 : Level} {A : UU l1} {B : UU l2} (e : A ≃ B) → is-locally-finite B → is-locally-finite A is-locally-finite-equiv e f x y = is-finite-equiv' (equiv-ap e x y) (f (map-equiv e x) (map-equiv e y)) is-locally-finite-equiv' : {l1 l2 : Level} {A : UU l1} {B : UU l2} (e : A ≃ B) → is-locally-finite A → is-locally-finite B is-locally-finite-equiv' e = is-locally-finite-equiv (inv-equiv e)
Locally finite types are 1
-types
is-1-type-is-locally-finite : {l1 : Level} {A : UU l1} → is-locally-finite A → is-1-type A is-1-type-is-locally-finite H x y = is-set-is-finite (H x y)
Types with decidable equality are locally finite
is-locally-finite-has-decidable-equality : {l1 : Level} {A : UU l1} → has-decidable-equality A → is-locally-finite A is-locally-finite-has-decidable-equality d x y = is-finite-eq d
Any proposition is locally finite
is-locally-finite-is-prop : {l1 : Level} {A : UU l1} → is-prop A → is-locally-finite A is-locally-finite-is-prop H x y = is-finite-is-contr (H x y)
Any contractible type is locally finite
is-locally-finite-is-contr : {l1 : Level} {A : UU l1} → is-contr A → is-locally-finite A is-locally-finite-is-contr H = is-locally-finite-is-prop (is-prop-is-contr H) is-locally-finite-unit : is-locally-finite unit is-locally-finite-unit = is-locally-finite-is-contr is-contr-unit
Any empty type is locally finite
is-locally-finite-is-empty : {l1 : Level} {A : UU l1} → is-empty A → is-locally-finite A is-locally-finite-is-empty H = is-locally-finite-is-prop (λ x → ex-falso (H x)) is-locally-finite-empty : is-locally-finite empty is-locally-finite-empty = is-locally-finite-is-empty id
Cartesian products of locally finite types
is-locally-finite-product : {l1 l2 : Level} {A : UU l1} {B : UU l2} → is-locally-finite A → is-locally-finite B → is-locally-finite (A × B) is-locally-finite-product f g x y = is-finite-equiv ( equiv-eq-pair x y) ( is-finite-product (f (pr1 x) (pr1 y)) (g (pr2 x) (pr2 y)))
Finite products of locally finite types are locally finite
is-locally-finite-Π-Fin : {l1 : Level} (k : ℕ) {B : Fin k → UU l1} → ((x : Fin k) → is-locally-finite (B x)) → is-locally-finite ((x : Fin k) → B x) is-locally-finite-Π-Fin {l1} zero-ℕ {B} f = is-locally-finite-is-contr (dependent-universal-property-empty' B) is-locally-finite-Π-Fin {l1} (succ-ℕ k) {B} f = is-locally-finite-equiv ( equiv-dependent-universal-property-coproduct B) ( is-locally-finite-product ( is-locally-finite-Π-Fin k (λ x → f (inl x))) ( is-locally-finite-equiv ( equiv-dependent-universal-property-unit (B ∘ inr)) ( f (inr star)))) 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} (k , e) g = is-locally-finite-equiv ( equiv-precomp-Π e B) ( is-locally-finite-Π-Fin k (λ x → g (map-equiv e x))) is-locally-finite-Π : {l1 l2 : Level} {A : UU l1} {B : A → UU l2} → is-finite A → ((x : A) → is-locally-finite (B x)) → is-locally-finite ((x : A) → B x) is-locally-finite-Π {l1} {l2} {A} {B} f g = apply-universal-property-trunc-Prop f ( is-locally-finite-Prop ((x : A) → B x)) ( λ e → is-locally-finite-Π-count e g)
The dependent sum of locally finite types
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 (x , y) (x' , y') = is-finite-equiv' ( equiv-pair-eq-Σ (x , y) (x' , y')) ( is-finite-Σ (H x x') (λ p → K x' (tr B p y) y'))
Recent changes
- 2024-08-22. Fredrik Bakke. Cleanup of finite types (#1166).