data.bundleMathlib.Data.Bundle

This file has been ported!

Changes since the initial port

The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

refactor: redefine bundle.total_space (#19221)
  • Use a custom structure for bundle.total_space.
    • Use bundle.total_space.mk instead of bundle.total_space_mk.
    • Use bundle.total_space.to_prod instead of equiv.sigma_equiv_prod.
    • Use bundle.total_space.mk' (scoped notation) to specify F.
    • Rename bundle.trivial.proj_snd to bundle.total_space.trivial_snd to allow dot notation. Should we just use bundle.total_space.snd since bundle.trivial is now reducible?
  • Add an unused argument to bundle.total_space.
  • Make bundle.trivial and bundle.continuous_linear_map reducible.
  • Drop instances that are no longer needed.
Diff
@@ -15,15 +15,26 @@ should contain all possible results that do not involve any topology.
 
 We represent a bundle `E` over a base space `B` as a dependent type `E : B → Type*`.
 
-We provide a type synonym of `Σ x, E x` as `bundle.total_space E`, to be able to endow it with
-a topology which is not the disjoint union topology `sigma.topological_space`. In general, the
-constructions of fiber bundles we will make will be of this form.
+We define `bundle.total_space F E` to be the type of pairs `⟨b, x⟩`, where `b : B` and `x : E x`.
+This type is isomorphic to `Σ x, E x` and uses an extra argument `F` for reasons explained below. In
+general, the constructions of fiber bundles we will make will be of this form.
 
 ## Main Definitions
 
 * `bundle.total_space` the total space of a bundle.
 * `bundle.total_space.proj` the projection from the total space to the base space.
-* `bundle.total_space_mk` the constructor for the total space.
+* `bundle.total_space.mk` the constructor for the total space.
+
+## Implementation Notes
+
+- We use a custom structure for the total space of a bundle instead of using a type synonym for the
+  canonical disjoint union `Σ x, E x` because the total space usually has a different topology and
+  Lean 4 `simp` fails to apply lemmas about `Σ x, E x` to elements of the total space.
+
+- The definition of `bundle.total_space` has an unused argument `F`. The reason is that in some
+  constructions (e.g., `bundle.continuous_linear_map.vector_bundle`) we need access to the atlas of
+  trivializations of original fiber bundles to construct the topology on the total space of the new
+  fiber bundle.
 
 ## References
 - https://en.wikipedia.org/wiki/Bundle_(mathematics)
@@ -31,61 +42,65 @@ constructions of fiber bundles we will make will be of this form.
 
 namespace bundle
 
-variables {B : Type*} (E : B → Type*)
+variables {B F : Type*} (E : B → Type*)
 
 /--
-`bundle.total_space E` is the total space of the bundle `Σ x, E x`.
-This type synonym is used to avoid conflicts with general sigma types.
+`bundle.total_space E` is the total space of the bundle. It consists of pairs
+`(proj : B, snd : E proj)`.
 -/
-def total_space := Σ x, E x
+@[ext]
+structure total_space (F : Type*) (E : B → Type*) :=
+(proj : B)
+(snd : E proj)
 
 instance [inhabited B] [inhabited (E default)] :
-  inhabited (total_space E) := ⟨⟨default, default⟩⟩
+  inhabited (total_space F E) := ⟨⟨default, default⟩⟩
 
 variables {E}
 
 /-- `bundle.total_space.proj` is the canonical projection `bundle.total_space E → B` from the
 total space to the base space. -/
-@[simp, reducible] def total_space.proj : total_space E → B := sigma.fst
+add_decl_doc total_space.proj
 
 -- this notation won't be used in the pretty-printer
 localized "notation `π` := @bundle.total_space.proj _" in bundle
 
-/-- Constructor for the total space of a bundle. -/
-@[simp, reducible] def total_space_mk (b : B) (a : E b) :
-  bundle.total_space E := ⟨b, a⟩
-
-lemma total_space.proj_mk {x : B} {y : E x} : (total_space_mk x y).proj = x :=
-rfl
-
-lemma sigma_mk_eq_total_space_mk {x : B} {y : E x} : sigma.mk x y = total_space_mk x y :=
-rfl
+-- TODO: try `abbrev` in Lean 4
+localized "notation `total_space.mk'` F:max := @bundle.total_space.mk _ F _" in bundle
 
 lemma total_space.mk_cast {x x' : B} (h : x = x') (b : E x) :
-  total_space_mk x' (cast (congr_arg E h) b) = total_space_mk x b :=
+  total_space.mk' F x' (cast (congr_arg E h) b) = total_space.mk x b :=
 by { subst h, refl }
 
-lemma total_space.eta (z : total_space E) :
-  total_space_mk z.proj z.2 = z :=
-sigma.eta z
+instance {x : B} : has_coe_t (E x) (total_space F E) := ⟨total_space.mk x⟩
 
-instance {x : B} : has_coe_t (E x) (total_space E) := ⟨total_space_mk x⟩
+@[simp] lemma total_space.coe_proj (x : B) (v : E x) : (v : total_space F E).proj = x := rfl
+@[simp] lemma total_space.coe_snd {x : B} {y : E x} : (y : total_space F E).snd = y := rfl
 
-@[simp] lemma coe_fst (x : B) (v : E x) : (v : total_space E).fst = x := rfl
-@[simp] lemma coe_snd {x : B} {y : E x} : (y : total_space E).snd = y := rfl
+lemma total_space.coe_eq_mk {x : B} (v : E x) : (v : total_space F E) = total_space.mk x v := rfl
 
-lemma to_total_space_coe {x : B} (v : E x) : (v : total_space E) = total_space_mk x v := rfl
+lemma total_space.eta (z : total_space F E) :
+  total_space.mk z.proj z.2 = z :=
+by cases z; refl
 
 -- notation for the direct sum of two bundles over the same base
 notation E₁ ` ×ᵇ `:100 E₂ := λ x, E₁ x × E₂ x
 
 /-- `bundle.trivial B F` is the trivial bundle over `B` of fiber `F`. -/
-def trivial (B : Type*) (F : Type*) : B → Type* := function.const B F
-
-instance {F : Type*} [inhabited F] {b : B} : inhabited (bundle.trivial B F b) := ⟨(default : F)⟩
+@[reducible, nolint unused_arguments]
+def trivial (B : Type*) (F : Type*) : B → Type* := λ _, F
 
 /-- The trivial bundle, unlike other bundles, has a canonical projection on the fiber. -/
-def trivial.proj_snd (B : Type*) (F : Type*) : total_space (bundle.trivial B F) → F := sigma.snd
+def total_space.trivial_snd (B : Type*) (F : Type*) : total_space F (bundle.trivial B F) → F :=
+total_space.snd
+
+/-- A trivial bundle is equivalent to the product `B × F`. -/
+@[simps { attrs := [`simp, `mfld_simps] }]
+def total_space.to_prod (B F : Type*) : total_space F (λ _ : B, F) ≃ B × F :=
+{ to_fun := λ x, (x.1, x.2),
+  inv_fun := λ x, ⟨x.1, x.2⟩,
+  left_inv := λ ⟨_, _⟩, rfl,
+  right_inv := λ ⟨_, _⟩, rfl }
 
 section pullback
 
@@ -93,55 +108,36 @@ variable {B' : Type*}
 
 /-- The pullback of a bundle `E` over a base `B` under a map `f : B' → B`, denoted by `pullback f E`
 or `f *ᵖ E`,  is the bundle over `B'` whose fiber over `b'` is `E (f b')`. -/
-@[nolint has_nonempty_instance] def pullback (f : B' → B) (E : B → Type*) := λ x, E (f x)
+def pullback (f : B' → B) (E : B → Type*) : B' → Type* := λ x, E (f x)
+
+notation f ` *ᵖ ` E:max := pullback f E
 
-notation f ` *ᵖ ` E := pullback f E
+instance {f : B' → B} {x : B'} [nonempty (E (f x))] : nonempty (f *ᵖ E x) := ‹nonempty (E (f x))›
 
 /-- Natural embedding of the total space of `f *ᵖ E` into `B' × total_space E`. -/
 @[simp] def pullback_total_space_embedding (f : B' → B) :
-  total_space (f *ᵖ E) → B' × total_space E :=
-λ z, (z.proj, total_space_mk (f z.proj) z.2)
+  total_space F (f *ᵖ E) → B' × total_space F E :=
+λ z, (z.proj, total_space.mk (f z.proj) z.2)
 
 /-- The base map `f : B' → B` lifts to a canonical map on the total spaces. -/
-def pullback.lift (f : B' → B) : total_space (f *ᵖ E) → total_space E :=
-λ z, total_space_mk (f z.proj) z.2
+@[simps { attrs := [`simp, `mfld_simps] }]
+def pullback.lift (f : B' → B) : total_space F (f *ᵖ E) → total_space F E :=
+λ z, ⟨f z.proj, z.2⟩
 
-@[simp] lemma pullback.proj_lift (f : B' → B) (x : total_space (f *ᵖ E)) :
-  (pullback.lift f x).proj = f x.1 :=
-rfl
-
-@[simp] lemma pullback.lift_mk (f : B' → B) (x : B') (y : E (f x)) :
-  pullback.lift f (total_space_mk x y) = total_space_mk (f x) y :=
-rfl
-
-lemma pullback_total_space_embedding_snd (f : B' → B) (x : total_space (f *ᵖ E)) :
-  (pullback_total_space_embedding f x).2 = pullback.lift f x :=
+@[simp, mfld_simps] lemma pullback.lift_mk (f : B' → B) (x : B') (y : E (f x)) :
+  pullback.lift f (total_space.mk' F x y) = ⟨f x, y⟩ :=
 rfl
 
 end pullback
 
 section fiber_structures
 
-variable [∀ x, add_comm_monoid (E x)]
-
-@[simp] lemma coe_snd_map_apply (x : B) (v w : E x) :
-  (↑(v + w) : total_space E).snd = (v : total_space E).snd + (w : total_space E).snd := rfl
+@[simp] lemma coe_snd_map_apply [∀ x, has_add (E x)] (x : B) (v w : E x) :
+  (↑(v + w) : total_space F E).snd = (v : total_space F E).snd + (w : total_space F E).snd := rfl
 
-variables (R : Type*) [semiring R] [∀ x, module R (E x)]
-
-@[simp] lemma coe_snd_map_smul (x : B) (r : R) (v : E x) :
-  (↑(r • v) : total_space E).snd = r • (v : total_space E).snd := rfl
+@[simp] lemma coe_snd_map_smul {R} [∀ x, has_smul R (E x)] (x : B) (r : R) (v : E x) :
+  (↑(r • v) : total_space F E).snd = r • (v : total_space F E).snd := rfl
 
 end fiber_structures
 
-section trivial_instances
-
-variables {F : Type*} {R : Type*} [semiring R] (b : B)
-
-instance [add_comm_monoid F] : add_comm_monoid (bundle.trivial B F b) := ‹add_comm_monoid F›
-instance [add_comm_group F] : add_comm_group (bundle.trivial B F b) := ‹add_comm_group F›
-instance [add_comm_monoid F] [module R F] : module R (bundle.trivial B F b) := ‹module R F›
-
-end trivial_instances
-
 end bundle

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(first ported)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -3,7 +3,7 @@ Copyright © 2021 Nicolò Cavalleri. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Nicolò Cavalleri
 -/
-import Mathbin.Algebra.Module.Basic
+import Algebra.Module.Basic
 
 #align_import data.bundle from "leanprover-community/mathlib"@"e473c3198bb41f68560cab68a0529c854b618833"
 
Diff
@@ -2,14 +2,11 @@
 Copyright © 2021 Nicolò Cavalleri. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Nicolò Cavalleri
-
-! This file was ported from Lean 3 source module data.bundle
-! leanprover-community/mathlib commit e473c3198bb41f68560cab68a0529c854b618833
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Algebra.Module.Basic
 
+#align_import data.bundle from "leanprover-community/mathlib"@"e473c3198bb41f68560cab68a0529c854b618833"
+
 /-!
 # Bundle
 
Diff
@@ -50,6 +50,7 @@ namespace Bundle
 
 variable {B F : Type _} (E : B → Type _)
 
+#print Bundle.TotalSpace /-
 /-- `bundle.total_space E` is the total space of the bundle. It consists of pairs
 `(proj : B, snd : E proj)`.
 -/
@@ -57,7 +58,8 @@ variable {B F : Type _} (E : B → Type _)
 structure TotalSpace (F : Type _) (E : B → Type _) where
   proj : B
   snd : E proj
-#align bundle.total_space Bundle.TotalSpaceₓ
+#align bundle.total_space Bundle.TotalSpace
+-/
 
 instance [Inhabited B] [Inhabited (E default)] : Inhabited (TotalSpace F E) :=
   ⟨⟨default, default⟩⟩
@@ -86,16 +88,16 @@ instance {x : B} : CoeTC (E x) (TotalSpace F E) :=
 @[simp]
 theorem TotalSpace.coe_proj (x : B) (v : E x) : (v : TotalSpace F E).proj = x :=
   rfl
-#align bundle.total_space.coe_proj Bundle.TotalSpaceₓ.coe_proj
+#align bundle.total_space.coe_proj Bundle.TotalSpace.coe_proj
 
 @[simp]
 theorem TotalSpace.coe_snd {x : B} {y : E x} : (y : TotalSpace F E).snd = y :=
   rfl
-#align bundle.total_space.coe_snd Bundle.TotalSpaceₓ.coe_snd
+#align bundle.total_space.coe_snd Bundle.TotalSpace.coe_snd
 
 theorem TotalSpace.coe_eq_mk {x : B} (v : E x) : (v : TotalSpace F E) = TotalSpace.mk x v :=
   rfl
-#align bundle.total_space.coe_eq_mk Bundle.TotalSpaceₓ.coe_eq_mk
+#align bundle.total_space.coe_eq_mk Bundle.TotalSpace.coe_eq_mk
 
 #print Bundle.TotalSpace.eta /-
 theorem TotalSpace.eta (z : TotalSpace F E) : TotalSpace.mk z.proj z.2 = z := by cases z <;> rfl
@@ -112,11 +114,14 @@ def Trivial (B : Type _) (F : Type _) : B → Type _ := fun _ => F
 #align bundle.trivial Bundle.Trivial
 -/
 
+#print Bundle.TotalSpace.trivialSnd /-
 /-- The trivial bundle, unlike other bundles, has a canonical projection on the fiber. -/
 def TotalSpace.trivialSnd (B : Type _) (F : Type _) : TotalSpace F (Bundle.Trivial B F) → F :=
   TotalSpace.snd
-#align bundle.total_space.trivial_snd Bundle.TotalSpaceₓ.trivialSnd
+#align bundle.total_space.trivial_snd Bundle.TotalSpace.trivialSnd
+-/
 
+#print Bundle.TotalSpace.toProd /-
 /-- A trivial bundle is equivalent to the product `B × F`. -/
 @[simps (config := { attrs := [`simp, `mfld_simps] })]
 def TotalSpace.toProd (B F : Type _) : (TotalSpace F fun _ : B => F) ≃ B × F
@@ -125,7 +130,8 @@ def TotalSpace.toProd (B F : Type _) : (TotalSpace F fun _ : B => F) ≃ B × F
   invFun x := ⟨x.1, x.2⟩
   left_inv := fun ⟨_, _⟩ => rfl
   right_inv := fun ⟨_, _⟩ => rfl
-#align bundle.total_space.to_prod Bundle.TotalSpaceₓ.toProd
+#align bundle.total_space.to_prod Bundle.TotalSpace.toProd
+-/
 
 section Pullback
 
@@ -170,21 +176,17 @@ end Pullback
 
 section FiberStructures
 
-#print Bundle.coe_snd_map_apply /-
 @[simp]
 theorem coe_snd_map_apply [∀ x, Add (E x)] (x : B) (v w : E x) :
     (↑(v + w) : TotalSpace F E).snd = (v : TotalSpace F E).snd + (w : TotalSpace F E).snd :=
   rfl
 #align bundle.coe_snd_map_apply Bundle.coe_snd_map_apply
--/
 
-#print Bundle.coe_snd_map_smul /-
 @[simp]
 theorem coe_snd_map_smul {R} [∀ x, SMul R (E x)] (x : B) (r : R) (v : E x) :
     (↑(r • v) : TotalSpace F E).snd = r • (v : TotalSpace F E).snd :=
   rfl
 #align bundle.coe_snd_map_smul Bundle.coe_snd_map_smul
--/
 
 end FiberStructures
 
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Nicolò Cavalleri
 
 ! This file was ported from Lean 3 source module data.bundle
-! leanprover-community/mathlib commit baba818b9acea366489e8ba32d2cc0fcaf50a1f7
+! leanprover-community/mathlib commit e473c3198bb41f68560cab68a0529c854b618833
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -20,15 +20,26 @@ should contain all possible results that do not involve any topology.
 
 We represent a bundle `E` over a base space `B` as a dependent type `E : B → Type*`.
 
-We provide a type synonym of `Σ x, E x` as `bundle.total_space E`, to be able to endow it with
-a topology which is not the disjoint union topology `sigma.topological_space`. In general, the
-constructions of fiber bundles we will make will be of this form.
+We define `bundle.total_space F E` to be the type of pairs `⟨b, x⟩`, where `b : B` and `x : E x`.
+This type is isomorphic to `Σ x, E x` and uses an extra argument `F` for reasons explained below. In
+general, the constructions of fiber bundles we will make will be of this form.
 
 ## Main Definitions
 
 * `bundle.total_space` the total space of a bundle.
 * `bundle.total_space.proj` the projection from the total space to the base space.
-* `bundle.total_space_mk` the constructor for the total space.
+* `bundle.total_space.mk` the constructor for the total space.
+
+## Implementation Notes
+
+- We use a custom structure for the total space of a bundle instead of using a type synonym for the
+  canonical disjoint union `Σ x, E x` because the total space usually has a different topology and
+  Lean 4 `simp` fails to apply lemmas about `Σ x, E x` to elements of the total space.
+
+- The definition of `bundle.total_space` has an unused argument `F`. The reason is that in some
+  constructions (e.g., `bundle.continuous_linear_map.vector_bundle`) we need access to the atlas of
+  trivializations of original fiber bundles to construct the topology on the total space of the new
+  fiber bundle.
 
 ## References
 - https://en.wikipedia.org/wiki/Bundle_(mathematics)
@@ -37,106 +48,84 @@ constructions of fiber bundles we will make will be of this form.
 
 namespace Bundle
 
-variable {B : Type _} (E : B → Type _)
+variable {B F : Type _} (E : B → Type _)
 
-#print Bundle.TotalSpace /-
-/-- `bundle.total_space E` is the total space of the bundle `Σ x, E x`.
-This type synonym is used to avoid conflicts with general sigma types.
--/
-def TotalSpace :=
-  Σ x, E x
-#align bundle.total_space Bundle.TotalSpace
+/-- `bundle.total_space E` is the total space of the bundle. It consists of pairs
+`(proj : B, snd : E proj)`.
 -/
+@[ext]
+structure TotalSpace (F : Type _) (E : B → Type _) where
+  proj : B
+  snd : E proj
+#align bundle.total_space Bundle.TotalSpaceₓ
 
-instance [Inhabited B] [Inhabited (E default)] : Inhabited (TotalSpace E) :=
+instance [Inhabited B] [Inhabited (E default)] : Inhabited (TotalSpace F E) :=
   ⟨⟨default, default⟩⟩
 
 variable {E}
 
-#print Bundle.TotalSpace.proj /-
 /-- `bundle.total_space.proj` is the canonical projection `bundle.total_space E → B` from the
 total space to the base space. -/
-@[simp, reducible]
-def TotalSpace.proj : TotalSpace E → B :=
-  Sigma.fst
-#align bundle.total_space.proj Bundle.TotalSpace.proj
--/
+add_decl_doc total_space.proj
 
 -- this notation won't be used in the pretty-printer
 scoped notation "π" => @Bundle.TotalSpace.proj _
 
-#print Bundle.totalSpaceMk /-
-/-- Constructor for the total space of a bundle. -/
-@[simp, reducible]
-def totalSpaceMk (b : B) (a : E b) : Bundle.TotalSpace E :=
-  ⟨b, a⟩
-#align bundle.total_space_mk Bundle.totalSpaceMk
--/
-
-#print Bundle.TotalSpace.proj_mk /-
-theorem TotalSpace.proj_mk {x : B} {y : E x} : (totalSpaceMk x y).proj = x :=
-  rfl
-#align bundle.total_space.proj_mk Bundle.TotalSpace.proj_mk
--/
-
-#print Bundle.sigma_mk_eq_totalSpaceMk /-
-theorem sigma_mk_eq_totalSpaceMk {x : B} {y : E x} : Sigma.mk x y = totalSpaceMk x y :=
-  rfl
-#align bundle.sigma_mk_eq_total_space_mk Bundle.sigma_mk_eq_totalSpaceMk
--/
+-- TODO: try `abbrev` in Lean 4
+scoped notation "total_space.mk'" F:arg => @Bundle.TotalSpace.mk _ F _
 
 #print Bundle.TotalSpace.mk_cast /-
 theorem TotalSpace.mk_cast {x x' : B} (h : x = x') (b : E x) :
-    totalSpaceMk x' (cast (congr_arg E h) b) = totalSpaceMk x b := by subst h; rfl
+    (total_space.mk' F) x' (cast (congr_arg E h) b) = TotalSpace.mk x b := by subst h; rfl
 #align bundle.total_space.mk_cast Bundle.TotalSpace.mk_cast
 -/
 
-#print Bundle.TotalSpace.eta /-
-theorem TotalSpace.eta (z : TotalSpace E) : totalSpaceMk z.proj z.2 = z :=
-  Sigma.eta z
-#align bundle.total_space.eta Bundle.TotalSpace.eta
--/
-
-instance {x : B} : CoeTC (E x) (TotalSpace E) :=
-  ⟨totalSpaceMk x⟩
+instance {x : B} : CoeTC (E x) (TotalSpace F E) :=
+  ⟨TotalSpace.mk x⟩
 
-#print Bundle.coe_fst /-
 @[simp]
-theorem coe_fst (x : B) (v : E x) : (v : TotalSpace E).fst = x :=
+theorem TotalSpace.coe_proj (x : B) (v : E x) : (v : TotalSpace F E).proj = x :=
   rfl
-#align bundle.coe_fst Bundle.coe_fst
--/
+#align bundle.total_space.coe_proj Bundle.TotalSpaceₓ.coe_proj
 
-#print Bundle.coe_snd /-
 @[simp]
-theorem coe_snd {x : B} {y : E x} : (y : TotalSpace E).snd = y :=
+theorem TotalSpace.coe_snd {x : B} {y : E x} : (y : TotalSpace F E).snd = y :=
   rfl
-#align bundle.coe_snd Bundle.coe_snd
--/
+#align bundle.total_space.coe_snd Bundle.TotalSpaceₓ.coe_snd
 
-theorem to_totalSpace_coe {x : B} (v : E x) : (v : TotalSpace E) = totalSpaceMk x v :=
+theorem TotalSpace.coe_eq_mk {x : B} (v : E x) : (v : TotalSpace F E) = TotalSpace.mk x v :=
   rfl
-#align bundle.to_total_space_coe Bundle.to_totalSpace_coe
+#align bundle.total_space.coe_eq_mk Bundle.TotalSpaceₓ.coe_eq_mk
+
+#print Bundle.TotalSpace.eta /-
+theorem TotalSpace.eta (z : TotalSpace F E) : TotalSpace.mk z.proj z.2 = z := by cases z <;> rfl
+#align bundle.total_space.eta Bundle.TotalSpace.eta
+-/
 
 notation:100 -- notation for the direct sum of two bundles over the same base
 E₁ " ×ᵇ " E₂ => fun x => E₁ x × E₂ x
 
 #print Bundle.Trivial /-
 /-- `bundle.trivial B F` is the trivial bundle over `B` of fiber `F`. -/
-def Trivial (B : Type _) (F : Type _) : B → Type _ :=
-  Function.const B F
+@[reducible, nolint unused_arguments]
+def Trivial (B : Type _) (F : Type _) : B → Type _ := fun _ => F
 #align bundle.trivial Bundle.Trivial
 -/
 
-instance {F : Type _} [Inhabited F] {b : B} : Inhabited (Bundle.Trivial B F b) :=
-  ⟨(default : F)⟩
-
-#print Bundle.Trivial.projSnd /-
 /-- The trivial bundle, unlike other bundles, has a canonical projection on the fiber. -/
-def Trivial.projSnd (B : Type _) (F : Type _) : TotalSpace (Bundle.Trivial B F) → F :=
-  Sigma.snd
-#align bundle.trivial.proj_snd Bundle.Trivial.projSnd
--/
+def TotalSpace.trivialSnd (B : Type _) (F : Type _) : TotalSpace F (Bundle.Trivial B F) → F :=
+  TotalSpace.snd
+#align bundle.total_space.trivial_snd Bundle.TotalSpaceₓ.trivialSnd
+
+/-- A trivial bundle is equivalent to the product `B × F`. -/
+@[simps (config := { attrs := [`simp, `mfld_simps] })]
+def TotalSpace.toProd (B F : Type _) : (TotalSpace F fun _ : B => F) ≃ B × F
+    where
+  toFun x := (x.1, x.2)
+  invFun x := ⟨x.1, x.2⟩
+  left_inv := fun ⟨_, _⟩ => rfl
+  right_inv := fun ⟨_, _⟩ => rfl
+#align bundle.total_space.to_prod Bundle.TotalSpaceₓ.toProd
 
 section Pullback
 
@@ -145,91 +134,59 @@ variable {B' : Type _}
 #print Bundle.Pullback /-
 /-- The pullback of a bundle `E` over a base `B` under a map `f : B' → B`, denoted by `pullback f E`
 or `f *ᵖ E`,  is the bundle over `B'` whose fiber over `b'` is `E (f b')`. -/
-@[nolint has_nonempty_instance]
-def Pullback (f : B' → B) (E : B → Type _) := fun x => E (f x)
+def Pullback (f : B' → B) (E : B → Type _) : B' → Type _ := fun x => E (f x)
 #align bundle.pullback Bundle.Pullback
 -/
 
-notation f " *ᵖ " E => Pullback f E
+notation f " *ᵖ " E:arg => Pullback f E
+
+instance {f : B' → B} {x : B'} [Nonempty (E (f x))] : Nonempty ((f *ᵖ E) x) :=
+  ‹Nonempty (E (f x))›
 
 #print Bundle.pullbackTotalSpaceEmbedding /-
 /-- Natural embedding of the total space of `f *ᵖ E` into `B' × total_space E`. -/
 @[simp]
-def pullbackTotalSpaceEmbedding (f : B' → B) : TotalSpace (f *ᵖ E) → B' × TotalSpace E := fun z =>
-  (z.proj, totalSpaceMk (f z.proj) z.2)
+def pullbackTotalSpaceEmbedding (f : B' → B) : TotalSpace F (f *ᵖ E) → B' × TotalSpace F E :=
+  fun z => (z.proj, TotalSpace.mk (f z.proj) z.2)
 #align bundle.pullback_total_space_embedding Bundle.pullbackTotalSpaceEmbedding
 -/
 
 #print Bundle.Pullback.lift /-
 /-- The base map `f : B' → B` lifts to a canonical map on the total spaces. -/
-def Pullback.lift (f : B' → B) : TotalSpace (f *ᵖ E) → TotalSpace E := fun z =>
-  totalSpaceMk (f z.proj) z.2
+@[simps (config := { attrs := [`simp, `mfld_simps] })]
+def Pullback.lift (f : B' → B) : TotalSpace F (f *ᵖ E) → TotalSpace F E := fun z => ⟨f z.proj, z.2⟩
 #align bundle.pullback.lift Bundle.Pullback.lift
 -/
 
-#print Bundle.Pullback.proj_lift /-
-@[simp]
-theorem Pullback.proj_lift (f : B' → B) (x : TotalSpace (f *ᵖ E)) :
-    (Pullback.lift f x).proj = f x.1 :=
-  rfl
-#align bundle.pullback.proj_lift Bundle.Pullback.proj_lift
--/
-
 #print Bundle.Pullback.lift_mk /-
-@[simp]
+@[simp, mfld_simps]
 theorem Pullback.lift_mk (f : B' → B) (x : B') (y : E (f x)) :
-    Pullback.lift f (totalSpaceMk x y) = totalSpaceMk (f x) y :=
+    Pullback.lift f ((total_space.mk' F) x y) = ⟨f x, y⟩ :=
   rfl
 #align bundle.pullback.lift_mk Bundle.Pullback.lift_mk
 -/
 
-#print Bundle.pullbackTotalSpaceEmbedding_snd /-
-theorem pullbackTotalSpaceEmbedding_snd (f : B' → B) (x : TotalSpace (f *ᵖ E)) :
-    (pullbackTotalSpaceEmbedding f x).2 = Pullback.lift f x :=
-  rfl
-#align bundle.pullback_total_space_embedding_snd Bundle.pullbackTotalSpaceEmbedding_snd
--/
-
 end Pullback
 
 section FiberStructures
 
-variable [∀ x, AddCommMonoid (E x)]
-
 #print Bundle.coe_snd_map_apply /-
 @[simp]
-theorem coe_snd_map_apply (x : B) (v w : E x) :
-    (↑(v + w) : TotalSpace E).snd = (v : TotalSpace E).snd + (w : TotalSpace E).snd :=
+theorem coe_snd_map_apply [∀ x, Add (E x)] (x : B) (v w : E x) :
+    (↑(v + w) : TotalSpace F E).snd = (v : TotalSpace F E).snd + (w : TotalSpace F E).snd :=
   rfl
 #align bundle.coe_snd_map_apply Bundle.coe_snd_map_apply
 -/
 
-variable (R : Type _) [Semiring R] [∀ x, Module R (E x)]
-
 #print Bundle.coe_snd_map_smul /-
 @[simp]
-theorem coe_snd_map_smul (x : B) (r : R) (v : E x) :
-    (↑(r • v) : TotalSpace E).snd = r • (v : TotalSpace E).snd :=
+theorem coe_snd_map_smul {R} [∀ x, SMul R (E x)] (x : B) (r : R) (v : E x) :
+    (↑(r • v) : TotalSpace F E).snd = r • (v : TotalSpace F E).snd :=
   rfl
 #align bundle.coe_snd_map_smul Bundle.coe_snd_map_smul
 -/
 
 end FiberStructures
 
-section TrivialInstances
-
-variable {F : Type _} {R : Type _} [Semiring R] (b : B)
-
-instance [AddCommMonoid F] : AddCommMonoid (Bundle.Trivial B F b) :=
-  ‹AddCommMonoid F›
-
-instance [AddCommGroup F] : AddCommGroup (Bundle.Trivial B F b) :=
-  ‹AddCommGroup F›
-
-instance [AddCommMonoid F] [Module R F] : Module R (Bundle.Trivial B F b) :=
-  ‹Module R F›
-
-end TrivialInstances
-
 end Bundle
 
Diff
@@ -62,7 +62,6 @@ def TotalSpace.proj : TotalSpace E → B :=
 #align bundle.total_space.proj Bundle.TotalSpace.proj
 -/
 
--- mathport name: exprπ
 -- this notation won't be used in the pretty-printer
 scoped notation "π" => @Bundle.TotalSpace.proj _
 
@@ -74,29 +73,39 @@ def totalSpaceMk (b : B) (a : E b) : Bundle.TotalSpace E :=
 #align bundle.total_space_mk Bundle.totalSpaceMk
 -/
 
+#print Bundle.TotalSpace.proj_mk /-
 theorem TotalSpace.proj_mk {x : B} {y : E x} : (totalSpaceMk x y).proj = x :=
   rfl
 #align bundle.total_space.proj_mk Bundle.TotalSpace.proj_mk
+-/
 
+#print Bundle.sigma_mk_eq_totalSpaceMk /-
 theorem sigma_mk_eq_totalSpaceMk {x : B} {y : E x} : Sigma.mk x y = totalSpaceMk x y :=
   rfl
 #align bundle.sigma_mk_eq_total_space_mk Bundle.sigma_mk_eq_totalSpaceMk
+-/
 
+#print Bundle.TotalSpace.mk_cast /-
 theorem TotalSpace.mk_cast {x x' : B} (h : x = x') (b : E x) :
     totalSpaceMk x' (cast (congr_arg E h) b) = totalSpaceMk x b := by subst h; rfl
 #align bundle.total_space.mk_cast Bundle.TotalSpace.mk_cast
+-/
 
+#print Bundle.TotalSpace.eta /-
 theorem TotalSpace.eta (z : TotalSpace E) : totalSpaceMk z.proj z.2 = z :=
   Sigma.eta z
 #align bundle.total_space.eta Bundle.TotalSpace.eta
+-/
 
 instance {x : B} : CoeTC (E x) (TotalSpace E) :=
   ⟨totalSpaceMk x⟩
 
+#print Bundle.coe_fst /-
 @[simp]
 theorem coe_fst (x : B) (v : E x) : (v : TotalSpace E).fst = x :=
   rfl
 #align bundle.coe_fst Bundle.coe_fst
+-/
 
 #print Bundle.coe_snd /-
 @[simp]
@@ -109,7 +118,6 @@ theorem to_totalSpace_coe {x : B} (v : E x) : (v : TotalSpace E) = totalSpaceMk
   rfl
 #align bundle.to_total_space_coe Bundle.to_totalSpace_coe
 
--- mathport name: «expr ×ᵇ »
 notation:100 -- notation for the direct sum of two bundles over the same base
 E₁ " ×ᵇ " E₂ => fun x => E₁ x × E₂ x
 
@@ -142,7 +150,6 @@ def Pullback (f : B' → B) (E : B → Type _) := fun x => E (f x)
 #align bundle.pullback Bundle.Pullback
 -/
 
--- mathport name: «expr *ᵖ »
 notation f " *ᵖ " E => Pullback f E
 
 #print Bundle.pullbackTotalSpaceEmbedding /-
@@ -168,11 +175,13 @@ theorem Pullback.proj_lift (f : B' → B) (x : TotalSpace (f *ᵖ E)) :
 #align bundle.pullback.proj_lift Bundle.Pullback.proj_lift
 -/
 
+#print Bundle.Pullback.lift_mk /-
 @[simp]
 theorem Pullback.lift_mk (f : B' → B) (x : B') (y : E (f x)) :
     Pullback.lift f (totalSpaceMk x y) = totalSpaceMk (f x) y :=
   rfl
 #align bundle.pullback.lift_mk Bundle.Pullback.lift_mk
+-/
 
 #print Bundle.pullbackTotalSpaceEmbedding_snd /-
 theorem pullbackTotalSpaceEmbedding_snd (f : B' → B) (x : TotalSpace (f *ᵖ E)) :
@@ -187,19 +196,23 @@ section FiberStructures
 
 variable [∀ x, AddCommMonoid (E x)]
 
+#print Bundle.coe_snd_map_apply /-
 @[simp]
 theorem coe_snd_map_apply (x : B) (v w : E x) :
     (↑(v + w) : TotalSpace E).snd = (v : TotalSpace E).snd + (w : TotalSpace E).snd :=
   rfl
 #align bundle.coe_snd_map_apply Bundle.coe_snd_map_apply
+-/
 
 variable (R : Type _) [Semiring R] [∀ x, Module R (E x)]
 
+#print Bundle.coe_snd_map_smul /-
 @[simp]
 theorem coe_snd_map_smul (x : B) (r : R) (v : E x) :
     (↑(r • v) : TotalSpace E).snd = r • (v : TotalSpace E).snd :=
   rfl
 #align bundle.coe_snd_map_smul Bundle.coe_snd_map_smul
+-/
 
 end FiberStructures
 
Diff
@@ -44,7 +44,7 @@ variable {B : Type _} (E : B → Type _)
 This type synonym is used to avoid conflicts with general sigma types.
 -/
 def TotalSpace :=
-  Σx, E x
+  Σ x, E x
 #align bundle.total_space Bundle.TotalSpace
 -/
 
Diff
@@ -105,11 +105,9 @@ theorem coe_snd {x : B} {y : E x} : (y : TotalSpace E).snd = y :=
 #align bundle.coe_snd Bundle.coe_snd
 -/
 
-/- warning: bundle.to_total_space_coe clashes with [anonymous] -> [anonymous]
-Case conversion may be inaccurate. Consider using '#align bundle.to_total_space_coe [anonymous]ₓ'. -/
-theorem [anonymous] {x : B} (v : E x) : (v : TotalSpace E) = totalSpaceMk x v :=
+theorem to_totalSpace_coe {x : B} (v : E x) : (v : TotalSpace E) = totalSpaceMk x v :=
   rfl
-#align bundle.to_total_space_coe [anonymous]
+#align bundle.to_total_space_coe Bundle.to_totalSpace_coe
 
 -- mathport name: «expr ×ᵇ »
 notation:100 -- notation for the direct sum of two bundles over the same base
Diff
@@ -74,42 +74,18 @@ def totalSpaceMk (b : B) (a : E b) : Bundle.TotalSpace E :=
 #align bundle.total_space_mk Bundle.totalSpaceMk
 -/
 
-/- warning: bundle.total_space.proj_mk -> Bundle.TotalSpace.proj_mk is a dubious translation:
-lean 3 declaration is
-  forall {B : Type.{u1}} {E : B -> Type.{u2}} {x : B} {y : E x}, Eq.{succ u1} B (Bundle.TotalSpace.proj.{u1, u2} B (fun {x : B} => E x) (Bundle.totalSpaceMk.{u1, u2} B (fun {x : B} => E x) x y)) x
-but is expected to have type
-  forall {B : Type.{u2}} {E : B -> Type.{u1}} {x : B} {y : E x}, Eq.{succ u2} B (Bundle.TotalSpace.proj.{u2, u1} B E (Bundle.totalSpaceMk.{u2, u1} B E x y)) x
-Case conversion may be inaccurate. Consider using '#align bundle.total_space.proj_mk Bundle.TotalSpace.proj_mkₓ'. -/
 theorem TotalSpace.proj_mk {x : B} {y : E x} : (totalSpaceMk x y).proj = x :=
   rfl
 #align bundle.total_space.proj_mk Bundle.TotalSpace.proj_mk
 
-/- warning: bundle.sigma_mk_eq_total_space_mk -> Bundle.sigma_mk_eq_totalSpaceMk is a dubious translation:
-lean 3 declaration is
-  forall {B : Type.{u1}} {E : B -> Type.{u2}} {x : B} {y : E x}, Eq.{max (succ u1) (succ u2)} (Sigma.{u1, u2} B (fun {x : B} => E x)) (Sigma.mk.{u1, u2} B (fun {x : B} => E x) x y) (Bundle.totalSpaceMk.{u1, u2} B (fun (x : B) => E x) x y)
-but is expected to have type
-  forall {B : Type.{u2}} {E : B -> Type.{u1}} {x : B} {y : E x}, Eq.{max (succ u2) (succ u1)} (Sigma.{u2, u1} B E) (Sigma.mk.{u2, u1} B E x y) (Bundle.totalSpaceMk.{u2, u1} B E x y)
-Case conversion may be inaccurate. Consider using '#align bundle.sigma_mk_eq_total_space_mk Bundle.sigma_mk_eq_totalSpaceMkₓ'. -/
 theorem sigma_mk_eq_totalSpaceMk {x : B} {y : E x} : Sigma.mk x y = totalSpaceMk x y :=
   rfl
 #align bundle.sigma_mk_eq_total_space_mk Bundle.sigma_mk_eq_totalSpaceMk
 
-/- warning: bundle.total_space.mk_cast -> Bundle.TotalSpace.mk_cast is a dubious translation:
-lean 3 declaration is
-  forall {B : Type.{u1}} {E : B -> Type.{u2}} {x : B} {x' : B} (h : Eq.{succ u1} B x x') (b : E x), Eq.{max (succ u1) (succ u2)} (Bundle.TotalSpace.{u1, u2} B E) (Bundle.totalSpaceMk.{u1, u2} B E x' (cast.{succ u2} (E x) (E x') (congr_arg.{succ u1, succ (succ u2)} B Type.{u2} x x' E h) b)) (Bundle.totalSpaceMk.{u1, u2} B E x b)
-but is expected to have type
-  forall {B : Type.{u2}} {E : B -> Type.{u1}} {x : B} {x' : B} (h : Eq.{succ u2} B x x') (b : E x), Eq.{max (succ u2) (succ u1)} (Bundle.TotalSpace.{u2, u1} B E) (Bundle.totalSpaceMk.{u2, u1} B E x' (cast.{succ u1} (E x) (E x') (congr_arg.{succ u2, succ (succ u1)} B Type.{u1} x x' E h) b)) (Bundle.totalSpaceMk.{u2, u1} B E x b)
-Case conversion may be inaccurate. Consider using '#align bundle.total_space.mk_cast Bundle.TotalSpace.mk_castₓ'. -/
 theorem TotalSpace.mk_cast {x x' : B} (h : x = x') (b : E x) :
     totalSpaceMk x' (cast (congr_arg E h) b) = totalSpaceMk x b := by subst h; rfl
 #align bundle.total_space.mk_cast Bundle.TotalSpace.mk_cast
 
-/- warning: bundle.total_space.eta -> Bundle.TotalSpace.eta is a dubious translation:
-lean 3 declaration is
-  forall {B : Type.{u1}} {E : B -> Type.{u2}} (z : Bundle.TotalSpace.{u1, u2} B E), Eq.{max (succ u1) (succ u2)} (Bundle.TotalSpace.{u1, u2} B E) (Bundle.totalSpaceMk.{u1, u2} B E (Bundle.TotalSpace.proj.{u1, u2} B E z) (Sigma.snd.{u1, u2} B (fun (x : B) => E x) z)) z
-but is expected to have type
-  forall {B : Type.{u2}} {E : B -> Type.{u1}} (z : Bundle.TotalSpace.{u2, u1} B E), Eq.{max (succ u2) (succ u1)} (Bundle.TotalSpace.{u2, u1} B E) (Bundle.totalSpaceMk.{u2, u1} B E (Bundle.TotalSpace.proj.{u2, u1} B E z) (Sigma.snd.{u2, u1} B (fun (x : B) => E x) z)) z
-Case conversion may be inaccurate. Consider using '#align bundle.total_space.eta Bundle.TotalSpace.etaₓ'. -/
 theorem TotalSpace.eta (z : TotalSpace E) : totalSpaceMk z.proj z.2 = z :=
   Sigma.eta z
 #align bundle.total_space.eta Bundle.TotalSpace.eta
@@ -117,12 +93,6 @@ theorem TotalSpace.eta (z : TotalSpace E) : totalSpaceMk z.proj z.2 = z :=
 instance {x : B} : CoeTC (E x) (TotalSpace E) :=
   ⟨totalSpaceMk x⟩
 
-/- warning: bundle.coe_fst -> Bundle.coe_fst is a dubious translation:
-lean 3 declaration is
-  forall {B : Type.{u1}} {E : B -> Type.{u2}} (x : B) (v : E x), Eq.{succ u1} B (Sigma.fst.{u1, u2} B (fun (x : B) => E x) ((fun (a : Type.{u2}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{succ u2, max (succ u1) (succ u2)} a b] => self.0) (E x) (Bundle.TotalSpace.{u1, u2} B E) (HasLiftT.mk.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (CoeTCₓ.coe.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (Bundle.TotalSpace.hasCoeT.{u1, u2} B E x))) v)) x
-but is expected to have type
-  forall {B : Type.{u2}} {E : B -> Type.{u1}} (x : B) (v : E x), Eq.{succ u2} B (Sigma.fst.{u2, u1} B (fun (x : B) => E x) (Bundle.totalSpaceMk.{u2, u1} B E x v)) x
-Case conversion may be inaccurate. Consider using '#align bundle.coe_fst Bundle.coe_fstₓ'. -/
 @[simp]
 theorem coe_fst (x : B) (v : E x) : (v : TotalSpace E).fst = x :=
   rfl
@@ -136,11 +106,6 @@ theorem coe_snd {x : B} {y : E x} : (y : TotalSpace E).snd = y :=
 -/
 
 /- warning: bundle.to_total_space_coe clashes with [anonymous] -> [anonymous]
-warning: bundle.to_total_space_coe -> [anonymous] is a dubious translation:
-lean 3 declaration is
-  forall {B : Type.{u1}} {E : B -> Type.{u2}} {x : B} (v : E x), Eq.{max (succ u1) (succ u2)} (Bundle.TotalSpace.{u1, u2} B E) ((fun (a : Type.{u2}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{succ u2, max (succ u1) (succ u2)} a b] => self.0) (E x) (Bundle.TotalSpace.{u1, u2} B E) (HasLiftT.mk.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (CoeTCₓ.coe.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (Bundle.TotalSpace.hasCoeT.{u1, u2} B E x))) v) (Bundle.totalSpaceMk.{u1, u2} B E x v)
-but is expected to have type
-  forall {B : Type.{u1}} {E : Type.{u2}}, (Nat -> B -> E) -> Nat -> (List.{u1} B) -> (List.{u2} E)
 Case conversion may be inaccurate. Consider using '#align bundle.to_total_space_coe [anonymous]ₓ'. -/
 theorem [anonymous] {x : B} (v : E x) : (v : TotalSpace E) = totalSpaceMk x v :=
   rfl
@@ -205,12 +170,6 @@ theorem Pullback.proj_lift (f : B' → B) (x : TotalSpace (f *ᵖ E)) :
 #align bundle.pullback.proj_lift Bundle.Pullback.proj_lift
 -/
 
-/- warning: bundle.pullback.lift_mk -> Bundle.Pullback.lift_mk is a dubious translation:
-lean 3 declaration is
-  forall {B : Type.{u1}} {E : B -> Type.{u2}} {B' : Type.{u3}} (f : B' -> B) (x : B') (y : E (f x)), Eq.{max (succ u1) (succ u2)} (Bundle.TotalSpace.{u1, u2} B E) (Bundle.Pullback.lift.{u1, u2, u3} B E B' f (Bundle.totalSpaceMk.{u3, u2} B' (Bundle.Pullback.{u1, u3, u2} B B' f E) x y)) (Bundle.totalSpaceMk.{u1, u2} B E (f x) y)
-but is expected to have type
-  forall {B : Type.{u3}} {E : B -> Type.{u2}} {B' : Type.{u1}} (f : B' -> B) (x : B') (y : E (f x)), Eq.{max (succ u3) (succ u2)} (Bundle.TotalSpace.{u3, u2} B E) (Bundle.Pullback.lift.{u3, u2, u1} B E B' f (Bundle.totalSpaceMk.{u1, u2} B' (Bundle.Pullback.{u3, u1, u2} B B' f E) x y)) (Bundle.totalSpaceMk.{u3, u2} B E (f x) y)
-Case conversion may be inaccurate. Consider using '#align bundle.pullback.lift_mk Bundle.Pullback.lift_mkₓ'. -/
 @[simp]
 theorem Pullback.lift_mk (f : B' → B) (x : B') (y : E (f x)) :
     Pullback.lift f (totalSpaceMk x y) = totalSpaceMk (f x) y :=
@@ -230,12 +189,6 @@ section FiberStructures
 
 variable [∀ x, AddCommMonoid (E x)]
 
-/- warning: bundle.coe_snd_map_apply -> Bundle.coe_snd_map_apply is a dubious translation:
-lean 3 declaration is
-  forall {B : Type.{u1}} {E : B -> Type.{u2}} [_inst_1 : forall (x : B), AddCommMonoid.{u2} (E x)] (x : B) (v : E x) (w : E x), Eq.{succ u2} (E (Sigma.fst.{u1, u2} B (fun (x : B) => E x) ((fun (a : Type.{u2}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{succ u2, max (succ u1) (succ u2)} a b] => self.0) (E x) (Bundle.TotalSpace.{u1, u2} B E) (HasLiftT.mk.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (CoeTCₓ.coe.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (Bundle.TotalSpace.hasCoeT.{u1, u2} B E x))) (HAdd.hAdd.{u2, u2, u2} (E x) (E x) (E x) (instHAdd.{u2} (E x) (AddZeroClass.toHasAdd.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x))))) v w)))) (Sigma.snd.{u1, u2} B (fun (x : B) => E x) ((fun (a : Type.{u2}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{succ u2, max (succ u1) (succ u2)} a b] => self.0) (E x) (Bundle.TotalSpace.{u1, u2} B E) (HasLiftT.mk.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (CoeTCₓ.coe.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (Bundle.TotalSpace.hasCoeT.{u1, u2} B E x))) (HAdd.hAdd.{u2, u2, u2} (E x) (E x) (E x) (instHAdd.{u2} (E x) (AddZeroClass.toHasAdd.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x))))) v w))) (HAdd.hAdd.{u2, u2, u2} (E (Sigma.fst.{u1, u2} B (fun (x : B) => E x) ((fun (a : Type.{u2}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{succ u2, max (succ u1) (succ u2)} a b] => self.0) (E x) (Bundle.TotalSpace.{u1, u2} B E) (HasLiftT.mk.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (CoeTCₓ.coe.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (Bundle.TotalSpace.hasCoeT.{u1, u2} B E x))) (HAdd.hAdd.{u2, u2, u2} (E x) (E x) (E x) (instHAdd.{u2} (E x) (AddZeroClass.toHasAdd.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x))))) v w)))) (E (Sigma.fst.{u1, u2} B (fun (x : B) => E x) ((fun (a : Type.{u2}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{succ u2, max (succ u1) (succ u2)} a b] => self.0) (E x) (Bundle.TotalSpace.{u1, u2} B E) (HasLiftT.mk.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (CoeTCₓ.coe.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (Bundle.TotalSpace.hasCoeT.{u1, u2} B E x))) (HAdd.hAdd.{u2, u2, u2} (E x) (E x) (E x) (instHAdd.{u2} (E x) (AddZeroClass.toHasAdd.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x))))) v w)))) (E (Sigma.fst.{u1, u2} B (fun (x : B) => E x) ((fun (a : Type.{u2}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{succ u2, max (succ u1) (succ u2)} a b] => self.0) (E x) (Bundle.TotalSpace.{u1, u2} B E) (HasLiftT.mk.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (CoeTCₓ.coe.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (Bundle.TotalSpace.hasCoeT.{u1, u2} B E x))) (HAdd.hAdd.{u2, u2, u2} (E x) (E x) (E x) (instHAdd.{u2} (E x) (AddZeroClass.toHasAdd.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x))))) v w)))) (instHAdd.{u2} (E (Sigma.fst.{u1, u2} B (fun (x : B) => E x) ((fun (a : Type.{u2}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{succ u2, max (succ u1) (succ u2)} a b] => self.0) (E x) (Bundle.TotalSpace.{u1, u2} B E) (HasLiftT.mk.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (CoeTCₓ.coe.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (Bundle.TotalSpace.hasCoeT.{u1, u2} B E x))) (HAdd.hAdd.{u2, u2, u2} (E x) (E x) (E x) (instHAdd.{u2} (E x) (AddZeroClass.toHasAdd.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x))))) v w)))) (AddZeroClass.toHasAdd.{u2} (E (Sigma.fst.{u1, u2} B (fun (x : B) => E x) ((fun (a : Type.{u2}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{succ u2, max (succ u1) (succ u2)} a b] => self.0) (E x) (Bundle.TotalSpace.{u1, u2} B E) (HasLiftT.mk.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (CoeTCₓ.coe.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (Bundle.TotalSpace.hasCoeT.{u1, u2} B E x))) (HAdd.hAdd.{u2, u2, u2} (E x) (E x) (E x) (instHAdd.{u2} (E x) (AddZeroClass.toHasAdd.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x))))) v w)))) (AddMonoid.toAddZeroClass.{u2} (E (Sigma.fst.{u1, u2} B (fun (x : B) => E x) ((fun (a : Type.{u2}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{succ u2, max (succ u1) (succ u2)} a b] => self.0) (E x) (Bundle.TotalSpace.{u1, u2} B E) (HasLiftT.mk.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (CoeTCₓ.coe.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (Bundle.TotalSpace.hasCoeT.{u1, u2} B E x))) (HAdd.hAdd.{u2, u2, u2} (E x) (E x) (E x) (instHAdd.{u2} (E x) (AddZeroClass.toHasAdd.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x))))) v w)))) (AddCommMonoid.toAddMonoid.{u2} (E (Sigma.fst.{u1, u2} B (fun (x : B) => E x) ((fun (a : Type.{u2}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{succ u2, max (succ u1) (succ u2)} a b] => self.0) (E x) (Bundle.TotalSpace.{u1, u2} B E) (HasLiftT.mk.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (CoeTCₓ.coe.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (Bundle.TotalSpace.hasCoeT.{u1, u2} B E x))) (HAdd.hAdd.{u2, u2, u2} (E x) (E x) (E x) (instHAdd.{u2} (E x) (AddZeroClass.toHasAdd.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x))))) v w)))) (_inst_1 (Sigma.fst.{u1, u2} B (fun (x : B) => E x) ((fun (a : Type.{u2}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{succ u2, max (succ u1) (succ u2)} a b] => self.0) (E x) (Bundle.TotalSpace.{u1, u2} B E) (HasLiftT.mk.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (CoeTCₓ.coe.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (Bundle.TotalSpace.hasCoeT.{u1, u2} B E x))) (HAdd.hAdd.{u2, u2, u2} (E x) (E x) (E x) (instHAdd.{u2} (E x) (AddZeroClass.toHasAdd.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x))))) v w)))))))) (Sigma.snd.{u1, u2} B (fun (x : B) => E x) ((fun (a : Type.{u2}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{succ u2, max (succ u1) (succ u2)} a b] => self.0) (E x) (Bundle.TotalSpace.{u1, u2} B E) (HasLiftT.mk.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (CoeTCₓ.coe.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (Bundle.TotalSpace.hasCoeT.{u1, u2} B E x))) v)) (Sigma.snd.{u1, u2} B (fun (x : B) => E x) ((fun (a : Type.{u2}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{succ u2, max (succ u1) (succ u2)} a b] => self.0) (E x) (Bundle.TotalSpace.{u1, u2} B E) (HasLiftT.mk.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (CoeTCₓ.coe.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (Bundle.TotalSpace.hasCoeT.{u1, u2} B E x))) w)))
-but is expected to have type
-  forall {B : Type.{u1}} {E : B -> Type.{u2}} [_inst_1 : forall (x : B), AddCommMonoid.{u2} (E x)] (x : B) (v : E x) (w : E x), Eq.{succ u2} (E (Sigma.fst.{u1, u2} B (fun (x : B) => E x) (Bundle.totalSpaceMk.{u1, u2} B E x (HAdd.hAdd.{u2, u2, u2} (E x) (E x) (E x) (instHAdd.{u2} (E x) (AddZeroClass.toAdd.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x))))) v w)))) (Sigma.snd.{u1, u2} B (fun (x : B) => E x) (Bundle.totalSpaceMk.{u1, u2} B E x (HAdd.hAdd.{u2, u2, u2} (E x) (E x) (E x) (instHAdd.{u2} (E x) (AddZeroClass.toAdd.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x))))) v w))) (HAdd.hAdd.{u2, u2, u2} (E (Sigma.fst.{u1, u2} B (fun (x : B) => E x) (Bundle.totalSpaceMk.{u1, u2} B E x v))) (E (Sigma.fst.{u1, u2} B (fun (x : B) => E x) (Bundle.totalSpaceMk.{u1, u2} B E x w))) (E (Sigma.fst.{u1, u2} B (fun (x : B) => E x) (Bundle.totalSpaceMk.{u1, u2} B E x v))) (instHAdd.{u2} (E (Sigma.fst.{u1, u2} B (fun (x : B) => E x) (Bundle.totalSpaceMk.{u1, u2} B E x v))) (AddZeroClass.toAdd.{u2} (E (Sigma.fst.{u1, u2} B (fun (x : B) => E x) (Bundle.totalSpaceMk.{u1, u2} B E x v))) (AddMonoid.toAddZeroClass.{u2} (E (Sigma.fst.{u1, u2} B (fun (x : B) => E x) (Bundle.totalSpaceMk.{u1, u2} B E x v))) (AddCommMonoid.toAddMonoid.{u2} (E (Sigma.fst.{u1, u2} B (fun (x : B) => E x) (Bundle.totalSpaceMk.{u1, u2} B E x v))) (_inst_1 (Sigma.fst.{u1, u2} B (fun (x : B) => E x) (Bundle.totalSpaceMk.{u1, u2} B E x v))))))) (Sigma.snd.{u1, u2} B (fun (x : B) => E x) (Bundle.totalSpaceMk.{u1, u2} B E x v)) (Sigma.snd.{u1, u2} B (fun (x : B) => E x) (Bundle.totalSpaceMk.{u1, u2} B E x w)))
-Case conversion may be inaccurate. Consider using '#align bundle.coe_snd_map_apply Bundle.coe_snd_map_applyₓ'. -/
 @[simp]
 theorem coe_snd_map_apply (x : B) (v w : E x) :
     (↑(v + w) : TotalSpace E).snd = (v : TotalSpace E).snd + (w : TotalSpace E).snd :=
