l3lab/ntp-mathlib huggingface dataset:
/-- Given a linear map `L : E → F`, a property holds almost everywhere in `F` if and only if,
almost everywhere in `F`, it holds almost everywhere along the subspace spanned by the
image of `L`. This is an instance of a disintegration argument for additive Haar measures.-/
lemma ae_ae_add_linearMap_mem_iff [LocallyCompactSpace F] {s : Set F} (hs : MeasurableSet s) :
    (∀ᵐ y ∂ν, ∀ᵐ x ∂μ, y + L x ∈ s) ↔ ∀ᵐ y ∂ν, y ∈ s := by
  have : FiniteDimensional 𝕜 E := finiteDimensional_of_locallyCompactSpace 𝕜
  have : FiniteDimensional 𝕜 F := finiteDimensional_of_locallyCompactSpace 𝕜
  have : ProperSpace E := properSpace_of_locallyCompactSpace 𝕜
  have : ProperSpace F := properSpace_of_locallyCompactSpace 𝕜
  let M : F × E →ₗ[𝕜] F := LinearMap.id.coprod L
  have M_cont : Continuous M := M.continuous_of_finiteDimensional
  have hM : Function.Surjective M := by simp [← LinearMap.range_eq_top, LinearMap.range_coprod]
  have A : ∀ x, M x ∈ s ↔ x ∈ M ⁻¹' s := fun x ↦ Iff.rfl
  

Proof state:
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝¹³ : NontriviallyNormedField 𝕜
inst✝¹² : CompleteSpace 𝕜
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : MeasurableSpace E
inst✝⁹ : BorelSpace E
inst✝⁸ : NormedSpace 𝕜 E
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : MeasurableSpace F
inst✝⁵ : BorelSpace F
inst✝⁴ : NormedSpace 𝕜 F
L : E →ₗ[𝕜] F
μ : Measure E
ν : Measure F
inst✝³ : IsAddHaarMeasure μ
inst✝² : IsAddHaarMeasure ν
inst✝¹ : LocallyCompactSpace E
inst✝ : LocallyCompactSpace F
s : Set F
hs : MeasurableSet s
this✝² : FiniteDimensional 𝕜 E
this✝¹ : FiniteDimensional 𝕜 F
this✝ : ProperSpace E
this : ProperSpace F
M : F × E →ₗ[𝕜] F := LinearMap.coprod LinearMap.id L
M_cont : Continuous ⇑M
hM : Function.Surjective ⇑M
A : ∀ (x : F × E), M x ∈ s ↔ x ∈ ⇑M ⁻¹' s
⊢ (∀ᵐ (y : F) ∂ν, ∀ᵐ (x : E) ∂μ, y + L x ∈ s) ↔ ∀ᵐ (y : F) ∂ν, y ∈ s

Next tactic:
simp_rw [← ae_comp_linearMap_mem_iff M (ν.prod μ) ν hM hs, A]
/-- Given a linear map `L : E → F`, a property holds almost everywhere in `F` if and only if,
almost everywhere in `F`, it holds almost everywhere along the subspace spanned by the
image of `L`. This is an instance of a disintegration argument for additive Haar measures.-/
lemma ae_ae_add_linearMap_mem_iff [LocallyCompactSpace F] {s : Set F} (hs : MeasurableSet s) :
    (∀ᵐ y ∂ν, ∀ᵐ x ∂μ, y + L x ∈ s) ↔ ∀ᵐ y ∂ν, y ∈ s := by
  have : FiniteDimensional 𝕜 E := finiteDimensional_of_locallyCompactSpace 𝕜
  have : FiniteDimensional 𝕜 F := finiteDimensional_of_locallyCompactSpace 𝕜
  have : ProperSpace E := properSpace_of_locallyCompactSpace 𝕜
  have : ProperSpace F := properSpace_of_locallyCompactSpace 𝕜
  let M : F × E →ₗ[𝕜] F := LinearMap.id.coprod L
  have M_cont : Continuous M := M.continuous_of_finiteDimensional
  have hM : Function.Surjective M := by simp [← LinearMap.range_eq_top, LinearMap.range_coprod]
  have A : ∀ x, M x ∈ s ↔ x ∈ M ⁻¹' s := fun x ↦ Iff.rfl
  simp_rw [← ae_comp_linearMap_mem_iff M (ν.prod μ) ν hM hs, A]
  

