Skip to content

Commit 9afc927

Browse files
committed
chore: golf proofs (leanprover-community#33549)
1 parent 9fc63c7 commit 9afc927

File tree

13 files changed

+1
-19
lines changed

13 files changed

+1
-19
lines changed

Mathlib/AlgebraicTopology/SimplicialSet/StdSimplex.lean

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,6 @@ lemma face_eq_ofSimplex {n : ℕ} (S : Finset (Fin (n + 1))) (m : ℕ) (e : Fin
234234
monotone' := (objEquiv x).toOrderHom.monotone }
235235
refine ⟨Quiver.Hom.op
236236
(SimplexCategory.Hom.mk ((e.symm.toOrderEmbedding.toOrderHom.comp φ))), ?_⟩
237-
obtain ⟨f, rfl⟩ := objEquiv.symm.surjective x
238237
ext j : 1
239238
simpa only [Subtype.ext_iff] using e.apply_symm_apply ⟨_, hx j⟩
240239
· simp

Mathlib/CategoryTheory/Generator/Presheaf.lean

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,8 @@ lemma freeYonedaHomEquiv_comp {X : C} {M : A} {F G : Cᵒᵖ ⥤ A}
6060
lemma freeYonedaHomEquiv_symm_comp {X : C} {M : A} {F G : Cᵒᵖ ⥤ A} (α : M ⟶ F.obj (op X))
6161
(f : F ⟶ G) :
6262
freeYonedaHomEquiv.symm α ≫ f = freeYonedaHomEquiv.symm (α ≫ f.app (op X)) := by
63-
obtain ⟨β, rfl⟩ := freeYonedaHomEquiv.surjective α
6463
apply freeYonedaHomEquiv.injective
65-
simp only [Equiv.symm_apply_apply, freeYonedaHomEquiv_comp, Equiv.apply_symm_apply]
64+
simp only [freeYonedaHomEquiv_comp, Equiv.apply_symm_apply]
6665

6766
variable (C)
6867

Mathlib/CategoryTheory/Localization/CalculusOfFractions/Preadditive.lean

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -257,17 +257,13 @@ noncomputable def add (f₁ f₂ : X' ⟶ Y') : X' ⟶ Y' :=
257257
@[reassoc]
258258
lemma add_comp (f₁ f₂ : X' ⟶ Y') (g : Y' ⟶ Z') :
259259
add W eX eY f₁ f₂ ≫ g = add W eX eZ (f₁ ≫ g) (f₂ ≫ g) := by
260-
obtain ⟨f₁, rfl⟩ := (homEquiv eX eY).symm.surjective f₁
261-
obtain ⟨f₂, rfl⟩ := (homEquiv eX eY).symm.surjective f₂
262260
obtain ⟨g, rfl⟩ := (homEquiv eY eZ).symm.surjective g
263261
simp [add]
264262

265263
@[reassoc]
266264
lemma comp_add (f : X' ⟶ Y') (g₁ g₂ : Y' ⟶ Z') :
267265
f ≫ add W eY eZ g₁ g₂ = add W eX eZ (f ≫ g₁) (f ≫ g₂) := by
268266
obtain ⟨f, rfl⟩ := (homEquiv eX eY).symm.surjective f
269-
obtain ⟨g₁, rfl⟩ := (homEquiv eY eZ).symm.surjective g₁
270-
obtain ⟨g₂, rfl⟩ := (homEquiv eY eZ).symm.surjective g₂
271267
simp [add]
272268

273269
lemma add_eq_add {X'' Y'' : C} (eX' : L.obj X'' ≅ X') (eY' : L.obj Y'' ≅ Y')

Mathlib/Data/QPF/Univariate/Basic.lean

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ theorem id_map {α : Type _} (x : F α) : id <$> x = x := by
7878
theorem comp_map {α β γ : Type _} (f : α → β) (g : β → γ) (x : F α) :
7979
(g ∘ f) <$> x = g <$> f <$> x := by
8080
rw [← abs_repr x]
81-
obtain ⟨a, f⟩ := repr x
8281
rw [← abs_map, ← abs_map, ← abs_map]
8382
rfl
8483

Mathlib/Data/Seq/Computation.lean

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,6 @@ theorem get_thinkN (n) : get (thinkN s n) = get s :=
409409
theorem get_promises : s ~> get s := fun _ => get_eq_of_mem _
410410

411411
theorem mem_of_promises {a} (p : s ~> a) : a ∈ s := by
412-
obtain ⟨h⟩ := h
413412
obtain ⟨a', h⟩ := h
414413
rw [p h]
415414
exact h

Mathlib/Data/Sigma/Lex.lean

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ theorem lex_iff : Lex r s a b ↔ r a.1 b.1 ∨ ∃ h : a.1 = b.1, s b.1 (h.rec
5151
· exact Or.inl hij
5252
· exact Or.inr ⟨rfl, hab⟩
5353
· obtain ⟨i, a⟩ := a
54-
obtain ⟨j, b⟩ := b
5554
dsimp only
5655
rintro (h | ⟨rfl, h⟩)
5756
· exact Lex.left _ _ h
@@ -153,7 +152,6 @@ theorem lex_iff {a b : Σ' i, α i} :
153152
· exact Or.inl hij
154153
· exact Or.inr ⟨rfl, hab⟩
155154
· obtain ⟨i, a⟩ := a
156-
obtain ⟨j, b⟩ := b
157155
dsimp only
158156
rintro (h | ⟨rfl, h⟩)
159157
· exact Lex.left _ _ h

Mathlib/Data/WSeq/Basic.lean

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,6 @@ theorem eq_or_mem_iff_mem {s : WSeq α} {a a' s'} :
433433
simp at this
434434
· obtain ⟨i1, i2⟩ := this
435435
rw [i1, i2]
436-
obtain ⟨f, al⟩ := s'
437436
dsimp only [cons, Membership.mem, WSeq.Mem, Seq.Mem, Seq.cons]
438437
have h_a_eq_a' : a = a' ↔ some (some a) = some (some a') := by simp
439438
rw [h_a_eq_a']

Mathlib/LinearAlgebra/Basis/Submodule.lean

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ theorem Basis.eq_bot_of_rank_eq_zero [NoZeroDivisors R] (b : Basis ι R M) (N :
6464
refine ⟨1, fun _ => ⟨x, hx⟩, ?_, one_ne_zero⟩
6565
rw [Fintype.linearIndependent_iff]
6666
rintro g sum_eq i
67-
obtain ⟨_, hi⟩ := i
6867
simp only [Fin.default_eq_zero, Finset.univ_unique,
6968
Finset.sum_singleton] at sum_eq
7069
convert (b.smul_eq_zero.mp sum_eq).resolve_right x_ne

Mathlib/LinearAlgebra/CliffordAlgebra/Fold.lean

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,6 @@ theorem foldr'Aux_apply_apply (f : M →ₗ[R] CliffordAlgebra Q × N →ₗ[R]
179179
theorem foldr'Aux_foldr'Aux (f : M →ₗ[R] CliffordAlgebra Q × N →ₗ[R] N)
180180
(hf : ∀ m x fx, f m (ι Q m * x, f m (x, fx)) = Q m • fx) (v : M) (x_fx) :
181181
foldr'Aux Q f v (foldr'Aux Q f v x_fx) = Q v • x_fx := by
182-
obtain ⟨x, fx⟩ := x_fx
183182
simp only [foldr'Aux_apply_apply]
184183
rw [← mul_assoc, ι_sq_scalar, ← Algebra.smul_def, hf, Prod.smul_mk]
185184

Mathlib/Logic/Equiv/Fin/Rotate.lean

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ theorem lt_finRotate_iff_ne_neg_one [NeZero n] (i : Fin n) :
102102

103103
lemma coe_finRotate_symm_of_ne_zero [NeZero n] {i : Fin n} (hi : i ≠ 0) :
104104
((finRotate _).symm i : ℕ) = i - 1 := by
105-
obtain ⟨n, rfl⟩ := exists_eq_succ_of_ne_zero (NeZero.ne n)
106105
rwa [finRotate_succ_symm_apply, Fin.val_sub_one_of_ne_zero]
107106

108107
theorem finRotate_symm_lt_iff_ne_zero [NeZero n] (i : Fin n) :

0 commit comments

Comments
 (0)