combinatorics.quiver.coveringMathlib.Combinatorics.Quiver.Covering

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)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -257,17 +257,17 @@ theorem Prefunctor.pathStar_injective (hφ : ∀ u, Injective (φ.unit u)) (u :
   rintro ⟨v₁, p₁⟩
   induction' p₁ with x₁ y₁ p₁ e₁ ih <;> rintro ⟨y₂, p₂⟩ <;> cases' p₂ with x₂ _ p₂ e₂ <;>
       intro h <;>
-    simp only [Prefunctor.pathStar_apply, Prefunctor.mapPath_nil, Prefunctor.mapPath_cons] at h 
+    simp only [Prefunctor.pathStar_apply, Prefunctor.mapPath_nil, Prefunctor.mapPath_cons] at h
   · exfalso
     cases' h with h h'
-    rw [← path.eq_cast_iff_heq rfl h.symm, path.cast_cons] at h' 
+    rw [← path.eq_cast_iff_heq rfl h.symm, path.cast_cons] at h'
     exact (path.nil_ne_cons _ _) h'
   · exfalso
     cases' h with h h'
-    rw [← path.cast_eq_iff_heq rfl h, path.cast_cons] at h' 
+    rw [← path.cast_eq_iff_heq rfl h, path.cast_cons] at h'
     exact (path.cons_ne_nil _ _) h'
   · cases' h with hφy h'
-    rw [← path.cast_eq_iff_heq rfl hφy, path.cast_cons, path.cast_rfl_rfl] at h' 
+    rw [← path.cast_eq_iff_heq rfl hφy, path.cast_cons, path.cast_rfl_rfl] at h'
     have hφx := path.obj_eq_of_cons_eq_cons h'
     have hφp := path.heq_of_cons_eq_cons h'
     have hφe := HEq.trans (hom.cast_heq rfl hφy _).symm (path.hom_heq_of_cons_eq_cons h')
@@ -291,10 +291,10 @@ theorem Prefunctor.pathStar_surjective (hφ : ∀ u, Surjective (φ.unit u)) (u
   · use⟨u, path.nil⟩
     simp only [Prefunctor.mapPath_nil, eq_self_iff_true, heq_iff_eq, and_self_iff]
   · obtain ⟨⟨u', q'⟩, h⟩ := ih
-    simp only at h 
+    simp only at h
     obtain ⟨rfl, rfl⟩ := h
     obtain ⟨⟨u'', eu⟩, k⟩ := hφ u' ⟨_, ev⟩
-    simp at k 
+    simp at k
     obtain ⟨rfl, rfl⟩ := k
     use⟨_, q'.cons eu⟩
     simp only [Prefunctor.mapPath_cons, eq_self_iff_true, heq_iff_eq, and_self_iff]
Diff
@@ -3,10 +3,10 @@ Copyright (c) 2022 Antoine Labelle, Rémi Bottinelli. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Antoine Labelle, Rémi Bottinelli
 -/
-import Mathbin.Combinatorics.Quiver.Cast
-import Mathbin.Combinatorics.Quiver.Symmetric
-import Mathbin.Data.Sigma.Basic
-import Mathbin.Logic.Equiv.Basic
+import Combinatorics.Quiver.Cast
+import Combinatorics.Quiver.Symmetric
+import Data.Sigma.Basic
+import Logic.Equiv.Basic
 
 #align_import combinatorics.quiver.covering from "leanprover-community/mathlib"@"188a411e916e1119e502dbe35b8b475716362401"
 
Diff
@@ -49,70 +49,93 @@ universe u v w
 variable {U : Type _} [Quiver.{u + 1} U] {V : Type _} [Quiver.{v + 1} V] (φ : U ⥤q V) {W : Type _}
   [Quiver.{w + 1} W] (ψ : V ⥤q W)
 
+#print Quiver.Star /-
 /-- The `quiver.star` at a vertex is the collection of arrows whose source is the vertex.
 The type `quiver.star u` is defined to be `Σ (v : U), (u ⟶ v)`. -/
 @[reducible]
 def Quiver.Star (u : U) :=
   Σ v : U, u ⟶ v
 #align quiver.star Quiver.Star
+-/
 
+#print Quiver.Star.mk /-
 /-- Constructor for `quiver.star`. Defined to be `sigma.mk`. -/
 @[reducible]
 protected def Quiver.Star.mk {u v : U} (f : u ⟶ v) : Quiver.Star u :=
   ⟨_, f⟩
 #align quiver.star.mk Quiver.Star.mk
+-/
 
+#print Quiver.Costar /-
 /-- The `quiver.costar` at a vertex is the collection of arrows whose target is the vertex.
 The type `quiver.costar v` is defined to be `Σ (u : U), (u ⟶ v)`. -/
 @[reducible]
 def Quiver.Costar (v : U) :=
   Σ u : U, u ⟶ v
 #align quiver.costar Quiver.Costar
+-/
 
+#print Quiver.Costar.mk /-
 /-- Constructor for `quiver.costar`. Defined to be `sigma.mk`. -/
 @[reducible]
 protected def Quiver.Costar.mk {u v : U} (f : u ⟶ v) : Quiver.Costar v :=
   ⟨_, f⟩
 #align quiver.costar.mk Quiver.Costar.mk
+-/
 
+#print Prefunctor.star /-
 /-- A prefunctor induces a map of `quiver.star` at every vertex. -/
 @[simps]
 def Prefunctor.star (u : U) : Quiver.Star u → Quiver.Star (φ.obj u) := fun F =>
   Quiver.Star.mk (φ.map F.2)
 #align prefunctor.star Prefunctor.star
+-/
 
+#print Prefunctor.costar /-
 /-- A prefunctor induces a map of `quiver.costar` at every vertex. -/
 @[simps]
 def Prefunctor.costar (u : U) : Quiver.Costar u → Quiver.Costar (φ.obj u) := fun F =>
   Quiver.Costar.mk (φ.map F.2)
 #align prefunctor.costar Prefunctor.costar
+-/
 
+#print Prefunctor.star_apply /-
 @[simp]
 theorem Prefunctor.star_apply {u v : U} (e : u ⟶ v) :
     φ.unit u (Quiver.Star.mk e) = Quiver.Star.mk (φ.map e) :=
   rfl
 #align prefunctor.star_apply Prefunctor.star_apply
+-/
 
+#print Prefunctor.costar_apply /-
 @[simp]
 theorem Prefunctor.costar_apply {u v : U} (e : u ⟶ v) :
     φ.Costar v (Quiver.Costar.mk e) = Quiver.Costar.mk (φ.map e) :=
   rfl
 #align prefunctor.costar_apply Prefunctor.costar_apply
+-/
 
+#print Prefunctor.star_comp /-
 theorem Prefunctor.star_comp (u : U) : (φ ⋙q ψ).unit u = ψ.unit (φ.obj u) ∘ φ.unit u :=
   rfl
 #align prefunctor.star_comp Prefunctor.star_comp
+-/
 
+#print Prefunctor.costar_comp /-
 theorem Prefunctor.costar_comp (u : U) : (φ ⋙q ψ).Costar u = ψ.Costar (φ.obj u) ∘ φ.Costar u :=
   rfl
 #align prefunctor.costar_comp Prefunctor.costar_comp
+-/
 
+#print Prefunctor.IsCovering /-
 /-- A prefunctor is a covering of quivers if it defines bijections on all stars and costars. -/
 protected structure Prefunctor.IsCovering : Prop where
   star_bijective : ∀ u, Bijective (φ.unit u)
   costar_bijective : ∀ u, Bijective (φ.Costar u)
 #align prefunctor.is_covering Prefunctor.IsCovering
+-/
 
+#print Prefunctor.IsCovering.map_injective /-
 @[simp]
 theorem Prefunctor.IsCovering.map_injective (hφ : φ.IsCovering) {u v : U} :
     Injective fun f : u ⟶ v => φ.map f := by
@@ -120,18 +143,24 @@ theorem Prefunctor.IsCovering.map_injective (hφ : φ.IsCovering) {u v : U} :
   have : φ.star u (Quiver.Star.mk f) = φ.star u (Quiver.Star.mk g) := by simpa using he
   simpa using (hφ.star_bijective u).left this
 #align prefunctor.is_covering.map_injective Prefunctor.IsCovering.map_injective
+-/
 
+#print Prefunctor.IsCovering.comp /-
 theorem Prefunctor.IsCovering.comp (hφ : φ.IsCovering) (hψ : ψ.IsCovering) : (φ ⋙q ψ).IsCovering :=
   ⟨fun u => (hψ.star_bijective _).comp (hφ.star_bijective _), fun u =>
     (hψ.costar_bijective _).comp (hφ.costar_bijective _)⟩
 #align prefunctor.is_covering.comp Prefunctor.IsCovering.comp
+-/
 
+#print Prefunctor.IsCovering.of_comp_right /-
 theorem Prefunctor.IsCovering.of_comp_right (hψ : ψ.IsCovering) (hφψ : (φ ⋙q ψ).IsCovering) :
     φ.IsCovering :=
   ⟨fun u => (Bijective.of_comp_iff' (hψ.star_bijective _) _).mp (hφψ.star_bijective _), fun u =>
     (Bijective.of_comp_iff' (hψ.costar_bijective _) _).mp (hφψ.costar_bijective _)⟩
 #align prefunctor.is_covering.of_comp_right Prefunctor.IsCovering.of_comp_right
+-/
 
+#print Prefunctor.IsCovering.of_comp_left /-
 theorem Prefunctor.IsCovering.of_comp_left (hφ : φ.IsCovering) (hφψ : (φ ⋙q ψ).IsCovering)
     (φsur : Surjective φ.obj) : ψ.IsCovering :=
   by
@@ -139,21 +168,27 @@ theorem Prefunctor.IsCovering.of_comp_left (hφ : φ.IsCovering) (hφψ : (φ 
   exacts [(bijective.of_comp_iff _ (hφ.star_bijective u)).mp (hφψ.star_bijective u),
     (bijective.of_comp_iff _ (hφ.costar_bijective u)).mp (hφψ.costar_bijective u)]
 #align prefunctor.is_covering.of_comp_left Prefunctor.IsCovering.of_comp_left
+-/
 
+#print Quiver.symmetrifyStar /-
 /-- The star of the symmetrification of a quiver at a vertex `u` is equivalent to the sum of the
 star and the costar at `u` in the original quiver. -/
 def Quiver.symmetrifyStar (u : U) :
     Quiver.Star (Symmetrify.of.obj u) ≃ Sum (Quiver.Star u) (Quiver.Costar u) :=
   Equiv.sigmaSumDistrib _ _
 #align quiver.symmetrify_star Quiver.symmetrifyStar
+-/
 
+#print Quiver.symmetrifyCostar /-
 /-- The costar of the symmetrification of a quiver at a vertex `u` is equivalent to the sum of the
 costar and the star at `u` in the original quiver. -/
 def Quiver.symmetrifyCostar (u : U) :
     Quiver.Costar (Symmetrify.of.obj u) ≃ Sum (Quiver.Costar u) (Quiver.Star u) :=
   Equiv.sigmaSumDistrib _ _
 #align quiver.symmetrify_costar Quiver.symmetrifyCostar
+-/
 
+#print Prefunctor.symmetrifyStar /-
 theorem Prefunctor.symmetrifyStar (u : U) :
     φ.Symmetrify.unit u =
       (Quiver.symmetrifyStar _).symm ∘ Sum.map (φ.unit u) (φ.Costar u) ∘ Quiver.symmetrifyStar u :=
@@ -161,7 +196,9 @@ theorem Prefunctor.symmetrifyStar (u : U) :
   rw [Equiv.eq_symm_comp]
   ext ⟨v, f | g⟩ <;> simp [Quiver.symmetrifyStar]
 #align prefunctor.symmetrify_star Prefunctor.symmetrifyStar
+-/
 
+#print Prefunctor.symmetrifyCostar /-
 protected theorem Prefunctor.symmetrifyCostar (u : U) :
     φ.Symmetrify.Costar u =
       (Quiver.symmetrifyCostar _).symm ∘
@@ -170,37 +207,49 @@ protected theorem Prefunctor.symmetrifyCostar (u : U) :
   rw [Equiv.eq_symm_comp]
   ext ⟨v, f | g⟩ <;> simp [Quiver.symmetrifyCostar]
 #align prefunctor.symmetrify_costar Prefunctor.symmetrifyCostar
+-/
 
+#print Prefunctor.IsCovering.symmetrify /-
 protected theorem Prefunctor.IsCovering.symmetrify (hφ : φ.IsCovering) : φ.Symmetrify.IsCovering :=
   by
   refine' ⟨fun u => _, fun u => _⟩ <;>
     simp [φ.symmetrify_star, φ.symmetrify_costar, hφ.star_bijective u, hφ.costar_bijective u]
 #align prefunctor.is_covering.symmetrify Prefunctor.IsCovering.symmetrify
+-/
 
+#print Quiver.PathStar /-
 /-- The path star at a vertex `u` is the type of all paths starting at `u`.
 The type `quiver.path_star u` is defined to be `Σ v : U, path u v`. -/
 @[reducible]
 def Quiver.PathStar (u : U) :=
   Σ v : U, Path u v
 #align quiver.path_star Quiver.PathStar
+-/
 
+#print Quiver.PathStar.mk /-
 /-- Constructor for `quiver.path_star`. Defined to be `sigma.mk`. -/
 @[reducible]
 protected def Quiver.PathStar.mk {u v : U} (p : Path u v) : Quiver.PathStar u :=
   ⟨_, p⟩
 #align quiver.path_star.mk Quiver.PathStar.mk
+-/
 
+#print Prefunctor.pathStar /-
 /-- A prefunctor induces a map of path stars. -/
 def Prefunctor.pathStar (u : U) : Quiver.PathStar u → Quiver.PathStar (φ.obj u) := fun p =>
   Quiver.PathStar.mk (φ.mapPath p.2)
 #align prefunctor.path_star Prefunctor.pathStar
+-/
 
+#print Prefunctor.pathStar_apply /-
 @[simp]
 theorem Prefunctor.pathStar_apply {u v : U} (p : Path u v) :
     φ.PathStar u (Quiver.PathStar.mk p) = Quiver.PathStar.mk (φ.mapPath p) :=
   rfl
 #align prefunctor.path_star_apply Prefunctor.pathStar_apply
+-/
 
+#print Prefunctor.pathStar_injective /-
 theorem Prefunctor.pathStar_injective (hφ : ∀ u, Injective (φ.unit u)) (u : U) :
     Injective (φ.PathStar u) :=
   by
@@ -230,7 +279,9 @@ theorem Prefunctor.pathStar_injective (hφ : ∀ u, Injective (φ.unit u)) (u :
     cases hφ x₁ h_star
     rfl
 #align prefunctor.path_star_injective Prefunctor.pathStar_injective
+-/
 
+#print Prefunctor.pathStar_surjective /-
 theorem Prefunctor.pathStar_surjective (hφ : ∀ u, Surjective (φ.unit u)) (u : U) :
     Surjective (φ.PathStar u) :=
   by
@@ -248,19 +299,24 @@ theorem Prefunctor.pathStar_surjective (hφ : ∀ u, Surjective (φ.unit u)) (u
     use⟨_, q'.cons eu⟩
     simp only [Prefunctor.mapPath_cons, eq_self_iff_true, heq_iff_eq, and_self_iff]
 #align prefunctor.path_star_surjective Prefunctor.pathStar_surjective
+-/
 
+#print Prefunctor.pathStar_bijective /-
 theorem Prefunctor.pathStar_bijective (hφ : ∀ u, Bijective (φ.unit u)) (u : U) :
     Bijective (φ.PathStar u) :=
   ⟨φ.pathStar_injective (fun u => (hφ u).1) _, φ.pathStar_surjective (fun u => (hφ u).2) _⟩
 #align prefunctor.path_star_bijective Prefunctor.pathStar_bijective
+-/
 
 namespace Prefunctor.IsCovering
 
 variable {φ}
 
+#print Prefunctor.IsCovering.pathStar_bijective /-
 protected theorem pathStar_bijective (hφ : φ.IsCovering) (u : U) : Bijective (φ.PathStar u) :=
   φ.pathStar_bijective hφ.1 u
 #align prefunctor.is_covering.path_star_bijective Prefunctor.IsCovering.pathStar_bijective
+-/
 
 end Prefunctor.IsCovering
 
@@ -268,6 +324,7 @@ section HasInvolutiveReverse
 
 variable [HasInvolutiveReverse U] [HasInvolutiveReverse V] [Prefunctor.MapReverse φ]
 
+#print Quiver.starEquivCostar /-
 /-- In a quiver with involutive inverses, the star and costar at every vertex are equivalent.
 This map is induced by `quiver.reverse`. -/
 @[simps]
@@ -278,38 +335,51 @@ def Quiver.starEquivCostar (u : U) : Quiver.Star u ≃ Quiver.Costar u
   left_inv e := by simp [Sigma.ext_iff]
   right_inv e := by simp [Sigma.ext_iff]
 #align quiver.star_equiv_costar Quiver.starEquivCostar
+-/
 
+#print Quiver.starEquivCostar_apply /-
 @[simp]
 theorem Quiver.starEquivCostar_apply {u v : U} (e : u ⟶ v) :
     Quiver.starEquivCostar u (Quiver.Star.mk e) = Quiver.Costar.mk (reverse e) :=
   rfl
 #align quiver.star_equiv_costar_apply Quiver.starEquivCostar_apply
+-/
 
+#print Quiver.starEquivCostar_symm_apply /-
 @[simp]
 theorem Quiver.starEquivCostar_symm_apply {u v : U} (e : u ⟶ v) :
     (Quiver.starEquivCostar v).symm (Quiver.Costar.mk e) = Quiver.Star.mk (reverse e) :=
   rfl
 #align quiver.star_equiv_costar_symm_apply Quiver.starEquivCostar_symm_apply
+-/
 
+#print Prefunctor.costar_conj_star /-
 theorem Prefunctor.costar_conj_star (u : U) :
     φ.Costar u = Quiver.starEquivCostar (φ.obj u) ∘ φ.unit u ∘ (Quiver.starEquivCostar u).symm := by
   ext ⟨v, f⟩ <;> simp
 #align prefunctor.costar_conj_star Prefunctor.costar_conj_star
+-/
 
+#print Prefunctor.bijective_costar_iff_bijective_star /-
 theorem Prefunctor.bijective_costar_iff_bijective_star (u : U) :
     Bijective (φ.Costar u) ↔ Bijective (φ.unit u) := by
   rw [Prefunctor.costar_conj_star, bijective.of_comp_iff', bijective.of_comp_iff] <;>
     exact Equiv.bijective _
 #align prefunctor.bijective_costar_iff_bijective_star Prefunctor.bijective_costar_iff_bijective_star
+-/
 
+#print Prefunctor.isCovering_of_bijective_star /-
 theorem Prefunctor.isCovering_of_bijective_star (h : ∀ u, Bijective (φ.unit u)) : φ.IsCovering :=
   ⟨h, fun u => (φ.bijective_costar_iff_bijective_star u).2 (h u)⟩
 #align prefunctor.is_covering_of_bijective_star Prefunctor.isCovering_of_bijective_star
+-/
 
+#print Prefunctor.isCovering_of_bijective_costar /-
 theorem Prefunctor.isCovering_of_bijective_costar (h : ∀ u, Bijective (φ.Costar u)) :
     φ.IsCovering :=
   ⟨fun u => (φ.bijective_costar_iff_bijective_star u).1 (h u), h⟩
 #align prefunctor.is_covering_of_bijective_costar Prefunctor.isCovering_of_bijective_costar
+-/
 
 end HasInvolutiveReverse
 

Changes in mathlib4

mathlib3
mathlib4
chore: classify was simp porting notes (#10746)

Classifies by adding issue number (#10745) to porting notes claiming was simp.

Diff
@@ -161,7 +161,7 @@ theorem Prefunctor.symmetrifyStar (u : U) :
   -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
   erw [Equiv.eq_symm_comp]
   ext ⟨v, f | g⟩ <;>
-    -- Porting note: was `simp [Quiver.symmetrifyStar]`
+    -- porting note (#10745): was `simp [Quiver.symmetrifyStar]`
     simp only [Quiver.symmetrifyStar, Function.comp_apply] <;>
     erw [Equiv.sigmaSumDistrib_apply, Equiv.sigmaSumDistrib_apply] <;>
     simp
@@ -174,7 +174,7 @@ protected theorem Prefunctor.symmetrifyCostar (u : U) :
   -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
   erw [Equiv.eq_symm_comp]
   ext ⟨v, f | g⟩ <;>
-    -- Porting note: was `simp [Quiver.symmetrifyCostar]`
+    -- porting note (#10745): was `simp [Quiver.symmetrifyCostar]`
     simp only [Quiver.symmetrifyCostar, Function.comp_apply] <;>
     erw [Equiv.sigmaSumDistrib_apply, Equiv.sigmaSumDistrib_apply] <;>
     simp
chore: bump to v4.3.0-rc2 (#8366)

PR contents

This is the supremum of

along with some minor fixes from failures on nightly-testing as Mathlib master is merged into it.

Note that some PRs for changes that are already compatible with the current toolchain and will be necessary have already been split out: #8380.

I am hopeful that in future we will be able to progressively merge adaptation PRs into a bump/v4.X.0 branch, so we never end up with a "big merge" like this. However one of these adaptation PRs (#8056) predates my new scheme for combined CI, and it wasn't possible to keep that PR viable in the meantime.

Lean PRs involved in this bump

In particular this includes adjustments for the Lean PRs

leanprover/lean4#2778

We can get rid of all the

local macro_rules | `($x ^ $y) => `(HPow.hPow $x $y) -- Porting note: See issue [lean4#2220](https://github.com/leanprover/lean4/pull/2220)

macros across Mathlib (and in any projects that want to write natural number powers of reals).

leanprover/lean4#2722

Changes the default behaviour of simp to (config := {decide := false}). This makes simp (and consequentially norm_num) less powerful, but also more consistent, and less likely to blow up in long failures. This requires a variety of changes: changing some previously by simp or norm_num to decide or rfl, or adding (config := {decide := true}).

leanprover/lean4#2783

This changed the behaviour of simp so that simp [f] will only unfold "fully applied" occurrences of f. The old behaviour can be recovered with simp (config := { unfoldPartialApp := true }). We may in future add a syntax for this, e.g. simp [!f]; please provide feedback! In the meantime, we have made the following changes:

  • switching to using explicit lemmas that have the intended level of application
  • (config := { unfoldPartialApp := true }) in some places, to recover the old behaviour
  • Using @[eqns] to manually adjust the equation lemmas for a particular definition, recovering the old behaviour just for that definition. See #8371, where we do this for Function.comp and Function.flip.

This change in Lean may require further changes down the line (e.g. adding the !f syntax, and/or upstreaming the special treatment for Function.comp and Function.flip, and/or removing this special treatment). Please keep an open and skeptical mind about these changes!

Co-authored-by: leanprover-community-mathlib4-bot <leanprover-community-mathlib4-bot@users.noreply.github.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Mauricio Collares <mauricio@collares.org>

Diff
@@ -216,7 +216,7 @@ theorem Prefunctor.pathStar_apply {u v : U} (p : Path u v) :
 
 theorem Prefunctor.pathStar_injective (hφ : ∀ u, Injective (φ.star u)) (u : U) :
     Injective (φ.pathStar u) := by
-  dsimp [Prefunctor.pathStar, Quiver.PathStar.mk]
+  dsimp (config := { unfoldPartialApp := true }) [Prefunctor.pathStar, Quiver.PathStar.mk]
   rintro ⟨v₁, p₁⟩
   induction' p₁ with x₁ y₁ p₁ e₁ ih <;>
     rintro ⟨y₂, p₂⟩ <;>
@@ -251,7 +251,7 @@ theorem Prefunctor.pathStar_injective (hφ : ∀ u, Injective (φ.star u)) (u :
 
 theorem Prefunctor.pathStar_surjective (hφ : ∀ u, Surjective (φ.star u)) (u : U) :
     Surjective (φ.pathStar u) := by
-  dsimp [Prefunctor.pathStar, Quiver.PathStar.mk]
+  dsimp (config := { unfoldPartialApp := true }) [Prefunctor.pathStar, Quiver.PathStar.mk]
   rintro ⟨v, p⟩
   induction' p with v' v'' p' ev ih
   · use ⟨u, Path.nil⟩
chore: cleanup typo in filter_upwards (#7719)

mathport was forgetting a space in filter_upwards [...]with instead of filter_upwards [...] with.

Diff
@@ -265,7 +265,7 @@ theorem Prefunctor.pathStar_surjective (hφ : ∀ u, Surjective (φ.star u)) (u
     obtain ⟨rfl, k⟩ := k
     simp only [heq_eq_eq] at k
     subst k
-    use⟨_, q'.cons eu⟩
+    use ⟨_, q'.cons eu⟩
     simp only [Prefunctor.mapPath_cons, eq_self_iff_true, heq_iff_eq, and_self_iff]
 #align prefunctor.path_star_surjective Prefunctor.pathStar_surjective
 
Revert "chore: revert #7703 (#7710)"

This reverts commit f3695eb2.

Diff
@@ -158,7 +158,8 @@ theorem Prefunctor.symmetrifyStar (u : U) :
     φ.symmetrify.star u =
       (Quiver.symmetrifyStar _).symm ∘ Sum.map (φ.star u) (φ.costar u) ∘
         Quiver.symmetrifyStar u := by
-  rw [Equiv.eq_symm_comp]
+  -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
+  erw [Equiv.eq_symm_comp]
   ext ⟨v, f | g⟩ <;>
     -- Porting note: was `simp [Quiver.symmetrifyStar]`
     simp only [Quiver.symmetrifyStar, Function.comp_apply] <;>
@@ -170,7 +171,8 @@ protected theorem Prefunctor.symmetrifyCostar (u : U) :
     φ.symmetrify.costar u =
       (Quiver.symmetrifyCostar _).symm ∘
         Sum.map (φ.costar u) (φ.star u) ∘ Quiver.symmetrifyCostar u := by
-  rw [Equiv.eq_symm_comp]
+  -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
+  erw [Equiv.eq_symm_comp]
   ext ⟨v, f | g⟩ <;>
     -- Porting note: was `simp [Quiver.symmetrifyCostar]`
     simp only [Quiver.symmetrifyCostar, Function.comp_apply] <;>
@@ -183,8 +185,8 @@ protected theorem Prefunctor.IsCovering.symmetrify (hφ : φ.IsCovering) :
   refine' ⟨fun u => _, fun u => _⟩ <;>
     -- Porting note: was
     -- simp [φ.symmetrifyStar, φ.symmetrifyCostar, hφ.star_bijective u, hφ.costar_bijective u]
-    simp only [φ.symmetrifyStar, φ.symmetrifyCostar, EquivLike.comp_bijective] <;>
-    erw [EquivLike.bijective_comp] <;>
+    simp only [φ.symmetrifyStar, φ.symmetrifyCostar] <;>
+    erw [EquivLike.comp_bijective, EquivLike.bijective_comp] <;>
     simp [hφ.star_bijective u, hφ.costar_bijective u]
 #align prefunctor.is_covering.symmetrify Prefunctor.IsCovering.symmetrify
 
chore: revert #7703 (#7710)

This reverts commit 26eb2b0a.

Diff
@@ -158,8 +158,7 @@ theorem Prefunctor.symmetrifyStar (u : U) :
     φ.symmetrify.star u =
       (Quiver.symmetrifyStar _).symm ∘ Sum.map (φ.star u) (φ.costar u) ∘
         Quiver.symmetrifyStar u := by
-  -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
-  erw [Equiv.eq_symm_comp]
+  rw [Equiv.eq_symm_comp]
   ext ⟨v, f | g⟩ <;>
     -- Porting note: was `simp [Quiver.symmetrifyStar]`
     simp only [Quiver.symmetrifyStar, Function.comp_apply] <;>
@@ -171,8 +170,7 @@ protected theorem Prefunctor.symmetrifyCostar (u : U) :
     φ.symmetrify.costar u =
       (Quiver.symmetrifyCostar _).symm ∘
         Sum.map (φ.costar u) (φ.star u) ∘ Quiver.symmetrifyCostar u := by
-  -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
-  erw [Equiv.eq_symm_comp]
+  rw [Equiv.eq_symm_comp]
   ext ⟨v, f | g⟩ <;>
     -- Porting note: was `simp [Quiver.symmetrifyCostar]`
     simp only [Quiver.symmetrifyCostar, Function.comp_apply] <;>
@@ -185,8 +183,8 @@ protected theorem Prefunctor.IsCovering.symmetrify (hφ : φ.IsCovering) :
   refine' ⟨fun u => _, fun u => _⟩ <;>
     -- Porting note: was
     -- simp [φ.symmetrifyStar, φ.symmetrifyCostar, hφ.star_bijective u, hφ.costar_bijective u]
-    simp only [φ.symmetrifyStar, φ.symmetrifyCostar] <;>
-    erw [EquivLike.comp_bijective, EquivLike.bijective_comp] <;>
+    simp only [φ.symmetrifyStar, φ.symmetrifyCostar, EquivLike.comp_bijective] <;>
+    erw [EquivLike.bijective_comp] <;>
     simp [hφ.star_bijective u, hφ.costar_bijective u]
 #align prefunctor.is_covering.symmetrify Prefunctor.IsCovering.symmetrify
 
chore: bump toolchain to v4.2.0-rc2 (#7703)

This includes all the changes from #7606.

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -158,7 +158,8 @@ theorem Prefunctor.symmetrifyStar (u : U) :
     φ.symmetrify.star u =
       (Quiver.symmetrifyStar _).symm ∘ Sum.map (φ.star u) (φ.costar u) ∘
         Quiver.symmetrifyStar u := by
-  rw [Equiv.eq_symm_comp]
+  -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
+  erw [Equiv.eq_symm_comp]
   ext ⟨v, f | g⟩ <;>
     -- Porting note: was `simp [Quiver.symmetrifyStar]`
     simp only [Quiver.symmetrifyStar, Function.comp_apply] <;>
@@ -170,7 +171,8 @@ protected theorem Prefunctor.symmetrifyCostar (u : U) :
     φ.symmetrify.costar u =
       (Quiver.symmetrifyCostar _).symm ∘
         Sum.map (φ.costar u) (φ.star u) ∘ Quiver.symmetrifyCostar u := by
-  rw [Equiv.eq_symm_comp]
+  -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
+  erw [Equiv.eq_symm_comp]
   ext ⟨v, f | g⟩ <;>
     -- Porting note: was `simp [Quiver.symmetrifyCostar]`
     simp only [Quiver.symmetrifyCostar, Function.comp_apply] <;>
@@ -183,8 +185,8 @@ protected theorem Prefunctor.IsCovering.symmetrify (hφ : φ.IsCovering) :
   refine' ⟨fun u => _, fun u => _⟩ <;>
     -- Porting note: was
     -- simp [φ.symmetrifyStar, φ.symmetrifyCostar, hφ.star_bijective u, hφ.costar_bijective u]
-    simp only [φ.symmetrifyStar, φ.symmetrifyCostar, EquivLike.comp_bijective] <;>
-    erw [EquivLike.bijective_comp] <;>
+    simp only [φ.symmetrifyStar, φ.symmetrifyCostar] <;>
+    erw [EquivLike.comp_bijective, EquivLike.bijective_comp] <;>
     simp [hφ.star_bijective u, hφ.costar_bijective u]
 #align prefunctor.is_covering.symmetrify Prefunctor.IsCovering.symmetrify
 
chore: delay import of Tactic.Common (#7000)

I know that this is contrary to what we've done previously, but:

  • I'm trying to upstream a great many tactics from Mathlib to Std (essentially, everything that non-mathematicians want too).
  • This makes it much easier for me to see what is going on, and understand the import requirements (particularly for the "big" tactics norm_num / ring / linarith)
  • It's actually not as bad as it looks here, because as these tactics move up to Std they will start disappearing again from explicit imports, but Mathlib can happily import all of Std.

(Oh

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -7,6 +7,7 @@ import Mathlib.Combinatorics.Quiver.Cast
 import Mathlib.Combinatorics.Quiver.Symmetric
 import Mathlib.Data.Sigma.Basic
 import Mathlib.Logic.Equiv.Basic
+import Mathlib.Tactic.Common
 
 #align_import combinatorics.quiver.covering from "leanprover-community/mathlib"@"188a411e916e1119e502dbe35b8b475716362401"
 
feat: port Combinatorics.Quiver.Covering (#6383)

Dependencies 24

25 files ported (100.0%)
9146 lines ported (100.0%)

All dependencies are ported!