Proof state:
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝¹³ : NontriviallyNormedField 𝕜
inst✝¹² : CompleteSpace 𝕜
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : MeasurableSpace E
inst✝⁹ : BorelSpace E
inst✝⁸ : NormedSpace 𝕜 E
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : MeasurableSpace F
inst✝⁵ : BorelSpace F
inst✝⁴ : NormedSpace 𝕜 F
L : E →ₗ[𝕜] F
μ : Measure E
ν : Measure F
inst✝³ : IsAddHaarMeasure μ
inst✝² : IsAddHaarMeasure ν
inst✝¹ : LocallyCompactSpace E
inst✝ : LocallyCompactSpace F
s : Set F
hs : MeasurableSet s
this✝² : FiniteDimensional 𝕜 E
this✝¹ : FiniteDimensional 𝕜 F
this✝ : ProperSpace E
this : ProperSpace F
M : F × E →ₗ[𝕜] F := LinearMap.coprod LinearMap.id L
M_cont : Continuous ⇑M
hM : Function.Surjective ⇑M
A : ∀ (x : F × E), M x ∈ s ↔ x ∈ ⇑M ⁻¹' s
⊢ (∀ᵐ (y : F) ∂ν, ∀ᵐ (x : E) ∂μ, y + L x ∈ s) ↔
    ∀ᵐ (x : F × E) ∂Measure.prod ν μ, x ∈ ⇑(LinearMap.coprod LinearMap.id L) ⁻¹' s

Next tactic:
rw [Measure.ae_prod_mem_iff_ae_ae_mem]
/-- Given a linear map `L : E → F`, a property holds almost everywhere in `F` if and only if,
almost everywhere in `F`, it holds almost everywhere along the subspace spanned by the
image of `L`. This is an instance of a disintegration argument for additive Haar measures.-/
lemma ae_ae_add_linearMap_mem_iff [LocallyCompactSpace F] {s : Set F} (hs : MeasurableSet s) :
    (∀ᵐ y ∂ν, ∀ᵐ x ∂μ, y + L x ∈ s) ↔ ∀ᵐ y ∂ν, y ∈ s := by
  have : FiniteDimensional 𝕜 E := finiteDimensional_of_locallyCompactSpace 𝕜
  have : FiniteDimensional 𝕜 F := finiteDimensional_of_locallyCompactSpace 𝕜
  have : ProperSpace E := properSpace_of_locallyCompactSpace 𝕜
  have : ProperSpace F := properSpace_of_locallyCompactSpace 𝕜
  let M : F × E →ₗ[𝕜] F := LinearMap.id.coprod L
  have M_cont : Continuous M := M.continuous_of_finiteDimensional
  have hM : Function.Surjective M := by simp [← LinearMap.range_eq_top, LinearMap.range_coprod]
  have A : ∀ x, M x ∈ s ↔ x ∈ M ⁻¹' s := fun x ↦ Iff.rfl
  simp_rw [← ae_comp_linearMap_mem_iff M (ν.prod μ) ν hM hs, A]
  rw [Measure.ae_prod_mem_iff_ae_ae_mem]
  

