Skip to content

Commit

Permalink
chore: simplify some proofs for the 2024-03-16 nightly (#11547)
Browse files Browse the repository at this point in the history
Some small changes to adapt to the 2024-03-16 nightly that can land in advance.
  • Loading branch information
Ruben-VandeVelde committed Mar 21, 2024
1 parent 026dd70 commit c5a921e
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Mathlib/Data/List/Basic.lean
Expand Up @@ -1603,7 +1603,7 @@ theorem insertNth_comm (a b : α) :
| i + 1, 0, l => fun h => (Nat.not_lt_zero _ h).elim
| i + 1, j + 1, [] => by simp
| i + 1, j + 1, c :: l => fun h₀ h₁ => by
simp only [insertNth_succ_cons, insertNth._eq_1, cons.injEq, true_and]
simp only [insertNth_succ_cons, cons.injEq, true_and]
exact insertNth_comm a b i j l (Nat.le_of_succ_le_succ h₀) (Nat.le_of_succ_le_succ h₁)
#align list.insert_nth_comm List.insertNth_comm

Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Data/Nat/Order/Basic.lean
Expand Up @@ -323,7 +323,7 @@ theorem diag_induction (P : ℕ → ℕ → Prop) (ha : ∀ a, P (a + 1) (a + 1)
have _ : a + (b + 1) < (a + 1) + (b + 1) := by simp
apply diag_induction P ha hb hd a (b + 1)
apply lt_of_le_of_lt (Nat.le_succ _) h
termination_by a b c => a + b
termination_by a b _c => a + b
decreasing_by all_goals assumption
#align nat.diag_induction Nat.diag_induction

Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Data/Set/Enumerate.lean
Expand Up @@ -97,7 +97,7 @@ theorem enumerate_inj {n₁ n₂ : ℕ} {a : α} {s : Set α} (h_sel : ∀ s a,
simp_all only [add_comm, self_eq_add_left, Nat.add_succ, enumerate_eq_none_of_sel _ h]
| some =>
simp_all only [add_comm, self_eq_add_left, enumerate, Option.some.injEq,
Nat.add_succ, enumerate._eq_2, Nat.succ.injEq]
Nat.add_succ, Nat.succ.injEq]
exact ih h₁ h₂
#align set.enumerate_inj Set.enumerate_inj

Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Geometry/Manifold/VectorBundle/Basic.lean
Expand Up @@ -184,7 +184,7 @@ theorem contMDiffWithinAt_totalSpace (f : M → TotalSpace F E) {s : Set M} {x
intro hf
simp_rw [modelWithCornersSelf_prod, FiberBundle.extChartAt, Function.comp,
PartialEquiv.trans_apply, PartialEquiv.prod_coe, PartialEquiv.refl_coe, extChartAt_self_apply,
modelWithCornersSelf_coe, id_def]
modelWithCornersSelf_coe, Function.id_def]
refine (contMDiffWithinAt_prod_iff _).trans (and_congr ?_ Iff.rfl)
have h1 : (fun x => (f x).proj) ⁻¹' (trivializationAt F E (f x₀).proj).baseSet ∈ 𝓝[s] x₀ :=
((FiberBundle.continuous_proj F E).continuousWithinAt.comp hf (mapsTo_image f s))
Expand Down
6 changes: 4 additions & 2 deletions Mathlib/GroupTheory/Congruence.lean
Expand Up @@ -686,7 +686,8 @@ the additive congruence relations on the quotient of `M` by `c`."]
def correspondence : { d // c ≤ d } ≃o Con c.Quotient
where
toFun d :=
d.1.mapOfSurjective (↑) _ (by rw [mul_ker_mk_eq]; exact d.2) <| @exists_rep _ c.toSetoid
d.1.mapOfSurjective (↑) _ (by rw [mul_ker_mk_eq]; exact d.2) <|
@Quotient.exists_rep _ c.toSetoid
invFun d :=
⟨comap ((↑) : M → c.Quotient) (fun x y => rfl) d, fun x y h =>
show d x y by rw [c.eq.2 h]; exact d.refl _⟩
Expand All @@ -711,7 +712,8 @@ def correspondence : { d // c ≤ d } ≃o Con c.Quotient
constructor
· intros h x y hs
rcases h ⟨x, y, rfl, rfl, hs⟩ with ⟨a, b, hx, hy, ht⟩
exact t.1.trans (t.1.symm <| t.2 <| eq_rel.1 hx) (t.1.trans ht (t.2 <| eq_rel.1 hy))
exact t.1.trans (t.1.symm <| t.2 <| Quotient.eq_rel.1 hx)
(t.1.trans ht (t.2 <| Quotient.eq_rel.1 hy))
· intros h _ _ hs
rcases hs with ⟨a, b, hx, hy, Hs⟩
exact ⟨a, b, hx, hy, h Hs⟩
Expand Down
4 changes: 1 addition & 3 deletions Mathlib/MeasureTheory/Constructions/BorelSpace/Basic.lean
Expand Up @@ -1703,9 +1703,7 @@ theorem measure_eq_measure_preimage_add_measure_tsum_Ico_zpow [MeasurableSpace
rw [← measure_iUnion,
ENNReal.Ioo_zero_top_eq_iUnion_Ico_zpow (ENNReal.one_lt_coe_iff.2 ht) ENNReal.coe_ne_top,
preimage_iUnion, inter_iUnion]
· intro i j
simp only [Function.onFun]
intro hij
· intro i j hij
wlog h : i < j generalizing i j
· exact (this hij.symm (hij.lt_or_lt.resolve_left h)).symm
refine disjoint_left.2 fun x hx h'x => lt_irrefl (f x) ?_
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/MeasureTheory/SetSemiring.lean
Expand Up @@ -173,7 +173,7 @@ lemma exists_disjoint_finset_diff_eq (hC : IsSetSemiring C) (hs : s ∈ C) (hI :
· rw [Finset.coe_biUnion]
refine PairwiseDisjoint.biUnion ?_ ?_
· simp only [univ_eq_attach, mem_coe, id.def, iSup_eq_iUnion]
simp_rw [PairwiseDisjoint, Set.Pairwise, Function.onFun]
simp_rw [PairwiseDisjoint, Set.Pairwise]
intro x _ y _ hxy
have hxy_disj : Disjoint (x : Set α) y := by
by_contra h_contra
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Order/Partition/Finpartition.lean
Expand Up @@ -436,7 +436,7 @@ def avoid (b : α) : Finpartition (a \ b) :=
ofErase
(P.parts.image (· \ b))
(P.disjoint.image_finset_of_le fun a ↦ sdiff_le).supIndep
(by rw [sup_image, id_comp, Finset.sup_sdiff_right, ← id_def, P.sup_parts])
(by rw [sup_image, id_comp, Finset.sup_sdiff_right, ← Function.id_def, P.sup_parts])
#align finpartition.avoid Finpartition.avoid

@[simp]
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Order/SupIndep.lean
Expand Up @@ -267,7 +267,7 @@ theorem supIndep_product_iff {s : Finset ι} {t : Finset ι'} {f : ι × ι' →
refine' ⟨_, fun h => h.1.product h.2
simp_rw [supIndep_iff_pairwiseDisjoint]
refine' fun h => ⟨fun i hi j hj hij => _, fun i hi j hj hij => _⟩ <;>
simp_rw [Function.onFun, Finset.disjoint_sup_left, Finset.disjoint_sup_right] <;>
simp_rw [Finset.disjoint_sup_left, Finset.disjoint_sup_right] <;>
intro i' hi' j' hj'
· exact h (mk_mem_product hi hi') (mk_mem_product hj hj') (ne_of_apply_ne Prod.fst hij)
· exact h (mk_mem_product hi' hi) (mk_mem_product hj' hj) (ne_of_apply_ne Prod.snd hij)
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Topology/Algebra/Group/Basic.lean
Expand Up @@ -1757,7 +1757,7 @@ theorem compact_covered_by_mul_left_translates {K V : Set G} (hK : IsCompact K)
cases' hV with g₀ hg₀
refine' fun g _ => mem_iUnion.2 ⟨g₀ * g⁻¹, _⟩
refine' preimage_interior_subset_interior_preimage (continuous_const.mul continuous_id) _
rwa [mem_preimage, id_def, inv_mul_cancel_right]
rwa [mem_preimage, Function.id_def, inv_mul_cancel_right]
exact ⟨t, Subset.trans ht <| iUnion₂_mono fun g _ => interior_subset⟩
#align compact_covered_by_mul_left_translates compact_covered_by_mul_left_translates
#align compact_covered_by_add_left_translates compact_covered_by_add_left_translates
Expand Down

0 comments on commit c5a921e

Please sign in to comment.