diff --git a/leanpkg.toml b/leanpkg.toml index e872c5b..7382234 100644 --- a/leanpkg.toml +++ b/leanpkg.toml @@ -5,4 +5,4 @@ lean_version = "leanprover-community/lean:3.50.3" path = "src" [dependencies] -mathlib = {git = "https://github.com/leanprover-community/mathlib", rev = "d1723c047a091ae3fca0af8aeab1743e1a898611"} +mathlib = {git = "https://github.com/leanprover-community/mathlib", rev = "9dba31df156d9d65b9d78db449542ca73d147c68"} diff --git a/src/demos/category_theory.lean b/src/demos/category_theory.lean index 02e9a9c..bc628f0 100644 --- a/src/demos/category_theory.lean +++ b/src/demos/category_theory.lean @@ -1,5 +1,5 @@ import category_theory.category.basic -import category_theory.functor +import category_theory.functor.basic import algebra.category.Group.images import algebra.category.Group.colimits @@ -11,7 +11,7 @@ import category_theory.abelian.basic import category_theory.limits.shapes.finite_limits import topology.instances.real -import topology.category.Top +import topology.category.Top.limits import topology.category.UniformSpace diff --git a/src/demos/linalg.lean b/src/demos/linalg.lean index e369b5e..0a4a84f 100644 --- a/src/demos/linalg.lean +++ b/src/demos/linalg.lean @@ -1,4 +1,4 @@ -import algebra.module +import algebra.module.basic import analysis.inner_product_space.basic import data.matrix.notation import data.matrix.dmatrix @@ -213,14 +213,14 @@ are `fintype`s, and there is no restriction on the type `α` of the entries. Like vectors in `n → R`, matrices are typically indexed over `fin k`. To define a matrix, you map the indexes to the entry: -/ -def example_matrix : matrix (fin 2) (fin 3) ℤ := λ i j, i + j +def example_matrix : matrix (fin 2) (fin 3) ℤ := matrix.of (λ i j, (↑i + ↑j : ℤ)) #eval example_matrix 1 2 -/- Like vectors, we can use `![...]` notation to define matrices: -/ +/- Simiilarly to vectors, we can use `!![...]` notation to define matrices: -/ def other_example_matrix : matrix (fin 3) (fin 2) ℤ := -![![0, 1], - ![1, 2], - ![2, 3]] +!![0, 1; + 1, 2; + 2, 3] /- We have the 0 matrix and the sum of two matrices: -/ example (i j) : (0 : matrix m n R) i j = 0 := dmatrix.zero_apply i j @@ -262,7 +262,7 @@ as long as you have chosen a basis for each module. -/ variables [decidable_eq m] [decidable_eq n] variables (v : basis m R M) (w : basis n R N) -#check linear_map.to_matrix v w -- (M →ₗ[R] N) ≈ₗ[R] matrix n m R +#check linear_map.to_matrix v w -- (M →ₗ[R] N) ≃ₗ[R] matrix n m R /- Invertible (i.e. nonsingular) matrices have an inverse operation denoted by `⁻¹`. diff --git a/src/exercises_sources/friday/analysis.lean b/src/exercises_sources/friday/analysis.lean index cc01529..439e8a7 100644 --- a/src/exercises_sources/friday/analysis.lean +++ b/src/exercises_sources/friday/analysis.lean @@ -14,7 +14,7 @@ namespace lftcm noncomputable theory open real -open_locale topological_space filter classical real +open_locale topology filter classical real /-! # Derivatives diff --git a/src/exercises_sources/friday/manifolds.lean b/src/exercises_sources/friday/manifolds.lean index 68beaaf..cede741 100644 --- a/src/exercises_sources/friday/manifolds.lean +++ b/src/exercises_sources/friday/manifolds.lean @@ -457,13 +457,13 @@ be a smooth manifold. -/ -- the type `tangent_bundle 𝓡1 myℝ` makes sense #check tangent_bundle 𝓡1 myℝ -/- The tangent space above a point of `myℝ` is just a one-dimensional vector space (identified with `ℝ`). +/- The tangent space above a point of `myℝ` is just a one-dimensional vector space +(identified with `ℝ`). So, one can prescribe an element of the tangent bundle as a pair (more on this below) -/ example : tangent_bundle 𝓡1 myℝ := ⟨(4 : ℝ), 0⟩ -/- Construct the smooth manifold structure on the tangent bundle. Hint: the answer is a one-liner, -and this instance is not really needed. -/ -instance tangent_bundle_myℝ : smooth_manifold_with_corners (𝓡1.prod 𝓡1) (tangent_bundle 𝓡1 myℝ) := +/- Type-class inference can construct the smooth manifold structure on the tangent bundle. -/ +example : smooth_manifold_with_corners (𝓡1.prod 𝓡1) (tangent_bundle 𝓡1 myℝ) := sorry /- @@ -472,7 +472,13 @@ NB: the model space for the tangent bundle to a product manifold or a tangent sp structures with model `ℝ × ℝ`, the identity one and the product one, which are not definitionally equal. And this would be bad. -/ -#check tangent_bundle.charted_space 𝓡1 myℝ +example : charted_space (model_prod ℝ ℝ) (tangent_bundle 𝓡1 myℝ) := +sorry + +/- +The charts of any smooth vector bundle are characterized by `fiber_bundle.charted_space_chart_at` +-/ +#check @fiber_bundle.charted_space_chart_at /- A smooth map between manifolds induces a map between their tangent bundles. In `mathlib` this is called the `tangent_map` (you might instead know it as the "differential" or "pushforward" of the diff --git a/src/exercises_sources/friday/topology.lean b/src/exercises_sources/friday/topology.lean index aa1d1f1..1d20917 100644 --- a/src/exercises_sources/friday/topology.lean +++ b/src/exercises_sources/friday/topology.lean @@ -1,6 +1,6 @@ import topology.metric_space.basic -open_locale classical filter topological_space +open_locale classical filter topology namespace lftcm open filter set diff --git a/src/exercises_sources/thursday/category_theory/exercise2.lean b/src/exercises_sources/thursday/category_theory/exercise2.lean index 4038686..f04b7d3 100644 --- a/src/exercises_sources/thursday/category_theory/exercise2.lean +++ b/src/exercises_sources/thursday/category_theory/exercise2.lean @@ -1,5 +1,5 @@ import algebra.category.Ring.basic -import data.polynomial +import data.polynomial.lifts /-! Let's show that taking polynomials over a ring is functor `Ring ⥤ Ring`. diff --git a/src/exercises_sources/thursday/category_theory/exercise4.lean b/src/exercises_sources/thursday/category_theory/exercise4.lean index f481ab3..27ac1a9 100644 --- a/src/exercises_sources/thursday/category_theory/exercise4.lean +++ b/src/exercises_sources/thursday/category_theory/exercise4.lean @@ -1,4 +1,4 @@ -import algebra.category.Ring +import algebra.category.Ring.basic import category_theory.yoneda import data.polynomial.algebra_map diff --git a/src/exercises_sources/thursday/groups_rings_fields.lean b/src/exercises_sources/thursday/groups_rings_fields.lean index cd69f03..dce8623 100644 --- a/src/exercises_sources/thursday/groups_rings_fields.lean +++ b/src/exercises_sources/thursday/groups_rings_fields.lean @@ -2,6 +2,7 @@ import linear_algebra.finite_dimensional import ring_theory.algebraic import data.zmod.basic import data.real.basic +import data.nat.choose.dvd import tactic /-! diff --git a/src/exercises_sources/thursday/linear_algebra.lean b/src/exercises_sources/thursday/linear_algebra.lean index 798a675..1290c7d 100644 --- a/src/exercises_sources/thursday/linear_algebra.lean +++ b/src/exercises_sources/thursday/linear_algebra.lean @@ -1,7 +1,6 @@ import analysis.inner_product_space.basic import data.matrix.notation import linear_algebra.bilinear_form -import linear_algebra.matrix import tactic universes u v @@ -134,7 +133,7 @@ Hints: * Use the `simp` tactic to simplify `(x + y) i` to `x i + y i` and `(s • x) i` to `s * x i`. * To deal with equalities containing many `+` and `*` symbols, use the `ring` tactic. -/ -def A : matrix (fin 2) (fin 2) R := ![![1, 0], ![-2, 1]] +def A : matrix (fin 2) (fin 2) R := !![1, 0; -2, 1] def your_bilin_form : bilin_form R (fin 2 → R) := sorry @@ -166,10 +165,13 @@ Hints: * Try the lemmas `finset.sum_nonneg`, `finset.sum_eq_zero_iff_of_nonneg`, `mul_self_nonneg` and `mul_self_eq_zero`. -/ -noncomputable instance : inner_product_space ℝ (n → ℝ) := -inner_product_space.of_core +noncomputable instance : normed_add_comm_group (n → ℝ):= +@inner_product_space.of_core.to_normed_add_comm_group ℝ (n → ℝ) _ _ _ sorry +noncomputable instance : inner_product_space ℝ (n → ℝ) := +inner_product_space.of_core _ + end pi end exercise3 diff --git a/src/exercises_sources/tuesday/numbers.lean b/src/exercises_sources/tuesday/numbers.lean index ca6e00f..4b9c066 100644 --- a/src/exercises_sources/tuesday/numbers.lean +++ b/src/exercises_sources/tuesday/numbers.lean @@ -1,7 +1,7 @@ import tactic import data.real.basic import data.int.gcd -import number_theory.padics +import number_theory.padics.padic_numbers import data.nat.prime_norm_num /-! diff --git a/src/exercises_sources/tuesday/sets.lean b/src/exercises_sources/tuesday/sets.lean index 0ef1bd0..7dcbf1c 100644 --- a/src/exercises_sources/tuesday/sets.lean +++ b/src/exercises_sources/tuesday/sets.lean @@ -1,4 +1,5 @@ import data.set.basic data.set.lattice data.nat.parity +import data.nat.prime import tactic.linarith open set nat function diff --git a/src/for_mathlib/manifolds.lean b/src/for_mathlib/manifolds.lean index 4ec8607..accf4a4 100644 --- a/src/for_mathlib/manifolds.lean +++ b/src/for_mathlib/manifolds.lean @@ -21,7 +21,7 @@ include hp lemma pi_Lp.norm_coord_le_norm (x : pi_Lp p α) (i : ι) : ‖x i‖ ≤ ‖x‖ := begin unfreezingI { rcases p.trichotomy with (rfl | rfl | h) }, - { exact false.elim (lt_irrefl _ (ennreal.zero_lt_one.trans_le hp.out)) }, + { exact false.elim (lt_irrefl _ (zero_lt_one.trans_le hp.out)) }, { rw pi_Lp.norm_eq_csupr, exact le_cSup (finite_range _).bdd_above (mem_range_self _) }, { calc @@ -74,7 +74,7 @@ begin begin refine (F i).mk_continuous 1 (λ x, _), unfreezingI { rcases p.trichotomy with (rfl | rfl | h) }, - { exact false.elim (lt_irrefl _ (ennreal.zero_lt_one.trans_le hp.out)) }, + { exact false.elim (lt_irrefl _ (zero_lt_one.trans_le hp.out)) }, { haveI : nonempty ι := ⟨i⟩, simp only [pi_Lp.norm_eq_csupr, linear_map.coe_mk, one_mul], refine cSup_le (range_nonempty _) _, diff --git a/src/hints/category_theory/exercise2/hint1.lean b/src/hints/category_theory/exercise2/hint1.lean index 33b5617..db512dd 100644 --- a/src/hints/category_theory/exercise2/hint1.lean +++ b/src/hints/category_theory/exercise2/hint1.lean @@ -1,5 +1,5 @@ import algebra.category.Ring.basic -import data.polynomial +import data.polynomial.lifts noncomputable theory -- the default implementation of polynomials is noncomputable diff --git a/src/hints/category_theory/exercise2/hint2.lean b/src/hints/category_theory/exercise2/hint2.lean index 179c100..43e85db 100644 --- a/src/hints/category_theory/exercise2/hint2.lean +++ b/src/hints/category_theory/exercise2/hint2.lean @@ -1,5 +1,5 @@ import algebra.category.Ring.basic -import data.polynomial +import data.polynomial.lifts noncomputable theory -- the default implementation of polynomials is noncomputable diff --git a/src/hints/category_theory/exercise2/hint3.lean b/src/hints/category_theory/exercise2/hint3.lean index 87fd544..c7d646c 100644 --- a/src/hints/category_theory/exercise2/hint3.lean +++ b/src/hints/category_theory/exercise2/hint3.lean @@ -1,5 +1,5 @@ import algebra.category.Ring.basic -import data.polynomial +import data.polynomial.lifts noncomputable theory -- the default implementation of polynomials is noncomputable diff --git a/src/hints/category_theory/exercise2/hint4.lean b/src/hints/category_theory/exercise2/hint4.lean index c793042..882e12e 100644 --- a/src/hints/category_theory/exercise2/hint4.lean +++ b/src/hints/category_theory/exercise2/hint4.lean @@ -1,5 +1,5 @@ import algebra.category.Ring.basic -import data.polynomial +import data.polynomial.lifts noncomputable theory -- the default implementation of polynomials is noncomputable diff --git a/src/hints/category_theory/exercise2/hint5.lean b/src/hints/category_theory/exercise2/hint5.lean index e47eb15..ca671b8 100644 --- a/src/hints/category_theory/exercise2/hint5.lean +++ b/src/hints/category_theory/exercise2/hint5.lean @@ -1,5 +1,5 @@ import algebra.category.Ring.basic -import data.polynomial +import data.polynomial.lifts noncomputable theory -- the default implementation of polynomials is noncomputable diff --git a/src/hints/category_theory/exercise2/hint6.lean b/src/hints/category_theory/exercise2/hint6.lean index 5a2f55f..e0ec859 100644 --- a/src/hints/category_theory/exercise2/hint6.lean +++ b/src/hints/category_theory/exercise2/hint6.lean @@ -1,5 +1,5 @@ import algebra.category.Ring.basic -import data.polynomial +import data.polynomial.lifts noncomputable theory -- the default implementation of polynomials is noncomputable diff --git a/src/hints/category_theory/exercise2/hint7.lean b/src/hints/category_theory/exercise2/hint7.lean index 30b9ad7..9986204 100644 --- a/src/hints/category_theory/exercise2/hint7.lean +++ b/src/hints/category_theory/exercise2/hint7.lean @@ -1,5 +1,5 @@ import algebra.category.Ring.basic -import data.polynomial +import data.polynomial.lifts noncomputable theory -- the default implementation of polynomials is noncomputable diff --git a/src/hints/category_theory/exercise4/hint1.lean b/src/hints/category_theory/exercise4/hint1.lean index 738ba52..95847a6 100644 --- a/src/hints/category_theory/exercise4/hint1.lean +++ b/src/hints/category_theory/exercise4/hint1.lean @@ -1,4 +1,4 @@ -import algebra.category.Ring +import algebra.category.Ring.basic import category_theory.yoneda import data.polynomial.algebra_map diff --git a/src/hints/category_theory/exercise4/hint2.lean b/src/hints/category_theory/exercise4/hint2.lean index 373a14a..4985d82 100644 --- a/src/hints/category_theory/exercise4/hint2.lean +++ b/src/hints/category_theory/exercise4/hint2.lean @@ -1,4 +1,4 @@ -import algebra.category.Ring +import algebra.category.Ring.basic import category_theory.yoneda import data.polynomial.algebra_map diff --git a/src/hints/category_theory/exercise4/hint3.lean b/src/hints/category_theory/exercise4/hint3.lean index 149cf8c..147c90d 100644 --- a/src/hints/category_theory/exercise4/hint3.lean +++ b/src/hints/category_theory/exercise4/hint3.lean @@ -1,4 +1,4 @@ -import algebra.category.Ring +import algebra.category.Ring.basic import category_theory.yoneda import data.polynomial.algebra_map diff --git a/src/hints/category_theory/exercise4/hint4.lean b/src/hints/category_theory/exercise4/hint4.lean index 3a74356..205747f 100644 --- a/src/hints/category_theory/exercise4/hint4.lean +++ b/src/hints/category_theory/exercise4/hint4.lean @@ -1,4 +1,4 @@ -import algebra.category.Ring +import algebra.category.Ring.basic import category_theory.yoneda import data.polynomial.algebra_map diff --git a/src/solutions/friday/manifolds.lean b/src/solutions/friday/manifolds.lean index e5546d5..d25f963 100644 --- a/src/solutions/friday/manifolds.lean +++ b/src/solutions/friday/manifolds.lean @@ -510,13 +510,13 @@ be a smooth manifold. -/ -- the type `tangent_bundle 𝓡1 myℝ` makes sense #check tangent_bundle 𝓡1 myℝ -/- The tangent space above a point of `myℝ` is just a one-dimensional vector space (identified with `ℝ`). +/- The tangent space above a point of `myℝ` is just a one-dimensional vector space +(identified with `ℝ`). So, one can prescribe an element of the tangent bundle as a pair (more on this below) -/ example : tangent_bundle 𝓡1 myℝ := ⟨(4 : ℝ), 0⟩ -/- Construct the smooth manifold structure on the tangent bundle. Hint: the answer is a one-liner, -and this instance is not really needed. -/ -instance tangent_bundle_myℝ : smooth_manifold_with_corners (𝓡1.prod 𝓡1) (tangent_bundle 𝓡1 myℝ) := +/- Type-class inference can construct the smooth manifold structure on the tangent bundle. -/ +example : smooth_manifold_with_corners (𝓡1.prod 𝓡1) (tangent_bundle 𝓡1 myℝ) := -- sorry by apply_instance -- sorry @@ -527,7 +527,15 @@ NB: the model space for the tangent bundle to a product manifold or a tangent sp structures with model `ℝ × ℝ`, the identity one and the product one, which are not definitionally equal. And this would be bad. -/ -#check tangent_bundle.charted_space 𝓡1 myℝ +example : charted_space (model_prod ℝ ℝ) (tangent_bundle 𝓡1 myℝ) := +-- sorry +by apply_instance +-- sorry + +/- +The charts of any smooth vector bundle are characterized by `fiber_bundle.charted_space_chart_at` +-/ +#check @fiber_bundle.charted_space_chart_at /- A smooth map between manifolds induces a map between their tangent bundles. In `mathlib` this is called the `tangent_map` (you might instead know it as the "differential" or "pushforward" of the @@ -559,8 +567,11 @@ begin let p : tangent_bundle 𝓡1 myℝ := ⟨(4 : ℝ), 0⟩, let F := chart_at (model_prod ℝ ℝ) p, have A : ¬ ((4 : ℝ) < 1), by norm_num, - have S : F.source = univ, by simp [F, chart_at, A, @local_homeomorph.refl_source ℝ _], - have T : F.target = univ, by simp [F, chart_at, A, @local_homeomorph.refl_target ℝ _], + have S : F.source = univ, + by simp [F, fiber_bundle.charted_space_chart_at, chart_at, A, local_homeomorph.refl_source ℝ], + have T : F.target = univ, + by simp [F, fiber_bundle.charted_space_chart_at, chart_at, A, local_homeomorph.refl_source ℝ, + local_homeomorph.refl_target ℝ], exact F.to_homeomorph_of_source_eq_univ_target_eq_univ S T, -- sorry end @@ -636,13 +647,14 @@ begin -- are left with a statement speaking of derivatives of real functions, without any manifold code left. -- sorry have : ¬ ((3 : ℝ) < 1), by norm_num, - simp only [chart_at, this, mem_Ioo, if_false, and_false], - dsimp [tangent_bundle_core, basic_smooth_vector_bundle_core.chart, bundle.total_space.proj], + simp only [chart_at, fiber_bundle.charted_space_chart_at, this, mem_Ioo, if_false, and_false, + local_homeomorph.trans_apply, tangent_bundle.trivialization_at_apply, fderiv_within_univ] + with mfld_simps, split_ifs, - { simp only [chart_at, h, my_first_local_homeo, if_true, fderiv_within_univ, mem_Ioo, fderiv_id', - continuous_linear_map.coe_id', continuous_linear_map.neg_apply, fderiv_neg] with mfld_simps }, - { simp only [chart_at, h, fderiv_within_univ, mem_Ioo, if_false, @local_homeomorph.refl_symm ℝ, - fderiv_id, continuous_linear_map.coe_id'] with mfld_simps } + { simp only [my_first_local_homeo, fderiv_neg, fderiv_id', + continuous_linear_map.coe_id', continuous_linear_map.neg_apply] with mfld_simps }, + { simp only [@local_homeomorph.refl_symm ℝ, fderiv_id, + continuous_linear_map.coe_id'] with mfld_simps } -- sorry end @@ -946,7 +958,7 @@ def G : tangent_bundle (𝓡∂ 1) (Icc (0 : ℝ) 1) → (Icc (0 : ℝ) 1) × lemma continuous_G : continuous G := begin -- sorry - apply continuous.prod_mk (tangent_bundle_proj_continuous _ _), + refine (continuous_proj (euclidean_space ℝ (fin 1)) (tangent_space (𝓡∂ 1))).prod_mk _, refine continuous_snd.comp _, apply continuous.comp (homeomorph.continuous _), apply cont_mdiff.continuous_tangent_map cont_mdiff_g le_top, diff --git a/src/solutions/friday/topology.lean b/src/solutions/friday/topology.lean index 2be793b..62599e6 100644 --- a/src/solutions/friday/topology.lean +++ b/src/solutions/friday/topology.lean @@ -1,6 +1,6 @@ import topology.metric_space.basic -open_locale classical filter topological_space +open_locale classical filter topology namespace lftcm open filter set diff --git a/src/solutions/thursday/category_theory/exercise2.lean b/src/solutions/thursday/category_theory/exercise2.lean index 745d2fd..b34191c 100644 --- a/src/solutions/thursday/category_theory/exercise2.lean +++ b/src/solutions/thursday/category_theory/exercise2.lean @@ -1,5 +1,5 @@ import algebra.category.Ring.basic -import data.polynomial +import data.polynomial.lifts /-! Let's show that taking polynomials over a ring is functor `Ring ⥤ Ring`. diff --git a/src/solutions/thursday/category_theory/exercise4.lean b/src/solutions/thursday/category_theory/exercise4.lean index f818987..838bb4b 100644 --- a/src/solutions/thursday/category_theory/exercise4.lean +++ b/src/solutions/thursday/category_theory/exercise4.lean @@ -1,4 +1,4 @@ -import algebra.category.Ring +import algebra.category.Ring.basic import category_theory.yoneda import data.polynomial.algebra_map diff --git a/src/solutions/thursday/groups_rings_fields.lean b/src/solutions/thursday/groups_rings_fields.lean index 634f3b8..e240b56 100644 --- a/src/solutions/thursday/groups_rings_fields.lean +++ b/src/solutions/thursday/groups_rings_fields.lean @@ -2,6 +2,7 @@ import linear_algebra.finite_dimensional import ring_theory.algebraic import data.zmod.basic import data.real.basic +import data.nat.choose.dvd import tactic /-! @@ -292,8 +293,7 @@ begin { intros i hi hi0, convert mul_zero _, rw char_p.cast_eq_zero_iff K p, - apply nat.prime.dvd_choose_self _ _ (fact.out p.prime), - { rwa pos_iff_ne_zero }, + apply nat.prime.dvd_choose_self (fact.out p.prime) hi0 _, { simpa using hi } }, { intro h, simp only [le_zero_iff, mem_range, not_lt] at h, diff --git a/src/solutions/thursday/linear_algebra.lean b/src/solutions/thursday/linear_algebra.lean index 5e07ed7..131c737 100644 --- a/src/solutions/thursday/linear_algebra.lean +++ b/src/solutions/thursday/linear_algebra.lean @@ -1,7 +1,6 @@ import analysis.inner_product_space.basic import data.matrix.notation import linear_algebra.bilinear_form -import linear_algebra.matrix import tactic universes u v @@ -197,7 +196,7 @@ Hints: * Use the `simp` tactic to simplify `(x + y) i` to `x i + y i` and `(s • x) i` to `s * x i`. * To deal with equalities containing many `+` and `*` symbols, use the `ring` tactic. -/ -def A : matrix (fin 2) (fin 2) R := ![![1, 0], ![-2, 1]] +def A : matrix (fin 2) (fin 2) R := !![1, 0; -2, 1] def your_bilin_form : bilin_form R (fin 2 → R) := -- sorry { bilin := λ v w, v 0 * w 0 + v 1 * w 1 - 2 * v 1 * w 0, @@ -235,18 +234,21 @@ Hints: * Try the lemmas `finset.sum_nonneg`, `finset.sum_eq_zero_iff_of_nonneg`, `mul_self_nonneg` and `mul_self_eq_zero`. -/ -noncomputable instance : inner_product_space ℝ (n → ℝ) := -inner_product_space.of_core +noncomputable instance : normed_add_comm_group (n → ℝ):= +@inner_product_space.of_core.to_normed_add_comm_group ℝ (n → ℝ) _ _ _ -- sorry { inner := dot_product, nonneg_re := λ x, finset.sum_nonneg (λ i _, mul_self_nonneg _), definite := λ x hx, funext (λ i, mul_self_eq_zero.mp ((finset.sum_eq_zero_iff_of_nonneg (λ i _, mul_self_nonneg (x i))).mp hx i (finset.mem_univ i))), - conj_sym := λ x y, dot_product_comm _ _, + conj_symm := λ x y, dot_product_comm _ _, add_left := λ x y z, add_dot_product _ _ _, smul_left := λ s x y, smul_dot_product _ _ _ } -- sorry +noncomputable instance : inner_product_space ℝ (n → ℝ) := +inner_product_space.of_core _ + end pi end exercise3 diff --git a/src/solutions/tuesday/numbers.lean b/src/solutions/tuesday/numbers.lean index 5968613..4868b23 100644 --- a/src/solutions/tuesday/numbers.lean +++ b/src/solutions/tuesday/numbers.lean @@ -1,7 +1,7 @@ import tactic import data.real.basic import data.int.gcd -import number_theory.padics +import number_theory.padics.padic_numbers import data.nat.prime_norm_num /-! diff --git a/src/solutions/tuesday/sets.lean b/src/solutions/tuesday/sets.lean index 31a072c..825d80b 100644 --- a/src/solutions/tuesday/sets.lean +++ b/src/solutions/tuesday/sets.lean @@ -1,4 +1,5 @@ import data.set.basic data.set.lattice data.nat.parity +import data.nat.prime import tactic.linarith open set nat function