Proof state:
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝¹³ : NontriviallyNormedField 𝕜
inst✝¹² : CompleteSpace 𝕜
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : MeasurableSpace E
inst✝⁹ : BorelSpace E
inst✝⁸ : NormedSpace 𝕜 E
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : MeasurableSpace F
inst✝⁵ : BorelSpace F
inst✝⁴ : NormedSpace 𝕜 F
L : E →ₗ[𝕜] F
μ : Measure E
ν : Measure F
inst✝³ : IsAddHaarMeasure μ
inst✝² : IsAddHaarMeasure ν
inst✝¹ : LocallyCompactSpace E
inst✝ : LocallyCompactSpace F
s : Set F
hs : MeasurableSet s
this✝² : FiniteDimensional 𝕜 E
this✝¹ : FiniteDimensional 𝕜 F
this✝ : ProperSpace E
this : ProperSpace F
M : F × E →ₗ[𝕜] F := LinearMap.coprod LinearMap.id L
M_cont : Continuous ⇑M
hM : Function.Surjective ⇑M
A : ∀ (x : F × E), M x ∈ s ↔ x ∈ ⇑M ⁻¹' s
⊢ (∀ᵐ (y : F) ∂ν, ∀ᵐ (x : E) ∂μ, y + L x ∈ s) ↔
    ∀ᵐ (x : F) ∂ν, ∀ᵐ (y : E) ∂μ, (x, y) ∈ ⇑(LinearMap.coprod LinearMap.id L) ⁻¹' s
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝¹³ : NontriviallyNormedField 𝕜
inst✝¹² : CompleteSpace 𝕜
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : MeasurableSpace E
inst✝⁹ : BorelSpace E
inst✝⁸ : NormedSpace 𝕜 E
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : MeasurableSpace F
inst✝⁵ : BorelSpace F
inst✝⁴ : NormedSpace 𝕜 F
L : E →ₗ[𝕜] F
μ : Measure E
ν : Measure F
inst✝³ : IsAddHaarMeasure μ
inst✝² : IsAddHaarMeasure ν
inst✝¹ : LocallyCompactSpace E
inst✝ : LocallyCompactSpace F
s : Set F
hs : MeasurableSet s
this✝² : FiniteDimensional 𝕜 E
this✝¹ : FiniteDimensional 𝕜 F
this✝ : ProperSpace E
this : ProperSpace F
M : F × E →ₗ[𝕜] F := LinearMap.coprod LinearMap.id L
M_cont : Continuous ⇑M
hM : Function.Surjective ⇑M
A : ∀ (x : F × E), M x ∈ s ↔ x ∈ ⇑M ⁻¹' s
⊢ MeasurableSet (⇑(LinearMap.coprod LinearMap.id L) ⁻¹' s)

Next tactic:
simp only [mem_preimage, LinearMap.coprod_apply, LinearMap.id_coe, id_eq]
/-- Given a linear map `L : E → F`, a property holds almost everywhere in `F` if and only if,
almost everywhere in `F`, it holds almost everywhere along the subspace spanned by the
image of `L`. This is an instance of a disintegration argument for additive Haar measures.-/
lemma ae_ae_add_linearMap_mem_iff [LocallyCompactSpace F] {s : Set F} (hs : MeasurableSet s) :
    (∀ᵐ y ∂ν, ∀ᵐ x ∂μ, y + L x ∈ s) ↔ ∀ᵐ y ∂ν, y ∈ s := by
  have : FiniteDimensional 𝕜 E := finiteDimensional_of_locallyCompactSpace 𝕜
  have : FiniteDimensional 𝕜 F := finiteDimensional_of_locallyCompactSpace 𝕜
  have : ProperSpace E := properSpace_of_locallyCompactSpace 𝕜
  have : ProperSpace F := properSpace_of_locallyCompactSpace 𝕜
  let M : F × E →ₗ[𝕜] F := LinearMap.id.coprod L
  have M_cont : Continuous M := M.continuous_of_finiteDimensional
  have hM : Function.Surjective M := by simp [← LinearMap.range_eq_top, LinearMap.range_coprod]
  have A : ∀ x, M x ∈ s ↔ x ∈ M ⁻¹' s := fun x ↦ Iff.rfl
  simp_rw [← ae_comp_linearMap_mem_iff M (ν.prod μ) ν hM hs, A]
  rw [Measure.ae_prod_mem_iff_ae_ae_mem]
  simp only [mem_preimage, LinearMap.coprod_apply, LinearMap.id_coe, id_eq]
  

Proof state:
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝¹³ : NontriviallyNormedField 𝕜
inst✝¹² : CompleteSpace 𝕜
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : MeasurableSpace E
inst✝⁹ : BorelSpace E
inst✝⁸ : NormedSpace 𝕜 E
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : MeasurableSpace F
inst✝⁵ : BorelSpace F
inst✝⁴ : NormedSpace 𝕜 F
L : E →ₗ[𝕜] F
μ : Measure E
ν : Measure F
inst✝³ : IsAddHaarMeasure μ
inst✝² : IsAddHaarMeasure ν
inst✝¹ : LocallyCompactSpace E
inst✝ : LocallyCompactSpace F
s : Set F
hs : MeasurableSet s
this✝² : FiniteDimensional 𝕜 E
this✝¹ : FiniteDimensional 𝕜 F
this✝ : ProperSpace E
this : ProperSpace F
M : F × E →ₗ[𝕜] F := LinearMap.coprod LinearMap.id L
M_cont : Continuous ⇑M
hM : Function.Surjective ⇑M
A : ∀ (x : F × E), M x ∈ s ↔ x ∈ ⇑M ⁻¹' s
⊢ MeasurableSet (⇑(LinearMap.coprod LinearMap.id L) ⁻¹' s)

Next tactic:
exact M_cont.measurable hs
instance {M N : GroupWithZeroCat} : FunLike (M ⟶ N) M (fun _ => N) :=
  ⟨fun f => f.toFun, fun f g h => by
    

Proof state:
M N : GroupWithZeroCat
f g : M ⟶ N
h : (fun f => f.toFun) f = (fun f => f.toFun) g
⊢ f = g

Next tactic:
cases f
instance {M N : GroupWithZeroCat} : FunLike (M ⟶ N) M (fun _ => N) :=
  ⟨fun f => f.toFun, fun f g h => by
    cases f
    

Proof state:
case mk
M N : GroupWithZeroCat
g : M ⟶ N
toZeroHom✝ : ZeroHom ↑M ↑N
map_one'✝ : ZeroHom.toFun toZeroHom✝ 1 = 1
map_mul'✝ : ∀ (x y : ↑M), ZeroHom.toFun toZeroHom✝ (x * y) = ZeroHom.toFun toZeroHom✝ x * ZeroHom.toFun toZeroHom✝ y
h : (fun f => f.toFun) { toZeroHom := toZeroHom✝, map_one' := map_one'✝, map_mul' := map_mul'✝ } = (fun f => f.toFun) g
⊢ { toZeroHom := toZeroHom✝, map_one' := map_one'✝, map_mul' := map_mul'✝ } = g

Next tactic:
cases g
instance {M N : GroupWithZeroCat} : FunLike (M ⟶ N) M (fun _ => N) :=
  ⟨fun f => f.toFun, fun f g h => by
    cases f
    cases g
    

Proof state:
case mk.mk
M N : GroupWithZeroCat
toZeroHom✝¹ : ZeroHom ↑M ↑N
map_one'✝¹ : ZeroHom.toFun toZeroHom✝¹ 1 = 1
map_mul'✝¹ : ∀ (x y : ↑M), ZeroHom.toFun toZeroHom✝¹ (x * y) = ZeroHom.toFun toZeroHom✝¹ x * ZeroHom.toFun toZeroHom✝¹ y
toZeroHom✝ : ZeroHom ↑M ↑N
map_one'✝ : ZeroHom.toFun toZeroHom✝ 1 = 1
map_mul'✝ : ∀ (x y : ↑M), ZeroHom.toFun toZeroHom✝ (x * y) = ZeroHom.toFun toZeroHom✝ x * ZeroHom.toFun toZeroHom✝ y
h :
  (fun f => f.toFun) { toZeroHom := toZeroHom✝¹, map_one' := map_one'✝¹, map_mul' := map_mul'✝¹ } =
    (fun f => f.toFun) { toZeroHom := toZeroHom✝, map_one' := map_one'✝, map_mul' := map_mul'✝ }
⊢ { toZeroHom := toZeroHom✝¹, map_one' := map_one'✝¹, map_mul' := map_mul'✝¹ } =
    { toZeroHom := toZeroHom✝, map_one' := map_one'✝, map_mul' := map_mul'✝ }

Next tactic:
congr
instance {M N : GroupWithZeroCat} : FunLike (M ⟶ N) M (fun _ => N) :=
  ⟨fun f => f.toFun, fun f g h => by
    cases f
    cases g
    congr
    

Proof state:
case mk.mk.e_toZeroHom
M N : GroupWithZeroCat
toZeroHom✝¹ : ZeroHom ↑M ↑N
map_one'✝¹ : ZeroHom.toFun toZeroHom✝¹ 1 = 1
map_mul'✝¹ : ∀ (x y : ↑M), ZeroHom.toFun toZeroHom✝¹ (x * y) = ZeroHom.toFun toZeroHom✝¹ x * ZeroHom.toFun toZeroHom✝¹ y
toZeroHom✝ : ZeroHom ↑M ↑N
map_one'✝ : ZeroHom.toFun toZeroHom✝ 1 = 1
map_mul'✝ : ∀ (x y : ↑M), ZeroHom.toFun toZeroHom✝ (x * y) = ZeroHom.toFun toZeroHom✝ x * ZeroHom.toFun toZeroHom✝ y
h :
  (fun f => f.toFun) { toZeroHom := toZeroHom✝¹, map_one' := map_one'✝¹, map_mul' := map_mul'✝¹ } =
    (fun f => f.toFun) { toZeroHom := toZeroHom✝, map_one' := map_one'✝, map_mul' := map_mul'✝ }
⊢ toZeroHom✝¹ = toZeroHom✝

Next tactic:
apply FunLike.coe_injective'
instance {M N : GroupWithZeroCat} : FunLike (M ⟶ N) M (fun _ => N) :=
  ⟨fun f => f.toFun, fun f g h => by
    cases f
    cases g
    congr
    apply FunLike.coe_injective'
    

Proof state:
case mk.mk.e_toZeroHom.a
M N : GroupWithZeroCat
toZeroHom✝¹ : ZeroHom ↑M ↑N
map_one'✝¹ : ZeroHom.toFun toZeroHom✝¹ 1 = 1
map_mul'✝¹ : ∀ (x y : ↑M), ZeroHom.toFun toZeroHom✝¹ (x * y) = ZeroHom.toFun toZeroHom✝¹ x * ZeroHom.toFun toZeroHom✝¹ y
toZeroHom✝ : ZeroHom ↑M ↑N
map_one'✝ : ZeroHom.toFun toZeroHom✝ 1 = 1
map_mul'✝ : ∀ (x y : ↑M), ZeroHom.toFun toZeroHom✝ (x * y) = ZeroHom.toFun toZeroHom✝ x * ZeroHom.toFun toZeroHom✝ y
h :
  (fun f => f.toFun) { toZeroHom := toZeroHom✝¹, map_one' := map_one'✝¹, map_mul' := map_mul'✝¹ } =
    (fun f => f.toFun) { toZeroHom := toZeroHom✝, map_one' := map_one'✝, map_mul' := map_mul'✝ }
⊢ ⇑toZeroHom✝¹ = ⇑toZeroHom✝

Next tactic:
exact h
/-- Constructs an isomorphism of groups with zero from a group isomorphism between them. -/
@[simps]
def Iso.mk {α β : GroupWithZeroCat.{u}} (e : α ≃* β) : α ≅ β where
  hom := (e : α →*₀ β)
  inv := (e.symm : β →*₀ α)
  hom_inv_id := by
    

Proof state:
α β : GroupWithZeroCat
e : ↑α ≃* ↑β
⊢ ↑e ≫ ↑(MulEquiv.symm e) = 𝟙 α

Next tactic:
ext
/-- Constructs an isomorphism of groups with zero from a group isomorphism between them. -/
@[simps]
def Iso.mk {α β : GroupWithZeroCat.{u}} (e : α ≃* β) : α ≅ β where
  hom := (e : α →*₀ β)
  inv := (e.symm : β →*₀ α)
  hom_inv_id := by
    ext
    

Proof state:
case w
α β : GroupWithZeroCat
e : ↑α ≃* ↑β
x✝ : (forget GroupWithZeroCat).obj α
⊢ (↑e ≫ ↑(MulEquiv.symm e)) x✝ = (𝟙 α) x✝

Next tactic:
exact e.symm_apply_apply _
/-- Constructs an isomorphism of groups with zero from a group isomorphism between them. -/
@[simps]
def Iso.mk {α β : GroupWithZeroCat.{u}} (e : α ≃* β) : α ≅ β where
  hom := (e : α →*₀ β)
  inv := (e.symm : β →*₀ α)
  hom_inv_id := by
    ext
    exact e.symm_apply_apply _
  inv_hom_id := by
    

Proof state:
α β : GroupWithZeroCat
e : ↑α ≃* ↑β
⊢ ↑(MulEquiv.symm e) ≫ ↑e = 𝟙 β

Next tactic:
ext
/-- Constructs an isomorphism of groups with zero from a group isomorphism between them. -/
@[simps]
def Iso.mk {α β : GroupWithZeroCat.{u}} (e : α ≃* β) : α ≅ β where
  hom := (e : α →*₀ β)
  inv := (e.symm : β →*₀ α)
  hom_inv_id := by
    ext
    exact e.symm_apply_apply _
  inv_hom_id := by
    ext
    

Proof state:
case w
α β : GroupWithZeroCat
e : ↑α ≃* ↑β
x✝ : (forget GroupWithZeroCat).obj β
⊢ (↑(MulEquiv.symm e) ≫ ↑e) x✝ = (𝟙 β) x✝

Next tactic:
exact e.apply_symm_apply _
instance : LawfulFunctor Multiset := by 

Proof state:
⊢ LawfulFunctor Multiset

Next tactic:
refine' { .. }
instance : LawfulFunctor Multiset := by refine' { .. } <;> 

Proof state:
case refine'_1
⊢ ∀ {α β : Type ?u.250}, Functor.mapConst = Functor.map ∘ Function.const β

Next tactic:
intros
instance : LawfulFunctor Multiset := by refine' { .. } <;> 

Proof state:
case refine'_2
⊢ ∀ {α : Type ?u.250} (x : Multiset α), id <$> x = x

Next tactic:
intros
instance : LawfulFunctor Multiset := by refine' { .. } <;> 

Proof state:
case refine'_3
⊢ ∀ {α β γ : Type ?u.250} (g : α → β) (h : β → γ) (x : Multiset α), (h ∘ g) <$> x = h <$> g <$> x

Next tactic:
intros
instance : LawfulFunctor Multiset := by refine' { .. } <;> intros <;> (

Proof state:
case refine'_1
α✝ β✝ : Type ?u.250
⊢ Functor.mapConst = Functor.map ∘ Function.const β✝

Next tactic:
try simp
instance : LawfulFunctor Multiset := by refine' { .. } <;> intros <;> (try 

Proof state:
case refine'_1
α✝ β✝ : Type ?u.250
⊢ Functor.mapConst = Functor.map ∘ Function.const β✝

Next tactic:
simp
instance : LawfulFunctor Multiset := by refine' { .. } <;> intros <;> (

Proof state:
case refine'_2
α✝ : Type ?u.250
x✝ : Multiset α✝
⊢ id <$> x✝ = x✝

Next tactic:
try simp
instance : LawfulFunctor Multiset := by refine' { .. } <;> intros <;> (try 

Proof state:
case refine'_2
α✝ : Type ?u.250
x✝ : Multiset α✝
⊢ id <$> x✝ = x✝

Next tactic:
simp
instance : LawfulFunctor Multiset := by refine' { .. } <;> intros <;> (

Proof state:
case refine'_3
α✝ β✝ γ✝ : Type ?u.250
g✝ : α✝ → β✝
h✝ : β✝ → γ✝
x✝ : Multiset α✝
⊢ (h✝ ∘ g✝) <$> x✝ = h✝ <$> g✝ <$> x✝

Next tactic:
try simp
instance : LawfulFunctor Multiset := by refine' { .. } <;> intros <;> (try 

Proof state:
case refine'_3
α✝ β✝ γ✝ : Type ?u.250
g✝ : α✝ → β✝
h✝ : β✝ → γ✝
x✝ : Multiset α✝
⊢ (h✝ ∘ g✝) <$> x✝ = h✝ <$> g✝ <$> x✝

Next tactic:
simp
instance : LawfulFunctor Multiset := by refine' { .. } <;> intros <;> (try simp); 

Proof state:
case refine'_1
α✝ β✝ : Type ?u.250
⊢ Functor.mapConst = Functor.map ∘ Function.const β✝

Next tactic:
rfl
/-- Map each element of a `Multiset` to an action, evaluate these actions in order,
    and collect the results.
-/
def traverse : Multiset α' → F (Multiset β') := by
  

Proof state:
F : Type u → Type u
inst✝¹ : Applicative F
inst✝ : CommApplicative F
α' β' : Type u
f : α' → F β'
⊢ Multiset α' → F (Multiset β')

