-
Notifications
You must be signed in to change notification settings - Fork 194
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
grp_pow and related things #2015
Comments
For Group.v I have this at the moment: (** [grp_pow g n] commutes with [g].*)
Definition grp_pow_commutes'' {G : Group} (n : Int) (g : G)
: (grp_pow g n) * g = g * (grp_pow g n).
Proof.
symmetry.
by apply grp_pow_commutes.
Defined.
(** If [g] and [h] commute, then [grp_pow (g * h) n] = (grp_pow g n) * (grp_pow h n)]. *)
Definition grp_pow_mul {G : Group} (n : Int) (g h : G)
(c : g * h = h * g)
: grp_pow (g * h) n = (grp_pow g n) * (grp_pow h n).
Proof.
induction n.
- simpl.
rhs nrapply grp_unit_r; reflexivity.
- rewrite 3 grp_pow_succ.
rewrite IHn.
repeat rewrite grp_assoc.
apply grp_cancelR.
repeat rewrite <- grp_assoc.
apply grp_cancelL.
apply grp_pow_commutes.
symmetry.
apply c; reflexivity.
- simpl.
rewrite 3 grp_pow_pred.
rewrite IHn.
repeat rewrite grp_assoc.
apply grp_cancelR.
Defined. The goal looks like this:
@Alizter can you have a hint for this please? For Ring/Z.v: Definition rng_int_mult_foo {R : Ring} (r : R) (n : Int)
: rng_int_mult r n = (rng_int_mult 1 n) * r.
Proof.
Defined. I get the error:
|
@ndcroos I haven't been able to check the first, but for the second you will need to replace Int with cring_Z or else Coq doesn't pick up the ring structure. |
A few comments.
This isn't needed. You can just use
This produces the term
So here is how I would write the first part of your proof: Definition grp_pow_mul {G : Group} (n : Int) (g h : G)
(c : g * h = h * g)
: grp_pow (g * h) n = (grp_pow g n) * (grp_pow h n).
Proof.
induction n.
- simpl.
symmetry; nrapply grp_unit_r.
- rewrite 3 grp_pow_succ.
rewrite IHn.
rewrite 2 grp_assoc.
apply grp_cancelR.
rewrite <- 2 grp_assoc.
apply grp_cancelL.
apply grp_pow_commutes.
exact c^.
- simpl.
rewrite 3 grp_pow_pred.
rewrite IHn.
rewrite 2 grp_assoc.
apply grp_cancelR. As for the hint, you'll want to first commute |
At the moment I have this proof, where all the goals are completed. (** If [g] and [h] commute, then [grp_pow (g * h) n] = (grp_pow g n) * (grp_pow h n)]. *)
Definition grp_pow_mul {G : Group} (n : Int) (g h : G)
(c : g * h = h * g)
: grp_pow (g * h) n = (grp_pow g n) * (grp_pow h n).
Proof.
induction n.
- simpl.
symmetry; nrapply grp_unit_r.
- rewrite 3 grp_pow_succ.
rewrite IHn.
rewrite 2 grp_assoc.
apply grp_cancelR.
rewrite <- 2 grp_assoc.
apply grp_cancelL.
apply grp_pow_commutes.
exact c^.
- simpl.
rewrite 3 grp_pow_pred.
rewrite IHn.
rewrite 2 grp_assoc.
apply grp_cancelR.
rewrite c.
rewrite grp_inv_op.
rewrite 2 grp_pow_commutes.
1: rewrite grp_assoc; reflexivity.
1: rewrite grp_commutes_inv; reflexivity.
rewrite <- grp_inv_op.
rewrite grp_commutes_inv.
1: reflexivity.
rewrite <- c.
rewrite c.
rewrite grp_commutes_op.
1: reflexivity.
1: exact c.
reflexivity.
Defined.
(** [grp_pow] satisfies a multiplicative law of exponents. *)
Definition grp_pow_int_mul {G : Group} (m n : Int) (g : G)
: grp_pow g (m * n)%int = grp_pow (grp_pow g m) n.
(* This will follow from the previous two. *)
Proof.
induction n.
- simpl.
rewrite int_mul_0_r.
simpl; reflexivity.
- simpl.
rewrite int_mul_succ_r.
rewrite grp_pow_add.
rewrite grp_pow_succ.
apply grp_cancelL.
exact IHn.
- simpl.
rewrite int_mul_pred_r.
rewrite grp_pow_add.
rewrite grp_pow_pred.
rewrite grp_pow_neg.
rewrite IHn.
apply grp_cancelR.
rewrite <- grp_pow_neg.
Defined. The remaining goal is here:
At this point, I tried several things: again looking at (Group element inversion is a group homomorphism if and only if the underlying group G is abelian, so using
So I think maybe Since I did not use |
The last goal of - simpl.
rewrite 3 grp_pow_pred.
rewrite IHn.
rewrite 2 grp_assoc.
apply grp_cancelR.
rewrite c.
rewrite grp_inv_op.
rewrite <- 2 grp_assoc.
apply grp_cancelL.
apply grp_pow_commutes.
symmetry; apply grp_commutes_inv, c. About Alternatively, the proof I had in mind uses induction on Sorry to be slow to respond. I'm travelling until Sept 1, and will be pretty busy in the fall. |
Thanks, the proofs for group.v are now complete. For Z.v I have still the same error. Definition rng_int_mult_foo {R : Ring} (r : R) (n : cring_Z)
: rng_int_mult r n = (rng_int_mult 1 n) * r.
Proof.
Defined.
|
@ndcroos The arguments of |
Is it meant that the proof for |
Yes, that is what I was proposing. I haven't checked all of the details, though. (BTW, |
Work on issue #2015: grp_pow and related things
Based on a comment I made in in #2000 (comment)_
I think
issemigrouppreserving_mult_rng_int_mult
can be proven by combining some pieces that will be useful on their own. See below for a sketch.Group.v:
Rings/Z.v:
cc: @ThomatoTomato
The text was updated successfully, but these errors were encountered: