Built with Alectryon, running Coq+SerAPI v8.19.0+0.19.3. Bubbles () indicate interactive fragments: hover for details, tap to reveal contents. Use Ctrl+↑Ctrl+↓ to navigate, Ctrl+🖱️ to focus. On Mac, use ⌘ instead of Ctrl.
(** This file develops [Isomorphic], [≅]. See ua_homomorphism.v for [IsHomomorphism] and [IsIsomorphism]. *)
[Loading ML file number_string_notation_plugin.cmxs (using legacy method) ... done]
Require Import
HoTT.Types
HoTT.Tactics.(** Two algebras [A B : Algebra σ] are isomorphic if there is an isomorphism [∀ s, A s → B s]. *)RecordIsomorphic {σ : Signature} (AB : Algebra σ) := BuildIsomorphic
{ def_isomorphic : ∀s, A s → B s
; is_homomorphism_isomorphic :: IsHomomorphism def_isomorphic
; is_isomorphism_isomorphic :: IsIsomorphism def_isomorphic }.Arguments BuildIsomorphic {σ A B} def_isomorphic
{is_homomorphism_isomorphic} {is_isomorphism_isomorphic}.Arguments def_isomorphic {σ A B}.Arguments is_homomorphism_isomorphic {σ A B}.Arguments is_isomorphism_isomorphic {σ A B}.Moduleisomorphic_notations.GlobalNotation"A ≅ B" := (Isomorphic A B) : Algebra_scope.Endisomorphic_notations.Import isomorphic_notations.DefinitionSigIsomorphic {σ : Signature} (AB : Algebra σ) :=
{ def_iso : ∀s, A s → B s
| { _ : IsHomomorphism def_iso | IsIsomorphism def_iso }}.
σ: Signature A, B: Algebra σ
SigIsomorphic A B <~> A ≅ B
σ: Signature A, B: Algebra σ
SigIsomorphic A B <~> A ≅ B
issig.Defined.(** Isomorphic algebras can be identified [A ≅ B → A = B]. *)
H: Univalence σ: Signature A, B: Algebra σ e: A ≅ B
A = B
H: Univalence σ: Signature A, B: Algebra σ e: A ≅ B
A = B
exact (path_isomorphism (def_isomorphic e)).Defined.(** Identified algebras are isomorphic [A = B → A ≅ B] *)
σ: Signature A, B: Algebra σ p: A = B
A ≅ B
σ: Signature A, B: Algebra σ p: A = B
A ≅ B
σ: Signature A: Algebra σ
A ≅ A
exact (BuildIsomorphic (hom_id A)).Defined.(** To find a path between two witnesses [F G : A ≅ B], it suffices to find a path between the defining families of functions and the [is_homomorphism_hom] witnesses. *)
H: Funext σ: Signature A, B: Algebra σ F, G: A ≅ B a: def_isomorphic F = def_isomorphic G b: transport IsHomomorphism a
(is_homomorphism_isomorphic F) =
is_homomorphism_isomorphic G
F = G
H: Funext σ: Signature A, B: Algebra σ F, G: A ≅ B a: def_isomorphic F = def_isomorphic G b: transport IsHomomorphism a
(is_homomorphism_isomorphic F) =
is_homomorphism_isomorphic G
F = G
H: Funext σ: Signature A, B: Algebra σ F, G: A ≅ B a: def_isomorphic F = def_isomorphic G b: transport IsHomomorphism a
(is_homomorphism_isomorphic F) =
is_homomorphism_isomorphic G
(issig_isomorphic A B)^-1 F =
(issig_isomorphic A B)^-1 G
H: Funext σ: Signature A, B: Algebra σ F, G: A ≅ B a: def_isomorphic F = def_isomorphic G b: transport IsHomomorphism a
(is_homomorphism_isomorphic F) =
is_homomorphism_isomorphic G
((issig_isomorphic A B)^-1 F).1 =
((issig_isomorphic A B)^-1 G).1
H: Funext σ: Signature A, B: Algebra σ F, G: A ≅ B a: def_isomorphic F = def_isomorphic G b: transport IsHomomorphism a
(is_homomorphism_isomorphic F) =
is_homomorphism_isomorphic G
transport
(λdef_iso : foralls : Sort σ, A s -> B s,
{H : IsHomomorphism def_iso &
IsIsomorphism def_iso}) ?p
((issig_isomorphic A B)^-1 F).2 =
((issig_isomorphic A B)^-1 G).2
H: Funext σ: Signature A, B: Algebra σ F, G: A ≅ B a: def_isomorphic F = def_isomorphic G b: transport IsHomomorphism a
(is_homomorphism_isomorphic F) =
is_homomorphism_isomorphic G
((issig_isomorphic A B)^-1 F).1 =
((issig_isomorphic A B)^-1 G).1
exact a.
H: Funext σ: Signature A, B: Algebra σ F, G: A ≅ B a: def_isomorphic F = def_isomorphic G b: transport IsHomomorphism a
(is_homomorphism_isomorphic F) =
is_homomorphism_isomorphic G
transport
(λdef_iso : foralls : Sort σ, A s -> B s,
{H : IsHomomorphism def_iso &
IsIsomorphism def_iso}) a
((issig_isomorphic A B)^-1 F).2 =
((issig_isomorphic A B)^-1 G).2
H: Funext σ: Signature A, B: Algebra σ F, G: A ≅ B a: def_isomorphic F = def_isomorphic G b: transport IsHomomorphism a
(is_homomorphism_isomorphic F) =
is_homomorphism_isomorphic G
(transport
(λdef_iso : foralls : Sort σ, A s -> B s,
{H : IsHomomorphism def_iso &
IsIsomorphism def_iso}) a
((issig_isomorphic A B)^-1 F).2).1 =
(((issig_isomorphic A B)^-1 G).2).1
H: Funext σ: Signature A, B: Algebra σ F, G: A ≅ B a: def_isomorphic F = def_isomorphic G b: transport IsHomomorphism a
(is_homomorphism_isomorphic F) =
is_homomorphism_isomorphic G
(transport IsHomomorphism a
(((issig_isomorphic A B)^-1 F).2).1;
transportD IsHomomorphism IsIsomorphism a
(((issig_isomorphic A B)^-1 F).2).1
(((issig_isomorphic A B)^-1 F).2).2).1 =
(((issig_isomorphic A B)^-1 G).2).1
apply b.Defined.(** Suppose [IsHSetAlgebra B]. To find a path between two isomorphic witnesses [F G : A ≅ B], it suffices to find a path between the defining families of functions. *)
H: Funext σ: Signature A, B: Algebra σ IsHSetAlgebra0: IsHSetAlgebra B F, G: A ≅ B a: def_isomorphic F = def_isomorphic G
F = G
H: Funext σ: Signature A, B: Algebra σ IsHSetAlgebra0: IsHSetAlgebra B F, G: A ≅ B a: def_isomorphic F = def_isomorphic G
F = G
H: Funext σ: Signature A, B: Algebra σ IsHSetAlgebra0: IsHSetAlgebra B F, G: A ≅ B a: def_isomorphic F = def_isomorphic G
transport IsHomomorphism a
(is_homomorphism_isomorphic F) =
is_homomorphism_isomorphic G
def_isomorphic (isomorphic_id p) =
transport
(λC : Carriers σ, foralls : Sort σ, C s -> B s)
(ap carriers p)^ (hom_id B)
σ: Signature A, B: Algebra σ p: A = B
def_isomorphic (isomorphic_id p) =
transport
(λC : Carriers σ, foralls : Sort σ, C s -> B s)
(ap carriers p)^ (hom_id B)
by path_induction.Defined.
σ: Signature A, B: Algebra σ p: A = B
def_isomorphic (isomorphic_id p) =
transport
(λC : Carriers σ, foralls : Sort σ, A s -> C s)
(ap carriers p) (hom_id A)
σ: Signature A, B: Algebra σ p: A = B
def_isomorphic (isomorphic_id p) =
transport
(λC : Carriers σ, foralls : Sort σ, A s -> C s)
(ap carriers p) (hom_id A)
by path_induction.Defined.Endpath_def_isomorphic_id_transport.(** If [IsHSetAlgebra A], then [path_isomorphism] maps the identity homomorphism of [A] to the identity path. *)(* I suspect that the following lemma holds even when [A] is not a set algebra. To show this, [path_isomorphism] and [path_operations_equiv] should be made transparent, which they are not at the moment. *)
H: Univalence σ: Signature A: Algebra σ IsHSetAlgebra0: IsHSetAlgebra A
path_isomorphism (hom_id A) = 1
H: Univalence σ: Signature A: Algebra σ IsHSetAlgebra0: IsHSetAlgebra A
path_isomorphism (hom_id A) = 1
H: Univalence σ: Signature A: Algebra σ IsHSetAlgebra0: IsHSetAlgebra A
ap carriers (path_isomorphism (hom_id A)) =
ap carriers 1
H: Univalence σ: Signature A: Algebra σ IsHSetAlgebra0: IsHSetAlgebra A
path_forall A A
(λi : Sort σ,
path_universe (equiv_isomorphism (hom_id A) i)) =
ap carriers 1
H: Univalence σ: Signature A: Algebra σ IsHSetAlgebra0: IsHSetAlgebra A
path_forall A A (λs : Sort σ, 1) = 1
H: Univalence σ: Signature A: Algebra σ IsHSetAlgebra0: IsHSetAlgebra A
path_universe (equiv_isomorphism (hom_id A) s) = 1
apply path_universe_1.Qed.(** The following section shows that [isomorphic_id] is an equivalence with inverse [id_isomorphic]. *)Sectionisequiv_isomorphic_id.Context `{Univalence} {σ} (A B : Algebra σ) `{IsHSetAlgebra B}.
H: Univalence σ: Signature A, B: Algebra σ IsHSetAlgebra0: IsHSetAlgebra B
isomorphic_id o id_isomorphic == idmap
H: Univalence σ: Signature A, B: Algebra σ IsHSetAlgebra0: IsHSetAlgebra B
isomorphic_id o id_isomorphic == idmap
H: Univalence σ: Signature A, B: Algebra σ IsHSetAlgebra0: IsHSetAlgebra B F: A ≅ B
isomorphic_id (id_isomorphic F) = F
H: Univalence σ: Signature A, B: Algebra σ IsHSetAlgebra0: IsHSetAlgebra B F: A ≅ B
def_isomorphic (isomorphic_id (id_isomorphic F)) =
def_isomorphic F
H: Univalence σ: Signature A, B: Algebra σ IsHSetAlgebra0: IsHSetAlgebra B F: A ≅ B
transport
(λC : Carriers σ, foralls : Sort σ, A s -> C s)
(ap carriers (id_isomorphic F)) (hom_id A) =
def_isomorphic F
H: Univalence σ: Signature A, B: Algebra σ IsHSetAlgebra0: IsHSetAlgebra B F: A ≅ B s: Sort σ x: A s
transport
(λC : Carriers σ, foralls : Sort σ, A s -> C s)
(ap carriers (id_isomorphic F)) (hom_id A) s x =
def_isomorphic F s x
H: Univalence σ: Signature A, B: Algebra σ IsHSetAlgebra0: IsHSetAlgebra B F: A ≅ B s: Sort σ x: A s
transport (λx : Carriers σ, x s)
(ap carriers (id_isomorphic F)) (hom_id A s x) =
def_isomorphic F s x
H: Univalence σ: Signature A, B: Algebra σ IsHSetAlgebra0: IsHSetAlgebra B F: A ≅ B s: Sort σ x: A s
transport (λx : Carriers σ, x s)
(path_forall A B
(λi : Sort σ,
path_universe
(equiv_isomorphism (def_isomorphic F) i)))
(hom_id A s x) = def_isomorphic F s x
H: Univalence σ: Signature A, B: Algebra σ IsHSetAlgebra0: IsHSetAlgebra B F: A ≅ B s: Sort σ x: A s
transport idmap
(path_universe
(equiv_isomorphism (def_isomorphic F) s))
(hom_id A s x) = def_isomorphic F s x
apply transport_path_universe.Qed.
H: Univalence σ: Signature A, B: Algebra σ IsHSetAlgebra0: IsHSetAlgebra B
id_isomorphic o isomorphic_id == idmap
H: Univalence σ: Signature A, B: Algebra σ IsHSetAlgebra0: IsHSetAlgebra B
id_isomorphic o isomorphic_id == idmap
H: Univalence σ: Signature A, B: Algebra σ IsHSetAlgebra0: IsHSetAlgebra B p: A = B
id_isomorphic (isomorphic_id p) = p
H: Univalence σ: Signature A: Algebra σ IsHSetAlgebra0: IsHSetAlgebra A
id_isomorphic (isomorphic_id 1) = 1
H: Univalence σ: Signature A: Algebra σ IsHSetAlgebra0: IsHSetAlgebra A
IsHSetAlgebra A
exact _.Qed.#[export] Instanceisequiv_isomorphic_id : IsEquiv (@isomorphic_id σ A B)
:= isequiv_adjointify
isomorphic_id
id_isomorphic
sect_id_isomorphic
sect_isomorphic_id.Endisequiv_isomorphic_id.