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

switch to Int in cring_Z #2000

Merged
merged 15 commits into from
Jul 5, 2024
Merged
Changes from 1 commit
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
33 changes: 33 additions & 0 deletions theories/Spaces/Int.v
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,39 @@ Proof.
f_ap.
Defined.

(** This is a general lemma about commutativity of monoid units. Don't know what file this should belong to. *)
Lemma inverse_commute_commute {A} (f : A -> A) `{!IsEquiv f} (g : A -> A) (p : g o f == f o g)
: g o f^-1 == f^-1 o g.
Alizter marked this conversation as resolved.
Show resolved Hide resolved
Proof.
intros a.
lhs_V apply (eissect f ((g o f^-1) a)).
lhs_V apply (ap f^-1 (p (f^-1 a))).
lhs apply (ap (f^-1 o g) (eisretr f a)).
reflexivity.
Defined.

(** If the maps f and g commutes, then the order of application doesn't matter *)
Definition int_iter_commute_function_application {A} (f : A -> A) `{!IsEquiv f} (g : A -> A) (p : g o f == f o g) (n : Int) (a : A)
: g (int_iter f n a) = int_iter f n (g a).
Proof.
destruct n.
- induction n.
+ simpl.
exact (inverse_commute_commute f g p a).
+ simpl.
lhs apply (inverse_commute_commute f g p).
lhs apply (ap f^-1 IHn).
reflexivity.
- reflexivity.
- induction n.
+ simpl.
exact (p a).
+ simpl.
lhs apply p.
lhs apply (ap f IHn).
reflexivity.
Defined.

(** ** Exponentiation of loops *)

Definition loopexp {A : Type} {x : A} (p : x = x) (z : Int) : (x = x)
Expand Down
Loading