Skip to content

Commit 812897a

Browse files
committed
feat(Manifold/IntegralCurve/Transform): pointwise notation and translation lemmas for subtraction (leanprover-community#19008)
We restate the translation lemmas for integral curves using the `Pointwise` API and add translation lemmas for subtraction for convenience. This is just split out from leanprover-community#9013. The `Pointwise` API allows us to use lemmas like `Metric.vadd_ball` and more convenient rewriting of the `dt` term (rather than rewriting it inside the set builder notation).
1 parent 42f07b9 commit 812897a

1 file changed

Lines changed: 20 additions & 7 deletions

File tree

Mathlib/Geometry/Manifold/IntegralCurve/Transform.lean

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ curve.
2020
integral curve, vector field
2121
-/
2222

23-
open Function Set
23+
open Function Set Pointwise
2424

2525
variable
2626
{E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
@@ -33,30 +33,35 @@ variable
3333
section Translation
3434

3535
lemma IsIntegralCurveOn.comp_add (hγ : IsIntegralCurveOn γ v s) (dt : ℝ) :
36-
IsIntegralCurveOn (γ ∘ (· + dt)) v { t | t + dt ∈ s } := by
36+
IsIntegralCurveOn (γ ∘ (· + dt)) v (-dt +ᵥ s) := by
3737
intros t ht
3838
rw [comp_apply, ← ContinuousLinearMap.comp_id (ContinuousLinearMap.smulRight 1 (v (γ (t + dt))))]
39+
rw [mem_vadd_set_iff_neg_vadd_mem, neg_neg, vadd_eq_add, add_comm,
40+
← mem_setOf (p := fun t ↦ t + dt ∈ s)] at ht
3941
apply HasMFDerivAt.comp t (hγ (t + dt) ht)
4042
refine ⟨(continuous_add_right _).continuousAt, ?_⟩
4143
simp only [mfld_simps, hasFDerivWithinAt_univ]
4244
exact HasFDerivAt.add_const (hasFDerivAt_id _) _
4345

4446
lemma isIntegralCurveOn_comp_add {dt : ℝ} :
45-
IsIntegralCurveOn γ v s ↔ IsIntegralCurveOn (γ ∘ (· + dt)) v { t | t + dt ∈ s } := by
47+
IsIntegralCurveOn γ v s ↔ IsIntegralCurveOn (γ ∘ (· + dt)) v (-dt +ᵥ s) := by
4648
refine ⟨fun hγ ↦ hγ.comp_add _, fun hγ ↦ ?_⟩
4749
convert hγ.comp_add (-dt)
4850
· ext t
4951
simp only [Function.comp_apply, neg_add_cancel_right]
50-
· simp only [mem_setOf_eq, neg_add_cancel_right, setOf_mem_eq]
52+
· simp only [neg_neg, vadd_neg_vadd]
53+
54+
lemma isIntegralCurveOn_comp_sub {dt : ℝ} :
55+
IsIntegralCurveOn γ v s ↔ IsIntegralCurveOn (γ ∘ (· - dt)) v (dt +ᵥ s) := by
56+
simpa using isIntegralCurveOn_comp_add (dt := -dt)
5157

5258
lemma IsIntegralCurveAt.comp_add (hγ : IsIntegralCurveAt γ v t₀) (dt : ℝ) :
5359
IsIntegralCurveAt (γ ∘ (· + dt)) v (t₀ - dt) := by
5460
rw [isIntegralCurveAt_iff'] at *
5561
obtain ⟨ε, hε, h⟩ := hγ
5662
refine ⟨ε, hε, ?_⟩
5763
convert h.comp_add dt
58-
ext t
59-
rw [mem_setOf_eq, Metric.mem_ball, Metric.mem_ball, dist_sub_eq_dist_add_right]
64+
rw [Metric.vadd_ball, vadd_eq_add, neg_add_eq_sub]
6065

6166
lemma isIntegralCurveAt_comp_add {dt : ℝ} :
6267
IsIntegralCurveAt γ v t₀ ↔ IsIntegralCurveAt (γ ∘ (· + dt)) v (t₀ - dt) := by
@@ -66,10 +71,14 @@ lemma isIntegralCurveAt_comp_add {dt : ℝ} :
6671
simp only [Function.comp_apply, neg_add_cancel_right]
6772
· simp only [sub_neg_eq_add, sub_add_cancel]
6873

74+
lemma isIntegralCurveAt_comp_sub {dt : ℝ} :
75+
IsIntegralCurveAt γ v t₀ ↔ IsIntegralCurveAt (γ ∘ (· - dt)) v (t₀ + dt) := by
76+
simpa using isIntegralCurveAt_comp_add (dt := -dt)
77+
6978
lemma IsIntegralCurve.comp_add (hγ : IsIntegralCurve γ v) (dt : ℝ) :
7079
IsIntegralCurve (γ ∘ (· + dt)) v := by
7180
rw [isIntegralCurve_iff_isIntegralCurveOn] at *
72-
exact hγ.comp_add _
81+
simpa using hγ.comp_add dt
7382

7483
lemma isIntegralCurve_comp_add {dt : ℝ} :
7584
IsIntegralCurve γ v ↔ IsIntegralCurve (γ ∘ (· + dt)) v := by
@@ -78,6 +87,10 @@ lemma isIntegralCurve_comp_add {dt : ℝ} :
7887
ext t
7988
simp only [Function.comp_apply, neg_add_cancel_right]
8089

90+
lemma isIntegralCurve_comp_sub {dt : ℝ} :
91+
IsIntegralCurve γ v ↔ IsIntegralCurve (γ ∘ (· - dt)) v := by
92+
simpa using isIntegralCurve_comp_add (dt := -dt)
93+
8194
end Translation
8295

8396
/-! ### Scaling lemmas -/

0 commit comments

Comments
 (0)