-
Notifications
You must be signed in to change notification settings - Fork 298
feat(ring_theory/congruence): add the complete_lattice
instance
#18588
Conversation
lt := λ c d, c ≤ d ∧ ¬d ≤ c, | ||
le_refl := λ c _ _, id, | ||
le_trans := λ c1 c2 c3 h1 h2 x y h, h2 $ h1 h, | ||
lt_iff_le_not_le := λ _ _, iff.rfl, |
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.
lt_iff_le_not_le := λ _ _, iff.rfl, |
instance : complete_lattice (ring_con R) := | ||
{ inf := λ c d, | ||
{ to_setoid := (c.to_setoid ⊓ d.to_setoid), | ||
mul' := λ _ _ _ _ h1 h2, ⟨c.mul h1.1 h2.1, d.mul h1.2 h2.2⟩, | ||
add' := λ _ _ _ _ h1 h2, ⟨c.add h1.1 h2.1, d.add h1.2 h2.2⟩ }, | ||
inf_le_left := λ _ _ _ _ h, h.1, | ||
inf_le_right := λ _ _ _ _ h, h.2, | ||
le_inf := λ _ _ _ hb hc _ _ h, ⟨hb h, hc h⟩, | ||
top := { mul' := λ _ _ _ _ _ _, trivial, | ||
add' := λ _ _ _ _ _ _, trivial, | ||
..(⊤ : setoid R) }, | ||
le_top := λ _ _ _ h, trivial, | ||
bot := { mul' := λ _ _ _ _, congr_arg2 _, | ||
add' := λ _ _ _ _, congr_arg2 _, | ||
..(⊥ : setoid R) }, | ||
bot_le := λ c x y h, h ▸ c.refl x, | ||
.. complete_lattice_of_Inf (ring_con R) $ assume s, | ||
⟨λ r hr x y h, (h : ∀ r ∈ s, (r : ring_con R) x y) r hr, λ r hr x y h r' hr', hr hr' h⟩ } |
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.
Can you first get distrib_lattice (ring_con R)
by pulling back from ,R → R → Prop
? See simple_graph.distrib_lattice
for what I mean precisely.
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.
No, because it's not true; the sup
of two congruence relations is not obviously the sup of their relations.
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.
You can at least pull back semilattice_inf (ring_con R)
, then.
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.
That's a good idea, I'll do it in a follow-up PR
|
||
/-- The complete lattice of congruence relations on a given type with multiplication and | ||
addition. -/ | ||
instance : complete_lattice (ring_con 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.
Is that true? My bet is "probably".
instance : complete_lattice (ring_con R) := | |
instance : complete_distrib_lattice (ring_con 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.
Is it true on setoid
? Either way, this instance is just copied from the instance for con M
and add_con M
; there no novel generalization going on in this PR, it's just mechanistic copying.
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.
Do you mind changing group_theory.congruence
then? This PR needs forward-porting anyway.
The code is copied from `GroupTheory/Congruence.lean`, and then modified to fix the errors. I haven't copied the full contents of `GroupTheory/Congruencee`, only the results about the lattice structure. This replaces leanprover-community/mathlib3#18588
The code is copied from `GroupTheory/Congruence.lean`, and then modified to fix the errors. I haven't copied the full contents of `GroupTheory/Congruencee`, only the results about the lattice structure. This replaces leanprover-community/mathlib3#18588
The code is copied from `GroupTheory/Congruence.lean`, and then modified to fix the errors. I haven't copied the full contents of `GroupTheory/Congruencee`, only the results about the lattice structure. This replaces leanprover-community/mathlib3#18588
This should be easy to forward-port since all the results are just at the end of the file.
The code is copied from
group_theory/congruence.lean
, and then modified to fix the errors.I haven't copied the full contents of
group_theory/congruence
, only the results about the lattice structure.