This repository has been archived by the owner on Jul 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 298
feat(algebra/*): morphisms from closures are equal if they agree on generators #18836
Open
eric-wieser
wants to merge
2
commits into
master
Choose a base branch
from
eric-wieser/span-ext
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -394,13 +394,15 @@ le_antisymm (subalgebra.star_closure_le_iff.2 $ subset_adjoin R (S : set A)) | |
|
||
/-- If some predicate holds for all `x ∈ (s : set A)` and this predicate is closed under the | ||
`algebra_map`, addition, multiplication and star operations, then it holds for `a ∈ adjoin R s`. -/ | ||
@[elab_as_eliminator] | ||
lemma adjoin_induction {s : set A} {p : A → Prop} {a : A} (h : a ∈ adjoin R s) | ||
(Hs : ∀ (x : A), x ∈ s → p x) (Halg : ∀ (r : R), p (algebra_map R A r)) | ||
(Hadd : ∀ (x y : A), p x → p y → p (x + y)) (Hmul : ∀ (x y : A), p x → p y → p (x * y)) | ||
(Hstar : ∀ (x : A), p x → p (star x)) : p a := | ||
algebra.adjoin_induction h (λ x hx, hx.elim (λ hx, Hs x hx) (λ hx, star_star x ▸ Hstar _ (Hs _ hx))) | ||
Halg Hadd Hmul | ||
|
||
@[elab_as_eliminator] | ||
lemma adjoin_induction₂ {s : set A} {p : A → A → Prop} {a b : A} (ha : a ∈ adjoin R s) | ||
(hb : b ∈ adjoin R s) (Hs : ∀ (x : A), x ∈ s → ∀ (y : A), y ∈ s → p x y) | ||
(Halg : ∀ (r₁ r₂ : R), p (algebra_map R A r₁) (algebra_map R A r₂)) | ||
|
@@ -425,6 +427,7 @@ begin | |
end | ||
|
||
/-- The difference with `star_subalgebra.adjoin_induction` is that this acts on the subtype. -/ | ||
@[elab_as_eliminator] | ||
lemma adjoin_induction' {s : set A} {p : adjoin R s → Prop} (a : adjoin R s) | ||
(Hs : ∀ x (h : x ∈ s), p ⟨x, subset_adjoin R s h⟩) | ||
(Halg : ∀ r, p (algebra_map R _ r)) (Hadd : ∀ x y, p x → p y → p (x + y)) | ||
|
@@ -610,18 +613,34 @@ lemma map_adjoin [star_module R B] (f : A →⋆ₐ[R] B) (s : set A) : | |
galois_connection.l_comm_of_u_comm set.image_preimage (gc_map_comap f) star_subalgebra.gc | ||
star_subalgebra.gc (λ _, rfl) | ||
|
||
lemma ext_adjoin {s : set A} [star_alg_hom_class F R (adjoin R s) B] {f g : F} | ||
(h : ∀ x : adjoin R s, (x : A) ∈ s → f x = g x) : f = g := | ||
/-- Two star algebra morphisms from `star_subalgebra.adjoin` are equal if they agree on the | ||
generators -/ | ||
lemma _root_.star_alg_hom_class.ext_adjoin | ||
{s : set A} [star_alg_hom_class F R (adjoin R s) B] ⦃f g : F⦄ | ||
(h : f ∘ set.inclusion (subset_adjoin _ _) = g ∘ set.inclusion (subset_adjoin _ _)) : f = g := | ||
begin | ||
refine fun_like.ext f g (λ a, adjoin_induction' a (λ x hx, _) (λ r, _) (λ x y hx hy, _) | ||
(λ x y hx hy, _) (λ x hx, _)), | ||
{ exact h ⟨x, subset_adjoin R s hx⟩ hx }, | ||
{ simp only [alg_hom_class.commutes] }, | ||
{ rw [map_add, map_add, hx, hy] }, | ||
{ rw [map_mul, map_mul, hx, hy] }, | ||
{ rw [map_star, map_star, hx] }, | ||
refine fun_like.ext _ _ (λ x, _), | ||
refine adjoin_induction' x _ _ _ _ _, | ||
{ intros x hx, | ||
exact (congr_fun h ⟨x, hx⟩ : _) }, | ||
{ intro r, | ||
exact (alg_hom_class.commutes f _).trans (alg_hom_class.commutes g _).symm }, | ||
{ intros x y hfgx hfgy, | ||
exact (map_add f _ _).trans ((congr_arg2 (+) hfgx hfgy).trans (map_add g _ _).symm) }, | ||
{ intros x y hfgx hfgy, | ||
exact (map_mul f _ _).trans ((congr_arg2 (*) hfgx hfgy).trans (map_mul g _ _).symm) }, | ||
{ intros x hfg, | ||
exact (map_star f _).trans ((congr_arg star hfg).trans (map_star g _).symm) }, | ||
end | ||
|
||
/-- Two star algebra morphisms from `star_subalgebra.adjoin` are equal if they agree on the | ||
generators. | ||
|
||
See note [partially-applied ext lemmas]. -/ | ||
@[ext] lemma ext_adjoin {s : set A} ⦃f g : adjoin R s →⋆ₐ[R] B⦄ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unfortunately the existing lemma couldn't be tagged |
||
(h : f ∘ set.inclusion (subset_adjoin _ _) = g ∘ set.inclusion (subset_adjoin _ _)) : f = g := | ||
star_alg_hom_class.ext_adjoin h | ||
|
||
lemma ext_adjoin_singleton {a : A} [star_alg_hom_class F R (adjoin R ({a} : set A)) B] {f g : F} | ||
(h : f ⟨a, self_mem_adjoin_singleton R a⟩ = g ⟨a, self_mem_adjoin_singleton R a⟩) : f = g := | ||
ext_adjoin $ λ x hx, (show x = ⟨a, self_mem_adjoin_singleton R a⟩, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@j-loreaux, do you have thoughts on which phrasing is more useful of:
f ∘ set.inclusion (subset_adjoin _ _) = g ∘ set.inclusion (subset_adjoin _ _)
∀ x : adjoin R s, (x : A) ∈ s → f x = g x
∀ (x : A) (hx : x ∈ s), f ⟨x, subset_adjoin _ _ hx⟩ = g ⟨x, subset_adjoin _ _ hx⟩
In theory the first one lets you chain further ext lemmas, but in practice I don't think any exist.