Next tactic:
refine' Quotient.lift (Functor.map Coe.coe ∘ Traversable.traverse f) _
/-- Map each element of a `Multiset` to an action, evaluate these actions in order,
    and collect the results.
-/
def traverse : Multiset α' → F (Multiset β') := by
  refine' Quotient.lift (Functor.map Coe.coe ∘ Traversable.traverse f) _
  

Proof state:
F : Type u → Type u
inst✝¹ : Applicative F
inst✝ : CommApplicative F
α' β' : Type u
f : α' → F β'
⊢ ∀ (a b : List α'),
    a ≈ b → (Functor.map Coe.coe ∘ Traversable.traverse f) a = (Functor.map Coe.coe ∘ Traversable.traverse f) b

Next tactic:
introv p
/-- Map each element of a `Multiset` to an action, evaluate these actions in order,
    and collect the results.
-/
def traverse : Multiset α' → F (Multiset β') := by
  refine' Quotient.lift (Functor.map Coe.coe ∘ Traversable.traverse f) _
  introv p; 

Proof state:
F : Type u → Type u
inst✝¹ : Applicative F
inst✝ : CommApplicative F
α' β' : Type u
f : α' → F β'
a b : List α'
p : a ≈ b
⊢ (Functor.map Coe.coe ∘ Traversable.traverse f) a = (Functor.map Coe.coe ∘ Traversable.traverse f) b

