Skip to content

Commit

Permalink
style: fix typos in porting notes (#10931)
Browse files Browse the repository at this point in the history
  • Loading branch information
pitmonticone authored and riccardobrasca committed Mar 1, 2024
1 parent b16cd2d commit 54b9575
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Group/Units.lean
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ theorem divp_divp_eq_divp_mul (x : α) (u₁ u₂ : αˣ) : x /ₚ u₁ /ₚ u
simp only [divp, mul_inv_rev, Units.val_mul, mul_assoc]
#align divp_divp_eq_divp_mul divp_divp_eq_divp_mul

/- Port note: to match the mathlib3 behavior, this needs to have higher simp
/- Porting note: to match the mathlib3 behavior, this needs to have higher simp
priority than eq_divp_iff_mul_eq. -/
@[field_simps 1010]
theorem divp_eq_iff_mul_eq {x : α} {u : αˣ} {y : α} : x /ₚ u = y ↔ y * u = x :=
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Group/WithOne/Defs.lean
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ protected theorem cases_on {P : WithOne α → Prop} : ∀ x : WithOne α, P 1
#align with_one.cases_on WithOne.cases_on
#align with_zero.cases_on WithZero.cases_on

-- port note: I don't know if `elab_as_elim` is being added to the additivised declaration.
-- Porting note: I don't know if `elab_as_elim` is being added to the additivised declaration.
attribute [elab_as_elim] WithZero.cases_on

@[to_additive]
Expand Down
4 changes: 2 additions & 2 deletions Mathlib/CategoryTheory/Sites/Subsheaf.lean
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def Subpresheaf.familyOfElementsOfSection {U : Cᵒᵖ} (s : F.obj U) :
theorem Subpresheaf.family_of_elements_compatible {U : Cᵒᵖ} (s : F.obj U) :
(G.familyOfElementsOfSection s).Compatible := by
intro Y₁ Y₂ Z g₁ g₂ f₁ f₂ h₁ h₂ e
refine Subtype.ext ?_ -- port note: `ext1` does not work here
refine Subtype.ext ?_ -- Porting note: `ext1` does not work here
change F.map g₁.op (F.map f₁.op s) = F.map g₂.op (F.map f₂.op s)
rw [← FunctorToTypes.map_comp_apply, ← FunctorToTypes.map_comp_apply, ← op_comp, ← op_comp, e]
#align category_theory.grothendieck_topology.subpresheaf.family_of_elements_compatible CategoryTheory.GrothendieckTopology.Subpresheaf.family_of_elements_compatible
Expand Down Expand Up @@ -459,7 +459,7 @@ noncomputable def imageFactorization {F F' : Sheaf J TypeMax.{v, u}} (f : F ⟶
F := imageMonoFactorization f
isImage :=
{ lift := fun I => by
-- port note: need to specify the target category (TypeMax.{v, u}) for this to work.
-- Porting note: need to specify the target category (TypeMax.{v, u}) for this to work.
haveI M := (Sheaf.Hom.mono_iff_presheaf_mono J TypeMax.{v, u} _).mp I.m_mono
haveI := isIso_toImagePresheaf I.m.1
refine' ⟨Subpresheaf.homOfLe _ ≫ inv (toImagePresheaf I.m.1)⟩
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Data/List/Sublists.lean
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ theorem sublists_append (l₁ l₂ : List α) :
simp [List.bind, join_join, Function.comp]
#align list.sublists_append List.sublists_append

--Portin note: New theorem
--Porting note: New theorem
theorem sublists_cons (a : α) (l : List α) :
sublists (a :: l) = sublists l >>= (fun x => [x, a :: x]) :=
show sublists ([a] ++ l) = _ by
Expand Down
4 changes: 2 additions & 2 deletions Mathlib/Data/Matrix/DMatrix.lean
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def row {α : n → Type v} (v : ∀ j, α j) : DMatrix Unit n fun _i j => α j
| _x, y => v y
#align dmatrix.row DMatrix.row

-- port note: Old proof is Pi.inhabited.
-- Porting note: Old proof is Pi.inhabited.
instance [inst : ∀ i j, Inhabited (α i j)] : Inhabited (DMatrix m n α) :=
fun i j => (inst i j).default⟩

Expand Down Expand Up @@ -115,7 +115,7 @@ instance [∀ i j, AddCommGroup (α i j)] : AddCommGroup (DMatrix m n α) :=
instance [∀ i j, Unique (α i j)] : Unique (DMatrix m n α) :=
Pi.unique

-- Port note: old proof is Pi.Subsingleton
-- Porting note: old proof is Pi.Subsingleton
instance [∀ i j, Subsingleton (α i j)] : Subsingleton (DMatrix m n α) :=
by constructor; simp only [DMatrix, eq_iff_true_of_subsingleton, implies_true]

Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Geometry/RingedSpace/PresheafedSpace/Gluing.lean
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ theorem opensImagePreimageMap_app_assoc (i j k : D.J) (U : Opens (D.U i).carrier
/-- (Implementation) Given an open subset of one of the spaces `U ⊆ Uᵢ`, the sheaf component of
the image `ι '' U` in the glued space is the limit of this diagram. -/
abbrev diagramOverOpen {i : D.J} (U : Opens (D.U i).carrier) :
-- Portinge note : ↓ these need to be explicit
-- Porting note : ↓ these need to be explicit
(WalkingMultispan D.diagram.fstFrom D.diagram.sndFrom)ᵒᵖ ⥤ C :=
componentwiseDiagram 𝖣.diagram.multispan ((D.ι_openEmbedding i).isOpenMap.functor.obj U)
#align algebraic_geometry.PresheafedSpace.glue_data.diagram_over_open AlgebraicGeometry.PresheafedSpace.GlueData.diagramOverOpen
Expand Down
6 changes: 3 additions & 3 deletions Mathlib/Logic/Embedding/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ universe u v w x

namespace Function

-- port note: in Lean 3 this was tagged @[nolint has_nonempty_instance]
-- Porting note: in Lean 3 this was tagged @[nolint has_nonempty_instance]
/-- `α ↪ β` is a bundled injective function. -/
structure Embedding (α : Sort*) (β : Sort*) where
/-- An embedding as a function. Use coercion instead. -/
Expand Down Expand Up @@ -96,7 +96,7 @@ instance Equiv.Perm.coeEmbedding : Coe (Equiv.Perm α) (α ↪ α) :=
Equiv.coeEmbedding
#align equiv.perm.coe_embedding Equiv.Perm.coeEmbedding

-- port note : `theorem Equiv.coe_eq_to_embedding : ↑f = f.toEmbedding` is a
-- Porting note : `theorem Equiv.coe_eq_to_embedding : ↑f = f.toEmbedding` is a
-- syntactic tautology in Lean 4

end Equiv
Expand All @@ -114,7 +114,7 @@ theorem ext {α β} {f g : Embedding α β} (h : ∀ x, f x = g x) : f = g :=
DFunLike.ext f g h
#align function.embedding.ext Function.Embedding.ext

-- port note : in Lean 3 `DFunLike.ext_iff.symm` works
-- Porting note : in Lean 3 `DFunLike.ext_iff.symm` works
theorem ext_iff {α β} {f g : Embedding α β} : (∀ x, f x = g x) ↔ f = g :=
Iff.symm (DFunLike.ext_iff)
#align function.embedding.ext_iff Function.Embedding.ext_iff
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/SetTheory/Cardinal/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,7 @@ lemma exists_eq_of_iSup_eq_of_not_isLimit
rw [← le_zero_iff] at h ⊢
exact (le_ciSup hf _).trans h

-- Portin note: simpNF is not happy with universe levels.
-- Porting note: simpNF is not happy with universe levels.
@[simp, nolint simpNF]
theorem lift_mk_shrink (α : Type u) [Small.{v} α] :
Cardinal.lift.{max u w} #(Shrink.{v} α) = Cardinal.lift.{max v w} #α :=
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Tactic/FieldSimp.lean
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ partial def discharge (prop : Expr) : SimpM (Option Expr) :=
let ctx ← readThe Simp.Context
let usedTheorems := (← get).usedTheorems

-- Port note: mathlib3's analogous field_simp discharger `field_simp.ne_zero`
-- Porting note: mathlib3's analogous field_simp discharger `field_simp.ne_zero`
-- does not explicitly call `simp` recursively like this. It's unclear to me
-- whether this is because
-- 1) Lean 3 simp dischargers automatically call `simp` recursively. (Do they?),
Expand Down

0 comments on commit 54b9575

Please sign in to comment.