Skip to content
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

[Merged by Bors] - feat(geometry): first stab on Lie groups #3529

Closed
wants to merge 54 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
03df6e2
recreated the problem
Nicknamen Jul 4, 2020
80b9cab
Proved that continuous functions are an algebra
Nicknamen Jul 13, 2020
d8ad078
Merge branch 'master' into continuous_functions_algebra
Nicknamen Jul 13, 2020
56d2716
Solving a conflict appeared in sheaves
Nicknamen Jul 13, 2020
da64672
Corrected a mistake in the documentation
Nicknamen Jul 13, 2020
53b8e04
Solved a DANGEROUS INSTANCE problem
Nicknamen Jul 13, 2020
fee8ca8
Forgot to remove #lint
Nicknamen Jul 13, 2020
dc6197b
Making lint happy
Nicknamen Jul 13, 2020
b807d94
Trying again to make lint happy
Nicknamen Jul 13, 2020
4652e8a
Algebra structure over continuous bundled functions
Nicknamen Jul 15, 2020
20866d7
Trying to merge
Nicknamen Jul 15, 2020
99cee94
Having problems with the merging
Nicknamen Jul 15, 2020
ac6c3ba
Updated the code following smooth manifolds PR
Nicknamen Jul 16, 2020
c8f1304
Merge branch 'master' into Lie_groups
Nicknamen Jul 16, 2020
f31adad
Merge branch 'master' into continuous_functions_algebra
Nicknamen Jul 16, 2020
fd3efc7
Merge branch 'continuous_functions_algebra' into continuous_bundled_map
Nicknamen Jul 16, 2020
a9bdde6
Added some documentation
Nicknamen Jul 16, 2020
46af74b
Merge branch 'master' into Lie_groups
Nicknamen Jul 17, 2020
f5abebf
Added some documentation
Nicknamen Jul 17, 2020
3f5fa6d
Merge branch 'master' into continuous_functions_algebra
Nicknamen Jul 18, 2020
ee83faa
Forgot to save files before last commit.
Nicknamen Jul 18, 2020
37a21d4
Merge branch 'master' into continuous_functions_algebra
Nicknamen Jul 18, 2020
629ad00
Merge branch 'continuous_functions_algebra' into has_continuous_mul
Nicknamen Jul 18, 2020
ee812a2
Merge branch 'has_continuous_mul' into continuous_bundled_map
Nicknamen Jul 18, 2020
283dd6e
Added some further documentation
Nicknamen Jul 18, 2020
fcb4714
Merge branch 'continuous_bundled_map' into Lie_groups
Nicknamen Jul 18, 2020
8e358bc
Fixed dangerous instance
Nicknamen Jul 18, 2020
a8ef625
Began implementing the smooth name
Nicknamen Jul 19, 2020
2bfd38d
halfway through the work on smooth maps
Nicknamen Jul 20, 2020
81c590d
Begun generalizing constructions
Nicknamen Jul 22, 2020
4fd7e93
Merge branch 'master' into Lie_groups
Nicknamen Jul 22, 2020
d99d42e
Ready to PR with help-needed
Nicknamen Jul 23, 2020
2e49c6e
Merge branch 'master' into Lie_groups
Nicknamen Jul 23, 2020
9bbf9b3
Adjust a mistake in last merge
Nicknamen Jul 23, 2020
4ebee58
complete times_cont_mdiff_within_at.prod_map
sgouezel Jul 24, 2020
0cedba6
smoothness of projections
sgouezel Jul 24, 2020
10142d0
proof terms
sgouezel Jul 24, 2020
ddd0b02
Applied most of suggested changes
Nicknamen Jul 26, 2020
0a73ef2
Linter
Nicknamen Jul 26, 2020
485debf
minor changes
Nicknamen Jul 26, 2020
726ed6c
For Patrick: real numbers are a Lie group
Nicknamen Jul 26, 2020
1503909
Merge branch 'master' into Lie_groups
Nicknamen Jul 27, 2020
b17d3d5
Changed folder name
Nicknamen Jul 27, 2020
6a7aeba
fix build
sgouezel Jul 27, 2020
34fd3b9
Merge remote-tracking branch 'upstream/master' into Lie_groups
sgouezel Jul 27, 2020
92fe915
minor changes
Nicknamen Jul 27, 2020
652e523
streamline some proofs
sgouezel Jul 27, 2020
9c32b00
Update src/geometry/algebra/lie_group.lean
Nicknamen Jul 28, 2020
d6eb4ff
Update src/geometry/algebra/lie_group.lean
Nicknamen Jul 28, 2020
41d4149
Merge branch 'Lie_groups' of https://github.com/leanprover-community/…
Nicknamen Jul 28, 2020
3ceb3e9
Applied most of suggested changes
Nicknamen Jul 28, 2020
82f3a0d
Applied suggested changes
Nicknamen Jul 29, 2020
2a1abc6
linter
Nicknamen Jul 30, 2020
c81540a
Apply suggestions from code review
sgouezel Jul 30, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/algebra/group/defs.lean
Expand Up @@ -48,6 +48,20 @@ universe u
to the additive one.
-/

