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 35 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 94 additions & 10 deletions src/analysis/calculus/times_cont_diff.lean
Original file line number Diff line number Diff line change
Expand Up @@ -1238,6 +1238,10 @@ lemma times_cont_diff.times_cont_diff_at {n : with_top ℕ} (h : times_cont_diff
times_cont_diff_at 𝕜 n f x :=
times_cont_diff_iff_times_cont_diff_at.1 h x

lemma times_cont_diff.times_cont_diff_within_at {n : with_top ℕ} (h : times_cont_diff 𝕜 n f) :
times_cont_diff_within_at 𝕜 n f s x :=
h.times_cont_diff_at.times_cont_diff_within_at

lemma times_cont_diff_top :
times_cont_diff 𝕜 ∞ f ↔ ∀ (n : ℕ), times_cont_diff 𝕜 n f :=
by simp [times_cont_diff_on_univ.symm, times_cont_diff_on_top]
Expand Down Expand Up @@ -1484,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 @@ -1497,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 @@ -1876,7 +1908,7 @@ times_cont_diff_on_univ.1 $ times_cont_diff_on.comp (times_cont_diff_on_univ.2 h

/-- The composition of `C^n` functions at points in domains is `C^n`. -/
lemma times_cont_diff_within_at.comp
{n : with_top ℕ} {s : set E} {t : set F} {g : F → G} {f : E → F} {x : E}
{n : with_top ℕ} {s : set E} {t : set F} {g : F → G} {f : E → F} (x : E)
(hg : times_cont_diff_within_at 𝕜 n g t (f x))
(hf : times_cont_diff_within_at 𝕜 n f s x) (st : s ⊆ f ⁻¹' t) :
times_cont_diff_within_at 𝕜 n (g ∘ f) s x :=
Expand Down Expand Up @@ -1906,10 +1938,10 @@ end

/-- The composition of `C^n` functions at points in domains is `C^n`. -/
lemma times_cont_diff_within_at.comp' {n : with_top ℕ} {s : set E} {t : set F} {g : F → G}
{f : E → F} {x : E}
{f : E → F} (x : E)
(hg : times_cont_diff_within_at 𝕜 n g t (f x)) (hf : times_cont_diff_within_at 𝕜 n f s x) :
times_cont_diff_within_at 𝕜 n (g ∘ f) (s ∩ f⁻¹' t) x :=
hg.comp (hf.mono (inter_subset_left _ _)) (inter_subset_right _ _)
hg.comp x (hf.mono (inter_subset_left _ _)) (inter_subset_right _ _)

/-- The bundled derivative of a `C^{n+1}` function is `C^n`. -/
lemma times_cont_diff_on_fderiv_within_apply {m n : with_top ℕ} {s : set E}
Expand Down Expand Up @@ -1996,18 +2028,70 @@ lemma times_cont_diff.sub {n : with_top ℕ} {f g : E → F}
times_cont_diff 𝕜 n (λx, f x - g x) :=
hf.add hg.neg

/-- 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']
{F' : Type*} [normed_group F'] [normed_space 𝕜 F']
{s : set E} {t : set E'} {n : with_top ℕ} {f : E → F} {g : E' → F'}
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) :=
begin
apply times_cont_diff_within_at.prod_map',
exacts [hf, hg]
end
sgouezel marked this conversation as resolved.
Show resolved Hide resolved

/-- 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 {s : set E} {t : set E'} {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
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),
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
rcases p,
apply times_cont_diff_at.prod_map,
exacts [hf, hg]
end

/-- The product map of two `C^n` functions is `C^n`. -/
lemma times_cont_diff.prod_map
{s : set E} {t : set E'} {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
2 changes: 1 addition & 1 deletion src/data/equiv/local_equiv.lean
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ 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

namespace tactic.interactive

Expand Down
224 changes: 224 additions & 0 deletions src/geometry/Lie_group/lie_group.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,224 @@
/-
Nicknamen marked this conversation as resolved.
Show resolved Hide resolved
Copyright © 2020 Nicolò Cavalleri. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Author: Nicolò Cavalleri.
-/

import geometry.manifold.constructions

noncomputable theory

/-!
# Lie groups

We define Lie groups.

## Main definitions and statements

* `Lie_add_group I G` : a Lie additive group where `G` is a manifold on the model with corners `I`.
* `Lie_group I G` : a Lie multiplicative group where `G` is a manifold on the model with
corners `I`.

## Implementation notes
A priori, a Lie group here is a manifold with corner.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this buy you? You won't get any example with boundary, this would violate homogeneity, right? Can't you simplify stuff by restricting to models without boundary?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is exactly what I did in when I first wrote Lie groups but Sébastien advised against it so that is why I changed it. I can tell you his reasons but he probably can explain to you better himself!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Models without boundary are a particular case of models with boundary, so I don't really see what you would like to do. One thing you can try is to require that the model with corners is the identity model with corners on a vector space, but this is not stable under product, so the product of two Lie groups would not be a Lie group if you required this.

One thing you can do is to require the additional assumption [boundaryless I] which is the way we have to say in a canonical way that there is no boundary. And indeed if it turns out to be useful at some point, we will definitely add it, either to the statements that need it or to the definition of Lie group. But I don't think this has shown up yet.

You could maybe add a comment about this in some docstring?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is you in the first paragraph referred to me or to Patrick?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's Patrick, sorry for being unclear. Or a generic "you".

-/

section Lie_group

universes u v

/-- A Lie (additive) group is a group and a smooth manifold at the same time in which
the addition and negation operations are smooth. -/
class Lie_add_group {𝕜 : Type*} [nondiscrete_normed_field 𝕜]
{E : Type*} [normed_group E] [normed_space 𝕜 E] (I : model_with_corners 𝕜 E E)
(G : Type*) [add_group G] [topological_space G] [topological_add_group G]
[charted_space E G] [smooth_manifold_with_corners I G] : Prop :=
(smooth_add : smooth (I.prod I) I (λ p : G×G, p.1 + p.2))
(smooth_neg : smooth I I (λ a:G, -a))

/-- A Lie group is a group and a smooth manifold at the same time in which
the multiplication and inverse operations are smooth. -/
@[to_additive Lie_add_group]
class Lie_group {𝕜 : Type*} [nondiscrete_normed_field 𝕜]
{E : Type*} [normed_group E]
[normed_space 𝕜 E] (I : model_with_corners 𝕜 E E)
(G : Type*) [group G] [topological_space G] [topological_group G]
[charted_space E G] [smooth_manifold_with_corners I G] : Prop :=
(smooth_mul : smooth (I.prod I) I (λ p : G×G, p.1 * p.2))
(smooth_inv : smooth I I (λ a:G, a⁻¹))

section

variables {𝕜 : Type*} [nondiscrete_normed_field 𝕜]
{E : Type*} [normed_group E] [normed_space 𝕜 E] {I : model_with_corners 𝕜 E E}
{F : Type*} [normed_group F] [normed_space 𝕜 F] {J : model_with_corners 𝕜 F F}
{G : Type*} [topological_space G] [charted_space E G] [smooth_manifold_with_corners I G] [group G]
[topological_group G] [Lie_group I G]
{E' : Type*} [normed_group E'] [normed_space 𝕜 E']
{H' : Type*} [topological_space H'] {I' : model_with_corners 𝕜 E' H'}
{M : Type*} [topological_space M] [charted_space H' M] [smooth_manifold_with_corners I' M]
{E'' : Type*} [normed_group E''] [normed_space 𝕜 E'']
{H'' : Type*} [topological_space H''] {I'' : model_with_corners 𝕜 E'' H''}
{M' : Type*} [topological_space M'] [charted_space H'' M'] [smooth_manifold_with_corners I'' M']

@[to_additive]
lemma smooth_mul : smooth (I.prod I) I (λ p : G×G, p.1 * p.2) :=
Lie_group.smooth_mul

@[to_additive]
lemma smooth.mul {f : M → G} {g : M → G} (hf : smooth I' I f) (hg : smooth I' I g) :
smooth I' I (f * g) :=
smooth_mul.comp (hf.prod_mk hg)

@[to_additive]
lemma smooth_mul_left (a : G) : smooth I I (λ b : G, a * b) :=
smooth_mul.comp (smooth_const.prod_mk smooth_id)

/-- `L g` denotes left multiplication by `g` -/
def L : G → G → G := λ g : G, λ x : G, g * x
Nicknamen marked this conversation as resolved.
Show resolved Hide resolved

@[to_additive]
lemma smooth_mul_right (a : G) : smooth I I (λ b : G, b * a) :=
smooth_mul.comp (smooth_id.prod_mk smooth_const)

/-- `R g` denotes right multiplication by `g` -/
def R : G → G → G := λ g : G, λ x : G, x * g
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want this to be valid only under the hypothesis of G being a Lie group, I do not care about unused arguments. How can I avoid Lint complaining? Also, should I protect it with a namespace?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you want this to be valid only under the hypothesis of G being a Lie group? And yes, it should be in a namespace.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Nicknamen I think that definition is also useful for any (non-Lie) group acting on itself. So please put it in a general spot. (And only assume has_mul.)
Once you've done that, maybe it should no longer be in a namespace (I wouldn't know which one) but give it a slightly longer name (like right_mul?)
Also, if you tag it with @[to_additive] then it also becomes available in the additive hierarchy.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To disable the linter, write @[nolint unused_arguments] def .... And yes, this should definitely be in a Lie_group namespace.

Copy link
Collaborator Author

@Nicknamen Nicknamen Jul 24, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not want to use it for general groups because indeed it is not common notations for general groups (as far as I saw), and I want to use exactly this notation for Lie groups because this is the most used notation in maths and it makes things way more readable. I do agree for general groups it'd be cool to have right_mul but my goal here is to make statements of theorems about left-invariant vector fields and similar stuff that is specific of Lie groups readable as much as they are readable with this notation in common maths!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can have left_mul and right_mul as general concepts for general groups, and a localized notation that let's you write L and R in a Lie group context.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah sure! I prefer doing it only for Lie groups now because I do not really know the algebra folder and I do not know where to put such definitions but if someone really wants the general notion for any group with this PR please feel free to push a commit


@[to_additive]
lemma smooth_on.mul {f : M → G} {g : M → G} {s : set M}
(hf : smooth_on I' I f s) (hg : smooth_on I' I g s) :
smooth_on I' I (f * g) s :=
(smooth_mul.comp_smooth_on (hf.prod_mk hg) : _)

lemma smooth_pow : ∀ n : ℕ, smooth I I (λ a : G, a ^ n)
| 0 := by { simp only [pow_zero], exact smooth_const }
| (k+1) := show smooth I I (λ (a : G), a * a ^ k), from smooth_id.mul (smooth_pow _)

@[to_additive]
lemma smooth_inv : smooth I I (λ x : G, x⁻¹) :=
Lie_group.smooth_inv

@[to_additive]
lemma smooth.inv {f : M → G}
(hf : smooth I' I f) : smooth I' I (λx, (f x)⁻¹) :=
smooth_inv.comp hf

@[to_additive]
lemma smooth_on.inv {f : M → G} {s : set M}
(hf : smooth_on I' I f s) : smooth_on I' I (λx, (f x)⁻¹) s :=
smooth_inv.comp_smooth_on hf

end

section

/- Instance of product group -/
/-
PRODUCT GOT BROKEN AFTER `model_prod` WAS INTRODUCED.
instance prod_Lie_group {𝕜 : Type*} [nondiscrete_normed_field 𝕜] -/
/-@[to_additive] how does it work here? The purpose is not replacing prod with sum-/
/-
{E : Type*} [normed_group E] [normed_space 𝕜 E] {I : model_with_corners 𝕜 E E}
{G : Type*} [topological_space G] [charted_space E G] [smooth_manifold_with_corners I G] [group G]
[h : Lie_group I G]
{E' : Type*} [normed_group E'] [normed_space 𝕜 E'] [finite_dimensional 𝕜 E']
{I' : model_with_corners 𝕜 E' E'}
{G' : Type*} [topological_space G'] [charted_space E' G'] [smooth_manifold_with_corners I' G']
[group G'] [h' : Lie_group I' G'] : Lie_group (I.prod I') (G×G') :=
{ smooth_mul := ((smooth_fst.comp smooth_fst).mul (smooth_fst.comp smooth_snd)).prod_mk
((smooth_snd.comp smooth_fst).mul (smooth_snd.comp smooth_snd)),
smooth_inv := smooth_fst.inv.prod_mk smooth_snd.inv, } -/

end

section

variables {𝕜 : Type*} [nondiscrete_normed_field 𝕜]
{E : Type*} [normed_group E] [normed_space 𝕜 E]
{E' : Type*} [normed_group E'] [normed_space 𝕜 E']

/-- Morphism of additive Lie groups. -/
structure Lie_add_group_morphism (I : model_with_corners 𝕜 E E) (I' : model_with_corners 𝕜 E' E')
(G : Type*) [topological_space G] [charted_space E G] [smooth_manifold_with_corners I G]
[add_group G] [topological_add_group G] [Lie_add_group I G]
(G' : Type*) [topological_space G'] [charted_space E' G'] [smooth_manifold_with_corners I' G']
[add_group G'] [topological_add_group G'] [Lie_add_group I' G'] extends add_monoid_hom G G' :=
(smooth_to_fun : smooth I I' to_fun)

/-- Morphism of Lie groups. -/
@[to_additive Lie_add_group_morphism]
structure Lie_group_morphism (I : model_with_corners 𝕜 E E) (I' : model_with_corners 𝕜 E' E')
(G : Type*) [topological_space G] [charted_space E G] [smooth_manifold_with_corners I G] [group G]
[topological_group G] [Lie_group I G]
(G' : Type*) [topological_space G'] [charted_space E' G'] [smooth_manifold_with_corners I' G']
[group G'] [topological_group G'] [Lie_group I' G'] extends monoid_hom G G' :=
(smooth_to_fun : smooth I I' to_fun)

variables {I : model_with_corners 𝕜 E E} {I' : model_with_corners 𝕜 E' E'}
{G : Type*} [topological_space G] [charted_space E G] [smooth_manifold_with_corners I G]
[group G] [topological_group G] [Lie_group I G]
{G' : Type*} [topological_space G'] [charted_space E' G'] [smooth_manifold_with_corners I' G']
[group G'] [topological_group G'] [Lie_group I' G']

@[to_additive]
instance : has_one (Lie_group_morphism I I' G G') := ⟨⟨1, smooth_const⟩⟩

@[to_additive]
instance : inhabited (Lie_group_morphism I I' G G') := ⟨1⟩

@[to_additive]
instance : has_coe_to_fun (Lie_group_morphism I I' G G') := ⟨_, λ a, a.to_fun⟩

end

end Lie_group

section Lie_group_core

/-- Sometimes one might want to define a Lie additive group `G` without having proved previously
that `G` is a topological additive group. In such case it is possible to use `Lie_add_group_core`
that does not require such instance, and then get a Lie group by invoking `to_Lie_ad_group`. -/
Nicknamen marked this conversation as resolved.
Show resolved Hide resolved
@[nolint has_inhabited_instance]
Nicknamen marked this conversation as resolved.
Show resolved Hide resolved
structure Lie_add_group_core {𝕜 : Type*} [nondiscrete_normed_field 𝕜]
{E : Type*} [normed_group E]
[normed_space 𝕜 E] (I : model_with_corners 𝕜 E E)
(G : Type*) [add_group G] [topological_space G]
[charted_space E G] [smooth_manifold_with_corners I G] : Prop :=
(smooth_add : smooth (I.prod I) I (λ p : G×G, p.1 + p.2))
(smooth_neg : smooth I I (λ a:G, -a))

/-- Sometimes one might want to define a Lie group `G` without having proved previously that `G` is
a topological group. In such case it is possible to use `Lie_group_core` that does not require such
instance, and then get a Lie group by invoking `to_Lie_group` defined below. -/
@[nolint has_inhabited_instance, to_additive Lie_add_group_core]
structure Lie_group_core {𝕜 : Type*} [nondiscrete_normed_field 𝕜]
{E : Type*} [normed_group E]
[normed_space 𝕜 E] (I : model_with_corners 𝕜 E E)
(G : Type*) [group G] [topological_space G]
[charted_space E G] [smooth_manifold_with_corners I G] : Prop :=
(smooth_mul : smooth (I.prod I) I (λ p : G×G, p.1 * p.2))
(smooth_inv : smooth I I (λ a:G, a⁻¹))

variables {𝕜 : Type*} [nondiscrete_normed_field 𝕜]
{E : Type*} [normed_group E] [normed_space 𝕜 E] {I : model_with_corners 𝕜 E E}
{F : Type*} [normed_group F] [normed_space 𝕜 F] {J : model_with_corners 𝕜 F F}
{G : Type*} [topological_space G] [charted_space E G] [smooth_manifold_with_corners I G] [group G]
[topological_group G] [Lie_group I G]

namespace Lie_group_core

variables (c : Lie_group_core I G)

@[to_additive]
protected lemma to_topological_group : topological_group G :=
{ continuous_mul := c.smooth_mul.continuous,
continuous_inv := c.smooth_inv.continuous, }

@[to_additive]
protected lemma to_Lie_group : @Lie_group 𝕜 _ E _ _ I G _ _ c.to_topological_group _ _ :=
{ smooth_mul := c.smooth_mul,
smooth_inv := c.smooth_inv, }

end Lie_group_core

end Lie_group_core
Loading