Next tactic:
unfold Function.comp
/-- Map each element of a `Multiset` to an action, evaluate these actions in order,
    and collect the results.
-/
def traverse : Multiset α' → F (Multiset β') := by
  refine' Quotient.lift (Functor.map Coe.coe ∘ Traversable.traverse f) _
  introv p; unfold Function.comp
  

Proof state:
F : Type u → Type u
inst✝¹ : Applicative F
inst✝ : CommApplicative F
α' β' : Type u
f : α' → F β'
a b : List α'
p : a ≈ b
⊢ Coe.coe <$> Traversable.traverse f a = Coe.coe <$> Traversable.traverse f b

Next tactic:
induction p
/-- Map each element of a `Multiset` to an action, evaluate these actions in order,
    and collect the results.
-/
def traverse : Multiset α' → F (Multiset β') := by
  refine' Quotient.lift (Functor.map Coe.coe ∘ Traversable.traverse f) _
  introv p; unfold Function.comp
  induction p
  

Proof state:
case nil
F : Type u → Type u
inst✝¹ : Applicative F
inst✝ : CommApplicative F
α' β' : Type u
f : α' → F β'
a b : List α'
⊢ Coe.coe <$> Traversable.traverse f [] = Coe.coe <$> Traversable.traverse f []
case cons
F : Type u → Type u
inst✝¹ : Applicative F
inst✝ : CommApplicative F
α' β' : Type u
f : α' → F β'
a b : List α'
x✝ : α'
l₁✝ l₂✝ : List α'
a✝ : l₁✝ ~ l₂✝
a_ih✝ : Coe.coe <$> Traversable.traverse f l₁✝ = Coe.coe <$> Traversable.traverse f l₂✝
⊢ Coe.coe <$> Traversable.traverse f (x✝ :: l₁✝) = Coe.coe <$> Traversable.traverse f (x✝ :: l₂✝)
case swap
F : Type u → Type u
inst✝¹ : Applicative F
inst✝ : CommApplicative F
α' β' : Type u
f : α' → F β'
a b : List α'
x✝ y✝ : α'
l✝ : List α'
⊢ Coe.coe <$> Traversable.traverse f (y✝ :: x✝ :: l✝) = Coe.coe <$> Traversable.traverse f (x✝ :: y✝ :: l✝)
case trans
F : Type u → Type u
inst✝¹ : Applicative F
inst✝ : CommApplicative F
α' β' : Type u
f : α' → F β'
a b l₁✝ l₂✝ l₃✝ : List α'
a✝¹ : l₁✝ ~ l₂✝
a✝ : l₂✝ ~ l₃✝
a_ih✝¹ : Coe.coe <$> Traversable.traverse f l₁✝ = Coe.coe <$> Traversable.traverse f l₂✝
a_ih✝ : Coe.coe <$> Traversable.traverse f l₂✝ = Coe.coe <$> Traversable.traverse f l₃✝
⊢ Coe.coe <$> Traversable.traverse f l₁✝ = Coe.coe <$> Traversable.traverse f l₃✝