section has_mul

variables {G : Type u} [has_mul G]

/-- `left_mul g` denotes left multiplication by `g` -/
@[to_additive "`left_add g` denotes left addition by `g`"]
def left_mul : G → G → G := λ g : G, λ x : G, g * x

/-- `right_mul g` denotes right multiplication by `g` -/
@[to_additive "`right_add g` denotes right addition by `g`"]
def right_mul : G → G → G := λ g : G, λ x : G, x * g

end has_mul

/-- A semigroup is a type with an associative `(*)`. -/
@[protect_proj, ancestor has_mul] class semigroup (G : Type u) extends has_mul G :=
(mul_assoc : ∀ a b c : G, a * b * c = a * (b * c))
Expand Down
126 changes: 105 additions & 21 deletions src/analysis/calculus/times_cont_diff.lean
Expand Up @@ -1488,6 +1488,20 @@ lemma times_cont_diff_on_fst {s : set (E×F)} {n : with_top ℕ} :
times_cont_diff_on 𝕜 n (prod.fst : E × F → E) s :=
times_cont_diff.times_cont_diff_on times_cont_diff_fst

/--
The first projection at a point in a product is `C^∞`.
-/
lemma times_cont_diff_at_fst {p : E × F} {n : with_top ℕ} :
times_cont_diff_at 𝕜 n (prod.fst : E × F → E) p :=
times_cont_diff_fst.times_cont_diff_at

/--
The first projection within a domain at a point in a product is `C^∞`.
-/
lemma times_cont_diff_within_at_fst {s : set (E × F)} {p : E × F} {n : with_top ℕ} :
times_cont_diff_within_at 𝕜 n (prod.fst : E × F → E) s p :=
times_cont_diff_fst.times_cont_diff_within_at

/--
The second projection in a product is `C^∞`.
-/
Expand All @@ -1501,6 +1515,20 @@ lemma times_cont_diff_on_snd {s : set (E×F)} {n : with_top ℕ} :
times_cont_diff_on 𝕜 n (prod.snd : E × F → F) s :=
times_cont_diff.times_cont_diff_on times_cont_diff_snd

/--
The second projection at a point in a product is `C^∞`.
-/
lemma times_cont_diff_at_snd {p : E × F} {n : with_top ℕ} :
times_cont_diff_at 𝕜 n (prod.snd : E × F → F) p :=
times_cont_diff_snd.times_cont_diff_at

/--
The second projection within a domain at a point in a product is `C^∞`.
-/
lemma times_cont_diff_within_at_snd {s : set (E × F)} {p : E × F} {n : with_top ℕ} :
times_cont_diff_within_at 𝕜 n (prod.snd : E × F → F) s p :=
times_cont_diff_snd.times_cont_diff_within_at

/--
The identity is `C^∞`.
-/
Expand Down Expand Up @@ -1980,20 +2008,23 @@ begin
exact hf.add hg
end