@@ -244,9 +197,6 @@ theorem coe_snd_map_apply (x : B) (v w : E x) :
 
 variable (R : Type _) [Semiring R] [∀ x, Module R (E x)]
 
-/- warning: bundle.coe_snd_map_smul -> Bundle.coe_snd_map_smul is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align bundle.coe_snd_map_smul Bundle.coe_snd_map_smulₓ'. -/
 @[simp]
 theorem coe_snd_map_smul (x : B) (r : R) (v : E x) :
     (↑(r • v) : TotalSpace E).snd = r • (v : TotalSpace E).snd :=
Diff
@@ -101,10 +101,7 @@ but is expected to have type
   forall {B : Type.{u2}} {E : B -> Type.{u1}} {x : B} {x' : B} (h : Eq.{succ u2} B x x') (b : E x), Eq.{max (succ u2) (succ u1)} (Bundle.TotalSpace.{u2, u1} B E) (Bundle.totalSpaceMk.{u2, u1} B E x' (cast.{succ u1} (E x) (E x') (congr_arg.{succ u2, succ (succ u1)} B Type.{u1} x x' E h) b)) (Bundle.totalSpaceMk.{u2, u1} B E x b)
 Case conversion may be inaccurate. Consider using '#align bundle.total_space.mk_cast Bundle.TotalSpace.mk_castₓ'. -/
 theorem TotalSpace.mk_cast {x x' : B} (h : x = x') (b : E x) :
-    totalSpaceMk x' (cast (congr_arg E h) b) = totalSpaceMk x b :=
-  by
-  subst h
-  rfl
+    totalSpaceMk x' (cast (congr_arg E h) b) = totalSpaceMk x b := by subst h; rfl
 #align bundle.total_space.mk_cast Bundle.TotalSpace.mk_cast
 
 /- warning: bundle.total_space.eta -> Bundle.TotalSpace.eta is a dubious translation:
Diff
@@ -248,10 +248,7 @@ theorem coe_snd_map_apply (x : B) (v w : E x) :
 variable (R : Type _) [Semiring R] [∀ x, Module R (E x)]
 
 /- warning: bundle.coe_snd_map_smul -> Bundle.coe_snd_map_smul is a dubious translation:
-lean 3 declaration is
-  forall {B : Type.{u1}} {E : B -> Type.{u2}} [_inst_1 : forall (x : B), AddCommMonoid.{u2} (E x)] (R : Type.{u3}) [_inst_2 : Semiring.{u3} R] [_inst_3 : forall (x : B), Module.{u3, u2} R (E x) _inst_2 (_inst_1 x)] (x : B) (r : R) (v : E x), Eq.{succ u2} (E (Sigma.fst.{u1, u2} B (fun (x : B) => E x) ((fun (a : Type.{u2}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{succ u2, max (succ u1) (succ u2)} a b] => self.0) (E x) (Bundle.TotalSpace.{u1, u2} B E) (HasLiftT.mk.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (CoeTCₓ.coe.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (Bundle.TotalSpace.hasCoeT.{u1, u2} B E x))) (SMul.smul.{u3, u2} R (E x) (SMulZeroClass.toHasSmul.{u3, u2} R (E x) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (SMulWithZero.toSmulZeroClass.{u3, u2} R (E x) (MulZeroClass.toHasZero.{u3} R (MulZeroOneClass.toMulZeroClass.{u3} R (MonoidWithZero.toMulZeroOneClass.{u3} R (Semiring.toMonoidWithZero.{u3} R _inst_2)))) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (MulActionWithZero.toSMulWithZero.{u3, u2} R (E x) (Semiring.toMonoidWithZero.{u3} R _inst_2) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (Module.toMulActionWithZero.{u3, u2} R (E x) _inst_2 (_inst_1 x) (_inst_3 x))))) r v)))) (Sigma.snd.{u1, u2} B (fun (x : B) => E x) ((fun (a : Type.{u2}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{succ u2, max (succ u1) (succ u2)} a b] => self.0) (E x) (Bundle.TotalSpace.{u1, u2} B E) (HasLiftT.mk.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (CoeTCₓ.coe.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (Bundle.TotalSpace.hasCoeT.{u1, u2} B E x))) (SMul.smul.{u3, u2} R (E x) (SMulZeroClass.toHasSmul.{u3, u2} R (E x) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (SMulWithZero.toSmulZeroClass.{u3, u2} R (E x) (MulZeroClass.toHasZero.{u3} R (MulZeroOneClass.toMulZeroClass.{u3} R (MonoidWithZero.toMulZeroOneClass.{u3} R (Semiring.toMonoidWithZero.{u3} R _inst_2)))) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (MulActionWithZero.toSMulWithZero.{u3, u2} R (E x) (Semiring.toMonoidWithZero.{u3} R _inst_2) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (Module.toMulActionWithZero.{u3, u2} R (E x) _inst_2 (_inst_1 x) (_inst_3 x))))) r v))) (SMul.smul.{u3, u2} R (E (Sigma.fst.{u1, u2} B (fun (x : B) => E x) ((fun (a : Type.{u2}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{succ u2, max (succ u1) (succ u2)} a b] => self.0) (E x) (Bundle.TotalSpace.{u1, u2} B E) (HasLiftT.mk.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (CoeTCₓ.coe.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (Bundle.TotalSpace.hasCoeT.{u1, u2} B E x))) (SMul.smul.{u3, u2} R (E x) (SMulZeroClass.toHasSmul.{u3, u2} R (E x) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (SMulWithZero.toSmulZeroClass.{u3, u2} R (E x) (MulZeroClass.toHasZero.{u3} R (MulZeroOneClass.toMulZeroClass.{u3} R (MonoidWithZero.toMulZeroOneClass.{u3} R (Semiring.toMonoidWithZero.{u3} R _inst_2)))) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (MulActionWithZero.toSMulWithZero.{u3, u2} R (E x) (Semiring.toMonoidWithZero.{u3} R _inst_2) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (Module.toMulActionWithZero.{u3, u2} R (E x) _inst_2 (_inst_1 x) (_inst_3 x))))) r v)))) (SMulZeroClass.toHasSmul.{u3, u2} R (E (Sigma.fst.{u1, u2} B (fun (x : B) => E x) ((fun (a : Type.{u2}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{succ u2, max (succ u1) (succ u2)} a b] => self.0) (E x) (Bundle.TotalSpace.{u1, u2} B E) (HasLiftT.mk.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (CoeTCₓ.coe.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (Bundle.TotalSpace.hasCoeT.{u1, u2} B E x))) (SMul.smul.{u3, u2} R (E x) (SMulZeroClass.toHasSmul.{u3, u2} R (E x) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (SMulWithZero.toSmulZeroClass.{u3, u2} R (E x) (MulZeroClass.toHasZero.{u3} R (MulZeroOneClass.toMulZeroClass.{u3} R (MonoidWithZero.toMulZeroOneClass.{u3} R (Semiring.toMonoidWithZero.{u3} R _inst_2)))) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (MulActionWithZero.toSMulWithZero.{u3, u2} R (E x) (Semiring.toMonoidWithZero.{u3} R _inst_2) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (Module.toMulActionWithZero.{u3, u2} R (E x) _inst_2 (_inst_1 x) (_inst_3 x))))) r v)))) (AddZeroClass.toHasZero.{u2} (E (Sigma.fst.{u1, u2} B (fun (x : B) => E x) ((fun (a : Type.{u2}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{succ u2, max (succ u1) (succ u2)} a b] => self.0) (E x) (Bundle.TotalSpace.{u1, u2} B E) (HasLiftT.mk.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (CoeTCₓ.coe.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (Bundle.TotalSpace.hasCoeT.{u1, u2} B E x))) (SMul.smul.{u3, u2} R (E x) (SMulZeroClass.toHasSmul.{u3, u2} R (E x) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (SMulWithZero.toSmulZeroClass.{u3, u2} R (E x) (MulZeroClass.toHasZero.{u3} R (MulZeroOneClass.toMulZeroClass.{u3} R (MonoidWithZero.toMulZeroOneClass.{u3} R (Semiring.toMonoidWithZero.{u3} R _inst_2)))) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (MulActionWithZero.toSMulWithZero.{u3, u2} R (E x) (Semiring.toMonoidWithZero.{u3} R _inst_2) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (Module.toMulActionWithZero.{u3, u2} R (E x) _inst_2 (_inst_1 x) (_inst_3 x))))) r v)))) (AddMonoid.toAddZeroClass.{u2} (E (Sigma.fst.{u1, u2} B (fun (x : B) => E x) ((fun (a : Type.{u2}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{succ u2, max (succ u1) (succ u2)} a b] => self.0) (E x) (Bundle.TotalSpace.{u1, u2} B E) (HasLiftT.mk.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (CoeTCₓ.coe.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (Bundle.TotalSpace.hasCoeT.{u1, u2} B E x))) (SMul.smul.{u3, u2} R (E x) (SMulZeroClass.toHasSmul.{u3, u2} R (E x) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (SMulWithZero.toSmulZeroClass.{u3, u2} R (E x) (MulZeroClass.toHasZero.{u3} R (MulZeroOneClass.toMulZeroClass.{u3} R (MonoidWithZero.toMulZeroOneClass.{u3} R (Semiring.toMonoidWithZero.{u3} R _inst_2)))) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (MulActionWithZero.toSMulWithZero.{u3, u2} R (E x) (Semiring.toMonoidWithZero.{u3} R _inst_2) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (Module.toMulActionWithZero.{u3, u2} R (E x) _inst_2 (_inst_1 x) (_inst_3 x))))) r v)))) (AddCommMonoid.toAddMonoid.{u2} (E (Sigma.fst.{u1, u2} B (fun (x : B) => E x) ((fun (a : Type.{u2}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{succ u2, max (succ u1) (succ u2)} a b] => self.0) (E x) (Bundle.TotalSpace.{u1, u2} B E) (HasLiftT.mk.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (CoeTCₓ.coe.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (Bundle.TotalSpace.hasCoeT.{u1, u2} B E x))) (SMul.smul.{u3, u2} R (E x) (SMulZeroClass.toHasSmul.{u3, u2} R (E x) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (SMulWithZero.toSmulZeroClass.{u3, u2} R (E x) (MulZeroClass.toHasZero.{u3} R (MulZeroOneClass.toMulZeroClass.{u3} R (MonoidWithZero.toMulZeroOneClass.{u3} R (Semiring.toMonoidWithZero.{u3} R _inst_2)))) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (MulActionWithZero.toSMulWithZero.{u3, u2} R (E x) (Semiring.toMonoidWithZero.{u3} R _inst_2) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (Module.toMulActionWithZero.{u3, u2} R (E x) _inst_2 (_inst_1 x) (_inst_3 x))))) r v)))) (_inst_1 (Sigma.fst.{u1, u2} B (fun (x : B) => E x) ((fun (a : Type.{u2}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{succ u2, max (succ u1) (succ u2)} a b] => self.0) (E x) (Bundle.TotalSpace.{u1, u2} B E) (HasLiftT.mk.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (CoeTCₓ.coe.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (Bundle.TotalSpace.hasCoeT.{u1, u2} B E x))) (SMul.smul.{u3, u2} R (E x) (SMulZeroClass.toHasSmul.{u3, u2} R (E x) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (SMulWithZero.toSmulZeroClass.{u3, u2} R (E x) (MulZeroClass.toHasZero.{u3} R (MulZeroOneClass.toMulZeroClass.{u3} R (MonoidWithZero.toMulZeroOneClass.{u3} R (Semiring.toMonoidWithZero.{u3} R _inst_2)))) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (MulActionWithZero.toSMulWithZero.{u3, u2} R (E x) (Semiring.toMonoidWithZero.{u3} R _inst_2) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (Module.toMulActionWithZero.{u3, u2} R (E x) _inst_2 (_inst_1 x) (_inst_3 x))))) r v))))))) (SMulWithZero.toSmulZeroClass.{u3, u2} R (E (Sigma.fst.{u1, u2} B (fun (x : B) => E x) ((fun (a : Type.{u2}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{succ u2, max (succ u1) (succ u2)} a b] => self.0) (E x) (Bundle.TotalSpace.{u1, u2} B E) (HasLiftT.mk.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (CoeTCₓ.coe.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (Bundle.TotalSpace.hasCoeT.{u1, u2} B E x))) (SMul.smul.{u3, u2} R (E x) (SMulZeroClass.toHasSmul.{u3, u2} R (E x) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (SMulWithZero.toSmulZeroClass.{u3, u2} R (E x) (MulZeroClass.toHasZero.{u3} R (MulZeroOneClass.toMulZeroClass.{u3} R (MonoidWithZero.toMulZeroOneClass.{u3} R (Semiring.toMonoidWithZero.{u3} R _inst_2)))) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (MulActionWithZero.toSMulWithZero.{u3, u2} R (E x) (Semiring.toMonoidWithZero.{u3} R _inst_2) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (Module.toMulActionWithZero.{u3, u2} R (E x) _inst_2 (_inst_1 x) (_inst_3 x))))) r v)))) (MulZeroClass.toHasZero.{u3} R (MulZeroOneClass.toMulZeroClass.{u3} R (MonoidWithZero.toMulZeroOneClass.{u3} R (Semiring.toMonoidWithZero.{u3} R _inst_2)))) (AddZeroClass.toHasZero.{u2} (E (Sigma.fst.{u1, u2} B (fun (x : B) => E x) ((fun (a : Type.{u2}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{succ u2, max (succ u1) (succ u2)} a b] => self.0) (E x) (Bundle.TotalSpace.{u1, u2} B E) (HasLiftT.mk.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (CoeTCₓ.coe.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (Bundle.TotalSpace.hasCoeT.{u1, u2} B E x))) (SMul.smul.{u3, u2} R (E x) (SMulZeroClass.toHasSmul.{u3, u2} R (E x) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (SMulWithZero.toSmulZeroClass.{u3, u2} R (E x) (MulZeroClass.toHasZero.{u3} R (MulZeroOneClass.toMulZeroClass.{u3} R (MonoidWithZero.toMulZeroOneClass.{u3} R (Semiring.toMonoidWithZero.{u3} R _inst_2)))) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (MulActionWithZero.toSMulWithZero.{u3, u2} R (E x) (Semiring.toMonoidWithZero.{u3} R _inst_2) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (Module.toMulActionWithZero.{u3, u2} R (E x) _inst_2 (_inst_1 x) (_inst_3 x))))) r v)))) (AddMonoid.toAddZeroClass.{u2} (E (Sigma.fst.{u1, u2} B (fun (x : B) => E x) ((fun (a : Type.{u2}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{succ u2, max (succ u1) (succ u2)} a b] => self.0) (E x) (Bundle.TotalSpace.{u1, u2} B E) (HasLiftT.mk.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (CoeTCₓ.coe.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (Bundle.TotalSpace.hasCoeT.{u1, u2} B E x))) (SMul.smul.{u3, u2} R (E x) (SMulZeroClass.toHasSmul.{u3, u2} R (E x) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (SMulWithZero.toSmulZeroClass.{u3, u2} R (E x) (MulZeroClass.toHasZero.{u3} R (MulZeroOneClass.toMulZeroClass.{u3} R (MonoidWithZero.toMulZeroOneClass.{u3} R (Semiring.toMonoidWithZero.{u3} R _inst_2)))) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (MulActionWithZero.toSMulWithZero.{u3, u2} R (E x) (Semiring.toMonoidWithZero.{u3} R _inst_2) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (Module.toMulActionWithZero.{u3, u2} R (E x) _inst_2 (_inst_1 x) (_inst_3 x))))) r v)))) (AddCommMonoid.toAddMonoid.{u2} (E (Sigma.fst.{u1, u2} B (fun (x : B) => E x) ((fun (a : Type.{u2}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{succ u2, max (succ u1) (succ u2)} a b] => self.0) (E x) (Bundle.TotalSpace.{u1, u2} B E) (HasLiftT.mk.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (CoeTCₓ.coe.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (Bundle.TotalSpace.hasCoeT.{u1, u2} B E x))) (SMul.smul.{u3, u2} R (E x) (SMulZeroClass.toHasSmul.{u3, u2} R (E x) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (SMulWithZero.toSmulZeroClass.{u3, u2} R (E x) (MulZeroClass.toHasZero.{u3} R (MulZeroOneClass.toMulZeroClass.{u3} R (MonoidWithZero.toMulZeroOneClass.{u3} R (Semiring.toMonoidWithZero.{u3} R _inst_2)))) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (MulActionWithZero.toSMulWithZero.{u3, u2} R (E x) (Semiring.toMonoidWithZero.{u3} R _inst_2) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (Module.toMulActionWithZero.{u3, u2} R (E x) _inst_2 (_inst_1 x) (_inst_3 x))))) r v)))) (_inst_1 (Sigma.fst.{u1, u2} B (fun (x : B) => E x) ((fun (a : Type.{u2}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{succ u2, max (succ u1) (succ u2)} a b] => self.0) (E x) (Bundle.TotalSpace.{u1, u2} B E) (HasLiftT.mk.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (CoeTCₓ.coe.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (Bundle.TotalSpace.hasCoeT.{u1, u2} B E x))) (SMul.smul.{u3, u2} R (E x) (SMulZeroClass.toHasSmul.{u3, u2} R (E x) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (SMulWithZero.toSmulZeroClass.{u3, u2} R (E x) (MulZeroClass.toHasZero.{u3} R (MulZeroOneClass.toMulZeroClass.{u3} R (MonoidWithZero.toMulZeroOneClass.{u3} R (Semiring.toMonoidWithZero.{u3} R _inst_2)))) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (MulActionWithZero.toSMulWithZero.{u3, u2} R (E x) (Semiring.toMonoidWithZero.{u3} R _inst_2) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (Module.toMulActionWithZero.{u3, u2} R (E x) _inst_2 (_inst_1 x) (_inst_3 x))))) r v))))))) (MulActionWithZero.toSMulWithZero.{u3, u2} R (E (Sigma.fst.{u1, u2} B (fun (x : B) => E x) ((fun (a : Type.{u2}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{succ u2, max (succ u1) (succ u2)} a b] => self.0) (E x) (Bundle.TotalSpace.{u1, u2} B E) (HasLiftT.mk.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (CoeTCₓ.coe.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (Bundle.TotalSpace.hasCoeT.{u1, u2} B E x))) (SMul.smul.{u3, u2} R (E x) (SMulZeroClass.toHasSmul.{u3, u2} R (E x) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (SMulWithZero.toSmulZeroClass.{u3, u2} R (E x) (MulZeroClass.toHasZero.{u3} R (MulZeroOneClass.toMulZeroClass.{u3} R (MonoidWithZero.toMulZeroOneClass.{u3} R (Semiring.toMonoidWithZero.{u3} R _inst_2)))) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (MulActionWithZero.toSMulWithZero.{u3, u2} R (E x) (Semiring.toMonoidWithZero.{u3} R _inst_2) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (Module.toMulActionWithZero.{u3, u2} R (E x) _inst_2 (_inst_1 x) (_inst_3 x))))) r v)))) (Semiring.toMonoidWithZero.{u3} R _inst_2) (AddZeroClass.toHasZero.{u2} (E (Sigma.fst.{u1, u2} B (fun (x : B) => E x) ((fun (a : Type.{u2}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{succ u2, max (succ u1) (succ u2)} a b] => self.0) (E x) (Bundle.TotalSpace.{u1, u2} B E) (HasLiftT.mk.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (CoeTCₓ.coe.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (Bundle.TotalSpace.hasCoeT.{u1, u2} B E x))) (SMul.smul.{u3, u2} R (E x) (SMulZeroClass.toHasSmul.{u3, u2} R (E x) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (SMulWithZero.toSmulZeroClass.{u3, u2} R (E x) (MulZeroClass.toHasZero.{u3} R (MulZeroOneClass.toMulZeroClass.{u3} R (MonoidWithZero.toMulZeroOneClass.{u3} R (Semiring.toMonoidWithZero.{u3} R _inst_2)))) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (MulActionWithZero.toSMulWithZero.{u3, u2} R (E x) (Semiring.toMonoidWithZero.{u3} R _inst_2) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (Module.toMulActionWithZero.{u3, u2} R (E x) _inst_2 (_inst_1 x) (_inst_3 x))))) r v)))) (AddMonoid.toAddZeroClass.{u2} (E (Sigma.fst.{u1, u2} B (fun (x : B) => E x) ((fun (a : Type.{u2}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{succ u2, max (succ u1) (succ u2)} a b] => self.0) (E x) (Bundle.TotalSpace.{u1, u2} B E) (HasLiftT.mk.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (CoeTCₓ.coe.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (Bundle.TotalSpace.hasCoeT.{u1, u2} B E x))) (SMul.smul.{u3, u2} R (E x) (SMulZeroClass.toHasSmul.{u3, u2} R (E x) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (SMulWithZero.toSmulZeroClass.{u3, u2} R (E x) (MulZeroClass.toHasZero.{u3} R (MulZeroOneClass.toMulZeroClass.{u3} R (MonoidWithZero.toMulZeroOneClass.{u3} R (Semiring.toMonoidWithZero.{u3} R _inst_2)))) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (MulActionWithZero.toSMulWithZero.{u3, u2} R (E x) (Semiring.toMonoidWithZero.{u3} R _inst_2) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (Module.toMulActionWithZero.{u3, u2} R (E x) _inst_2 (_inst_1 x) (_inst_3 x))))) r v)))) (AddCommMonoid.toAddMonoid.{u2} (E (Sigma.fst.{u1, u2} B (fun (x : B) => E x) ((fun (a : Type.{u2}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{succ u2, max (succ u1) (succ u2)} a b] => self.0) (E x) (Bundle.TotalSpace.{u1, u2} B E) (HasLiftT.mk.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (CoeTCₓ.coe.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (Bundle.TotalSpace.hasCoeT.{u1, u2} B E x))) (SMul.smul.{u3, u2} R (E x) (SMulZeroClass.toHasSmul.{u3, u2} R (E x) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (SMulWithZero.toSmulZeroClass.{u3, u2} R (E x) (MulZeroClass.toHasZero.{u3} R (MulZeroOneClass.toMulZeroClass.{u3} R (MonoidWithZero.toMulZeroOneClass.{u3} R (Semiring.toMonoidWithZero.{u3} R _inst_2)))) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (MulActionWithZero.toSMulWithZero.{u3, u2} R (E x) (Semiring.toMonoidWithZero.{u3} R _inst_2) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (Module.toMulActionWithZero.{u3, u2} R (E x) _inst_2 (_inst_1 x) (_inst_3 x))))) r v)))) (_inst_1 (Sigma.fst.{u1, u2} B (fun (x : B) => E x) ((fun (a : Type.{u2}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{succ u2, max (succ u1) (succ u2)} a b] => self.0) (E x) (Bundle.TotalSpace.{u1, u2} B E) (HasLiftT.mk.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (CoeTCₓ.coe.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (Bundle.TotalSpace.hasCoeT.{u1, u2} B E x))) (SMul.smul.{u3, u2} R (E x) (SMulZeroClass.toHasSmul.{u3, u2} R (E x) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (SMulWithZero.toSmulZeroClass.{u3, u2} R (E x) (MulZeroClass.toHasZero.{u3} R (MulZeroOneClass.toMulZeroClass.{u3} R (MonoidWithZero.toMulZeroOneClass.{u3} R (Semiring.toMonoidWithZero.{u3} R _inst_2)))) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (MulActionWithZero.toSMulWithZero.{u3, u2} R (E x) (Semiring.toMonoidWithZero.{u3} R _inst_2) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (Module.toMulActionWithZero.{u3, u2} R (E x) _inst_2 (_inst_1 x) (_inst_3 x))))) r v))))))) (Module.toMulActionWithZero.{u3, u2} R (E (Sigma.fst.{u1, u2} B (fun (x : B) => E x) ((fun (a : Type.{u2}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{succ u2, max (succ u1) (succ u2)} a b] => self.0) (E x) (Bundle.TotalSpace.{u1, u2} B E) (HasLiftT.mk.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (CoeTCₓ.coe.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (Bundle.TotalSpace.hasCoeT.{u1, u2} B E x))) (SMul.smul.{u3, u2} R (E x) (SMulZeroClass.toHasSmul.{u3, u2} R (E x) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (SMulWithZero.toSmulZeroClass.{u3, u2} R (E x) (MulZeroClass.toHasZero.{u3} R (MulZeroOneClass.toMulZeroClass.{u3} R (MonoidWithZero.toMulZeroOneClass.{u3} R (Semiring.toMonoidWithZero.{u3} R _inst_2)))) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (MulActionWithZero.toSMulWithZero.{u3, u2} R (E x) (Semiring.toMonoidWithZero.{u3} R _inst_2) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (Module.toMulActionWithZero.{u3, u2} R (E x) _inst_2 (_inst_1 x) (_inst_3 x))))) r v)))) _inst_2 (_inst_1 (Sigma.fst.{u1, u2} B (fun (x : B) => E x) ((fun (a : Type.{u2}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{succ u2, max (succ u1) (succ u2)} a b] => self.0) (E x) (Bundle.TotalSpace.{u1, u2} B E) (HasLiftT.mk.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (CoeTCₓ.coe.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (Bundle.TotalSpace.hasCoeT.{u1, u2} B E x))) (SMul.smul.{u3, u2} R (E x) (SMulZeroClass.toHasSmul.{u3, u2} R (E x) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (SMulWithZero.toSmulZeroClass.{u3, u2} R (E x) (MulZeroClass.toHasZero.{u3} R (MulZeroOneClass.toMulZeroClass.{u3} R (MonoidWithZero.toMulZeroOneClass.{u3} R (Semiring.toMonoidWithZero.{u3} R _inst_2)))) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (MulActionWithZero.toSMulWithZero.{u3, u2} R (E x) (Semiring.toMonoidWithZero.{u3} R _inst_2) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (Module.toMulActionWithZero.{u3, u2} R (E x) _inst_2 (_inst_1 x) (_inst_3 x))))) r v)))) (_inst_3 (Sigma.fst.{u1, u2} B (fun (x : B) => E x) ((fun (a : Type.{u2}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{succ u2, max (succ u1) (succ u2)} a b] => self.0) (E x) (Bundle.TotalSpace.{u1, u2} B E) (HasLiftT.mk.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (CoeTCₓ.coe.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (Bundle.TotalSpace.hasCoeT.{u1, u2} B E x))) (SMul.smul.{u3, u2} R (E x) (SMulZeroClass.toHasSmul.{u3, u2} R (E x) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (SMulWithZero.toSmulZeroClass.{u3, u2} R (E x) (MulZeroClass.toHasZero.{u3} R (MulZeroOneClass.toMulZeroClass.{u3} R (MonoidWithZero.toMulZeroOneClass.{u3} R (Semiring.toMonoidWithZero.{u3} R _inst_2)))) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (MulActionWithZero.toSMulWithZero.{u3, u2} R (E x) (Semiring.toMonoidWithZero.{u3} R _inst_2) (AddZeroClass.toHasZero.{u2} (E x) (AddMonoid.toAddZeroClass.{u2} (E x) (AddCommMonoid.toAddMonoid.{u2} (E x) (_inst_1 x)))) (Module.toMulActionWithZero.{u3, u2} R (E x) _inst_2 (_inst_1 x) (_inst_3 x))))) r v)))))))) r (Sigma.snd.{u1, u2} B (fun (x : B) => E x) ((fun (a : Type.{u2}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{succ u2, max (succ u1) (succ u2)} a b] => self.0) (E x) (Bundle.TotalSpace.{u1, u2} B E) (HasLiftT.mk.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (CoeTCₓ.coe.{succ u2, max (succ u1) (succ u2)} (E x) (Bundle.TotalSpace.{u1, u2} B E) (Bundle.TotalSpace.hasCoeT.{u1, u2} B E x))) v)))
-but is expected to have type
-  forall {B : Type.{u2}} {E : B -> Type.{u3}} [_inst_1 : forall (x : B), AddCommMonoid.{u3} (E x)] (R : Type.{u1}) [_inst_2 : Semiring.{u1} R] [_inst_3 : forall (x : B), Module.{u1, u3} R (E x) _inst_2 (_inst_1 x)] (x : B) (r : R) (v : E x), Eq.{succ u3} (E (Sigma.fst.{u2, u3} B (fun (x : B) => E x) (Bundle.totalSpaceMk.{u2, u3} B E x (HSMul.hSMul.{u1, u3, u3} R (E x) (E x) (instHSMul.{u1, u3} R (E x) (SMulZeroClass.toSMul.{u1, u3} R (E x) (AddMonoid.toZero.{u3} (E x) (AddCommMonoid.toAddMonoid.{u3} (E x) (_inst_1 x))) (SMulWithZero.toSMulZeroClass.{u1, u3} R (E x) (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_2)) (AddMonoid.toZero.{u3} (E x) (AddCommMonoid.toAddMonoid.{u3} (E x) (_inst_1 x))) (MulActionWithZero.toSMulWithZero.{u1, u3} R (E x) (Semiring.toMonoidWithZero.{u1} R _inst_2) (AddMonoid.toZero.{u3} (E x) (AddCommMonoid.toAddMonoid.{u3} (E x) (_inst_1 x))) (Module.toMulActionWithZero.{u1, u3} R (E x) _inst_2 (_inst_1 x) (_inst_3 x)))))) r v)))) (Sigma.snd.{u2, u3} B (fun (x : B) => E x) (Bundle.totalSpaceMk.{u2, u3} B E x (HSMul.hSMul.{u1, u3, u3} R (E x) (E x) (instHSMul.{u1, u3} R (E x) (SMulZeroClass.toSMul.{u1, u3} R (E x) (AddMonoid.toZero.{u3} (E x) (AddCommMonoid.toAddMonoid.{u3} (E x) (_inst_1 x))) (SMulWithZero.toSMulZeroClass.{u1, u3} R (E x) (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_2)) (AddMonoid.toZero.{u3} (E x) (AddCommMonoid.toAddMonoid.{u3} (E x) (_inst_1 x))) (MulActionWithZero.toSMulWithZero.{u1, u3} R (E x) (Semiring.toMonoidWithZero.{u1} R _inst_2) (AddMonoid.toZero.{u3} (E x) (AddCommMonoid.toAddMonoid.{u3} (E x) (_inst_1 x))) (Module.toMulActionWithZero.{u1, u3} R (E x) _inst_2 (_inst_1 x) (_inst_3 x)))))) r v))) (HSMul.hSMul.{u1, u3, u3} R (E (Sigma.fst.{u2, u3} B (fun (x : B) => E x) (Bundle.totalSpaceMk.{u2, u3} B E x v))) (E (Sigma.fst.{u2, u3} B (fun (x : B) => E x) (Bundle.totalSpaceMk.{u2, u3} B E x v))) (instHSMul.{u1, u3} R (E (Sigma.fst.{u2, u3} B (fun (x : B) => E x) (Bundle.totalSpaceMk.{u2, u3} B E x v))) (SMulZeroClass.toSMul.{u1, u3} R (E (Sigma.fst.{u2, u3} B (fun (x : B) => E x) (Bundle.totalSpaceMk.{u2, u3} B E x v))) (AddMonoid.toZero.{u3} (E (Sigma.fst.{u2, u3} B (fun (x : B) => E x) (Bundle.totalSpaceMk.{u2, u3} B E x v))) (AddCommMonoid.toAddMonoid.{u3} (E (Sigma.fst.{u2, u3} B (fun (x : B) => E x) (Bundle.totalSpaceMk.{u2, u3} B E x v))) (_inst_1 (Sigma.fst.{u2, u3} B (fun (x : B) => E x) (Bundle.totalSpaceMk.{u2, u3} B E x v))))) (SMulWithZero.toSMulZeroClass.{u1, u3} R (E (Sigma.fst.{u2, u3} B (fun (x : B) => E x) (Bundle.totalSpaceMk.{u2, u3} B E x v))) (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_2)) (AddMonoid.toZero.{u3} (E (Sigma.fst.{u2, u3} B (fun (x : B) => E x) (Bundle.totalSpaceMk.{u2, u3} B E x v))) (AddCommMonoid.toAddMonoid.{u3} (E (Sigma.fst.{u2, u3} B (fun (x : B) => E x) (Bundle.totalSpaceMk.{u2, u3} B E x v))) (_inst_1 (Sigma.fst.{u2, u3} B (fun (x : B) => E x) (Bundle.totalSpaceMk.{u2, u3} B E x v))))) (MulActionWithZero.toSMulWithZero.{u1, u3} R (E (Sigma.fst.{u2, u3} B (fun (x : B) => E x) (Bundle.totalSpaceMk.{u2, u3} B E x v))) (Semiring.toMonoidWithZero.{u1} R _inst_2) (AddMonoid.toZero.{u3} (E (Sigma.fst.{u2, u3} B (fun (x : B) => E x) (Bundle.totalSpaceMk.{u2, u3} B E x v))) (AddCommMonoid.toAddMonoid.{u3} (E (Sigma.fst.{u2, u3} B (fun (x : B) => E x) (Bundle.totalSpaceMk.{u2, u3} B E x v))) (_inst_1 (Sigma.fst.{u2, u3} B (fun (x : B) => E x) (Bundle.totalSpaceMk.{u2, u3} B E x v))))) (Module.toMulActionWithZero.{u1, u3} R (E (Sigma.fst.{u2, u3} B (fun (x : B) => E x) (Bundle.totalSpaceMk.{u2, u3} B E x v))) _inst_2 (_inst_1 (Sigma.fst.{u2, u3} B (fun (x : B) => E x) (Bundle.totalSpaceMk.{u2, u3} B E x v))) (_inst_3 (Sigma.fst.{u2, u3} B (fun (x : B) => E x) (Bundle.totalSpaceMk.{u2, u3} B E x v)))))))) r (Sigma.snd.{u2, u3} B (fun (x : B) => E x) (Bundle.totalSpaceMk.{u2, u3} B E x v)))
+<too large>
 Case conversion may be inaccurate. Consider using '#align bundle.coe_snd_map_smul Bundle.coe_snd_map_smulₓ'. -/
 @[simp]
 theorem coe_snd_map_smul (x : B) (r : R) (v : E x) :

