Skip to content

Commit f2ea2f2

Browse files
felixperneggerReemMelamed
authored andcommitted
chore: replace (by rfl) with rfl (leanprover-community#40371)
Replaces `(by rfl)` with `rfl` whenever possible. Co-authored-by: Batixx <s59fpern@uni-bonn.de>
1 parent 10cd6b1 commit f2ea2f2

18 files changed

Lines changed: 21 additions & 21 deletions

File tree

Archive/Imo/Imo1982Q1.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ lemma part_1 : 660 ≤ f (1980) := by
9393
lemma part_2 : f 1980660 := by
9494
have h : 5 * f 1980 + 33 * f 35 * 660 + 33 := by
9595
calc (5 : ℕ+) * f 1980 + (33 : ℕ+) * f 3 ≤ f (5 * 1980 + 33 * 3) := by apply hf.superlinear
96-
_ = f 9999 := by rfl
96+
_ = f 9999 := rfl
9797
_ = 5 * 660 + 33 := by rw [hf.f_9999]
9898
rw [hf.f₃, mul_one] at h
9999
-- from 5 * f 1980 + 33 ≤ 5 * 660 + 33 we show f 1980 ≤ 660

Counterexamples/CharPZeroNeCharZero.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ namespace Counterexample
2424

2525
@[simp]
2626
theorem add_one_eq_one (x : WithZero Unit) : x + 1 = 1 :=
27-
WithZero.cases_on x (by rfl) fun h => by rfl
27+
WithZero.cases_on x rfl fun h => by rfl
2828

2929
theorem withZero_unit_charP_zero : CharP (WithZero Unit) 0 :=
3030
fun x => by cases x <;> simp⟩

Mathlib/Algebra/DirectSum/Internal.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ theorem Submodule.iSup_eq_toSubmodule_range [AddMonoid ι] [CommSemiring S] [Sem
320320
theorem DirectSum.coeAlgHom_of [AddMonoid ι] [CommSemiring S] [Semiring R] [Algebra S R]
321321
(A : ι → Submodule S R) [SetLike.GradedMonoid A] (i : ι) (x : A i) :
322322
DirectSum.coeAlgHom A (DirectSum.of (fun i => A i) i x) = x :=
323-
DirectSum.toSemiring_of _ (by rfl) (fun _ _ => (by rfl)) _ _
323+
DirectSum.toSemiring_of _ rfl (fun _ _ => rfl) _ _
324324

325325
end DirectSum
326326

Mathlib/Algebra/Order/CauSeq/Completion.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ theorem ofRat_injective : Function.Injective (ofRat : β → Cauchy abv) := fun
142142
simpa [ofRat, mk_eq, ← const_sub, const_limZero, sub_eq_zero] using h
143143

144144
instance Cauchy.ring : Ring (Cauchy abv) := fast_instance%
145-
Function.Surjective.ring mk Quotient.mk'_surjective (by rfl) (by rfl)
145+
Function.Surjective.ring mk Quotient.mk'_surjective rfl rfl
146146
(fun _ _ => (mk_add _ _).symm) (fun _ _ => (mk_mul _ _).symm) (fun _ => (mk_neg _).symm)
147147
(fun _ _ => (mk_sub _ _).symm) (fun _ _ => (mk_smul _ _).symm) (fun _ _ => (mk_smul _ _).symm)
148148
(fun _ _ => (mk_pow _ _).symm) (fun _ => rfl) fun _ => rfl
@@ -170,7 +170,7 @@ variable {α : Type*} [Field α] [LinearOrder α] [IsStrictOrderedRing α]
170170
variable {β : Type*} [CommRing β] {abv : β → α} [IsAbsoluteValue abv]
171171

172172
instance Cauchy.commRing : CommRing (Cauchy abv) := fast_instance%
173-
Function.Surjective.commRing mk Quotient.mk'_surjective (by rfl) (by rfl)
173+
Function.Surjective.commRing mk Quotient.mk'_surjective rfl rfl
174174
(fun _ _ => (mk_add _ _).symm) (fun _ _ => (mk_mul _ _).symm) (fun _ => (mk_neg _).symm)
175175
(fun _ _ => (mk_sub _ _).symm) (fun _ _ => (mk_smul _ _).symm) (fun _ _ => (mk_smul _ _).symm)
176176
(fun _ _ => (mk_pow _ _).symm) (fun _ => rfl) fun _ => rfl

Mathlib/Analysis/SpecialFunctions/Gamma/Beta.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ theorem GammaSeq_add_one_left (s : ℂ) {n : ℕ} (hn : n ≠ 0) :
242242
← mul_assoc, mul_comm _ (Finset.prod _ _)]
243243
congr 3
244244
· rw [cpow_add _ _ (Nat.cast_ne_zero.mpr hn), cpow_one, mul_comm]
245-
· refine Finset.prod_congr (by rfl) fun x _ => ?_
245+
· refine Finset.prod_congr rfl fun x _ => ?_
246246
push_cast; ring
247247
· abel
248248

Mathlib/CategoryTheory/Category/PartialFun.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ noncomputable def partialFunEquivPointed : PartialFun.{u} ≌ Pointed where
146146
exact hw.symm
147147
counitIso :=
148148
NatIso.ofComponents
149-
(fun X ↦ Pointed.Iso.mk (by classical exact Equiv.optionSubtypeNe X.point) (by rfl))
149+
(fun X ↦ Pointed.Iso.mk (by classical exact Equiv.optionSubtypeNe X.point) rfl)
150150
fun {X Y} f ↦ Pointed.Hom.ext <| funext fun a ↦ by
151151
obtain _ | ⟨a, ha⟩ := a
152152
· exact f.map_point.symm

Mathlib/CategoryTheory/Sites/Sheaf.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def conesEquivSieveCompatibleFamily :
103103
toFun π :=
104104
⟨fun _ f h => π.app (op ⟨Over.mk f, h⟩), fun X Y f g hf => by
105105
let φ : S.arrows.categoryMk (g ≫ f) (S.downward_closed hf g) ⟶
106-
S.arrows.categoryMk f hf := ObjectProperty.homMk (Over.homMk _ (by rfl))
106+
S.arrows.categoryMk f hf := ObjectProperty.homMk (Over.homMk _ rfl)
107107
simpa using! π.naturality φ.op⟩
108108
invFun x :=
109109
{ app := fun f => x.1 f.unop.1.hom f.unop.2

Mathlib/Data/Vector/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ def casesOn₃ {motive : ∀ {n}, Vector α n → Vector β n → Vector γ n
522522

523523
/-- Cast a vector to an array. -/
524524
def toArray : Vector α n → Array α
525-
| ⟨xs, _⟩ => cast (by rfl) xs.toArray
525+
| ⟨xs, _⟩ => xs.toArray
526526

527527
section InsertIdx
528528

Mathlib/Dynamics/Flow.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ theorem IsFactorOf.trans (h₁ : IsFactorOf ϕ ψ) (h₂ : IsFactorOf ψ χ) : I
247247
h₁.elim fun π hπ => h₂.elim fun ρ hρ => ⟨π ∘ ρ, hρ.comp χ ψ ϕ hπ⟩
248248

249249
/-- Every flow is a factor of itself. -/
250-
theorem IsFactorOf.self : IsFactorOf ϕ ϕ := ⟨id, (isSemiconjugacy_id_iff_eq ϕ ϕ).mpr (by rfl)
250+
theorem IsFactorOf.self : IsFactorOf ϕ ϕ := ⟨id, (isSemiconjugacy_id_iff_eq ϕ ϕ).mpr rfl⟩
251251

252252
end Flow
253253

Mathlib/FieldTheory/IntermediateField/Adjoin/Defs.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ instance : Algebra A⟮b⟯ A⟮(algebraMap B C) b⟯ :=
601601
RingHom.toAlgebra (RingHom.adjoinAlgebraMap _)
602602

603603
instance : IsScalarTower A⟮b⟯ A⟮(algebraMap B C) b⟯ C :=
604-
IsScalarTower.of_algebraMap_eq' (by rfl)
604+
IsScalarTower.of_algebraMap_eq' rfl
605605

606606
end AdjoinSimple
607607

0 commit comments

Comments
 (0)