lemma times_cont_diff_add {n : with_top ℕ} : times_cont_diff 𝕜 n (λp : F × F, p.1 + p.2) :=
begin
apply is_bounded_linear_map.times_cont_diff,
exact is_bounded_linear_map.add is_bounded_linear_map.fst is_bounded_linear_map.snd,
end

/-- The sum of two `C^n`functions is `C^n`. -/
lemma times_cont_diff.add {n : with_top ℕ} {f g : E → F}
(hf : times_cont_diff 𝕜 n f) (hg : times_cont_diff 𝕜 n g) : times_cont_diff 𝕜 n (λx, f x + g x) :=
times_cont_diff_add.comp (hf.prod hg)

/-- The sum of two `C^n` functions on a domain is `C^n`. -/
lemma times_cont_diff_on.add {n : with_top ℕ} {s : set E} {f g : E → F}
(hf : times_cont_diff_on 𝕜 n f s) (hg : times_cont_diff_on 𝕜 n g s) :
times_cont_diff_on 𝕜 n (λx, f x + g x) s :=
λ x hx, (hf x hx).add (hg x hx)

/-- The sum of two `C^n` functions is `C^n`. -/
lemma times_cont_diff.add {n : with_top ℕ} {f g : E → F}
(hf : times_cont_diff 𝕜 n f) (hg : times_cont_diff 𝕜 n g) : times_cont_diff 𝕜 n (λx, f x + g x) :=
begin
rw ← times_cont_diff_on_univ at *,
exact hf.add hg
end

/-! ### Negative -/

/-- The negative of a `C^n` function within a domain at a point is `C^n` within this domain at
Expand All @@ -2015,19 +2046,22 @@ begin
exact hf.neg
end

lemma times_cont_diff_neg {n : with_top ℕ} : times_cont_diff 𝕜 n (λp : F, -p) :=
begin
apply is_bounded_linear_map.times_cont_diff,
exact is_bounded_linear_map.neg is_bounded_linear_map.id
end

/-- The negative of a `C^n`function is `C^n`. -/
lemma times_cont_diff.neg {n : with_top ℕ} {f : E → F} (hf : times_cont_diff 𝕜 n f) :
times_cont_diff 𝕜 n (λx, -f x) :=
times_cont_diff_neg.comp hf

/-- The negative of a `C^n` function on a domain is `C^n`. -/
lemma times_cont_diff_on.neg {n : with_top ℕ} {s : set E} {f : E → F}
(hf : times_cont_diff_on 𝕜 n f s) : times_cont_diff_on 𝕜 n (λx, -f x) s :=
λ x hx, (hf x hx).neg

/-- The negative of a `C^n` function is `C^n`. -/
lemma times_cont_diff.neg {n : with_top ℕ} {f : E → F} (hf : times_cont_diff 𝕜 n f) :
times_cont_diff 𝕜 n (λx, -f x) :=
begin
rw ← times_cont_diff_on_univ at *,
exact hf.neg
end

/-! ### Subtraction -/

/-- The difference of two `C^n` functions within a set at a point is `C^n` within this set
Expand Down Expand Up @@ -2094,18 +2128,68 @@ end

/-! ### Cartesian product of two functions-/