Changes in mathlib4

mathlib3
mathlib4
chore: reduce imports (#9830)

This uses the improved shake script from #9772 to reduce imports across mathlib. The corresponding noshake.json file has been added to #9772.

Co-authored-by: Mario Carneiro <di.gama@gmail.com>

Diff
@@ -3,7 +3,7 @@ Copyright © 2021 Nicolò Cavalleri. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Nicolò Cavalleri
 -/
-import Mathlib.Algebra.Module.Basic
+import Mathlib.Data.Set.Basic
 
 #align_import data.bundle from "leanprover-community/mathlib"@"e473c3198bb41f68560cab68a0529c854b618833"
 
style: shorten simps configurations (#8296)

Use .asFn and .lemmasOnly as simps configuration options.

For reference, these are defined here:

https://github.com/leanprover-community/mathlib4/blob/4055c8b471380825f07416b12cb0cf266da44d84/Mathlib/Tactic/Simps/Basic.lean#L843-L851

Diff
@@ -113,7 +113,7 @@ def TotalSpace.trivialSnd (B : Type*) (F : Type*) : TotalSpace F (Bundle.Trivial
 #align bundle.total_space.trivial_snd Bundle.TotalSpace.trivialSnd
 
 /-- A trivial bundle is equivalent to the product `B × F`. -/
-@[simps (config := { attrs := [`simp, `mfld_simps] })]
+@[simps (config := { attrs := [`mfld_simps] })]
 def TotalSpace.toProd (B F : Type*) : (TotalSpace F fun _ : B => F) ≃ B × F where
   toFun x := (x.1, x.2)
   invFun x := ⟨x.1, x.2⟩
@@ -143,7 +143,7 @@ def pullbackTotalSpaceEmbedding (f : B' → B) : TotalSpace F (f *ᵖ E) → B'
 #align bundle.pullback_total_space_embedding Bundle.pullbackTotalSpaceEmbedding
 
 /-- The base map `f : B' → B` lifts to a canonical map on the total spaces. -/
-@[simps (config := { isSimp := true, attrs := [`mfld_simps] })]
+@[simps (config := { attrs := [`mfld_simps] })]
 def Pullback.lift (f : B' → B) : TotalSpace F (f *ᵖ E) → TotalSpace F E := fun z => ⟨f z.proj, z.2⟩
 #align bundle.pullback.lift Bundle.Pullback.lift
 
chore: tidy various files (#7137)
Diff
@@ -21,8 +21,8 @@ general, the constructions of fiber bundles we will make will be of this form.
 ## Main Definitions
 
 * `Bundle.TotalSpace` the total space of a bundle.
-* `bundle.total_space.proj` the projection from the total space to the base space.
-* `bundle.total_space.mk` the constructor for the total space.
+* `Bundle.TotalSpace.proj` the projection from the total space to the base space.
+* `Bundle.TotalSpace.mk` the constructor for the total space.
 
 ## Implementation Notes
 
@@ -31,7 +31,7 @@ general, the constructions of fiber bundles we will make will be of this form.
   Lean 4 `simp` fails to apply lemmas about `Σ x, E x` to elements of the total space.
 
 - The definition of `Bundle.TotalSpace` has an unused argument `F`. The reason is that in some
-  constructions (e.g., `bundle.continuous_linear_map.vector_bundle`) we need access to the atlas of
+  constructions (e.g., `Bundle.ContinuousLinearMap.vectorBundle`) we need access to the atlas of
   trivializations of original fiber bundles to construct the topology on the total space of the new
   fiber bundle.
 
chore: banish Type _ and Sort _ (#6499)

We remove all possible occurences of Type _ and Sort _ in favor of Type* and Sort*.

This has nice performance benefits.

Diff
@@ -12,7 +12,7 @@ import Mathlib.Algebra.Module.Basic
 Basic data structure to implement fiber bundles, vector bundles (maybe fibrations?), etc. This file
 should contain all possible results that do not involve any topology.
 
-We represent a bundle `E` over a base space `B` as a dependent type `E : B → Type _`.
+We represent a bundle `E` over a base space `B` as a dependent type `E : B → Type*`.
 
 We define `Bundle.TotalSpace F E` to be the type of pairs `⟨b, x⟩`, where `b : B` and `x : E b`.
 This type is isomorphic to `Σ x, E x` and uses an extra argument `F` for reasons explained below. In
@@ -43,13 +43,13 @@ open Function Set
 
 namespace Bundle
 
-variable {B F : Type _} (E : B → Type _)
+variable {B F : Type*} (E : B → Type*)
 
 /-- `Bundle.TotalSpace F E` is the total space of the bundle. It consists of pairs
 `(proj : B, snd : E proj)`.
 -/
 @[ext]
-structure TotalSpace (F : Type _) (E : B → Type _) where
+structure TotalSpace (F : Type*) (E : B → Type*) where
   /-- `Bundle.TotalSpace.proj` is the canonical projection `Bundle.TotalSpace F E → B` from the
   total space to the base space. -/
   proj : B
@@ -64,7 +64,7 @@ variable {E}
 @[inherit_doc]
 scoped notation:max "π" F':max E':max => Bundle.TotalSpace.proj (F := F') (E := E')
 
-abbrev TotalSpace.mk' (F : Type _) (x : B) (y : E x) : TotalSpace F E := ⟨x, y⟩
+abbrev TotalSpace.mk' (F : Type*) (x : B) (y : E x) : TotalSpace F E := ⟨x, y⟩
 
 theorem TotalSpace.mk_cast {x x' : B} (h : x = x') (b : E x) :
     .mk' F x' (cast (congr_arg E h) b) = TotalSpace.mk x b := by subst h; rfl
@@ -104,17 +104,17 @@ notation:100 E₁ " ×ᵇ " E₂ => fun x => E₁ x × E₂ x
 
 /-- `Bundle.Trivial B F` is the trivial bundle over `B` of fiber `F`. -/
 @[reducible, nolint unusedArguments]
-def Trivial (B : Type _) (F : Type _) : B → Type _ := fun _ => F
+def Trivial (B : Type*) (F : Type*) : B → Type _ := fun _ => F
 #align bundle.trivial Bundle.Trivial
 
 /-- The trivial bundle, unlike other bundles, has a canonical projection on the fiber. -/
-def TotalSpace.trivialSnd (B : Type _) (F : Type _) : TotalSpace F (Bundle.Trivial B F) → F :=
+def TotalSpace.trivialSnd (B : Type*) (F : Type*) : TotalSpace F (Bundle.Trivial B F) → F :=
   TotalSpace.snd
 #align bundle.total_space.trivial_snd Bundle.TotalSpace.trivialSnd
 
 /-- A trivial bundle is equivalent to the product `B × F`. -/
 @[simps (config := { attrs := [`simp, `mfld_simps] })]
-def TotalSpace.toProd (B F : Type _) : (TotalSpace F fun _ : B => F) ≃ B × F where
+def TotalSpace.toProd (B F : Type*) : (TotalSpace F fun _ : B => F) ≃ B × F where
   toFun x := (x.1, x.2)
   invFun x := ⟨x.1, x.2⟩
   left_inv := fun ⟨_, _⟩ => rfl
@@ -123,11 +123,11 @@ def TotalSpace.toProd (B F : Type _) : (TotalSpace F fun _ : B => F) ≃ B × F
 
 section Pullback
 
-variable {B' : Type _}
+variable {B' : Type*}
 
 /-- The pullback of a bundle `E` over a base `B` under a map `f : B' → B`, denoted by
 `Bundle.Pullback f E` or `f *ᵖ E`, is the bundle over `B'` whose fiber over `b'` is `E (f b')`. -/
-def Pullback (f : B' → B) (E : B → Type _) : B' → Type _ := fun x => E (f x)
+def Pullback (f : B' → B) (E : B → Type*) : B' → Type _ := fun x => E (f x)
 #align bundle.pullback Bundle.Pullback
 
 @[inherit_doc]
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -2,14 +2,11 @@
 Copyright © 2021 Nicolò Cavalleri. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Nicolò Cavalleri
-
-! This file was ported from Lean 3 source module data.bundle
-! leanprover-community/mathlib commit e473c3198bb41f68560cab68a0529c854b618833
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Algebra.Module.Basic
 
+#align_import data.bundle from "leanprover-community/mathlib"@"e473c3198bb41f68560cab68a0529c854b618833"
+
 /-!
 # Bundle
 Basic data structure to implement fiber bundles, vector bundles (maybe fibrations?), etc. This file
refactor: redefine Bundle.TotalSpace (#5720)

Forward-port leanprover-community/mathlib#19221

Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Nicolò Cavalleri
 
 ! This file was ported from Lean 3 source module data.bundle
-! leanprover-community/mathlib commit 9aba7801eeecebb61f58a5763c2b6dd1b47dc6ef
+! leanprover-community/mathlib commit e473c3198bb41f68560cab68a0529c854b618833
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -17,179 +17,149 @@ should contain all possible results that do not involve any topology.
 
 We represent a bundle `E` over a base space `B` as a dependent type `E : B → Type _`.
 
-We provide a type synonym of `Σ x, E x` as `Bundle.TotalSpace E`, to be able to endow it with
-a topology which is not the disjoint union topology `Sigma.TopologicalSpace`. In general, the
-constructions of fiber bundles we will make will be of this form.
+We define `Bundle.TotalSpace F E` to be the type of pairs `⟨b, x⟩`, where `b : B` and `x : E b`.
+This type is isomorphic to `Σ x, E x` and uses an extra argument `F` for reasons explained below. In
+general, the constructions of fiber bundles we will make will be of this form.
 
 ## Main Definitions
 
 * `Bundle.TotalSpace` the total space of a bundle.
-* `Bundle.TotalSpace.proj` the projection from the total space to the base space.
-* `Bundle.totalSpaceMk` the constructor for the total space.
+* `bundle.total_space.proj` the projection from the total space to the base space.
+* `bundle.total_space.mk` the constructor for the total space.
+
+## Implementation Notes
+
+- We use a custom structure for the total space of a bundle instead of using a type synonym for the
+  canonical disjoint union `Σ x, E x` because the total space usually has a different topology and
+  Lean 4 `simp` fails to apply lemmas about `Σ x, E x` to elements of the total space.
+
+- The definition of `Bundle.TotalSpace` has an unused argument `F`. The reason is that in some
+  constructions (e.g., `bundle.continuous_linear_map.vector_bundle`) we need access to the atlas of
+  trivializations of original fiber bundles to construct the topology on the total space of the new
+  fiber bundle.
 
 ## References
 - https://en.wikipedia.org/wiki/Bundle_(mathematics)
 -/
 
+open Function Set
 
 namespace Bundle
 
-variable {B : Type _} (E : B → Type _)
+variable {B F : Type _} (E : B → Type _)
 
-/-- `Bundle.TotalSpace E` is the total space of the bundle `Σ x, E x`.
-This type synonym is used to avoid conflicts with general sigma types.
+/-- `Bundle.TotalSpace F E` is the total space of the bundle. It consists of pairs
+`(proj : B, snd : E proj)`.
 -/
-def TotalSpace :=
-  Σx, E x
+@[ext]
+structure TotalSpace (F : Type _) (E : B → Type _) where
+  /-- `Bundle.TotalSpace.proj` is the canonical projection `Bundle.TotalSpace F E → B` from the
+  total space to the base space. -/
+  proj : B
+  snd : E proj
 #align bundle.total_space Bundle.TotalSpace
 
-instance [Inhabited B] [Inhabited (E default)] : Inhabited (TotalSpace E) :=
+instance [Inhabited B] [Inhabited (E default)] : Inhabited (TotalSpace F E) :=
   ⟨⟨default, default⟩⟩
 
 variable {E}
 
-/-- `bundle.TotalSpace.proj` is the canonical projection `Bundle.TotalSpace E → B` from the
-total space to the base space. -/
-@[simp, reducible]
-def TotalSpace.proj : TotalSpace E → B :=
-  Sigma.fst
-#align bundle.total_space.proj Bundle.TotalSpace.proj
-
-/-- The canonical projection defining a bundle. -/
-scoped notation:max "π" E':max => Bundle.TotalSpace.proj (E := E')
-
-/-- Constructor for the total space of a bundle. -/
-@[simp, reducible]
-def totalSpaceMk (b : B) (a : E b) : Bundle.TotalSpace E :=
-  ⟨b, a⟩
-#align bundle.total_space_mk Bundle.totalSpaceMk
+@[inherit_doc]
+scoped notation:max "π" F':max E':max => Bundle.TotalSpace.proj (F := F') (E := E')
 
-theorem TotalSpace.proj_mk {x : B} {y : E x} : (totalSpaceMk x y).proj = x :=
-  rfl
-#align bundle.total_space.proj_mk Bundle.TotalSpace.proj_mk
-
-theorem sigma_mk_eq_totalSpaceMk {x : B} {y : E x} : Sigma.mk x y = totalSpaceMk x y :=
-  rfl
-#align bundle.sigma_mk_eq_total_space_mk Bundle.sigma_mk_eq_totalSpaceMk
+abbrev TotalSpace.mk' (F : Type _) (x : B) (y : E x) : TotalSpace F E := ⟨x, y⟩
 
 theorem TotalSpace.mk_cast {x x' : B} (h : x = x') (b : E x) :
-    totalSpaceMk x' (cast (congr_arg E h) b) = totalSpaceMk x b := by
-  subst h
-  rfl
+    .mk' F x' (cast (congr_arg E h) b) = TotalSpace.mk x b := by subst h; rfl
 #align bundle.total_space.mk_cast Bundle.TotalSpace.mk_cast
 
-theorem TotalSpace.eta (z : TotalSpace E) : totalSpaceMk z.proj z.2 = z :=
-  Sigma.eta z
-#align bundle.total_space.eta Bundle.TotalSpace.eta
+@[simp 1001, mfld_simps 1001]
+theorem TotalSpace.mk_inj {b : B} {y y' : E b} : mk' F b y = mk' F b y' ↔ y = y' := by
+  simp [TotalSpace.ext_iff]
 
-instance {x : B} : CoeTC (E x) (TotalSpace E) :=
-  ⟨totalSpaceMk x⟩
+theorem TotalSpace.mk_injective (b : B) : Injective (mk b : E b → TotalSpace F E) := fun _ _ ↦
+  mk_inj.1
 
--- porting note: removed simp attribute, variable as head symbol
-theorem coe_fst (x : B) (v : E x) : (v : TotalSpace E).fst = x :=
-  rfl
-#align bundle.coe_fst Bundle.coe_fst
+instance {x : B} : CoeTC (E x) (TotalSpace F E) :=
+  ⟨TotalSpace.mk x⟩
 
--- porting note: removed simp attribute, variable as head symbol
-theorem coe_snd {x : B} {y : E x} : (y : TotalSpace E).snd = y :=
-  rfl
-#align bundle.coe_snd Bundle.coe_snd
+#noalign bundle.total_space.coe_proj
+#noalign bundle.total_space.coe_snd
+#noalign bundle.total_space.coe_eq_mk
+
+theorem TotalSpace.eta (z : TotalSpace F E) : TotalSpace.mk z.proj z.2 = z := rfl
+#align bundle.total_space.eta Bundle.TotalSpace.eta
 
--- porting note: removed `to_total_space_coe`, syntactic tautology
-#noalign bundle.to_total_space_coe
+@[simp]
+theorem TotalSpace.exists {p : TotalSpace F E → Prop} : (∃ x, p x) ↔ ∃ b y, p ⟨b, y⟩ :=
+  ⟨fun ⟨x, hx⟩ ↦ ⟨x.1, x.2, hx⟩, fun ⟨b, y, h⟩ ↦ ⟨⟨b, y⟩, h⟩⟩
+
+@[simp]
+theorem TotalSpace.range_mk (b : B) : range ((↑) : E b → TotalSpace F E) = π F E ⁻¹' {b} := by
+  apply Subset.antisymm
+  · rintro _ ⟨x, rfl⟩
+    rfl
+  · rintro ⟨_, x⟩ rfl
+    exact ⟨x, rfl⟩
 
--- mathport name: «expr ×ᵇ »
-/-- The direct sum of two bundles. -/
-notation:100 -- notation for the direct sum of two bundles over the same base
-E₁ " ×ᵇ " E₂ => fun x => E₁ x × E₂ x
+/-- Notation for the direct sum of two bundles over the same base. -/
+notation:100 E₁ " ×ᵇ " E₂ => fun x => E₁ x × E₂ x
 
 /-- `Bundle.Trivial B F` is the trivial bundle over `B` of fiber `F`. -/
-def Trivial (B : Type _) (F : Type _) : B → Type _ :=
-  Function.const B F
+@[reducible, nolint unusedArguments]
+def Trivial (B : Type _) (F : Type _) : B → Type _ := fun _ => F
 #align bundle.trivial Bundle.Trivial
 
-instance {F : Type _} [Inhabited F] {b : B} : Inhabited (Bundle.Trivial B F b) :=
-  ⟨(default : F)⟩
-
 /-- The trivial bundle, unlike other bundles, has a canonical projection on the fiber. -/
-def Trivial.projSnd (B : Type _) (F : Type _) : TotalSpace (Bundle.Trivial B F) → F :=
-  Sigma.snd
-#align bundle.trivial.proj_snd Bundle.Trivial.projSnd
+def TotalSpace.trivialSnd (B : Type _) (F : Type _) : TotalSpace F (Bundle.Trivial B F) → F :=
+  TotalSpace.snd
+#align bundle.total_space.trivial_snd Bundle.TotalSpace.trivialSnd
+
+/-- A trivial bundle is equivalent to the product `B × F`. -/
+@[simps (config := { attrs := [`simp, `mfld_simps] })]
+def TotalSpace.toProd (B F : Type _) : (TotalSpace F fun _ : B => F) ≃ B × F where
+  toFun x := (x.1, x.2)
+  invFun x := ⟨x.1, x.2⟩
+  left_inv := fun ⟨_, _⟩ => rfl
+  right_inv := fun ⟨_, _⟩ => rfl
+#align bundle.total_space.to_prod Bundle.TotalSpace.toProd
 
 section Pullback
 
 variable {B' : Type _}
 
-/-- The pullback of a bundle `E` over a base `B` under a map `f : B' → B`, denoted by `Pullback f E`
-or `f *ᵖ E`,  is the bundle over `B'` whose fiber over `b'` is `E (f b')`. -/
--- porting note: `has_nonempty_instance` linter not found
---  @[nolint has_nonempty_instance]
-def Pullback (f : B' → B) (E : B → Type _) := fun x => E (f x)
+/-- The pullback of a bundle `E` over a base `B` under a map `f : B' → B`, denoted by
+`Bundle.Pullback f E` or `f *ᵖ E`, is the bundle over `B'` whose fiber over `b'` is `E (f b')`. -/
+def Pullback (f : B' → B) (E : B → Type _) : B' → Type _ := fun x => E (f x)
 #align bundle.pullback Bundle.Pullback
 
--- mathport name: «expr *ᵖ »
 @[inherit_doc]
-notation f " *ᵖ " E => Pullback f E
+notation f " *ᵖ " E:arg => Pullback f E
+
+instance {f : B' → B} {x : B'} [Nonempty (E (f x))] : Nonempty ((f *ᵖ E) x) :=
+  ‹Nonempty (E (f x))›
 
-/-- Natural embedding of the total space of `f *ᵖ E` into `B' × TotalSpace E`. -/
+/-- Natural embedding of the total space of `f *ᵖ E` into `B' × TotalSpace F E`. -/
 @[simp]
-def pullbackTotalSpaceEmbedding (f : B' → B) : TotalSpace (f *ᵖ E) → B' × TotalSpace E := fun z =>
-  (z.proj, totalSpaceMk (f z.proj) z.2)
+def pullbackTotalSpaceEmbedding (f : B' → B) : TotalSpace F (f *ᵖ E) → B' × TotalSpace F E :=
+  fun z => (z.proj, TotalSpace.mk (f z.proj) z.2)
 #align bundle.pullback_total_space_embedding Bundle.pullbackTotalSpaceEmbedding
 
 /-- The base map `f : B' → B` lifts to a canonical map on the total spaces. -/
-def Pullback.lift (f : B' → B) : TotalSpace (f *ᵖ E) → TotalSpace E := fun z =>
-  totalSpaceMk (f z.proj) z.2
+@[simps (config := { isSimp := true, attrs := [`mfld_simps] })]
+def Pullback.lift (f : B' → B) : TotalSpace F (f *ᵖ E) → TotalSpace F E := fun z => ⟨f z.proj, z.2⟩
 #align bundle.pullback.lift Bundle.Pullback.lift
 
-@[simp]
-theorem Pullback.proj_lift (f : B' → B) (x : TotalSpace (f *ᵖ E)) :
-    (Pullback.lift f x).proj = f x.1 :=
-  rfl
-#align bundle.pullback.proj_lift Bundle.Pullback.proj_lift
-
-@[simp]
+@[simp, mfld_simps]
 theorem Pullback.lift_mk (f : B' → B) (x : B') (y : E (f x)) :
-    Pullback.lift f (totalSpaceMk x y) = totalSpaceMk (f x) y :=
+    Pullback.lift f (.mk' F x y) = ⟨f x, y⟩ :=
   rfl
 #align bundle.pullback.lift_mk Bundle.Pullback.lift_mk
 
-theorem pullbackTotalSpaceEmbedding_snd (f : B' → B) (x : TotalSpace (f *ᵖ E)) :
-    (pullbackTotalSpaceEmbedding f x).2 = Pullback.lift f x :=
-  rfl
-#align bundle.pullback_total_space_embedding_snd Bundle.pullbackTotalSpaceEmbedding_snd
-
 end Pullback
 
-section FiberStructures
-
-variable [∀ x, AddCommMonoid (E x)]
-
-@[simp]
-theorem coe_snd_map_apply (x : B) (v w : E x) :
-    (↑(v + w) : TotalSpace E).snd = (v : TotalSpace E).snd + (w : TotalSpace E).snd :=
-  rfl
-#align bundle.coe_snd_map_apply Bundle.coe_snd_map_apply
-
-variable (R : Type _) [Semiring R] [∀ x, Module R (E x)]
-
-@[simp]
-theorem coe_snd_map_smul (x : B) (r : R) (v : E x) :
-    (↑(r • v) : TotalSpace E).snd = r • (v : TotalSpace E).snd :=
-  rfl
-#align bundle.coe_snd_map_smul Bundle.coe_snd_map_smul
-
-end FiberStructures
-
-section TrivialInstances
-
-variable {F : Type _} {R : Type _} [Semiring R] (b : B)
-
-instance [AddCommMonoid F] : AddCommMonoid (Bundle.Trivial B F b) :=
-  ‹AddCommMonoid F›
-
-instance [AddCommGroup F] : AddCommGroup (Bundle.Trivial B F b) :=
-  ‹AddCommGroup F›
+-- Porting note: not needed since Lean unfolds coercion
+#noalign bundle.coe_snd_map_apply
+#noalign bundle.coe_snd_map_smul
 
-instance [AddCommMonoid F] [Module R F] : Module R (Bundle.Trivial B F b) :=
-  ‹Module R F›
+end Bundle
fix: precedence of Bundle.TotalSpace.proj (#5590)
Diff
@@ -56,7 +56,7 @@ def TotalSpace.proj : TotalSpace E → B :=
 #align bundle.total_space.proj Bundle.TotalSpace.proj
 
 /-- The canonical projection defining a bundle. -/
-scoped notation "π" E':max => Bundle.TotalSpace.proj (E := E')
+scoped notation:max "π" E':max => Bundle.TotalSpace.proj (E := E')
 
 /-- Constructor for the total space of a bundle. -/
 @[simp, reducible]
feat: port Geometry.Manifold.VectorBundle.Tangent (#5448)

Co-authored-by: Jeremy Tan Jie Rui <reddeloostw@gmail.com>

Diff
@@ -55,10 +55,8 @@ def TotalSpace.proj : TotalSpace E → B :=
   Sigma.fst
 #align bundle.total_space.proj Bundle.TotalSpace.proj
 
--- this notation won't be used in the pretty-printer
-set_option quotPrecheck false in
 /-- The canonical projection defining a bundle. -/
-scoped notation "π" E => @Bundle.TotalSpace.proj _ E
+scoped notation "π" E':max => Bundle.TotalSpace.proj (E := E')
 
 /-- Constructor for the total space of a bundle. -/
 @[simp, reducible]
feat: port Topology.FiberBundle.Trivialization (#2707)
Diff
@@ -55,11 +55,10 @@ def TotalSpace.proj : TotalSpace E → B :=
   Sigma.fst
 #align bundle.total_space.proj Bundle.TotalSpace.proj
 
--- mathport name: exprπ
 -- this notation won't be used in the pretty-printer
 set_option quotPrecheck false in
 /-- The canonical projection defining a bundle. -/
-scoped notation "π" => @Bundle.TotalSpace.proj _
+scoped notation "π" E => @Bundle.TotalSpace.proj _ E
 
 /-- Constructor for the total space of a bundle. -/
 @[simp, reducible]
chore: Rename Type* to Type _ (#1866)

A bunch of docstrings were still mentioning Type*. This changes them to Type _.

Diff
@@ -15,7 +15,7 @@ import Mathlib.Algebra.Module.Basic
 Basic data structure to implement fiber bundles, vector bundles (maybe fibrations?), etc. This file
 should contain all possible results that do not involve any topology.
 
-We represent a bundle `E` over a base space `B` as a dependent type `E : B → Type*`.
+We represent a bundle `E` over a base space `B` as a dependent type `E : B → Type _`.
 
 We provide a type synonym of `Σ x, E x` as `Bundle.TotalSpace E`, to be able to endow it with
 a topology which is not the disjoint union topology `Sigma.TopologicalSpace`. In general, the
chore: format by line breaks (#1523)

During porting, I usually fix the desired format we seem to want for the line breaks around by with

awk '{do {{if (match($0, "^  by$") && length(p) < 98) {p=p " by";} else {if (NR!=1) {print p}; p=$0}}} while (getline == 1) if (getline==0) print p}' Mathlib/File/Im/Working/On.lean

I noticed there are some more files that slipped through.

This pull request is the result of running this command:

grep -lr "^  by\$" Mathlib | xargs -n 1 awk -i inplace '{do {{if (match($0, "^  by$") && length(p) < 98 && not (match(p, "^[ \t]*--"))) {p=p " by";} else {if (NR!=1) {print p}; p=$0}}} while (getline == 1) if (getline==0) print p}'

Co-authored-by: Moritz Firsching <firsching@google.com>

Diff
@@ -76,8 +76,7 @@ theorem sigma_mk_eq_totalSpaceMk {x : B} {y : E x} : Sigma.mk x y = totalSpaceMk
 #align bundle.sigma_mk_eq_total_space_mk Bundle.sigma_mk_eq_totalSpaceMk
 
 theorem TotalSpace.mk_cast {x x' : B} (h : x = x') (b : E x) :
-    totalSpaceMk x' (cast (congr_arg E h) b) = totalSpaceMk x b :=
-  by
+    totalSpaceMk x' (cast (congr_arg E h) b) = totalSpaceMk x b := by
   subst h
   rfl
 #align bundle.total_space.mk_cast Bundle.TotalSpace.mk_cast
feat: port Data.Bundle (#1288)

Not sure what to do with:

set_option quotPrecheck false in
/-- The canonical projection defining a bundle. -/
scoped notation "π" => [@Bundle](https://github.com/Bundle).TotalSpace.proj _

But otherwise what seems like a fairly straightforward port.

Co-authored-by: Reid Barton <rwbarton@gmail.com>

Dependencies 3 + 141

142 files ported (97.9%)
57004 lines ported (98.2%)
Show graph

The unported dependencies are