Next tactic:
case nil => rfl
/-- Map each element of a `Multiset` to an action, evaluate these actions in order,
    and collect the results.
-/
def traverse : Multiset α' → F (Multiset β') := by
  refine' Quotient.lift (Functor.map Coe.coe ∘ Traversable.traverse f) _
  introv p; unfold Function.comp
  induction p
  

Proof state:
F : Type u → Type u
inst✝¹ : Applicative F
inst✝ : CommApplicative F
α' β' : Type u
f : α' → F β'
a b : List α'
⊢ Coe.coe <$> Traversable.traverse f [] = Coe.coe <$> Traversable.traverse f []

Next tactic:
case nil => rfl
/-- Map each element of a `Multiset` to an action, evaluate these actions in order,
    and collect the results.
-/
def traverse : Multiset α' → F (Multiset β') := by
  refine' Quotient.lift (Functor.map Coe.coe ∘ Traversable.traverse f) _
  introv p; unfold Function.comp
  induction p
  case nil => 

Proof state:
F : Type u → Type u
inst✝¹ : Applicative F
inst✝ : CommApplicative F
α' β' : Type u
f : α' → F β'
a b : List α'
⊢ Coe.coe <$> Traversable.traverse f [] = Coe.coe <$> Traversable.traverse f []

Next tactic:
rfl
/-- Map each element of a `Multiset` to an action, evaluate these actions in order,
    and collect the results.