/-- The product map of two `C^n` functions is `C^n`. -/
lemma times_cont_diff_on.map_prod {E' : Type*} [normed_group E'] [normed_space 𝕜 E']
section prod_map
variables {E' : Type*} [normed_group E'] [normed_space 𝕜 E']
{F' : Type*} [normed_group F'] [normed_space 𝕜 F']
{n : with_top ℕ}

/-- The product map of two `C^n` functions within a set at a point is `C^n`
within the product set at the product point. -/
lemma times_cont_diff_within_at.prod_map'
{s : set E} {t : set E'} {f : E → F} {g : E' → F'} {p : E × E'}
(hf : times_cont_diff_within_at 𝕜 n f s p.1) (hg : times_cont_diff_within_at 𝕜 n g t p.2) :
times_cont_diff_within_at 𝕜 n (prod.map f g) (set.prod s t) p :=
(hf.comp p times_cont_diff_within_at_fst (prod_subset_preimage_fst _ _)).prod
(hg.comp p times_cont_diff_within_at_snd (prod_subset_preimage_snd _ _))

lemma times_cont_diff_within_at.prod_map
{s : set E} {t : set E'} {f : E → F} {g : E' → F'} {x : E} {y : E'}
(hf : times_cont_diff_within_at 𝕜 n f s x) (hg : times_cont_diff_within_at 𝕜 n g t y) :
times_cont_diff_within_at 𝕜 n (prod.map f g) (set.prod s t) (x, y) :=
times_cont_diff_within_at.prod_map' hf hg

/-- The product map of two `C^n` functions on a set is `C^n` on the product set. -/
lemma times_cont_diff_on.prod_map {E' : Type*} [normed_group E'] [normed_space 𝕜 E']
{F' : Type*} [normed_group F'] [normed_space 𝕜 F']
{s : set E} {t : set E'} {n : with_top ℕ} {f : E → F} {g : E' → F'}
(hf : times_cont_diff_on 𝕜 n f s) (hg : times_cont_diff_on 𝕜 n g t) :
times_cont_diff_on 𝕜 n (prod.map f g) (set.prod s t) :=
(hf.comp times_cont_diff_on_fst (prod_subset_preimage_fst _ _)).prod
(hg.comp (times_cont_diff_on_snd) (prod_subset_preimage_snd _ _))

/-- The product map of two `C^n` functions within a set at a point is `C^n`
within the product set at the product point. -/
lemma times_cont_diff_at.prod_map {f : E → F} {g : E' → F'} {x : E} {y : E'}
(hf : times_cont_diff_at 𝕜 n f x) (hg : times_cont_diff_at 𝕜 n g y) :
times_cont_diff_at 𝕜 n (prod.map f g) (x, y) :=
begin
rw times_cont_diff_at at *,
convert hf.prod_map hg,
simp only [univ_prod_univ]
end

/-- The product map of two `C^n` functions within a set at a point is `C^n`
within the product set at the product point. -/
lemma times_cont_diff_at.prod_map' {f : E → F} {g : E' → F'} {p : E × E'}
(hf : times_cont_diff_at 𝕜 n f p.1) (hg : times_cont_diff_at 𝕜 n g p.2) :
times_cont_diff_at 𝕜 n (prod.map f g) p :=
begin
have hs : s.prod t ⊆ (prod.fst) ⁻¹' s := by { rintros x ⟨h_x_1, h_x_2⟩, exact h_x_1, },
have ht : s.prod t ⊆ (prod.snd) ⁻¹' t := by { rintros x ⟨h_x_1, h_x_2⟩, exact h_x_2, },
exact (hf.comp (times_cont_diff_on_fst) hs).prod (hg.comp (times_cont_diff_on_snd) ht),
rcases p,
exact times_cont_diff_at.prod_map hf hg
end

/-- The product map of two `C^n` functions is `C^n`. -/
lemma times_cont_diff.prod_map
{f : E → F} {g : E' → F'}
(hf : times_cont_diff 𝕜 n f) (hg : times_cont_diff 𝕜 n g) :
times_cont_diff 𝕜 n (prod.map f g) :=
begin
rw times_cont_diff_iff_times_cont_diff_at at *,
exact λ ⟨x, y⟩, (hf x).prod_map (hg y)
end

end prod_map

section real
/-!
### Results over `ℝ`
Expand Down
3 changes: 2 additions & 1 deletion src/data/equiv/local_equiv.lean
Expand Up @@ -77,7 +77,8 @@ set.univ_inter set.preimage_univ set.prod_mk_mem_set_prod_eq and_true set.mem_un
set.mem_image_of_mem true_and set.mem_inter_eq set.mem_preimage function.comp_app
set.inter_subset_left set.mem_prod set.range_id and_self set.mem_range_self
eq_self_iff_true forall_const forall_true_iff set.inter_univ set.preimage_id function.comp.right_id
not_false_iff and_imp set.prod_inter_prod set.univ_prod_univ true_or or_true
not_false_iff and_imp set.prod_inter_prod set.univ_prod_univ true_or or_true prod.map_mk
set.preimage_inter

namespace tactic.interactive

Expand Down