data.pfunctor.multivariate.M
⟷
Mathlib.Data.PFunctor.Multivariate.M
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.
(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)
(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)
(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)
(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)
(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)
(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)
(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)
(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)
(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)
(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)
(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)
(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)
(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)
(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)
(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)
(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)
(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)
(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)
(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)
(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)
(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)
(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)
(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)
(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)
(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)
(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)
(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)
(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)
(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)
(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)
(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)
(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)
(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)
(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)
(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)
(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)
(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)
(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)
(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)
(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)
(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)
(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)
(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)
(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)
(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)
(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)
(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)
(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)
(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)
(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)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -3,8 +3,8 @@ Copyright (c) 2018 Jeremy Avigad. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jeremy Avigad, Mario Carneiro, Simon Hudon
-/
-import Data.Pfunctor.Multivariate.Basic
-import Data.Pfunctor.Univariate.M
+import Data.PFunctor.Multivariate.Basic
+import Data.PFunctor.Univariate.M
#align_import data.pfunctor.multivariate.M from "leanprover-community/mathlib"@"23aa88e32dcc9d2a24cca7bc23268567ed4cd7d6"
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -140,12 +140,12 @@ def M.corecContents {α : TypeVec.{u} n} {β : Type u} (g₀ : β → P.A)
(g₁ : ∀ b : β, P.drop.B (g₀ b) ⟹ α) (g₂ : ∀ b : β, P.getLast.B (g₀ b) → β) :
∀ x b, x = M.corecShape P g₀ g₂ b → M.Path P x ⟹ α
| _, b, h, _, M.path.root x a f h' i c =>
- have : a = g₀ b := by rw [h, M.corec_shape, PFunctor.M.dest_corec] at h' ; cases h'; rfl
+ have : a = g₀ b := by rw [h, M.corec_shape, PFunctor.M.dest_corec] at h'; cases h'; rfl
g₁ b i (P.castDropB this i c)
| _, b, h, _, M.path.child x a f h' j i c =>
- have h₀ : a = g₀ b := by rw [h, M.corec_shape, PFunctor.M.dest_corec] at h' ; cases h'; rfl
+ have h₀ : a = g₀ b := by rw [h, M.corec_shape, PFunctor.M.dest_corec] at h'; cases h'; rfl
have h₁ : f j = M.corecShape P g₀ g₂ (g₂ b (castLastB P h₀ j)) := by
- rw [h, M.corec_shape, PFunctor.M.dest_corec] at h' ; cases h'; rfl
+ rw [h, M.corec_shape, PFunctor.M.dest_corec] at h'; cases h'; rfl
M.corec_contents (f j) (g₂ b (P.castLastB h₀ j)) h₁ i c
#align mvpfunctor.M.corec_contents MvPFunctor.M.corecContents
-/
@@ -250,9 +250,9 @@ theorem M.bisim_lemma {α : TypeVec n} {a₁ : (mp P).A} {f₁ : (mp P).B a₁
f' = M.pathDestLeft P e₁' f₁ ∧
f₁' = fun x : (last P).B a' => ⟨g₁' x, M.pathDestRight P e₁' f₁ x⟩ :=
by
- generalize ef : @split_fun n _ (append1 α (M P α)) f' f₁' = ff at e₁
+ generalize ef : @split_fun n _ (append1 α (M P α)) f' f₁' = ff at e₁
cases' e₁' : PFunctor.M.dest a₁ with a₁' g₁'
- rw [M.dest_eq_dest' _ e₁'] at e₁
+ rw [M.dest_eq_dest' _ e₁'] at e₁
cases e₁; exact ⟨_, e₁', split_fun_inj ef⟩
#align mvpfunctor.M.bisim_lemma MvPFunctor.M.bisim_lemma
-/
@@ -302,8 +302,8 @@ theorem M.bisim₀ {α : TypeVec n} (R : P.M α → P.M α → Prop) (h₀ : Equ
apply M.bisim P R _ _ _ r; clear r x y
introv Hr; specialize h _ _ Hr; clear Hr
rcases M.dest P x with ⟨ax, fx⟩; rcases M.dest P y with ⟨ay, fy⟩
- intro h; rw [map_eq, map_eq] at h ; injection h with h₀ h₁; subst ay
- simp at h₁ ; clear h
+ intro h; rw [map_eq, map_eq] at h; injection h with h₀ h₁; subst ay
+ simp at h₁; clear h
have Hdrop : drop_fun fx = drop_fun fy :=
by
replace h₁ := congr_arg drop_fun h₁
@@ -312,9 +312,9 @@ theorem M.bisim₀ {α : TypeVec n} (R : P.M α → P.M α → Prop) (h₀ : Equ
rw [split_drop_fun_last_fun, Hdrop, split_drop_fun_last_fun]
simp; intro i
replace h₁ := congr_fun (congr_fun h₁ Fin2.fz) i
- simp [(· ⊚ ·), append_fun, split_fun] at h₁
+ simp [(· ⊚ ·), append_fun, split_fun] at h₁
replace h₁ := Quot.exact _ h₁
- rw [h₀.eqv_gen_iff] at h₁
+ rw [h₀.eqv_gen_iff] at h₁
exact h₁
#align mvpfunctor.M.bisim₀ MvPFunctor.M.bisim₀
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,8 +3,8 @@ Copyright (c) 2018 Jeremy Avigad. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jeremy Avigad, Mario Carneiro, Simon Hudon
-/
-import Mathbin.Data.Pfunctor.Multivariate.Basic
-import Mathbin.Data.Pfunctor.Univariate.M
+import Data.Pfunctor.Multivariate.Basic
+import Data.Pfunctor.Univariate.M
#align_import data.pfunctor.multivariate.M from "leanprover-community/mathlib"@"23aa88e32dcc9d2a24cca7bc23268567ed4cd7d6"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,15 +2,12 @@
Copyright (c) 2018 Jeremy Avigad. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jeremy Avigad, Mario Carneiro, Simon Hudon
-
-! This file was ported from Lean 3 source module data.pfunctor.multivariate.M
-! leanprover-community/mathlib commit 23aa88e32dcc9d2a24cca7bc23268567ed4cd7d6
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Data.Pfunctor.Multivariate.Basic
import Mathbin.Data.Pfunctor.Univariate.M
+#align_import data.pfunctor.multivariate.M from "leanprover-community/mathlib"@"23aa88e32dcc9d2a24cca7bc23268567ed4cd7d6"
+
/-!
# The M construction as a multivariate polynomial functor.
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -143,12 +143,12 @@ def M.corecContents {α : TypeVec.{u} n} {β : Type u} (g₀ : β → P.A)
(g₁ : ∀ b : β, P.drop.B (g₀ b) ⟹ α) (g₂ : ∀ b : β, P.getLast.B (g₀ b) → β) :
∀ x b, x = M.corecShape P g₀ g₂ b → M.Path P x ⟹ α
| _, b, h, _, M.path.root x a f h' i c =>
- have : a = g₀ b := by rw [h, M.corec_shape, PFunctor.M.dest_corec] at h'; cases h'; rfl
+ have : a = g₀ b := by rw [h, M.corec_shape, PFunctor.M.dest_corec] at h' ; cases h'; rfl
g₁ b i (P.castDropB this i c)
| _, b, h, _, M.path.child x a f h' j i c =>
- have h₀ : a = g₀ b := by rw [h, M.corec_shape, PFunctor.M.dest_corec] at h'; cases h'; rfl
+ have h₀ : a = g₀ b := by rw [h, M.corec_shape, PFunctor.M.dest_corec] at h' ; cases h'; rfl
have h₁ : f j = M.corecShape P g₀ g₂ (g₂ b (castLastB P h₀ j)) := by
- rw [h, M.corec_shape, PFunctor.M.dest_corec] at h'; cases h'; rfl
+ rw [h, M.corec_shape, PFunctor.M.dest_corec] at h' ; cases h'; rfl
M.corec_contents (f j) (g₂ b (P.castLastB h₀ j)) h₁ i c
#align mvpfunctor.M.corec_contents MvPFunctor.M.corecContents
-/
@@ -249,13 +249,13 @@ theorem M.dest_corec {α : TypeVec n} {β : Type u} (g : β → P.Obj (α.append
theorem M.bisim_lemma {α : TypeVec n} {a₁ : (mp P).A} {f₁ : (mp P).B a₁ ⟹ α} {a' : P.A}
{f' : (P.B a').drop ⟹ α} {f₁' : (P.B a').getLast → M P α}
(e₁ : M.dest P ⟨a₁, f₁⟩ = ⟨a', splitFun f' f₁'⟩) :
- ∃ (g₁' : _)(e₁' : PFunctor.M.dest a₁ = ⟨a', g₁'⟩),
+ ∃ (g₁' : _) (e₁' : PFunctor.M.dest a₁ = ⟨a', g₁'⟩),
f' = M.pathDestLeft P e₁' f₁ ∧
f₁' = fun x : (last P).B a' => ⟨g₁' x, M.pathDestRight P e₁' f₁ x⟩ :=
by
- generalize ef : @split_fun n _ (append1 α (M P α)) f' f₁' = ff at e₁
+ generalize ef : @split_fun n _ (append1 α (M P α)) f' f₁' = ff at e₁
cases' e₁' : PFunctor.M.dest a₁ with a₁' g₁'
- rw [M.dest_eq_dest' _ e₁'] at e₁
+ rw [M.dest_eq_dest' _ e₁'] at e₁
cases e₁; exact ⟨_, e₁', split_fun_inj ef⟩
#align mvpfunctor.M.bisim_lemma MvPFunctor.M.bisim_lemma
-/
@@ -305,8 +305,8 @@ theorem M.bisim₀ {α : TypeVec n} (R : P.M α → P.M α → Prop) (h₀ : Equ
apply M.bisim P R _ _ _ r; clear r x y
introv Hr; specialize h _ _ Hr; clear Hr
rcases M.dest P x with ⟨ax, fx⟩; rcases M.dest P y with ⟨ay, fy⟩
- intro h; rw [map_eq, map_eq] at h; injection h with h₀ h₁; subst ay
- simp at h₁; clear h
+ intro h; rw [map_eq, map_eq] at h ; injection h with h₀ h₁; subst ay
+ simp at h₁ ; clear h
have Hdrop : drop_fun fx = drop_fun fy :=
by
replace h₁ := congr_arg drop_fun h₁
@@ -315,9 +315,9 @@ theorem M.bisim₀ {α : TypeVec n} (R : P.M α → P.M α → Prop) (h₀ : Equ
rw [split_drop_fun_last_fun, Hdrop, split_drop_fun_last_fun]
simp; intro i
replace h₁ := congr_fun (congr_fun h₁ Fin2.fz) i
- simp [(· ⊚ ·), append_fun, split_fun] at h₁
+ simp [(· ⊚ ·), append_fun, split_fun] at h₁
replace h₁ := Quot.exact _ h₁
- rw [h₀.eqv_gen_iff] at h₁
+ rw [h₀.eqv_gen_iff] at h₁
exact h₁
#align mvpfunctor.M.bisim₀ MvPFunctor.M.bisim₀
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -55,7 +55,7 @@ that `A` is a possibly infinite tree.
universe u
-open MvFunctor
+open scoped MvFunctor
namespace MvPFunctor
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -143,21 +143,12 @@ def M.corecContents {α : TypeVec.{u} n} {β : Type u} (g₀ : β → P.A)
(g₁ : ∀ b : β, P.drop.B (g₀ b) ⟹ α) (g₂ : ∀ b : β, P.getLast.B (g₀ b) → β) :
∀ x b, x = M.corecShape P g₀ g₂ b → M.Path P x ⟹ α
| _, b, h, _, M.path.root x a f h' i c =>
- have : a = g₀ b := by
- rw [h, M.corec_shape, PFunctor.M.dest_corec] at h'
- cases h'
- rfl
+ have : a = g₀ b := by rw [h, M.corec_shape, PFunctor.M.dest_corec] at h'; cases h'; rfl
g₁ b i (P.castDropB this i c)
| _, b, h, _, M.path.child x a f h' j i c =>
- have h₀ : a = g₀ b := by
- rw [h, M.corec_shape, PFunctor.M.dest_corec] at h'
- cases h'
- rfl
- have h₁ : f j = M.corecShape P g₀ g₂ (g₂ b (castLastB P h₀ j)) :=
- by
- rw [h, M.corec_shape, PFunctor.M.dest_corec] at h'
- cases h'
- rfl
+ have h₀ : a = g₀ b := by rw [h, M.corec_shape, PFunctor.M.dest_corec] at h'; cases h'; rfl
+ have h₁ : f j = M.corecShape P g₀ g₂ (g₂ b (castLastB P h₀ j)) := by
+ rw [h, M.corec_shape, PFunctor.M.dest_corec] at h'; cases h'; rfl
M.corec_contents (f j) (g₂ b (P.castLastB h₀ j)) h₁ i c
#align mvpfunctor.M.corec_contents MvPFunctor.M.corecContents
-/
@@ -292,8 +283,7 @@ theorem M.bisim {α : TypeVec n} (R : P.M α → P.M α → Prop)
rcases M.bisim_lemma P e₂ with ⟨g₂', e₂', _, rfl⟩
rw [e₁', e₂']
exact ⟨_, _, _, rfl, rfl, fun b => ⟨_, _, h' b, rfl, rfl⟩⟩
- subst this
- congr with (i p)
+ subst this; congr with (i p)
induction' p with x a f h' i c x a f h' i c p IH generalizing f₁ f₂ <;>
try
rcases h _ _ r with ⟨a', f', f₁', f₂', e₁, e₂, h''⟩
@@ -312,27 +302,18 @@ theorem M.bisim {α : TypeVec n} (R : P.M α → P.M α → Prop)
theorem M.bisim₀ {α : TypeVec n} (R : P.M α → P.M α → Prop) (h₀ : Equivalence R)
(h : ∀ x y, R x y → (id ::: Quot.mk R) <$$> M.dest _ x = (id ::: Quot.mk R) <$$> M.dest _ y)
(x y) (r : R x y) : x = y := by
- apply M.bisim P R _ _ _ r
- clear r x y
- introv Hr
- specialize h _ _ Hr
- clear Hr
- rcases M.dest P x with ⟨ax, fx⟩
- rcases M.dest P y with ⟨ay, fy⟩
- intro h
- rw [map_eq, map_eq] at h
- injection h with h₀ h₁
- subst ay
- simp at h₁
- clear h
+ apply M.bisim P R _ _ _ r; clear r x y
+ introv Hr; specialize h _ _ Hr; clear Hr
+ rcases M.dest P x with ⟨ax, fx⟩; rcases M.dest P y with ⟨ay, fy⟩
+ intro h; rw [map_eq, map_eq] at h; injection h with h₀ h₁; subst ay
+ simp at h₁; clear h
have Hdrop : drop_fun fx = drop_fun fy :=
by
replace h₁ := congr_arg drop_fun h₁
simpa using h₁
exists ax, drop_fun fx, last_fun fx, last_fun fy
rw [split_drop_fun_last_fun, Hdrop, split_drop_fun_last_fun]
- simp
- intro i
+ simp; intro i
replace h₁ := congr_fun (congr_fun h₁ Fin2.fz) i
simp [(· ⊚ ·), append_fun, split_fun] at h₁
replace h₁ := Quot.exact _ h₁
@@ -350,8 +331,7 @@ theorem M.bisim' {α : TypeVec n} (R : P.M α → P.M α → Prop)
have := M.bisim₀ P (EqvGen R) _ _
· solve_by_elim [EqvGen.rel]
· apply EqvGen.is_equivalence
- · clear r x y
- introv Hr
+ · clear r x y; introv Hr
have : ∀ x y, R x y → EqvGen R x y := @EqvGen.rel _ R
induction Hr
· rw [← Quot.factor_mk_eq R (EqvGen R) this]
mathlib commit https://github.com/leanprover-community/mathlib/commit/3ade05ac9447ae31a22d2ea5423435e054131240
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jeremy Avigad, Mario Carneiro, Simon Hudon
! This file was ported from Lean 3 source module data.pfunctor.multivariate.M
-! leanprover-community/mathlib commit d13b3a4a392ea7273dfa4727dbd1892e26cfd518
+! leanprover-community/mathlib commit 23aa88e32dcc9d2a24cca7bc23268567ed4cd7d6
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -14,6 +14,9 @@ import Mathbin.Data.Pfunctor.Univariate.M
/-!
# The M construction as a multivariate polynomial functor.
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
M types are potentially infinite tree-like structures. They are defined
as the greatest fixpoint of a polynomial functor.
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
@@ -213,7 +213,7 @@ theorem M.dest_corec' {α : TypeVec.{u} n} {β : Type u} (g₀ : β → P.A)
theorem M.dest_corec {α : TypeVec n} {β : Type u} (g : β → P (α.append1 β)) (x : β) :
M.dest P (M.corec P g x) = appendFun id (M.corec P g) <$$> g x := by
trans
- apply M.dest_corec'
+ · apply M.dest_corec'
cases' g x with a f; dsimp
rw [MvPFunctor.map_eq]; congr
conv =>
Homogenises porting notes via capitalisation and addition of whitespace.
It makes the following changes:
@@ -313,7 +313,7 @@ theorem M.bisim' {α : TypeVec n} (R : P.M α → P.M α → Prop)
induction Hr
· rw [← Quot.factor_mk_eq R (EqvGen R) this]
rwa [appendFun_comp_id, ← MvFunctor.map_map, ← MvFunctor.map_map, h]
- -- porting note: `cc` was replaced with `aesop`, maybe there is a more light-weight solution?
+ -- Porting note: `cc` was replaced with `aesop`, maybe there is a more light-weight solution?
all_goals aesop
#align mvpfunctor.M.bisim' MvPFunctor.M.bisim'
@@ -84,7 +84,7 @@ instance M.Path.inhabited (x : P.last.M) {i} [Inhabited (P.drop.B x.head i)] :
(PFunctor.M.casesOn' x
(r := fun _ => PFunctor.M.dest x = ⟨a, f⟩)
<| by
- intros; simp [PFunctor.M.dest_mk, PFunctor.M.children_mk]; rfl)
+ intros; simp [a, PFunctor.M.dest_mk, PFunctor.M.children_mk]; rfl)
_ default⟩
#align mvpfunctor.M.path.inhabited MvPFunctor.M.Path.inhabited
@@ -285,7 +285,7 @@ theorem M.bisim₀ {α : TypeVec n} (R : P.M α → P.M α → Prop) (h₀ : Equ
rw [map_eq, map_eq] at h
injection h with h₀ h₁
subst ay
- simp at h₁
+ simp? at h₁ says simp only [heq_eq_eq] at h₁
have Hdrop : dropFun fx = dropFun fy := by
replace h₁ := congr_arg dropFun h₁
simpa using h₁
@@ -294,7 +294,8 @@ theorem M.bisim₀ {α : TypeVec n} (R : P.M α → P.M α → Prop) (h₀ : Equ
simp only [true_and]
intro i
replace h₁ := congr_fun (congr_fun h₁ Fin2.fz) i
- simp [(· ⊚ ·), appendFun, splitFun] at h₁
+ simp? [(· ⊚ ·), appendFun, splitFun] at h₁ says
+ simp only [TypeVec.comp, appendFun, splitFun] at h₁
replace h₁ := Quot.exact _ h₁
rw [h₀.eqvGen_iff] at h₁
exact h₁
@@ -25,16 +25,16 @@ as the greatest fixpoint of a polynomial functor.
Dual view of M-types:
- * `Mp`: polynomial functor
+ * `mp`: polynomial functor
* `M`: greatest fixed point of a polynomial functor
-Specifically, we define the polynomial functor `Mp` as:
+Specifically, we define the polynomial functor `mp` as:
* A := a possibly infinite tree-like structure without information in the nodes
* B := given the tree-like structure `t`, `B t` is a valid path
from the root of `t` to any given node.
-As a result `Mp.obj α` is made of a dataless tree and a function from
+As a result `mp α` is made of a dataless tree and a function from
its valid paths to values of `α`
The difference with the polynomial functor of an initial algebra is
@@ -47,6 +47,8 @@ that `A` is a possibly infinite tree.
-/
+set_option linter.uppercaseLean3 false
+
universe u
open MvFunctor
@@ -72,8 +74,6 @@ inductive M.Path : P.last.M → Fin2 n → Type u
(j : P.last.B a)
(i : Fin2 n)
(c : M.Path (f j) i) : M.Path x i
-
-set_option linter.uppercaseLean3 false in
#align mvpfunctor.M.path MvPFunctor.M.Path
instance M.Path.inhabited (x : P.last.M) {i} [Inhabited (P.drop.B x.head i)] :
@@ -86,38 +86,28 @@ instance M.Path.inhabited (x : P.last.M) {i} [Inhabited (P.drop.B x.head i)] :
<| by
intros; simp [PFunctor.M.dest_mk, PFunctor.M.children_mk]; rfl)
_ default⟩
-
-set_option linter.uppercaseLean3 false in
#align mvpfunctor.M.path.inhabited MvPFunctor.M.Path.inhabited
/-- Polynomial functor of the M-type of `P`. `A` is a data-less
possibly infinite tree whereas, for a given `a : A`, `B a` is a valid
-path in tree `a` so that `mp.Obj α` is made of a tree and a function
+path in tree `a` so that `mp α` is made of a tree and a function
from its valid paths to the values it contains -/
def mp : MvPFunctor n where
A := P.last.M
B := M.Path P
-
-set_option linter.uppercaseLean3 false in
#align mvpfunctor.Mp MvPFunctor.mp
/-- `n`-ary M-type for `P` -/
def M (α : TypeVec n) : Type _ :=
- P.mp.Obj α
-
-set_option linter.uppercaseLean3 false in
+ P.mp α
#align mvpfunctor.M MvPFunctor.M
instance mvfunctorM : MvFunctor P.M := by delta M; infer_instance
-
-set_option linter.uppercaseLean3 false in
#align mvpfunctor.mvfunctor_M MvPFunctor.mvfunctorM
instance inhabitedM {α : TypeVec _} [I : Inhabited P.A] [∀ i : Fin2 n, Inhabited (α i)] :
Inhabited (P.M α) :=
@Obj.inhabited _ (mp P) _ (@PFunctor.M.inhabited P.last I) _
-
-set_option linter.uppercaseLean3 false in
#align mvpfunctor.inhabited_M MvPFunctor.inhabitedM
/-- construct through corecursion the shape of an M-type
@@ -125,20 +115,14 @@ without its contents -/
def M.corecShape {β : Type u} (g₀ : β → P.A) (g₂ : ∀ b : β, P.last.B (g₀ b) → β) :
β → P.last.M :=
PFunctor.M.corec fun b => ⟨g₀ b, g₂ b⟩
-
-set_option linter.uppercaseLean3 false in
#align mvpfunctor.M.corec_shape MvPFunctor.M.corecShape
/-- Proof of type equality as an arrow -/
def castDropB {a a' : P.A} (h : a = a') : P.drop.B a ⟹ P.drop.B a' := fun _i b => Eq.recOn h b
-
-set_option linter.uppercaseLean3 false in
#align mvpfunctor.cast_dropB MvPFunctor.castDropB
/-- Proof of type equality as a function -/
def castLastB {a a' : P.A} (h : a = a') : P.last.B a → P.last.B a' := fun b => Eq.recOn h b
-
-set_option linter.uppercaseLean3 false in
#align mvpfunctor.cast_lastB MvPFunctor.castLastB
/-- Using corecursion, construct the contents of an M-type -/
@@ -167,88 +151,66 @@ def M.corecContents {α : TypeVec.{u} n}
cases h'
rfl
M.corecContents g₀ g₁ g₂ (f j) (g₂ b (P.castLastB h₀ j)) h₁ i c
-
-set_option linter.uppercaseLean3 false in
#align mvpfunctor.M.corec_contents MvPFunctor.M.corecContents
/-- Corecursor for M-type of `P` -/
def M.corec' {α : TypeVec n} {β : Type u} (g₀ : β → P.A) (g₁ : ∀ b : β, P.drop.B (g₀ b) ⟹ α)
(g₂ : ∀ b : β, P.last.B (g₀ b) → β) : β → P.M α := fun b =>
⟨M.corecShape P g₀ g₂ b, M.corecContents P g₀ g₁ g₂ _ _ rfl⟩
-
-set_option linter.uppercaseLean3 false in
#align mvpfunctor.M.corec' MvPFunctor.M.corec'
/-- Corecursor for M-type of `P` -/
-def M.corec {α : TypeVec n} {β : Type u} (g : β → P.Obj (α.append1 β)) : β → P.M α :=
+def M.corec {α : TypeVec n} {β : Type u} (g : β → P (α.append1 β)) : β → P.M α :=
M.corec' P (fun b => (g b).fst) (fun b => dropFun (g b).snd) fun b => lastFun (g b).snd
-
-set_option linter.uppercaseLean3 false in
#align mvpfunctor.M.corec MvPFunctor.M.corec
/-- Implementation of destructor for M-type of `P` -/
def M.pathDestLeft {α : TypeVec n} {x : P.last.M} {a : P.A} {f : P.last.B a → P.last.M}
(h : PFunctor.M.dest x = ⟨a, f⟩) (f' : M.Path P x ⟹ α) : P.drop.B a ⟹ α := fun i c =>
f' i (M.Path.root x a f h i c)
-
-set_option linter.uppercaseLean3 false in
#align mvpfunctor.M.path_dest_left MvPFunctor.M.pathDestLeft
/-- Implementation of destructor for M-type of `P` -/
def M.pathDestRight {α : TypeVec n} {x : P.last.M} {a : P.A} {f : P.last.B a → P.last.M}
(h : PFunctor.M.dest x = ⟨a, f⟩) (f' : M.Path P x ⟹ α) :
∀ j : P.last.B a, M.Path P (f j) ⟹ α := fun j i c => f' i (M.Path.child x a f h j i c)
-
-set_option linter.uppercaseLean3 false in
#align mvpfunctor.M.path_dest_right MvPFunctor.M.pathDestRight
/-- Destructor for M-type of `P` -/
def M.dest' {α : TypeVec n} {x : P.last.M} {a : P.A} {f : P.last.B a → P.last.M}
- (h : PFunctor.M.dest x = ⟨a, f⟩) (f' : M.Path P x ⟹ α) : P.Obj (α.append1 (P.M α)) :=
+ (h : PFunctor.M.dest x = ⟨a, f⟩) (f' : M.Path P x ⟹ α) : P (α.append1 (P.M α)) :=
⟨a, splitFun (M.pathDestLeft P h f') fun x => ⟨f x, M.pathDestRight P h f' x⟩⟩
-
-set_option linter.uppercaseLean3 false in
#align mvpfunctor.M.dest' MvPFunctor.M.dest'
/-- Destructor for M-types -/
-def M.dest {α : TypeVec n} (x : P.M α) : P.Obj (α ::: P.M α) :=
+def M.dest {α : TypeVec n} (x : P.M α) : P (α ::: P.M α) :=
M.dest' P (Sigma.eta <| PFunctor.M.dest x.fst).symm x.snd
-
-set_option linter.uppercaseLean3 false in
#align mvpfunctor.M.dest MvPFunctor.M.dest
/-- Constructor for M-types -/
-def M.mk {α : TypeVec n} : P.Obj (α.append1 (P.M α)) → P.M α :=
+def M.mk {α : TypeVec n} : P (α.append1 (P.M α)) → P.M α :=
M.corec _ fun i => appendFun id (M.dest P) <$$> i
-
-set_option linter.uppercaseLean3 false in
#align mvpfunctor.M.mk MvPFunctor.M.mk
theorem M.dest'_eq_dest' {α : TypeVec n} {x : P.last.M} {a₁ : P.A}
{f₁ : P.last.B a₁ → P.last.M} (h₁ : PFunctor.M.dest x = ⟨a₁, f₁⟩) {a₂ : P.A}
{f₂ : P.last.B a₂ → P.last.M} (h₂ : PFunctor.M.dest x = ⟨a₂, f₂⟩) (f' : M.Path P x ⟹ α) :
M.dest' P h₁ f' = M.dest' P h₂ f' := by cases h₁.symm.trans h₂; rfl
-
-set_option linter.uppercaseLean3 false in
#align mvpfunctor.M.dest'_eq_dest' MvPFunctor.M.dest'_eq_dest'
theorem M.dest_eq_dest' {α : TypeVec n} {x : P.last.M} {a : P.A}
{f : P.last.B a → P.last.M} (h : PFunctor.M.dest x = ⟨a, f⟩) (f' : M.Path P x ⟹ α) :
M.dest P ⟨x, f'⟩ = M.dest' P h f' :=
M.dest'_eq_dest' _ _ _ _
-
-set_option linter.uppercaseLean3 false in
#align mvpfunctor.M.dest_eq_dest' MvPFunctor.M.dest_eq_dest'
theorem M.dest_corec' {α : TypeVec.{u} n} {β : Type u} (g₀ : β → P.A)
(g₁ : ∀ b : β, P.drop.B (g₀ b) ⟹ α) (g₂ : ∀ b : β, P.last.B (g₀ b) → β) (x : β) :
M.dest P (M.corec' P g₀ g₁ g₂ x) = ⟨g₀ x, splitFun (g₁ x) (M.corec' P g₀ g₁ g₂ ∘ g₂ x)⟩ :=
rfl
-
-set_option linter.uppercaseLean3 false in
#align mvpfunctor.M.dest_corec' MvPFunctor.M.dest_corec'
-theorem M.dest_corec {α : TypeVec n} {β : Type u} (g : β → P.Obj (α.append1 β)) (x : β) :
+theorem M.dest_corec {α : TypeVec n} {β : Type u} (g : β → P (α.append1 β)) (x : β) :
M.dest P (M.corec P g x) = appendFun id (M.corec P g) <$$> g x := by
trans
apply M.dest_corec'
@@ -257,8 +219,6 @@ theorem M.dest_corec {α : TypeVec n} {β : Type u} (g : β → P.Obj (α.append
conv =>
rhs
rw [← split_dropFun_lastFun f, appendFun_comp_splitFun]
-
-set_option linter.uppercaseLean3 false in
#align mvpfunctor.M.dest_corec MvPFunctor.M.dest_corec
theorem M.bisim_lemma {α : TypeVec n} {a₁ : (mp P).A} {f₁ : (mp P).B a₁ ⟹ α} {a' : P.A}
@@ -272,8 +232,6 @@ theorem M.bisim_lemma {α : TypeVec n} {a₁ : (mp P).A} {f₁ : (mp P).B a₁
rcases e₁' : he₁' with ⟨a₁', g₁'⟩;
rw [M.dest_eq_dest' _ e₁'] at e₁
cases e₁; exact ⟨_, e₁', splitFun_inj ef⟩
-
-set_option linter.uppercaseLean3 false in
#align mvpfunctor.M.bisim_lemma MvPFunctor.M.bisim_lemma
theorem M.bisim {α : TypeVec n} (R : P.M α → P.M α → Prop)
@@ -308,8 +266,6 @@ theorem M.bisim {α : TypeVec n} (R : P.M α → P.M α → Prop)
cases h'.symm.trans e₂'
· exact (congr_fun (congr_fun e₃ i) c : _)
· exact IH _ _ (h'' _)
-
-set_option linter.uppercaseLean3 false in
#align mvpfunctor.M.bisim MvPFunctor.M.bisim
theorem M.bisim₀ {α : TypeVec n} (R : P.M α → P.M α → Prop) (h₀ : Equivalence R)
@@ -342,8 +298,6 @@ theorem M.bisim₀ {α : TypeVec n} (R : P.M α → P.M α → Prop) (h₀ : Equ
replace h₁ := Quot.exact _ h₁
rw [h₀.eqvGen_iff] at h₁
exact h₁
-
-set_option linter.uppercaseLean3 false in
#align mvpfunctor.M.bisim₀ MvPFunctor.M.bisim₀
theorem M.bisim' {α : TypeVec n} (R : P.M α → P.M α → Prop)
@@ -360,8 +314,6 @@ theorem M.bisim' {α : TypeVec n} (R : P.M α → P.M α → Prop)
rwa [appendFun_comp_id, ← MvFunctor.map_map, ← MvFunctor.map_map, h]
-- porting note: `cc` was replaced with `aesop`, maybe there is a more light-weight solution?
all_goals aesop
-
-set_option linter.uppercaseLean3 false in
#align mvpfunctor.M.bisim' MvPFunctor.M.bisim'
theorem M.dest_map {α β : TypeVec n} (g : α ⟹ β) (x : P.M α) :
@@ -371,8 +323,6 @@ theorem M.dest_map {α β : TypeVec n} (g : α ⟹ β) (x : P.M α) :
conv =>
rhs
rw [M.dest, M.dest', map_eq, appendFun_comp_splitFun]
-
-set_option linter.uppercaseLean3 false in
#align mvpfunctor.M.dest_map MvPFunctor.M.dest_map
theorem M.map_dest {α β : TypeVec n} (g : (α ::: P.M α) ⟹ (β ::: P.M β)) (x : P.M α)
@@ -381,8 +331,6 @@ theorem M.map_dest {α β : TypeVec n} (g : (α ::: P.M α) ⟹ (β ::: P.M β))
rw [M.dest_map]; congr
apply eq_of_drop_last_eq <;> simp
ext1; apply h
-
-set_option linter.uppercaseLean3 false in
#align mvpfunctor.M.map_dest MvPFunctor.M.map_dest
end MvPFunctor
@@ -335,7 +335,7 @@ theorem M.bisim₀ {α : TypeVec n} (R : P.M α → P.M α → Prop) (h₀ : Equ
simpa using h₁
exists ax, dropFun fx, lastFun fx, lastFun fy
rw [split_dropFun_lastFun, Hdrop, split_dropFun_lastFun]
- simp
+ simp only [true_and]
intro i
replace h₁ := congr_fun (congr_fun h₁ Fin2.fz) i
simp [(· ⊚ ·), appendFun, splitFun] at h₁
@@ -143,14 +143,14 @@ set_option linter.uppercaseLean3 false in
/-- Using corecursion, construct the contents of an M-type -/
def M.corecContents {α : TypeVec.{u} n}
- {β : Type u}
- (g₀ : β → P.A)
- (g₁ : ∀ b : β, P.drop.B (g₀ b) ⟹ α)
- (g₂ : ∀ b : β, P.last.B (g₀ b) → β)
- (x : _)
- (b : β)
- (h: x = M.corecShape P g₀ g₂ b) :
- M.Path P x ⟹ α
+ {β : Type u}
+ (g₀ : β → P.A)
+ (g₁ : ∀ b : β, P.drop.B (g₀ b) ⟹ α)
+ (g₂ : ∀ b : β, P.last.B (g₀ b) → β)
+ (x : _)
+ (b : β)
+ (h: x = M.corecShape P g₀ g₂ b) :
+ M.Path P x ⟹ α
| _, M.Path.root x a f h' i c =>
have : a = g₀ b := by
rw [h, M.corecShape, PFunctor.M.dest_corec] at h'
A linter that throws on seeing a colon at the start of a line, according to the style guideline that says these operators should go before linebreaks.
@@ -149,8 +149,8 @@ def M.corecContents {α : TypeVec.{u} n}
(g₂ : ∀ b : β, P.last.B (g₀ b) → β)
(x : _)
(b : β)
- (h: x = M.corecShape P g₀ g₂ b)
- : M.Path P x ⟹ α
+ (h: x = M.corecShape P g₀ g₂ b) :
+ M.Path P x ⟹ α
| _, M.Path.root x a f h' i c =>
have : a = g₀ b := by
rw [h, M.corecShape, PFunctor.M.dest_corec] at h'
@@ -2,15 +2,12 @@
Copyright (c) 2018 Jeremy Avigad. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jeremy Avigad, Mario Carneiro, Simon Hudon
-
-! This file was ported from Lean 3 source module data.pfunctor.multivariate.M
-! leanprover-community/mathlib commit 2738d2ca56cbc63be80c3bd48e9ed90ad94e947d
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Data.PFunctor.Multivariate.Basic
import Mathlib.Data.PFunctor.Univariate.M
+#align_import data.pfunctor.multivariate.M from "leanprover-community/mathlib"@"2738d2ca56cbc63be80c3bd48e9ed90ad94e947d"
+
/-!
# The M construction as a multivariate polynomial functor.
@@ -85,7 +85,7 @@ instance M.Path.inhabited (x : P.last.M) {i} [Inhabited (P.drop.B x.head i)] :
let f := PFunctor.M.children x
⟨M.Path.root _ a f
(PFunctor.M.casesOn' x
- (r:=fun _ => PFunctor.M.dest x = ⟨a, f⟩)
+ (r := fun _ => PFunctor.M.dest x = ⟨a, f⟩)
<| by
intros; simp [PFunctor.M.dest_mk, PFunctor.M.children_mk]; rfl)
_ default⟩
by
s! (#3825)
This PR puts, with one exception, every single remaining by
that lies all by itself on its own line to the previous line, thus matching the current behaviour of start-port.sh
. The exception is when the by
begins the second or later argument to a tuple or anonymous constructor; see https://github.com/leanprover-community/mathlib4/pull/3825#discussion_r1186702599.
Essentially this is s/\n *by$/ by/g
, but with manual editing to satisfy the linter's max-100-char-line requirement. The Python style linter is also modified to catch these "isolated by
s".
@@ -165,8 +165,7 @@ def M.corecContents {α : TypeVec.{u} n}
rw [h, M.corecShape, PFunctor.M.dest_corec] at h'
cases h'
rfl
- have h₁ : f j = M.corecShape P g₀ g₂ (g₂ b (castLastB P h₀ j)) :=
- by
+ have h₁ : f j = M.corecShape P g₀ g₂ (g₂ b (castLastB P h₀ j)) := by
rw [h, M.corecShape, PFunctor.M.dest_corec] at h'
cases h'
rfl
@@ -291,8 +290,7 @@ theorem M.bisim {α : TypeVec n} (R : P.M α → P.M α → Prop)
cases' x with a₁ f₁
cases' y with a₂ f₂
dsimp [mp] at *
- have : a₁ = a₂ :=
- by
+ have : a₁ = a₂ := by
refine'
PFunctor.M.bisim (fun a₁ a₂ => ∃ x y, R x y ∧ x.1 = a₁ ∧ y.1 = a₂) _ _ _
⟨⟨a₁, f₁⟩, ⟨a₂, f₂⟩, r, rfl, rfl⟩
@@ -335,8 +333,7 @@ theorem M.bisim₀ {α : TypeVec n} (R : P.M α → P.M α → Prop) (h₀ : Equ
injection h with h₀ h₁
subst ay
simp at h₁
- have Hdrop : dropFun fx = dropFun fy :=
- by
+ have Hdrop : dropFun fx = dropFun fy := by
replace h₁ := congr_arg dropFun h₁
simpa using h₁
exists ax, dropFun fx, lastFun fx, lastFun fy
The unported dependencies are