-/
def traverse : Multiset α' → F (Multiset β') := by
  refine' Quotient.lift (Functor.map Coe.coe ∘ Traversable.traverse f) _
  introv p; unfold Function.comp
  induction p
  case nil => rfl
  

Proof state:
case cons
F : Type u → Type u
inst✝¹ : Applicative F
inst✝ : CommApplicative F
α' β' : Type u
f : α' → F β'
a b : List α'
x✝ : α'
l₁✝ l₂✝ : List α'
a✝ : l₁✝ ~ l₂✝
a_ih✝ : Coe.coe <$> Traversable.traverse f l₁✝ = Coe.coe <$> Traversable.traverse f l₂✝
⊢ Coe.coe <$> Traversable.traverse f (x✝ :: l₁✝) = Coe.coe <$> Traversable.traverse f (x✝ :: l₂✝)
case swap
F : Type u → Type u
inst✝¹ : Applicative F
inst✝ : CommApplicative F
α' β' : Type u
f : α' → F β'
a b : List α'
x✝ y✝ : α'
l✝ : List α'
⊢ Coe.coe <$> Traversable.traverse f (y✝ :: x✝ :: l✝) = Coe.coe <$> Traversable.traverse f (x✝ :: y✝ :: l✝)
case trans
F : Type u → Type u
inst✝¹ : Applicative F
inst✝ : CommApplicative F
α' β' : Type u
f : α' → F β'
a b l₁✝ l₂✝ l₃✝ : List α'
a✝¹ : l₁✝ ~ l₂✝
a✝ : l₂✝ ~ l₃✝
a_ih✝¹ : Coe.coe <$> Traversable.traverse f l₁✝ = Coe.coe <$> Traversable.traverse f l₂✝
a_ih✝ : Coe.coe <$> Traversable.traverse f l₂✝ = Coe.coe <$> Traversable.traverse f l₃✝
⊢ Coe.coe <$> Traversable.traverse f l₁✝ = Coe.coe <$> Traversable.traverse f l₃✝

