-
Notifications
You must be signed in to change notification settings - Fork 1.5k
feat(Geometry/Convex/ConvexSpace): show that an AffineMap IsAffineMap
#39437
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
base: master
Are you sure you want to change the base?
Changes from all commits
f463ad7
cbb97dd
1561a5d
2481dd5
665c26e
c2d7226
9bb82b5
8fb418e
46c8628
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -158,3 +158,32 @@ theorem convexCombPair_eq_lineMap (s t : R) (hs : 0 ≤ s) (ht : 0 ≤ t) | |||||
| simp [vsub_self] | ||||||
|
|
||||||
| end AddTorsor | ||||||
|
|
||||||
| section | ||||||
|
|
||||||
| namespace AffineMap | ||||||
|
|
||||||
| open Finset AddTorsor | ||||||
|
|
||||||
| attribute [local instance] AddTorsor.toConvexSpace | ||||||
|
|
||||||
| lemma of_apply_affineCombination | ||||||
| {k : Type u_1} {V P V₂ P₂ : Type*} [PartialOrder k] [Ring k] [IsStrictOrderedRing k] | ||||||
| [AddCommGroup V] [Module k V] [S : AffineSpace V P] | ||||||
| [AddCommGroup V₂] [Module k V₂] [AffineSpace V₂ P₂] (f : P → P₂) | ||||||
| (H : ∀ {ι : Type u_6} (s : Finset ι) (p : ι → P) (w : ι → k), | ||||||
|
Collaborator
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. One small note: I wasn't very satisfied with the universe for lemma AffineMap.isAffineMap {V2 P2 : Type*} [AddCommGroup V2] [Module R V2] [AffineSpace V2 P2]
(f : P →ᵃ[R] P2) : IsAffineMap R f where
map_sConvexComb s := by
rw [sConvexComb_eq_affineCombination, map_affineCombination s.weights.support _root_.id
s.weights s.total, ←iConvexComb_eq_affineCombination, Function.comp_id, iConvexComb]Perhaps here the correct thing to do would be to just use |
||||||
| ∑ i ∈ s, w i = 1 → | ||||||
| f ((affineCombination k s p) w) = (affineCombination k s (f ∘ p)) w) : | ||||||
| IsAffineMap k f where | ||||||
|
Contributor
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.
Suggested change
|
||||||
| map_sConvexComb s := by | ||||||
| rw [sConvexComb_eq_affineCombination, H s.weights.support _root_.id s.weights s.total, | ||||||
| ←iConvexComb_eq_affineCombination, Function.comp_id, iConvexComb] | ||||||
|
|
||||||
| lemma isAffineMap {V2 P2 : Type*} [AddCommGroup V2] [Module R V2] [AffineSpace V2 P2] | ||||||
| (f : P →ᵃ[R] P2) : IsAffineMap R f := by | ||||||
| apply of_apply_affineCombination | ||||||
| grind [map_affineCombination] | ||||||
|
|
||||||
| end AffineMap | ||||||
|
|
||||||
| end | ||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -323,9 +323,7 @@ abbrev ConvexSpace.mk {M : Type*} (sConvexComb : StdSimplex R M → M) | |||||||||||||
| ⟨sConvexComb, single, assoc⟩ | ||||||||||||||
|
|
||||||||||||||
| variable (R) in | ||||||||||||||
| /-- A map between convex spaces is affine if it preserves convex combinations. | ||||||||||||||
|
|
||||||||||||||
| TODO: Show that this generalises affine maps between affine spaces, see `AffineMap`. -/ | ||||||||||||||
| /-- A map between convex spaces is affine if it preserves convex combinations. -/ | ||||||||||||||
|
Contributor
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.
Suggested change
|
||||||||||||||
| @[fun_prop] | ||||||||||||||
| structure IsAffineMap (f : M → N) : Prop where | ||||||||||||||
| map_sConvexComb (s : StdSimplex R M) : f s.sConvexComb = (s.map f).sConvexComb | ||||||||||||||
|
|
||||||||||||||
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 the naming convention when the applied function is a free variable (or the coercion to function of a free variable)
See leanprover-community/leanprover-community.github.io#886