-
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
associativity of ideal product #2121
base: master
Are you sure you want to change the base?
associativity of ideal product #2121
Conversation
@jdchristensen I managed to carry out the opposite argument you suggested, but it required a lot of refactoring in Ideal. Namely, exploding the Section IdealLemmas which is probably for the best. While the diff is big, it might be a good time to perform some more style changes like changing Lemma to Definition. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I started reviewing this, but the change to the indentation made it impossible to see what changed later on in the file, as github got quite confused with the diff it displayed. It's better if large indentation changes can be moved to a separate commit. Maybe you can force push to fix this, replacing just the last commit? (I think the comments I already made should still be visible and understandable after this.)
(** We define the subset relation on ideals in the usual way: *) | ||
Definition ideal_subset {R : Ring} (I J : Subgroup R) := (forall x, I x -> J x). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is about Subgroups, not Ideals, it should go in Groups/Subgroup.v. Same with reflexivity, transitivity and antisymmetry. But really, this is just about any predicates on any type, so maybe it just belongs in Types/Forall or Basics/Overture or something like that?
Definition isleftideal_eq {R : Ring} (I J : Subgroup R) (p : ideal_eq I J) | ||
: IsLeftIdeal I -> IsLeftIdeal J. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be strengthened: If I
is an ideal, and J
is any predicate on R
which is pointwise logically equivalent to I
, then J
is a subgroup and an ideal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this just the composition of two results then? Any J
logically equivalent to a subgroup I
is also a subgroup, furthermore also an ideal when I
is one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. But we may as well state the stronger version if we generalize these predicate comparisons to any predicates on any types.
Signed-off-by: Ali Caglayan <[email protected]> <!-- ps-id: 43ff35d0-6f6a-46c5-94b5-479411cf915c -->
Signed-off-by: Ali Caglayan <[email protected]>
We show that the opposite of product ideals is the opposite of the reverse product. This allows us to deduplicate the argument occuring in ideal_product_assoc. Signed-off-by: Ali Caglayan <[email protected]>
Signed-off-by: Ali Caglayan <[email protected]>
10c5bf5
to
5f3d2b5
Compare
You're totally right about the diff being hard to read. I've gone ahead and separated that out. Sorry about that. I'll get to your other review suggestions later. |
Signed-off-by: Ali Caglayan <[email protected]>
Signed-off-by: Ali Caglayan <[email protected]>
theories/Algebra/Rings/Ideal.v
Outdated
apply ideal_product_op. | ||
nrapply (ideal_product_subset_pres_l (R:=rng_op R)). | ||
1: rapply ideal_product_op. | ||
apply f. | ||
apply (ideal_product_op (R:=rng_op R)). | ||
nrapply (ideal_product_subset_pres_l (R:=R)). | ||
1: rapply (ideal_product_op (R:=rng_op R)). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using opposite rings didn't really save many lines here. (Moreover, with another change I'm going to suggest, the proof of the first case will become a lot shorter, making the use of opposite rings even less efficient here.) This part can be made a bit cleaner using a helper definition:
Definition ideal_product_op_triple {R : Ring} (I J K : Ideal R)
: ideal_op R ((K ⋅ J) ⋅ I)
⊆ (ideal_op R I) ⋅ ((ideal_op R J) ⋅ (ideal_op R K)).
Proof.
intros x i.
apply (ideal_product_op (R:=rng_op R)).
nrapply (ideal_product_subset_pres_l (R:=R)).
1: nrapply (ideal_product_op (R:=rng_op R)).
apply i.
Defined.
Then this proof can become:
apply (ideal_product_op_triple (R:=rng_op R) I J K).
nrapply f.
apply ideal_product_op_triple.
(That helper definition is one-sided, though, so it's not a perfect solution. Maybe using transitivity of ideal_eq
(or its generalization to predicates on any type) could make it symmetrical?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I'll just push this along with my other idea to see what you think.
(Also adds subgroup_preimage, which is already in master.)
I pushed three commits. The first two I think are clear benefits. And The third commit is the thing I wrote a comment about. Feel free to revert if you think it is not worth it. Or maybe with the new approach to the assertion, it's not worth using opposite rings here? I do think opposite rings help with ideals in other parts of the file, so that's great. Can you find more places where this helps? I have to run and won't have time to look at this for a while, but hopefully you'll be able to use some of these ideas to clean things up further. |
Signed-off-by: Ali Caglayan <[email protected]>
Signed-off-by: Ali Caglayan <[email protected]>
This was left as a TODO so I did a quick proof for it. It's possible it can be simplified.