Next tactic:
case cons x l₁ l₂ _ h =>
    have :
      Multiset.cons <$> f x <*> Coe.coe <$> Traversable.traverse f l₁ =
        Multiset.cons <$> f x <*> Coe.coe <$> Traversable.traverse f l₂ := by rw [h]
    simpa [functor_norm] using this
/-- Map each element of a `Multiset` to an action, evaluate these actions in order,
    and collect the results.
-/
def traverse : Multiset α' → F (Multiset β') := by
  refine' Quotient.lift (Functor.map Coe.coe ∘ Traversable.traverse f) _
  introv p; unfold Function.comp
  induction p
  case nil => rfl
  

Proof state:
F : Type u → Type u
inst✝¹ : Applicative F
inst✝ : CommApplicative F
α' β' : Type u
f : α' → F β'
a b : List α'
x : α'
l₁ l₂ : List α'
a✝ : l₁ ~ l₂
h : Coe.coe <$> Traversable.traverse f l₁ = Coe.coe <$> Traversable.traverse f l₂
⊢ Coe.coe <$> Traversable.traverse f (x :: l₁) = Coe.coe <$> Traversable.traverse f (x :: l₂)

Next tactic:
case cons x l₁ l₂ _ h =>
    have :
      Multiset.cons <$> f x <*> Coe.coe <$> Traversable.traverse f l₁ =
        Multiset.cons <$> f x <*> Coe.coe <$> Traversable.traverse f l₂ := by rw [h]
    simpa [functor_norm] using this
/-- Map each element of a `Multiset` to an action, evaluate these actions in order,
    and collect the results.
-/
def traverse : Multiset α' → F (Multiset β') := by
  refine' Quotient.lift (Functor.map Coe.coe ∘ Traversable.traverse f) _
  introv p; unfold Function.comp
  induction p
  case nil => rfl
  case cons x l₁ l₂ _ h =>
    

Proof state:
F : Type u → Type u
inst✝¹ : Applicative F
inst✝ : CommApplicative F
α' β' : Type u
f : α' → F β'
a b : List α'
x : α'
l₁ l₂ : List α'
a✝ : l₁ ~ l₂
h : Coe.coe <$> Traversable.traverse f l₁ = Coe.coe <$> Traversable.traverse f l₂
⊢ Coe.coe <$> Traversable.traverse f (x :: l₁) = Coe.coe <$> Traversable.traverse f (x :: l₂)

Next tactic:
have :
      Multiset.cons <$> f x <*> Coe.coe <$> Traversable.traverse f l₁ =
        Multiset.cons <$> f x <*> Coe.coe <$> Traversable.traverse f l₂ := by rw [h]