chars int64 40 24k | content_type stringclasses 9
values | id stringlengths 13 64 | source stringclasses 5
values | subset stringclasses 31
values | text stringlengths 40 24k |
|---|---|---|---|---|---|
134 | leanexplore_declaration | leanexplore:376886 | leanexplore_sqlite | leanexplore_declarations | lemma deriv_neg [NormedAddCommGroup M] [NormedSpace ℝ M] (f : Time → M) :
∂ₜ (-f) t = -∂ₜ f t := by
rw [deriv, fderiv_neg]
rfl |
128 | leanexplore_declaration | leanexplore:376887 | leanexplore_sqlite | leanexplore_declarations | @[simp]
lemma deriv_const [NormedAddCommGroup M] [NormedSpace ℝ M] (m : M) :
∂ₜ (fun _ => m) t = 0 := by
rw [deriv]
simp |
389 | leanexplore_declaration | leanexplore:376888 | leanexplore_sqlite | leanexplore_declarations | @[fun_prop]
lemma deriv_differentiable_of_contDiff {M : Type}
[NormedAddCommGroup M] [NormedSpace ℝ M] (f : Time → M) (hf : ContDiff ℝ ∞ f) :
Differentiable ℝ (∂ₜ f) := by
unfold deriv
change Differentiable ℝ ((fun x => x 1) ∘ (fun t => fderiv ℝ f t))
apply Differentiable.comp
· fun_prop
· rw [contDif... |
297 | leanexplore_declaration | leanexplore:376889 | leanexplore_sqlite | leanexplore_declarations | @[fun_prop]
lemma deriv_contDiff_of_contDiff {M : Type}
[NormedAddCommGroup M] [NormedSpace ℝ M] (f : Time → M) (hf : ContDiff ℝ ∞ f) :
ContDiff ℝ ∞ (∂ₜ f) := by
unfold deriv
change ContDiff ℝ ∞ ((fun x => x 1) ∘ (fun t => fderiv ℝ f t))
apply ContDiff.comp
· fun_prop
· fun_prop |
249 | leanexplore_declaration | leanexplore:376890 | leanexplore_sqlite | leanexplore_declarations | @[fun_prop]
lemma deriv_contDiff_of_space {n} {M : Type} [NormedAddCommGroup M] [NormedSpace ℝ M]
(f : Time → Space d → M) (hf : ContDiff ℝ (n + 1) ↿f) :
ContDiff ℝ n fun (x : Space d) => (∂ₜ fun t => f t x) t := by
unfold deriv
fun_prop |
189 | leanexplore_declaration | leanexplore:376891 | leanexplore_sqlite | leanexplore_declarations | lemma differentiable_euclid {f : Time → EuclideanSpace ℝ (Fin n)}
(hf : ∀ i, Differentiable ℝ (fun t => f t i)) :
Differentiable ℝ f := by
rw [differentiable_euclidean]
fun_prop |
427 | leanexplore_declaration | leanexplore:376892 | leanexplore_sqlite | leanexplore_declarations | lemma deriv_euclid { μ} {f : Time→ EuclideanSpace ℝ (Fin n)}
(hf : Differentiable ℝ f) (t : Time) :
deriv (fun t => f t μ) t = deriv (fun t => f t) t μ := by
rw [deriv_eq]
change fderiv ℝ (EuclideanSpace.proj μ ∘ fun x => f x) t 1 = _
rw [fderiv_comp]
· simp only [ContinuousLinearMap.fderiv, ContinuousL... |
328 | leanexplore_declaration | leanexplore:376893 | leanexplore_sqlite | leanexplore_declarations | lemma fderiv_euclid { μ} {f : Time→ EuclideanSpace ℝ (Fin n)}
(hf : Differentiable ℝ f) (t dt : Time) :
fderiv ℝ (fun t => f t μ) t dt = fderiv ℝ (fun t => f t) t dt μ := by
change fderiv ℝ (EuclideanSpace.proj μ ∘ fun x => f x) t dt = _
rw [fderiv_comp]
· simp [-EuclideanSpace.coe_proj]
· fun_prop
· ... |
355 | leanexplore_declaration | leanexplore:376894 | leanexplore_sqlite | leanexplore_declarations | lemma deriv_lorentzVector {d : ℕ} {f : Time → Lorentz.Vector d}
(hf : Differentiable ℝ f) (t : Time) (i : Fin 1 ⊕ Fin d) :
deriv (fun t => f t i) t = deriv (fun t => f t) t i := by
rw [deriv_eq]
change fderiv ℝ (Lorentz.Vector.coordCLM i ∘ fun x => f x) t 1 = _
rw [fderiv_comp]
· simp
rw [← deriv_eq... |
254 | leanexplore_declaration | leanexplore:376895 | leanexplore_sqlite | leanexplore_declarations | /-- The type `TimeMan` represents the time manifold.
Mathematically `TimeMan` is a manifold diffeomorphic to `ℝ` with an orientation but no additional
structure. -/
structure TimeMan where
/-- The choice of a map from `TimeMan` to `ℝ`. -/
val : ℝ |
220 | leanexplore_declaration | leanexplore:376896 | leanexplore_sqlite | leanexplore_declarations | /-- The instance of a topological space on `TimeMan` induced by the map `TimeMan.val`. s-/
instance : TopologicalSpace TimeMan := TopologicalSpace.induced TimeMan.val
PseudoMetricSpace.toUniformSpace.toTopologicalSpace |
89 | leanexplore_declaration | leanexplore:376897 | leanexplore_sqlite | leanexplore_declarations | lemma val_surjective : Function.Surjective TimeMan.val := by
intro t
use { val := t } |
102 | leanexplore_declaration | leanexplore:376898 | leanexplore_sqlite | leanexplore_declarations | @[simp]
lemma val_range : Set.range val = Set.univ := by
refine Set.range_eq_univ.mpr val_surjective |
78 | leanexplore_declaration | leanexplore:376899 | leanexplore_sqlite | leanexplore_declarations | lemma val_inducing : Topology.IsInducing TimeMan.val where
eq_induced := rfl |
107 | leanexplore_declaration | leanexplore:376900 | leanexplore_sqlite | leanexplore_declarations | lemma val_injective : Function.Injective TimeMan.val := by
intro t1 t2 h
cases t1
cases t2
simp_all |
149 | leanexplore_declaration | leanexplore:376901 | leanexplore_sqlite | leanexplore_declarations | lemma val_isOpenEmbedding : Topology.IsOpenEmbedding TimeMan.val where
eq_induced := rfl
isOpen_range := by
simp
injective := val_injective |
151 | leanexplore_declaration | leanexplore:376902 | leanexplore_sqlite | leanexplore_declarations | lemma isOpen_iff {s : Set TimeMan} :
IsOpen s ↔ IsOpen (TimeMan.val '' s) :=
Topology.IsOpenEmbedding.isOpen_iff_image_isOpen val_isOpenEmbedding |
509 | leanexplore_declaration | leanexplore:376903 | leanexplore_sqlite | leanexplore_declarations | /-- The choice of map `Time.val` from `TimeMan` to `ℝ` as a homeomorphism. -/
def valHomeomorphism : TimeMan ≃ₜ ℝ where
toFun := TimeMan.val
invFun := fun t => { val := t }
left_inv := by
intro t
cases t
rfl
right_inv := by
intro t
rfl
continuous_toFun := by fun_prop
continuous_invFun :=... |
283 | leanexplore_declaration | leanexplore:376904 | leanexplore_sqlite | leanexplore_declarations | /-- The structure of a charted space on `TimeMan` -/
instance : ChartedSpace ℝ TimeMan where
atlas := { valHomeomorphism.toOpenPartialHomeomorph }
chartAt _ := valHomeomorphism.toOpenPartialHomeomorph
mem_chart_source := by
simp
chart_mem_atlas := by
intro x
simp |
320 | leanexplore_declaration | leanexplore:376905 | leanexplore_sqlite | leanexplore_declarations | /-- The structure of a manifold on `TimeMan` induced by the choice of map `Time.val`. -/
instance : IsManifold 𝓘(ℝ, ℝ) ω TimeMan where
compatible := by
intro e1 e2 h1 h2
simp [atlas, ChartedSpace.atlas] at h1 h2
subst h1 h2
exact symm_trans_mem_contDiffGroupoid valHomeomorphism.toOpenPartialHomeomorp... |
210 | leanexplore_declaration | leanexplore:376906 | leanexplore_sqlite | leanexplore_declarations | lemma val_contDiff : ContMDiff 𝓘(ℝ, ℝ) 𝓘(ℝ, ℝ) ω TimeMan.val := by
refine contMDiffOn_univ.mp ?_
convert contMDiffOn_chart (x := (⟨0⟩ : TimeMan))
exact instIsManifoldRealModelWithCornersSelfTopWithTopENat |
407 | leanexplore_declaration | leanexplore:376907 | leanexplore_sqlite | leanexplore_declarations | /-- The choice of map `Time.val` from `TimeMan` to `ℝ` as a diffeomorphism. -/
noncomputable def valDiffeomorphism : TimeMan ≃ₘ^ω⟮𝓘(ℝ, ℝ), 𝓘(ℝ, ℝ)⟯ ℝ where
toEquiv := valHomeomorphism.toEquiv
contMDiff_toFun := val_contDiff
contMDiff_invFun := by
refine contMDiffOn_univ.mp ?_
convert contMDiffOn_chart_s... |
103 | leanexplore_declaration | leanexplore:376908 | leanexplore_sqlite | leanexplore_declarations | /-- The instance of an orientation on TimeMan. -/
instance : LE TimeMan where
le x y := x.val ≤ y.val |
215 | leanexplore_declaration | leanexplore:376909 | leanexplore_sqlite | leanexplore_declarations | /-- The type `TimeTransMan` represents the time manifold with an orientation and
a transitive action of the reals. -/
structure TimeTransMan where
/-- The choice of a map from `TimeTransMan` to `ℝ`. -/
val : ℝ |
115 | leanexplore_declaration | leanexplore:376910 | leanexplore_sqlite | leanexplore_declarations | @[ext]
lemma ext_of {t1 t2 : TimeTransMan} (h : t1.val = t2.val) :
t1 = t2 := by
cases t1; cases t2; simp_all |
84 | leanexplore_declaration | leanexplore:376911 | leanexplore_sqlite | leanexplore_declarations | @[ext]
lemma ext_of {t1 t2 : TimeTransMan} (h : t1.val = t2.val) :
t1 = t2 := by |
239 | leanexplore_declaration | leanexplore:376912 | leanexplore_sqlite | leanexplore_declarations | /-- The instance of a topological space on `TimeTransMan` induced by the map `TimeTransMan.val`. -/
instance : TopologicalSpace TimeTransMan := TopologicalSpace.induced TimeTransMan.val
PseudoMetricSpace.toUniformSpace.toTopologicalSpace |
94 | leanexplore_declaration | leanexplore:376913 | leanexplore_sqlite | leanexplore_declarations | lemma val_surjective : Function.Surjective TimeTransMan.val := by
intro t
use { val := t } |
83 | leanexplore_declaration | leanexplore:376915 | leanexplore_sqlite | leanexplore_declarations | lemma val_inducing : Topology.IsInducing TimeTransMan.val where
eq_induced := rfl |
112 | leanexplore_declaration | leanexplore:376916 | leanexplore_sqlite | leanexplore_declarations | lemma val_injective : Function.Injective TimeTransMan.val := by
intro t1 t2 h
cases t1
cases t2
simp_all |
154 | leanexplore_declaration | leanexplore:376917 | leanexplore_sqlite | leanexplore_declarations | lemma val_isOpenEmbedding : Topology.IsOpenEmbedding TimeTransMan.val where
eq_induced := rfl
isOpen_range := by
simp
injective := val_injective |
161 | leanexplore_declaration | leanexplore:376918 | leanexplore_sqlite | leanexplore_declarations | lemma isOpen_iff {s : Set TimeTransMan} :
IsOpen s ↔ IsOpen (TimeTransMan.val '' s) :=
Topology.IsOpenEmbedding.isOpen_iff_image_isOpen val_isOpenEmbedding |
524 | leanexplore_declaration | leanexplore:376919 | leanexplore_sqlite | leanexplore_declarations | /-- The choice of map `Time.val` from `TimeTransMan` to `ℝ` as a homeomorphism. -/
def valHomeomorphism : TimeTransMan ≃ₜ ℝ where
toFun := TimeTransMan.val
invFun := fun t => { val := t }
left_inv := by
intro t
cases t
rfl
right_inv := by
intro t
rfl
continuous_toFun := by fun_prop
conti... |
293 | leanexplore_declaration | leanexplore:376920 | leanexplore_sqlite | leanexplore_declarations | /-- The structure of a charted space on `TimeTransMan` -/
instance : ChartedSpace ℝ TimeTransMan where
atlas := { valHomeomorphism.toOpenPartialHomeomorph }
chartAt _ := valHomeomorphism.toOpenPartialHomeomorph
mem_chart_source := by
simp
chart_mem_atlas := by
intro x
simp |
330 | leanexplore_declaration | leanexplore:376921 | leanexplore_sqlite | leanexplore_declarations | /-- The structure of a manifold on `TimeTransMan` induced by the choice of map `Time.val`. -/
instance : IsManifold 𝓘(ℝ, ℝ) ω TimeTransMan where
compatible := by
intro e1 e2 h1 h2
simp [atlas, ChartedSpace.atlas] at h1 h2
subst h1 h2
exact symm_trans_mem_contDiffGroupoid valHomeomorphism.toOpenPartia... |
220 | leanexplore_declaration | leanexplore:376922 | leanexplore_sqlite | leanexplore_declarations | lemma val_contDiff : ContMDiff 𝓘(ℝ, ℝ) 𝓘(ℝ, ℝ) ω TimeTransMan.val := by
refine contMDiffOn_univ.mp ?_
convert contMDiffOn_chart (x := (⟨0⟩ : TimeTransMan))
exact instIsManifoldRealModelWithCornersSelfTopWithTopENat |
422 | leanexplore_declaration | leanexplore:376923 | leanexplore_sqlite | leanexplore_declarations | /-- The choice of map `Time.val` from `TimeTransMan` to `ℝ` as a diffeomorphism. -/
noncomputable def valDiffeomorphism : TimeTransMan ≃ₘ^ω⟮𝓘(ℝ, ℝ), 𝓘(ℝ, ℝ)⟯ ℝ where
toEquiv := valHomeomorphism.toEquiv
contMDiff_toFun := val_contDiff
contMDiff_invFun := by
refine contMDiffOn_univ.mp ?_
convert contMDiff... |
71 | leanexplore_declaration | leanexplore:376924 | leanexplore_sqlite | leanexplore_declarations | instance : VAdd ℝ TimeTransMan where
vadd p t := { val := p + t.val } |
87 | leanexplore_declaration | leanexplore:376925 | leanexplore_sqlite | leanexplore_declarations | @[simp]
lemma vadd_val (p : ℝ) (t : TimeTransMan) :
(p +ᵥ t).val = p + t.val := rfl |
157 | leanexplore_declaration | leanexplore:376926 | leanexplore_sqlite | leanexplore_declarations | instance : AddAction ℝ TimeTransMan where
zero_vadd t := by
cases t
ext
simp
add_vadd p1 p2 t := by
ext
simp only [vadd_val]
ring |
58 | leanexplore_declaration | leanexplore:376927 | leanexplore_sqlite | leanexplore_declarations | instance : LE TimeTransMan where
le x y := x.val ≤ y.val |
78 | leanexplore_declaration | leanexplore:376928 | leanexplore_sqlite | leanexplore_declarations | lemma le_def (t1 t2 : TimeTransMan) :
t1 ≤ t2 ↔ t1.val ≤ t2.val := Iff.rfl |
54 | leanexplore_declaration | leanexplore:376929 | leanexplore_sqlite | leanexplore_declarations | instance : Nonempty TimeTransMan := Nonempty.intro ⟨0⟩ |
186 | leanexplore_declaration | leanexplore:376930 | leanexplore_sqlite | leanexplore_declarations | /-- The distance between two points in `TimeTransMan` in the units of `x : TimeUnit`. -/
noncomputable def dist (x : TimeUnit) (t1 t2 : TimeTransMan) : ℝ :=
1/x.val * ‖t2.val - t1.val‖ |
234 | leanexplore_declaration | leanexplore:376931 | leanexplore_sqlite | leanexplore_declarations | /-- The signed difference between two points in on the manifold `TimeTransMan`
in the units of `x : TimeUnit`. -/
noncomputable def diff (x : TimeUnit) (t2 t1 : TimeTransMan) : ℝ :=
if t1 ≤ t2 then dist x t1 t2 else - dist x t1 t2 |
322 | leanexplore_declaration | leanexplore:376932 | leanexplore_sqlite | leanexplore_declarations | lemma diff_eq_val (x : TimeUnit) (t1 t2 : TimeTransMan) :
diff x t1 t2 = 1/x.val * (t1.val - t2.val) := by
by_cases h : t2 ≤ t1
· simp [diff, dist, h]
simpa [le_def] using h
· simp [diff, dist, h]
simp [le_def] at h
rw [abs_of_neg]
have hx : x.val ≠ 0 := x.val_ne_zero
field_simp
linari... |
105 | leanexplore_declaration | leanexplore:376933 | leanexplore_sqlite | leanexplore_declarations | @[simp]
lemma diff_self (x : TimeUnit) (t : TimeTransMan) :
diff x t t = 0 := by
simp [diff_eq_val] |
729 | leanexplore_declaration | leanexplore:376934 | leanexplore_sqlite | leanexplore_declarations | lemma diff_fst_injective (x : TimeUnit) (t : TimeTransMan) : Function.Injective (diff x · t) := by
intro t1 t2 h
simp [diff] at h
by_cases h1 : t ≤ t1
<;> by_cases h2 : t ≤ t2
· simp_all [dist, le_def]
rw [abs_of_nonneg (by linarith), abs_of_nonneg (by linarith)] at h
simp at h
ext
exact h
... |
579 | leanexplore_declaration | leanexplore:376935 | leanexplore_sqlite | leanexplore_declarations | lemma diff_fst_surjective (x : TimeUnit) (t : TimeTransMan) :
Function.Surjective (diff x · t) := by
intro r
simp [diff, dist]
use x.1 * r +ᵥ t
simp [abs_mul]
rw [abs_of_nonneg (le_of_lt x.val_pos)]
simp only [ne_eq, TimeUnit.val_ne_zero, not_false_eq_true, inv_mul_cancel_left₀]
by_cases h : 0 ≤ r
·... |
151 | leanexplore_declaration | leanexplore:376936 | leanexplore_sqlite | leanexplore_declarations | lemma diff_fst_bijective (x : TimeUnit) (t : TimeTransMan) :
Function.Bijective (diff x · t) :=
⟨diff_fst_injective x t, diff_fst_surjective x t⟩ |
405 | leanexplore_declaration | leanexplore:376937 | leanexplore_sqlite | leanexplore_declarations | /-- Given a time unit `x : TimeUnit`, `addTime x r t`, for a real `ℝ` and `t : TimeTransMan`,
is the point in `TimeTransMan` separated from `t` by a difference of `r` in the units `x`.
For example, if `x` corresponds to seconds `addTime x 1 t` is the time 1 second more then `t`. -/
noncomputable def addTime (x : Ti... |
285 | leanexplore_declaration | leanexplore:376938 | leanexplore_sqlite | leanexplore_declarations | lemma addTime_eq_val (x : TimeUnit) (r : ℝ) (t : TimeTransMan) :
(addTime x r t) = ⟨x.1 * r + t.val⟩ := by
apply diff_fst_injective x t
change (diff x · t) (Function.invFun ((diff x · t)) r) = _
rw [Function.rightInverse_invFun (diff_fst_surjective x t)]
simp [diff_eq_val] |
131 | leanexplore_declaration | leanexplore:376939 | leanexplore_sqlite | leanexplore_declarations | lemma addTime_val (x : TimeUnit) (r : ℝ) (t : TimeTransMan) :
(addTime x r t).val = x.1 * r + t.val := by
rw [addTime_eq_val] |
386 | leanexplore_declaration | leanexplore:376940 | leanexplore_sqlite | leanexplore_declarations | /-- Given a `zero` and an `x : TimeUnit`, `negMetric zero x t` is the time the same distance
away from `zero` as `t` in units `x` but in the opposite direction.
This does actually depend on `x`, as a result see `neg` and `neg_eq_negMetric`. -/
noncomputable def negMetric (zero : TimeTransMan) (x : TimeUnit)
(t ... |
243 | leanexplore_declaration | leanexplore:376941 | leanexplore_sqlite | leanexplore_declarations | /-- Given a `zero`, `neg zero t` is the time the same distance
away from `zero` as `t` in any units but in the opposite direction. -/
noncomputable def neg (zero : TimeTransMan) (t : TimeTransMan) : TimeTransMan :=
negMetric zero default t |
186 | leanexplore_declaration | leanexplore:376942 | leanexplore_sqlite | leanexplore_declarations | lemma neg_eq_negMetric (zero : TimeTransMan) (x : TimeUnit) (t : TimeTransMan) :
neg zero t = negMetric zero x t := by
simp [neg, negMetric]
ext
simp [addTime_val, diff_eq_val] |
1,201 | leanexplore_declaration | leanexplore:376943 | leanexplore_sqlite | leanexplore_declarations | /-- With a choice of zero `zero : TimeTransMan` and a choice of units `x : TimeUnit`,
`toTime` is the homeomorphism between the type `TimeTransMan` and `Time`. -/
noncomputable def toTime (zero : TimeTransMan) (x : TimeUnit) : TimeTransMan ≃ₜ Time where
toFun := fun t => ⟨diff x t zero⟩
invFun := fun r => addTime... |
132 | leanexplore_declaration | leanexplore:376944 | leanexplore_sqlite | leanexplore_declarations | @[simp]
lemma toTime_zero (zero : TimeTransMan) (x : TimeUnit) :
toTime zero x zero = 0 := by
ext
simp [toTime, diff_eq_val] |
161 | leanexplore_declaration | leanexplore:376945 | leanexplore_sqlite | leanexplore_declarations | @[simp]
lemma toTime_symm_zero_add (zero : TimeTransMan) (x : TimeUnit) :
(toTime zero x).symm 0 = zero := by
ext
simp [toTime, addTime_val, diff_eq_val] |
126 | leanexplore_declaration | leanexplore:376946 | leanexplore_sqlite | leanexplore_declarations | lemma toTime_val (zero : TimeTransMan) (x : TimeUnit) (t : TimeTransMan) :
(toTime zero x t).val = diff x t zero := by rfl |
171 | leanexplore_declaration | leanexplore:376947 | leanexplore_sqlite | leanexplore_declarations | lemma toTime_symm_val (zero : TimeTransMan) (x : TimeUnit) (r : Time) :
(toTime zero x).symm r = addTime x r zero := by
ext
simp [toTime, addTime_val, diff_eq_val] |
229 | leanexplore_declaration | leanexplore:376948 | leanexplore_sqlite | leanexplore_declarations | @[simp]
lemma toTime_addTime (zero : TimeTransMan) (x : TimeUnit) (r : ℝ) (τ : TimeTransMan) :
toTime zero x (addTime x r τ) = ⟨r⟩ + toTime zero x τ:= by
ext
simp [toTime_val, diff_eq_val, addTime_val]
field_simp
ring |
264 | leanexplore_declaration | leanexplore:376949 | leanexplore_sqlite | leanexplore_declarations | lemma toTime_symm_add (zero : TimeTransMan) (x : TimeUnit) (t1 t2 : Time) :
(toTime zero x).symm (t1 + t2) = addTime x (diff x ((toTime zero x).symm t1) zero)
((toTime zero x).symm t2) := by
ext
simp [addTime_val, diff_eq_val, toTime_symm_val]
ring |
265 | leanexplore_declaration | leanexplore:376950 | leanexplore_sqlite | leanexplore_declarations | lemma toTime_symm_add' (zero : TimeTransMan) (x : TimeUnit) (t1 t2 : Time) :
(toTime zero x).symm (t1 + t2) = addTime x (diff x ((toTime zero x).symm t2) zero)
((toTime zero x).symm t1) := by
ext
simp [addTime_val, diff_eq_val, toTime_symm_val]
ring |
200 | leanexplore_declaration | leanexplore:376951 | leanexplore_sqlite | leanexplore_declarations | lemma diff_eq_toTime_sub (zero : TimeTransMan) (x : TimeUnit) (t1 t2 : TimeTransMan) :
diff x t2 t1 = toTime zero x t2 - toTime zero x t1 := by
simp [toTime_val, diff_eq_val]
field_simp
ring |
292 | leanexplore_declaration | leanexplore:376952 | leanexplore_sqlite | leanexplore_declarations | lemma toTime_neg (zero : TimeTransMan) (x : TimeUnit) (t : TimeTransMan) :
(toTime zero x) (neg zero t) = - toTime zero x t := by
rw [neg_eq_negMetric zero x]
ext
simp only [negMetric, diff_eq_val, one_div, toTime_addTime, toTime_zero,
add_zero, Time.neg_val, toTime_val]
ring |
217 | leanexplore_declaration | leanexplore:376953 | leanexplore_sqlite | leanexplore_declarations | lemma toTime_symm_neg (zero : TimeTransMan) (x : TimeUnit) (t : Time) :
(toTime zero x).symm (- t) = neg zero ((toTime zero x).symm t) := by
ext
simp [toTime_symm_val, addTime_val, diff_eq_val, neg, negMetric] |
270 | leanexplore_declaration | leanexplore:376954 | leanexplore_sqlite | leanexplore_declarations | lemma toTime_symm_sub (zero : TimeTransMan) (x : TimeUnit)
(t1 t2 : Time) : (toTime zero x).symm (t1 - t2) =
addTime x (diff x zero ((toTime zero x).symm t2))
((toTime zero x).symm t1) := by
ext
simp [addTime_val, diff_eq_val, toTime_symm_val]
ring |
252 | leanexplore_declaration | leanexplore:376955 | leanexplore_sqlite | leanexplore_declarations | /-- The choices of translationally-invariant metrics on the manifold `TimeTransMan`.
Such a choice corresponds to a choice of units for time. -/
structure TimeUnit : Type where
/-- The underlying scale of the unit. -/
val : ℝ
property : 0 < val |
96 | leanexplore_declaration | leanexplore:376956 | leanexplore_sqlite | leanexplore_declarations | @[simp]
lemma val_ne_zero (x : TimeUnit) : x.val ≠ 0 := by
exact Ne.symm (ne_of_lt x.property) |
54 | leanexplore_declaration | leanexplore:376957 | leanexplore_sqlite | leanexplore_declarations | lemma val_pos (x : TimeUnit) : 0 < x.val := x.property |
65 | leanexplore_declaration | leanexplore:376958 | leanexplore_sqlite | leanexplore_declarations | instance : Inhabited TimeUnit where
default := ⟨1, by norm_num⟩ |
141 | leanexplore_declaration | leanexplore:376959 | leanexplore_sqlite | leanexplore_declarations | noncomputable instance : HDiv TimeUnit TimeUnit ℝ≥0 where
hDiv x t := ⟨x.val / t.val, div_nonneg (le_of_lt x.val_pos) (le_of_lt t.val_pos)⟩ |
132 | leanexplore_declaration | leanexplore:376960 | leanexplore_sqlite | leanexplore_declarations | lemma div_eq_val (x y : TimeUnit) :
x / y = (⟨x.val / y.val, div_nonneg (le_of_lt x.val_pos) (le_of_lt y.val_pos)⟩ : ℝ≥0) := rfl |
122 | leanexplore_declaration | leanexplore:376961 | leanexplore_sqlite | leanexplore_declarations | @[simp]
lemma div_ne_zero (x y : TimeUnit) : ¬ x / y = (0 : ℝ≥0) := by
rw [div_eq_val]
refine coe_ne_zero.mp ?_
simp |
148 | leanexplore_declaration | leanexplore:376962 | leanexplore_sqlite | leanexplore_declarations | @[simp]
lemma div_pos (x y : TimeUnit) : (0 : ℝ≥0) < x/ y := by
apply lt_of_le_of_ne
· exact zero_le (x / y)
· exact Ne.symm (div_ne_zero x y) |
102 | leanexplore_declaration | leanexplore:376963 | leanexplore_sqlite | leanexplore_declarations | @[simp]
lemma div_self (x : TimeUnit) :
x / x = (1 : ℝ≥0) := by
simp [div_eq_val, x.val_ne_zero] |
127 | leanexplore_declaration | leanexplore:376964 | leanexplore_sqlite | leanexplore_declarations | lemma div_symm (x y : TimeUnit) :
x / y = (y / x)⁻¹ := NNReal.eq <| by
rw [div_eq_val, inv_eq_one_div, div_eq_val]
simp |
125 | leanexplore_declaration | leanexplore:376965 | leanexplore_sqlite | leanexplore_declarations | @[simp]
lemma div_mul_div_coe (x y z : TimeUnit) :
(x / y : ℝ) * (y /z : ℝ) = x /z := by
simp [div_eq_val]
field_simp |
164 | leanexplore_declaration | leanexplore:376966 | leanexplore_sqlite | leanexplore_declarations | /-- The scaling of a time unit by a positive real. -/
def scale (r : ℝ) (x : TimeUnit) (hr : 0 < r := by norm_num) : TimeUnit :=
⟨r * x.val, mul_pos hr x.val_pos⟩ |
147 | leanexplore_declaration | leanexplore:376967 | leanexplore_sqlite | leanexplore_declarations | @[simp]
lemma scale_div_self (x : TimeUnit) (r : ℝ) (hr : 0 < r) :
scale r x hr / x = (⟨r, le_of_lt hr⟩ : ℝ≥0) := by
simp [scale, div_eq_val] |
75 | leanexplore_declaration | leanexplore:376968 | leanexplore_sqlite | leanexplore_declarations | @[simp]
lemma scale_one (x : TimeUnit) : scale 1 x = x := by
simp [scale] |
254 | leanexplore_declaration | leanexplore:376969 | leanexplore_sqlite | leanexplore_declarations | @[simp]
lemma scale_div_scale (x1 x2 : TimeUnit) {r1 r2 : ℝ} (hr1 : 0 < r1) (hr2 : 0 < r2) :
scale r1 x1 hr1 / scale r2 x2 hr2 = (⟨r1, le_of_lt hr1⟩ / ⟨r2, le_of_lt hr2⟩) * (x1 / x2) := by
refine NNReal.eq ?_
simp [scale, div_eq_val]
field_simp |
219 | leanexplore_declaration | leanexplore:376970 | leanexplore_sqlite | leanexplore_declarations | @[simp]
lemma self_div_scale (x : TimeUnit) (r : ℝ) (hr : 0 < r) :
x / scale r x hr = (⟨1/r, _root_.div_nonneg (by simp) (le_of_lt hr)⟩ : ℝ≥0) := by
simp [scale, div_eq_val]
ext
simp only [coe_mk]
field_simp |
188 | leanexplore_declaration | leanexplore:376971 | leanexplore_sqlite | leanexplore_declarations | @[simp]
lemma scale_scale (x : TimeUnit) (r1 r2 : ℝ) (hr1 : 0 < r1) (hr2 : 0 < r2) :
scale r1 (scale r2 x hr2) hr1 = scale (r1 * r2) x (mul_pos hr1 hr2) := by
simp [scale]
ring
/-! |
91 | leanexplore_declaration | leanexplore:376972 | leanexplore_sqlite | leanexplore_declarations | /-- The definition of a time unit of seconds. -/
def seconds : TimeUnit := ⟨1, by norm_num⟩ |
132 | leanexplore_declaration | leanexplore:376973 | leanexplore_sqlite | leanexplore_declarations | /-- The time unit of femtoseconds (10⁻¹⁵ of a second). -/
noncomputable def femtoseconds : TimeUnit := scale ((1/10) ^ (15)) seconds |
130 | leanexplore_declaration | leanexplore:376974 | leanexplore_sqlite | leanexplore_declarations | /-- The time unit of picoseconds (10⁻¹² of a second). -/
noncomputable def picoseconds : TimeUnit := scale ((1/10) ^ (12)) seconds |
128 | leanexplore_declaration | leanexplore:376975 | leanexplore_sqlite | leanexplore_declarations | /-- The time unit of nanoseconds (10⁻⁹ of a second). -/
noncomputable def nanoseconds : TimeUnit := scale ((1/10) ^ (9)) seconds |
130 | leanexplore_declaration | leanexplore:376976 | leanexplore_sqlite | leanexplore_declarations | /-- The time unit of microseconds (10⁻⁶ of a second). -/
noncomputable def microseconds : TimeUnit := scale ((1/10) ^ (6)) seconds |
130 | leanexplore_declaration | leanexplore:376977 | leanexplore_sqlite | leanexplore_declarations | /-- The time unit of milliseconds (10⁻³ of a second). -/
noncomputable def milliseconds : TimeUnit := scale ((1/10) ^ (3)) seconds |
130 | leanexplore_declaration | leanexplore:376978 | leanexplore_sqlite | leanexplore_declarations | /-- The time unit of centiseconds (10⁻² of a second). -/
noncomputable def centiseconds : TimeUnit := scale ((1/10) ^ (2)) seconds |
128 | leanexplore_declaration | leanexplore:376979 | leanexplore_sqlite | leanexplore_declarations | /-- The time unit of deciseconds (10⁻¹ of a second). -/
noncomputable def deciseconds : TimeUnit := scale ((1/10) ^ (1)) seconds |
89 | leanexplore_declaration | leanexplore:376980 | leanexplore_sqlite | leanexplore_declarations | /-- The time unit of minutes. -/
noncomputable def minutes : TimeUnit := scale 60 seconds |
92 | leanexplore_declaration | leanexplore:376981 | leanexplore_sqlite | leanexplore_declarations | /-- The time unit of hours. -/
noncomputable def hours : TimeUnit := scale (60 * 60) seconds |
103 | leanexplore_declaration | leanexplore:376982 | leanexplore_sqlite | leanexplore_declarations | /-- The time unit of 24 hour days. -/
noncomputable def days : TimeUnit := scale (24 * 60 * 60) seconds |
107 | leanexplore_declaration | leanexplore:376983 | leanexplore_sqlite | leanexplore_declarations | /-- The time unit of 7 day weeks. -/
noncomputable def weeks : TimeUnit := scale (7 * 24 * 60 * 60) seconds |
92 | leanexplore_declaration | leanexplore:376984 | leanexplore_sqlite | leanexplore_declarations | lemma minutes_div_seconds : minutes / seconds = (60 : ℝ≥0) := NNReal.eq <| by simp [minutes] |
100 | leanexplore_declaration | leanexplore:376985 | leanexplore_sqlite | leanexplore_declarations | lemma hours_div_seconds : hours / seconds = (3600 : ℝ≥0) := NNReal.eq <| by
simp [hours]; norm_num |
98 | leanexplore_declaration | leanexplore:376986 | leanexplore_sqlite | leanexplore_declarations | lemma days_div_seconds : days / seconds = (86400 : ℝ≥0) := NNReal.eq <| by
simp [days]; norm_num |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.