Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some remaining exercises in Chapter 2 #2190

Merged
merged 8 commits into from
Jan 10, 2025
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions contrib/HoTTBookExercises.v
Original file line number Diff line number Diff line change
Expand Up @@ -680,17 +680,19 @@ Definition Book_2_13 := @HoTT.Types.Bool.equiv_bool_aut_bool.
(* ================================================== ex:equality-reflection *)
(** Exercise 2.14 *)


(** Assuming the equality reflection rule, given any [q : x = y], [x] and [y] are definitionally equal, so [q] and [refl_x] have the same type [x = x]. We can form the type [forall x y, forall q, q = refl_x]. A path induction produces an element r, with [(r x x p) : p = refl_x], which is also definitional by the equality reflection rule. *)
Theongck marked this conversation as resolved.
Show resolved Hide resolved

(* ================================================== ex:strengthen-transport-is-ap *)
(** Exercise 2.15 *)


Definition Book_2_15 {A} (B : A -> Type) {x y : A} (p : x = y)
: transport B p = HoTT.Types.Universe.equiv_path _ _ (ap B p)
:= match p with 1 => 1 end.

(* ================================================== ex:strong-from-weak-funext *)
(** Exercise 2.16 *)


Definition Book_2_16 := @HoTT.Metatheory.FunextVarieties.NaiveFunext_implies_Funext.

(* ================================================== ex:equiv-functor-types *)
(** Exercise 2.17 *)
Expand All @@ -700,7 +702,16 @@ Definition Book_2_13 := @HoTT.Types.Bool.equiv_bool_aut_bool.
(* ================================================== ex:dep-htpy-natural *)
(** Exercise 2.18 *)

(** This exercise is solved in the library as HoTT.Basics.PathGroupoids.apD_homotopic *)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
(** This exercise is solved in the library as HoTT.Basics.PathGroupoids.apD_homotopic *)
(** This exercise is solved in the library as HoTT.Basics.PathGroupoids.apD_homotopic, except that the equation is rearranged slightly. *)

Or maybe this version should be added to the library, to be analogous to concat_Ap? And then apD_homotopic could be proved using this new result? @Alizter , what do you think?

Copy link
Collaborator

@Alizter Alizter Jan 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sounds sensible.


Definition Book_2_18 {A : Type} {B : A -> Type} {f g : forall x, B x}
(H : forall x, f x = g x) {x y : A} (p : x = y)
: apD f p @ H y = ap (transport B p) (H x) @ apD g p.
Proof.
destruct p.
unfold transport.
exact (concat_1p _ @ (ap_idmap _)^ @ (concat_p1 _)^).
Defined.

(* ================================================== ex:equiv-functor-set *)
(** Exercise 3.1 *)
Expand Down
Loading