{"text": "[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\nδ : α → Type u_2\nt : (a : α) → Finset (δ a)\nx✝¹ x✝ : (a : α) → a ∈ univ → δ a\n⊢ (fun f a => f a (_ : a ∈ univ)) x✝¹ = (fun f a => f a (_ : a ∈ univ)) x✝ → x✝¹ = x✝\n[PROOFSTEP]\nsimp (config := { contextual := true }) [Function.funext_iff]\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\nδ : α → Type u_2\nt : (a : α) → Finset (δ a)\nf : (a : α) → δ a\n⊢ f ∈ piFinset t ↔ ∀ (a : α), f a ∈ t a\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\nδ : α → Type u_2\nt : (a : α) → Finset (δ a)\nf : (a : α) → δ a\n⊢ f ∈ piFinset t → ∀ (a : α), f a ∈ t a\n[PROOFSTEP]\nsimp only [piFinset, mem_map, and_imp, forall_prop_of_true, exists_prop, mem_univ, exists_imp, mem_pi]\n[GOAL]\ncase mp\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\nδ : α → Type u_2\nt : (a : α) → Finset (δ a)\nf : (a : α) → δ a\n⊢ ∀ (x : (a : α) → a ∈ univ → δ a),\n (∀ (a : α), x a (_ : a ∈ univ) ∈ t a) →\n ↑{ toFun := fun f a => f a (_ : a ∈ univ),\n inj' :=\n (_ :\n ∀ (x x_1 : (a : α) → a ∈ univ → δ a),\n ((fun a => x a (_ : a ∈ univ)) = fun a => x_1 a (_ : a ∈ univ)) → x = x_1) }\n x =\n f →\n ∀ (a : α), f a ∈ t a\n[PROOFSTEP]\nrintro g hg hgf a\n[GOAL]\ncase mp\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\nδ : α → Type u_2\nt : (a : α) → Finset (δ a)\nf : (a : α) → δ a\ng : (a : α) → a ∈ univ → δ a\nhg : ∀ (a : α), g a (_ : a ∈ univ) ∈ t a\nhgf :\n ↑{ toFun := fun f a => f a (_ : a ∈ univ),\n inj' :=\n (_ :\n ∀ (x x_1 : (a : α) → a ∈ univ → δ a),\n ((fun a => x a (_ : a ∈ univ)) = fun a => x_1 a (_ : a ∈ univ)) → x = x_1) }\n g =\n f\na : α\n⊢ f a ∈ t a\n[PROOFSTEP]\nrw [← hgf]\n[GOAL]\ncase mp\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\nδ : α → Type u_2\nt : (a : α) → Finset (δ a)\nf : (a : α) → δ a\ng : (a : α) → a ∈ univ → δ a\nhg : ∀ (a : α), g a (_ : a ∈ univ) ∈ t a\nhgf :\n ↑{ toFun := fun f a => f a (_ : a ∈ univ),\n inj' :=\n (_ :\n ∀ (x x_1 : (a : α) → a ∈ univ → δ a),\n ((fun a => x a (_ : a ∈ univ)) = fun a => x_1 a (_ : a ∈ univ)) → x = x_1) }\n g =\n f\na : α\n⊢ ↑{ toFun := fun f a => f a (_ : a ∈ univ),\n inj' :=\n (_ :\n ∀ (x x_1 : (a : α) → a ∈ univ → δ a),\n ((fun a => x a (_ : a ∈ univ)) = fun a => x_1 a (_ : a ∈ univ)) → x = x_1) }\n g a ∈\n t a\n[PROOFSTEP]\nexact hg a\n[GOAL]\ncase mpr\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\nδ : α → Type u_2\nt : (a : α) → Finset (δ a)\nf : (a : α) → δ a\n⊢ (∀ (a : α), f a ∈ t a) → f ∈ piFinset t\n[PROOFSTEP]\nsimp only [piFinset, mem_map, forall_prop_of_true, exists_prop, mem_univ, mem_pi]\n[GOAL]\ncase mpr\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\nδ : α → Type u_2\nt : (a : α) → Finset (δ a)\nf : (a : α) → δ a\n⊢ (∀ (a : α), f a ∈ t a) →\n ∃ a,\n (∀ (a_1 : α), a a_1 (_ : a_1 ∈ univ) ∈ t a_1) ∧\n ↑{ toFun := fun f a => f a (_ : a ∈ univ),\n inj' :=\n (_ :\n ∀ (x x_1 : (a : α) → a ∈ univ → δ a),\n ((fun a => x a (_ : a ∈ univ)) = fun a => x_1 a (_ : a ∈ univ)) → x = x_1) }\n a =\n f\n[PROOFSTEP]\nexact fun hf => ⟨fun a _ => f a, hf, rfl⟩\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\nδ : α → Type u_2\nt : (a : α) → Finset (δ a)\nx : (a : α) → δ a\n⊢ x ∈ ↑(piFinset t) ↔ x ∈ Set.pi Set.univ fun a => ↑(t a)\n[PROOFSTEP]\nrw [Set.mem_univ_pi]\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\nδ : α → Type u_2\nt : (a : α) → Finset (δ a)\nx : (a : α) → δ a\n⊢ x ∈ ↑(piFinset t) ↔ ∀ (i : α), x i ∈ ↑(t i)\n[PROOFSTEP]\nexact Fintype.mem_piFinset\n[GOAL]\nα : Type u_1\ninst✝² : DecidableEq α\ninst✝¹ : Fintype α\nδ : α → Type u_2\ninst✝ : Nonempty α\nx✝ : (a : α) → δ a\n⊢ ¬x✝ ∈ piFinset fun x => ∅\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\nδ : α → Type u_2\nf x✝ : (a : α) → δ a\n⊢ (x✝ ∈ piFinset fun i => {f i}) ↔ x✝ ∈ {f}\n[PROOFSTEP]\nsimp only [Function.funext_iff, Fintype.mem_piFinset, mem_singleton]\n[GOAL]\nα✝ : Type u_1\nα : Type u_2\nβ : α → Type u_3\ninst✝² : DecidableEq α\ninst✝¹ : Fintype α\ninst✝ : (a : α) → Fintype (β a)\n⊢ ∀ (x : (a : α) → β a), x ∈ Fintype.piFinset fun x => univ\n[PROOFSTEP]\nsimp\n[GOAL]\nα✝ : Type u_1\nα : Type ?u.21193\nβ : Type ?u.21196\ninst✝¹ : Fintype α\ninst✝ : Fintype β\n⊢ Fintype (α ↪ β)\n[PROOFSTEP]\nclassical. exact Fintype.ofEquiv _ (Equiv.subtypeInjectiveEquivEmbedding α β)\n[GOAL]\nα✝ : Type u_1\nα : Type ?u.21193\nβ : Type ?u.21196\ninst✝¹ : Fintype α\ninst✝ : Fintype β\n⊢ Fintype (α ↪ β)\n[PROOFSTEP]\nexact Fintype.ofEquiv _ (Equiv.subtypeInjectiveEquivEmbedding α β)\n[GOAL]\nα✝ : Type u_1\nα : Type u_2\nβ : α → Type u_3\ninst✝² : DecidableEq α\ninst✝¹ : Fintype α\ninst✝ : (a : α) → Fintype (β a)\n⊢ (pi univ fun a => univ) = univ\n[PROOFSTEP]\next\n[GOAL]\ncase a\nα✝ : Type u_1\nα : Type u_2\nβ : α → Type u_3\ninst✝² : DecidableEq α\ninst✝¹ : Fintype α\ninst✝ : (a : α) → Fintype (β a)\na✝ : (a : α) → a ∈ univ → β a\n⊢ (a✝ ∈ pi univ fun a => univ) ↔ a✝ ∈ univ\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.Data.Fintype.Pi", "llama_tokens": 2694, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO", "lm_q1_score": 0.48047867804790706, "lm_q2_score": 0.04146227034253319, "lm_q1q2_score": 0.019921736843045292}} {"text": "[GOAL]\nC : Type (u + 1)\ninst✝⁵ : Category.{u_1, u + 1} C\ninst✝⁴ : ConcreteCategory C\nD : Type (u + 1)\ninst✝³ : Category.{u_2, u + 1} D\ninst✝² : ConcreteCategory D\ninst✝¹ : HasForget₂ C D\ninst✝ : ReflectsIsomorphisms (forget C)\nX Y : C\nf : X ⟶ Y\ni : IsIso ((forget₂ C D).map f)\n⊢ IsIso f\n[PROOFSTEP]\nskip\n[GOAL]\nC : Type (u + 1)\ninst✝⁵ : Category.{u_1, u + 1} C\ninst✝⁴ : ConcreteCategory C\nD : Type (u + 1)\ninst✝³ : Category.{u_2, u + 1} D\ninst✝² : ConcreteCategory D\ninst✝¹ : HasForget₂ C D\ninst✝ : ReflectsIsomorphisms (forget C)\nX Y : C\nf : X ⟶ Y\ni : IsIso ((forget₂ C D).map f)\n⊢ IsIso f\n[PROOFSTEP]\nhaveI i' : IsIso ((forget D).map ((forget₂ C D).map f)) := Functor.map_isIso (forget D) _\n[GOAL]\nC : Type (u + 1)\ninst✝⁵ : Category.{u_1, u + 1} C\ninst✝⁴ : ConcreteCategory C\nD : Type (u + 1)\ninst✝³ : Category.{u_2, u + 1} D\ninst✝² : ConcreteCategory D\ninst✝¹ : HasForget₂ C D\ninst✝ : ReflectsIsomorphisms (forget C)\nX Y : C\nf : X ⟶ Y\ni : IsIso ((forget₂ C D).map f)\ni' : IsIso ((forget D).map ((forget₂ C D).map f))\n⊢ IsIso f\n[PROOFSTEP]\nhaveI : IsIso ((forget C).map f) := by\n have := @HasForget₂.forget_comp C D\n rw [← this]\n exact i'\n[GOAL]\nC : Type (u + 1)\ninst✝⁵ : Category.{u_1, u + 1} C\ninst✝⁴ : ConcreteCategory C\nD : Type (u + 1)\ninst✝³ : Category.{u_2, u + 1} D\ninst✝² : ConcreteCategory D\ninst✝¹ : HasForget₂ C D\ninst✝ : ReflectsIsomorphisms (forget C)\nX Y : C\nf : X ⟶ Y\ni : IsIso ((forget₂ C D).map f)\ni' : IsIso ((forget D).map ((forget₂ C D).map f))\n⊢ IsIso ((forget C).map f)\n[PROOFSTEP]\nhave := @HasForget₂.forget_comp C D\n[GOAL]\nC : Type (u + 1)\ninst✝⁵ : Category.{u_1, u + 1} C\ninst✝⁴ : ConcreteCategory C\nD : Type (u + 1)\ninst✝³ : Category.{u_2, u + 1} D\ninst✝² : ConcreteCategory D\ninst✝¹ : HasForget₂ C D\ninst✝ : ReflectsIsomorphisms (forget C)\nX Y : C\nf : X ⟶ Y\ni : IsIso ((forget₂ C D).map f)\ni' : IsIso ((forget D).map ((forget₂ C D).map f))\nthis :\n ∀ [inst : Category.{?u.1872, u + 1} C] [inst_1 : ConcreteCategory C] [inst_2 : Category.{?u.1871, u + 1} D]\n [inst_3 : ConcreteCategory D] [self : HasForget₂ C D], HasForget₂.forget₂ ⋙ forget D = forget C\n⊢ IsIso ((forget C).map f)\n[PROOFSTEP]\nrw [← this]\n[GOAL]\nC : Type (u + 1)\ninst✝⁵ : Category.{u_1, u + 1} C\ninst✝⁴ : ConcreteCategory C\nD : Type (u + 1)\ninst✝³ : Category.{u_2, u + 1} D\ninst✝² : ConcreteCategory D\ninst✝¹ : HasForget₂ C D\ninst✝ : ReflectsIsomorphisms (forget C)\nX Y : C\nf : X ⟶ Y\ni : IsIso ((forget₂ C D).map f)\ni' : IsIso ((forget D).map ((forget₂ C D).map f))\nthis :\n ∀ [inst : Category.{u_1, u + 1} C] [inst_1 : ConcreteCategory C] [inst_2 : Category.{u_2, u + 1} D]\n [inst_3 : ConcreteCategory D] [self : HasForget₂ C D], HasForget₂.forget₂ ⋙ forget D = forget C\n⊢ IsIso ((HasForget₂.forget₂ ⋙ forget D).map f)\n[PROOFSTEP]\nexact i'\n[GOAL]\nC : Type (u + 1)\ninst✝⁵ : Category.{u_1, u + 1} C\ninst✝⁴ : ConcreteCategory C\nD : Type (u + 1)\ninst✝³ : Category.{u_2, u + 1} D\ninst✝² : ConcreteCategory D\ninst✝¹ : HasForget₂ C D\ninst✝ : ReflectsIsomorphisms (forget C)\nX Y : C\nf : X ⟶ Y\ni : IsIso ((forget₂ C D).map f)\ni' : IsIso ((forget D).map ((forget₂ C D).map f))\nthis : IsIso ((forget C).map f)\n⊢ IsIso f\n[PROOFSTEP]\napply isIso_of_reflects_iso f (forget C)\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.ConcreteCategory.ReflectsIso", "llama_tokens": 1589, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO", "lm_q1_score": 0.48438008427698437, "lm_q2_score": 0.03358950698030741, "lm_q1q2_score": 0.016270088221943656}} {"text": "[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.4128, u_1} C\nX Y : PresheafedSpace C\nα β : Hom X Y\nw : α.base = β.base\n⊢ (Opens.map α.base).op = (Opens.map β.base).op\n[PROOFSTEP]\nrw [w]\n[GOAL]\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX Y : PresheafedSpace C\nα β : Hom X Y\nw : α.base = β.base\nh : α.c ≫ whiskerRight (eqToHom (_ : (Opens.map α.base).op = (Opens.map β.base).op)) X.presheaf = β.c\n⊢ α = β\n[PROOFSTEP]\nrcases α with ⟨base, c⟩\n[GOAL]\ncase mk\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX Y : PresheafedSpace C\nβ : Hom X Y\nbase : ↑X ⟶ ↑Y\nc : Y.presheaf ⟶ base _* X.presheaf\nw : { base := base, c := c }.base = β.base\nh :\n { base := base, c := c }.c ≫\n whiskerRight (eqToHom (_ : (Opens.map { base := base, c := c }.base).op = (Opens.map β.base).op)) X.presheaf =\n β.c\n⊢ { base := base, c := c } = β\n[PROOFSTEP]\nrcases β with ⟨base', c'⟩\n[GOAL]\ncase mk.mk\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX Y : PresheafedSpace C\nbase : ↑X ⟶ ↑Y\nc : Y.presheaf ⟶ base _* X.presheaf\nbase' : ↑X ⟶ ↑Y\nc' : Y.presheaf ⟶ base' _* X.presheaf\nw : { base := base, c := c }.base = { base := base', c := c' }.base\nh :\n { base := base, c := c }.c ≫\n whiskerRight\n (eqToHom (_ : (Opens.map { base := base, c := c }.base).op = (Opens.map { base := base', c := c' }.base).op))\n X.presheaf =\n { base := base', c := c' }.c\n⊢ { base := base, c := c } = { base := base', c := c' }\n[PROOFSTEP]\ndsimp at w \n[GOAL]\ncase mk.mk\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX Y : PresheafedSpace C\nbase : ↑X ⟶ ↑Y\nc : Y.presheaf ⟶ base _* X.presheaf\nbase' : ↑X ⟶ ↑Y\nc' : Y.presheaf ⟶ base' _* X.presheaf\nw : base = base'\nh :\n { base := base, c := c }.c ≫\n whiskerRight\n (eqToHom (_ : (Opens.map { base := base, c := c }.base).op = (Opens.map { base := base', c := c' }.base).op))\n X.presheaf =\n { base := base', c := c' }.c\n⊢ { base := base, c := c } = { base := base', c := c' }\n[PROOFSTEP]\nsubst w\n[GOAL]\ncase mk.mk\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX Y : PresheafedSpace C\nbase : ↑X ⟶ ↑Y\nc c' : Y.presheaf ⟶ base _* X.presheaf\nh :\n { base := base, c := c }.c ≫\n whiskerRight\n (eqToHom (_ : (Opens.map { base := base, c := c }.base).op = (Opens.map { base := base, c := c' }.base).op))\n X.presheaf =\n { base := base, c := c' }.c\n⊢ { base := base, c := c } = { base := base, c := c' }\n[PROOFSTEP]\ndsimp at h \n[GOAL]\ncase mk.mk\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX Y : PresheafedSpace C\nbase : ↑X ⟶ ↑Y\nc c' : Y.presheaf ⟶ base _* X.presheaf\nh : c ≫ whiskerRight (𝟙 (Opens.map base).op) X.presheaf = c'\n⊢ { base := base, c := c } = { base := base, c := c' }\n[PROOFSTEP]\nerw [whiskerRight_id', comp_id] at h \n[GOAL]\ncase mk.mk\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX Y : PresheafedSpace C\nbase : ↑X ⟶ ↑Y\nc c' : Y.presheaf ⟶ base _* X.presheaf\nh : c = c'\n⊢ { base := base, c := c } = { base := base, c := c' }\n[PROOFSTEP]\nsubst h\n[GOAL]\ncase mk.mk\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX Y : PresheafedSpace C\nbase : ↑X ⟶ ↑Y\nc : Y.presheaf ⟶ base _* X.presheaf\n⊢ { base := base, c := c } = { base := base, c := c }\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX Y : PresheafedSpace C\nα β : Hom X Y\nw : α.base = β.base\nh : HEq α.c β.c\n⊢ α = β\n[PROOFSTEP]\ncases α\n[GOAL]\ncase mk\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX Y : PresheafedSpace C\nβ : Hom X Y\nbase✝ : ↑X ⟶ ↑Y\nc✝ : Y.presheaf ⟶ base✝ _* X.presheaf\nw : { base := base✝, c := c✝ }.base = β.base\nh : HEq { base := base✝, c := c✝ }.c β.c\n⊢ { base := base✝, c := c✝ } = β\n[PROOFSTEP]\ncases β\n[GOAL]\ncase mk.mk\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX Y : PresheafedSpace C\nbase✝¹ : ↑X ⟶ ↑Y\nc✝¹ : Y.presheaf ⟶ base✝¹ _* X.presheaf\nbase✝ : ↑X ⟶ ↑Y\nc✝ : Y.presheaf ⟶ base✝ _* X.presheaf\nw : { base := base✝¹, c := c✝¹ }.base = { base := base✝, c := c✝ }.base\nh : HEq { base := base✝¹, c := c✝¹ }.c { base := base✝, c := c✝ }.c\n⊢ { base := base✝¹, c := c✝¹ } = { base := base✝, c := c✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.68893, u_1} C\nX✝ Y✝ : PresheafedSpace C\nx✝ : X✝ ⟶ Y✝\n⊢ 𝟙 X✝ ≫ x✝ = x✝\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.68893, u_1} C\nX✝ Y✝ : PresheafedSpace C\nx✝ : X✝ ⟶ Y✝\n⊢ { base := 𝟙 ↑X✝ ≫ x✝.base, c := x✝.c ≫ (Presheaf.pushforward C x✝.base).map (𝟙 X✝.presheaf) } = x✝\n[PROOFSTEP]\next\n[GOAL]\ncase w.w\nC : Type u_1\ninst✝ : Category.{?u.68893, u_1} C\nX✝ Y✝ : PresheafedSpace C\nx✝¹ : X✝ ⟶ Y✝\nx✝ : (forget TopCat).obj ↑X✝\n⊢ ↑{ base := 𝟙 ↑X✝ ≫ x✝¹.base, c := x✝¹.c ≫ (Presheaf.pushforward C x✝¹.base).map (𝟙 X✝.presheaf) }.base x✝ =\n ↑x✝¹.base x✝\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase w.w\nC : Type u_1\ninst✝ : Category.{?u.68893, u_1} C\nX✝ Y✝ : PresheafedSpace C\nx✝¹ : X✝ ⟶ Y✝\nx✝ : (forget TopCat).obj ↑X✝\n⊢ ↑(𝟙 ↑X✝ ≫ x✝¹.base) x✝ = ↑x✝¹.base x✝\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.w\nC : Type u_1\ninst✝ : Category.{?u.68893, u_1} C\nX✝ Y✝ : PresheafedSpace C\nx✝ : X✝ ⟶ Y✝\nU✝ : Opens ↑↑Y✝\n⊢ NatTrans.app\n ({ base := 𝟙 ↑X✝ ≫ x✝.base, c := x✝.c ≫ (Presheaf.pushforward C x✝.base).map (𝟙 X✝.presheaf) }.c ≫\n whiskerRight\n (eqToHom\n (_ :\n (Opens.map\n { base := 𝟙 ↑X✝ ≫ x✝.base,\n c := x✝.c ≫ (Presheaf.pushforward C x✝.base).map (𝟙 X✝.presheaf) }.base).op =\n (Opens.map x✝.base).op))\n X✝.presheaf)\n (op U✝) =\n NatTrans.app x✝.c (op U✝)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h.w\nC : Type u_1\ninst✝ : Category.{?u.68893, u_1} C\nX✝ Y✝ : PresheafedSpace C\nx✝ : X✝ ⟶ Y✝\nU✝ : Opens ↑↑Y✝\n⊢ NatTrans.app\n ((x✝.c ≫ (Presheaf.pushforward C x✝.base).map (𝟙 X✝.presheaf)) ≫\n whiskerRight (𝟙 (Opens.map (𝟙 ↑X✝ ≫ x✝.base)).op) X✝.presheaf)\n (op U✝) =\n NatTrans.app x✝.c (op U✝)\n[PROOFSTEP]\nsimp only [map_id, whiskerRight_id', assoc]\n[GOAL]\ncase h.w\nC : Type u_1\ninst✝ : Category.{?u.68893, u_1} C\nX✝ Y✝ : PresheafedSpace C\nx✝ : X✝ ⟶ Y✝\nU✝ : Opens ↑↑Y✝\n⊢ NatTrans.app\n (x✝.c ≫ 𝟙 ((Presheaf.pushforward C x✝.base).obj X✝.presheaf) ≫ 𝟙 ((Opens.map (𝟙 ↑X✝ ≫ x✝.base)).op ⋙ X✝.presheaf))\n (op U✝) =\n NatTrans.app x✝.c (op U✝)\n[PROOFSTEP]\nerw [comp_id, comp_id]\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.77226, u_1} C\nX Y : PresheafedSpace C\nα β : X ⟶ Y\nw : α.base = β.base\n⊢ (Opens.map α.base).op = (Opens.map β.base).op\n[PROOFSTEP]\nrw [w]\n[GOAL]\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX : PresheafedSpace C\nU : (Opens ↑↑X)ᵒᵖ\n⊢ NatTrans.app (𝟙 X).c U = X.presheaf.map (𝟙 U)\n[PROOFSTEP]\nrw [id_c, map_id]\n[GOAL]\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX : PresheafedSpace C\nU : (Opens ↑↑X)ᵒᵖ\n⊢ NatTrans.app (𝟙 X.presheaf) U = 𝟙 (X.presheaf.obj U)\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.143246, u_1} C\nX Y : PresheafedSpace C\nα β : X ⟶ Y\nh : α = β\nU : (Opens ↑↑Y)ᵒᵖ\n⊢ (Opens.map β.base).op.obj U = (Opens.map α.base).op.obj U\n[PROOFSTEP]\nsubst h\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.143246, u_1} C\nX Y : PresheafedSpace C\nα : X ⟶ Y\nU : (Opens ↑↑Y)ᵒᵖ\n⊢ (Opens.map α.base).op.obj U = (Opens.map α.base).op.obj U\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX Y : PresheafedSpace C\nα β : X ⟶ Y\nh : α = β\nU : (Opens ↑↑Y)ᵒᵖ\n⊢ NatTrans.app α.c U =\n NatTrans.app β.c U ≫ X.presheaf.map (eqToHom (_ : (Opens.map β.base).op.obj U = (Opens.map α.base).op.obj U))\n[PROOFSTEP]\nsubst h\n[GOAL]\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX Y : PresheafedSpace C\nα : X ⟶ Y\nU : (Opens ↑↑Y)ᵒᵖ\n⊢ NatTrans.app α.c U =\n NatTrans.app α.c U ≫ X.presheaf.map (eqToHom (_ : (Opens.map α.base).op.obj U = (Opens.map α.base).op.obj U))\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.204326, u_1} C\nX Y : PresheafedSpace C\nH : ↑X ≅ ↑Y\nα : H.hom _* X.presheaf ≅ Y.presheaf\n⊢ { base := H.hom, c := α.inv } ≫ { base := H.inv, c := Presheaf.toPushforwardOfIso H α.hom } = 𝟙 X\n[PROOFSTEP]\next\n[GOAL]\ncase w.w\nC : Type u_1\ninst✝ : Category.{?u.204326, u_1} C\nX Y : PresheafedSpace C\nH : ↑X ≅ ↑Y\nα : H.hom _* X.presheaf ≅ Y.presheaf\nx✝ : (CategoryTheory.forget TopCat).obj ↑X\n⊢ ↑({ base := H.hom, c := α.inv } ≫ { base := H.inv, c := Presheaf.toPushforwardOfIso H α.hom }).base x✝ =\n ↑(𝟙 X).base x✝\ncase h.w\nC : Type u_1\ninst✝ : Category.{?u.204326, u_1} C\nX Y : PresheafedSpace C\nH : ↑X ≅ ↑Y\nα : H.hom _* X.presheaf ≅ Y.presheaf\nU✝ : Opens ↑↑X\n⊢ NatTrans.app\n (({ base := H.hom, c := α.inv } ≫ { base := H.inv, c := Presheaf.toPushforwardOfIso H α.hom }).c ≫\n whiskerRight\n (eqToHom\n (_ :\n (Opens.map\n ({ base := H.hom, c := α.inv } ≫\n { base := H.inv, c := Presheaf.toPushforwardOfIso H α.hom }).base).op =\n (Opens.map (𝟙 X).base).op))\n X.presheaf)\n (op U✝) =\n NatTrans.app (𝟙 X).c (op U✝)\n[PROOFSTEP]\nsimp only [comp_base, Iso.hom_inv_id, FunctorToTypes.map_id_apply, id_base]\n[GOAL]\ncase h.w\nC : Type u_1\ninst✝ : Category.{?u.204326, u_1} C\nX Y : PresheafedSpace C\nH : ↑X ≅ ↑Y\nα : H.hom _* X.presheaf ≅ Y.presheaf\nU✝ : Opens ↑↑X\n⊢ NatTrans.app\n (({ base := H.hom, c := α.inv } ≫ { base := H.inv, c := Presheaf.toPushforwardOfIso H α.hom }).c ≫\n whiskerRight\n (eqToHom\n (_ :\n (Opens.map\n ({ base := H.hom, c := α.inv } ≫\n { base := H.inv, c := Presheaf.toPushforwardOfIso H α.hom }).base).op =\n (Opens.map (𝟙 X).base).op))\n X.presheaf)\n (op U✝) =\n NatTrans.app (𝟙 X).c (op U✝)\n[PROOFSTEP]\nrw [NatTrans.comp_app]\n[GOAL]\ncase h.w\nC : Type u_1\ninst✝ : Category.{?u.204326, u_1} C\nX Y : PresheafedSpace C\nH : ↑X ≅ ↑Y\nα : H.hom _* X.presheaf ≅ Y.presheaf\nU✝ : Opens ↑↑X\n⊢ NatTrans.app ({ base := H.hom, c := α.inv } ≫ { base := H.inv, c := Presheaf.toPushforwardOfIso H α.hom }).c (op U✝) ≫\n NatTrans.app\n (whiskerRight\n (eqToHom\n (_ :\n (Opens.map\n ({ base := H.hom, c := α.inv } ≫\n { base := H.inv, c := Presheaf.toPushforwardOfIso H α.hom }).base).op =\n (Opens.map (𝟙 X).base).op))\n X.presheaf)\n (op U✝) =\n NatTrans.app (𝟙 X).c (op U✝)\n[PROOFSTEP]\nsimp only [id_base, comp_obj, op_obj, comp_base, Presheaf.pushforwardObj_obj, Opens.map_comp_obj, comp_c_app, unop_op,\n Presheaf.toPushforwardOfIso_app, assoc, Iso.hom_inv_id_app, comp_id, whiskerRight_app, eqToHom_app, id_c_app, map_id,\n ← Functor.map_comp, eqToHom_trans, eqToHom_refl]\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.204326, u_1} C\nX Y : PresheafedSpace C\nH : ↑X ≅ ↑Y\nα : H.hom _* X.presheaf ≅ Y.presheaf\n⊢ { base := H.inv, c := Presheaf.toPushforwardOfIso H α.hom } ≫ { base := H.hom, c := α.inv } = 𝟙 Y\n[PROOFSTEP]\next\n[GOAL]\ncase w.w\nC : Type u_1\ninst✝ : Category.{?u.204326, u_1} C\nX Y : PresheafedSpace C\nH : ↑X ≅ ↑Y\nα : H.hom _* X.presheaf ≅ Y.presheaf\nx✝ : (CategoryTheory.forget TopCat).obj ↑Y\n⊢ ↑({ base := H.inv, c := Presheaf.toPushforwardOfIso H α.hom } ≫ { base := H.hom, c := α.inv }).base x✝ =\n ↑(𝟙 Y).base x✝\ncase h.w\nC : Type u_1\ninst✝ : Category.{?u.204326, u_1} C\nX Y : PresheafedSpace C\nH : ↑X ≅ ↑Y\nα : H.hom _* X.presheaf ≅ Y.presheaf\nU✝ : Opens ↑↑Y\n⊢ NatTrans.app\n (({ base := H.inv, c := Presheaf.toPushforwardOfIso H α.hom } ≫ { base := H.hom, c := α.inv }).c ≫\n whiskerRight\n (eqToHom\n (_ :\n (Opens.map\n ({ base := H.inv, c := Presheaf.toPushforwardOfIso H α.hom } ≫\n { base := H.hom, c := α.inv }).base).op =\n (Opens.map (𝟙 Y).base).op))\n Y.presheaf)\n (op U✝) =\n NatTrans.app (𝟙 Y).c (op U✝)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase w.w\nC : Type u_1\ninst✝ : Category.{?u.204326, u_1} C\nX Y : PresheafedSpace C\nH : ↑X ≅ ↑Y\nα : H.hom _* X.presheaf ≅ Y.presheaf\nx✝ : (CategoryTheory.forget TopCat).obj ↑Y\n⊢ ↑(H.inv ≫ H.hom) x✝ = ↑(𝟙 ↑Y) x✝\ncase h.w\nC : Type u_1\ninst✝ : Category.{?u.204326, u_1} C\nX Y : PresheafedSpace C\nH : ↑X ≅ ↑Y\nα : H.hom _* X.presheaf ≅ Y.presheaf\nU✝ : Opens ↑↑Y\n⊢ NatTrans.app\n (({ base := H.inv, c := Presheaf.toPushforwardOfIso H α.hom } ≫ { base := H.hom, c := α.inv }).c ≫\n whiskerRight\n (eqToHom\n (_ :\n (Opens.map\n ({ base := H.inv, c := Presheaf.toPushforwardOfIso H α.hom } ≫\n { base := H.hom, c := α.inv }).base).op =\n (Opens.map (𝟙 Y).base).op))\n Y.presheaf)\n (op U✝) =\n NatTrans.app (𝟙 Y).c (op U✝)\n[PROOFSTEP]\nrw [H.inv_hom_id]\n[GOAL]\ncase h.w\nC : Type u_1\ninst✝ : Category.{?u.204326, u_1} C\nX Y : PresheafedSpace C\nH : ↑X ≅ ↑Y\nα : H.hom _* X.presheaf ≅ Y.presheaf\nU✝ : Opens ↑↑Y\n⊢ NatTrans.app\n (({ base := H.inv, c := Presheaf.toPushforwardOfIso H α.hom } ≫ { base := H.hom, c := α.inv }).c ≫\n whiskerRight\n (eqToHom\n (_ :\n (Opens.map\n ({ base := H.inv, c := Presheaf.toPushforwardOfIso H α.hom } ≫\n { base := H.hom, c := α.inv }).base).op =\n (Opens.map (𝟙 Y).base).op))\n Y.presheaf)\n (op U✝) =\n NatTrans.app (𝟙 Y).c (op U✝)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h.w\nC : Type u_1\ninst✝ : Category.{?u.204326, u_1} C\nX Y : PresheafedSpace C\nH : ↑X ≅ ↑Y\nα : H.hom _* X.presheaf ≅ Y.presheaf\nU✝ : Opens ↑↑Y\n⊢ NatTrans.app\n (({ base := H.inv, c := Presheaf.toPushforwardOfIso H α.hom } ≫ { base := H.hom, c := α.inv }).c ≫\n whiskerRight (eqToHom (_ : (Opens.map (H.inv ≫ H.hom)).op = (Opens.map (𝟙 ↑Y)).op)) Y.presheaf)\n (op U✝) =\n NatTrans.app (𝟙 Y).c (op U✝)\n[PROOFSTEP]\nrw [NatTrans.comp_app]\n[GOAL]\ncase h.w\nC : Type u_1\ninst✝ : Category.{?u.204326, u_1} C\nX Y : PresheafedSpace C\nH : ↑X ≅ ↑Y\nα : H.hom _* X.presheaf ≅ Y.presheaf\nU✝ : Opens ↑↑Y\n⊢ NatTrans.app ({ base := H.inv, c := Presheaf.toPushforwardOfIso H α.hom } ≫ { base := H.hom, c := α.inv }).c (op U✝) ≫\n NatTrans.app (whiskerRight (eqToHom (_ : (Opens.map (H.inv ≫ H.hom)).op = (Opens.map (𝟙 ↑Y)).op)) Y.presheaf)\n (op U✝) =\n NatTrans.app (𝟙 Y).c (op U✝)\n[PROOFSTEP]\nsimp only [Presheaf.pushforwardObj_obj, op_obj, Opens.map_comp_obj, comp_obj, comp_c_app, unop_op,\n Presheaf.toPushforwardOfIso_app, whiskerRight_app, eqToHom_app, assoc, id_c_app, map_id]\n[GOAL]\ncase h.w\nC : Type u_1\ninst✝ : Category.{?u.204326, u_1} C\nX Y : PresheafedSpace C\nH : ↑X ≅ ↑Y\nα : H.hom _* X.presheaf ≅ Y.presheaf\nU✝ : Opens ↑↑Y\n⊢ NatTrans.app α.inv (op U✝) ≫\n X.presheaf.map\n (eqToHom\n (_ :\n op ((Opens.map H.hom).obj U✝) =\n op\n {\n carrier :=\n ↑H.hom ⁻¹'\n ↑(op\n { carrier := ↑H.inv ⁻¹' ↑(op ((Opens.map H.hom).obj U✝)).unop,\n is_open' := (_ : IsOpen (↑H.inv ⁻¹' ↑(op ((Opens.map H.hom).obj U✝)).unop)) }).unop,\n is_open' :=\n (_ :\n IsOpen\n (↑H.hom ⁻¹'\n ↑(op\n { carrier := ↑H.inv ⁻¹' ↑(op ((Opens.map H.hom).obj U✝)).unop,\n is_open' :=\n (_ : IsOpen (↑H.inv ⁻¹' ↑(op ((Opens.map H.hom).obj U✝)).unop)) }).unop)) })) ≫\n NatTrans.app α.hom (op ((Opens.map H.inv).obj ((Opens.map H.hom).obj U✝))) ≫\n Y.presheaf.map\n (eqToHom (_ : (Opens.map (H.inv ≫ H.hom)).op.obj (op U✝) = (Opens.map (𝟙 ↑Y)).op.obj (op U✝))) =\n 𝟙 (Y.presheaf.obj (op U✝))\n[PROOFSTEP]\nrw [← α.hom.naturality, Presheaf.pushforwardObj_map, eqToHom_map, eqToHom_map, eqToHom_map, eqToHom_trans_assoc,\n eqToHom_refl, id_comp]\n[GOAL]\ncase h.w\nC : Type u_1\ninst✝ : Category.{?u.204326, u_1} C\nX Y : PresheafedSpace C\nH : ↑X ≅ ↑Y\nα : H.hom _* X.presheaf ≅ Y.presheaf\nU✝ : Opens ↑↑Y\n⊢ NatTrans.app α.inv (op U✝) ≫ NatTrans.app α.hom (op ((Opens.map (𝟙 ↑Y)).obj U✝)) = 𝟙 (Y.presheaf.obj (op U✝))\n[PROOFSTEP]\napply Iso.inv_hom_id_app\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.217173, u_1} C\nX Y : PresheafedSpace C\nH : X ≅ Y\n⊢ H.hom.c ≫ Presheaf.pushforwardToOfIso ((forget C).mapIso H).symm H.inv.c = 𝟙 Y.presheaf\n[PROOFSTEP]\next U\n[GOAL]\ncase w\nC : Type u_1\ninst✝ : Category.{?u.217173, u_1} C\nX Y : PresheafedSpace C\nH : X ≅ Y\nU : Opens ↑↑Y\n⊢ NatTrans.app (H.hom.c ≫ Presheaf.pushforwardToOfIso ((forget C).mapIso H).symm H.inv.c) (op U) =\n NatTrans.app (𝟙 Y.presheaf) (op U)\n[PROOFSTEP]\nrw [NatTrans.comp_app]\n[GOAL]\ncase w\nC : Type u_1\ninst✝ : Category.{?u.217173, u_1} C\nX Y : PresheafedSpace C\nH : X ≅ Y\nU : Opens ↑↑Y\n⊢ NatTrans.app H.hom.c (op U) ≫ NatTrans.app (Presheaf.pushforwardToOfIso ((forget C).mapIso H).symm H.inv.c) (op U) =\n NatTrans.app (𝟙 Y.presheaf) (op U)\n[PROOFSTEP]\nsimpa using congr_arg (fun f => f ≫ eqToHom _) (congr_app H.inv_hom_id (op U))\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.217173, u_1} C\nX Y : PresheafedSpace C\nH : X ≅ Y\n⊢ Presheaf.pushforwardToOfIso ((forget C).mapIso H).symm H.inv.c ≫ H.hom.c = 𝟙 (H.hom.base _* X.presheaf)\n[PROOFSTEP]\next U\n[GOAL]\ncase w\nC : Type u_1\ninst✝ : Category.{?u.217173, u_1} C\nX Y : PresheafedSpace C\nH : X ≅ Y\nU : Opens ↑↑Y\n⊢ NatTrans.app (Presheaf.pushforwardToOfIso ((forget C).mapIso H).symm H.inv.c ≫ H.hom.c) (op U) =\n NatTrans.app (𝟙 (H.hom.base _* X.presheaf)) (op U)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase w\nC : Type u_1\ninst✝ : Category.{?u.217173, u_1} C\nX Y : PresheafedSpace C\nH : X ≅ Y\nU : Opens ↑↑Y\n⊢ NatTrans.app (Presheaf.pushforwardToOfIso ((forget C).mapIso H).symm H.inv.c ≫ H.hom.c) (op U) =\n NatTrans.app (𝟙 (H.hom.base _* X.presheaf)) (op U)\n[PROOFSTEP]\nrw [NatTrans.comp_app, NatTrans.id_app]\n[GOAL]\ncase w\nC : Type u_1\ninst✝ : Category.{?u.217173, u_1} C\nX Y : PresheafedSpace C\nH : X ≅ Y\nU : Opens ↑↑Y\n⊢ NatTrans.app (Presheaf.pushforwardToOfIso ((forget C).mapIso H).symm H.inv.c) (op U) ≫ NatTrans.app H.hom.c (op U) =\n 𝟙 ((H.hom.base _* X.presheaf).obj (op U))\n[PROOFSTEP]\nsimp only [Presheaf.pushforwardObj_obj, op_obj, Presheaf.pushforwardToOfIso_app, Iso.symm_inv, mapIso_hom, forget_map,\n Iso.symm_hom, mapIso_inv, unop_op, eqToHom_map, assoc]\n[GOAL]\ncase w\nC : Type u_1\ninst✝ : Category.{?u.217173, u_1} C\nX Y : PresheafedSpace C\nH : X ≅ Y\nU : Opens ↑↑Y\n⊢ NatTrans.app H.inv.c (op ((Opens.map H.hom.base).obj U)) ≫\n eqToHom\n (_ :\n Y.presheaf.obj (op ((Opens.map H.inv.base).obj ((Opens.map H.hom.base).obj U))) = Y.presheaf.obj (op U)) ≫\n NatTrans.app H.hom.c (op U) =\n 𝟙 (X.presheaf.obj (op ((Opens.map H.hom.base).obj U)))\n[PROOFSTEP]\nhave eq₁ := congr_app H.hom_inv_id (op ((Opens.map H.hom.base).obj U))\n[GOAL]\ncase w\nC : Type u_1\ninst✝ : Category.{?u.217173, u_1} C\nX Y : PresheafedSpace C\nH : X ≅ Y\nU : Opens ↑↑Y\neq₁ :\n NatTrans.app (H.hom ≫ H.inv).c (op ((Opens.map H.hom.base).obj U)) =\n NatTrans.app (𝟙 X).c (op ((Opens.map H.hom.base).obj U)) ≫\n X.presheaf.map\n (eqToHom\n (_ :\n (Opens.map (𝟙 X).base).op.obj (op ((Opens.map H.hom.base).obj U)) =\n (Opens.map (H.hom ≫ H.inv).base).op.obj (op ((Opens.map H.hom.base).obj U))))\n⊢ NatTrans.app H.inv.c (op ((Opens.map H.hom.base).obj U)) ≫\n eqToHom\n (_ :\n Y.presheaf.obj (op ((Opens.map H.inv.base).obj ((Opens.map H.hom.base).obj U))) = Y.presheaf.obj (op U)) ≫\n NatTrans.app H.hom.c (op U) =\n 𝟙 (X.presheaf.obj (op ((Opens.map H.hom.base).obj U)))\n[PROOFSTEP]\nhave eq₂ := H.hom.c.naturality (eqToHom (congr_obj (congr_arg Opens.map ((forget C).congr_map H.inv_hom_id.symm)) U)).op\n[GOAL]\ncase w\nC : Type u_1\ninst✝ : Category.{?u.217173, u_1} C\nX Y : PresheafedSpace C\nH : X ≅ Y\nU : Opens ↑↑Y\neq₁ :\n NatTrans.app (H.hom ≫ H.inv).c (op ((Opens.map H.hom.base).obj U)) =\n NatTrans.app (𝟙 X).c (op ((Opens.map H.hom.base).obj U)) ≫\n X.presheaf.map\n (eqToHom\n (_ :\n (Opens.map (𝟙 X).base).op.obj (op ((Opens.map H.hom.base).obj U)) =\n (Opens.map (H.hom ≫ H.inv).base).op.obj (op ((Opens.map H.hom.base).obj U))))\neq₂ :\n Y.presheaf.map\n (eqToHom\n (_ : (Opens.map ((forget C).map (𝟙 Y))).obj U = (Opens.map ((forget C).map (H.inv ≫ H.hom))).obj U)).op ≫\n NatTrans.app H.hom.c (op ((Opens.map ((forget C).map (𝟙 Y))).obj U)) =\n NatTrans.app H.hom.c (op ((Opens.map ((forget C).map (H.inv ≫ H.hom))).obj U)) ≫\n (H.hom.base _* X.presheaf).map\n (eqToHom (_ : (Opens.map ((forget C).map (𝟙 Y))).obj U = (Opens.map ((forget C).map (H.inv ≫ H.hom))).obj U)).op\n⊢ NatTrans.app H.inv.c (op ((Opens.map H.hom.base).obj U)) ≫\n eqToHom\n (_ :\n Y.presheaf.obj (op ((Opens.map H.inv.base).obj ((Opens.map H.hom.base).obj U))) = Y.presheaf.obj (op U)) ≫\n NatTrans.app H.hom.c (op U) =\n 𝟙 (X.presheaf.obj (op ((Opens.map H.hom.base).obj U)))\n[PROOFSTEP]\nrw [id_c, NatTrans.id_app, id_comp, eqToHom_map, comp_c_app] at eq₁ \n[GOAL]\ncase w\nC : Type u_1\ninst✝ : Category.{?u.217173, u_1} C\nX Y : PresheafedSpace C\nH : X ≅ Y\nU : Opens ↑↑Y\neq₁ :\n NatTrans.app H.inv.c (op ((Opens.map H.hom.base).obj U)) ≫\n NatTrans.app H.hom.c (op ((Opens.map H.inv.base).obj (op ((Opens.map H.hom.base).obj U)).unop)) =\n eqToHom\n (_ :\n X.presheaf.obj ((Opens.map (𝟙 X).base).op.obj (op ((Opens.map H.hom.base).obj U))) =\n X.presheaf.obj ((Opens.map (H.hom ≫ H.inv).base).op.obj (op ((Opens.map H.hom.base).obj U))))\neq₂ :\n Y.presheaf.map\n (eqToHom\n (_ : (Opens.map ((forget C).map (𝟙 Y))).obj U = (Opens.map ((forget C).map (H.inv ≫ H.hom))).obj U)).op ≫\n NatTrans.app H.hom.c (op ((Opens.map ((forget C).map (𝟙 Y))).obj U)) =\n NatTrans.app H.hom.c (op ((Opens.map ((forget C).map (H.inv ≫ H.hom))).obj U)) ≫\n (H.hom.base _* X.presheaf).map\n (eqToHom (_ : (Opens.map ((forget C).map (𝟙 Y))).obj U = (Opens.map ((forget C).map (H.inv ≫ H.hom))).obj U)).op\n⊢ NatTrans.app H.inv.c (op ((Opens.map H.hom.base).obj U)) ≫\n eqToHom\n (_ :\n Y.presheaf.obj (op ((Opens.map H.inv.base).obj ((Opens.map H.hom.base).obj U))) = Y.presheaf.obj (op U)) ≫\n NatTrans.app H.hom.c (op U) =\n 𝟙 (X.presheaf.obj (op ((Opens.map H.hom.base).obj U)))\n[PROOFSTEP]\nrw [eqToHom_op, eqToHom_map] at eq₂ \n[GOAL]\ncase w\nC : Type u_1\ninst✝ : Category.{?u.217173, u_1} C\nX Y : PresheafedSpace C\nH : X ≅ Y\nU : Opens ↑↑Y\neq₁ :\n NatTrans.app H.inv.c (op ((Opens.map H.hom.base).obj U)) ≫\n NatTrans.app H.hom.c (op ((Opens.map H.inv.base).obj (op ((Opens.map H.hom.base).obj U)).unop)) =\n eqToHom\n (_ :\n X.presheaf.obj ((Opens.map (𝟙 X).base).op.obj (op ((Opens.map H.hom.base).obj U))) =\n X.presheaf.obj ((Opens.map (H.hom ≫ H.inv).base).op.obj (op ((Opens.map H.hom.base).obj U))))\neq₂ :\n eqToHom\n (_ :\n Y.presheaf.obj (op ((Opens.map ((forget C).map (H.inv ≫ H.hom))).obj U)) =\n Y.presheaf.obj (op ((Opens.map ((forget C).map (𝟙 Y))).obj U))) ≫\n NatTrans.app H.hom.c (op ((Opens.map ((forget C).map (𝟙 Y))).obj U)) =\n NatTrans.app H.hom.c (op ((Opens.map ((forget C).map (H.inv ≫ H.hom))).obj U)) ≫\n (H.hom.base _* X.presheaf).map\n (eqToHom\n (_ : op ((Opens.map ((forget C).map (H.inv ≫ H.hom))).obj U) = op ((Opens.map ((forget C).map (𝟙 Y))).obj U)))\n⊢ NatTrans.app H.inv.c (op ((Opens.map H.hom.base).obj U)) ≫\n eqToHom\n (_ :\n Y.presheaf.obj (op ((Opens.map H.inv.base).obj ((Opens.map H.hom.base).obj U))) = Y.presheaf.obj (op U)) ≫\n NatTrans.app H.hom.c (op U) =\n 𝟙 (X.presheaf.obj (op ((Opens.map H.hom.base).obj U)))\n[PROOFSTEP]\nerw [eq₂, reassoc_of% eq₁]\n[GOAL]\ncase w\nC : Type u_1\ninst✝ : Category.{?u.217173, u_1} C\nX Y : PresheafedSpace C\nH : X ≅ Y\nU : Opens ↑↑Y\neq₁ :\n NatTrans.app H.inv.c (op ((Opens.map H.hom.base).obj U)) ≫\n NatTrans.app H.hom.c (op ((Opens.map H.inv.base).obj (op ((Opens.map H.hom.base).obj U)).unop)) =\n eqToHom\n (_ :\n X.presheaf.obj ((Opens.map (𝟙 X).base).op.obj (op ((Opens.map H.hom.base).obj U))) =\n X.presheaf.obj ((Opens.map (H.hom ≫ H.inv).base).op.obj (op ((Opens.map H.hom.base).obj U))))\neq₂ :\n eqToHom\n (_ :\n Y.presheaf.obj (op ((Opens.map ((forget C).map (H.inv ≫ H.hom))).obj U)) =\n Y.presheaf.obj (op ((Opens.map ((forget C).map (𝟙 Y))).obj U))) ≫\n NatTrans.app H.hom.c (op ((Opens.map ((forget C).map (𝟙 Y))).obj U)) =\n NatTrans.app H.hom.c (op ((Opens.map ((forget C).map (H.inv ≫ H.hom))).obj U)) ≫\n (H.hom.base _* X.presheaf).map\n (eqToHom\n (_ : op ((Opens.map ((forget C).map (H.inv ≫ H.hom))).obj U) = op ((Opens.map ((forget C).map (𝟙 Y))).obj U)))\n⊢ eqToHom\n (_ :\n X.presheaf.obj ((Opens.map (𝟙 X).base).op.obj (op ((Opens.map H.hom.base).obj U))) =\n X.presheaf.obj ((Opens.map (H.hom ≫ H.inv).base).op.obj (op ((Opens.map H.hom.base).obj U)))) ≫\n (H.hom.base _* X.presheaf).map\n (eqToHom\n (_ :\n op ((Opens.map ((forget C).map (H.inv ≫ H.hom))).obj U) = op ((Opens.map ((forget C).map (𝟙 Y))).obj U))) =\n 𝟙 (X.presheaf.obj (op ((Opens.map H.hom.base).obj U)))\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.242573, u_1} C\nU✝ : TopCat\nX : PresheafedSpace C\nf✝ : U✝ ⟶ ↑X\nh : OpenEmbedding ↑f✝\nU V : (Opens ↑↑X)ᵒᵖ\nf : U ⟶ V\n⊢ X.presheaf.map f ≫\n (fun V => X.presheaf.map (NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑f✝)).counit V.unop).op) V =\n (fun V => X.presheaf.map (NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑f✝)).counit V.unop).op) U ≫\n X.presheaf.map ((IsOpenMap.functor (_ : IsOpenMap ↑f✝)).op.map ((Opens.map f✝).op.map f))\n[PROOFSTEP]\nrw [← map_comp, ← map_comp]\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.242573, u_1} C\nU✝ : TopCat\nX : PresheafedSpace C\nf✝ : U✝ ⟶ ↑X\nh : OpenEmbedding ↑f✝\nU V : (Opens ↑↑X)ᵒᵖ\nf : U ⟶ V\n⊢ X.presheaf.map (f ≫ (NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑f✝)).counit V.unop).op) =\n X.presheaf.map\n ((NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑f✝)).counit U.unop).op ≫\n (IsOpenMap.functor (_ : IsOpenMap ↑f✝)).op.map ((Opens.map f✝).op.map f))\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.247153, u_1} C\nU : TopCat\nX : PresheafedSpace C\nf : U ⟶ ↑X\nhf : OpenEmbedding ↑f\n⊢ Mono (ofRestrict X hf)\n[PROOFSTEP]\nhaveI : Mono f := (TopCat.mono_iff_injective _).mpr hf.inj\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.247153, u_1} C\nU : TopCat\nX : PresheafedSpace C\nf : U ⟶ ↑X\nhf : OpenEmbedding ↑f\nthis : Mono f\n⊢ Mono (ofRestrict X hf)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase right_cancellation\nC : Type u_1\ninst✝ : Category.{?u.247153, u_1} C\nU : TopCat\nX : PresheafedSpace C\nf : U ⟶ ↑X\nhf : OpenEmbedding ↑f\nthis : Mono f\n⊢ ∀ {Z : PresheafedSpace C} (g h : Z ⟶ restrict X hf), g ≫ ofRestrict X hf = h ≫ ofRestrict X hf → g = h\n[PROOFSTEP]\nintro Z g₁ g₂ eq\n[GOAL]\ncase right_cancellation\nC : Type u_1\ninst✝ : Category.{?u.247153, u_1} C\nU : TopCat\nX : PresheafedSpace C\nf : U ⟶ ↑X\nhf : OpenEmbedding ↑f\nthis : Mono f\nZ : PresheafedSpace C\ng₁ g₂ : Z ⟶ restrict X hf\neq : g₁ ≫ ofRestrict X hf = g₂ ≫ ofRestrict X hf\n⊢ g₁ = g₂\n[PROOFSTEP]\next1\n[GOAL]\ncase right_cancellation.w\nC : Type u_1\ninst✝ : Category.{?u.247153, u_1} C\nU : TopCat\nX : PresheafedSpace C\nf : U ⟶ ↑X\nhf : OpenEmbedding ↑f\nthis : Mono f\nZ : PresheafedSpace C\ng₁ g₂ : Z ⟶ restrict X hf\neq : g₁ ≫ ofRestrict X hf = g₂ ≫ ofRestrict X hf\n⊢ g₁.base = g₂.base\n[PROOFSTEP]\nhave := congr_arg PresheafedSpace.Hom.base eq\n[GOAL]\ncase right_cancellation.w\nC : Type u_1\ninst✝ : Category.{?u.247153, u_1} C\nU : TopCat\nX : PresheafedSpace C\nf : U ⟶ ↑X\nhf : OpenEmbedding ↑f\nthis✝ : Mono f\nZ : PresheafedSpace C\ng₁ g₂ : Z ⟶ restrict X hf\neq : g₁ ≫ ofRestrict X hf = g₂ ≫ ofRestrict X hf\nthis : (g₁ ≫ ofRestrict X hf).base = (g₂ ≫ ofRestrict X hf).base\n⊢ g₁.base = g₂.base\n[PROOFSTEP]\nsimp only [PresheafedSpace.comp_base, PresheafedSpace.ofRestrict_base] at this \n[GOAL]\ncase right_cancellation.w\nC : Type u_1\ninst✝ : Category.{?u.247153, u_1} C\nU : TopCat\nX : PresheafedSpace C\nf : U ⟶ ↑X\nhf : OpenEmbedding ↑f\nthis✝ : Mono f\nZ : PresheafedSpace C\ng₁ g₂ : Z ⟶ restrict X hf\neq : g₁ ≫ ofRestrict X hf = g₂ ≫ ofRestrict X hf\nthis : g₁.base ≫ f = g₂.base ≫ f\n⊢ g₁.base = g₂.base\n[PROOFSTEP]\nrw [cancel_mono] at this \n[GOAL]\ncase right_cancellation.w\nC : Type u_1\ninst✝ : Category.{?u.247153, u_1} C\nU : TopCat\nX : PresheafedSpace C\nf : U ⟶ ↑X\nhf : OpenEmbedding ↑f\nthis✝ : Mono f\nZ : PresheafedSpace C\ng₁ g₂ : Z ⟶ restrict X hf\neq : g₁ ≫ ofRestrict X hf = g₂ ≫ ofRestrict X hf\nthis : g₁.base = g₂.base\n⊢ g₁.base = g₂.base\n[PROOFSTEP]\nexact this\n[GOAL]\ncase right_cancellation.h\nC : Type u_1\ninst✝ : Category.{?u.247153, u_1} C\nU : TopCat\nX : PresheafedSpace C\nf : U ⟶ ↑X\nhf : OpenEmbedding ↑f\nthis : Mono f\nZ : PresheafedSpace C\ng₁ g₂ : Z ⟶ restrict X hf\neq : g₁ ≫ ofRestrict X hf = g₂ ≫ ofRestrict X hf\n⊢ g₁.c ≫ whiskerRight (eqToHom (_ : (Opens.map g₁.base).op = (Opens.map g₂.base).op)) Z.presheaf = g₂.c\n[PROOFSTEP]\next V\n[GOAL]\ncase right_cancellation.h.w\nC : Type u_1\ninst✝ : Category.{?u.247153, u_1} C\nU : TopCat\nX : PresheafedSpace C\nf : U ⟶ ↑X\nhf : OpenEmbedding ↑f\nthis : Mono f\nZ : PresheafedSpace C\ng₁ g₂ : Z ⟶ restrict X hf\neq : g₁ ≫ ofRestrict X hf = g₂ ≫ ofRestrict X hf\nV : Opens ↑↑(restrict X hf)\n⊢ NatTrans.app (g₁.c ≫ whiskerRight (eqToHom (_ : (Opens.map g₁.base).op = (Opens.map g₂.base).op)) Z.presheaf) (op V) =\n NatTrans.app g₂.c (op V)\n[PROOFSTEP]\nhave hV : (Opens.map (X.ofRestrict hf).base).obj (hf.isOpenMap.functor.obj V) = V :=\n by\n ext1\n exact Set.preimage_image_eq _ hf.inj\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.247153, u_1} C\nU : TopCat\nX : PresheafedSpace C\nf : U ⟶ ↑X\nhf : OpenEmbedding ↑f\nthis : Mono f\nZ : PresheafedSpace C\ng₁ g₂ : Z ⟶ restrict X hf\neq : g₁ ≫ ofRestrict X hf = g₂ ≫ ofRestrict X hf\nV : Opens ↑↑(restrict X hf)\n⊢ (Opens.map (ofRestrict X hf).base).obj ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V) = V\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nC : Type u_1\ninst✝ : Category.{?u.247153, u_1} C\nU : TopCat\nX : PresheafedSpace C\nf : U ⟶ ↑X\nhf : OpenEmbedding ↑f\nthis : Mono f\nZ : PresheafedSpace C\ng₁ g₂ : Z ⟶ restrict X hf\neq : g₁ ≫ ofRestrict X hf = g₂ ≫ ofRestrict X hf\nV : Opens ↑↑(restrict X hf)\n⊢ ↑((Opens.map (ofRestrict X hf).base).obj ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V)) = ↑V\n[PROOFSTEP]\nexact Set.preimage_image_eq _ hf.inj\n[GOAL]\ncase right_cancellation.h.w\nC : Type u_1\ninst✝ : Category.{?u.247153, u_1} C\nU : TopCat\nX : PresheafedSpace C\nf : U ⟶ ↑X\nhf : OpenEmbedding ↑f\nthis : Mono f\nZ : PresheafedSpace C\ng₁ g₂ : Z ⟶ restrict X hf\neq : g₁ ≫ ofRestrict X hf = g₂ ≫ ofRestrict X hf\nV : Opens ↑↑(restrict X hf)\nhV : (Opens.map (ofRestrict X hf).base).obj ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V) = V\n⊢ NatTrans.app (g₁.c ≫ whiskerRight (eqToHom (_ : (Opens.map g₁.base).op = (Opens.map g₂.base).op)) Z.presheaf) (op V) =\n NatTrans.app g₂.c (op V)\n[PROOFSTEP]\nhaveI : IsIso (hf.isOpenMap.adjunction.counit.app (unop (op (hf.isOpenMap.functor.obj V)))) :=\n NatIso.isIso_app_of_isIso (whiskerLeft hf.isOpenMap.functor hf.isOpenMap.adjunction.counit) V\n[GOAL]\ncase right_cancellation.h.w\nC : Type u_1\ninst✝ : Category.{?u.247153, u_1} C\nU : TopCat\nX : PresheafedSpace C\nf : U ⟶ ↑X\nhf : OpenEmbedding ↑f\nthis✝ : Mono f\nZ : PresheafedSpace C\ng₁ g₂ : Z ⟶ restrict X hf\neq : g₁ ≫ ofRestrict X hf = g₂ ≫ ofRestrict X hf\nV : Opens ↑↑(restrict X hf)\nhV : (Opens.map (ofRestrict X hf).base).obj ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V) = V\nthis :\n IsIso\n (NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑f)).counit\n (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V)).unop)\n⊢ NatTrans.app (g₁.c ≫ whiskerRight (eqToHom (_ : (Opens.map g₁.base).op = (Opens.map g₂.base).op)) Z.presheaf) (op V) =\n NatTrans.app g₂.c (op V)\n[PROOFSTEP]\nhave := PresheafedSpace.congr_app eq (op (hf.isOpenMap.functor.obj V))\n[GOAL]\ncase right_cancellation.h.w\nC : Type u_1\ninst✝ : Category.{?u.247153, u_1} C\nU : TopCat\nX : PresheafedSpace C\nf : U ⟶ ↑X\nhf : OpenEmbedding ↑f\nthis✝¹ : Mono f\nZ : PresheafedSpace C\ng₁ g₂ : Z ⟶ restrict X hf\neq : g₁ ≫ ofRestrict X hf = g₂ ≫ ofRestrict X hf\nV : Opens ↑↑(restrict X hf)\nhV : (Opens.map (ofRestrict X hf).base).obj ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V) = V\nthis✝ :\n IsIso\n (NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑f)).counit\n (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V)).unop)\nthis :\n NatTrans.app (g₁ ≫ ofRestrict X hf).c (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V)) =\n NatTrans.app (g₂ ≫ ofRestrict X hf).c (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V)) ≫\n Z.presheaf.map\n (eqToHom\n (_ :\n (Opens.map (g₂ ≫ ofRestrict X hf).base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V)) =\n (Opens.map (g₁ ≫ ofRestrict X hf).base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V))))\n⊢ NatTrans.app (g₁.c ≫ whiskerRight (eqToHom (_ : (Opens.map g₁.base).op = (Opens.map g₂.base).op)) Z.presheaf) (op V) =\n NatTrans.app g₂.c (op V)\n[PROOFSTEP]\nsimp only [PresheafedSpace.comp_c_app, PresheafedSpace.ofRestrict_c_app, Category.assoc, cancel_epi] at this \n[GOAL]\ncase right_cancellation.h.w\nC : Type u_1\ninst✝ : Category.{?u.247153, u_1} C\nU : TopCat\nX : PresheafedSpace C\nf : U ⟶ ↑X\nhf : OpenEmbedding ↑f\nthis✝¹ : Mono f\nZ : PresheafedSpace C\ng₁ g₂ : Z ⟶ restrict X hf\neq : g₁ ≫ ofRestrict X hf = g₂ ≫ ofRestrict X hf\nV : Opens ↑↑(restrict X hf)\nhV : (Opens.map (ofRestrict X hf).base).obj ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V) = V\nthis✝ :\n IsIso\n (NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑f)).counit\n (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V)).unop)\nthis :\n NatTrans.app g₁.c\n (op ((Opens.map (ofRestrict X hf).base).obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V)).unop)) =\n NatTrans.app g₂.c\n (op ((Opens.map (ofRestrict X hf).base).obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V)).unop)) ≫\n Z.presheaf.map\n (eqToHom\n (_ :\n (Opens.map (g₂ ≫ ofRestrict X hf).base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V)) =\n (Opens.map (g₁ ≫ ofRestrict X hf).base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V))))\n⊢ NatTrans.app (g₁.c ≫ whiskerRight (eqToHom (_ : (Opens.map g₁.base).op = (Opens.map g₂.base).op)) Z.presheaf) (op V) =\n NatTrans.app g₂.c (op V)\n[PROOFSTEP]\nhave h : _ ≫ _ = _ ≫ _ ≫ _ := congr_arg (fun f => (X.restrict hf).presheaf.map (eqToHom hV).op ≫ f) this\n[GOAL]\ncase right_cancellation.h.w\nC : Type u_1\ninst✝ : Category.{?u.247153, u_1} C\nU : TopCat\nX : PresheafedSpace C\nf : U ⟶ ↑X\nhf : OpenEmbedding ↑f\nthis✝¹ : Mono f\nZ : PresheafedSpace C\ng₁ g₂ : Z ⟶ restrict X hf\neq : g₁ ≫ ofRestrict X hf = g₂ ≫ ofRestrict X hf\nV : Opens ↑↑(restrict X hf)\nhV : (Opens.map (ofRestrict X hf).base).obj ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V) = V\nthis✝ :\n IsIso\n (NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑f)).counit\n (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V)).unop)\nthis :\n NatTrans.app g₁.c\n (op ((Opens.map (ofRestrict X hf).base).obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V)).unop)) =\n NatTrans.app g₂.c\n (op ((Opens.map (ofRestrict X hf).base).obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V)).unop)) ≫\n Z.presheaf.map\n (eqToHom\n (_ :\n (Opens.map (g₂ ≫ ofRestrict X hf).base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V)) =\n (Opens.map (g₁ ≫ ofRestrict X hf).base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V))))\nh :\n (restrict X hf).presheaf.map (eqToHom hV).op ≫\n NatTrans.app g₁.c\n (op ((Opens.map (ofRestrict X hf).base).obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V)).unop)) =\n (restrict X hf).presheaf.map (eqToHom hV).op ≫\n NatTrans.app g₂.c\n (op ((Opens.map (ofRestrict X hf).base).obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V)).unop)) ≫\n Z.presheaf.map\n (eqToHom\n (_ :\n (Opens.map (g₂ ≫ ofRestrict X hf).base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V)) =\n (Opens.map (g₁ ≫ ofRestrict X hf).base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V))))\n⊢ NatTrans.app (g₁.c ≫ whiskerRight (eqToHom (_ : (Opens.map g₁.base).op = (Opens.map g₂.base).op)) Z.presheaf) (op V) =\n NatTrans.app g₂.c (op V)\n[PROOFSTEP]\nerw [g₁.c.naturality, g₂.c.naturality_assoc] at h \n[GOAL]\ncase right_cancellation.h.w\nC : Type u_1\ninst✝ : Category.{?u.247153, u_1} C\nU : TopCat\nX : PresheafedSpace C\nf : U ⟶ ↑X\nhf : OpenEmbedding ↑f\nthis✝¹ : Mono f\nZ : PresheafedSpace C\ng₁ g₂ : Z ⟶ restrict X hf\neq : g₁ ≫ ofRestrict X hf = g₂ ≫ ofRestrict X hf\nV : Opens ↑↑(restrict X hf)\nhV : (Opens.map (ofRestrict X hf).base).obj ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V) = V\nthis✝ :\n IsIso\n (NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑f)).counit\n (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V)).unop)\nthis :\n NatTrans.app g₁.c\n (op ((Opens.map (ofRestrict X hf).base).obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V)).unop)) =\n NatTrans.app g₂.c\n (op ((Opens.map (ofRestrict X hf).base).obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V)).unop)) ≫\n Z.presheaf.map\n (eqToHom\n (_ :\n (Opens.map (g₂ ≫ ofRestrict X hf).base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V)) =\n (Opens.map (g₁ ≫ ofRestrict X hf).base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V))))\nh :\n NatTrans.app g₁.c (op V) ≫ (g₁.base _* Z.presheaf).map (eqToHom hV).op =\n NatTrans.app g₂.c (op V) ≫\n (g₂.base _* Z.presheaf).map (eqToHom hV).op ≫\n Z.presheaf.map\n (eqToHom\n (_ :\n (Opens.map (g₂ ≫ ofRestrict X hf).base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V)) =\n (Opens.map (g₁ ≫ ofRestrict X hf).base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V))))\n⊢ NatTrans.app (g₁.c ≫ whiskerRight (eqToHom (_ : (Opens.map g₁.base).op = (Opens.map g₂.base).op)) Z.presheaf) (op V) =\n NatTrans.app g₂.c (op V)\n[PROOFSTEP]\nsimp only [Presheaf.pushforwardObj_map, eqToHom_op, Category.assoc, eqToHom_map, eqToHom_trans] at h \n[GOAL]\ncase right_cancellation.h.w\nC : Type u_1\ninst✝ : Category.{?u.247153, u_1} C\nU : TopCat\nX : PresheafedSpace C\nf : U ⟶ ↑X\nhf : OpenEmbedding ↑f\nthis✝¹ : Mono f\nZ : PresheafedSpace C\ng₁ g₂ : Z ⟶ restrict X hf\neq : g₁ ≫ ofRestrict X hf = g₂ ≫ ofRestrict X hf\nV : Opens ↑↑(restrict X hf)\nhV : (Opens.map (ofRestrict X hf).base).obj ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V) = V\nthis✝ :\n IsIso\n (NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑f)).counit\n (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V)).unop)\nthis :\n NatTrans.app g₁.c\n (op ((Opens.map (ofRestrict X hf).base).obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V)).unop)) =\n NatTrans.app g₂.c\n (op ((Opens.map (ofRestrict X hf).base).obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V)).unop)) ≫\n Z.presheaf.map\n (eqToHom\n (_ :\n (Opens.map (g₂ ≫ ofRestrict X hf).base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V)) =\n (Opens.map (g₁ ≫ ofRestrict X hf).base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V))))\nh :\n NatTrans.app g₁.c (op V) ≫\n eqToHom\n (_ :\n Z.presheaf.obj ((Opens.map g₁.base).op.obj (op V)) =\n Z.presheaf.obj\n ((Opens.map g₁.base).op.obj\n (op ((Opens.map (ofRestrict X hf).base).obj ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V))))) =\n NatTrans.app g₂.c (op V) ≫\n eqToHom\n (_ :\n (g₂.base _* Z.presheaf).obj (op V) =\n (g₁.base _* Z.presheaf).obj\n (op ((Opens.map (ofRestrict X hf).base).obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V)).unop)))\n⊢ NatTrans.app (g₁.c ≫ whiskerRight (eqToHom (_ : (Opens.map g₁.base).op = (Opens.map g₂.base).op)) Z.presheaf) (op V) =\n NatTrans.app g₂.c (op V)\n[PROOFSTEP]\nrw [← IsIso.comp_inv_eq, inv_eqToHom, Category.assoc, eqToHom_trans] at h \n[GOAL]\ncase right_cancellation.h.w\nC : Type u_1\ninst✝ : Category.{?u.247153, u_1} C\nU : TopCat\nX : PresheafedSpace C\nf : U ⟶ ↑X\nhf : OpenEmbedding ↑f\nthis✝¹ : Mono f\nZ : PresheafedSpace C\ng₁ g₂ : Z ⟶ restrict X hf\neq : g₁ ≫ ofRestrict X hf = g₂ ≫ ofRestrict X hf\nV : Opens ↑↑(restrict X hf)\nhV : (Opens.map (ofRestrict X hf).base).obj ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V) = V\nthis✝ :\n IsIso\n (NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑f)).counit\n (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V)).unop)\nthis :\n NatTrans.app g₁.c\n (op ((Opens.map (ofRestrict X hf).base).obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V)).unop)) =\n NatTrans.app g₂.c\n (op ((Opens.map (ofRestrict X hf).base).obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V)).unop)) ≫\n Z.presheaf.map\n (eqToHom\n (_ :\n (Opens.map (g₂ ≫ ofRestrict X hf).base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V)) =\n (Opens.map (g₁ ≫ ofRestrict X hf).base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V))))\nh :\n NatTrans.app g₁.c (op V) ≫ eqToHom (_ : (g₁.base _* Z.presheaf).obj (op V) = (g₂.base _* Z.presheaf).obj (op V)) =\n NatTrans.app g₂.c (op V)\n⊢ NatTrans.app (g₁.c ≫ whiskerRight (eqToHom (_ : (Opens.map g₁.base).op = (Opens.map g₂.base).op)) Z.presheaf) (op V) =\n NatTrans.app g₂.c (op V)\n[PROOFSTEP]\nrw [NatTrans.comp_app]\n[GOAL]\ncase right_cancellation.h.w\nC : Type u_1\ninst✝ : Category.{?u.247153, u_1} C\nU : TopCat\nX : PresheafedSpace C\nf : U ⟶ ↑X\nhf : OpenEmbedding ↑f\nthis✝¹ : Mono f\nZ : PresheafedSpace C\ng₁ g₂ : Z ⟶ restrict X hf\neq : g₁ ≫ ofRestrict X hf = g₂ ≫ ofRestrict X hf\nV : Opens ↑↑(restrict X hf)\nhV : (Opens.map (ofRestrict X hf).base).obj ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V) = V\nthis✝ :\n IsIso\n (NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑f)).counit\n (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V)).unop)\nthis :\n NatTrans.app g₁.c\n (op ((Opens.map (ofRestrict X hf).base).obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V)).unop)) =\n NatTrans.app g₂.c\n (op ((Opens.map (ofRestrict X hf).base).obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V)).unop)) ≫\n Z.presheaf.map\n (eqToHom\n (_ :\n (Opens.map (g₂ ≫ ofRestrict X hf).base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V)) =\n (Opens.map (g₁ ≫ ofRestrict X hf).base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑f)).obj V))))\nh :\n NatTrans.app g₁.c (op V) ≫ eqToHom (_ : (g₁.base _* Z.presheaf).obj (op V) = (g₂.base _* Z.presheaf).obj (op V)) =\n NatTrans.app g₂.c (op V)\n⊢ NatTrans.app g₁.c (op V) ≫\n NatTrans.app (whiskerRight (eqToHom (_ : (Opens.map g₁.base).op = (Opens.map g₂.base).op)) Z.presheaf) (op V) =\n NatTrans.app g₂.c (op V)\n[PROOFSTEP]\nsimpa using h\n[GOAL]\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX : PresheafedSpace C\n⊢ (restrict X (_ : OpenEmbedding ↑(Opens.inclusion ⊤))).presheaf = (Opens.inclusionTopIso ↑X).inv _* X.presheaf\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX : PresheafedSpace C\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ⊤))).op ⋙ X.presheaf =\n (Opens.inclusionTopIso ↑X).inv _* X.presheaf\n[PROOFSTEP]\nrw [Opens.inclusion_top_functor X.carrier]\n[GOAL]\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX : PresheafedSpace C\n⊢ (Opens.map (Opens.inclusionTopIso ↑X).inv).op ⋙ X.presheaf = (Opens.inclusionTopIso ↑X).inv _* X.presheaf\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.265841, u_1} C\nX : PresheafedSpace C\n⊢ X.presheaf =\n (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ⊤))).base _*\n (restrict X (_ : OpenEmbedding ↑(Opens.inclusion ⊤))).presheaf\n[PROOFSTEP]\nrw [restrict_top_presheaf, ← Presheaf.Pushforward.comp_eq]\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.265841, u_1} C\nX : PresheafedSpace C\n⊢ X.presheaf =\n ((Opens.inclusionTopIso ↑X).inv ≫ (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ⊤))).base) _* X.presheaf\n[PROOFSTEP]\nerw [Iso.inv_hom_id]\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.265841, u_1} C\nX : PresheafedSpace C\n⊢ X.presheaf = 𝟙 ↑X _* X.presheaf\n[PROOFSTEP]\nrw [Presheaf.Pushforward.id_eq]\n[GOAL]\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX : PresheafedSpace C\n⊢ (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ⊤))).c =\n eqToHom\n (_ :\n X.presheaf =\n (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ⊤))).base _*\n (restrict X (_ : OpenEmbedding ↑(Opens.inclusion ⊤))).presheaf)\n[PROOFSTEP]\next\n[GOAL]\ncase w\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX : PresheafedSpace C\nU✝ : Opens ↑↑X\n⊢ NatTrans.app (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ⊤))).c (op U✝) =\n NatTrans.app\n (eqToHom\n (_ :\n X.presheaf =\n (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ⊤))).base _*\n (restrict X (_ : OpenEmbedding ↑(Opens.inclusion ⊤))).presheaf))\n (op U✝)\n[PROOFSTEP]\ndsimp [ofRestrict]\n[GOAL]\ncase w\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX : PresheafedSpace C\nU✝ : Opens ↑↑X\n⊢ X.presheaf.map (NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑(Opens.inclusion ⊤))).counit U✝).op =\n NatTrans.app\n (eqToHom\n (_ :\n X.presheaf = Opens.inclusion ⊤ _* ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ⊤))).op ⋙ X.presheaf)))\n (op U✝)\n[PROOFSTEP]\nerw [eqToHom_map, eqToHom_app]\n[GOAL]\ncase w.p\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX : PresheafedSpace C\nU✝ : Opens ↑↑X\n⊢ op U✝ = op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ⊤))).obj ((Opens.map (Opens.inclusion ⊤)).obj U✝))\ncase w.p\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX : PresheafedSpace C\nU✝ : Opens ↑↑X\n⊢ op U✝ = op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ⊤))).obj ((Opens.map (Opens.inclusion ⊤)).obj U✝))\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.273541, u_1} C\nX : PresheafedSpace C\n⊢ ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ⊤)) ≫ toRestrictTop X =\n 𝟙 (restrict X (_ : OpenEmbedding ↑(Opens.inclusion ⊤)))\n[PROOFSTEP]\next\n[GOAL]\ncase w.w\nC : Type u_1\ninst✝ : Category.{?u.273541, u_1} C\nX : PresheafedSpace C\nx✝ : (CategoryTheory.forget TopCat).obj ↑(restrict X (_ : OpenEmbedding ↑(Opens.inclusion ⊤)))\n⊢ ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ⊤)) ≫ toRestrictTop X).base x✝ =\n ↑(𝟙 (restrict X (_ : OpenEmbedding ↑(Opens.inclusion ⊤)))).base x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.w\nC : Type u_1\ninst✝ : Category.{?u.273541, u_1} C\nX : PresheafedSpace C\nU✝ : Opens ↑↑(restrict X (_ : OpenEmbedding ↑(Opens.inclusion ⊤)))\n⊢ NatTrans.app\n ((ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ⊤)) ≫ toRestrictTop X).c ≫\n whiskerRight\n (eqToHom\n (_ :\n (Opens.map (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ⊤)) ≫ toRestrictTop X).base).op =\n (Opens.map (𝟙 (restrict X (_ : OpenEmbedding ↑(Opens.inclusion ⊤)))).base).op))\n (restrict X (_ : OpenEmbedding ↑(Opens.inclusion ⊤))).presheaf)\n (op U✝) =\n NatTrans.app (𝟙 (restrict X (_ : OpenEmbedding ↑(Opens.inclusion ⊤)))).c (op U✝)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h.w\nC : Type u_1\ninst✝ : Category.{?u.273541, u_1} C\nX : PresheafedSpace C\nU✝ : Opens ↑↑(restrict X (_ : OpenEmbedding ↑(Opens.inclusion ⊤)))\n⊢ NatTrans.app\n ((ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ⊤)) ≫ toRestrictTop X).c ≫\n whiskerRight (𝟙 (Opens.map (Opens.inclusion ⊤ ≫ (Opens.inclusionTopIso ↑X).inv)).op)\n ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ⊤))).op ⋙ X.presheaf))\n (op U✝) =\n NatTrans.app (𝟙 (restrict X (_ : OpenEmbedding ↑(Opens.inclusion ⊤)))).c (op U✝)\n[PROOFSTEP]\nerw [comp_c, toRestrictTop_c, whiskerRight_id', comp_id, ofRestrict_top_c, eqToHom_map, eqToHom_trans, eqToHom_refl]\n[GOAL]\ncase h.w\nC : Type u_1\ninst✝ : Category.{?u.273541, u_1} C\nX : PresheafedSpace C\nU✝ : Opens ↑↑(restrict X (_ : OpenEmbedding ↑(Opens.inclusion ⊤)))\n⊢ NatTrans.app (𝟙 (restrict X (_ : OpenEmbedding ↑(Opens.inclusion ⊤))).presheaf) (op U✝) =\n NatTrans.app (𝟙 (restrict X (_ : OpenEmbedding ↑(Opens.inclusion ⊤)))).c (op U✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.273541, u_1} C\nX : PresheafedSpace C\n⊢ toRestrictTop X ≫ ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ⊤)) = 𝟙 X\n[PROOFSTEP]\next\n[GOAL]\ncase w.w\nC : Type u_1\ninst✝ : Category.{?u.273541, u_1} C\nX : PresheafedSpace C\nx✝ : (CategoryTheory.forget TopCat).obj ↑X\n⊢ ↑(toRestrictTop X ≫ ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ⊤))).base x✝ = ↑(𝟙 X).base x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.w\nC : Type u_1\ninst✝ : Category.{?u.273541, u_1} C\nX : PresheafedSpace C\nU✝ : Opens ↑↑X\n⊢ NatTrans.app\n ((toRestrictTop X ≫ ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ⊤))).c ≫\n whiskerRight\n (eqToHom\n (_ :\n (Opens.map (toRestrictTop X ≫ ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ⊤))).base).op =\n (Opens.map (𝟙 X).base).op))\n X.presheaf)\n (op U✝) =\n NatTrans.app (𝟙 X).c (op U✝)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h.w\nC : Type u_1\ninst✝ : Category.{?u.273541, u_1} C\nX : PresheafedSpace C\nU✝ : Opens ↑↑X\n⊢ NatTrans.app\n ((toRestrictTop X ≫ ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ⊤))).c ≫\n whiskerRight (𝟙 (Opens.map ((Opens.inclusionTopIso ↑X).inv ≫ Opens.inclusion ⊤)).op) X.presheaf)\n (op U✝) =\n NatTrans.app (𝟙 X).c (op U✝)\n[PROOFSTEP]\nerw [comp_c, ofRestrict_top_c, toRestrictTop_c, eqToHom_map, whiskerRight_id', comp_id, eqToHom_trans, eqToHom_refl]\n[GOAL]\ncase h.w\nC : Type u_1\ninst✝ : Category.{?u.273541, u_1} C\nX : PresheafedSpace C\nU✝ : Opens ↑↑X\n⊢ NatTrans.app (𝟙 X.presheaf) (op U✝) = NatTrans.app (𝟙 X).c (op U✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.293007, u_1} C\nD : Type u_2\ninst✝ : Category.{?u.293014, u_2} D\nF : C ⥤ D\nX : PresheafedSpace C\n⊢ { obj := fun X => { carrier := ↑X, presheaf := X.presheaf ⋙ F },\n map := fun {X Y} f => { base := f.base, c := whiskerRight f.c F } }.map\n (𝟙 X) =\n 𝟙\n ({ obj := fun X => { carrier := ↑X, presheaf := X.presheaf ⋙ F },\n map := fun {X Y} f => { base := f.base, c := whiskerRight f.c F } }.obj\n X)\n[PROOFSTEP]\next U\n[GOAL]\ncase w.w\nC : Type u_1\ninst✝¹ : Category.{?u.293007, u_1} C\nD : Type u_2\ninst✝ : Category.{?u.293014, u_2} D\nF : C ⥤ D\nX : PresheafedSpace C\nU :\n (forget TopCat).obj\n ↑({ obj := fun X => { carrier := ↑X, presheaf := X.presheaf ⋙ F },\n map := fun {X Y} f => { base := f.base, c := whiskerRight f.c F } }.obj\n X)\n⊢ ↑({ obj := fun X => { carrier := ↑X, presheaf := X.presheaf ⋙ F },\n map := fun {X Y} f => { base := f.base, c := whiskerRight f.c F } }.map\n (𝟙 X)).base\n U =\n ↑(𝟙\n ({ obj := fun X => { carrier := ↑X, presheaf := X.presheaf ⋙ F },\n map := fun {X Y} f => { base := f.base, c := whiskerRight f.c F } }.obj\n X)).base\n U\ncase h.w\nC : Type u_1\ninst✝¹ : Category.{?u.293007, u_1} C\nD : Type u_2\ninst✝ : Category.{?u.293014, u_2} D\nF : C ⥤ D\nX : PresheafedSpace C\nU :\n Opens\n ↑↑({ obj := fun X => { carrier := ↑X, presheaf := X.presheaf ⋙ F },\n map := fun {X Y} f => { base := f.base, c := whiskerRight f.c F } }.obj\n X)\n⊢ NatTrans.app\n (({ obj := fun X => { carrier := ↑X, presheaf := X.presheaf ⋙ F },\n map := fun {X Y} f => { base := f.base, c := whiskerRight f.c F } }.map\n (𝟙 X)).c ≫\n whiskerRight\n (eqToHom\n (_ :\n (Opens.map\n ({ obj := fun X => { carrier := ↑X, presheaf := X.presheaf ⋙ F },\n map := fun {X Y} f => { base := f.base, c := whiskerRight f.c F } }.map\n (𝟙 X)).base).op =\n (Opens.map\n (𝟙\n ({ obj := fun X => { carrier := ↑X, presheaf := X.presheaf ⋙ F },\n map := fun {X Y} f => { base := f.base, c := whiskerRight f.c F } }.obj\n X)).base).op))\n ({ obj := fun X => { carrier := ↑X, presheaf := X.presheaf ⋙ F },\n map := fun {X Y} f => { base := f.base, c := whiskerRight f.c F } }.obj\n X).presheaf)\n (op U) =\n NatTrans.app\n (𝟙\n ({ obj := fun X => { carrier := ↑X, presheaf := X.presheaf ⋙ F },\n map := fun {X Y} f => { base := f.base, c := whiskerRight f.c F } }.obj\n X)).c\n (op U)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.w\nC : Type u_1\ninst✝¹ : Category.{?u.293007, u_1} C\nD : Type u_2\ninst✝ : Category.{?u.293014, u_2} D\nF : C ⥤ D\nX : PresheafedSpace C\nU :\n Opens\n ↑↑({ obj := fun X => { carrier := ↑X, presheaf := X.presheaf ⋙ F },\n map := fun {X Y} f => { base := f.base, c := whiskerRight f.c F } }.obj\n X)\n⊢ NatTrans.app\n (({ obj := fun X => { carrier := ↑X, presheaf := X.presheaf ⋙ F },\n map := fun {X Y} f => { base := f.base, c := whiskerRight f.c F } }.map\n (𝟙 X)).c ≫\n whiskerRight\n (eqToHom\n (_ :\n (Opens.map\n ({ obj := fun X => { carrier := ↑X, presheaf := X.presheaf ⋙ F },\n map := fun {X Y} f => { base := f.base, c := whiskerRight f.c F } }.map\n (𝟙 X)).base).op =\n (Opens.map\n (𝟙\n ({ obj := fun X => { carrier := ↑X, presheaf := X.presheaf ⋙ F },\n map := fun {X Y} f => { base := f.base, c := whiskerRight f.c F } }.obj\n X)).base).op))\n ({ obj := fun X => { carrier := ↑X, presheaf := X.presheaf ⋙ F },\n map := fun {X Y} f => { base := f.base, c := whiskerRight f.c F } }.obj\n X).presheaf)\n (op U) =\n NatTrans.app\n (𝟙\n ({ obj := fun X => { carrier := ↑X, presheaf := X.presheaf ⋙ F },\n map := fun {X Y} f => { base := f.base, c := whiskerRight f.c F } }.obj\n X)).c\n (op U)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.293007, u_1} C\nD : Type u_2\ninst✝ : Category.{?u.293014, u_2} D\nF : C ⥤ D\nX✝ Y✝ Z✝ : PresheafedSpace C\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\n⊢ { obj := fun X => { carrier := ↑X, presheaf := X.presheaf ⋙ F },\n map := fun {X Y} f => { base := f.base, c := whiskerRight f.c F } }.map\n (f ≫ g) =\n { obj := fun X => { carrier := ↑X, presheaf := X.presheaf ⋙ F },\n map := fun {X Y} f => { base := f.base, c := whiskerRight f.c F } }.map\n f ≫\n { obj := fun X => { carrier := ↑X, presheaf := X.presheaf ⋙ F },\n map := fun {X Y} f => { base := f.base, c := whiskerRight f.c F } }.map\n g\n[PROOFSTEP]\next U\n[GOAL]\ncase w.w\nC : Type u_1\ninst✝¹ : Category.{?u.293007, u_1} C\nD : Type u_2\ninst✝ : Category.{?u.293014, u_2} D\nF : C ⥤ D\nX✝ Y✝ Z✝ : PresheafedSpace C\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\nU :\n (forget TopCat).obj\n ↑({ obj := fun X => { carrier := ↑X, presheaf := X.presheaf ⋙ F },\n map := fun {X Y} f => { base := f.base, c := whiskerRight f.c F } }.obj\n X✝)\n⊢ ↑({ obj := fun X => { carrier := ↑X, presheaf := X.presheaf ⋙ F },\n map := fun {X Y} f => { base := f.base, c := whiskerRight f.c F } }.map\n (f ≫ g)).base\n U =\n ↑({ obj := fun X => { carrier := ↑X, presheaf := X.presheaf ⋙ F },\n map := fun {X Y} f => { base := f.base, c := whiskerRight f.c F } }.map\n f ≫\n { obj := fun X => { carrier := ↑X, presheaf := X.presheaf ⋙ F },\n map := fun {X Y} f => { base := f.base, c := whiskerRight f.c F } }.map\n g).base\n U\ncase h.w\nC : Type u_1\ninst✝¹ : Category.{?u.293007, u_1} C\nD : Type u_2\ninst✝ : Category.{?u.293014, u_2} D\nF : C ⥤ D\nX✝ Y✝ Z✝ : PresheafedSpace C\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\nU :\n Opens\n ↑↑({ obj := fun X => { carrier := ↑X, presheaf := X.presheaf ⋙ F },\n map := fun {X Y} f => { base := f.base, c := whiskerRight f.c F } }.obj\n Z✝)\n⊢ NatTrans.app\n (({ obj := fun X => { carrier := ↑X, presheaf := X.presheaf ⋙ F },\n map := fun {X Y} f => { base := f.base, c := whiskerRight f.c F } }.map\n (f ≫ g)).c ≫\n whiskerRight\n (eqToHom\n (_ :\n (Opens.map\n ({ obj := fun X => { carrier := ↑X, presheaf := X.presheaf ⋙ F },\n map := fun {X Y} f => { base := f.base, c := whiskerRight f.c F } }.map\n (f ≫ g)).base).op =\n (Opens.map\n ({ obj := fun X => { carrier := ↑X, presheaf := X.presheaf ⋙ F },\n map := fun {X Y} f => { base := f.base, c := whiskerRight f.c F } }.map\n f ≫\n { obj := fun X => { carrier := ↑X, presheaf := X.presheaf ⋙ F },\n map := fun {X Y} f => { base := f.base, c := whiskerRight f.c F } }.map\n g).base).op))\n ({ obj := fun X => { carrier := ↑X, presheaf := X.presheaf ⋙ F },\n map := fun {X Y} f => { base := f.base, c := whiskerRight f.c F } }.obj\n X✝).presheaf)\n (op U) =\n NatTrans.app\n ({ obj := fun X => { carrier := ↑X, presheaf := X.presheaf ⋙ F },\n map := fun {X Y} f => { base := f.base, c := whiskerRight f.c F } }.map\n f ≫\n { obj := fun X => { carrier := ↑X, presheaf := X.presheaf ⋙ F },\n map := fun {X Y} f => { base := f.base, c := whiskerRight f.c F } }.map\n g).c\n (op U)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.w\nC : Type u_1\ninst✝¹ : Category.{?u.293007, u_1} C\nD : Type u_2\ninst✝ : Category.{?u.293014, u_2} D\nF : C ⥤ D\nX✝ Y✝ Z✝ : PresheafedSpace C\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\nU :\n Opens\n ↑↑({ obj := fun X => { carrier := ↑X, presheaf := X.presheaf ⋙ F },\n map := fun {X Y} f => { base := f.base, c := whiskerRight f.c F } }.obj\n Z✝)\n⊢ NatTrans.app\n (({ obj := fun X => { carrier := ↑X, presheaf := X.presheaf ⋙ F },\n map := fun {X Y} f => { base := f.base, c := whiskerRight f.c F } }.map\n (f ≫ g)).c ≫\n whiskerRight\n (eqToHom\n (_ :\n (Opens.map\n ({ obj := fun X => { carrier := ↑X, presheaf := X.presheaf ⋙ F },\n map := fun {X Y} f => { base := f.base, c := whiskerRight f.c F } }.map\n (f ≫ g)).base).op =\n (Opens.map\n ({ obj := fun X => { carrier := ↑X, presheaf := X.presheaf ⋙ F },\n map := fun {X Y} f => { base := f.base, c := whiskerRight f.c F } }.map\n f ≫\n { obj := fun X => { carrier := ↑X, presheaf := X.presheaf ⋙ F },\n map := fun {X Y} f => { base := f.base, c := whiskerRight f.c F } }.map\n g).base).op))\n ({ obj := fun X => { carrier := ↑X, presheaf := X.presheaf ⋙ F },\n map := fun {X Y} f => { base := f.base, c := whiskerRight f.c F } }.obj\n X✝).presheaf)\n (op U) =\n NatTrans.app\n ({ obj := fun X => { carrier := ↑X, presheaf := X.presheaf ⋙ F },\n map := fun {X Y} f => { base := f.base, c := whiskerRight f.c F } }.map\n f ≫\n { obj := fun X => { carrier := ↑X, presheaf := X.presheaf ⋙ F },\n map := fun {X Y} f => { base := f.base, c := whiskerRight f.c F } }.map\n g).c\n (op U)\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.AlgebraicGeometry.PresheafedSpace", "llama_tokens": 28360, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO", "lm_q1_score": 0.48047867804790706, "lm_q2_score": 0.03258974605797164, "lm_q1q2_score": 0.015658678103851204}} {"text": "[GOAL]\nR : Type u\ninst✝ : Ring R\nM : FGModuleCat R\n⊢ AddCommGroup ↑M\n[PROOFSTEP]\nchange AddCommGroup M.obj\n[GOAL]\nR : Type u\ninst✝ : Ring R\nM : FGModuleCat R\n⊢ AddCommGroup ↑M.obj\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u\ninst✝ : Ring R\nM : FGModuleCat R\n⊢ Module R ↑M\n[PROOFSTEP]\nchange Module R M.obj\n[GOAL]\nR : Type u\ninst✝ : Ring R\nM : FGModuleCat R\n⊢ Module R ↑M.obj\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u\ninst✝ : Ring R\n⊢ LargeCategory (FGModuleCat R)\n[PROOFSTEP]\ndsimp [FGModuleCat]\n[GOAL]\nR : Type u\ninst✝ : Ring R\n⊢ LargeCategory (FullSubcategory fun V => Module.Finite R ↑V)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u\ninst✝ : Ring R\n⊢ ConcreteCategory (FGModuleCat R)\n[PROOFSTEP]\ndsimp [FGModuleCat]\n[GOAL]\nR : Type u\ninst✝ : Ring R\n⊢ ConcreteCategory (FullSubcategory fun V => Module.Finite R ↑V)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u\ninst✝ : Ring R\n⊢ Preadditive (FGModuleCat R)\n[PROOFSTEP]\ndsimp [FGModuleCat]\n[GOAL]\nR : Type u\ninst✝ : Ring R\n⊢ Preadditive (FullSubcategory fun V => Module.Finite R ↑V)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u\ninst✝³ : Ring R\nV : Type u\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : Module.Finite R V\n⊢ Module.Finite R ↑(ModuleCat.of R V)\n[PROOFSTEP]\nchange Module.Finite R V\n[GOAL]\nR : Type u\ninst✝³ : Ring R\nV : Type u\ninst✝² : AddCommGroup V\ninst✝¹ : Module R V\ninst✝ : Module.Finite R V\n⊢ Module.Finite R V\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u\ninst✝ : Ring R\n⊢ HasForget₂ (FGModuleCat R) (ModuleCat R)\n[PROOFSTEP]\ndsimp [FGModuleCat]\n[GOAL]\nR : Type u\ninst✝ : Ring R\n⊢ HasForget₂ (FullSubcategory fun V => Module.Finite R ↑V) (ModuleCat R)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u\ninst✝⁶ : Ring R\nV W : Type u\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : Module.Finite R V\ninst✝² : AddCommGroup W\ninst✝¹ : Module R W\ninst✝ : Module.Finite R W\ne : V ≃ₗ[R] W\n⊢ ↑e ≫ ↑(LinearEquiv.symm e) = 𝟙 (of R V)\n[PROOFSTEP]\next x\n[GOAL]\ncase w\nR : Type u\ninst✝⁶ : Ring R\nV W : Type u\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : Module.Finite R V\ninst✝² : AddCommGroup W\ninst✝¹ : Module R W\ninst✝ : Module.Finite R W\ne : V ≃ₗ[R] W\nx : (forget (FGModuleCat R)).obj (of R V)\n⊢ ↑(↑e ≫ ↑(LinearEquiv.symm e)) x = ↑(𝟙 (of R V)) x\n[PROOFSTEP]\nexact e.left_inv x\n[GOAL]\nR : Type u\ninst✝⁶ : Ring R\nV W : Type u\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : Module.Finite R V\ninst✝² : AddCommGroup W\ninst✝¹ : Module R W\ninst✝ : Module.Finite R W\ne : V ≃ₗ[R] W\n⊢ ↑(LinearEquiv.symm e) ≫ ↑e = 𝟙 (of R W)\n[PROOFSTEP]\next x\n[GOAL]\ncase w\nR : Type u\ninst✝⁶ : Ring R\nV W : Type u\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : Module.Finite R V\ninst✝² : AddCommGroup W\ninst✝¹ : Module R W\ninst✝ : Module.Finite R W\ne : V ≃ₗ[R] W\nx : (forget (FGModuleCat R)).obj (of R W)\n⊢ ↑(↑(LinearEquiv.symm e) ≫ ↑e) x = ↑(𝟙 (of R W)) x\n[PROOFSTEP]\nexact e.right_inv x\n[GOAL]\nR : Type u\ninst✝ : CommRing R\n⊢ Linear R (FGModuleCat R)\n[PROOFSTEP]\ndsimp [FGModuleCat]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\n⊢ Linear R (FullSubcategory fun V => Module.Finite R ↑V)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u\ninst✝ : CommRing R\n⊢ MonoidalCategory (FGModuleCat R)\n[PROOFSTEP]\ndsimp [FGModuleCat]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\n⊢ MonoidalCategory (FullSubcategory fun V => Module.Finite R ↑V)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u\ninst✝ : CommRing R\n⊢ SymmetricCategory (FGModuleCat R)\n[PROOFSTEP]\ndsimp [FGModuleCat]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\n⊢ SymmetricCategory (FullSubcategory fun V => Module.Finite R ↑V)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u\ninst✝ : CommRing R\n⊢ MonoidalPreadditive (FGModuleCat R)\n[PROOFSTEP]\ndsimp [FGModuleCat]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\n⊢ MonoidalPreadditive (FullSubcategory fun V => Module.Finite R ↑V)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u\ninst✝ : CommRing R\n⊢ MonoidalLinear R (FGModuleCat R)\n[PROOFSTEP]\ndsimp [FGModuleCat]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\n⊢ MonoidalLinear R (FullSubcategory fun V => Module.Finite R ↑V)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u\ninst✝ : CommRing R\n⊢ Faithful (forget₂Monoidal R).toLaxMonoidalFunctor.toFunctor\n[PROOFSTEP]\ndsimp [forget₂Monoidal]\n -- Porting note: was `infer_instance`\n[GOAL]\nR : Type u\ninst✝ : CommRing R\n⊢ Faithful (fullSubcategoryInclusion fun V => Module.Finite R ↑V)\n[PROOFSTEP]\nexact FullSubcategory.faithful _\n[GOAL]\nR : Type u\ninst✝ : CommRing R\n⊢ Functor.Additive (forget₂Monoidal R).toLaxMonoidalFunctor.toFunctor\n[PROOFSTEP]\ndsimp [forget₂Monoidal]\n -- Porting note: was `infer_instance`\n[GOAL]\nR : Type u\ninst✝ : CommRing R\n⊢ Functor.Additive (fullSubcategoryInclusion fun V => Module.Finite R ↑V)\n[PROOFSTEP]\nexact Functor.fullSubcategoryInclusion_additive _\n[GOAL]\nR : Type u\ninst✝ : CommRing R\n⊢ Functor.Linear R (forget₂Monoidal R).toLaxMonoidalFunctor.toFunctor\n[PROOFSTEP]\ndsimp [forget₂Monoidal]\n -- Porting note: was `infer_instance`\n[GOAL]\nR : Type u\ninst✝ : CommRing R\n⊢ Functor.Linear R (fullSubcategoryInclusion fun V => Module.Finite R ↑V)\n[PROOFSTEP]\nexact Functor.fullSubcategoryInclusionLinear _ _\n[GOAL]\nK : Type u\ninst✝ : Field K\nV W : FGModuleCat K\n⊢ Module.Finite K (↑V →ₗ[K] ↑W)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nK : Type u\ninst✝ : Field K\n⊢ MonoidalClosed (FGModuleCat K)\n[PROOFSTEP]\ndsimp [FGModuleCat]\n -- Porting note: was `infer_instance`\n[GOAL]\nK : Type u\ninst✝ : Field K\n⊢ MonoidalClosed (FullSubcategory fun V => Module.Finite K ↑V)\n[PROOFSTEP]\nexact MonoidalCategory.fullMonoidalClosedSubcategory _\n[GOAL]\nK : Type u\ninst✝ : Field K\nV W : FGModuleCat K\n⊢ (𝟙 (FGModuleCatDual K V) ⊗ FGModuleCatCoevaluation K V) ≫\n (α_ (FGModuleCatDual K V) V (FGModuleCatDual K V)).inv ≫ (FGModuleCatEvaluation K V ⊗ 𝟙 (FGModuleCatDual K V)) =\n (ρ_ (FGModuleCatDual K V)).hom ≫ (λ_ (FGModuleCatDual K V)).inv\n[PROOFSTEP]\napply contractLeft_assoc_coevaluation K V\n[GOAL]\nK : Type u\ninst✝ : Field K\nV W : FGModuleCat K\n⊢ (FGModuleCatCoevaluation K V ⊗ 𝟙 V) ≫ (α_ V (FGModuleCatDual K V) V).hom ≫ (𝟙 V ⊗ FGModuleCatEvaluation K V) =\n (λ_ V).hom ≫ (ρ_ V).inv\n[PROOFSTEP]\napply contractLeft_assoc_coevaluation' K V\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Category.FGModuleCat.Basic", "llama_tokens": 2822, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO", "lm_q1_score": 0.49609382947091946, "lm_q2_score": 0.030675799827571404, "lm_q1q2_score": 0.015218075008543268}} {"text": "[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasStrictInitialObjects C\nI : C\nhI : IsInitial I\nA : C\nf g : A ⟶ I\n⊢ f = g\n[PROOFSTEP]\nhaveI := hI.isIso_to f\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasStrictInitialObjects C\nI : C\nhI : IsInitial I\nA : C\nf g : A ⟶ I\nthis : IsIso f\n⊢ f = g\n[PROOFSTEP]\nhaveI := hI.isIso_to g\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasStrictInitialObjects C\nI : C\nhI : IsInitial I\nA : C\nf g : A ⟶ I\nthis✝ : IsIso f\nthis : IsIso g\n⊢ f = g\n[PROOFSTEP]\nexact eq_of_inv_eq_inv (hI.hom_ext (inv f) (inv g))\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasStrictInitialObjects C\nI X : C\ninst✝ : HasBinaryProduct X I\nhI : IsInitial I\n⊢ X ⨯ I ≅ I\n[PROOFSTEP]\nhave := hI.isIso_to (prod.snd : X ⨯ I ⟶ I)\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasStrictInitialObjects C\nI X : C\ninst✝ : HasBinaryProduct X I\nhI : IsInitial I\nthis : IsIso prod.snd\n⊢ X ⨯ I ≅ I\n[PROOFSTEP]\nexact asIso prod.snd\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasStrictInitialObjects C\nI X : C\ninst✝ : HasBinaryProduct I X\nhI : IsInitial I\n⊢ I ⨯ X ≅ I\n[PROOFSTEP]\nhave := hI.isIso_to (prod.fst : I ⨯ X ⟶ I)\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasStrictInitialObjects C\nI X : C\ninst✝ : HasBinaryProduct I X\nhI : IsInitial I\nthis : IsIso prod.fst\n⊢ I ⨯ X ≅ I\n[PROOFSTEP]\nexact asIso prod.fst\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasInitial C\nh : ∀ (A : C) (f : A ⟶ ⊥_ C), IsIso f\nI A : C\nf : A ⟶ I\nhI : IsInitial I\nthis : IsIso (f ≫ IsInitial.to hI (⊥_ C))\n⊢ f ≫ IsInitial.to hI (⊥_ C) ≫ inv (f ≫ IsInitial.to hI (⊥_ C)) = 𝟙 A\n[PROOFSTEP]\nrw [← assoc, IsIso.hom_inv_id]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasStrictTerminalObjects C\nI : C\nhI : IsTerminal I\nA : C\nf g : I ⟶ A\n⊢ f = g\n[PROOFSTEP]\nhaveI := hI.isIso_from f\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasStrictTerminalObjects C\nI : C\nhI : IsTerminal I\nA : C\nf g : I ⟶ A\nthis : IsIso f\n⊢ f = g\n[PROOFSTEP]\nhaveI := hI.isIso_from g\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasStrictTerminalObjects C\nI : C\nhI : IsTerminal I\nA : C\nf g : I ⟶ A\nthis✝ : IsIso f\nthis : IsIso g\n⊢ f = g\n[PROOFSTEP]\nexact eq_of_inv_eq_inv (hI.hom_ext (inv f) (inv g))\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasStrictTerminalObjects C\nI : C\nJ : Type v\ninst✝² : SmallCategory J\nF : J ⥤ C\ninst✝¹ : HasLimit F\ni : J\nH : (j : J) → j ≠ i → IsTerminal (F.obj j)\ninst✝ : Subsingleton (i ⟶ i)\n⊢ IsIso (limit.π F i)\n[PROOFSTEP]\nclassical\nrefine' ⟨⟨limit.lift _ ⟨_, ⟨_, _⟩⟩, _, _⟩⟩\n· exact fun j => dite (j = i) (fun h => eqToHom (by cases h; rfl)) fun h => (H _ h).from _\n· intro j k f\n split_ifs with h h_1 h_1\n · cases h\n cases h_1\n obtain rfl : f = 𝟙 _ := Subsingleton.elim _ _\n simp\n · cases h\n erw [Category.comp_id]\n haveI : IsIso (F.map f) := (H _ h_1).isIso_from _\n rw [← IsIso.comp_inv_eq]\n apply (H _ h_1).hom_ext\n · cases h_1\n apply (H _ h).hom_ext\n · apply (H _ h).hom_ext\n· ext\n rw [assoc, limit.lift_π]\n dsimp only\n split_ifs with h\n · cases h\n rw [id_comp, eqToHom_refl]\n exact comp_id _\n · apply (H _ h).hom_ext\n· rw [limit.lift_π]\n simp\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasStrictTerminalObjects C\nI : C\nJ : Type v\ninst✝² : SmallCategory J\nF : J ⥤ C\ninst✝¹ : HasLimit F\ni : J\nH : (j : J) → j ≠ i → IsTerminal (F.obj j)\ninst✝ : Subsingleton (i ⟶ i)\n⊢ IsIso (limit.π F i)\n[PROOFSTEP]\nrefine' ⟨⟨limit.lift _ ⟨_, ⟨_, _⟩⟩, _, _⟩⟩\n[GOAL]\ncase refine'_1\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasStrictTerminalObjects C\nI : C\nJ : Type v\ninst✝² : SmallCategory J\nF : J ⥤ C\ninst✝¹ : HasLimit F\ni : J\nH : (j : J) → j ≠ i → IsTerminal (F.obj j)\ninst✝ : Subsingleton (i ⟶ i)\n⊢ (X : J) → ((Functor.const J).obj (F.toPrefunctor.1 i)).obj X ⟶ F.obj X\n[PROOFSTEP]\nexact fun j => dite (j = i) (fun h => eqToHom (by cases h; rfl)) fun h => (H _ h).from _\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasStrictTerminalObjects C\nI : C\nJ : Type v\ninst✝² : SmallCategory J\nF : J ⥤ C\ninst✝¹ : HasLimit F\ni : J\nH : (j : J) → j ≠ i → IsTerminal (F.obj j)\ninst✝ : Subsingleton (i ⟶ i)\nj : J\nh : j = i\n⊢ ((Functor.const J).obj (F.toPrefunctor.1 i)).obj j = F.obj j\n[PROOFSTEP]\ncases h\n[GOAL]\ncase refl\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasStrictTerminalObjects C\nI : C\nJ : Type v\ninst✝² : SmallCategory J\nF : J ⥤ C\ninst✝¹ : HasLimit F\ni : J\nH : (j : J) → j ≠ i → IsTerminal (F.obj j)\ninst✝ : Subsingleton (i ⟶ i)\n⊢ ((Functor.const J).obj (F.toPrefunctor.1 i)).obj i = F.obj i\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_2\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasStrictTerminalObjects C\nI : C\nJ : Type v\ninst✝² : SmallCategory J\nF : J ⥤ C\ninst✝¹ : HasLimit F\ni : J\nH : (j : J) → j ≠ i → IsTerminal (F.obj j)\ninst✝ : Subsingleton (i ⟶ i)\n⊢ ∀ ⦃X Y : J⦄ (f : X ⟶ Y),\n (((Functor.const J).obj (F.toPrefunctor.1 i)).map f ≫\n if h : Y = i then eqToHom (_ : ((Functor.const J).obj (F.toPrefunctor.1 i)).obj Y = F.obj Y)\n else IsTerminal.from (H Y h) (((Functor.const J).obj (F.toPrefunctor.1 i)).obj Y)) =\n (if h : X = i then eqToHom (_ : ((Functor.const J).obj (F.toPrefunctor.1 i)).obj X = F.obj X)\n else IsTerminal.from (H X h) (((Functor.const J).obj (F.toPrefunctor.1 i)).obj X)) ≫\n F.map f\n[PROOFSTEP]\nintro j k f\n[GOAL]\ncase refine'_2\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasStrictTerminalObjects C\nI : C\nJ : Type v\ninst✝² : SmallCategory J\nF : J ⥤ C\ninst✝¹ : HasLimit F\ni : J\nH : (j : J) → j ≠ i → IsTerminal (F.obj j)\ninst✝ : Subsingleton (i ⟶ i)\nj k : J\nf : j ⟶ k\n⊢ (((Functor.const J).obj (F.toPrefunctor.1 i)).map f ≫\n if h : k = i then eqToHom (_ : ((Functor.const J).obj (F.toPrefunctor.1 i)).obj k = F.obj k)\n else IsTerminal.from (H k h) (((Functor.const J).obj (F.toPrefunctor.1 i)).obj k)) =\n (if h : j = i then eqToHom (_ : ((Functor.const J).obj (F.toPrefunctor.1 i)).obj j = F.obj j)\n else IsTerminal.from (H j h) (((Functor.const J).obj (F.toPrefunctor.1 i)).obj j)) ≫\n F.map f\n[PROOFSTEP]\nsplit_ifs with h h_1 h_1\n[GOAL]\ncase pos\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasStrictTerminalObjects C\nI : C\nJ : Type v\ninst✝² : SmallCategory J\nF : J ⥤ C\ninst✝¹ : HasLimit F\ni : J\nH : (j : J) → j ≠ i → IsTerminal (F.obj j)\ninst✝ : Subsingleton (i ⟶ i)\nj k : J\nf : j ⟶ k\nh : k = i\nh_1 : j = i\n⊢ ((Functor.const J).obj (F.toPrefunctor.1 i)).map f ≫\n eqToHom (_ : ((Functor.const J).obj (F.toPrefunctor.1 i)).obj k = F.obj k) =\n eqToHom (_ : ((Functor.const J).obj (F.toPrefunctor.1 i)).obj j = F.obj j) ≫ F.map f\n[PROOFSTEP]\ncases h\n[GOAL]\ncase pos.refl\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasStrictTerminalObjects C\nI : C\nJ : Type v\ninst✝² : SmallCategory J\nF : J ⥤ C\ninst✝¹ : HasLimit F\ni : J\nH : (j : J) → j ≠ i → IsTerminal (F.obj j)\ninst✝ : Subsingleton (i ⟶ i)\nj : J\nh_1 : j = i\nf : j ⟶ i\n⊢ ((Functor.const J).obj (F.toPrefunctor.1 i)).map f ≫\n eqToHom (_ : ((Functor.const J).obj (F.toPrefunctor.1 i)).obj i = F.obj i) =\n eqToHom (_ : ((Functor.const J).obj (F.toPrefunctor.1 i)).obj j = F.obj j) ≫ F.map f\n[PROOFSTEP]\ncases h_1\n[GOAL]\ncase pos.refl.refl\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasStrictTerminalObjects C\nI : C\nJ : Type v\ninst✝² : SmallCategory J\nF : J ⥤ C\ninst✝¹ : HasLimit F\ni : J\nH : (j : J) → j ≠ i → IsTerminal (F.obj j)\ninst✝ : Subsingleton (i ⟶ i)\nf : i ⟶ i\n⊢ ((Functor.const J).obj (F.toPrefunctor.1 i)).map f ≫\n eqToHom (_ : ((Functor.const J).obj (F.toPrefunctor.1 i)).obj i = F.obj i) =\n eqToHom (_ : ((Functor.const J).obj (F.toPrefunctor.1 i)).obj i = F.obj i) ≫ F.map f\n[PROOFSTEP]\nobtain rfl : f = 𝟙 _ := Subsingleton.elim _ _\n[GOAL]\ncase pos.refl.refl\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasStrictTerminalObjects C\nI : C\nJ : Type v\ninst✝² : SmallCategory J\nF : J ⥤ C\ninst✝¹ : HasLimit F\ni : J\nH : (j : J) → j ≠ i → IsTerminal (F.obj j)\ninst✝ : Subsingleton (i ⟶ i)\n⊢ ((Functor.const J).obj (F.toPrefunctor.1 i)).map (𝟙 i) ≫\n eqToHom (_ : ((Functor.const J).obj (F.toPrefunctor.1 i)).obj i = F.obj i) =\n eqToHom (_ : ((Functor.const J).obj (F.toPrefunctor.1 i)).obj i = F.obj i) ≫ F.map (𝟙 i)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasStrictTerminalObjects C\nI : C\nJ : Type v\ninst✝² : SmallCategory J\nF : J ⥤ C\ninst✝¹ : HasLimit F\ni : J\nH : (j : J) → j ≠ i → IsTerminal (F.obj j)\ninst✝ : Subsingleton (i ⟶ i)\nj k : J\nf : j ⟶ k\nh : k = i\nh_1 : ¬j = i\n⊢ ((Functor.const J).obj (F.toPrefunctor.1 i)).map f ≫\n eqToHom (_ : ((Functor.const J).obj (F.toPrefunctor.1 i)).obj k = F.obj k) =\n IsTerminal.from (H j h_1) (((Functor.const J).obj (F.toPrefunctor.1 i)).obj j) ≫ F.map f\n[PROOFSTEP]\ncases h\n[GOAL]\ncase neg.refl\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasStrictTerminalObjects C\nI : C\nJ : Type v\ninst✝² : SmallCategory J\nF : J ⥤ C\ninst✝¹ : HasLimit F\ni : J\nH : (j : J) → j ≠ i → IsTerminal (F.obj j)\ninst✝ : Subsingleton (i ⟶ i)\nj : J\nh_1 : ¬j = i\nf : j ⟶ i\n⊢ ((Functor.const J).obj (F.toPrefunctor.1 i)).map f ≫\n eqToHom (_ : ((Functor.const J).obj (F.toPrefunctor.1 i)).obj i = F.obj i) =\n IsTerminal.from (H j h_1) (((Functor.const J).obj (F.toPrefunctor.1 i)).obj j) ≫ F.map f\n[PROOFSTEP]\nerw [Category.comp_id]\n[GOAL]\ncase neg.refl\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasStrictTerminalObjects C\nI : C\nJ : Type v\ninst✝² : SmallCategory J\nF : J ⥤ C\ninst✝¹ : HasLimit F\ni : J\nH : (j : J) → j ≠ i → IsTerminal (F.obj j)\ninst✝ : Subsingleton (i ⟶ i)\nj : J\nh_1 : ¬j = i\nf : j ⟶ i\n⊢ ((Functor.const J).obj (F.toPrefunctor.1 i)).map f =\n IsTerminal.from (H j h_1) (((Functor.const J).obj (F.toPrefunctor.1 i)).obj j) ≫ F.map f\n[PROOFSTEP]\nhaveI : IsIso (F.map f) := (H _ h_1).isIso_from _\n[GOAL]\ncase neg.refl\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasStrictTerminalObjects C\nI : C\nJ : Type v\ninst✝² : SmallCategory J\nF : J ⥤ C\ninst✝¹ : HasLimit F\ni : J\nH : (j : J) → j ≠ i → IsTerminal (F.obj j)\ninst✝ : Subsingleton (i ⟶ i)\nj : J\nh_1 : ¬j = i\nf : j ⟶ i\nthis : IsIso (F.map f)\n⊢ ((Functor.const J).obj (F.toPrefunctor.1 i)).map f =\n IsTerminal.from (H j h_1) (((Functor.const J).obj (F.toPrefunctor.1 i)).obj j) ≫ F.map f\n[PROOFSTEP]\nrw [← IsIso.comp_inv_eq]\n[GOAL]\ncase neg.refl\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasStrictTerminalObjects C\nI : C\nJ : Type v\ninst✝² : SmallCategory J\nF : J ⥤ C\ninst✝¹ : HasLimit F\ni : J\nH : (j : J) → j ≠ i → IsTerminal (F.obj j)\ninst✝ : Subsingleton (i ⟶ i)\nj : J\nh_1 : ¬j = i\nf : j ⟶ i\nthis : IsIso (F.map f)\n⊢ ((Functor.const J).obj (F.toPrefunctor.1 i)).map f ≫ inv (F.map f) =\n IsTerminal.from (H j h_1) (((Functor.const J).obj (F.toPrefunctor.1 i)).obj j)\n[PROOFSTEP]\napply (H _ h_1).hom_ext\n[GOAL]\ncase pos\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasStrictTerminalObjects C\nI : C\nJ : Type v\ninst✝² : SmallCategory J\nF : J ⥤ C\ninst✝¹ : HasLimit F\ni : J\nH : (j : J) → j ≠ i → IsTerminal (F.obj j)\ninst✝ : Subsingleton (i ⟶ i)\nj k : J\nf : j ⟶ k\nh : ¬k = i\nh_1 : j = i\n⊢ ((Functor.const J).obj (F.toPrefunctor.1 i)).map f ≫\n IsTerminal.from (H k h) (((Functor.const J).obj (F.toPrefunctor.1 i)).obj k) =\n eqToHom (_ : ((Functor.const J).obj (F.toPrefunctor.1 i)).obj j = F.obj j) ≫ F.map f\n[PROOFSTEP]\ncases h_1\n[GOAL]\ncase pos.refl\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasStrictTerminalObjects C\nI : C\nJ : Type v\ninst✝² : SmallCategory J\nF : J ⥤ C\ninst✝¹ : HasLimit F\ni : J\nH : (j : J) → j ≠ i → IsTerminal (F.obj j)\ninst✝ : Subsingleton (i ⟶ i)\nk : J\nh : ¬k = i\nf : i ⟶ k\n⊢ ((Functor.const J).obj (F.toPrefunctor.1 i)).map f ≫\n IsTerminal.from (H k h) (((Functor.const J).obj (F.toPrefunctor.1 i)).obj k) =\n eqToHom (_ : ((Functor.const J).obj (F.toPrefunctor.1 i)).obj i = F.obj i) ≫ F.map f\n[PROOFSTEP]\napply (H _ h).hom_ext\n[GOAL]\ncase neg\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasStrictTerminalObjects C\nI : C\nJ : Type v\ninst✝² : SmallCategory J\nF : J ⥤ C\ninst✝¹ : HasLimit F\ni : J\nH : (j : J) → j ≠ i → IsTerminal (F.obj j)\ninst✝ : Subsingleton (i ⟶ i)\nj k : J\nf : j ⟶ k\nh : ¬k = i\nh_1 : ¬j = i\n⊢ ((Functor.const J).obj (F.toPrefunctor.1 i)).map f ≫\n IsTerminal.from (H k h) (((Functor.const J).obj (F.toPrefunctor.1 i)).obj k) =\n IsTerminal.from (H j h_1) (((Functor.const J).obj (F.toPrefunctor.1 i)).obj j) ≫ F.map f\n[PROOFSTEP]\napply (H _ h).hom_ext\n[GOAL]\ncase refine'_3\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasStrictTerminalObjects C\nI : C\nJ : Type v\ninst✝² : SmallCategory J\nF : J ⥤ C\ninst✝¹ : HasLimit F\ni : J\nH : (j : J) → j ≠ i → IsTerminal (F.obj j)\ninst✝ : Subsingleton (i ⟶ i)\n⊢ limit.π F i ≫\n limit.lift F\n { pt := F.toPrefunctor.1 i,\n π :=\n NatTrans.mk fun j =>\n if h : j = i then eqToHom (_ : ((Functor.const J).obj (F.toPrefunctor.1 i)).obj j = F.obj j)\n else IsTerminal.from (H j h) (((Functor.const J).obj (F.toPrefunctor.1 i)).obj j) } =\n 𝟙 (limit F)\n[PROOFSTEP]\next\n[GOAL]\ncase refine'_3.w\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasStrictTerminalObjects C\nI : C\nJ : Type v\ninst✝² : SmallCategory J\nF : J ⥤ C\ninst✝¹ : HasLimit F\ni : J\nH : (j : J) → j ≠ i → IsTerminal (F.obj j)\ninst✝ : Subsingleton (i ⟶ i)\nj✝ : J\n⊢ (limit.π F i ≫\n limit.lift F\n { pt := F.toPrefunctor.1 i,\n π :=\n NatTrans.mk fun j =>\n if h : j = i then eqToHom (_ : ((Functor.const J).obj (F.toPrefunctor.1 i)).obj j = F.obj j)\n else IsTerminal.from (H j h) (((Functor.const J).obj (F.toPrefunctor.1 i)).obj j) }) ≫\n limit.π F j✝ =\n 𝟙 (limit F) ≫ limit.π F j✝\n[PROOFSTEP]\nrw [assoc, limit.lift_π]\n[GOAL]\ncase refine'_3.w\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasStrictTerminalObjects C\nI : C\nJ : Type v\ninst✝² : SmallCategory J\nF : J ⥤ C\ninst✝¹ : HasLimit F\ni : J\nH : (j : J) → j ≠ i → IsTerminal (F.obj j)\ninst✝ : Subsingleton (i ⟶ i)\nj✝ : J\n⊢ limit.π F i ≫\n NatTrans.app\n { pt := F.toPrefunctor.1 i,\n π :=\n NatTrans.mk fun j =>\n if h : j = i then eqToHom (_ : ((Functor.const J).obj (F.toPrefunctor.1 i)).obj j = F.obj j)\n else IsTerminal.from (H j h) (((Functor.const J).obj (F.toPrefunctor.1 i)).obj j) }.π\n j✝ =\n 𝟙 (limit F) ≫ limit.π F j✝\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase refine'_3.w\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasStrictTerminalObjects C\nI : C\nJ : Type v\ninst✝² : SmallCategory J\nF : J ⥤ C\ninst✝¹ : HasLimit F\ni : J\nH : (j : J) → j ≠ i → IsTerminal (F.obj j)\ninst✝ : Subsingleton (i ⟶ i)\nj✝ : J\n⊢ (limit.π F i ≫\n if h : j✝ = i then eqToHom (_ : ((Functor.const J).obj (F.toPrefunctor.1 i)).obj j✝ = F.obj j✝)\n else IsTerminal.from (H j✝ h) (((Functor.const J).obj (F.toPrefunctor.1 i)).obj j✝)) =\n 𝟙 (limit F) ≫ limit.π F j✝\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasStrictTerminalObjects C\nI : C\nJ : Type v\ninst✝² : SmallCategory J\nF : J ⥤ C\ninst✝¹ : HasLimit F\ni : J\nH : (j : J) → j ≠ i → IsTerminal (F.obj j)\ninst✝ : Subsingleton (i ⟶ i)\nj✝ : J\nh : j✝ = i\n⊢ limit.π F i ≫ eqToHom (_ : ((Functor.const J).obj (F.toPrefunctor.1 i)).obj j✝ = F.obj j✝) =\n 𝟙 (limit F) ≫ limit.π F j✝\n[PROOFSTEP]\ncases h\n[GOAL]\ncase pos.refl\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasStrictTerminalObjects C\nI : C\nJ : Type v\ninst✝² : SmallCategory J\nF : J ⥤ C\ninst✝¹ : HasLimit F\ni : J\nH : (j : J) → j ≠ i → IsTerminal (F.obj j)\ninst✝ : Subsingleton (i ⟶ i)\n⊢ limit.π F i ≫ eqToHom (_ : ((Functor.const J).obj (F.toPrefunctor.1 i)).obj i = F.obj i) = 𝟙 (limit F) ≫ limit.π F i\n[PROOFSTEP]\nrw [id_comp, eqToHom_refl]\n[GOAL]\ncase pos.refl\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasStrictTerminalObjects C\nI : C\nJ : Type v\ninst✝² : SmallCategory J\nF : J ⥤ C\ninst✝¹ : HasLimit F\ni : J\nH : (j : J) → j ≠ i → IsTerminal (F.obj j)\ninst✝ : Subsingleton (i ⟶ i)\n⊢ limit.π F i ≫ 𝟙 (((Functor.const J).obj (F.toPrefunctor.1 i)).obj i) = limit.π F i\n[PROOFSTEP]\nexact comp_id _\n[GOAL]\ncase neg\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasStrictTerminalObjects C\nI : C\nJ : Type v\ninst✝² : SmallCategory J\nF : J ⥤ C\ninst✝¹ : HasLimit F\ni : J\nH : (j : J) → j ≠ i → IsTerminal (F.obj j)\ninst✝ : Subsingleton (i ⟶ i)\nj✝ : J\nh : ¬j✝ = i\n⊢ limit.π F i ≫ IsTerminal.from (H j✝ h) (((Functor.const J).obj (F.toPrefunctor.1 i)).obj j✝) =\n 𝟙 (limit F) ≫ limit.π F j✝\n[PROOFSTEP]\napply (H _ h).hom_ext\n[GOAL]\ncase refine'_4\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasStrictTerminalObjects C\nI : C\nJ : Type v\ninst✝² : SmallCategory J\nF : J ⥤ C\ninst✝¹ : HasLimit F\ni : J\nH : (j : J) → j ≠ i → IsTerminal (F.obj j)\ninst✝ : Subsingleton (i ⟶ i)\n⊢ limit.lift F\n { pt := F.toPrefunctor.1 i,\n π :=\n NatTrans.mk fun j =>\n if h : j = i then eqToHom (_ : ((Functor.const J).obj (F.toPrefunctor.1 i)).obj j = F.obj j)\n else IsTerminal.from (H j h) (((Functor.const J).obj (F.toPrefunctor.1 i)).obj j) } ≫\n limit.π F i =\n 𝟙 (F.obj i)\n[PROOFSTEP]\nrw [limit.lift_π]\n[GOAL]\ncase refine'_4\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasStrictTerminalObjects C\nI : C\nJ : Type v\ninst✝² : SmallCategory J\nF : J ⥤ C\ninst✝¹ : HasLimit F\ni : J\nH : (j : J) → j ≠ i → IsTerminal (F.obj j)\ninst✝ : Subsingleton (i ⟶ i)\n⊢ NatTrans.app\n { pt := F.toPrefunctor.1 i,\n π :=\n NatTrans.mk fun j =>\n if h : j = i then eqToHom (_ : ((Functor.const J).obj (F.toPrefunctor.1 i)).obj j = F.obj j)\n else IsTerminal.from (H j h) (((Functor.const J).obj (F.toPrefunctor.1 i)).obj j) }.π\n i =\n 𝟙 (F.obj i)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nI : C\nh : ∀ (A : C) (f : I ⟶ A), IsIso f\nI' A : C\nf : I' ⟶ A\nhI' : IsTerminal I'\nthis : IsIso (IsTerminal.from hI' I ≫ f)\n⊢ (inv (IsTerminal.from hI' I ≫ f) ≫ IsTerminal.from hI' I) ≫ f = 𝟙 A\n[PROOFSTEP]\nrw [assoc, IsIso.inv_hom_id]\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Limits.Shapes.StrictInitial", "llama_tokens": 8784, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO", "lm_q1_score": 0.45713673161914675, "lm_q2_score": 0.030675801156820354, "lm_q1q2_score": 0.014023035480627697}} {"text": "[GOAL]\nα✝ β✝ : Type u\ninst✝ : (P : Prop) → Decidable P\nα β : Type ?u.384\n⊢ Functor.mapConst = Functor.map ∘ const β\n[PROOFSTEP]\nsimp only [Functor.mapConst, Functor.map]\n[GOAL]\nα✝ β✝ : Type u\ninst✝ : (P : Prop) → Decidable P\nα β γ : Type u_1\nf : α → β → γ\ns : Finset α\nt : Finset β\n⊢ image₂ f s t = Seq.seq (f <$> s) fun x => t\n[PROOFSTEP]\next\n[GOAL]\ncase a\nα✝ β✝ : Type u\ninst✝ : (P : Prop) → Decidable P\nα β γ : Type u_1\nf : α → β → γ\ns : Finset α\nt : Finset β\na✝ : γ\n⊢ a✝ ∈ image₂ f s t ↔ a✝ ∈ Seq.seq (f <$> s) fun x => t\n[PROOFSTEP]\nsimp [mem_sup]\n[GOAL]\nα β : Type u\ninst✝ : (P : Prop) → Decidable P\nsrc✝ : LawfulFunctor Finset := lawfulFunctor\nα✝ β✝ : Type ?u.13031\ns : Finset α✝\nt : Finset β✝\n⊢ (SeqLeft.seqLeft s fun x => t) = Seq.seq (const β✝ <$> s) fun x => t\n[PROOFSTEP]\nrw [seq_def, fmap_def, seqLeft_def]\n[GOAL]\nα β : Type u\ninst✝ : (P : Prop) → Decidable P\nsrc✝ : LawfulFunctor Finset := lawfulFunctor\nα✝ β✝ : Type ?u.13031\ns : Finset α✝\nt : Finset β✝\n⊢ (if t = ∅ then ∅ else s) = sup (image (const β✝) s) fun f => image f t\n[PROOFSTEP]\nobtain rfl | ht := t.eq_empty_or_nonempty\n[GOAL]\ncase inl\nα β : Type u\ninst✝ : (P : Prop) → Decidable P\nsrc✝ : LawfulFunctor Finset := lawfulFunctor\nα✝ β✝ : Type ?u.13031\ns : Finset α✝\n⊢ (if ∅ = ∅ then ∅ else s) = sup (image (const β✝) s) fun f => image f ∅\n[PROOFSTEP]\nsimp_rw [image_empty, if_true]\n[GOAL]\ncase inl\nα β : Type u\ninst✝ : (P : Prop) → Decidable P\nsrc✝ : LawfulFunctor Finset := lawfulFunctor\nα✝ β✝ : Type ?u.13031\ns : Finset α✝\n⊢ ∅ = sup (image (const β✝) s) fun f => ∅\n[PROOFSTEP]\nexact (sup_bot _).symm\n[GOAL]\ncase inr\nα β : Type u\ninst✝ : (P : Prop) → Decidable P\nsrc✝ : LawfulFunctor Finset := lawfulFunctor\nα✝ β✝ : Type ?u.13031\ns : Finset α✝\nt : Finset β✝\nht : Finset.Nonempty t\n⊢ (if t = ∅ then ∅ else s) = sup (image (const β✝) s) fun f => image f t\n[PROOFSTEP]\next a\n[GOAL]\ncase inr.a\nα β : Type u\ninst✝ : (P : Prop) → Decidable P\nsrc✝ : LawfulFunctor Finset := lawfulFunctor\nα✝ β✝ : Type ?u.13031\ns : Finset α✝\nt : Finset β✝\nht : Finset.Nonempty t\na : α✝\n⊢ (a ∈ if t = ∅ then ∅ else s) ↔ a ∈ sup (image (const β✝) s) fun f => image f t\n[PROOFSTEP]\nrw [if_neg ht.ne_empty, mem_sup]\n[GOAL]\ncase inr.a\nα β : Type u\ninst✝ : (P : Prop) → Decidable P\nsrc✝ : LawfulFunctor Finset := lawfulFunctor\nα✝ β✝ : Type ?u.13031\ns : Finset α✝\nt : Finset β✝\nht : Finset.Nonempty t\na : α✝\n⊢ a ∈ s ↔ ∃ v, v ∈ image (const β✝) s ∧ a ∈ image v t\n[PROOFSTEP]\nrefine' ⟨fun ha => ⟨const _ a, mem_image_of_mem _ ha, mem_image_const_self.2 ht⟩, _⟩\n[GOAL]\ncase inr.a\nα β : Type u\ninst✝ : (P : Prop) → Decidable P\nsrc✝ : LawfulFunctor Finset := lawfulFunctor\nα✝ β✝ : Type ?u.13031\ns : Finset α✝\nt : Finset β✝\nht : Finset.Nonempty t\na : α✝\n⊢ (∃ v, v ∈ image (const β✝) s ∧ a ∈ image v t) → a ∈ s\n[PROOFSTEP]\nrintro ⟨f, hf, ha⟩\n[GOAL]\ncase inr.a.intro.intro\nα β : Type u\ninst✝ : (P : Prop) → Decidable P\nsrc✝ : LawfulFunctor Finset := lawfulFunctor\nα✝ β✝ : Type ?u.13031\ns : Finset α✝\nt : Finset β✝\nht : Finset.Nonempty t\na : α✝\nf : β✝ → α✝\nhf : f ∈ image (const β✝) s\nha : a ∈ image f t\n⊢ a ∈ s\n[PROOFSTEP]\nrw [mem_image] at hf ha \n[GOAL]\ncase inr.a.intro.intro\nα β : Type u\ninst✝ : (P : Prop) → Decidable P\nsrc✝ : LawfulFunctor Finset := lawfulFunctor\nα✝ β✝ : Type ?u.13031\ns : Finset α✝\nt : Finset β✝\nht : Finset.Nonempty t\na : α✝\nf : β✝ → α✝\nhf : ∃ a, a ∈ s ∧ const β✝ a = f\nha : ∃ a_1, a_1 ∈ t ∧ f a_1 = a\n⊢ a ∈ s\n[PROOFSTEP]\nobtain ⟨b, hb, rfl⟩ := hf\n[GOAL]\ncase inr.a.intro.intro.intro.intro\nα β : Type u\ninst✝ : (P : Prop) → Decidable P\nsrc✝ : LawfulFunctor Finset := lawfulFunctor\nα✝ β✝ : Type ?u.13031\ns : Finset α✝\nt : Finset β✝\nht : Finset.Nonempty t\na b : α✝\nhb : b ∈ s\nha : ∃ a_1, a_1 ∈ t ∧ const β✝ b a_1 = a\n⊢ a ∈ s\n[PROOFSTEP]\nobtain ⟨_, _, rfl⟩ := ha\n[GOAL]\ncase inr.a.intro.intro.intro.intro.intro.intro\nα β : Type u\ninst✝ : (P : Prop) → Decidable P\nsrc✝ : LawfulFunctor Finset := lawfulFunctor\nα✝ β✝ : Type ?u.13031\ns : Finset α✝\nt : Finset β✝\nht : Finset.Nonempty t\nb : α✝\nhb : b ∈ s\nw✝ : β✝\nleft✝ : w✝ ∈ t\n⊢ const β✝ b w✝ ∈ s\n[PROOFSTEP]\nexact hb\n[GOAL]\nα β : Type u\ninst✝ : (P : Prop) → Decidable P\nsrc✝ : LawfulFunctor Finset := lawfulFunctor\nα✝ β✝ : Type ?u.13031\ns : Finset α✝\nt : Finset β✝\n⊢ (SeqRight.seqRight s fun x => t) = Seq.seq (const α✝ id <$> s) fun x => t\n[PROOFSTEP]\nrw [seq_def, fmap_def, seqRight_def]\n[GOAL]\nα β : Type u\ninst✝ : (P : Prop) → Decidable P\nsrc✝ : LawfulFunctor Finset := lawfulFunctor\nα✝ β✝ : Type ?u.13031\ns : Finset α✝\nt : Finset β✝\n⊢ (if s = ∅ then ∅ else t) = sup (image (const α✝ id) s) fun f => image f t\n[PROOFSTEP]\nobtain rfl | hs := s.eq_empty_or_nonempty\n[GOAL]\ncase inl\nα β : Type u\ninst✝ : (P : Prop) → Decidable P\nsrc✝ : LawfulFunctor Finset := lawfulFunctor\nα✝ β✝ : Type ?u.13031\nt : Finset β✝\n⊢ (if ∅ = ∅ then ∅ else t) = sup (image (const α✝ id) ∅) fun f => image f t\n[PROOFSTEP]\nrw [if_pos rfl, image_empty, sup_empty, bot_eq_empty]\n[GOAL]\ncase inr\nα β : Type u\ninst✝ : (P : Prop) → Decidable P\nsrc✝ : LawfulFunctor Finset := lawfulFunctor\nα✝ β✝ : Type ?u.13031\ns : Finset α✝\nt : Finset β✝\nhs : Finset.Nonempty s\n⊢ (if s = ∅ then ∅ else t) = sup (image (const α✝ id) s) fun f => image f t\n[PROOFSTEP]\next a\n[GOAL]\ncase inr.a\nα β : Type u\ninst✝ : (P : Prop) → Decidable P\nsrc✝ : LawfulFunctor Finset := lawfulFunctor\nα✝ β✝ : Type ?u.13031\ns : Finset α✝\nt : Finset β✝\nhs : Finset.Nonempty s\na : β✝\n⊢ (a ∈ if s = ∅ then ∅ else t) ↔ a ∈ sup (image (const α✝ id) s) fun f => image f t\n[PROOFSTEP]\nrw [if_neg hs.ne_empty, mem_sup]\n[GOAL]\ncase inr.a\nα β : Type u\ninst✝ : (P : Prop) → Decidable P\nsrc✝ : LawfulFunctor Finset := lawfulFunctor\nα✝ β✝ : Type ?u.13031\ns : Finset α✝\nt : Finset β✝\nhs : Finset.Nonempty s\na : β✝\n⊢ a ∈ t ↔ ∃ v, v ∈ image (const α✝ id) s ∧ a ∈ image v t\n[PROOFSTEP]\nrefine' ⟨fun ha => ⟨id, mem_image_const_self.2 hs, by rwa [image_id]⟩, _⟩\n[GOAL]\nα β : Type u\ninst✝ : (P : Prop) → Decidable P\nsrc✝ : LawfulFunctor Finset := lawfulFunctor\nα✝ β✝ : Type ?u.13031\ns : Finset α✝\nt : Finset β✝\nhs : Finset.Nonempty s\na : β✝\nha : a ∈ t\n⊢ a ∈ image id t\n[PROOFSTEP]\nrwa [image_id]\n[GOAL]\ncase inr.a\nα β : Type u\ninst✝ : (P : Prop) → Decidable P\nsrc✝ : LawfulFunctor Finset := lawfulFunctor\nα✝ β✝ : Type ?u.13031\ns : Finset α✝\nt : Finset β✝\nhs : Finset.Nonempty s\na : β✝\n⊢ (∃ v, v ∈ image (const α✝ id) s ∧ a ∈ image v t) → a ∈ t\n[PROOFSTEP]\nrintro ⟨f, hf, ha⟩\n[GOAL]\ncase inr.a.intro.intro\nα β : Type u\ninst✝ : (P : Prop) → Decidable P\nsrc✝ : LawfulFunctor Finset := lawfulFunctor\nα✝ β✝ : Type ?u.13031\ns : Finset α✝\nt : Finset β✝\nhs : Finset.Nonempty s\na : β✝\nf : β✝ → β✝\nhf : f ∈ image (const α✝ id) s\nha : a ∈ image f t\n⊢ a ∈ t\n[PROOFSTEP]\nrw [mem_image] at hf ha \n[GOAL]\ncase inr.a.intro.intro\nα β : Type u\ninst✝ : (P : Prop) → Decidable P\nsrc✝ : LawfulFunctor Finset := lawfulFunctor\nα✝ β✝ : Type ?u.13031\ns : Finset α✝\nt : Finset β✝\nhs : Finset.Nonempty s\na : β✝\nf : β✝ → β✝\nhf : ∃ a, a ∈ s ∧ const α✝ id a = f\nha : ∃ a_1, a_1 ∈ t ∧ f a_1 = a\n⊢ a ∈ t\n[PROOFSTEP]\nobtain ⟨b, hb, rfl⟩ := ha\n[GOAL]\ncase inr.a.intro.intro.intro.intro\nα β : Type u\ninst✝ : (P : Prop) → Decidable P\nsrc✝ : LawfulFunctor Finset := lawfulFunctor\nα✝ β✝ : Type ?u.13031\ns : Finset α✝\nt : Finset β✝\nhs : Finset.Nonempty s\nf : β✝ → β✝\nhf : ∃ a, a ∈ s ∧ const α✝ id a = f\nb : β✝\nhb : b ∈ t\n⊢ f b ∈ t\n[PROOFSTEP]\nobtain ⟨_, _, rfl⟩ := hf\n[GOAL]\ncase inr.a.intro.intro.intro.intro.intro.intro\nα β : Type u\ninst✝ : (P : Prop) → Decidable P\nsrc✝ : LawfulFunctor Finset := lawfulFunctor\nα✝ β✝ : Type ?u.13031\ns : Finset α✝\nt : Finset β✝\nhs : Finset.Nonempty s\nb : β✝\nhb : b ∈ t\nw✝ : α✝\nleft✝ : w✝ ∈ s\n⊢ const α✝ id w✝ b ∈ t\n[PROOFSTEP]\nexact hb\n[GOAL]\nα β : Type u\ninst✝ : (P : Prop) → Decidable P\nsrc✝ : LawfulFunctor Finset := lawfulFunctor\nα✝ β✝ : Type ?u.13031\nf : α✝ → β✝\ns : Finset α✝\n⊢ (Seq.seq (pure f) fun x => s) = f <$> s\n[PROOFSTEP]\nsimp only [pure_def, seq_def, sup_singleton, fmap_def]\n[GOAL]\nα β : Type u\ninst✝ : (P : Prop) → Decidable P\nsrc✝ : LawfulFunctor Finset := lawfulFunctor\nα✝ β✝ γ✝ : Type ?u.13031\ns : Finset α✝\nt : Finset (α✝ → β✝)\nu : Finset (β✝ → γ✝)\n⊢ (Seq.seq u fun x => Seq.seq t fun x => s) = Seq.seq (Seq.seq (comp <$> u) fun x => t) fun x => s\n[PROOFSTEP]\next a\n[GOAL]\ncase a\nα β : Type u\ninst✝ : (P : Prop) → Decidable P\nsrc✝ : LawfulFunctor Finset := lawfulFunctor\nα✝ β✝ γ✝ : Type ?u.13031\ns : Finset α✝\nt : Finset (α✝ → β✝)\nu : Finset (β✝ → γ✝)\na : γ✝\n⊢ (a ∈ Seq.seq u fun x => Seq.seq t fun x => s) ↔ a ∈ Seq.seq (Seq.seq (comp <$> u) fun x => t) fun x => s\n[PROOFSTEP]\nsimp_rw [seq_def, fmap_def]\n[GOAL]\ncase a\nα β : Type u\ninst✝ : (P : Prop) → Decidable P\nsrc✝ : LawfulFunctor Finset := lawfulFunctor\nα✝ β✝ γ✝ : Type ?u.13031\ns : Finset α✝\nt : Finset (α✝ → β✝)\nu : Finset (β✝ → γ✝)\na : γ✝\n⊢ (a ∈ sup u fun f => image f (sup t fun f => image f s)) ↔\n a ∈ sup (sup (image comp u) fun f => image f t) fun f => image f s\n[PROOFSTEP]\nsimp only [exists_prop, mem_sup, mem_image]\n[GOAL]\ncase a\nα β : Type u\ninst✝ : (P : Prop) → Decidable P\nsrc✝ : LawfulFunctor Finset := lawfulFunctor\nα✝ β✝ γ✝ : Type ?u.13031\ns : Finset α✝\nt : Finset (α✝ → β✝)\nu : Finset (β✝ → γ✝)\na : γ✝\n⊢ (∃ v, v ∈ u ∧ ∃ a_1, (∃ v, v ∈ t ∧ ∃ a, a ∈ s ∧ v a = a_1) ∧ v a_1 = a) ↔\n ∃ v, (∃ v_1, (∃ a, a ∈ u ∧ comp a = v_1) ∧ ∃ a, a ∈ t ∧ v_1 a = v) ∧ ∃ a_1, a_1 ∈ s ∧ v a_1 = a\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase a.mp\nα β : Type u\ninst✝ : (P : Prop) → Decidable P\nsrc✝ : LawfulFunctor Finset := lawfulFunctor\nα✝ β✝ γ✝ : Type ?u.13031\ns : Finset α✝\nt : Finset (α✝ → β✝)\nu : Finset (β✝ → γ✝)\na : γ✝\n⊢ (∃ v, v ∈ u ∧ ∃ a_1, (∃ v, v ∈ t ∧ ∃ a, a ∈ s ∧ v a = a_1) ∧ v a_1 = a) →\n ∃ v, (∃ v_1, (∃ a, a ∈ u ∧ comp a = v_1) ∧ ∃ a, a ∈ t ∧ v_1 a = v) ∧ ∃ a_2, a_2 ∈ s ∧ v a_2 = a\n[PROOFSTEP]\nrintro ⟨g, hg, b, ⟨f, hf, a, ha, rfl⟩, rfl⟩\n[GOAL]\ncase a.mp.intro.intro.intro.intro.intro.intro.intro.intro\nα β : Type u\ninst✝ : (P : Prop) → Decidable P\nsrc✝ : LawfulFunctor Finset := lawfulFunctor\nα✝ β✝ γ✝ : Type ?u.13031\ns : Finset α✝\nt : Finset (α✝ → β✝)\nu : Finset (β✝ → γ✝)\ng : β✝ → γ✝\nhg : g ∈ u\nf : α✝ → β✝\nhf : f ∈ t\na : α✝\nha : a ∈ s\n⊢ ∃ v, (∃ v_1, (∃ a, a ∈ u ∧ comp a = v_1) ∧ ∃ a, a ∈ t ∧ v_1 a = v) ∧ ∃ a_1, a_1 ∈ s ∧ v a_1 = g (f a)\n[PROOFSTEP]\nexact ⟨g ∘ f, ⟨comp g, ⟨g, hg, rfl⟩, f, hf, rfl⟩, a, ha, rfl⟩\n[GOAL]\ncase a.mpr\nα β : Type u\ninst✝ : (P : Prop) → Decidable P\nsrc✝ : LawfulFunctor Finset := lawfulFunctor\nα✝ β✝ γ✝ : Type ?u.13031\ns : Finset α✝\nt : Finset (α✝ → β✝)\nu : Finset (β✝ → γ✝)\na : γ✝\n⊢ (∃ v, (∃ v_1, (∃ a, a ∈ u ∧ comp a = v_1) ∧ ∃ a, a ∈ t ∧ v_1 a = v) ∧ ∃ a_1, a_1 ∈ s ∧ v a_1 = a) →\n ∃ v, v ∈ u ∧ ∃ a_2, (∃ v, v ∈ t ∧ ∃ a, a ∈ s ∧ v a = a_2) ∧ v a_2 = a\n[PROOFSTEP]\nrintro ⟨c, ⟨_, ⟨g, hg, rfl⟩, f, hf, rfl⟩, a, ha, rfl⟩\n[GOAL]\ncase a.mpr.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα β : Type u\ninst✝ : (P : Prop) → Decidable P\nsrc✝ : LawfulFunctor Finset := lawfulFunctor\nα✝ β✝ γ✝ : Type ?u.13031\ns : Finset α✝\nt : Finset (α✝ → β✝)\nu : Finset (β✝ → γ✝)\ng : β✝ → γ✝\nhg : g ∈ u\nf : α✝ → β✝\nhf : f ∈ t\na : α✝\nha : a ∈ s\n⊢ ∃ v, v ∈ u ∧ ∃ a_1, (∃ v, v ∈ t ∧ ∃ a, a ∈ s ∧ v a = a_1) ∧ v a_1 = (g ∘ f) a\n[PROOFSTEP]\nexact ⟨g, hg, f a, ⟨f, hf, a, ha, rfl⟩, rfl⟩\n[GOAL]\nα β : Type u\ninst✝ : (P : Prop) → Decidable P\nsrc✝ : LawfulApplicative Finset := lawfulApplicative\nα✝ β✝ : Type ?u.21428\ns : Finset α✝\nt : Finset β✝\n⊢ (Seq.seq (Prod.mk <$> s) fun x => t) = Seq.seq ((fun b a => (a, b)) <$> t) fun x => s\n[PROOFSTEP]\nsimp_rw [seq_def, fmap_def, sup_image, sup_eq_biUnion]\n[GOAL]\nα β : Type u\ninst✝ : (P : Prop) → Decidable P\nsrc✝ : LawfulApplicative Finset := lawfulApplicative\nα✝ β✝ : Type ?u.21428\ns : Finset α✝\nt : Finset β✝\n⊢ Finset.biUnion s ((fun f => image f t) ∘ Prod.mk) = Finset.biUnion t ((fun f => image f s) ∘ fun b a => (a, b))\n[PROOFSTEP]\nchange (s.biUnion fun a => t.image fun b => (a, b)) = t.biUnion fun b => s.image fun a => (a, b)\n[GOAL]\nα β : Type u\ninst✝ : (P : Prop) → Decidable P\nsrc✝ : LawfulApplicative Finset := lawfulApplicative\nα✝ β✝ : Type ?u.21428\ns : Finset α✝\nt : Finset β✝\n⊢ (Finset.biUnion s fun a => image (fun b => (a, b)) t) = Finset.biUnion t fun b => image (fun a => (a, b)) s\n[PROOFSTEP]\ntrans s ×ˢ t <;> [rw [product_eq_biUnion]; rw [product_eq_biUnion_right]]\n[GOAL]\nα β : Type u\ninst✝ : (P : Prop) → Decidable P\nsrc✝ : LawfulApplicative Finset := lawfulApplicative\nα✝ β✝ : Type ?u.21428\ns : Finset α✝\nt : Finset β✝\n⊢ (Finset.biUnion s fun a => image (fun b => (a, b)) t) = Finset.biUnion t fun b => image (fun a => (a, b)) s\n[PROOFSTEP]\ntrans s ×ˢ t\n[GOAL]\nα β : Type u\ninst✝ : (P : Prop) → Decidable P\nsrc✝ : LawfulApplicative Finset := lawfulApplicative\nα✝ β✝ : Type ?u.23242\ns : Finset α✝\nt : Finset β✝\n⊢ (Finset.biUnion s fun a => image (fun b => (a, b)) t) = s ×ˢ t\n[PROOFSTEP]\nrw [product_eq_biUnion]\n[GOAL]\nα β : Type u\ninst✝ : (P : Prop) → Decidable P\nsrc✝ : LawfulApplicative Finset := lawfulApplicative\nα✝ β✝ : Type ?u.23242\ns : Finset α✝\nt : Finset β✝\n⊢ s ×ˢ t = Finset.biUnion t fun b => image (fun a => (a, b)) s\n[PROOFSTEP]\nrw [product_eq_biUnion_right]\n[GOAL]\ninst✝ : (P : Prop) → Decidable P\nsrc✝ : LawfulApplicative Finset := lawfulApplicative\nα✝ β✝ γ✝ : Type ?u.24298\ns : Finset α✝\nf : α✝ → Finset β✝\ng : β✝ → Finset γ✝\n⊢ s >>= f >>= g = s >>= fun x => f x >>= g\n[PROOFSTEP]\nsimp only [bind, ← sup_biUnion, sup_eq_biUnion, biUnion_biUnion]\n[GOAL]\nα β γ : Type u\nF G : Type u → Type u\ninst✝⁴ : Applicative F\ninst✝³ : Applicative G\ninst✝² : CommApplicative F\ninst✝¹ : CommApplicative G\ninst✝ : DecidableEq α\ns : Finset α\n⊢ traverse pure s = s\n[PROOFSTEP]\nrw [traverse, Multiset.id_traverse]\n[GOAL]\nα β γ : Type u\nF G : Type u → Type u\ninst✝⁴ : Applicative F\ninst✝³ : Applicative G\ninst✝² : CommApplicative F\ninst✝¹ : CommApplicative G\ninst✝ : DecidableEq α\ns : Finset α\n⊢ Multiset.toFinset <$> s.val = s\n[PROOFSTEP]\nexact s.val_toFinset\n[GOAL]\nα β γ : Type u\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : CommApplicative F\ninst✝ : CommApplicative G\ng : α → G β\nh : β → γ\ns : Finset α\n⊢ Functor.map h <$> traverse g s = traverse (Functor.map h ∘ g) s\n[PROOFSTEP]\nunfold traverse\n[GOAL]\nα β γ : Type u\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : CommApplicative F\ninst✝ : CommApplicative G\ng : α → G β\nh : β → γ\ns : Finset α\n⊢ Functor.map h <$> Multiset.toFinset <$> Multiset.traverse g s.val =\n Multiset.toFinset <$> Multiset.traverse (Functor.map h ∘ g) s.val\n[PROOFSTEP]\nsimp only [map_comp_coe, functor_norm]\n[GOAL]\nα β γ : Type u\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : CommApplicative F\ninst✝ : CommApplicative G\ng : α → G β\nh : β → γ\ns : Finset α\n⊢ (Multiset.toFinset ∘ Functor.map h) <$> Multiset.traverse g s.val =\n Multiset.toFinset <$> Multiset.traverse (Functor.map h ∘ g) s.val\n[PROOFSTEP]\nrw [LawfulFunctor.comp_map, Multiset.map_traverse]\n", "meta": {"mathlib_filename": "Mathlib.Data.Finset.Functor", "llama_tokens": 8140, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO", "lm_q1_score": 0.42632159254749036, "lm_q2_score": 0.032589744766025344, "lm_q1q2_score": 0.013893711889368164}} {"text": "[GOAL]\nα : Type u_1\ninst✝² : CommRing α\ninst✝¹ : IsDomain α\ninst✝ : IsNoetherianRing α\n⊢ WellFounded DvdNotUnit\n[PROOFSTEP]\nconvert InvImage.wf (fun a => Ideal.span ({ a } : Set α)) (wellFounded_submodule_gt _ _)\n[GOAL]\ncase h.e'_2\nα : Type u_1\ninst✝² : CommRing α\ninst✝¹ : IsDomain α\ninst✝ : IsNoetherianRing α\n⊢ DvdNotUnit = InvImage (fun x x_1 => x > x_1) fun a => Ideal.span {a}\n[PROOFSTEP]\next\n[GOAL]\ncase h.e'_2.h.h.a\nα : Type u_1\ninst✝² : CommRing α\ninst✝¹ : IsDomain α\ninst✝ : IsNoetherianRing α\nx✝¹ x✝ : α\n⊢ DvdNotUnit x✝¹ x✝ ↔ InvImage (fun x x_1 => x > x_1) (fun a => Ideal.span {a}) x✝¹ x✝\n[PROOFSTEP]\nexact Ideal.span_singleton_lt_span_singleton.symm\n[GOAL]\nα : Type u_1\ninst✝ : CommMonoidWithZero α\nh : WfDvdMonoid (Associates α)\n⊢ WellFounded DvdNotUnit\n[PROOFSTEP]\nrefine' (Surjective.wellFounded_iff mk_surjective _).2 wellFounded_dvdNotUnit\n[GOAL]\nα : Type u_1\ninst✝ : CommMonoidWithZero α\nh : WfDvdMonoid (Associates α)\n⊢ ∀ {a b : α}, DvdNotUnit a b ↔ DvdNotUnit (Associates.mk a) (Associates.mk b)\n[PROOFSTEP]\nintros\n[GOAL]\nα : Type u_1\ninst✝ : CommMonoidWithZero α\nh : WfDvdMonoid (Associates α)\na✝ b✝ : α\n⊢ DvdNotUnit a✝ b✝ ↔ DvdNotUnit (Associates.mk a✝) (Associates.mk b✝)\n[PROOFSTEP]\nrw [mk_dvdNotUnit_mk_iff]\n[GOAL]\nα : Type u_1\ninst✝¹ : CommMonoidWithZero α\ninst✝ : WfDvdMonoid α\n⊢ WellFounded DvdNotUnit\n[PROOFSTEP]\nrefine' (Surjective.wellFounded_iff mk_surjective _).1 wellFounded_dvdNotUnit\n[GOAL]\nα : Type u_1\ninst✝¹ : CommMonoidWithZero α\ninst✝ : WfDvdMonoid α\n⊢ ∀ {a b : α}, DvdNotUnit a b ↔ DvdNotUnit (Associates.mk a) (Associates.mk b)\n[PROOFSTEP]\nintros\n[GOAL]\nα : Type u_1\ninst✝¹ : CommMonoidWithZero α\ninst✝ : WfDvdMonoid α\na✝ b✝ : α\n⊢ DvdNotUnit a✝ b✝ ↔ DvdNotUnit (Associates.mk a✝) (Associates.mk b✝)\n[PROOFSTEP]\nrw [mk_dvdNotUnit_mk_iff]\n[GOAL]\nα : Type u_1\ninst✝¹ : CommMonoidWithZero α\ninst✝ : WfDvdMonoid α\na✝ a i : α\nha0 : a ≠ 0\nhi : Irreducible i\nih : a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Irreducible b) ∧ Multiset.prod f ~ᵤ a\nx✝ : i * a ≠ 0\ns : Multiset α\nhs : (∀ (b : α), b ∈ s → Irreducible b) ∧ Multiset.prod s ~ᵤ a\n⊢ Multiset.prod (i ::ₘ s) ~ᵤ i * a\n[PROOFSTEP]\nrw [s.prod_cons i]\n[GOAL]\nα : Type u_1\ninst✝¹ : CommMonoidWithZero α\ninst✝ : WfDvdMonoid α\na✝ a i : α\nha0 : a ≠ 0\nhi : Irreducible i\nih : a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Irreducible b) ∧ Multiset.prod f ~ᵤ a\nx✝ : i * a ≠ 0\ns : Multiset α\nhs : (∀ (b : α), b ∈ s → Irreducible b) ∧ Multiset.prod s ~ᵤ a\n⊢ i * Multiset.prod s ~ᵤ i * a\n[PROOFSTEP]\nexact hs.2.mul_left i\n[GOAL]\nα : Type u_1\ninst✝¹ : CommMonoidWithZero α\ninst✝ : WfDvdMonoid α\na : α\nhn0 : a ≠ 0\nhnu : ¬IsUnit a\n⊢ ∃ f, (∀ (b : α), b ∈ f → Irreducible b) ∧ Multiset.prod f = a ∧ f ≠ ∅\n[PROOFSTEP]\nobtain ⟨f, hi, u, rfl⟩ := exists_factors a hn0\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\ninst✝¹ : CommMonoidWithZero α\ninst✝ : WfDvdMonoid α\nf : Multiset α\nhi : ∀ (b : α), b ∈ f → Irreducible b\nu : αˣ\nhn0 : Multiset.prod f * ↑u ≠ 0\nhnu : ¬IsUnit (Multiset.prod f * ↑u)\n⊢ ∃ f_1, (∀ (b : α), b ∈ f_1 → Irreducible b) ∧ Multiset.prod f_1 = Multiset.prod f * ↑u ∧ f_1 ≠ ∅\n[PROOFSTEP]\nobtain ⟨b, h⟩ := Multiset.exists_mem_of_ne_zero fun h : f = 0 => hnu <| by simp [h]\n[GOAL]\nα : Type u_1\ninst✝¹ : CommMonoidWithZero α\ninst✝ : WfDvdMonoid α\nf : Multiset α\nhi : ∀ (b : α), b ∈ f → Irreducible b\nu : αˣ\nhn0 : Multiset.prod f * ↑u ≠ 0\nhnu : ¬IsUnit (Multiset.prod f * ↑u)\nh : f = 0\n⊢ IsUnit (Multiset.prod f * ↑u)\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\ninst✝¹ : CommMonoidWithZero α\ninst✝ : WfDvdMonoid α\nf : Multiset α\nhi : ∀ (b : α), b ∈ f → Irreducible b\nu : αˣ\nhn0 : Multiset.prod f * ↑u ≠ 0\nhnu : ¬IsUnit (Multiset.prod f * ↑u)\nb : α\nh : b ∈ f\n⊢ ∃ f_1, (∀ (b : α), b ∈ f_1 → Irreducible b) ∧ Multiset.prod f_1 = Multiset.prod f * ↑u ∧ f_1 ≠ ∅\n[PROOFSTEP]\nclassical\nrefine' ⟨(f.erase b).cons (b * u), fun a ha => _, _, Multiset.cons_ne_zero⟩\n· obtain rfl | ha := Multiset.mem_cons.1 ha\n exacts [Associated.irreducible ⟨u, rfl⟩ (hi b h), hi a (Multiset.mem_of_mem_erase ha)]\n· rw [Multiset.prod_cons, mul_comm b, mul_assoc, Multiset.prod_erase h, mul_comm]\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\ninst✝¹ : CommMonoidWithZero α\ninst✝ : WfDvdMonoid α\nf : Multiset α\nhi : ∀ (b : α), b ∈ f → Irreducible b\nu : αˣ\nhn0 : Multiset.prod f * ↑u ≠ 0\nhnu : ¬IsUnit (Multiset.prod f * ↑u)\nb : α\nh : b ∈ f\n⊢ ∃ f_1, (∀ (b : α), b ∈ f_1 → Irreducible b) ∧ Multiset.prod f_1 = Multiset.prod f * ↑u ∧ f_1 ≠ ∅\n[PROOFSTEP]\nrefine' ⟨(f.erase b).cons (b * u), fun a ha => _, _, Multiset.cons_ne_zero⟩\n[GOAL]\ncase intro.intro.intro.intro.refine'_1\nα : Type u_1\ninst✝¹ : CommMonoidWithZero α\ninst✝ : WfDvdMonoid α\nf : Multiset α\nhi : ∀ (b : α), b ∈ f → Irreducible b\nu : αˣ\nhn0 : Multiset.prod f * ↑u ≠ 0\nhnu : ¬IsUnit (Multiset.prod f * ↑u)\nb : α\nh : b ∈ f\na : α\nha : a ∈ b * ↑u ::ₘ Multiset.erase f b\n⊢ Irreducible a\n[PROOFSTEP]\nobtain rfl | ha := Multiset.mem_cons.1 ha\n[GOAL]\ncase intro.intro.intro.intro.refine'_1.inl\nα : Type u_1\ninst✝¹ : CommMonoidWithZero α\ninst✝ : WfDvdMonoid α\nf : Multiset α\nhi : ∀ (b : α), b ∈ f → Irreducible b\nu : αˣ\nhn0 : Multiset.prod f * ↑u ≠ 0\nhnu : ¬IsUnit (Multiset.prod f * ↑u)\nb : α\nh : b ∈ f\nha : b * ↑u ∈ b * ↑u ::ₘ Multiset.erase f b\n⊢ Irreducible (b * ↑u)\ncase intro.intro.intro.intro.refine'_1.inr\nα : Type u_1\ninst✝¹ : CommMonoidWithZero α\ninst✝ : WfDvdMonoid α\nf : Multiset α\nhi : ∀ (b : α), b ∈ f → Irreducible b\nu : αˣ\nhn0 : Multiset.prod f * ↑u ≠ 0\nhnu : ¬IsUnit (Multiset.prod f * ↑u)\nb : α\nh : b ∈ f\na : α\nha✝ : a ∈ b * ↑u ::ₘ Multiset.erase f b\nha : a ∈ Multiset.erase f b\n⊢ Irreducible a\n[PROOFSTEP]\nexacts [Associated.irreducible ⟨u, rfl⟩ (hi b h), hi a (Multiset.mem_of_mem_erase ha)]\n[GOAL]\ncase intro.intro.intro.intro.refine'_2\nα : Type u_1\ninst✝¹ : CommMonoidWithZero α\ninst✝ : WfDvdMonoid α\nf : Multiset α\nhi : ∀ (b : α), b ∈ f → Irreducible b\nu : αˣ\nhn0 : Multiset.prod f * ↑u ≠ 0\nhnu : ¬IsUnit (Multiset.prod f * ↑u)\nb : α\nh : b ∈ f\n⊢ Multiset.prod (b * ↑u ::ₘ Multiset.erase f b) = Multiset.prod f * ↑u\n[PROOFSTEP]\nrw [Multiset.prod_cons, mul_comm b, mul_assoc, Multiset.prod_erase h, mul_comm]\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\nh : WellFounded fun x x_1 => x < x_1\n⊢ WellFounded DvdNotUnit\n[PROOFSTEP]\nconvert h\n[GOAL]\ncase h.e'_2.h.h.h.e\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\nh : WellFounded fun x x_1 => x < x_1\nx✝¹ x✝ : Associates α\n⊢ DvdNotUnit = LT.lt\n[PROOFSTEP]\next\n[GOAL]\ncase h.e'_2.h.h.h.e.h.h.a\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\nh : WellFounded fun x x_1 => x < x_1\nx✝³ x✝² x✝¹ x✝ : Associates α\n⊢ DvdNotUnit x✝¹ x✝ ↔ x✝¹ < x✝\n[PROOFSTEP]\nexact Associates.dvdNotUnit_iff_lt\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\n⊢ WfDvdMonoid α → WellFounded fun x x_1 => x < x_1\n[PROOFSTEP]\napply WfDvdMonoid.wellFounded_associates\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ninst✝ : UniqueFactorizationMonoid α\nsrc✝ : WfDvdMonoid (Associates α) := WfDvdMonoid.wfDvdMonoid_associates\n⊢ ∀ {a : Associates α}, Irreducible a ↔ Prime a\n[PROOFSTEP]\nrw [← Associates.irreducible_iff_prime_iff]\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ninst✝ : UniqueFactorizationMonoid α\nsrc✝ : WfDvdMonoid (Associates α) := WfDvdMonoid.wfDvdMonoid_associates\n⊢ ∀ (a : α), Irreducible a ↔ Prime a\n[PROOFSTEP]\napply UniqueFactorizationMonoid.irreducible_iff_prime\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ninst✝ : UniqueFactorizationMonoid α\na : α\n⊢ a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\n[PROOFSTEP]\nsimp_rw [← UniqueFactorizationMonoid.irreducible_iff_prime]\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ninst✝ : UniqueFactorizationMonoid α\na : α\n⊢ a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Irreducible b) ∧ Multiset.prod f ~ᵤ a\n[PROOFSTEP]\napply WfDvdMonoid.exists_factors a\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ninst✝ : UniqueFactorizationMonoid α\nP : α → Prop\na : α\nh₁ : P 0\nh₂ : ∀ (x : α), IsUnit x → P x\nh₃ : ∀ (a p : α), a ≠ 0 → Prime p → P a → P (p * a)\n⊢ P a\n[PROOFSTEP]\nsimp_rw [← UniqueFactorizationMonoid.irreducible_iff_prime] at h₃ \n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ninst✝ : UniqueFactorizationMonoid α\nP : α → Prop\na : α\nh₁ : P 0\nh₂ : ∀ (x : α), IsUnit x → P x\nh₃ : ∀ (a p : α), a ≠ 0 → Irreducible p → P a → P (p * a)\n⊢ P a\n[PROOFSTEP]\nexact WfDvdMonoid.induction_on_irreducible a h₁ h₂ h₃\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\n⊢ ∀ {f g : Multiset α},\n (∀ (x : α), x ∈ f → Prime x) →\n (∀ (x : α), x ∈ g → Prime x) → Multiset.prod f ~ᵤ Multiset.prod g → Multiset.Rel Associated f g\n[PROOFSTEP]\nclassical\nintro f\ninduction' f using Multiset.induction_on with p f ih\n· intros g _ hg h\n exact\n Multiset.rel_zero_left.2 <|\n Multiset.eq_zero_of_forall_not_mem fun x hx =>\n have : IsUnit g.prod := by simpa [associated_one_iff_isUnit] using h.symm\n (hg x hx).not_unit <| isUnit_iff_dvd_one.2 <| (Multiset.dvd_prod hx).trans (isUnit_iff_dvd_one.1 this)\n· intros g hf hg hfg\n let ⟨b, hbg, hb⟩ :=\n (exists_associated_mem_of_dvd_prod (hf p (by simp)) fun q hq => hg _ hq) <|\n hfg.dvd_iff_dvd_right.1 (show p ∣ (p ::ₘ f).prod by simp)\n haveI := Classical.decEq α\n rw [← Multiset.cons_erase hbg]\n exact\n Multiset.Rel.cons hb\n (ih (fun q hq => hf _ (by simp [hq])) (fun {q} (hq : q ∈ g.erase b) => hg q (Multiset.mem_of_mem_erase hq))\n (Associated.of_mul_left (by rwa [← Multiset.prod_cons, ← Multiset.prod_cons, Multiset.cons_erase hbg]) hb\n (hf p (by simp)).ne_zero))\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\n⊢ ∀ {f g : Multiset α},\n (∀ (x : α), x ∈ f → Prime x) →\n (∀ (x : α), x ∈ g → Prime x) → Multiset.prod f ~ᵤ Multiset.prod g → Multiset.Rel Associated f g\n[PROOFSTEP]\nintro f\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\nf : Multiset α\n⊢ ∀ {g : Multiset α},\n (∀ (x : α), x ∈ f → Prime x) →\n (∀ (x : α), x ∈ g → Prime x) → Multiset.prod f ~ᵤ Multiset.prod g → Multiset.Rel Associated f g\n[PROOFSTEP]\ninduction' f using Multiset.induction_on with p f ih\n[GOAL]\ncase empty\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\n⊢ ∀ {g : Multiset α},\n (∀ (x : α), x ∈ 0 → Prime x) →\n (∀ (x : α), x ∈ g → Prime x) → Multiset.prod 0 ~ᵤ Multiset.prod g → Multiset.Rel Associated 0 g\n[PROOFSTEP]\nintros g _ hg h\n[GOAL]\ncase empty\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\ng : Multiset α\na✝ : ∀ (x : α), x ∈ 0 → Prime x\nhg : ∀ (x : α), x ∈ g → Prime x\nh : Multiset.prod 0 ~ᵤ Multiset.prod g\n⊢ Multiset.Rel Associated 0 g\n[PROOFSTEP]\nexact\n Multiset.rel_zero_left.2 <|\n Multiset.eq_zero_of_forall_not_mem fun x hx =>\n have : IsUnit g.prod := by simpa [associated_one_iff_isUnit] using h.symm\n (hg x hx).not_unit <| isUnit_iff_dvd_one.2 <| (Multiset.dvd_prod hx).trans (isUnit_iff_dvd_one.1 this)\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\ng : Multiset α\na✝ : ∀ (x : α), x ∈ 0 → Prime x\nhg : ∀ (x : α), x ∈ g → Prime x\nh : Multiset.prod 0 ~ᵤ Multiset.prod g\nx : α\nhx : x ∈ g\n⊢ IsUnit (Multiset.prod g)\n[PROOFSTEP]\nsimpa [associated_one_iff_isUnit] using h.symm\n[GOAL]\ncase cons\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\np : α\nf : Multiset α\nih :\n ∀ {g : Multiset α},\n (∀ (x : α), x ∈ f → Prime x) →\n (∀ (x : α), x ∈ g → Prime x) → Multiset.prod f ~ᵤ Multiset.prod g → Multiset.Rel Associated f g\n⊢ ∀ {g : Multiset α},\n (∀ (x : α), x ∈ p ::ₘ f → Prime x) →\n (∀ (x : α), x ∈ g → Prime x) → Multiset.prod (p ::ₘ f) ~ᵤ Multiset.prod g → Multiset.Rel Associated (p ::ₘ f) g\n[PROOFSTEP]\nintros g hf hg hfg\n[GOAL]\ncase cons\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\np : α\nf : Multiset α\nih :\n ∀ {g : Multiset α},\n (∀ (x : α), x ∈ f → Prime x) →\n (∀ (x : α), x ∈ g → Prime x) → Multiset.prod f ~ᵤ Multiset.prod g → Multiset.Rel Associated f g\ng : Multiset α\nhf : ∀ (x : α), x ∈ p ::ₘ f → Prime x\nhg : ∀ (x : α), x ∈ g → Prime x\nhfg : Multiset.prod (p ::ₘ f) ~ᵤ Multiset.prod g\n⊢ Multiset.Rel Associated (p ::ₘ f) g\n[PROOFSTEP]\nlet ⟨b, hbg, hb⟩ :=\n (exists_associated_mem_of_dvd_prod (hf p (by simp)) fun q hq => hg _ hq) <|\n hfg.dvd_iff_dvd_right.1 (show p ∣ (p ::ₘ f).prod by simp)\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\np : α\nf : Multiset α\nih :\n ∀ {g : Multiset α},\n (∀ (x : α), x ∈ f → Prime x) →\n (∀ (x : α), x ∈ g → Prime x) → Multiset.prod f ~ᵤ Multiset.prod g → Multiset.Rel Associated f g\ng : Multiset α\nhf : ∀ (x : α), x ∈ p ::ₘ f → Prime x\nhg : ∀ (x : α), x ∈ g → Prime x\nhfg : Multiset.prod (p ::ₘ f) ~ᵤ Multiset.prod g\n⊢ p ∈ p ::ₘ f\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\np : α\nf : Multiset α\nih :\n ∀ {g : Multiset α},\n (∀ (x : α), x ∈ f → Prime x) →\n (∀ (x : α), x ∈ g → Prime x) → Multiset.prod f ~ᵤ Multiset.prod g → Multiset.Rel Associated f g\ng : Multiset α\nhf : ∀ (x : α), x ∈ p ::ₘ f → Prime x\nhg : ∀ (x : α), x ∈ g → Prime x\nhfg : Multiset.prod (p ::ₘ f) ~ᵤ Multiset.prod g\n⊢ p ∣ Multiset.prod (p ::ₘ f)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\np : α\nf : Multiset α\nih :\n ∀ {g : Multiset α},\n (∀ (x : α), x ∈ f → Prime x) →\n (∀ (x : α), x ∈ g → Prime x) → Multiset.prod f ~ᵤ Multiset.prod g → Multiset.Rel Associated f g\ng : Multiset α\nhf : ∀ (x : α), x ∈ p ::ₘ f → Prime x\nhg : ∀ (x : α), x ∈ g → Prime x\nhfg : Multiset.prod (p ::ₘ f) ~ᵤ Multiset.prod g\nb : α\nhbg : b ∈ g\nhb : p ~ᵤ b\n⊢ Multiset.Rel Associated (p ::ₘ f) g\n[PROOFSTEP]\nhaveI := Classical.decEq α\n[GOAL]\ncase cons\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\np : α\nf : Multiset α\nih :\n ∀ {g : Multiset α},\n (∀ (x : α), x ∈ f → Prime x) →\n (∀ (x : α), x ∈ g → Prime x) → Multiset.prod f ~ᵤ Multiset.prod g → Multiset.Rel Associated f g\ng : Multiset α\nhf : ∀ (x : α), x ∈ p ::ₘ f → Prime x\nhg : ∀ (x : α), x ∈ g → Prime x\nhfg : Multiset.prod (p ::ₘ f) ~ᵤ Multiset.prod g\nb : α\nhbg : b ∈ g\nhb : p ~ᵤ b\nthis : DecidableEq α\n⊢ Multiset.Rel Associated (p ::ₘ f) g\n[PROOFSTEP]\nrw [← Multiset.cons_erase hbg]\n[GOAL]\ncase cons\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\np : α\nf : Multiset α\nih :\n ∀ {g : Multiset α},\n (∀ (x : α), x ∈ f → Prime x) →\n (∀ (x : α), x ∈ g → Prime x) → Multiset.prod f ~ᵤ Multiset.prod g → Multiset.Rel Associated f g\ng : Multiset α\nhf : ∀ (x : α), x ∈ p ::ₘ f → Prime x\nhg : ∀ (x : α), x ∈ g → Prime x\nhfg : Multiset.prod (p ::ₘ f) ~ᵤ Multiset.prod g\nb : α\nhbg : b ∈ g\nhb : p ~ᵤ b\nthis : DecidableEq α\n⊢ Multiset.Rel Associated (p ::ₘ f) (b ::ₘ Multiset.erase g b)\n[PROOFSTEP]\nexact\n Multiset.Rel.cons hb\n (ih (fun q hq => hf _ (by simp [hq])) (fun {q} (hq : q ∈ g.erase b) => hg q (Multiset.mem_of_mem_erase hq))\n (Associated.of_mul_left (by rwa [← Multiset.prod_cons, ← Multiset.prod_cons, Multiset.cons_erase hbg]) hb\n (hf p (by simp)).ne_zero))\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\np : α\nf : Multiset α\nih :\n ∀ {g : Multiset α},\n (∀ (x : α), x ∈ f → Prime x) →\n (∀ (x : α), x ∈ g → Prime x) → Multiset.prod f ~ᵤ Multiset.prod g → Multiset.Rel Associated f g\ng : Multiset α\nhf : ∀ (x : α), x ∈ p ::ₘ f → Prime x\nhg : ∀ (x : α), x ∈ g → Prime x\nhfg : Multiset.prod (p ::ₘ f) ~ᵤ Multiset.prod g\nb : α\nhbg : b ∈ g\nhb : p ~ᵤ b\nthis : DecidableEq α\nq : α\nhq : q ∈ f\n⊢ q ∈ p ::ₘ f\n[PROOFSTEP]\nsimp [hq]\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\np : α\nf : Multiset α\nih :\n ∀ {g : Multiset α},\n (∀ (x : α), x ∈ f → Prime x) →\n (∀ (x : α), x ∈ g → Prime x) → Multiset.prod f ~ᵤ Multiset.prod g → Multiset.Rel Associated f g\ng : Multiset α\nhf : ∀ (x : α), x ∈ p ::ₘ f → Prime x\nhg : ∀ (x : α), x ∈ g → Prime x\nhfg : Multiset.prod (p ::ₘ f) ~ᵤ Multiset.prod g\nb : α\nhbg : b ∈ g\nhb : p ~ᵤ b\nthis : DecidableEq α\n⊢ p * Multiset.prod f ~ᵤ b * Multiset.prod (Multiset.erase g b)\n[PROOFSTEP]\nrwa [← Multiset.prod_cons, ← Multiset.prod_cons, Multiset.cons_erase hbg]\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\np : α\nf : Multiset α\nih :\n ∀ {g : Multiset α},\n (∀ (x : α), x ∈ f → Prime x) →\n (∀ (x : α), x ∈ g → Prime x) → Multiset.prod f ~ᵤ Multiset.prod g → Multiset.Rel Associated f g\ng : Multiset α\nhf : ∀ (x : α), x ∈ p ::ₘ f → Prime x\nhg : ∀ (x : α), x ∈ g → Prime x\nhfg : Multiset.prod (p ::ₘ f) ~ᵤ Multiset.prod g\nb : α\nhbg : b ∈ g\nhb : p ~ᵤ b\nthis : DecidableEq α\n⊢ p ∈ p ::ₘ f\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\na : α\nf : Multiset α\nha : Irreducible a\npfa : (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\n⊢ ∃ p, a ~ᵤ p ∧ f = {p}\n[PROOFSTEP]\nhaveI := Classical.decEq α\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\na : α\nf : Multiset α\nha : Irreducible a\npfa : (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\nthis : DecidableEq α\n⊢ ∃ p, a ~ᵤ p ∧ f = {p}\n[PROOFSTEP]\nrefine\n @Multiset.induction_on _ (fun g => (g.prod ~ᵤ a) → (∀ b ∈ g, Prime b) → ∃ p, a ~ᵤ p ∧ g = { p }) f ?_ ?_ pfa.2 pfa.1\n[GOAL]\ncase refine_1\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\na : α\nf : Multiset α\nha : Irreducible a\npfa : (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\nthis : DecidableEq α\n⊢ (fun g => Multiset.prod g ~ᵤ a → (∀ (b : α), b ∈ g → Prime b) → ∃ p, a ~ᵤ p ∧ g = {p}) 0\n[PROOFSTEP]\nintro h\n[GOAL]\ncase refine_1\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\na : α\nf : Multiset α\nha : Irreducible a\npfa : (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\nthis : DecidableEq α\nh : Multiset.prod 0 ~ᵤ a\n⊢ (∀ (b : α), b ∈ 0 → Prime b) → ∃ p, a ~ᵤ p ∧ 0 = {p}\n[PROOFSTEP]\nexact (ha.not_unit (associated_one_iff_isUnit.1 (Associated.symm h))).elim\n[GOAL]\ncase refine_2\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\na : α\nf : Multiset α\nha : Irreducible a\npfa : (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\nthis : DecidableEq α\n⊢ ∀ ⦃a_1 : α⦄ {s : Multiset α},\n (fun g => Multiset.prod g ~ᵤ a → (∀ (b : α), b ∈ g → Prime b) → ∃ p, a ~ᵤ p ∧ g = {p}) s →\n (fun g => Multiset.prod g ~ᵤ a → (∀ (b : α), b ∈ g → Prime b) → ∃ p, a ~ᵤ p ∧ g = {p}) (a_1 ::ₘ s)\n[PROOFSTEP]\nrintro p s _ ⟨u, hu⟩ hs\n[GOAL]\ncase refine_2.intro\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\na : α\nf : Multiset α\nha : Irreducible a\npfa : (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\nthis : DecidableEq α\np : α\ns : Multiset α\na✝ : Multiset.prod s ~ᵤ a → (∀ (b : α), b ∈ s → Prime b) → ∃ p, a ~ᵤ p ∧ s = {p}\nu : αˣ\nhu : Multiset.prod (p ::ₘ s) * ↑u = a\nhs : ∀ (b : α), b ∈ p ::ₘ s → Prime b\n⊢ ∃ p_1, a ~ᵤ p_1 ∧ p ::ₘ s = {p_1}\n[PROOFSTEP]\nuse p\n[GOAL]\ncase h\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\na : α\nf : Multiset α\nha : Irreducible a\npfa : (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\nthis : DecidableEq α\np : α\ns : Multiset α\na✝ : Multiset.prod s ~ᵤ a → (∀ (b : α), b ∈ s → Prime b) → ∃ p, a ~ᵤ p ∧ s = {p}\nu : αˣ\nhu : Multiset.prod (p ::ₘ s) * ↑u = a\nhs : ∀ (b : α), b ∈ p ::ₘ s → Prime b\n⊢ a ~ᵤ p ∧ p ::ₘ s = {p}\n[PROOFSTEP]\nhave hs0 : s = 0 := by\n by_contra hs0\n obtain ⟨q, hq⟩ := Multiset.exists_mem_of_ne_zero hs0\n apply (hs q (by simp [hq])).2.1\n refine' (ha.isUnit_or_isUnit (_ : _ = p * ↑u * (s.erase q).prod * _)).resolve_left _\n · rw [mul_right_comm _ _ q, mul_assoc, ← Multiset.prod_cons, Multiset.cons_erase hq, ← hu, mul_comm, mul_comm p _,\n mul_assoc]\n simp\n apply mt isUnit_of_mul_isUnit_left (mt isUnit_of_mul_isUnit_left _)\n apply (hs p (Multiset.mem_cons_self _ _)).2.1\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\na : α\nf : Multiset α\nha : Irreducible a\npfa : (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\nthis : DecidableEq α\np : α\ns : Multiset α\na✝ : Multiset.prod s ~ᵤ a → (∀ (b : α), b ∈ s → Prime b) → ∃ p, a ~ᵤ p ∧ s = {p}\nu : αˣ\nhu : Multiset.prod (p ::ₘ s) * ↑u = a\nhs : ∀ (b : α), b ∈ p ::ₘ s → Prime b\n⊢ s = 0\n[PROOFSTEP]\nby_contra hs0\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\na : α\nf : Multiset α\nha : Irreducible a\npfa : (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\nthis : DecidableEq α\np : α\ns : Multiset α\na✝ : Multiset.prod s ~ᵤ a → (∀ (b : α), b ∈ s → Prime b) → ∃ p, a ~ᵤ p ∧ s = {p}\nu : αˣ\nhu : Multiset.prod (p ::ₘ s) * ↑u = a\nhs : ∀ (b : α), b ∈ p ::ₘ s → Prime b\nhs0 : ¬s = 0\n⊢ False\n[PROOFSTEP]\nobtain ⟨q, hq⟩ := Multiset.exists_mem_of_ne_zero hs0\n[GOAL]\ncase intro\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\na : α\nf : Multiset α\nha : Irreducible a\npfa : (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\nthis : DecidableEq α\np : α\ns : Multiset α\na✝ : Multiset.prod s ~ᵤ a → (∀ (b : α), b ∈ s → Prime b) → ∃ p, a ~ᵤ p ∧ s = {p}\nu : αˣ\nhu : Multiset.prod (p ::ₘ s) * ↑u = a\nhs : ∀ (b : α), b ∈ p ::ₘ s → Prime b\nhs0 : ¬s = 0\nq : α\nhq : q ∈ s\n⊢ False\n[PROOFSTEP]\napply (hs q (by simp [hq])).2.1\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\na : α\nf : Multiset α\nha : Irreducible a\npfa : (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\nthis : DecidableEq α\np : α\ns : Multiset α\na✝ : Multiset.prod s ~ᵤ a → (∀ (b : α), b ∈ s → Prime b) → ∃ p, a ~ᵤ p ∧ s = {p}\nu : αˣ\nhu : Multiset.prod (p ::ₘ s) * ↑u = a\nhs : ∀ (b : α), b ∈ p ::ₘ s → Prime b\nhs0 : ¬s = 0\nq : α\nhq : q ∈ s\n⊢ q ∈ p ::ₘ s\n[PROOFSTEP]\nsimp [hq]\n[GOAL]\ncase intro\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\na : α\nf : Multiset α\nha : Irreducible a\npfa : (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\nthis : DecidableEq α\np : α\ns : Multiset α\na✝ : Multiset.prod s ~ᵤ a → (∀ (b : α), b ∈ s → Prime b) → ∃ p, a ~ᵤ p ∧ s = {p}\nu : αˣ\nhu : Multiset.prod (p ::ₘ s) * ↑u = a\nhs : ∀ (b : α), b ∈ p ::ₘ s → Prime b\nhs0 : ¬s = 0\nq : α\nhq : q ∈ s\n⊢ IsUnit q\n[PROOFSTEP]\nrefine' (ha.isUnit_or_isUnit (_ : _ = p * ↑u * (s.erase q).prod * _)).resolve_left _\n[GOAL]\ncase intro.refine'_1\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\na : α\nf : Multiset α\nha : Irreducible a\npfa : (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\nthis : DecidableEq α\np : α\ns : Multiset α\na✝ : Multiset.prod s ~ᵤ a → (∀ (b : α), b ∈ s → Prime b) → ∃ p, a ~ᵤ p ∧ s = {p}\nu : αˣ\nhu : Multiset.prod (p ::ₘ s) * ↑u = a\nhs : ∀ (b : α), b ∈ p ::ₘ s → Prime b\nhs0 : ¬s = 0\nq : α\nhq : q ∈ s\n⊢ a = p * ↑u * Multiset.prod (Multiset.erase s q) * q\n[PROOFSTEP]\nrw [mul_right_comm _ _ q, mul_assoc, ← Multiset.prod_cons, Multiset.cons_erase hq, ← hu, mul_comm, mul_comm p _,\n mul_assoc]\n[GOAL]\ncase intro.refine'_1\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\na : α\nf : Multiset α\nha : Irreducible a\npfa : (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\nthis : DecidableEq α\np : α\ns : Multiset α\na✝ : Multiset.prod s ~ᵤ a → (∀ (b : α), b ∈ s → Prime b) → ∃ p, a ~ᵤ p ∧ s = {p}\nu : αˣ\nhu : Multiset.prod (p ::ₘ s) * ↑u = a\nhs : ∀ (b : α), b ∈ p ::ₘ s → Prime b\nhs0 : ¬s = 0\nq : α\nhq : q ∈ s\n⊢ ↑u * Multiset.prod (p ::ₘ s) = ↑u * (p * Multiset.prod s)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro.refine'_2\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\na : α\nf : Multiset α\nha : Irreducible a\npfa : (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\nthis : DecidableEq α\np : α\ns : Multiset α\na✝ : Multiset.prod s ~ᵤ a → (∀ (b : α), b ∈ s → Prime b) → ∃ p, a ~ᵤ p ∧ s = {p}\nu : αˣ\nhu : Multiset.prod (p ::ₘ s) * ↑u = a\nhs : ∀ (b : α), b ∈ p ::ₘ s → Prime b\nhs0 : ¬s = 0\nq : α\nhq : q ∈ s\n⊢ ¬IsUnit (p * ↑u * Multiset.prod (Multiset.erase s q))\n[PROOFSTEP]\napply mt isUnit_of_mul_isUnit_left (mt isUnit_of_mul_isUnit_left _)\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\na : α\nf : Multiset α\nha : Irreducible a\npfa : (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\nthis : DecidableEq α\np : α\ns : Multiset α\na✝ : Multiset.prod s ~ᵤ a → (∀ (b : α), b ∈ s → Prime b) → ∃ p, a ~ᵤ p ∧ s = {p}\nu : αˣ\nhu : Multiset.prod (p ::ₘ s) * ↑u = a\nhs : ∀ (b : α), b ∈ p ::ₘ s → Prime b\nhs0 : ¬s = 0\nq : α\nhq : q ∈ s\n⊢ ¬IsUnit p\n[PROOFSTEP]\napply (hs p (Multiset.mem_cons_self _ _)).2.1\n[GOAL]\ncase h\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\na : α\nf : Multiset α\nha : Irreducible a\npfa : (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\nthis : DecidableEq α\np : α\ns : Multiset α\na✝ : Multiset.prod s ~ᵤ a → (∀ (b : α), b ∈ s → Prime b) → ∃ p, a ~ᵤ p ∧ s = {p}\nu : αˣ\nhu : Multiset.prod (p ::ₘ s) * ↑u = a\nhs : ∀ (b : α), b ∈ p ::ₘ s → Prime b\nhs0 : s = 0\n⊢ a ~ᵤ p ∧ p ::ₘ s = {p}\n[PROOFSTEP]\nsimp only [mul_one, Multiset.prod_cons, Multiset.prod_zero, hs0] at *\n[GOAL]\ncase h\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\na : α\nf : Multiset α\nha : Irreducible a\npfa : (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\nthis : DecidableEq α\np : α\ns : Multiset α\nu : αˣ\na✝ : 1 ~ᵤ a → (∀ (b : α), b ∈ 0 → Prime b) → ∃ p, a ~ᵤ p ∧ 0 = {p}\nhu : p * ↑u = a\nhs : ∀ (b : α), b ∈ p ::ₘ 0 → Prime b\nhs0 : True\n⊢ a ~ᵤ p ∧ p ::ₘ 0 = {p}\n[PROOFSTEP]\nexact ⟨Associated.symm ⟨u, hu⟩, rfl⟩\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\npf : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\n⊢ WellFounded DvdNotUnit\n[PROOFSTEP]\nclassical\nrefine'\n RelHomClass.wellFounded (RelHom.mk _ _ : (DvdNotUnit : α → α → Prop) →r ((· < ·) : ℕ∞ → ℕ∞ → Prop))\n (WithTop.wellFounded_lt Nat.lt_wfRel.wf)\n· intro a\n by_cases h : a = 0\n · exact ⊤\n exact ↑(Multiset.card (Classical.choose (pf a h)))\nrintro a b ⟨ane0, ⟨c, hc, b_eq⟩⟩\nrw [dif_neg ane0]\nby_cases h : b = 0\n· simp [h, lt_top_iff_ne_top]\n· rw [dif_neg h]\n erw [WithTop.coe_lt_coe]\n have cne0 : c ≠ 0 := by\n refine' mt (fun con => _) h\n rw [b_eq, con, mul_zero]\n calc\n Multiset.card (Classical.choose (pf a ane0)) < _ + Multiset.card (Classical.choose (pf c cne0)) :=\n lt_add_of_pos_right _ (Multiset.card_pos.mpr fun con => hc (associated_one_iff_isUnit.mp ?_))\n _ = Multiset.card (Classical.choose (pf a ane0) + Classical.choose (pf c cne0)) := (Multiset.card_add _ _).symm\n _ = Multiset.card (Classical.choose (pf b h)) :=\n Multiset.card_eq_card_of_rel (prime_factors_unique ?_ (Classical.choose_spec (pf _ h)).1 ?_)\n · convert (Classical.choose_spec (pf c cne0)).2.symm\n rw [con, Multiset.prod_zero]\n · intro x hadd\n rw [Multiset.mem_add] at hadd \n cases' hadd with h h <;> apply (Classical.choose_spec (pf _ _)).1 _ h <;> assumption\n · rw [Multiset.prod_add]\n trans a * c\n · apply Associated.mul_mul <;> apply (Classical.choose_spec (pf _ _)).2 <;> assumption\n · rw [← b_eq]\n apply (Classical.choose_spec (pf _ _)).2.symm; assumption\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\npf : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\n⊢ WellFounded DvdNotUnit\n[PROOFSTEP]\nrefine'\n RelHomClass.wellFounded (RelHom.mk _ _ : (DvdNotUnit : α → α → Prop) →r ((· < ·) : ℕ∞ → ℕ∞ → Prop))\n (WithTop.wellFounded_lt Nat.lt_wfRel.wf)\n[GOAL]\ncase refine'_1\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\npf : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\n⊢ α → ℕ∞\n[PROOFSTEP]\nintro a\n[GOAL]\ncase refine'_1\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\npf : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\na : α\n⊢ ℕ∞\n[PROOFSTEP]\nby_cases h : a = 0\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\npf : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\na : α\nh : a = 0\n⊢ ℕ∞\n[PROOFSTEP]\nexact ⊤\n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\npf : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\na : α\nh : ¬a = 0\n⊢ ℕ∞\n[PROOFSTEP]\nexact ↑(Multiset.card (Classical.choose (pf a h)))\n[GOAL]\ncase refine'_2\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\npf : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\n⊢ ∀ {a b : α},\n DvdNotUnit a b →\n (if h : a = 0 then ⊤\n else ↑(↑Multiset.card (Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a)))) <\n if h : b = 0 then ⊤\n else ↑(↑Multiset.card (Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ b)))\n[PROOFSTEP]\nrintro a b ⟨ane0, ⟨c, hc, b_eq⟩⟩\n[GOAL]\ncase refine'_2.intro.intro.intro\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\npf : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\na b : α\nane0 : a ≠ 0\nc : α\nhc : ¬IsUnit c\nb_eq : b = a * c\n⊢ (if h : a = 0 then ⊤\n else ↑(↑Multiset.card (Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a)))) <\n if h : b = 0 then ⊤\n else ↑(↑Multiset.card (Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ b)))\n[PROOFSTEP]\nrw [dif_neg ane0]\n[GOAL]\ncase refine'_2.intro.intro.intro\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\npf : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\na b : α\nane0 : a ≠ 0\nc : α\nhc : ¬IsUnit c\nb_eq : b = a * c\n⊢ ↑(↑Multiset.card (Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a))) <\n if h : b = 0 then ⊤\n else ↑(↑Multiset.card (Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ b)))\n[PROOFSTEP]\nby_cases h : b = 0\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\npf : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\na b : α\nane0 : a ≠ 0\nc : α\nhc : ¬IsUnit c\nb_eq : b = a * c\nh : b = 0\n⊢ ↑(↑Multiset.card (Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a))) <\n if h : b = 0 then ⊤\n else ↑(↑Multiset.card (Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ b)))\n[PROOFSTEP]\nsimp [h, lt_top_iff_ne_top]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\npf : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\na b : α\nane0 : a ≠ 0\nc : α\nhc : ¬IsUnit c\nb_eq : b = a * c\nh : ¬b = 0\n⊢ ↑(↑Multiset.card (Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a))) <\n if h : b = 0 then ⊤\n else ↑(↑Multiset.card (Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ b)))\n[PROOFSTEP]\nrw [dif_neg h]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\npf : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\na b : α\nane0 : a ≠ 0\nc : α\nhc : ¬IsUnit c\nb_eq : b = a * c\nh : ¬b = 0\n⊢ ↑(↑Multiset.card (Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a))) <\n ↑(↑Multiset.card (Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ b)))\n[PROOFSTEP]\nerw [WithTop.coe_lt_coe]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\npf : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\na b : α\nane0 : a ≠ 0\nc : α\nhc : ¬IsUnit c\nb_eq : b = a * c\nh : ¬b = 0\n⊢ ↑(↑Multiset.card (Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a))) <\n ↑(↑Multiset.card (Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ b)))\n[PROOFSTEP]\nhave cne0 : c ≠ 0 := by\n refine' mt (fun con => _) h\n rw [b_eq, con, mul_zero]\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\npf : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\na b : α\nane0 : a ≠ 0\nc : α\nhc : ¬IsUnit c\nb_eq : b = a * c\nh : ¬b = 0\n⊢ c ≠ 0\n[PROOFSTEP]\nrefine' mt (fun con => _) h\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\npf : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\na b : α\nane0 : a ≠ 0\nc : α\nhc : ¬IsUnit c\nb_eq : b = a * c\nh : ¬b = 0\ncon : c = 0\n⊢ b = 0\n[PROOFSTEP]\nrw [b_eq, con, mul_zero]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\npf : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\na b : α\nane0 : a ≠ 0\nc : α\nhc : ¬IsUnit c\nb_eq : b = a * c\nh : ¬b = 0\ncne0 : c ≠ 0\n⊢ ↑(↑Multiset.card (Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a))) <\n ↑(↑Multiset.card (Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ b)))\n[PROOFSTEP]\ncalc\n Multiset.card (Classical.choose (pf a ane0)) < _ + Multiset.card (Classical.choose (pf c cne0)) :=\n lt_add_of_pos_right _ (Multiset.card_pos.mpr fun con => hc (associated_one_iff_isUnit.mp ?_))\n _ = Multiset.card (Classical.choose (pf a ane0) + Classical.choose (pf c cne0)) := (Multiset.card_add _ _).symm\n _ = Multiset.card (Classical.choose (pf b h)) :=\n Multiset.card_eq_card_of_rel (prime_factors_unique ?_ (Classical.choose_spec (pf _ h)).1 ?_)\n[GOAL]\ncase neg.calc_1\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\npf : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\na b : α\nane0 : a ≠ 0\nc : α\nhc : ¬IsUnit c\nb_eq : b = a * c\nh : ¬b = 0\ncne0 : c ≠ 0\ncon : Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ c) = 0\n⊢ c ~ᵤ 1\n[PROOFSTEP]\nconvert (Classical.choose_spec (pf c cne0)).2.symm\n[GOAL]\ncase h.e'_4\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\npf : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\na b : α\nane0 : a ≠ 0\nc : α\nhc : ¬IsUnit c\nb_eq : b = a * c\nh : ¬b = 0\ncne0 : c ≠ 0\ncon : Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ c) = 0\n⊢ 1 = Multiset.prod (Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ c))\n[PROOFSTEP]\nrw [con, Multiset.prod_zero]\n[GOAL]\ncase neg.calc_2\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\npf : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\na b : α\nane0 : a ≠ 0\nc : α\nhc : ¬IsUnit c\nb_eq : b = a * c\nh : ¬b = 0\ncne0 : c ≠ 0\n⊢ ∀ (x : α),\n x ∈\n Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a) +\n Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ c) →\n Prime x\n[PROOFSTEP]\nintro x hadd\n[GOAL]\ncase neg.calc_2\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\npf : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\na b : α\nane0 : a ≠ 0\nc : α\nhc : ¬IsUnit c\nb_eq : b = a * c\nh : ¬b = 0\ncne0 : c ≠ 0\nx : α\nhadd :\n x ∈\n Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a) +\n Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ c)\n⊢ Prime x\n[PROOFSTEP]\nrw [Multiset.mem_add] at hadd \n[GOAL]\ncase neg.calc_2\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\npf : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\na b : α\nane0 : a ≠ 0\nc : α\nhc : ¬IsUnit c\nb_eq : b = a * c\nh : ¬b = 0\ncne0 : c ≠ 0\nx : α\nhadd :\n x ∈ Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a) ∨\n x ∈ Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ c)\n⊢ Prime x\n[PROOFSTEP]\ncases' hadd with h h\n[GOAL]\ncase neg.calc_2.inl\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\npf : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\na b : α\nane0 : a ≠ 0\nc : α\nhc : ¬IsUnit c\nb_eq : b = a * c\nh✝ : ¬b = 0\ncne0 : c ≠ 0\nx : α\nh : x ∈ Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a)\n⊢ Prime x\n[PROOFSTEP]\napply (Classical.choose_spec (pf _ _)).1 _ h\n[GOAL]\ncase neg.calc_2.inr\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\npf : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\na b : α\nane0 : a ≠ 0\nc : α\nhc : ¬IsUnit c\nb_eq : b = a * c\nh✝ : ¬b = 0\ncne0 : c ≠ 0\nx : α\nh : x ∈ Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ c)\n⊢ Prime x\n[PROOFSTEP]\napply (Classical.choose_spec (pf _ _)).1 _ h\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\npf : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\na b : α\nane0 : a ≠ 0\nc : α\nhc : ¬IsUnit c\nb_eq : b = a * c\nh✝ : ¬b = 0\ncne0 : c ≠ 0\nx : α\nh : x ∈ Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a)\n⊢ a ≠ 0\n[PROOFSTEP]\nassumption\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\npf : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\na b : α\nane0 : a ≠ 0\nc : α\nhc : ¬IsUnit c\nb_eq : b = a * c\nh✝ : ¬b = 0\ncne0 : c ≠ 0\nx : α\nh : x ∈ Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ c)\n⊢ c ≠ 0\n[PROOFSTEP]\nassumption\n[GOAL]\ncase neg.calc_3\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\npf : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\na b : α\nane0 : a ≠ 0\nc : α\nhc : ¬IsUnit c\nb_eq : b = a * c\nh : ¬b = 0\ncne0 : c ≠ 0\n⊢ Multiset.prod\n (Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a) +\n Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ c)) ~ᵤ\n Multiset.prod (Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ b))\n[PROOFSTEP]\nrw [Multiset.prod_add]\n[GOAL]\ncase neg.calc_3\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\npf : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\na b : α\nane0 : a ≠ 0\nc : α\nhc : ¬IsUnit c\nb_eq : b = a * c\nh : ¬b = 0\ncne0 : c ≠ 0\n⊢ Multiset.prod (Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a)) *\n Multiset.prod (Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ c)) ~ᵤ\n Multiset.prod (Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ b))\n[PROOFSTEP]\ntrans a * c\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\npf : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\na b : α\nane0 : a ≠ 0\nc : α\nhc : ¬IsUnit c\nb_eq : b = a * c\nh : ¬b = 0\ncne0 : c ≠ 0\n⊢ Multiset.prod (Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a)) *\n Multiset.prod (Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ c)) ~ᵤ\n a * c\n[PROOFSTEP]\napply Associated.mul_mul\n[GOAL]\ncase a\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\npf : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\na b : α\nane0 : a ≠ 0\nc : α\nhc : ¬IsUnit c\nb_eq : b = a * c\nh : ¬b = 0\ncne0 : c ≠ 0\n⊢ Multiset.prod (Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a)) ~ᵤ a\n[PROOFSTEP]\napply (Classical.choose_spec (pf _ _)).2\n[GOAL]\ncase a\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\npf : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\na b : α\nane0 : a ≠ 0\nc : α\nhc : ¬IsUnit c\nb_eq : b = a * c\nh : ¬b = 0\ncne0 : c ≠ 0\n⊢ Multiset.prod (Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ c)) ~ᵤ c\n[PROOFSTEP]\napply (Classical.choose_spec (pf _ _)).2\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\npf : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\na b : α\nane0 : a ≠ 0\nc : α\nhc : ¬IsUnit c\nb_eq : b = a * c\nh : ¬b = 0\ncne0 : c ≠ 0\n⊢ a ≠ 0\n[PROOFSTEP]\nassumption\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\npf : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\na b : α\nane0 : a ≠ 0\nc : α\nhc : ¬IsUnit c\nb_eq : b = a * c\nh : ¬b = 0\ncne0 : c ≠ 0\n⊢ c ≠ 0\n[PROOFSTEP]\nassumption\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\npf : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\na b : α\nane0 : a ≠ 0\nc : α\nhc : ¬IsUnit c\nb_eq : b = a * c\nh : ¬b = 0\ncne0 : c ≠ 0\n⊢ a * c ~ᵤ Multiset.prod (Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ b))\n[PROOFSTEP]\nrw [← b_eq]\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\npf : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\na b : α\nane0 : a ≠ 0\nc : α\nhc : ¬IsUnit c\nb_eq : b = a * c\nh : ¬b = 0\ncne0 : c ≠ 0\n⊢ b ~ᵤ Multiset.prod (Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ b))\n[PROOFSTEP]\napply (Classical.choose_spec (pf _ _)).2.symm\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\npf : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\na b : α\nane0 : a ≠ 0\nc : α\nhc : ¬IsUnit c\nb_eq : b = a * c\nh : ¬b = 0\ncne0 : c ≠ 0\n⊢ b ≠ 0\n[PROOFSTEP]\nassumption\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\npf : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\np : α\n⊢ Irreducible p ↔ Prime p\n[PROOFSTEP]\nby_cases hp0 : p = 0\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\npf : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\np : α\nhp0 : p = 0\n⊢ Irreducible p ↔ Prime p\n[PROOFSTEP]\nsimp [hp0]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\npf : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\np : α\nhp0 : ¬p = 0\n⊢ Irreducible p ↔ Prime p\n[PROOFSTEP]\nrefine' ⟨fun h => _, Prime.irreducible⟩\n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\npf : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\np : α\nhp0 : ¬p = 0\nh : Irreducible p\n⊢ Prime p\n[PROOFSTEP]\nobtain ⟨f, hf⟩ := pf p hp0\n[GOAL]\ncase neg.intro\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\npf : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\np : α\nhp0 : ¬p = 0\nh : Irreducible p\nf : Multiset α\nhf : (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ p\n⊢ Prime p\n[PROOFSTEP]\nobtain ⟨q, hq, rfl⟩ := prime_factors_irreducible h hf\n[GOAL]\ncase neg.intro.intro.intro\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\npf : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\np : α\nhp0 : ¬p = 0\nh : Irreducible p\nq : α\nhq : p ~ᵤ q\nhf : (∀ (b : α), b ∈ {q} → Prime b) ∧ Multiset.prod {q} ~ᵤ p\n⊢ Prime p\n[PROOFSTEP]\nrw [hq.prime_iff]\n[GOAL]\ncase neg.intro.intro.intro\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\npf : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\np : α\nhp0 : ¬p = 0\nh : Irreducible p\nq : α\nhq : p ~ᵤ q\nhf : (∀ (b : α), b ∈ {q} → Prime b) ∧ Multiset.prod {q} ~ᵤ p\n⊢ Prime q\n[PROOFSTEP]\nexact hf.1 q (Multiset.mem_singleton_self _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : CancelCommMonoidWithZero α\ninst✝ : CancelCommMonoidWithZero β\ne : α ≃* β\nhα : UniqueFactorizationMonoid α\n⊢ UniqueFactorizationMonoid β\n[PROOFSTEP]\nrw [UniqueFactorizationMonoid.iff_exists_prime_factors] at hα ⊢\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : CancelCommMonoidWithZero α\ninst✝ : CancelCommMonoidWithZero β\ne : α ≃* β\nhα : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\n⊢ ∀ (a : β), a ≠ 0 → ∃ f, (∀ (b : β), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\n[PROOFSTEP]\nintro a ha\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : CancelCommMonoidWithZero α\ninst✝ : CancelCommMonoidWithZero β\ne : α ≃* β\nhα : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\na : β\nha : a ≠ 0\n⊢ ∃ f, (∀ (b : β), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\n[PROOFSTEP]\nobtain ⟨w, hp, u, h⟩ :=\n hα (e.symm a) fun h =>\n ha <| by\n convert ← map_zero e\n simp [← h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : CancelCommMonoidWithZero α\ninst✝ : CancelCommMonoidWithZero β\ne : α ≃* β\nhα : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\na : β\nha : a ≠ 0\nh : ↑(symm e) a = 0\n⊢ a = 0\n[PROOFSTEP]\nconvert ← map_zero e\n[GOAL]\ncase h.e'_2\nα : Type u_1\nβ : Type u_2\ninst✝¹ : CancelCommMonoidWithZero α\ninst✝ : CancelCommMonoidWithZero β\ne : α ≃* β\nhα : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\na : β\nha : a ≠ 0\nh : ↑(symm e) a = 0\n⊢ ↑e 0 = a\n[PROOFSTEP]\nsimp [← h]\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝¹ : CancelCommMonoidWithZero α\ninst✝ : CancelCommMonoidWithZero β\ne : α ≃* β\nhα : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\na : β\nha : a ≠ 0\nw : Multiset α\nhp : ∀ (b : α), b ∈ w → Prime b\nu : αˣ\nh : Multiset.prod w * ↑u = ↑(symm e) a\n⊢ ∃ f, (∀ (b : β), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\n[PROOFSTEP]\nexact\n ⟨w.map e, fun b hb =>\n let ⟨c, hc, he⟩ := Multiset.mem_map.1 hb\n he ▸ e.prime_iff.1 (hp c hc),\n Units.map e.toMonoidHom u, by\n erw [Multiset.prod_hom, ← e.map_mul, h]\n simp⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : CancelCommMonoidWithZero α\ninst✝ : CancelCommMonoidWithZero β\ne : α ≃* β\nhα : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\na : β\nha : a ≠ 0\nw : Multiset α\nhp : ∀ (b : α), b ∈ w → Prime b\nu : αˣ\nh : Multiset.prod w * ↑u = ↑(symm e) a\n⊢ Multiset.prod (Multiset.map (↑e) w) * ↑(↑(Units.map (toMonoidHom e)) u) = a\n[PROOFSTEP]\nerw [Multiset.prod_hom, ← e.map_mul, h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : CancelCommMonoidWithZero α\ninst✝ : CancelCommMonoidWithZero β\ne : α ≃* β\nhα : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\na : β\nha : a ≠ 0\nw : Multiset α\nhp : ∀ (b : α), b ∈ w → Prime b\nu : αˣ\nh : Multiset.prod w * ↑u = ↑(symm e) a\n⊢ ↑e (↑(symm e) a) = a\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\neif : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Irreducible b) ∧ Multiset.prod f ~ᵤ a\nuif :\n ∀ (f g : Multiset α),\n (∀ (x : α), x ∈ f → Irreducible x) →\n (∀ (x : α), x ∈ g → Irreducible x) → Multiset.prod f ~ᵤ Multiset.prod g → Multiset.Rel Associated f g\np : α\nthis : DecidableEq α := Classical.decEq α\nhpi : Irreducible p\na b : α\nx✝ : p ∣ a * b\nx : α\nhx : a * b = p * x\nhab0 : a * b = 0\nha0 : a = 0\n⊢ p ∣ a ∨ p ∣ b\n[PROOFSTEP]\nsimp [ha0]\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\neif : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Irreducible b) ∧ Multiset.prod f ~ᵤ a\nuif :\n ∀ (f g : Multiset α),\n (∀ (x : α), x ∈ f → Irreducible x) →\n (∀ (x : α), x ∈ g → Irreducible x) → Multiset.prod f ~ᵤ Multiset.prod g → Multiset.Rel Associated f g\np : α\nthis : DecidableEq α := Classical.decEq α\nhpi : Irreducible p\na b : α\nx✝ : p ∣ a * b\nx : α\nhx : a * b = p * x\nhab0 : a * b = 0\nhb0 : b = 0\n⊢ p ∣ a ∨ p ∣ b\n[PROOFSTEP]\nsimp [hb0]\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\neif : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Irreducible b) ∧ Multiset.prod f ~ᵤ a\nuif :\n ∀ (f g : Multiset α),\n (∀ (x : α), x ∈ f → Irreducible x) →\n (∀ (x : α), x ∈ g → Irreducible x) → Multiset.prod f ~ᵤ Multiset.prod g → Multiset.Rel Associated f g\np : α\nthis : DecidableEq α := Classical.decEq α\nhpi : Irreducible p\na b : α\nx✝ : p ∣ a * b\nx : α\nhx : a * b = p * x\nhab0 : ¬a * b = 0\n⊢ p ∣ a ∨ p ∣ b\n[PROOFSTEP]\nhave hx0 : x ≠ 0 := fun hx0 => by simp_all\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\neif : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Irreducible b) ∧ Multiset.prod f ~ᵤ a\nuif :\n ∀ (f g : Multiset α),\n (∀ (x : α), x ∈ f → Irreducible x) →\n (∀ (x : α), x ∈ g → Irreducible x) → Multiset.prod f ~ᵤ Multiset.prod g → Multiset.Rel Associated f g\np : α\nthis : DecidableEq α := Classical.decEq α\nhpi : Irreducible p\na b : α\nx✝ : p ∣ a * b\nx : α\nhx : a * b = p * x\nhab0 : ¬a * b = 0\nhx0 : x = 0\n⊢ False\n[PROOFSTEP]\nsimp_all\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\neif : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Irreducible b) ∧ Multiset.prod f ~ᵤ a\nuif :\n ∀ (f g : Multiset α),\n (∀ (x : α), x ∈ f → Irreducible x) →\n (∀ (x : α), x ∈ g → Irreducible x) → Multiset.prod f ~ᵤ Multiset.prod g → Multiset.Rel Associated f g\np : α\nthis : DecidableEq α := Classical.decEq α\nhpi : Irreducible p\na b : α\nx✝ : p ∣ a * b\nx : α\nhx : a * b = p * x\nhab0 : ¬a * b = 0\nhx0 : x ≠ 0\n⊢ p ∣ a ∨ p ∣ b\n[PROOFSTEP]\nhave ha0 : a ≠ 0 := left_ne_zero_of_mul hab0\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\neif : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Irreducible b) ∧ Multiset.prod f ~ᵤ a\nuif :\n ∀ (f g : Multiset α),\n (∀ (x : α), x ∈ f → Irreducible x) →\n (∀ (x : α), x ∈ g → Irreducible x) → Multiset.prod f ~ᵤ Multiset.prod g → Multiset.Rel Associated f g\np : α\nthis : DecidableEq α := Classical.decEq α\nhpi : Irreducible p\na b : α\nx✝ : p ∣ a * b\nx : α\nhx : a * b = p * x\nhab0 : ¬a * b = 0\nhx0 : x ≠ 0\nha0 : a ≠ 0\n⊢ p ∣ a ∨ p ∣ b\n[PROOFSTEP]\nhave hb0 : b ≠ 0 := right_ne_zero_of_mul hab0\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\neif : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Irreducible b) ∧ Multiset.prod f ~ᵤ a\nuif :\n ∀ (f g : Multiset α),\n (∀ (x : α), x ∈ f → Irreducible x) →\n (∀ (x : α), x ∈ g → Irreducible x) → Multiset.prod f ~ᵤ Multiset.prod g → Multiset.Rel Associated f g\np : α\nthis : DecidableEq α := Classical.decEq α\nhpi : Irreducible p\na b : α\nx✝ : p ∣ a * b\nx : α\nhx : a * b = p * x\nhab0 : ¬a * b = 0\nhx0 : x ≠ 0\nha0 : a ≠ 0\nhb0 : b ≠ 0\n⊢ p ∣ a ∨ p ∣ b\n[PROOFSTEP]\ncases' eif x hx0 with fx hfx\n[GOAL]\ncase intro\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\neif : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Irreducible b) ∧ Multiset.prod f ~ᵤ a\nuif :\n ∀ (f g : Multiset α),\n (∀ (x : α), x ∈ f → Irreducible x) →\n (∀ (x : α), x ∈ g → Irreducible x) → Multiset.prod f ~ᵤ Multiset.prod g → Multiset.Rel Associated f g\np : α\nthis : DecidableEq α := Classical.decEq α\nhpi : Irreducible p\na b : α\nx✝ : p ∣ a * b\nx : α\nhx : a * b = p * x\nhab0 : ¬a * b = 0\nhx0 : x ≠ 0\nha0 : a ≠ 0\nhb0 : b ≠ 0\nfx : Multiset α\nhfx : (∀ (b : α), b ∈ fx → Irreducible b) ∧ Multiset.prod fx ~ᵤ x\n⊢ p ∣ a ∨ p ∣ b\n[PROOFSTEP]\ncases' eif a ha0 with fa hfa\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\neif : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Irreducible b) ∧ Multiset.prod f ~ᵤ a\nuif :\n ∀ (f g : Multiset α),\n (∀ (x : α), x ∈ f → Irreducible x) →\n (∀ (x : α), x ∈ g → Irreducible x) → Multiset.prod f ~ᵤ Multiset.prod g → Multiset.Rel Associated f g\np : α\nthis : DecidableEq α := Classical.decEq α\nhpi : Irreducible p\na b : α\nx✝ : p ∣ a * b\nx : α\nhx : a * b = p * x\nhab0 : ¬a * b = 0\nhx0 : x ≠ 0\nha0 : a ≠ 0\nhb0 : b ≠ 0\nfx : Multiset α\nhfx : (∀ (b : α), b ∈ fx → Irreducible b) ∧ Multiset.prod fx ~ᵤ x\nfa : Multiset α\nhfa : (∀ (b : α), b ∈ fa → Irreducible b) ∧ Multiset.prod fa ~ᵤ a\n⊢ p ∣ a ∨ p ∣ b\n[PROOFSTEP]\ncases' eif b hb0 with fb hfb\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\neif : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Irreducible b) ∧ Multiset.prod f ~ᵤ a\nuif :\n ∀ (f g : Multiset α),\n (∀ (x : α), x ∈ f → Irreducible x) →\n (∀ (x : α), x ∈ g → Irreducible x) → Multiset.prod f ~ᵤ Multiset.prod g → Multiset.Rel Associated f g\np : α\nthis : DecidableEq α := Classical.decEq α\nhpi : Irreducible p\na b : α\nx✝ : p ∣ a * b\nx : α\nhx : a * b = p * x\nhab0 : ¬a * b = 0\nhx0 : x ≠ 0\nha0 : a ≠ 0\nhb0 : b ≠ 0\nfx : Multiset α\nhfx : (∀ (b : α), b ∈ fx → Irreducible b) ∧ Multiset.prod fx ~ᵤ x\nfa : Multiset α\nhfa : (∀ (b : α), b ∈ fa → Irreducible b) ∧ Multiset.prod fa ~ᵤ a\nfb : Multiset α\nhfb : (∀ (b : α), b ∈ fb → Irreducible b) ∧ Multiset.prod fb ~ᵤ b\n⊢ p ∣ a ∨ p ∣ b\n[PROOFSTEP]\nhave h : Multiset.Rel Associated (p ::ₘ fx) (fa + fb) :=\n by\n apply uif\n · exact fun i hi => (Multiset.mem_cons.1 hi).elim (fun hip => hip.symm ▸ hpi) (hfx.1 _)\n · exact fun i hi => (Multiset.mem_add.1 hi).elim (hfa.1 _) (hfb.1 _)\n calc\n Multiset.prod (p ::ₘ fx) ~ᵤ a * b := by rw [hx, Multiset.prod_cons]; exact hfx.2.mul_left _\n _ ~ᵤ fa.prod * fb.prod := (hfa.2.symm.mul_mul hfb.2.symm)\n _ = _ := by rw [Multiset.prod_add]\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\neif : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Irreducible b) ∧ Multiset.prod f ~ᵤ a\nuif :\n ∀ (f g : Multiset α),\n (∀ (x : α), x ∈ f → Irreducible x) →\n (∀ (x : α), x ∈ g → Irreducible x) → Multiset.prod f ~ᵤ Multiset.prod g → Multiset.Rel Associated f g\np : α\nthis : DecidableEq α := Classical.decEq α\nhpi : Irreducible p\na b : α\nx✝ : p ∣ a * b\nx : α\nhx : a * b = p * x\nhab0 : ¬a * b = 0\nhx0 : x ≠ 0\nha0 : a ≠ 0\nhb0 : b ≠ 0\nfx : Multiset α\nhfx : (∀ (b : α), b ∈ fx → Irreducible b) ∧ Multiset.prod fx ~ᵤ x\nfa : Multiset α\nhfa : (∀ (b : α), b ∈ fa → Irreducible b) ∧ Multiset.prod fa ~ᵤ a\nfb : Multiset α\nhfb : (∀ (b : α), b ∈ fb → Irreducible b) ∧ Multiset.prod fb ~ᵤ b\n⊢ Multiset.Rel Associated (p ::ₘ fx) (fa + fb)\n[PROOFSTEP]\napply uif\n[GOAL]\ncase a\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\neif : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Irreducible b) ∧ Multiset.prod f ~ᵤ a\nuif :\n ∀ (f g : Multiset α),\n (∀ (x : α), x ∈ f → Irreducible x) →\n (∀ (x : α), x ∈ g → Irreducible x) → Multiset.prod f ~ᵤ Multiset.prod g → Multiset.Rel Associated f g\np : α\nthis : DecidableEq α := Classical.decEq α\nhpi : Irreducible p\na b : α\nx✝ : p ∣ a * b\nx : α\nhx : a * b = p * x\nhab0 : ¬a * b = 0\nhx0 : x ≠ 0\nha0 : a ≠ 0\nhb0 : b ≠ 0\nfx : Multiset α\nhfx : (∀ (b : α), b ∈ fx → Irreducible b) ∧ Multiset.prod fx ~ᵤ x\nfa : Multiset α\nhfa : (∀ (b : α), b ∈ fa → Irreducible b) ∧ Multiset.prod fa ~ᵤ a\nfb : Multiset α\nhfb : (∀ (b : α), b ∈ fb → Irreducible b) ∧ Multiset.prod fb ~ᵤ b\n⊢ ∀ (x : α), x ∈ p ::ₘ fx → Irreducible x\n[PROOFSTEP]\nexact fun i hi => (Multiset.mem_cons.1 hi).elim (fun hip => hip.symm ▸ hpi) (hfx.1 _)\n[GOAL]\ncase a\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\neif : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Irreducible b) ∧ Multiset.prod f ~ᵤ a\nuif :\n ∀ (f g : Multiset α),\n (∀ (x : α), x ∈ f → Irreducible x) →\n (∀ (x : α), x ∈ g → Irreducible x) → Multiset.prod f ~ᵤ Multiset.prod g → Multiset.Rel Associated f g\np : α\nthis : DecidableEq α := Classical.decEq α\nhpi : Irreducible p\na b : α\nx✝ : p ∣ a * b\nx : α\nhx : a * b = p * x\nhab0 : ¬a * b = 0\nhx0 : x ≠ 0\nha0 : a ≠ 0\nhb0 : b ≠ 0\nfx : Multiset α\nhfx : (∀ (b : α), b ∈ fx → Irreducible b) ∧ Multiset.prod fx ~ᵤ x\nfa : Multiset α\nhfa : (∀ (b : α), b ∈ fa → Irreducible b) ∧ Multiset.prod fa ~ᵤ a\nfb : Multiset α\nhfb : (∀ (b : α), b ∈ fb → Irreducible b) ∧ Multiset.prod fb ~ᵤ b\n⊢ ∀ (x : α), x ∈ fa + fb → Irreducible x\n[PROOFSTEP]\nexact fun i hi => (Multiset.mem_add.1 hi).elim (hfa.1 _) (hfb.1 _)\n[GOAL]\ncase a\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\neif : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Irreducible b) ∧ Multiset.prod f ~ᵤ a\nuif :\n ∀ (f g : Multiset α),\n (∀ (x : α), x ∈ f → Irreducible x) →\n (∀ (x : α), x ∈ g → Irreducible x) → Multiset.prod f ~ᵤ Multiset.prod g → Multiset.Rel Associated f g\np : α\nthis : DecidableEq α := Classical.decEq α\nhpi : Irreducible p\na b : α\nx✝ : p ∣ a * b\nx : α\nhx : a * b = p * x\nhab0 : ¬a * b = 0\nhx0 : x ≠ 0\nha0 : a ≠ 0\nhb0 : b ≠ 0\nfx : Multiset α\nhfx : (∀ (b : α), b ∈ fx → Irreducible b) ∧ Multiset.prod fx ~ᵤ x\nfa : Multiset α\nhfa : (∀ (b : α), b ∈ fa → Irreducible b) ∧ Multiset.prod fa ~ᵤ a\nfb : Multiset α\nhfb : (∀ (b : α), b ∈ fb → Irreducible b) ∧ Multiset.prod fb ~ᵤ b\n⊢ Multiset.prod (p ::ₘ fx) ~ᵤ Multiset.prod (fa + fb)\n[PROOFSTEP]\ncalc\n Multiset.prod (p ::ₘ fx) ~ᵤ a * b := by rw [hx, Multiset.prod_cons]; exact hfx.2.mul_left _\n _ ~ᵤ fa.prod * fb.prod := (hfa.2.symm.mul_mul hfb.2.symm)\n _ = _ := by rw [Multiset.prod_add]\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\neif : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Irreducible b) ∧ Multiset.prod f ~ᵤ a\nuif :\n ∀ (f g : Multiset α),\n (∀ (x : α), x ∈ f → Irreducible x) →\n (∀ (x : α), x ∈ g → Irreducible x) → Multiset.prod f ~ᵤ Multiset.prod g → Multiset.Rel Associated f g\np : α\nthis : DecidableEq α := Classical.decEq α\nhpi : Irreducible p\na b : α\nx✝ : p ∣ a * b\nx : α\nhx : a * b = p * x\nhab0 : ¬a * b = 0\nhx0 : x ≠ 0\nha0 : a ≠ 0\nhb0 : b ≠ 0\nfx : Multiset α\nhfx : (∀ (b : α), b ∈ fx → Irreducible b) ∧ Multiset.prod fx ~ᵤ x\nfa : Multiset α\nhfa : (∀ (b : α), b ∈ fa → Irreducible b) ∧ Multiset.prod fa ~ᵤ a\nfb : Multiset α\nhfb : (∀ (b : α), b ∈ fb → Irreducible b) ∧ Multiset.prod fb ~ᵤ b\n⊢ Multiset.prod (p ::ₘ fx) ~ᵤ a * b\n[PROOFSTEP]\nrw [hx, Multiset.prod_cons]\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\neif : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Irreducible b) ∧ Multiset.prod f ~ᵤ a\nuif :\n ∀ (f g : Multiset α),\n (∀ (x : α), x ∈ f → Irreducible x) →\n (∀ (x : α), x ∈ g → Irreducible x) → Multiset.prod f ~ᵤ Multiset.prod g → Multiset.Rel Associated f g\np : α\nthis : DecidableEq α := Classical.decEq α\nhpi : Irreducible p\na b : α\nx✝ : p ∣ a * b\nx : α\nhx : a * b = p * x\nhab0 : ¬a * b = 0\nhx0 : x ≠ 0\nha0 : a ≠ 0\nhb0 : b ≠ 0\nfx : Multiset α\nhfx : (∀ (b : α), b ∈ fx → Irreducible b) ∧ Multiset.prod fx ~ᵤ x\nfa : Multiset α\nhfa : (∀ (b : α), b ∈ fa → Irreducible b) ∧ Multiset.prod fa ~ᵤ a\nfb : Multiset α\nhfb : (∀ (b : α), b ∈ fb → Irreducible b) ∧ Multiset.prod fb ~ᵤ b\n⊢ p * Multiset.prod fx ~ᵤ p * x\n[PROOFSTEP]\nexact hfx.2.mul_left _\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\neif : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Irreducible b) ∧ Multiset.prod f ~ᵤ a\nuif :\n ∀ (f g : Multiset α),\n (∀ (x : α), x ∈ f → Irreducible x) →\n (∀ (x : α), x ∈ g → Irreducible x) → Multiset.prod f ~ᵤ Multiset.prod g → Multiset.Rel Associated f g\np : α\nthis : DecidableEq α := Classical.decEq α\nhpi : Irreducible p\na b : α\nx✝ : p ∣ a * b\nx : α\nhx : a * b = p * x\nhab0 : ¬a * b = 0\nhx0 : x ≠ 0\nha0 : a ≠ 0\nhb0 : b ≠ 0\nfx : Multiset α\nhfx : (∀ (b : α), b ∈ fx → Irreducible b) ∧ Multiset.prod fx ~ᵤ x\nfa : Multiset α\nhfa : (∀ (b : α), b ∈ fa → Irreducible b) ∧ Multiset.prod fa ~ᵤ a\nfb : Multiset α\nhfb : (∀ (b : α), b ∈ fb → Irreducible b) ∧ Multiset.prod fb ~ᵤ b\n⊢ Multiset.prod fa * Multiset.prod fb = Multiset.prod (fa + fb)\n[PROOFSTEP]\nrw [Multiset.prod_add]\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\neif : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Irreducible b) ∧ Multiset.prod f ~ᵤ a\nuif :\n ∀ (f g : Multiset α),\n (∀ (x : α), x ∈ f → Irreducible x) →\n (∀ (x : α), x ∈ g → Irreducible x) → Multiset.prod f ~ᵤ Multiset.prod g → Multiset.Rel Associated f g\np : α\nthis : DecidableEq α := Classical.decEq α\nhpi : Irreducible p\na b : α\nx✝ : p ∣ a * b\nx : α\nhx : a * b = p * x\nhab0 : ¬a * b = 0\nhx0 : x ≠ 0\nha0 : a ≠ 0\nhb0 : b ≠ 0\nfx : Multiset α\nhfx : (∀ (b : α), b ∈ fx → Irreducible b) ∧ Multiset.prod fx ~ᵤ x\nfa : Multiset α\nhfa : (∀ (b : α), b ∈ fa → Irreducible b) ∧ Multiset.prod fa ~ᵤ a\nfb : Multiset α\nhfb : (∀ (b : α), b ∈ fb → Irreducible b) ∧ Multiset.prod fb ~ᵤ b\nh : Multiset.Rel Associated (p ::ₘ fx) (fa + fb)\n⊢ p ∣ a ∨ p ∣ b\n[PROOFSTEP]\nexact\n let ⟨q, hqf, hq⟩ := Multiset.exists_mem_of_rel_of_mem h (Multiset.mem_cons_self p _)\n (Multiset.mem_add.1 hqf).elim\n (fun hqa => Or.inl <| hq.dvd_iff_dvd_left.2 <| hfa.2.dvd_iff_dvd_right.1 (Multiset.dvd_prod hqa)) fun hqb =>\n Or.inr <| hq.dvd_iff_dvd_left.2 <| hfb.2.dvd_iff_dvd_right.1 (Multiset.dvd_prod hqb)\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\neif : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Irreducible b) ∧ Multiset.prod f ~ᵤ a\nuif :\n ∀ (f g : Multiset α),\n (∀ (x : α), x ∈ f → Irreducible x) →\n (∀ (x : α), x ∈ g → Irreducible x) → Multiset.prod f ~ᵤ Multiset.prod g → Multiset.Rel Associated f g\n⊢ ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a\n[PROOFSTEP]\nconvert eif using 7\n[GOAL]\ncase h.h'.h.e'_2.h.h.e'_1.h.h'.a\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\neif : ∀ (a : α), a ≠ 0 → ∃ f, (∀ (b : α), b ∈ f → Irreducible b) ∧ Multiset.prod f ~ᵤ a\nuif :\n ∀ (f g : Multiset α),\n (∀ (x : α), x ∈ f → Irreducible x) →\n (∀ (x : α), x ∈ g → Irreducible x) → Multiset.prod f ~ᵤ Multiset.prod g → Multiset.Rel Associated f g\na✝³ : α\na✝² : a✝³ ≠ 0\nx✝ : Multiset α\na✝¹ : α\na✝ : a✝¹ ∈ x✝\n⊢ Prime a✝¹ ↔ Irreducible a✝¹\n[PROOFSTEP]\nsimp_rw [irreducible_iff_prime_of_exists_unique_irreducible_factors eif uif]\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : DecidableEq α\ninst✝ : UniqueFactorizationMonoid α\na : α\nane0 : a ≠ 0\n⊢ Multiset.prod (factors a) ~ᵤ a\n[PROOFSTEP]\nrw [factors, dif_neg ane0]\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : DecidableEq α\ninst✝ : UniqueFactorizationMonoid α\na : α\nane0 : a ≠ 0\n⊢ Multiset.prod (Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a)) ~ᵤ a\n[PROOFSTEP]\nexact (Classical.choose_spec (exists_prime_factors a ane0)).2\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : DecidableEq α\ninst✝ : UniqueFactorizationMonoid α\np a : α\nh : p ∈ factors a\n⊢ a ≠ 0\n[PROOFSTEP]\nintro ha\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : DecidableEq α\ninst✝ : UniqueFactorizationMonoid α\np a : α\nh : p ∈ factors a\nha : a = 0\n⊢ False\n[PROOFSTEP]\nrw [factors, dif_pos ha] at h \n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : DecidableEq α\ninst✝ : UniqueFactorizationMonoid α\np a : α\nh : p ∈ 0\nha : a = 0\n⊢ False\n[PROOFSTEP]\nexact Multiset.not_mem_zero _ h\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : DecidableEq α\ninst✝ : UniqueFactorizationMonoid α\na x : α\nhx : x ∈ factors a\n⊢ Prime x\n[PROOFSTEP]\nhave ane0 := ne_zero_of_mem_factors hx\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : DecidableEq α\ninst✝ : UniqueFactorizationMonoid α\na x : α\nhx : x ∈ factors a\nane0 : a ≠ 0\n⊢ Prime x\n[PROOFSTEP]\nrw [factors, dif_neg ane0] at hx \n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : DecidableEq α\ninst✝ : UniqueFactorizationMonoid α\na x : α\nane0 : a ≠ 0\nhx : x ∈ Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a)\n⊢ Prime x\n[PROOFSTEP]\nexact (Classical.choose_spec (UniqueFactorizationMonoid.exists_prime_factors a ane0)).1 x hx\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : DecidableEq α\ninst✝ : UniqueFactorizationMonoid α\n⊢ factors 0 = 0\n[PROOFSTEP]\nsimp [factors]\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : DecidableEq α\ninst✝ : UniqueFactorizationMonoid α\n⊢ factors 1 = 0\n[PROOFSTEP]\nnontriviality α using factors\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : DecidableEq α\ninst✝ : UniqueFactorizationMonoid α\n✝ : Nontrivial α\n⊢ factors 1 = 0\n[PROOFSTEP]\nrw [← Multiset.rel_zero_right]\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : DecidableEq α\ninst✝ : UniqueFactorizationMonoid α\n✝ : Nontrivial α\n⊢ Multiset.Rel ?m.413739 (factors 1) 0\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : DecidableEq α\ninst✝ : UniqueFactorizationMonoid α\n✝ : Nontrivial α\n⊢ Type ?u.413736\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : DecidableEq α\ninst✝ : UniqueFactorizationMonoid α\n✝ : Nontrivial α\n⊢ α → ?m.413738 → Prop\n[PROOFSTEP]\nrefine' factors_unique irreducible_of_factor (fun x hx => (Multiset.not_mem_zero x hx).elim) _\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : DecidableEq α\ninst✝ : UniqueFactorizationMonoid α\n✝ : Nontrivial α\n⊢ Multiset.prod (factors 1) ~ᵤ Multiset.prod 0\n[PROOFSTEP]\nrw [Multiset.prod_zero]\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : DecidableEq α\ninst✝ : UniqueFactorizationMonoid α\n✝ : Nontrivial α\n⊢ Multiset.prod (factors 1) ~ᵤ 1\n[PROOFSTEP]\nexact factors_prod one_ne_zero\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : DecidableEq α\ninst✝ : UniqueFactorizationMonoid α\na p : α\nha0 : a ≠ 0\nhp : Irreducible p\nx✝ : p ∣ a\nb : α\nhb : a = p * b\nhb0 : b = 0\n⊢ False\n[PROOFSTEP]\nsimp_all\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : DecidableEq α\ninst✝ : UniqueFactorizationMonoid α\na p : α\nha0 : a ≠ 0\nhp : Irreducible p\nx✝ : p ∣ a\nb : α\nhb : a = p * b\nhb0 : b ≠ 0\n⊢ p * b ~ᵤ Multiset.prod (p ::ₘ factors b)\n[PROOFSTEP]\nrw [Multiset.prod_cons]\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : DecidableEq α\ninst✝ : UniqueFactorizationMonoid α\na p : α\nha0 : a ≠ 0\nhp : Irreducible p\nx✝ : p ∣ a\nb : α\nhb : a = p * b\nhb0 : b ≠ 0\n⊢ p * b ~ᵤ p * Multiset.prod (factors b)\n[PROOFSTEP]\nexact (factors_prod hb0).symm.mul_left _\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : DecidableEq α\ninst✝ : UniqueFactorizationMonoid α\na p : α\nha0 : a ≠ 0\nhp : Irreducible p\nx✝ : p ∣ a\nb : α\nhb : a = p * b\nhb0 : b ≠ 0\nthis : Multiset.Rel Associated (p ::ₘ factors b) (factors a)\n⊢ p ∈ p ::ₘ factors b\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : DecidableEq α\ninst✝ : UniqueFactorizationMonoid α\nx : α\nhx : x ≠ 0\nh : ¬IsUnit x\n⊢ ∃ p, p ∈ factors x\n[PROOFSTEP]\nobtain ⟨p', hp', hp'x⟩ := WfDvdMonoid.exists_irreducible_factor h hx\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : DecidableEq α\ninst✝ : UniqueFactorizationMonoid α\nx : α\nhx : x ≠ 0\nh : ¬IsUnit x\np' : α\nhp' : Irreducible p'\nhp'x : p' ∣ x\n⊢ ∃ p, p ∈ factors x\n[PROOFSTEP]\nobtain ⟨p, hp, _⟩ := exists_mem_factors_of_dvd hx hp' hp'x\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : DecidableEq α\ninst✝ : UniqueFactorizationMonoid α\nx : α\nhx : x ≠ 0\nh : ¬IsUnit x\np' : α\nhp' : Irreducible p'\nhp'x : p' ∣ x\np : α\nhp : p ∈ factors x\nright✝ : p' ~ᵤ p\n⊢ ∃ p, p ∈ factors x\n[PROOFSTEP]\nexact ⟨p, hp⟩\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : DecidableEq α\ninst✝ : UniqueFactorizationMonoid α\nx y : α\nhx : x ≠ 0\nhy : y ≠ 0\n⊢ Multiset.Rel Associated (factors (x * y)) (factors x + factors y)\n[PROOFSTEP]\nrefine'\n factors_unique irreducible_of_factor\n (fun a ha => (Multiset.mem_add.mp ha).by_cases (irreducible_of_factor _) (irreducible_of_factor _))\n ((factors_prod (mul_ne_zero hx hy)).trans _)\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : DecidableEq α\ninst✝ : UniqueFactorizationMonoid α\nx y : α\nhx : x ≠ 0\nhy : y ≠ 0\n⊢ x * y ~ᵤ Multiset.prod (factors x + factors y)\n[PROOFSTEP]\nrw [Multiset.prod_add]\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : DecidableEq α\ninst✝ : UniqueFactorizationMonoid α\nx y : α\nhx : x ≠ 0\nhy : y ≠ 0\n⊢ x * y ~ᵤ Multiset.prod (factors x) * Multiset.prod (factors y)\n[PROOFSTEP]\nexact (Associated.mul_mul (factors_prod hx) (factors_prod hy)).symm\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : DecidableEq α\ninst✝ : UniqueFactorizationMonoid α\nx : α\nn : ℕ\n⊢ Multiset.Rel Associated (factors (x ^ n)) (n • factors x)\n[PROOFSTEP]\nmatch n with\n| 0 => rw [zero_smul, pow_zero, factors_one, Multiset.rel_zero_right]\n| n + 1 =>\n · by_cases h0 : x = 0\n · simp [h0, zero_pow n.succ_pos, smul_zero]\n · rw [pow_succ, succ_nsmul]\n refine' Multiset.Rel.trans _ (factors_mul h0 (pow_ne_zero n h0)) _\n refine' Multiset.Rel.add _ <| factors_pow n\n exact Multiset.rel_refl_of_refl_on fun y _ => Associated.refl _\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : DecidableEq α\ninst✝ : UniqueFactorizationMonoid α\nx : α\nn : ℕ\n⊢ Multiset.Rel Associated (factors (x ^ 0)) (0 • factors x)\n[PROOFSTEP]\nrw [zero_smul, pow_zero, factors_one, Multiset.rel_zero_right]\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : DecidableEq α\ninst✝ : UniqueFactorizationMonoid α\nx : α\nn✝ n : ℕ\n⊢ Multiset.Rel Associated (factors (x ^ (n + 1))) ((n + 1) • factors x)\n[PROOFSTEP]\nby_cases h0 : x = 0\n[GOAL]\ncase pos\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : DecidableEq α\ninst✝ : UniqueFactorizationMonoid α\nx : α\nn✝ n : ℕ\nh0 : x = 0\n⊢ Multiset.Rel Associated (factors (x ^ (n + 1))) ((n + 1) • factors x)\n[PROOFSTEP]\nsimp [h0, zero_pow n.succ_pos, smul_zero]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : DecidableEq α\ninst✝ : UniqueFactorizationMonoid α\nx : α\nn✝ n : ℕ\nh0 : ¬x = 0\n⊢ Multiset.Rel Associated (factors (x ^ (n + 1))) ((n + 1) • factors x)\n[PROOFSTEP]\nrw [pow_succ, succ_nsmul]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : DecidableEq α\ninst✝ : UniqueFactorizationMonoid α\nx : α\nn✝ n : ℕ\nh0 : ¬x = 0\n⊢ Multiset.Rel Associated (factors (x * x ^ n)) (factors x + n • factors x)\n[PROOFSTEP]\nrefine' Multiset.Rel.trans _ (factors_mul h0 (pow_ne_zero n h0)) _\n[GOAL]\ncase neg\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : DecidableEq α\ninst✝ : UniqueFactorizationMonoid α\nx : α\nn✝ n : ℕ\nh0 : ¬x = 0\n⊢ Multiset.Rel Associated (factors x + factors (x ^ n)) (factors x + n • factors x)\n[PROOFSTEP]\nrefine' Multiset.Rel.add _ <| factors_pow n\n[GOAL]\ncase neg\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : DecidableEq α\ninst✝ : UniqueFactorizationMonoid α\nx : α\nn✝ n : ℕ\nh0 : ¬x = 0\n⊢ Multiset.Rel Associated (factors x) (factors x)\n[PROOFSTEP]\nexact Multiset.rel_refl_of_refl_on fun y _ => Associated.refl _\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : DecidableEq α\ninst✝ : UniqueFactorizationMonoid α\nx : α\nhx : x ≠ 0\n⊢ 0 < factors x ↔ ¬IsUnit x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : DecidableEq α\ninst✝ : UniqueFactorizationMonoid α\nx : α\nhx : x ≠ 0\n⊢ 0 < factors x → ¬IsUnit x\n[PROOFSTEP]\nintro h hx\n[GOAL]\ncase mp\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : DecidableEq α\ninst✝ : UniqueFactorizationMonoid α\nx : α\nhx✝ : x ≠ 0\nh : 0 < factors x\nhx : IsUnit x\n⊢ False\n[PROOFSTEP]\nobtain ⟨p, hp⟩ := Multiset.exists_mem_of_ne_zero h.ne'\n[GOAL]\ncase mp.intro\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : DecidableEq α\ninst✝ : UniqueFactorizationMonoid α\nx : α\nhx✝ : x ≠ 0\nh : 0 < factors x\nhx : IsUnit x\np : α\nhp : p ∈ factors x\n⊢ False\n[PROOFSTEP]\nexact (prime_of_factor _ hp).not_unit (isUnit_of_dvd_unit (dvd_of_mem_factors hp) hx)\n[GOAL]\ncase mpr\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : DecidableEq α\ninst✝ : UniqueFactorizationMonoid α\nx : α\nhx : x ≠ 0\n⊢ ¬IsUnit x → 0 < factors x\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : DecidableEq α\ninst✝ : UniqueFactorizationMonoid α\nx : α\nhx : x ≠ 0\nh : ¬IsUnit x\n⊢ 0 < factors x\n[PROOFSTEP]\nobtain ⟨p, hp⟩ := exists_mem_factors hx h\n[GOAL]\ncase mpr.intro\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : DecidableEq α\ninst✝ : UniqueFactorizationMonoid α\nx : α\nhx : x ≠ 0\nh : ¬IsUnit x\np : α\nhp : p ∈ factors x\n⊢ 0 < factors x\n[PROOFSTEP]\nexact bot_lt_iff_ne_bot.mpr (mt Multiset.eq_zero_iff_forall_not_mem.mp (not_forall.mpr ⟨p, not_not.mpr hp⟩))\n[GOAL]\nα : Type u_1\ninst✝⁷ : CancelCommMonoidWithZero α\ninst✝⁶ : DecidableEq α\ninst✝⁵ : NormalizationMonoid α\ninst✝⁴ : UniqueFactorizationMonoid α\nM : Type u_2\ninst✝³ : CancelCommMonoidWithZero M\ninst✝² : DecidableEq M\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : Unique Mˣ\nx : M\n⊢ factors x = normalizedFactors x\n[PROOFSTEP]\nunfold normalizedFactors\n[GOAL]\nα : Type u_1\ninst✝⁷ : CancelCommMonoidWithZero α\ninst✝⁶ : DecidableEq α\ninst✝⁵ : NormalizationMonoid α\ninst✝⁴ : UniqueFactorizationMonoid α\nM : Type u_2\ninst✝³ : CancelCommMonoidWithZero M\ninst✝² : DecidableEq M\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : Unique Mˣ\nx : M\n⊢ factors x = Multiset.map (↑normalize) (factors x)\n[PROOFSTEP]\nconvert (Multiset.map_id (factors x)).symm\n[GOAL]\ncase h.e'_3.a.h.e\nα : Type u_1\ninst✝⁷ : CancelCommMonoidWithZero α\ninst✝⁶ : DecidableEq α\ninst✝⁵ : NormalizationMonoid α\ninst✝⁴ : UniqueFactorizationMonoid α\nM : Type u_2\ninst✝³ : CancelCommMonoidWithZero M\ninst✝² : DecidableEq M\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : Unique Mˣ\nx x✝ : M\na✝ : x✝ ∈ factors x\n⊢ ↑normalize = id\n[PROOFSTEP]\next p\n[GOAL]\ncase h.e'_3.a.h.e.h\nα : Type u_1\ninst✝⁷ : CancelCommMonoidWithZero α\ninst✝⁶ : DecidableEq α\ninst✝⁵ : NormalizationMonoid α\ninst✝⁴ : UniqueFactorizationMonoid α\nM : Type u_2\ninst✝³ : CancelCommMonoidWithZero M\ninst✝² : DecidableEq M\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : Unique Mˣ\nx x✝ : M\na✝ : x✝ ∈ factors x\np : M\n⊢ ↑normalize p = id p\n[PROOFSTEP]\nexact normalize_eq p\n[GOAL]\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\na : α\nane0 : a ≠ 0\n⊢ Multiset.prod (normalizedFactors a) ~ᵤ a\n[PROOFSTEP]\nrw [normalizedFactors, factors, dif_neg ane0]\n[GOAL]\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\na : α\nane0 : a ≠ 0\n⊢ Multiset.prod\n (Multiset.map (↑normalize) (Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a))) ~ᵤ\n a\n[PROOFSTEP]\nrefine' Associated.trans _ (Classical.choose_spec (exists_prime_factors a ane0)).2\n[GOAL]\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\na : α\nane0 : a ≠ 0\n⊢ Multiset.prod\n (Multiset.map (↑normalize) (Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a))) ~ᵤ\n Multiset.prod (Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a))\n[PROOFSTEP]\nrw [← Associates.mk_eq_mk_iff_associated, ← Associates.prod_mk, ← Associates.prod_mk, Multiset.map_map]\n[GOAL]\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\na : α\nane0 : a ≠ 0\n⊢ Multiset.prod\n (Multiset.map (Associates.mk ∘ ↑normalize)\n (Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a))) =\n Multiset.prod\n (Multiset.map Associates.mk (Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a)))\n[PROOFSTEP]\ncongr 2\n[GOAL]\ncase e_a.e_f\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\na : α\nane0 : a ≠ 0\n⊢ Associates.mk ∘ ↑normalize = Associates.mk\n[PROOFSTEP]\next\n[GOAL]\ncase e_a.e_f.h\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\na : α\nane0 : a ≠ 0\nx✝ : α\n⊢ (Associates.mk ∘ ↑normalize) x✝ = Associates.mk x✝\n[PROOFSTEP]\nrw [Function.comp_apply, Associates.mk_normalize]\n[GOAL]\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\na : α\n⊢ ∀ (x : α), x ∈ normalizedFactors a → Prime x\n[PROOFSTEP]\nrw [normalizedFactors, factors]\n[GOAL]\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\na : α\n⊢ ∀ (x : α),\n x ∈\n Multiset.map (↑normalize)\n (if h : a = 0 then 0 else Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a)) →\n Prime x\n[PROOFSTEP]\nsplit_ifs with ane0\n[GOAL]\ncase pos\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\na : α\nane0 : a = 0\n⊢ ∀ (x : α), x ∈ Multiset.map (fun x => ↑normalize x) 0 → Prime x\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\na : α\nane0 : ¬a = 0\n⊢ ∀ (x : α),\n x ∈\n Multiset.map (fun x => ↑normalize x)\n (Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a)) →\n Prime x\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase neg\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\na : α\nane0 : ¬a = 0\nx : α\nhx :\n x ∈\n Multiset.map (fun x => ↑normalize x)\n (Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a))\n⊢ Prime x\n[PROOFSTEP]\nrcases Multiset.mem_map.1 hx with ⟨y, ⟨hy, rfl⟩⟩\n[GOAL]\ncase neg.intro.intro\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\na : α\nane0 : ¬a = 0\ny : α\nhy : y ∈ Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a)\nhx :\n ↑normalize y ∈\n Multiset.map (fun x => ↑normalize x)\n (Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a))\n⊢ Prime (↑normalize y)\n[PROOFSTEP]\nrw [(normalize_associated _).prime_iff]\n[GOAL]\ncase neg.intro.intro\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\na : α\nane0 : ¬a = 0\ny : α\nhy : y ∈ Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a)\nhx :\n ↑normalize y ∈\n Multiset.map (fun x => ↑normalize x)\n (Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a))\n⊢ Prime y\n[PROOFSTEP]\nexact (Classical.choose_spec (UniqueFactorizationMonoid.exists_prime_factors a ane0)).1 y hy\n[GOAL]\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\na : α\n⊢ ∀ (x : α), x ∈ normalizedFactors a → ↑normalize x = x\n[PROOFSTEP]\nrw [normalizedFactors, factors]\n[GOAL]\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\na : α\n⊢ ∀ (x : α),\n x ∈\n Multiset.map (↑normalize)\n (if h : a = 0 then 0 else Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a)) →\n ↑normalize x = x\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\na : α\nh : a = 0\n⊢ ∀ (x : α), x ∈ Multiset.map (fun x => ↑normalize x) 0 → ↑normalize x = x\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\na : α\nh : ¬a = 0\n⊢ ∀ (x : α),\n x ∈\n Multiset.map (fun x => ↑normalize x)\n (Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a)) →\n ↑normalize x = x\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase neg\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\na : α\nh : ¬a = 0\nx : α\nhx :\n x ∈\n Multiset.map (fun x => ↑normalize x)\n (Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a))\n⊢ ↑normalize x = x\n[PROOFSTEP]\nobtain ⟨y, _, rfl⟩ := Multiset.mem_map.1 hx\n[GOAL]\ncase neg.intro.intro\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\na : α\nh : ¬a = 0\ny : α\nleft✝ : y ∈ Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a)\nhx :\n ↑normalize y ∈\n Multiset.map (fun x => ↑normalize x)\n (Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ a))\n⊢ ↑normalize (↑normalize y) = ↑normalize y\n[PROOFSTEP]\napply normalize_idem\n[GOAL]\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\na : α\nha : Irreducible a\n⊢ normalizedFactors a = {↑normalize a}\n[PROOFSTEP]\nobtain ⟨p, a_assoc, hp⟩ := prime_factors_irreducible ha ⟨prime_of_normalized_factor, normalizedFactors_prod ha.ne_zero⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\na : α\nha : Irreducible a\np : α\na_assoc : a ~ᵤ p\nhp : normalizedFactors a = {p}\n⊢ normalizedFactors a = {↑normalize a}\n[PROOFSTEP]\nhave p_mem : p ∈ normalizedFactors a := by\n rw [hp]\n exact Multiset.mem_singleton_self _\n[GOAL]\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\na : α\nha : Irreducible a\np : α\na_assoc : a ~ᵤ p\nhp : normalizedFactors a = {p}\n⊢ p ∈ normalizedFactors a\n[PROOFSTEP]\nrw [hp]\n[GOAL]\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\na : α\nha : Irreducible a\np : α\na_assoc : a ~ᵤ p\nhp : normalizedFactors a = {p}\n⊢ p ∈ {p}\n[PROOFSTEP]\nexact Multiset.mem_singleton_self _\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\na : α\nha : Irreducible a\np : α\na_assoc : a ~ᵤ p\nhp : normalizedFactors a = {p}\np_mem : p ∈ normalizedFactors a\n⊢ normalizedFactors a = {↑normalize a}\n[PROOFSTEP]\nconvert hp\n[GOAL]\ncase h.e'_3.h.e'_4\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\na : α\nha : Irreducible a\np : α\na_assoc : a ~ᵤ p\nhp : normalizedFactors a = {p}\np_mem : p ∈ normalizedFactors a\n⊢ ↑normalize a = p\n[PROOFSTEP]\nrwa [← normalize_normalized_factor p p_mem, normalize_eq_normalize_iff, dvd_dvd_iff_associated]\n[GOAL]\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\na : α\n⊢ ∀ (p : α), p ∈ normalizedFactors a → ∀ (q : α), q ∈ normalizedFactors a → p ∣ q → p = q\n[PROOFSTEP]\nintro p hp q hq hdvd\n[GOAL]\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\na p : α\nhp : p ∈ normalizedFactors a\nq : α\nhq : q ∈ normalizedFactors a\nhdvd : p ∣ q\n⊢ p = q\n[PROOFSTEP]\nconvert\n normalize_eq_normalize hdvd\n ((prime_of_normalized_factor _ hp).irreducible.dvd_symm (prime_of_normalized_factor _ hq).irreducible hdvd)\n[GOAL]\ncase h.e'_2\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\na p : α\nhp : p ∈ normalizedFactors a\nq : α\nhq : q ∈ normalizedFactors a\nhdvd : p ∣ q\n⊢ p = ↑normalize p\n[PROOFSTEP]\napply (normalize_normalized_factor _ ‹_›).symm\n[GOAL]\ncase h.e'_3\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\na p : α\nhp : p ∈ normalizedFactors a\nq : α\nhq : q ∈ normalizedFactors a\nhdvd : p ∣ q\n⊢ q = ↑normalize q\n[PROOFSTEP]\napply (normalize_normalized_factor _ ‹_›).symm\n[GOAL]\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\na p : α\nha0 : a ≠ 0\nhp : Irreducible p\nx✝ : p ∣ a\nb : α\nhb : a = p * b\nhb0 : b = 0\n⊢ False\n[PROOFSTEP]\nsimp_all\n[GOAL]\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\na p : α\nha0 : a ≠ 0\nhp : Irreducible p\nx✝ : p ∣ a\nb : α\nhb : a = p * b\nhb0 : b ≠ 0\n⊢ p * b ~ᵤ Multiset.prod (p ::ₘ normalizedFactors b)\n[PROOFSTEP]\nrw [Multiset.prod_cons]\n[GOAL]\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\na p : α\nha0 : a ≠ 0\nhp : Irreducible p\nx✝ : p ∣ a\nb : α\nhb : a = p * b\nhb0 : b ≠ 0\n⊢ p * b ~ᵤ p * Multiset.prod (normalizedFactors b)\n[PROOFSTEP]\nexact (normalizedFactors_prod hb0).symm.mul_left _\n[GOAL]\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\na p : α\nha0 : a ≠ 0\nhp : Irreducible p\nx✝ : p ∣ a\nb : α\nhb : a = p * b\nhb0 : b ≠ 0\nthis : Multiset.Rel Associated (p ::ₘ normalizedFactors b) (normalizedFactors a)\n⊢ p ∈ p ::ₘ normalizedFactors b\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx : α\nhx : x ≠ 0\nh : ¬IsUnit x\n⊢ ∃ p, p ∈ normalizedFactors x\n[PROOFSTEP]\nobtain ⟨p', hp', hp'x⟩ := WfDvdMonoid.exists_irreducible_factor h hx\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx : α\nhx : x ≠ 0\nh : ¬IsUnit x\np' : α\nhp' : Irreducible p'\nhp'x : p' ∣ x\n⊢ ∃ p, p ∈ normalizedFactors x\n[PROOFSTEP]\nobtain ⟨p, hp, _⟩ := exists_mem_normalizedFactors_of_dvd hx hp' hp'x\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx : α\nhx : x ≠ 0\nh : ¬IsUnit x\np' : α\nhp' : Irreducible p'\nhp'x : p' ∣ x\np : α\nhp : p ∈ normalizedFactors x\nright✝ : p' ~ᵤ p\n⊢ ∃ p, p ∈ normalizedFactors x\n[PROOFSTEP]\nexact ⟨p, hp⟩\n[GOAL]\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\n⊢ normalizedFactors 0 = 0\n[PROOFSTEP]\nsimp [normalizedFactors, factors]\n[GOAL]\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\n⊢ normalizedFactors 1 = 0\n[PROOFSTEP]\ncases' subsingleton_or_nontrivial α with h h\n[GOAL]\ncase inl\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nh : Subsingleton α\n⊢ normalizedFactors 1 = 0\n[PROOFSTEP]\ndsimp [normalizedFactors, factors]\n[GOAL]\ncase inl\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nh : Subsingleton α\n⊢ Multiset.map (↑normalize)\n (if h : 1 = 0 then 0 else Classical.choose (_ : ∃ f, (∀ (b : α), b ∈ f → Prime b) ∧ Multiset.prod f ~ᵤ 1)) =\n 0\n[PROOFSTEP]\nsimp [Subsingleton.elim (1 : α) 0]\n[GOAL]\ncase inr\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nh : Nontrivial α\n⊢ normalizedFactors 1 = 0\n[PROOFSTEP]\nrw [← Multiset.rel_zero_right]\n[GOAL]\ncase inr\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nh : Nontrivial α\n⊢ Multiset.Rel ?m.629311 (normalizedFactors 1) 0\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nh : Nontrivial α\n⊢ Type ?u.629308\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nh : Nontrivial α\n⊢ α → ?m.629310 → Prop\n[PROOFSTEP]\napply factors_unique irreducible_of_normalized_factor\n[GOAL]\ncase inr.hg\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nh : Nontrivial α\n⊢ ∀ (x : α), x ∈ 0 → Irreducible x\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase inr.hg\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nh : Nontrivial α\nx : α\nhx : x ∈ 0\n⊢ Irreducible x\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase inr.hg.h\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nh : Nontrivial α\nx : α\nhx : x ∈ 0\n⊢ False\n[PROOFSTEP]\napply Multiset.not_mem_zero x hx\n[GOAL]\ncase inr.h\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nh : Nontrivial α\n⊢ Multiset.prod (normalizedFactors 1) ~ᵤ Multiset.prod 0\n[PROOFSTEP]\napply normalizedFactors_prod one_ne_zero\n[GOAL]\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx y : α\nhx : x ≠ 0\nhy : y ≠ 0\n⊢ normalizedFactors (x * y) = normalizedFactors x + normalizedFactors y\n[PROOFSTEP]\nhave h : (normalize : α → α) = Associates.out ∘ Associates.mk :=\n by\n ext\n rw [Function.comp_apply, Associates.out_mk]\n[GOAL]\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx y : α\nhx : x ≠ 0\nhy : y ≠ 0\n⊢ ↑normalize = Associates.out ∘ Associates.mk\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx y : α\nhx : x ≠ 0\nhy : y ≠ 0\nx✝ : α\n⊢ ↑normalize x✝ = (Associates.out ∘ Associates.mk) x✝\n[PROOFSTEP]\nrw [Function.comp_apply, Associates.out_mk]\n[GOAL]\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx y : α\nhx : x ≠ 0\nhy : y ≠ 0\nh : ↑normalize = Associates.out ∘ Associates.mk\n⊢ normalizedFactors (x * y) = normalizedFactors x + normalizedFactors y\n[PROOFSTEP]\nrw [← Multiset.map_id' (normalizedFactors (x * y)), ← Multiset.map_id' (normalizedFactors x), ←\n Multiset.map_id' (normalizedFactors y), ← Multiset.map_congr rfl normalize_normalized_factor, ←\n Multiset.map_congr rfl normalize_normalized_factor, ← Multiset.map_congr rfl normalize_normalized_factor, ←\n Multiset.map_add, h, ← Multiset.map_map Associates.out, eq_comm, ← Multiset.map_map Associates.out]\n[GOAL]\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx y : α\nhx : x ≠ 0\nhy : y ≠ 0\nh : ↑normalize = Associates.out ∘ Associates.mk\n⊢ Multiset.map Associates.out (Multiset.map Associates.mk (normalizedFactors x + normalizedFactors y)) =\n Multiset.map Associates.out (Multiset.map Associates.mk (normalizedFactors (x * y)))\n[PROOFSTEP]\nrefine' congr rfl _\n[GOAL]\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx y : α\nhx : x ≠ 0\nhy : y ≠ 0\nh : ↑normalize = Associates.out ∘ Associates.mk\n⊢ Multiset.map Associates.mk (normalizedFactors x + normalizedFactors y) =\n Multiset.map Associates.mk (normalizedFactors (x * y))\n[PROOFSTEP]\napply Multiset.map_mk_eq_map_mk_of_rel\n[GOAL]\ncase hst\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx y : α\nhx : x ≠ 0\nhy : y ≠ 0\nh : ↑normalize = Associates.out ∘ Associates.mk\n⊢ Multiset.Rel Setoid.r (normalizedFactors x + normalizedFactors y) (normalizedFactors (x * y))\n[PROOFSTEP]\napply factors_unique\n[GOAL]\ncase hst.hf\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx y : α\nhx : x ≠ 0\nhy : y ≠ 0\nh : ↑normalize = Associates.out ∘ Associates.mk\n⊢ ∀ (x_1 : α), x_1 ∈ normalizedFactors x + normalizedFactors y → Irreducible x_1\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase hst.hf\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx✝ y : α\nhx✝ : x✝ ≠ 0\nhy : y ≠ 0\nh : ↑normalize = Associates.out ∘ Associates.mk\nx : α\nhx : x ∈ normalizedFactors x✝ + normalizedFactors y\n⊢ Irreducible x\n[PROOFSTEP]\nrcases Multiset.mem_add.1 hx with (hx | hx)\n[GOAL]\ncase hst.hf.inl\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx✝ y : α\nhx✝¹ : x✝ ≠ 0\nhy : y ≠ 0\nh : ↑normalize = Associates.out ∘ Associates.mk\nx : α\nhx✝ : x ∈ normalizedFactors x✝ + normalizedFactors y\nhx : x ∈ normalizedFactors x✝\n⊢ Irreducible x\n[PROOFSTEP]\nexact irreducible_of_normalized_factor x hx\n[GOAL]\ncase hst.hf.inr\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx✝ y : α\nhx✝¹ : x✝ ≠ 0\nhy : y ≠ 0\nh : ↑normalize = Associates.out ∘ Associates.mk\nx : α\nhx✝ : x ∈ normalizedFactors x✝ + normalizedFactors y\nhx : x ∈ normalizedFactors y\n⊢ Irreducible x\n[PROOFSTEP]\nexact irreducible_of_normalized_factor x hx\n[GOAL]\ncase hst.hg\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx y : α\nhx : x ≠ 0\nhy : y ≠ 0\nh : ↑normalize = Associates.out ∘ Associates.mk\n⊢ ∀ (x_1 : α), x_1 ∈ normalizedFactors (x * y) → Irreducible x_1\n[PROOFSTEP]\nexact irreducible_of_normalized_factor\n[GOAL]\ncase hst.h\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx y : α\nhx : x ≠ 0\nhy : y ≠ 0\nh : ↑normalize = Associates.out ∘ Associates.mk\n⊢ Multiset.prod (normalizedFactors x + normalizedFactors y) ~ᵤ Multiset.prod (normalizedFactors (x * y))\n[PROOFSTEP]\nrw [Multiset.prod_add]\n[GOAL]\ncase hst.h\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx y : α\nhx : x ≠ 0\nhy : y ≠ 0\nh : ↑normalize = Associates.out ∘ Associates.mk\n⊢ Multiset.prod (normalizedFactors x) * Multiset.prod (normalizedFactors y) ~ᵤ Multiset.prod (normalizedFactors (x * y))\n[PROOFSTEP]\nexact\n ((normalizedFactors_prod hx).mul_mul (normalizedFactors_prod hy)).trans\n (normalizedFactors_prod (mul_ne_zero hx hy)).symm\n[GOAL]\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx : α\nn : ℕ\n⊢ normalizedFactors (x ^ n) = n • normalizedFactors x\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx : α\n⊢ normalizedFactors (x ^ Nat.zero) = Nat.zero • normalizedFactors x\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx : α\nn : ℕ\nih : normalizedFactors (x ^ n) = n • normalizedFactors x\n⊢ normalizedFactors (x ^ Nat.succ n) = Nat.succ n • normalizedFactors x\n[PROOFSTEP]\nby_cases h0 : x = 0\n[GOAL]\ncase pos\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx : α\nn : ℕ\nih : normalizedFactors (x ^ n) = n • normalizedFactors x\nh0 : x = 0\n⊢ normalizedFactors (x ^ Nat.succ n) = Nat.succ n • normalizedFactors x\n[PROOFSTEP]\nsimp [h0, zero_pow n.succ_pos, smul_zero]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx : α\nn : ℕ\nih : normalizedFactors (x ^ n) = n • normalizedFactors x\nh0 : ¬x = 0\n⊢ normalizedFactors (x ^ Nat.succ n) = Nat.succ n • normalizedFactors x\n[PROOFSTEP]\nrw [pow_succ, succ_nsmul, normalizedFactors_mul h0 (pow_ne_zero _ h0), ih]\n[GOAL]\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\np : α\nhp : Irreducible p\nk : ℕ\n⊢ normalizedFactors (p ^ k) = Multiset.replicate k (↑normalize p)\n[PROOFSTEP]\nrw [UniqueFactorizationMonoid.normalizedFactors_pow, normalizedFactors_irreducible hp, Multiset.nsmul_singleton]\n[GOAL]\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\ns : Multiset α\nhs : ∀ (a : α), a ∈ s → Irreducible a\n⊢ normalizedFactors (Multiset.prod s) = Multiset.map (↑normalize) s\n[PROOFSTEP]\ninduction' s using Multiset.induction with a s ih\n[GOAL]\ncase empty\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\ns : Multiset α\nhs✝ : ∀ (a : α), a ∈ s → Irreducible a\nhs : ∀ (a : α), a ∈ 0 → Irreducible a\n⊢ normalizedFactors (Multiset.prod 0) = Multiset.map (↑normalize) 0\n[PROOFSTEP]\nrw [Multiset.prod_zero, normalizedFactors_one, Multiset.map_zero]\n[GOAL]\ncase cons\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\ns✝ : Multiset α\nhs✝ : ∀ (a : α), a ∈ s✝ → Irreducible a\na : α\ns : Multiset α\nih : (∀ (a : α), a ∈ s → Irreducible a) → normalizedFactors (Multiset.prod s) = Multiset.map (↑normalize) s\nhs : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Irreducible a_1\n⊢ normalizedFactors (Multiset.prod (a ::ₘ s)) = Multiset.map (↑normalize) (a ::ₘ s)\n[PROOFSTEP]\nhave ia := hs a (Multiset.mem_cons_self a _)\n[GOAL]\ncase cons\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\ns✝ : Multiset α\nhs✝ : ∀ (a : α), a ∈ s✝ → Irreducible a\na : α\ns : Multiset α\nih : (∀ (a : α), a ∈ s → Irreducible a) → normalizedFactors (Multiset.prod s) = Multiset.map (↑normalize) s\nhs : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Irreducible a_1\nia : Irreducible a\n⊢ normalizedFactors (Multiset.prod (a ::ₘ s)) = Multiset.map (↑normalize) (a ::ₘ s)\n[PROOFSTEP]\nhave ib := fun b h => hs b (Multiset.mem_cons_of_mem h)\n[GOAL]\ncase cons\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\ns✝ : Multiset α\nhs✝ : ∀ (a : α), a ∈ s✝ → Irreducible a\na : α\ns : Multiset α\nih : (∀ (a : α), a ∈ s → Irreducible a) → normalizedFactors (Multiset.prod s) = Multiset.map (↑normalize) s\nhs : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Irreducible a_1\nia : Irreducible a\nib : ∀ (b : α), b ∈ s → Irreducible b\n⊢ normalizedFactors (Multiset.prod (a ::ₘ s)) = Multiset.map (↑normalize) (a ::ₘ s)\n[PROOFSTEP]\nobtain rfl | ⟨b, hb⟩ := s.empty_or_exists_mem\n[GOAL]\ncase cons.inl\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\ns : Multiset α\nhs✝ : ∀ (a : α), a ∈ s → Irreducible a\na : α\nia : Irreducible a\nih : (∀ (a : α), a ∈ 0 → Irreducible a) → normalizedFactors (Multiset.prod 0) = Multiset.map (↑normalize) 0\nhs : ∀ (a_1 : α), a_1 ∈ a ::ₘ 0 → Irreducible a_1\nib : ∀ (b : α), b ∈ 0 → Irreducible b\n⊢ normalizedFactors (Multiset.prod (a ::ₘ 0)) = Multiset.map (↑normalize) (a ::ₘ 0)\n[PROOFSTEP]\nrw [Multiset.cons_zero, Multiset.prod_singleton, Multiset.map_singleton, normalizedFactors_irreducible ia]\n[GOAL]\ncase cons.inr.intro\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\ns✝ : Multiset α\nhs✝ : ∀ (a : α), a ∈ s✝ → Irreducible a\na : α\ns : Multiset α\nih : (∀ (a : α), a ∈ s → Irreducible a) → normalizedFactors (Multiset.prod s) = Multiset.map (↑normalize) s\nhs : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Irreducible a_1\nia : Irreducible a\nib : ∀ (b : α), b ∈ s → Irreducible b\nb : α\nhb : b ∈ s\n⊢ normalizedFactors (Multiset.prod (a ::ₘ s)) = Multiset.map (↑normalize) (a ::ₘ s)\n[PROOFSTEP]\nhaveI := nontrivial_of_ne b 0 (ib b hb).ne_zero\n[GOAL]\ncase cons.inr.intro\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\ns✝ : Multiset α\nhs✝ : ∀ (a : α), a ∈ s✝ → Irreducible a\na : α\ns : Multiset α\nih : (∀ (a : α), a ∈ s → Irreducible a) → normalizedFactors (Multiset.prod s) = Multiset.map (↑normalize) s\nhs : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Irreducible a_1\nia : Irreducible a\nib : ∀ (b : α), b ∈ s → Irreducible b\nb : α\nhb : b ∈ s\nthis : Nontrivial α\n⊢ normalizedFactors (Multiset.prod (a ::ₘ s)) = Multiset.map (↑normalize) (a ::ₘ s)\n[PROOFSTEP]\nrw [Multiset.prod_cons, Multiset.map_cons,\n normalizedFactors_mul ia.ne_zero (Multiset.prod_ne_zero fun h => (ib 0 h).ne_zero rfl),\n normalizedFactors_irreducible ia, ih ib, Multiset.singleton_add]\n[GOAL]\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx y : α\nhx : x ≠ 0\nhy : y ≠ 0\n⊢ x ∣ y ↔ normalizedFactors x ≤ normalizedFactors y\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx y : α\nhx : x ≠ 0\nhy : y ≠ 0\n⊢ x ∣ y → normalizedFactors x ≤ normalizedFactors y\n[PROOFSTEP]\nrintro ⟨c, rfl⟩\n[GOAL]\ncase mp.intro\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx : α\nhx : x ≠ 0\nc : α\nhy : x * c ≠ 0\n⊢ normalizedFactors x ≤ normalizedFactors (x * c)\n[PROOFSTEP]\nsimp [hx, right_ne_zero_of_mul hy]\n[GOAL]\ncase mpr\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx y : α\nhx : x ≠ 0\nhy : y ≠ 0\n⊢ normalizedFactors x ≤ normalizedFactors y → x ∣ y\n[PROOFSTEP]\nrw [← (normalizedFactors_prod hx).dvd_iff_dvd_left, ← (normalizedFactors_prod hy).dvd_iff_dvd_right]\n[GOAL]\ncase mpr\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx y : α\nhx : x ≠ 0\nhy : y ≠ 0\n⊢ normalizedFactors x ≤ normalizedFactors y → Multiset.prod (normalizedFactors x) ∣ Multiset.prod (normalizedFactors y)\n[PROOFSTEP]\napply Multiset.prod_dvd_prod_of_le\n[GOAL]\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx y : α\nhx : x ≠ 0\nhy : y ≠ 0\n⊢ x ~ᵤ y ↔ normalizedFactors x = normalizedFactors y\n[PROOFSTEP]\nrefine'\n ⟨fun h => _, fun h => (normalizedFactors_prod hx).symm.trans (_root_.trans (by rw [h]) (normalizedFactors_prod hy))⟩\n[GOAL]\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx y : α\nhx : x ≠ 0\nhy : y ≠ 0\nh : normalizedFactors x = normalizedFactors y\n⊢ Multiset.prod (normalizedFactors x) ~ᵤ Multiset.prod (normalizedFactors y)\n[PROOFSTEP]\nrw [h]\n[GOAL]\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx y : α\nhx : x ≠ 0\nhy : y ≠ 0\nh : x ~ᵤ y\n⊢ normalizedFactors x = normalizedFactors y\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx y : α\nhx : x ≠ 0\nhy : y ≠ 0\nh : x ~ᵤ y\n⊢ normalizedFactors x ≤ normalizedFactors y\n[PROOFSTEP]\nrw [← dvd_iff_normalizedFactors_le_normalizedFactors]\n[GOAL]\ncase a\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx y : α\nhx : x ≠ 0\nhy : y ≠ 0\nh : x ~ᵤ y\n⊢ normalizedFactors y ≤ normalizedFactors x\n[PROOFSTEP]\nrw [← dvd_iff_normalizedFactors_le_normalizedFactors]\n[GOAL]\ncase a\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx y : α\nhx : x ≠ 0\nhy : y ≠ 0\nh : x ~ᵤ y\n⊢ x ∣ y\ncase a.hx\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx y : α\nhx : x ≠ 0\nhy : y ≠ 0\nh : x ~ᵤ y\n⊢ x ≠ 0\ncase a.hy\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx y : α\nhx : x ≠ 0\nhy : y ≠ 0\nh : x ~ᵤ y\n⊢ y ≠ 0\ncase a\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx y : α\nhx : x ≠ 0\nhy : y ≠ 0\nh : x ~ᵤ y\n⊢ y ∣ x\ncase a.hx\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx y : α\nhx : x ≠ 0\nhy : y ≠ 0\nh : x ~ᵤ y\n⊢ y ≠ 0\ncase a.hy\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx y : α\nhx : x ≠ 0\nhy : y ≠ 0\nh : x ~ᵤ y\n⊢ x ≠ 0\n[PROOFSTEP]\nall_goals simp [*, h.dvd, h.symm.dvd]\n[GOAL]\ncase a\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx y : α\nhx : x ≠ 0\nhy : y ≠ 0\nh : x ~ᵤ y\n⊢ x ∣ y\n[PROOFSTEP]\nsimp [*, h.dvd, h.symm.dvd]\n[GOAL]\ncase a.hx\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx y : α\nhx : x ≠ 0\nhy : y ≠ 0\nh : x ~ᵤ y\n⊢ x ≠ 0\n[PROOFSTEP]\nsimp [*, h.dvd, h.symm.dvd]\n[GOAL]\ncase a.hy\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx y : α\nhx : x ≠ 0\nhy : y ≠ 0\nh : x ~ᵤ y\n⊢ y ≠ 0\n[PROOFSTEP]\nsimp [*, h.dvd, h.symm.dvd]\n[GOAL]\ncase a\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx y : α\nhx : x ≠ 0\nhy : y ≠ 0\nh : x ~ᵤ y\n⊢ y ∣ x\n[PROOFSTEP]\nsimp [*, h.dvd, h.symm.dvd]\n[GOAL]\ncase a.hx\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx y : α\nhx : x ≠ 0\nhy : y ≠ 0\nh : x ~ᵤ y\n⊢ y ≠ 0\n[PROOFSTEP]\nsimp [*, h.dvd, h.symm.dvd]\n[GOAL]\ncase a.hy\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx y : α\nhx : x ≠ 0\nhy : y ≠ 0\nh : x ~ᵤ y\n⊢ x ≠ 0\n[PROOFSTEP]\nsimp [*, h.dvd, h.symm.dvd]\n[GOAL]\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\np : α\nhp : Irreducible p\nk : ℕ\n⊢ normalizedFactors (p ^ k) = Multiset.replicate k (↑normalize p)\n[PROOFSTEP]\nrw [normalizedFactors_pow, normalizedFactors_irreducible hp, Multiset.nsmul_singleton]\n[GOAL]\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\na p : α\nH : p ∈ normalizedFactors a\n⊢ p ∣ a\n[PROOFSTEP]\nby_cases hcases : a = 0\n[GOAL]\ncase pos\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\na p : α\nH : p ∈ normalizedFactors a\nhcases : a = 0\n⊢ p ∣ a\n[PROOFSTEP]\nrw [hcases]\n[GOAL]\ncase pos\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\na p : α\nH : p ∈ normalizedFactors a\nhcases : a = 0\n⊢ p ∣ 0\n[PROOFSTEP]\nexact dvd_zero p\n[GOAL]\ncase neg\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\na p : α\nH : p ∈ normalizedFactors a\nhcases : ¬a = 0\n⊢ p ∣ a\n[PROOFSTEP]\nexact dvd_trans (Multiset.dvd_prod H) (Associated.dvd (normalizedFactors_prod hcases))\n[GOAL]\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\np r : α\nh : ∀ {m : α}, m ∈ normalizedFactors r → m = p\nhr : r ≠ 0\n⊢ ∃ i, p ^ i ~ᵤ r\n[PROOFSTEP]\nuse Multiset.card.toFun (normalizedFactors r)\n[GOAL]\ncase h\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\np r : α\nh : ∀ {m : α}, m ∈ normalizedFactors r → m = p\nhr : r ≠ 0\n⊢ p ^ ZeroHom.toFun (↑Multiset.card) (normalizedFactors r) ~ᵤ r\n[PROOFSTEP]\nhave := UniqueFactorizationMonoid.normalizedFactors_prod hr\n[GOAL]\ncase h\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\np r : α\nh : ∀ {m : α}, m ∈ normalizedFactors r → m = p\nhr : r ≠ 0\nthis : Multiset.prod (normalizedFactors r) ~ᵤ r\n⊢ p ^ ZeroHom.toFun (↑Multiset.card) (normalizedFactors r) ~ᵤ r\n[PROOFSTEP]\nrwa [Multiset.eq_replicate_of_mem fun b => h, Multiset.prod_replicate] at this \n[GOAL]\nα : Type u_1\ninst✝⁵ : CancelCommMonoidWithZero α\ninst✝⁴ : DecidableEq α\ninst✝³ : NormalizationMonoid α\ninst✝² : UniqueFactorizationMonoid α\ninst✝¹ : Nontrivial α\ninst✝ : Unique αˣ\nm : Multiset α\nh : ∀ (p : α), p ∈ m → Prime p\n⊢ normalizedFactors (Multiset.prod m) = m\n[PROOFSTEP]\nsimpa only [← Multiset.rel_eq, ← associated_eq_eq] using\n prime_factors_unique prime_of_normalized_factor h (normalizedFactors_prod (m.prod_ne_zero_of_prime h))\n[GOAL]\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\na b c : α\nha : a ∈ normalizedFactors c\nhb : b ∈ normalizedFactors c\nh : a ~ᵤ b\n⊢ a = b\n[PROOFSTEP]\nrw [← normalize_normalized_factor a ha, ← normalize_normalized_factor b hb, normalize_eq_normalize_iff]\n[GOAL]\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\na b c : α\nha : a ∈ normalizedFactors c\nhb : b ∈ normalizedFactors c\nh : a ~ᵤ b\n⊢ a ∣ b ∧ b ∣ a\n[PROOFSTEP]\nexact Associated.dvd_dvd h\n[GOAL]\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx : α\nhx : x ≠ 0\n⊢ 0 < normalizedFactors x ↔ ¬IsUnit x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx : α\nhx : x ≠ 0\n⊢ 0 < normalizedFactors x → ¬IsUnit x\n[PROOFSTEP]\nintro h hx\n[GOAL]\ncase mp\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx : α\nhx✝ : x ≠ 0\nh : 0 < normalizedFactors x\nhx : IsUnit x\n⊢ False\n[PROOFSTEP]\nobtain ⟨p, hp⟩ := Multiset.exists_mem_of_ne_zero h.ne'\n[GOAL]\ncase mp.intro\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx : α\nhx✝ : x ≠ 0\nh : 0 < normalizedFactors x\nhx : IsUnit x\np : α\nhp : p ∈ normalizedFactors x\n⊢ False\n[PROOFSTEP]\nexact (prime_of_normalized_factor _ hp).not_unit (isUnit_of_dvd_unit (dvd_of_mem_normalizedFactors hp) hx)\n[GOAL]\ncase mpr\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx : α\nhx : x ≠ 0\n⊢ ¬IsUnit x → 0 < normalizedFactors x\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx : α\nhx : x ≠ 0\nh : ¬IsUnit x\n⊢ 0 < normalizedFactors x\n[PROOFSTEP]\nobtain ⟨p, hp⟩ := exists_mem_normalizedFactors hx h\n[GOAL]\ncase mpr.intro\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx : α\nhx : x ≠ 0\nh : ¬IsUnit x\np : α\nhp : p ∈ normalizedFactors x\n⊢ 0 < normalizedFactors x\n[PROOFSTEP]\nexact bot_lt_iff_ne_bot.mpr (mt Multiset.eq_zero_iff_forall_not_mem.mp (not_forall.mpr ⟨p, not_not.mpr hp⟩))\n[GOAL]\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx y : α\nhx : x ≠ 0\nhy : y ≠ 0\n⊢ DvdNotUnit x y ↔ normalizedFactors x < normalizedFactors y\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx y : α\nhx : x ≠ 0\nhy : y ≠ 0\n⊢ DvdNotUnit x y → normalizedFactors x < normalizedFactors y\n[PROOFSTEP]\nrintro ⟨_, c, hc, rfl⟩\n[GOAL]\ncase mp.intro.intro.intro\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx : α\nhx left✝ : x ≠ 0\nc : α\nhc : ¬IsUnit c\nhy : x * c ≠ 0\n⊢ normalizedFactors x < normalizedFactors (x * c)\n[PROOFSTEP]\nsimp only [hx, right_ne_zero_of_mul hy, normalizedFactors_mul, Ne.def, not_false_iff, lt_add_iff_pos_right,\n normalizedFactors_pos, hc]\n[GOAL]\ncase mpr\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx y : α\nhx : x ≠ 0\nhy : y ≠ 0\n⊢ normalizedFactors x < normalizedFactors y → DvdNotUnit x y\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : DecidableEq α\ninst✝¹ : NormalizationMonoid α\ninst✝ : UniqueFactorizationMonoid α\nx y : α\nhx : x ≠ 0\nhy : y ≠ 0\nh : normalizedFactors x < normalizedFactors y\n⊢ DvdNotUnit x y\n[PROOFSTEP]\nexact\n dvdNotUnit_of_dvd_of_not_dvd ((dvd_iff_normalizedFactors_le_normalizedFactors hx hy).mpr h.le)\n (mt (dvd_iff_normalizedFactors_le_normalizedFactors hy hx).mp h.not_le)\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : Nontrivial α\ninst✝ : UniqueFactorizationMonoid α\n⊢ (fun a =>\n if a = 0 then 0\n else prod (map (Classical.choose (_ : Function.HasRightInverse Associates.mk)) (normalizedFactors a)))\n 1 =\n 1\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : Nontrivial α\ninst✝ : UniqueFactorizationMonoid α\nx y : Associates α\n⊢ OneHom.toFun\n {\n toFun := fun a =>\n if a = 0 then 0\n else prod (map (Classical.choose (_ : Function.HasRightInverse Associates.mk)) (normalizedFactors a)),\n map_one' :=\n (_ :\n (if 1 = 0 then 0\n else prod (map (Classical.choose (_ : Function.HasRightInverse Associates.mk)) (normalizedFactors 1))) =\n 1) }\n (x * y) =\n OneHom.toFun\n {\n toFun := fun a =>\n if a = 0 then 0\n else prod (map (Classical.choose (_ : Function.HasRightInverse Associates.mk)) (normalizedFactors a)),\n map_one' :=\n (_ :\n (if 1 = 0 then 0\n else prod (map (Classical.choose (_ : Function.HasRightInverse Associates.mk)) (normalizedFactors 1))) =\n 1) }\n x *\n OneHom.toFun\n {\n toFun := fun a =>\n if a = 0 then 0\n else prod (map (Classical.choose (_ : Function.HasRightInverse Associates.mk)) (normalizedFactors a)),\n map_one' :=\n (_ :\n (if 1 = 0 then 0\n else prod (map (Classical.choose (_ : Function.HasRightInverse Associates.mk)) (normalizedFactors 1))) =\n 1) }\n y\n[PROOFSTEP]\nby_cases hx : x = 0\n[GOAL]\ncase pos\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : Nontrivial α\ninst✝ : UniqueFactorizationMonoid α\nx y : Associates α\nhx : x = 0\n⊢ OneHom.toFun\n {\n toFun := fun a =>\n if a = 0 then 0\n else prod (map (Classical.choose (_ : Function.HasRightInverse Associates.mk)) (normalizedFactors a)),\n map_one' :=\n (_ :\n (if 1 = 0 then 0\n else prod (map (Classical.choose (_ : Function.HasRightInverse Associates.mk)) (normalizedFactors 1))) =\n 1) }\n (x * y) =\n OneHom.toFun\n {\n toFun := fun a =>\n if a = 0 then 0\n else prod (map (Classical.choose (_ : Function.HasRightInverse Associates.mk)) (normalizedFactors a)),\n map_one' :=\n (_ :\n (if 1 = 0 then 0\n else prod (map (Classical.choose (_ : Function.HasRightInverse Associates.mk)) (normalizedFactors 1))) =\n 1) }\n x *\n OneHom.toFun\n {\n toFun := fun a =>\n if a = 0 then 0\n else prod (map (Classical.choose (_ : Function.HasRightInverse Associates.mk)) (normalizedFactors a)),\n map_one' :=\n (_ :\n (if 1 = 0 then 0\n else prod (map (Classical.choose (_ : Function.HasRightInverse Associates.mk)) (normalizedFactors 1))) =\n 1) }\n y\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : Nontrivial α\ninst✝ : UniqueFactorizationMonoid α\nx y : Associates α\nhx : ¬x = 0\n⊢ OneHom.toFun\n {\n toFun := fun a =>\n if a = 0 then 0\n else prod (map (Classical.choose (_ : Function.HasRightInverse Associates.mk)) (normalizedFactors a)),\n map_one' :=\n (_ :\n (if 1 = 0 then 0\n else prod (map (Classical.choose (_ : Function.HasRightInverse Associates.mk)) (normalizedFactors 1))) =\n 1) }\n (x * y) =\n OneHom.toFun\n {\n toFun := fun a =>\n if a = 0 then 0\n else prod (map (Classical.choose (_ : Function.HasRightInverse Associates.mk)) (normalizedFactors a)),\n map_one' :=\n (_ :\n (if 1 = 0 then 0\n else prod (map (Classical.choose (_ : Function.HasRightInverse Associates.mk)) (normalizedFactors 1))) =\n 1) }\n x *\n OneHom.toFun\n {\n toFun := fun a =>\n if a = 0 then 0\n else prod (map (Classical.choose (_ : Function.HasRightInverse Associates.mk)) (normalizedFactors a)),\n map_one' :=\n (_ :\n (if 1 = 0 then 0\n else prod (map (Classical.choose (_ : Function.HasRightInverse Associates.mk)) (normalizedFactors 1))) =\n 1) }\n y\n[PROOFSTEP]\nby_cases hy : y = 0\n[GOAL]\ncase pos\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : Nontrivial α\ninst✝ : UniqueFactorizationMonoid α\nx y : Associates α\nhx : ¬x = 0\nhy : y = 0\n⊢ OneHom.toFun\n {\n toFun := fun a =>\n if a = 0 then 0\n else prod (map (Classical.choose (_ : Function.HasRightInverse Associates.mk)) (normalizedFactors a)),\n map_one' :=\n (_ :\n (if 1 = 0 then 0\n else prod (map (Classical.choose (_ : Function.HasRightInverse Associates.mk)) (normalizedFactors 1))) =\n 1) }\n (x * y) =\n OneHom.toFun\n {\n toFun := fun a =>\n if a = 0 then 0\n else prod (map (Classical.choose (_ : Function.HasRightInverse Associates.mk)) (normalizedFactors a)),\n map_one' :=\n (_ :\n (if 1 = 0 then 0\n else prod (map (Classical.choose (_ : Function.HasRightInverse Associates.mk)) (normalizedFactors 1))) =\n 1) }\n x *\n OneHom.toFun\n {\n toFun := fun a =>\n if a = 0 then 0\n else prod (map (Classical.choose (_ : Function.HasRightInverse Associates.mk)) (normalizedFactors a)),\n map_one' :=\n (_ :\n (if 1 = 0 then 0\n else prod (map (Classical.choose (_ : Function.HasRightInverse Associates.mk)) (normalizedFactors 1))) =\n 1) }\n y\n[PROOFSTEP]\nsimp [hy]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : Nontrivial α\ninst✝ : UniqueFactorizationMonoid α\nx y : Associates α\nhx : ¬x = 0\nhy : ¬y = 0\n⊢ OneHom.toFun\n {\n toFun := fun a =>\n if a = 0 then 0\n else prod (map (Classical.choose (_ : Function.HasRightInverse Associates.mk)) (normalizedFactors a)),\n map_one' :=\n (_ :\n (if 1 = 0 then 0\n else prod (map (Classical.choose (_ : Function.HasRightInverse Associates.mk)) (normalizedFactors 1))) =\n 1) }\n (x * y) =\n OneHom.toFun\n {\n toFun := fun a =>\n if a = 0 then 0\n else prod (map (Classical.choose (_ : Function.HasRightInverse Associates.mk)) (normalizedFactors a)),\n map_one' :=\n (_ :\n (if 1 = 0 then 0\n else prod (map (Classical.choose (_ : Function.HasRightInverse Associates.mk)) (normalizedFactors 1))) =\n 1) }\n x *\n OneHom.toFun\n {\n toFun := fun a =>\n if a = 0 then 0\n else prod (map (Classical.choose (_ : Function.HasRightInverse Associates.mk)) (normalizedFactors a)),\n map_one' :=\n (_ :\n (if 1 = 0 then 0\n else prod (map (Classical.choose (_ : Function.HasRightInverse Associates.mk)) (normalizedFactors 1))) =\n 1) }\n y\n[PROOFSTEP]\nsimp [hx, hy]\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : Nontrivial α\ninst✝ : UniqueFactorizationMonoid α\n⊢ Function.RightInverse\n (↑{\n toOneHom :=\n {\n toFun := fun a =>\n if a = 0 then 0\n else prod (map (Classical.choose (_ : Function.HasRightInverse Associates.mk)) (normalizedFactors a)),\n map_one' :=\n (_ :\n (if 1 = 0 then 0\n else\n prod (map (Classical.choose (_ : Function.HasRightInverse Associates.mk)) (normalizedFactors 1))) =\n 1) },\n map_mul' :=\n (_ :\n ∀ (x y : Associates α),\n OneHom.toFun\n {\n toFun := fun a =>\n if a = 0 then 0\n else\n prod\n (map (Classical.choose (_ : Function.HasRightInverse Associates.mk)) (normalizedFactors a)),\n map_one' :=\n (_ :\n (if 1 = 0 then 0\n else\n prod\n (map (Classical.choose (_ : Function.HasRightInverse Associates.mk))\n (normalizedFactors 1))) =\n 1) }\n (x * y) =\n OneHom.toFun\n {\n toFun := fun a =>\n if a = 0 then 0\n else\n prod\n (map (Classical.choose (_ : Function.HasRightInverse Associates.mk)) (normalizedFactors a)),\n map_one' :=\n (_ :\n (if 1 = 0 then 0\n else\n prod\n (map (Classical.choose (_ : Function.HasRightInverse Associates.mk))\n (normalizedFactors 1))) =\n 1) }\n x *\n OneHom.toFun\n {\n toFun := fun a =>\n if a = 0 then 0\n else\n prod\n (map (Classical.choose (_ : Function.HasRightInverse Associates.mk)) (normalizedFactors a)),\n map_one' :=\n (_ :\n (if 1 = 0 then 0\n else\n prod\n (map (Classical.choose (_ : Function.HasRightInverse Associates.mk))\n (normalizedFactors 1))) =\n 1) }\n y) })\n Associates.mk\n[PROOFSTEP]\nintro x\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : Nontrivial α\ninst✝ : UniqueFactorizationMonoid α\nx : Associates α\n⊢ Associates.mk\n (↑{\n toOneHom :=\n {\n toFun := fun a =>\n if a = 0 then 0\n else prod (map (Classical.choose (_ : Function.HasRightInverse Associates.mk)) (normalizedFactors a)),\n map_one' :=\n (_ :\n (if 1 = 0 then 0\n else\n prod\n (map (Classical.choose (_ : Function.HasRightInverse Associates.mk)) (normalizedFactors 1))) =\n 1) },\n map_mul' :=\n (_ :\n ∀ (x y : Associates α),\n OneHom.toFun\n {\n toFun := fun a =>\n if a = 0 then 0\n else\n prod\n (map (Classical.choose (_ : Function.HasRightInverse Associates.mk))\n (normalizedFactors a)),\n map_one' :=\n (_ :\n (if 1 = 0 then 0\n else\n prod\n (map (Classical.choose (_ : Function.HasRightInverse Associates.mk))\n (normalizedFactors 1))) =\n 1) }\n (x * y) =\n OneHom.toFun\n {\n toFun := fun a =>\n if a = 0 then 0\n else\n prod\n (map (Classical.choose (_ : Function.HasRightInverse Associates.mk))\n (normalizedFactors a)),\n map_one' :=\n (_ :\n (if 1 = 0 then 0\n else\n prod\n (map (Classical.choose (_ : Function.HasRightInverse Associates.mk))\n (normalizedFactors 1))) =\n 1) }\n x *\n OneHom.toFun\n {\n toFun := fun a =>\n if a = 0 then 0\n else\n prod\n (map (Classical.choose (_ : Function.HasRightInverse Associates.mk))\n (normalizedFactors a)),\n map_one' :=\n (_ :\n (if 1 = 0 then 0\n else\n prod\n (map (Classical.choose (_ : Function.HasRightInverse Associates.mk))\n (normalizedFactors 1))) =\n 1) }\n y) }\n x) =\n x\n[PROOFSTEP]\ndsimp\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : Nontrivial α\ninst✝ : UniqueFactorizationMonoid α\nx : Associates α\n⊢ Associates.mk\n (if x = 0 then 0\n else prod (map (Classical.choose (_ : Function.HasRightInverse Associates.mk)) (normalizedFactors x))) =\n x\n[PROOFSTEP]\nby_cases hx : x = 0\n[GOAL]\ncase pos\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : Nontrivial α\ninst✝ : UniqueFactorizationMonoid α\nx : Associates α\nhx : x = 0\n⊢ Associates.mk\n (if x = 0 then 0\n else prod (map (Classical.choose (_ : Function.HasRightInverse Associates.mk)) (normalizedFactors x))) =\n x\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : Nontrivial α\ninst✝ : UniqueFactorizationMonoid α\nx : Associates α\nhx : ¬x = 0\n⊢ Associates.mk\n (if x = 0 then 0\n else prod (map (Classical.choose (_ : Function.HasRightInverse Associates.mk)) (normalizedFactors x))) =\n x\n[PROOFSTEP]\nhave h : Associates.mkMonoidHom ∘ Classical.choose mk_surjective.hasRightInverse = (id : Associates α → Associates α) :=\n by\n ext x\n rw [Function.comp_apply, mkMonoidHom_apply, Classical.choose_spec mk_surjective.hasRightInverse x]\n rfl\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : Nontrivial α\ninst✝ : UniqueFactorizationMonoid α\nx : Associates α\nhx : ¬x = 0\n⊢ ↑Associates.mkMonoidHom ∘ Classical.choose (_ : Function.HasRightInverse Associates.mk) = id\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : Nontrivial α\ninst✝ : UniqueFactorizationMonoid α\nx✝ : Associates α\nhx : ¬x✝ = 0\nx : Associates α\n⊢ (↑Associates.mkMonoidHom ∘ Classical.choose (_ : Function.HasRightInverse Associates.mk)) x = id x\n[PROOFSTEP]\nrw [Function.comp_apply, mkMonoidHom_apply, Classical.choose_spec mk_surjective.hasRightInverse x]\n[GOAL]\ncase h\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : Nontrivial α\ninst✝ : UniqueFactorizationMonoid α\nx✝ : Associates α\nhx : ¬x✝ = 0\nx : Associates α\n⊢ x = id x\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : Nontrivial α\ninst✝ : UniqueFactorizationMonoid α\nx : Associates α\nhx : ¬x = 0\nh : ↑Associates.mkMonoidHom ∘ Classical.choose (_ : Function.HasRightInverse Associates.mk) = id\n⊢ Associates.mk\n (if x = 0 then 0\n else prod (map (Classical.choose (_ : Function.HasRightInverse Associates.mk)) (normalizedFactors x))) =\n x\n[PROOFSTEP]\nrw [if_neg hx, ← mkMonoidHom_apply, MonoidHom.map_multiset_prod, map_map, h, map_id, ← associated_iff_eq]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : Nontrivial α\ninst✝ : UniqueFactorizationMonoid α\nx : Associates α\nhx : ¬x = 0\nh : ↑Associates.mkMonoidHom ∘ Classical.choose (_ : Function.HasRightInverse Associates.mk) = id\n⊢ prod (normalizedFactors x) ~ᵤ x\n[PROOFSTEP]\napply normalizedFactors_prod hx\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : UniqueFactorizationMonoid R\na b : R\nha : a ≠ 0\nh : ∀ {d : R}, d ∣ a → d ∣ b → ¬Prime d\nd : R\n⊢ 0 ∣ a → 0 ∣ b → IsUnit 0\n[PROOFSTEP]\nsimp only [zero_dvd_iff]\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : UniqueFactorizationMonoid R\na b : R\nha : a ≠ 0\nh : ∀ {d : R}, d ∣ a → d ∣ b → ¬Prime d\nd : R\n⊢ a = 0 → b = 0 → IsUnit 0\n[PROOFSTEP]\nintros\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : UniqueFactorizationMonoid R\na b : R\nha : a ≠ 0\nh : ∀ {d : R}, d ∣ a → d ∣ b → ¬Prime d\nd : R\na✝¹ : a = 0\na✝ : b = 0\n⊢ IsUnit 0\n[PROOFSTEP]\ncontradiction\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : UniqueFactorizationMonoid R\na b c : R\nha : a ≠ 0\n⊢ (∀ {d : R}, d ∣ a → d ∣ c → ¬Prime d) → a ∣ b * c → a ∣ b\n[PROOFSTEP]\nrefine' induction_on_prime c _ _ _\n[GOAL]\ncase refine'_1\nα : Type u_1\nR : Type u_2\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : UniqueFactorizationMonoid R\na b c : R\nha : a ≠ 0\n⊢ (∀ {d : R}, d ∣ a → d ∣ 0 → ¬Prime d) → a ∣ b * 0 → a ∣ b\n[PROOFSTEP]\nintro no_factors\n[GOAL]\ncase refine'_1\nα : Type u_1\nR : Type u_2\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : UniqueFactorizationMonoid R\na b c : R\nha : a ≠ 0\nno_factors : ∀ {d : R}, d ∣ a → d ∣ 0 → ¬Prime d\n⊢ a ∣ b * 0 → a ∣ b\n[PROOFSTEP]\nsimp only [dvd_zero, mul_zero, forall_prop_of_true]\n[GOAL]\ncase refine'_1\nα : Type u_1\nR : Type u_2\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : UniqueFactorizationMonoid R\na b c : R\nha : a ≠ 0\nno_factors : ∀ {d : R}, d ∣ a → d ∣ 0 → ¬Prime d\n⊢ a ∣ b\n[PROOFSTEP]\nhaveI := Classical.propDecidable\n[GOAL]\ncase refine'_1\nα : Type u_1\nR : Type u_2\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : UniqueFactorizationMonoid R\na b c : R\nha : a ≠ 0\nno_factors : ∀ {d : R}, d ∣ a → d ∣ 0 → ¬Prime d\nthis : (a : Prop) → Decidable a\n⊢ a ∣ b\n[PROOFSTEP]\nexact isUnit_iff_forall_dvd.mp (no_factors_of_no_prime_factors ha (@no_factors) (dvd_refl a) (dvd_zero a)) _\n[GOAL]\ncase refine'_2\nα : Type u_1\nR : Type u_2\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : UniqueFactorizationMonoid R\na b c : R\nha : a ≠ 0\n⊢ ∀ (x : R), IsUnit x → (∀ {d : R}, d ∣ a → d ∣ x → ¬Prime d) → a ∣ b * x → a ∣ b\n[PROOFSTEP]\nrintro _ ⟨x, rfl⟩ _ a_dvd_bx\n[GOAL]\ncase refine'_2.intro\nα : Type u_1\nR : Type u_2\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : UniqueFactorizationMonoid R\na b c : R\nha : a ≠ 0\nx : Rˣ\na✝ : ∀ {d : R}, d ∣ a → d ∣ ↑x → ¬Prime d\na_dvd_bx : a ∣ b * ↑x\n⊢ a ∣ b\n[PROOFSTEP]\napply Units.dvd_mul_right.mp a_dvd_bx\n[GOAL]\ncase refine'_3\nα : Type u_1\nR : Type u_2\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : UniqueFactorizationMonoid R\na b c : R\nha : a ≠ 0\n⊢ ∀ (a_1 p : R),\n a_1 ≠ 0 →\n Prime p →\n ((∀ {d : R}, d ∣ a → d ∣ a_1 → ¬Prime d) → a ∣ b * a_1 → a ∣ b) →\n (∀ {d : R}, d ∣ a → d ∣ p * a_1 → ¬Prime d) → a ∣ b * (p * a_1) → a ∣ b\n[PROOFSTEP]\nintro c p _ hp ih no_factors a_dvd_bpc\n[GOAL]\ncase refine'_3\nα : Type u_1\nR : Type u_2\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : UniqueFactorizationMonoid R\na b c✝ : R\nha : a ≠ 0\nc p : R\na✝ : c ≠ 0\nhp : Prime p\nih : (∀ {d : R}, d ∣ a → d ∣ c → ¬Prime d) → a ∣ b * c → a ∣ b\nno_factors : ∀ {d : R}, d ∣ a → d ∣ p * c → ¬Prime d\na_dvd_bpc : a ∣ b * (p * c)\n⊢ a ∣ b\n[PROOFSTEP]\napply ih fun {q} dvd_a dvd_c hq => no_factors dvd_a (dvd_c.mul_left _) hq\n[GOAL]\ncase refine'_3\nα : Type u_1\nR : Type u_2\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : UniqueFactorizationMonoid R\na b c✝ : R\nha : a ≠ 0\nc p : R\na✝ : c ≠ 0\nhp : Prime p\nih : (∀ {d : R}, d ∣ a → d ∣ c → ¬Prime d) → a ∣ b * c → a ∣ b\nno_factors : ∀ {d : R}, d ∣ a → d ∣ p * c → ¬Prime d\na_dvd_bpc : a ∣ b * (p * c)\n⊢ a ∣ b * c\n[PROOFSTEP]\nrw [mul_left_comm] at a_dvd_bpc \n[GOAL]\ncase refine'_3\nα : Type u_1\nR : Type u_2\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : UniqueFactorizationMonoid R\na b c✝ : R\nha : a ≠ 0\nc p : R\na✝ : c ≠ 0\nhp : Prime p\nih : (∀ {d : R}, d ∣ a → d ∣ c → ¬Prime d) → a ∣ b * c → a ∣ b\nno_factors : ∀ {d : R}, d ∣ a → d ∣ p * c → ¬Prime d\na_dvd_bpc : a ∣ p * (b * c)\n⊢ a ∣ b * c\n[PROOFSTEP]\nrefine' Or.resolve_left (hp.left_dvd_or_dvd_right_of_dvd_mul a_dvd_bpc) fun h => _\n[GOAL]\ncase refine'_3\nα : Type u_1\nR : Type u_2\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : UniqueFactorizationMonoid R\na b c✝ : R\nha : a ≠ 0\nc p : R\na✝ : c ≠ 0\nhp : Prime p\nih : (∀ {d : R}, d ∣ a → d ∣ c → ¬Prime d) → a ∣ b * c → a ∣ b\nno_factors : ∀ {d : R}, d ∣ a → d ∣ p * c → ¬Prime d\na_dvd_bpc : a ∣ p * (b * c)\nh : p ∣ a\n⊢ False\n[PROOFSTEP]\nexact no_factors h (dvd_mul_right p c) hp\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : UniqueFactorizationMonoid R\na b c : R\nha : a ≠ 0\nno_factors : ∀ {d : R}, d ∣ a → d ∣ b → ¬Prime d\n⊢ a ∣ b * c → a ∣ c\n[PROOFSTEP]\nsimpa [mul_comm b c] using dvd_of_dvd_mul_left_of_no_prime_factors ha @no_factors\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : UniqueFactorizationMonoid R\n⊢ ∀ (a : R), a ≠ 0 → ∀ (b : R), ∃ a' b' c', (∀ {d : R}, d ∣ a' → d ∣ b' → IsUnit d) ∧ c' * a' = a ∧ c' * b' = b\n[PROOFSTEP]\nhaveI := Classical.propDecidable\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : UniqueFactorizationMonoid R\nthis : (a : Prop) → Decidable a\n⊢ ∀ (a : R), a ≠ 0 → ∀ (b : R), ∃ a' b' c', (∀ {d : R}, d ∣ a' → d ∣ b' → IsUnit d) ∧ c' * a' = a ∧ c' * b' = b\n[PROOFSTEP]\nintro a\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : UniqueFactorizationMonoid R\nthis : (a : Prop) → Decidable a\na : R\n⊢ a ≠ 0 → ∀ (b : R), ∃ a' b' c', (∀ {d : R}, d ∣ a' → d ∣ b' → IsUnit d) ∧ c' * a' = a ∧ c' * b' = b\n[PROOFSTEP]\nrefine' induction_on_prime a _ _ _\n[GOAL]\ncase refine'_1\nα : Type u_1\nR : Type u_2\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : UniqueFactorizationMonoid R\nthis : (a : Prop) → Decidable a\na : R\n⊢ 0 ≠ 0 → ∀ (b : R), ∃ a' b' c', (∀ {d : R}, d ∣ a' → d ∣ b' → IsUnit d) ∧ c' * a' = 0 ∧ c' * b' = b\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_1\nα : Type u_1\nR : Type u_2\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : UniqueFactorizationMonoid R\nthis : (a : Prop) → Decidable a\na : R\nx✝ : 0 ≠ 0\nb✝ : R\n⊢ ∃ a' b' c', (∀ {d : R}, d ∣ a' → d ∣ b' → IsUnit d) ∧ c' * a' = 0 ∧ c' * b' = b✝\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase refine'_2\nα : Type u_1\nR : Type u_2\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : UniqueFactorizationMonoid R\nthis : (a : Prop) → Decidable a\na : R\n⊢ ∀ (x : R),\n IsUnit x → x ≠ 0 → ∀ (b : R), ∃ a' b' c', (∀ {d : R}, d ∣ a' → d ∣ b' → IsUnit d) ∧ c' * a' = x ∧ c' * b' = b\n[PROOFSTEP]\nintro a a_unit _ b\n[GOAL]\ncase refine'_2\nα : Type u_1\nR : Type u_2\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : UniqueFactorizationMonoid R\nthis : (a : Prop) → Decidable a\na✝ a : R\na_unit : IsUnit a\nx✝ : a ≠ 0\nb : R\n⊢ ∃ a' b' c', (∀ {d : R}, d ∣ a' → d ∣ b' → IsUnit d) ∧ c' * a' = a ∧ c' * b' = b\n[PROOFSTEP]\nuse a, b, 1\n[GOAL]\ncase h\nα : Type u_1\nR : Type u_2\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : UniqueFactorizationMonoid R\nthis : (a : Prop) → Decidable a\na✝ a : R\na_unit : IsUnit a\nx✝ : a ≠ 0\nb : R\n⊢ (∀ {d : R}, d ∣ a → d ∣ b → IsUnit d) ∧ 1 * a = a ∧ 1 * b = b\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.left\nα : Type u_1\nR : Type u_2\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : UniqueFactorizationMonoid R\nthis : (a : Prop) → Decidable a\na✝ a : R\na_unit : IsUnit a\nx✝ : a ≠ 0\nb : R\n⊢ ∀ {d : R}, d ∣ a → d ∣ b → IsUnit d\n[PROOFSTEP]\nintro p p_dvd_a _\n[GOAL]\ncase h.left\nα : Type u_1\nR : Type u_2\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : UniqueFactorizationMonoid R\nthis : (a : Prop) → Decidable a\na✝¹ a : R\na_unit : IsUnit a\nx✝ : a ≠ 0\nb p : R\np_dvd_a : p ∣ a\na✝ : p ∣ b\n⊢ IsUnit p\n[PROOFSTEP]\nexact isUnit_of_dvd_unit p_dvd_a a_unit\n[GOAL]\ncase h.right\nα : Type u_1\nR : Type u_2\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : UniqueFactorizationMonoid R\nthis : (a : Prop) → Decidable a\na✝ a : R\na_unit : IsUnit a\nx✝ : a ≠ 0\nb : R\n⊢ 1 * a = a ∧ 1 * b = b\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_3\nα : Type u_1\nR : Type u_2\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : UniqueFactorizationMonoid R\nthis : (a : Prop) → Decidable a\na : R\n⊢ ∀ (a p : R),\n a ≠ 0 →\n Prime p →\n (a ≠ 0 → ∀ (b : R), ∃ a' b' c', (∀ {d : R}, d ∣ a' → d ∣ b' → IsUnit d) ∧ c' * a' = a ∧ c' * b' = b) →\n p * a ≠ 0 → ∀ (b : R), ∃ a' b' c', (∀ {d : R}, d ∣ a' → d ∣ b' → IsUnit d) ∧ c' * a' = p * a ∧ c' * b' = b\n[PROOFSTEP]\nintro a p a_ne_zero p_prime ih_a pa_ne_zero b\n[GOAL]\ncase refine'_3\nα : Type u_1\nR : Type u_2\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : UniqueFactorizationMonoid R\nthis : (a : Prop) → Decidable a\na✝ a p : R\na_ne_zero : a ≠ 0\np_prime : Prime p\nih_a : a ≠ 0 → ∀ (b : R), ∃ a' b' c', (∀ {d : R}, d ∣ a' → d ∣ b' → IsUnit d) ∧ c' * a' = a ∧ c' * b' = b\npa_ne_zero : p * a ≠ 0\nb : R\n⊢ ∃ a' b' c', (∀ {d : R}, d ∣ a' → d ∣ b' → IsUnit d) ∧ c' * a' = p * a ∧ c' * b' = b\n[PROOFSTEP]\nby_cases p ∣ b\n[GOAL]\ncase refine'_3\nα : Type u_1\nR : Type u_2\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : UniqueFactorizationMonoid R\nthis : (a : Prop) → Decidable a\na✝ a p : R\na_ne_zero : a ≠ 0\np_prime : Prime p\nih_a : a ≠ 0 → ∀ (b : R), ∃ a' b' c', (∀ {d : R}, d ∣ a' → d ∣ b' → IsUnit d) ∧ c' * a' = a ∧ c' * b' = b\npa_ne_zero : p * a ≠ 0\nb : R\n⊢ ∃ a' b' c', (∀ {d : R}, d ∣ a' → d ∣ b' → IsUnit d) ∧ c' * a' = p * a ∧ c' * b' = b\n[PROOFSTEP]\nby_cases p ∣ b\n[GOAL]\ncase pos\nα : Type u_1\nR : Type u_2\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : UniqueFactorizationMonoid R\nthis : (a : Prop) → Decidable a\na✝ a p : R\na_ne_zero : a ≠ 0\np_prime : Prime p\nih_a : a ≠ 0 → ∀ (b : R), ∃ a' b' c', (∀ {d : R}, d ∣ a' → d ∣ b' → IsUnit d) ∧ c' * a' = a ∧ c' * b' = b\npa_ne_zero : p * a ≠ 0\nb : R\nh : p ∣ b\n⊢ ∃ a' b' c', (∀ {d : R}, d ∣ a' → d ∣ b' → IsUnit d) ∧ c' * a' = p * a ∧ c' * b' = b\n[PROOFSTEP]\nrcases h with ⟨b, rfl⟩\n[GOAL]\ncase pos.intro\nα : Type u_1\nR : Type u_2\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : UniqueFactorizationMonoid R\nthis : (a : Prop) → Decidable a\na✝ a p : R\na_ne_zero : a ≠ 0\np_prime : Prime p\nih_a : a ≠ 0 → ∀ (b : R), ∃ a' b' c', (∀ {d : R}, d ∣ a' → d ∣ b' → IsUnit d) ∧ c' * a' = a ∧ c' * b' = b\npa_ne_zero : p * a ≠ 0\nb : R\n⊢ ∃ a' b' c', (∀ {d : R}, d ∣ a' → d ∣ b' → IsUnit d) ∧ c' * a' = p * a ∧ c' * b' = p * b\n[PROOFSTEP]\nobtain ⟨a', b', c', no_factor, ha', hb'⟩ := ih_a a_ne_zero b\n[GOAL]\ncase pos.intro.intro.intro.intro.intro.intro\nα : Type u_1\nR : Type u_2\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : UniqueFactorizationMonoid R\nthis : (a : Prop) → Decidable a\na✝ a p : R\na_ne_zero : a ≠ 0\np_prime : Prime p\nih_a : a ≠ 0 → ∀ (b : R), ∃ a' b' c', (∀ {d : R}, d ∣ a' → d ∣ b' → IsUnit d) ∧ c' * a' = a ∧ c' * b' = b\npa_ne_zero : p * a ≠ 0\nb a' b' c' : R\nno_factor : ∀ {d : R}, d ∣ a' → d ∣ b' → IsUnit d\nha' : c' * a' = a\nhb' : c' * b' = b\n⊢ ∃ a' b' c', (∀ {d : R}, d ∣ a' → d ∣ b' → IsUnit d) ∧ c' * a' = p * a ∧ c' * b' = p * b\n[PROOFSTEP]\nrefine' ⟨a', b', p * c', @no_factor, _, _⟩\n[GOAL]\ncase pos.intro.intro.intro.intro.intro.intro.refine'_1\nα : Type u_1\nR : Type u_2\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : UniqueFactorizationMonoid R\nthis : (a : Prop) → Decidable a\na✝ a p : R\na_ne_zero : a ≠ 0\np_prime : Prime p\nih_a : a ≠ 0 → ∀ (b : R), ∃ a' b' c', (∀ {d : R}, d ∣ a' → d ∣ b' → IsUnit d) ∧ c' * a' = a ∧ c' * b' = b\npa_ne_zero : p * a ≠ 0\nb a' b' c' : R\nno_factor : ∀ {d : R}, d ∣ a' → d ∣ b' → IsUnit d\nha' : c' * a' = a\nhb' : c' * b' = b\n⊢ p * c' * a' = p * a\n[PROOFSTEP]\nrw [mul_assoc, ha']\n[GOAL]\ncase pos.intro.intro.intro.intro.intro.intro.refine'_2\nα : Type u_1\nR : Type u_2\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : UniqueFactorizationMonoid R\nthis : (a : Prop) → Decidable a\na✝ a p : R\na_ne_zero : a ≠ 0\np_prime : Prime p\nih_a : a ≠ 0 → ∀ (b : R), ∃ a' b' c', (∀ {d : R}, d ∣ a' → d ∣ b' → IsUnit d) ∧ c' * a' = a ∧ c' * b' = b\npa_ne_zero : p * a ≠ 0\nb a' b' c' : R\nno_factor : ∀ {d : R}, d ∣ a' → d ∣ b' → IsUnit d\nha' : c' * a' = a\nhb' : c' * b' = b\n⊢ p * c' * b' = p * b\n[PROOFSTEP]\nrw [mul_assoc, hb']\n[GOAL]\ncase neg\nα : Type u_1\nR : Type u_2\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : UniqueFactorizationMonoid R\nthis : (a : Prop) → Decidable a\na✝ a p : R\na_ne_zero : a ≠ 0\np_prime : Prime p\nih_a : a ≠ 0 → ∀ (b : R), ∃ a' b' c', (∀ {d : R}, d ∣ a' → d ∣ b' → IsUnit d) ∧ c' * a' = a ∧ c' * b' = b\npa_ne_zero : p * a ≠ 0\nb : R\nh : ¬p ∣ b\n⊢ ∃ a' b' c', (∀ {d : R}, d ∣ a' → d ∣ b' → IsUnit d) ∧ c' * a' = p * a ∧ c' * b' = b\n[PROOFSTEP]\nobtain ⟨a', b', c', coprime, rfl, rfl⟩ := ih_a a_ne_zero b\n[GOAL]\ncase neg.intro.intro.intro.intro.intro\nα : Type u_1\nR : Type u_2\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : UniqueFactorizationMonoid R\nthis : (a : Prop) → Decidable a\na p : R\np_prime : Prime p\na' b' c' : R\ncoprime : ∀ {d : R}, d ∣ a' → d ∣ b' → IsUnit d\na_ne_zero : c' * a' ≠ 0\nih_a :\n c' * a' ≠ 0 →\n ∀ (b : R), ∃ a'_1 b' c'_1, (∀ {d : R}, d ∣ a'_1 → d ∣ b' → IsUnit d) ∧ c'_1 * a'_1 = c' * a' ∧ c'_1 * b' = b\npa_ne_zero : p * (c' * a') ≠ 0\nh : ¬p ∣ c' * b'\n⊢ ∃ a'_1 b'_1 c'_1, (∀ {d : R}, d ∣ a'_1 → d ∣ b'_1 → IsUnit d) ∧ c'_1 * a'_1 = p * (c' * a') ∧ c'_1 * b'_1 = c' * b'\n[PROOFSTEP]\nrefine' ⟨p * a', b', c', _, mul_left_comm _ _ _, rfl⟩\n[GOAL]\ncase neg.intro.intro.intro.intro.intro\nα : Type u_1\nR : Type u_2\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : UniqueFactorizationMonoid R\nthis : (a : Prop) → Decidable a\na p : R\np_prime : Prime p\na' b' c' : R\ncoprime : ∀ {d : R}, d ∣ a' → d ∣ b' → IsUnit d\na_ne_zero : c' * a' ≠ 0\nih_a :\n c' * a' ≠ 0 →\n ∀ (b : R), ∃ a'_1 b' c'_1, (∀ {d : R}, d ∣ a'_1 → d ∣ b' → IsUnit d) ∧ c'_1 * a'_1 = c' * a' ∧ c'_1 * b' = b\npa_ne_zero : p * (c' * a') ≠ 0\nh : ¬p ∣ c' * b'\n⊢ ∀ {d : R}, d ∣ p * a' → d ∣ b' → IsUnit d\n[PROOFSTEP]\nintro q q_dvd_pa' q_dvd_b'\n[GOAL]\ncase neg.intro.intro.intro.intro.intro\nα : Type u_1\nR : Type u_2\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : UniqueFactorizationMonoid R\nthis : (a : Prop) → Decidable a\na p : R\np_prime : Prime p\na' b' c' : R\ncoprime : ∀ {d : R}, d ∣ a' → d ∣ b' → IsUnit d\na_ne_zero : c' * a' ≠ 0\nih_a :\n c' * a' ≠ 0 →\n ∀ (b : R), ∃ a'_1 b' c'_1, (∀ {d : R}, d ∣ a'_1 → d ∣ b' → IsUnit d) ∧ c'_1 * a'_1 = c' * a' ∧ c'_1 * b' = b\npa_ne_zero : p * (c' * a') ≠ 0\nh : ¬p ∣ c' * b'\nq : R\nq_dvd_pa' : q ∣ p * a'\nq_dvd_b' : q ∣ b'\n⊢ IsUnit q\n[PROOFSTEP]\ncases' p_prime.left_dvd_or_dvd_right_of_dvd_mul q_dvd_pa' with p_dvd_q q_dvd_a'\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.inl\nα : Type u_1\nR : Type u_2\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : UniqueFactorizationMonoid R\nthis : (a : Prop) → Decidable a\na p : R\np_prime : Prime p\na' b' c' : R\ncoprime : ∀ {d : R}, d ∣ a' → d ∣ b' → IsUnit d\na_ne_zero : c' * a' ≠ 0\nih_a :\n c' * a' ≠ 0 →\n ∀ (b : R), ∃ a'_1 b' c'_1, (∀ {d : R}, d ∣ a'_1 → d ∣ b' → IsUnit d) ∧ c'_1 * a'_1 = c' * a' ∧ c'_1 * b' = b\npa_ne_zero : p * (c' * a') ≠ 0\nh : ¬p ∣ c' * b'\nq : R\nq_dvd_pa' : q ∣ p * a'\nq_dvd_b' : q ∣ b'\np_dvd_q : p ∣ q\n⊢ IsUnit q\n[PROOFSTEP]\nhave : p ∣ c' * b' := dvd_mul_of_dvd_right (p_dvd_q.trans q_dvd_b') _\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.inl\nα : Type u_1\nR : Type u_2\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : UniqueFactorizationMonoid R\nthis✝ : (a : Prop) → Decidable a\na p : R\np_prime : Prime p\na' b' c' : R\ncoprime : ∀ {d : R}, d ∣ a' → d ∣ b' → IsUnit d\na_ne_zero : c' * a' ≠ 0\nih_a :\n c' * a' ≠ 0 →\n ∀ (b : R), ∃ a'_1 b' c'_1, (∀ {d : R}, d ∣ a'_1 → d ∣ b' → IsUnit d) ∧ c'_1 * a'_1 = c' * a' ∧ c'_1 * b' = b\npa_ne_zero : p * (c' * a') ≠ 0\nh : ¬p ∣ c' * b'\nq : R\nq_dvd_pa' : q ∣ p * a'\nq_dvd_b' : q ∣ b'\np_dvd_q : p ∣ q\nthis : p ∣ c' * b'\n⊢ IsUnit q\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.inr\nα : Type u_1\nR : Type u_2\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : UniqueFactorizationMonoid R\nthis : (a : Prop) → Decidable a\na p : R\np_prime : Prime p\na' b' c' : R\ncoprime : ∀ {d : R}, d ∣ a' → d ∣ b' → IsUnit d\na_ne_zero : c' * a' ≠ 0\nih_a :\n c' * a' ≠ 0 →\n ∀ (b : R), ∃ a'_1 b' c'_1, (∀ {d : R}, d ∣ a'_1 → d ∣ b' → IsUnit d) ∧ c'_1 * a'_1 = c' * a' ∧ c'_1 * b' = b\npa_ne_zero : p * (c' * a') ≠ 0\nh : ¬p ∣ c' * b'\nq : R\nq_dvd_pa' : q ∣ p * a'\nq_dvd_b' : q ∣ b'\nq_dvd_a' : q ∣ a'\n⊢ IsUnit q\n[PROOFSTEP]\nexact coprime q_dvd_a' q_dvd_b'\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : UniqueFactorizationMonoid R\na : R\nha0 : a ≠ 0\nha1 : ¬IsUnit a\n⊢ Function.Injective ((fun x x_1 => x ^ x_1) a)\n[PROOFSTEP]\nletI := Classical.decEq R\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : UniqueFactorizationMonoid R\na : R\nha0 : a ≠ 0\nha1 : ¬IsUnit a\nthis : DecidableEq R := Classical.decEq R\n⊢ Function.Injective ((fun x x_1 => x ^ x_1) a)\n[PROOFSTEP]\nintro i j hij\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : UniqueFactorizationMonoid R\na : R\nha0 : a ≠ 0\nha1 : ¬IsUnit a\nthis : DecidableEq R := Classical.decEq R\ni j : ℕ\nhij : (fun x x_1 => x ^ x_1) a i = (fun x x_1 => x ^ x_1) a j\n⊢ i = j\n[PROOFSTEP]\nletI : Nontrivial R := ⟨⟨a, 0, ha0⟩⟩\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : UniqueFactorizationMonoid R\na : R\nha0 : a ≠ 0\nha1 : ¬IsUnit a\nthis✝ : DecidableEq R := Classical.decEq R\ni j : ℕ\nhij : (fun x x_1 => x ^ x_1) a i = (fun x x_1 => x ^ x_1) a j\nthis : Nontrivial R := { exists_pair_ne := Exists.intro a (Exists.intro 0 ha0) }\n⊢ i = j\n[PROOFSTEP]\nletI : NormalizationMonoid R := UniqueFactorizationMonoid.normalizationMonoid\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : UniqueFactorizationMonoid R\na : R\nha0 : a ≠ 0\nha1 : ¬IsUnit a\nthis✝¹ : DecidableEq R := Classical.decEq R\ni j : ℕ\nhij : (fun x x_1 => x ^ x_1) a i = (fun x x_1 => x ^ x_1) a j\nthis✝ : Nontrivial R := { exists_pair_ne := Exists.intro a (Exists.intro 0 ha0) }\nthis : NormalizationMonoid R := UniqueFactorizationMonoid.normalizationMonoid\n⊢ i = j\n[PROOFSTEP]\nobtain ⟨p', hp', dvd'⟩ := WfDvdMonoid.exists_irreducible_factor ha1 ha0\n[GOAL]\ncase intro.intro\nα : Type u_1\nR : Type u_2\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : UniqueFactorizationMonoid R\na : R\nha0 : a ≠ 0\nha1 : ¬IsUnit a\nthis✝¹ : DecidableEq R := Classical.decEq R\ni j : ℕ\nhij : (fun x x_1 => x ^ x_1) a i = (fun x x_1 => x ^ x_1) a j\nthis✝ : Nontrivial R := { exists_pair_ne := Exists.intro a (Exists.intro 0 ha0) }\nthis : NormalizationMonoid R := UniqueFactorizationMonoid.normalizationMonoid\np' : R\nhp' : Irreducible p'\ndvd' : p' ∣ a\n⊢ i = j\n[PROOFSTEP]\nobtain ⟨p, mem, _⟩ := exists_mem_normalizedFactors_of_dvd ha0 hp' dvd'\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nR : Type u_2\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : UniqueFactorizationMonoid R\na : R\nha0 : a ≠ 0\nha1 : ¬IsUnit a\nthis✝¹ : DecidableEq R := Classical.decEq R\ni j : ℕ\nhij : (fun x x_1 => x ^ x_1) a i = (fun x x_1 => x ^ x_1) a j\nthis✝ : Nontrivial R := { exists_pair_ne := Exists.intro a (Exists.intro 0 ha0) }\nthis : NormalizationMonoid R := UniqueFactorizationMonoid.normalizationMonoid\np' : R\nhp' : Irreducible p'\ndvd' : p' ∣ a\np : R\nmem : p ∈ normalizedFactors a\nright✝ : p' ~ᵤ p\n⊢ i = j\n[PROOFSTEP]\nhave := congr_arg (fun x => Multiset.count p (normalizedFactors x)) hij\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nR : Type u_2\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : UniqueFactorizationMonoid R\na : R\nha0 : a ≠ 0\nha1 : ¬IsUnit a\nthis✝² : DecidableEq R := Classical.decEq R\ni j : ℕ\nhij : (fun x x_1 => x ^ x_1) a i = (fun x x_1 => x ^ x_1) a j\nthis✝¹ : Nontrivial R := { exists_pair_ne := Exists.intro a (Exists.intro 0 ha0) }\nthis✝ : NormalizationMonoid R := UniqueFactorizationMonoid.normalizationMonoid\np' : R\nhp' : Irreducible p'\ndvd' : p' ∣ a\np : R\nmem : p ∈ normalizedFactors a\nright✝ : p' ~ᵤ p\nthis :\n (fun x => Multiset.count p (normalizedFactors x)) ((fun x x_1 => x ^ x_1) a i) =\n (fun x => Multiset.count p (normalizedFactors x)) ((fun x x_1 => x ^ x_1) a j)\n⊢ i = j\n[PROOFSTEP]\nsimp only [normalizedFactors_pow, Multiset.count_nsmul] at this \n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nR : Type u_2\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : UniqueFactorizationMonoid R\na : R\nha0 : a ≠ 0\nha1 : ¬IsUnit a\nthis✝² : DecidableEq R := Classical.decEq R\ni j : ℕ\nhij : (fun x x_1 => x ^ x_1) a i = (fun x x_1 => x ^ x_1) a j\nthis✝¹ : Nontrivial R := { exists_pair_ne := Exists.intro a (Exists.intro 0 ha0) }\nthis✝ : NormalizationMonoid R := UniqueFactorizationMonoid.normalizationMonoid\np' : R\nhp' : Irreducible p'\ndvd' : p' ∣ a\np : R\nmem : p ∈ normalizedFactors a\nright✝ : p' ~ᵤ p\nthis : i * Multiset.count p (normalizedFactors a) = j * Multiset.count p (normalizedFactors a)\n⊢ i = j\n[PROOFSTEP]\nexact mul_right_cancel₀ (Multiset.count_ne_zero.mpr mem) this\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : Nontrivial R\ninst✝¹ : NormalizationMonoid R\ndec_dvd : DecidableRel Dvd.dvd\ninst✝ : DecidableEq R\na b : R\nn : ℕ\nha : Irreducible a\nhb : b ≠ 0\n⊢ ↑n ≤ multiplicity a b ↔ replicate n (↑normalize a) ≤ normalizedFactors b\n[PROOFSTEP]\nrw [← pow_dvd_iff_le_multiplicity]\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : Nontrivial R\ninst✝¹ : NormalizationMonoid R\ndec_dvd : DecidableRel Dvd.dvd\ninst✝ : DecidableEq R\na b : R\nn : ℕ\nha : Irreducible a\nhb : b ≠ 0\n⊢ a ^ n ∣ b ↔ replicate n (↑normalize a) ≤ normalizedFactors b\n[PROOFSTEP]\nrevert b\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : Nontrivial R\ninst✝¹ : NormalizationMonoid R\ndec_dvd : DecidableRel Dvd.dvd\ninst✝ : DecidableEq R\na : R\nn : ℕ\nha : Irreducible a\n⊢ ∀ {b : R}, b ≠ 0 → (a ^ n ∣ b ↔ replicate n (↑normalize a) ≤ normalizedFactors b)\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : Nontrivial R\ninst✝¹ : NormalizationMonoid R\ndec_dvd : DecidableRel Dvd.dvd\ninst✝ : DecidableEq R\na : R\nha : Irreducible a\n⊢ ∀ {b : R}, b ≠ 0 → (a ^ Nat.zero ∣ b ↔ replicate Nat.zero (↑normalize a) ≤ normalizedFactors b)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : Nontrivial R\ninst✝¹ : NormalizationMonoid R\ndec_dvd : DecidableRel Dvd.dvd\ninst✝ : DecidableEq R\na : R\nha : Irreducible a\nn : ℕ\nih : ∀ {b : R}, b ≠ 0 → (a ^ n ∣ b ↔ replicate n (↑normalize a) ≤ normalizedFactors b)\n⊢ ∀ {b : R}, b ≠ 0 → (a ^ Nat.succ n ∣ b ↔ replicate (Nat.succ n) (↑normalize a) ≤ normalizedFactors b)\n[PROOFSTEP]\nintro b hb\n[GOAL]\ncase succ\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : Nontrivial R\ninst✝¹ : NormalizationMonoid R\ndec_dvd : DecidableRel Dvd.dvd\ninst✝ : DecidableEq R\na : R\nha : Irreducible a\nn : ℕ\nih : ∀ {b : R}, b ≠ 0 → (a ^ n ∣ b ↔ replicate n (↑normalize a) ≤ normalizedFactors b)\nb : R\nhb : b ≠ 0\n⊢ a ^ Nat.succ n ∣ b ↔ replicate (Nat.succ n) (↑normalize a) ≤ normalizedFactors b\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase succ.mp\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : Nontrivial R\ninst✝¹ : NormalizationMonoid R\ndec_dvd : DecidableRel Dvd.dvd\ninst✝ : DecidableEq R\na : R\nha : Irreducible a\nn : ℕ\nih : ∀ {b : R}, b ≠ 0 → (a ^ n ∣ b ↔ replicate n (↑normalize a) ≤ normalizedFactors b)\nb : R\nhb : b ≠ 0\n⊢ a ^ Nat.succ n ∣ b → replicate (Nat.succ n) (↑normalize a) ≤ normalizedFactors b\n[PROOFSTEP]\nrintro ⟨c, rfl⟩\n[GOAL]\ncase succ.mp.intro\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : Nontrivial R\ninst✝¹ : NormalizationMonoid R\ndec_dvd : DecidableRel Dvd.dvd\ninst✝ : DecidableEq R\na : R\nha : Irreducible a\nn : ℕ\nih : ∀ {b : R}, b ≠ 0 → (a ^ n ∣ b ↔ replicate n (↑normalize a) ≤ normalizedFactors b)\nc : R\nhb : a ^ Nat.succ n * c ≠ 0\n⊢ replicate (Nat.succ n) (↑normalize a) ≤ normalizedFactors (a ^ Nat.succ n * c)\n[PROOFSTEP]\nrw [Ne.def, pow_succ, mul_assoc, mul_eq_zero, not_or] at hb \n[GOAL]\ncase succ.mp.intro\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : Nontrivial R\ninst✝¹ : NormalizationMonoid R\ndec_dvd : DecidableRel Dvd.dvd\ninst✝ : DecidableEq R\na : R\nha : Irreducible a\nn : ℕ\nih : ∀ {b : R}, b ≠ 0 → (a ^ n ∣ b ↔ replicate n (↑normalize a) ≤ normalizedFactors b)\nc : R\nhb : ¬a = 0 ∧ ¬a ^ n * c = 0\n⊢ replicate (Nat.succ n) (↑normalize a) ≤ normalizedFactors (a ^ Nat.succ n * c)\n[PROOFSTEP]\nrw [pow_succ, mul_assoc, normalizedFactors_mul hb.1 hb.2, replicate_succ, normalizedFactors_irreducible ha,\n singleton_add, cons_le_cons_iff, ← ih hb.2]\n[GOAL]\ncase succ.mp.intro\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : Nontrivial R\ninst✝¹ : NormalizationMonoid R\ndec_dvd : DecidableRel Dvd.dvd\ninst✝ : DecidableEq R\na : R\nha : Irreducible a\nn : ℕ\nih : ∀ {b : R}, b ≠ 0 → (a ^ n ∣ b ↔ replicate n (↑normalize a) ≤ normalizedFactors b)\nc : R\nhb : ¬a = 0 ∧ ¬a ^ n * c = 0\n⊢ a ^ n ∣ a ^ n * c\n[PROOFSTEP]\napply Dvd.intro _ rfl\n[GOAL]\ncase succ.mpr\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : Nontrivial R\ninst✝¹ : NormalizationMonoid R\ndec_dvd : DecidableRel Dvd.dvd\ninst✝ : DecidableEq R\na : R\nha : Irreducible a\nn : ℕ\nih : ∀ {b : R}, b ≠ 0 → (a ^ n ∣ b ↔ replicate n (↑normalize a) ≤ normalizedFactors b)\nb : R\nhb : b ≠ 0\n⊢ replicate (Nat.succ n) (↑normalize a) ≤ normalizedFactors b → a ^ Nat.succ n ∣ b\n[PROOFSTEP]\nrw [Multiset.le_iff_exists_add]\n[GOAL]\ncase succ.mpr\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : Nontrivial R\ninst✝¹ : NormalizationMonoid R\ndec_dvd : DecidableRel Dvd.dvd\ninst✝ : DecidableEq R\na : R\nha : Irreducible a\nn : ℕ\nih : ∀ {b : R}, b ≠ 0 → (a ^ n ∣ b ↔ replicate n (↑normalize a) ≤ normalizedFactors b)\nb : R\nhb : b ≠ 0\n⊢ (∃ u, normalizedFactors b = replicate (Nat.succ n) (↑normalize a) + u) → a ^ Nat.succ n ∣ b\n[PROOFSTEP]\nrintro ⟨u, hu⟩\n[GOAL]\ncase succ.mpr.intro\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : Nontrivial R\ninst✝¹ : NormalizationMonoid R\ndec_dvd : DecidableRel Dvd.dvd\ninst✝ : DecidableEq R\na : R\nha : Irreducible a\nn : ℕ\nih : ∀ {b : R}, b ≠ 0 → (a ^ n ∣ b ↔ replicate n (↑normalize a) ≤ normalizedFactors b)\nb : R\nhb : b ≠ 0\nu : Multiset ((fun x => R) a)\nhu : normalizedFactors b = replicate (Nat.succ n) (↑normalize a) + u\n⊢ a ^ Nat.succ n ∣ b\n[PROOFSTEP]\nrw [← (normalizedFactors_prod hb).dvd_iff_dvd_right, hu, prod_add, prod_replicate]\n[GOAL]\ncase succ.mpr.intro\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : Nontrivial R\ninst✝¹ : NormalizationMonoid R\ndec_dvd : DecidableRel Dvd.dvd\ninst✝ : DecidableEq R\na : R\nha : Irreducible a\nn : ℕ\nih : ∀ {b : R}, b ≠ 0 → (a ^ n ∣ b ↔ replicate n (↑normalize a) ≤ normalizedFactors b)\nb : R\nhb : b ≠ 0\nu : Multiset ((fun x => R) a)\nhu : normalizedFactors b = replicate (Nat.succ n) (↑normalize a) + u\n⊢ a ^ Nat.succ n ∣ ↑normalize a ^ Nat.succ n * prod u\n[PROOFSTEP]\nexact (Associated.pow_pow <| associated_normalize a).dvd.trans (Dvd.intro u.prod rfl)\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : Nontrivial R\ninst✝¹ : NormalizationMonoid R\ndec_dvd : DecidableRel Dvd.dvd\ninst✝ : DecidableEq R\na b : R\nha : Irreducible a\nhb : b ≠ 0\n⊢ multiplicity a b = ↑(count (↑normalize a) (normalizedFactors b))\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : Nontrivial R\ninst✝¹ : NormalizationMonoid R\ndec_dvd : DecidableRel Dvd.dvd\ninst✝ : DecidableEq R\na b : R\nha : Irreducible a\nhb : b ≠ 0\n⊢ multiplicity a b ≤ ↑(count (↑normalize a) (normalizedFactors b))\n[PROOFSTEP]\napply PartENat.le_of_lt_add_one\n[GOAL]\ncase a.h\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : Nontrivial R\ninst✝¹ : NormalizationMonoid R\ndec_dvd : DecidableRel Dvd.dvd\ninst✝ : DecidableEq R\na b : R\nha : Irreducible a\nhb : b ≠ 0\n⊢ multiplicity a b < ↑(count (↑normalize a) (normalizedFactors b)) + 1\n[PROOFSTEP]\nrw [← Nat.cast_one, ← Nat.cast_add, lt_iff_not_ge, ge_iff_le, le_multiplicity_iff_replicate_le_normalizedFactors ha hb,\n ← le_count_iff_replicate_le]\n[GOAL]\ncase a.h\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : Nontrivial R\ninst✝¹ : NormalizationMonoid R\ndec_dvd : DecidableRel Dvd.dvd\ninst✝ : DecidableEq R\na b : R\nha : Irreducible a\nhb : b ≠ 0\n⊢ ¬count (↑normalize a) (normalizedFactors b) + 1 ≤ count (↑normalize a) (normalizedFactors b)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase a\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : Nontrivial R\ninst✝¹ : NormalizationMonoid R\ndec_dvd : DecidableRel Dvd.dvd\ninst✝ : DecidableEq R\na b : R\nha : Irreducible a\nhb : b ≠ 0\n⊢ ↑(count (↑normalize a) (normalizedFactors b)) ≤ multiplicity a b\n[PROOFSTEP]\nrw [le_multiplicity_iff_replicate_le_normalizedFactors ha hb, ← le_count_iff_replicate_le]\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : Nontrivial R\ninst✝¹ : NormalizationMonoid R\ndec_dvd : DecidableRel Dvd.dvd\ninst✝ : DecidableEq R\np x : R\nhp : Irreducible p\nhnorm : ↑normalize p = p\nn : ℕ\nhle : p ^ n ∣ x\nhlt : ¬p ^ (n + 1) ∣ x\n⊢ count p (normalizedFactors x) = n\n[PROOFSTEP]\nletI : DecidableRel ((· ∣ ·) : R → R → Prop) := fun _ _ => Classical.propDecidable _\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : Nontrivial R\ninst✝¹ : NormalizationMonoid R\ndec_dvd : DecidableRel Dvd.dvd\ninst✝ : DecidableEq R\np x : R\nhp : Irreducible p\nhnorm : ↑normalize p = p\nn : ℕ\nhle : p ^ n ∣ x\nhlt : ¬p ^ (n + 1) ∣ x\nthis : DecidableRel fun x x_1 => x ∣ x_1 := fun x x_1 => Classical.propDecidable ((fun x x_2 => x ∣ x_2) x x_1)\n⊢ count p (normalizedFactors x) = n\n[PROOFSTEP]\nby_cases hx0 : x = 0\n[GOAL]\ncase pos\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : Nontrivial R\ninst✝¹ : NormalizationMonoid R\ndec_dvd : DecidableRel Dvd.dvd\ninst✝ : DecidableEq R\np x : R\nhp : Irreducible p\nhnorm : ↑normalize p = p\nn : ℕ\nhle : p ^ n ∣ x\nhlt : ¬p ^ (n + 1) ∣ x\nthis : DecidableRel fun x x_1 => x ∣ x_1 := fun x x_1 => Classical.propDecidable ((fun x x_2 => x ∣ x_2) x x_1)\nhx0 : x = 0\n⊢ count p (normalizedFactors x) = n\n[PROOFSTEP]\nsimp [hx0] at hlt \n[GOAL]\ncase neg\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : Nontrivial R\ninst✝¹ : NormalizationMonoid R\ndec_dvd : DecidableRel Dvd.dvd\ninst✝ : DecidableEq R\np x : R\nhp : Irreducible p\nhnorm : ↑normalize p = p\nn : ℕ\nhle : p ^ n ∣ x\nhlt : ¬p ^ (n + 1) ∣ x\nthis : DecidableRel fun x x_1 => x ∣ x_1 := fun x x_1 => Classical.propDecidable ((fun x x_2 => x ∣ x_2) x x_1)\nhx0 : ¬x = 0\n⊢ count p (normalizedFactors x) = n\n[PROOFSTEP]\nrw [← PartENat.natCast_inj]\n[GOAL]\ncase neg\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : Nontrivial R\ninst✝¹ : NormalizationMonoid R\ndec_dvd : DecidableRel Dvd.dvd\ninst✝ : DecidableEq R\np x : R\nhp : Irreducible p\nhnorm : ↑normalize p = p\nn : ℕ\nhle : p ^ n ∣ x\nhlt : ¬p ^ (n + 1) ∣ x\nthis : DecidableRel fun x x_1 => x ∣ x_1 := fun x x_1 => Classical.propDecidable ((fun x x_2 => x ∣ x_2) x x_1)\nhx0 : ¬x = 0\n⊢ ↑(count p (normalizedFactors x)) = ↑n\n[PROOFSTEP]\nconvert (multiplicity_eq_count_normalizedFactors hp hx0).symm\n[GOAL]\ncase h.e'_2.h.e'_3.h.e'_3\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : Nontrivial R\ninst✝¹ : NormalizationMonoid R\ndec_dvd : DecidableRel Dvd.dvd\ninst✝ : DecidableEq R\np x : R\nhp : Irreducible p\nhnorm : ↑normalize p = p\nn : ℕ\nhle : p ^ n ∣ x\nhlt : ¬p ^ (n + 1) ∣ x\nthis : DecidableRel fun x x_1 => x ∣ x_1 := fun x x_1 => Classical.propDecidable ((fun x x_2 => x ∣ x_2) x x_1)\nhx0 : ¬x = 0\n⊢ p = ↑normalize p\n[PROOFSTEP]\nexact hnorm.symm\n[GOAL]\ncase h.e'_3\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : Nontrivial R\ninst✝¹ : NormalizationMonoid R\ndec_dvd : DecidableRel Dvd.dvd\ninst✝ : DecidableEq R\np x : R\nhp : Irreducible p\nhnorm : ↑normalize p = p\nn : ℕ\nhle : p ^ n ∣ x\nhlt : ¬p ^ (n + 1) ∣ x\nthis : DecidableRel fun x x_1 => x ∣ x_1 := fun x x_1 => Classical.propDecidable ((fun x x_2 => x ∣ x_2) x x_1)\nhx0 : ¬x = 0\n⊢ ↑n = multiplicity p x\n[PROOFSTEP]\nexact (multiplicity.eq_coe_iff.mpr ⟨hle, hlt⟩).symm\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : Nontrivial R\ninst✝¹ : NormalizationMonoid R\ndec_dvd : DecidableRel Dvd.dvd\ninst✝ : DecidableEq R\np x : R\nhp : p = 0 ∨ Irreducible p\nhnorm : ↑normalize p = p\nn : ℕ\nhle : p ^ n ∣ x\nhlt : ¬p ^ (n + 1) ∣ x\n⊢ count p (normalizedFactors x) = n\n[PROOFSTEP]\nrcases hp with (rfl | hp)\n[GOAL]\ncase inl\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : Nontrivial R\ninst✝¹ : NormalizationMonoid R\ndec_dvd : DecidableRel Dvd.dvd\ninst✝ : DecidableEq R\nx : R\nn : ℕ\nhnorm : ↑normalize 0 = 0\nhle : 0 ^ n ∣ x\nhlt : ¬0 ^ (n + 1) ∣ x\n⊢ count 0 (normalizedFactors x) = n\n[PROOFSTEP]\ncases n\n[GOAL]\ncase inl.zero\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : Nontrivial R\ninst✝¹ : NormalizationMonoid R\ndec_dvd : DecidableRel Dvd.dvd\ninst✝ : DecidableEq R\nx : R\nhnorm : ↑normalize 0 = 0\nhle : 0 ^ Nat.zero ∣ x\nhlt : ¬0 ^ (Nat.zero + 1) ∣ x\n⊢ count 0 (normalizedFactors x) = Nat.zero\n[PROOFSTEP]\nexact count_eq_zero.2 (zero_not_mem_normalizedFactors _)\n[GOAL]\ncase inl.succ\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : Nontrivial R\ninst✝¹ : NormalizationMonoid R\ndec_dvd : DecidableRel Dvd.dvd\ninst✝ : DecidableEq R\nx : R\nhnorm : ↑normalize 0 = 0\nn✝ : ℕ\nhle : 0 ^ Nat.succ n✝ ∣ x\nhlt : ¬0 ^ (Nat.succ n✝ + 1) ∣ x\n⊢ count 0 (normalizedFactors x) = Nat.succ n✝\n[PROOFSTEP]\nrw [zero_pow (Nat.succ_pos _)] at hle hlt \n[GOAL]\ncase inl.succ\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : Nontrivial R\ninst✝¹ : NormalizationMonoid R\ndec_dvd : DecidableRel Dvd.dvd\ninst✝ : DecidableEq R\nx : R\nhnorm : ↑normalize 0 = 0\nn✝ : ℕ\nhle : 0 ∣ x\nhlt : ¬0 ∣ x\n⊢ count 0 (normalizedFactors x) = Nat.succ n✝\n[PROOFSTEP]\nexact absurd hle hlt\n[GOAL]\ncase inr\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : Nontrivial R\ninst✝¹ : NormalizationMonoid R\ndec_dvd : DecidableRel Dvd.dvd\ninst✝ : DecidableEq R\np x : R\nhnorm : ↑normalize p = p\nn : ℕ\nhle : p ^ n ∣ x\nhlt : ¬p ^ (n + 1) ∣ x\nhp : Irreducible p\n⊢ count p (normalizedFactors x) = n\n[PROOFSTEP]\nexact count_normalizedFactors_eq hp hnorm hle hlt\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝³ : CancelCommMonoidWithZero R\ninst✝² : UniqueFactorizationMonoid R\ninst✝¹ : Nontrivial R\ninst✝ : NormalizationMonoid R\ndec_dvd : DecidableRel Dvd.dvd\na₀ x : R\nh : a₀ ≠ 0\nhx : Irreducible x\n⊢ ∃ n a, ¬x ∣ a ∧ a₀ = x ^ n * a\n[PROOFSTEP]\nclassical\nlet n := (normalizedFactors a₀).count (normalize x)\nobtain ⟨a, ha1, ha2⟩ :=\n @exists_eq_pow_mul_and_not_dvd R _ _ x a₀\n (ne_top_iff_finite.mp (PartENat.ne_top_iff.mpr ⟨n, multiplicity_eq_count_normalizedFactors hx h⟩))\nsimp_rw [← (multiplicity_eq_count_normalizedFactors hx h).symm] at ha1 \nuse n, a, ha2, ha1\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝³ : CancelCommMonoidWithZero R\ninst✝² : UniqueFactorizationMonoid R\ninst✝¹ : Nontrivial R\ninst✝ : NormalizationMonoid R\ndec_dvd : DecidableRel Dvd.dvd\na₀ x : R\nh : a₀ ≠ 0\nhx : Irreducible x\n⊢ ∃ n a, ¬x ∣ a ∧ a₀ = x ^ n * a\n[PROOFSTEP]\nlet n := (normalizedFactors a₀).count (normalize x)\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝³ : CancelCommMonoidWithZero R\ninst✝² : UniqueFactorizationMonoid R\ninst✝¹ : Nontrivial R\ninst✝ : NormalizationMonoid R\ndec_dvd : DecidableRel Dvd.dvd\na₀ x : R\nh : a₀ ≠ 0\nhx : Irreducible x\nn : ℕ := count (↑normalize x) (normalizedFactors a₀)\n⊢ ∃ n a, ¬x ∣ a ∧ a₀ = x ^ n * a\n[PROOFSTEP]\nobtain ⟨a, ha1, ha2⟩ :=\n @exists_eq_pow_mul_and_not_dvd R _ _ x a₀\n (ne_top_iff_finite.mp (PartENat.ne_top_iff.mpr ⟨n, multiplicity_eq_count_normalizedFactors hx h⟩))\n[GOAL]\ncase intro.intro\nα : Type u_1\nR : Type u_2\ninst✝³ : CancelCommMonoidWithZero R\ninst✝² : UniqueFactorizationMonoid R\ninst✝¹ : Nontrivial R\ninst✝ : NormalizationMonoid R\ndec_dvd : DecidableRel Dvd.dvd\na₀ x : R\nh : a₀ ≠ 0\nhx : Irreducible x\nn : ℕ := count (↑normalize x) (normalizedFactors a₀)\na : R\nha1 : a₀ = x ^ Part.get (multiplicity x a₀) (_ : multiplicity.Finite x a₀) * a\nha2 : ¬x ∣ a\n⊢ ∃ n a, ¬x ∣ a ∧ a₀ = x ^ n * a\n[PROOFSTEP]\nsimp_rw [← (multiplicity_eq_count_normalizedFactors hx h).symm] at ha1 \n[GOAL]\ncase intro.intro\nα : Type u_1\nR : Type u_2\ninst✝³ : CancelCommMonoidWithZero R\ninst✝² : UniqueFactorizationMonoid R\ninst✝¹ : Nontrivial R\ninst✝ : NormalizationMonoid R\ndec_dvd : DecidableRel Dvd.dvd\na₀ x : R\nh : a₀ ≠ 0\nhx : Irreducible x\nn : ℕ := count (↑normalize x) (normalizedFactors a₀)\na : R\nha2 : ¬x ∣ a\nha1 :\n a₀ =\n x ^\n Part.get ↑(count (↑normalize x) (normalizedFactors a₀))\n (_ : (↑(count (↑normalize x) (normalizedFactors a₀))).Dom) *\n a\n⊢ ∃ n a, ¬x ∣ a ∧ a₀ = x ^ n * a\n[PROOFSTEP]\nuse n, a, ha2, ha1\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝⁵ : CancelCommMonoidWithZero R\ninst✝⁴ : UniqueFactorizationMonoid R\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝¹ : CancelCommMonoidWithZero β\ninst✝ : DecidableEq α\ns : Finset α\ni : α → ℕ\np : α\nhps : ¬p ∈ s\nis_prime : ∀ (q : α), q ∈ insert p s → Prime q\nis_coprime : ∀ (q : α), q ∈ insert p s → ∀ (q' : α), q' ∈ insert p s → q ∣ q' → q = q'\n⊢ ∀ (q : α), q ∣ p ^ i p → q ∣ ∏ p' in s, p' ^ i p' → IsUnit q\n[PROOFSTEP]\nhave hp := is_prime _ (Finset.mem_insert_self _ _)\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝⁵ : CancelCommMonoidWithZero R\ninst✝⁴ : UniqueFactorizationMonoid R\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝¹ : CancelCommMonoidWithZero β\ninst✝ : DecidableEq α\ns : Finset α\ni : α → ℕ\np : α\nhps : ¬p ∈ s\nis_prime : ∀ (q : α), q ∈ insert p s → Prime q\nis_coprime : ∀ (q : α), q ∈ insert p s → ∀ (q' : α), q' ∈ insert p s → q ∣ q' → q = q'\nhp : Prime p\n⊢ ∀ (q : α), q ∣ p ^ i p → q ∣ ∏ p' in s, p' ^ i p' → IsUnit q\n[PROOFSTEP]\nrefine' fun _ => no_factors_of_no_prime_factors (pow_ne_zero _ hp.ne_zero) _\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝⁵ : CancelCommMonoidWithZero R\ninst✝⁴ : UniqueFactorizationMonoid R\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝¹ : CancelCommMonoidWithZero β\ninst✝ : DecidableEq α\ns : Finset α\ni : α → ℕ\np : α\nhps : ¬p ∈ s\nis_prime : ∀ (q : α), q ∈ insert p s → Prime q\nis_coprime : ∀ (q : α), q ∈ insert p s → ∀ (q' : α), q' ∈ insert p s → q ∣ q' → q = q'\nhp : Prime p\nx✝ : α\n⊢ ∀ {d : α}, d ∣ p ^ i p → d ∣ ∏ p' in s, p' ^ i p' → ¬Prime d\n[PROOFSTEP]\nintro d hdp hdprod hd\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝⁵ : CancelCommMonoidWithZero R\ninst✝⁴ : UniqueFactorizationMonoid R\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝¹ : CancelCommMonoidWithZero β\ninst✝ : DecidableEq α\ns : Finset α\ni : α → ℕ\np : α\nhps : ¬p ∈ s\nis_prime : ∀ (q : α), q ∈ insert p s → Prime q\nis_coprime : ∀ (q : α), q ∈ insert p s → ∀ (q' : α), q' ∈ insert p s → q ∣ q' → q = q'\nhp : Prime p\nx✝ d : α\nhdp : d ∣ p ^ i p\nhdprod : d ∣ ∏ p' in s, p' ^ i p'\nhd : Prime d\n⊢ False\n[PROOFSTEP]\napply hps\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝⁵ : CancelCommMonoidWithZero R\ninst✝⁴ : UniqueFactorizationMonoid R\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝¹ : CancelCommMonoidWithZero β\ninst✝ : DecidableEq α\ns : Finset α\ni : α → ℕ\np : α\nhps : ¬p ∈ s\nis_prime : ∀ (q : α), q ∈ insert p s → Prime q\nis_coprime : ∀ (q : α), q ∈ insert p s → ∀ (q' : α), q' ∈ insert p s → q ∣ q' → q = q'\nhp : Prime p\nx✝ d : α\nhdp : d ∣ p ^ i p\nhdprod : d ∣ ∏ p' in s, p' ^ i p'\nhd : Prime d\n⊢ p ∈ s\n[PROOFSTEP]\nreplace hdp := hd.dvd_of_dvd_pow hdp\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝⁵ : CancelCommMonoidWithZero R\ninst✝⁴ : UniqueFactorizationMonoid R\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝¹ : CancelCommMonoidWithZero β\ninst✝ : DecidableEq α\ns : Finset α\ni : α → ℕ\np : α\nhps : ¬p ∈ s\nis_prime : ∀ (q : α), q ∈ insert p s → Prime q\nis_coprime : ∀ (q : α), q ∈ insert p s → ∀ (q' : α), q' ∈ insert p s → q ∣ q' → q = q'\nhp : Prime p\nx✝ d : α\nhdprod : d ∣ ∏ p' in s, p' ^ i p'\nhd : Prime d\nhdp : d ∣ p\n⊢ p ∈ s\n[PROOFSTEP]\nobtain ⟨q, q_mem', hdq⟩ := hd.exists_mem_multiset_dvd hdprod\n[GOAL]\ncase intro.intro\nα : Type u_1\nR : Type u_2\ninst✝⁵ : CancelCommMonoidWithZero R\ninst✝⁴ : UniqueFactorizationMonoid R\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝¹ : CancelCommMonoidWithZero β\ninst✝ : DecidableEq α\ns : Finset α\ni : α → ℕ\np : α\nhps : ¬p ∈ s\nis_prime : ∀ (q : α), q ∈ insert p s → Prime q\nis_coprime : ∀ (q : α), q ∈ insert p s → ∀ (q' : α), q' ∈ insert p s → q ∣ q' → q = q'\nhp : Prime p\nx✝ d : α\nhdprod : d ∣ ∏ p' in s, p' ^ i p'\nhd : Prime d\nhdp : d ∣ p\nq : α\nq_mem' : q ∈ Multiset.map (fun p' => p' ^ i p') s.val\nhdq : d ∣ q\n⊢ p ∈ s\n[PROOFSTEP]\nobtain ⟨q, q_mem, rfl⟩ := Multiset.mem_map.mp q_mem'\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nR : Type u_2\ninst✝⁵ : CancelCommMonoidWithZero R\ninst✝⁴ : UniqueFactorizationMonoid R\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝¹ : CancelCommMonoidWithZero β\ninst✝ : DecidableEq α\ns : Finset α\ni : α → ℕ\np : α\nhps : ¬p ∈ s\nis_prime : ∀ (q : α), q ∈ insert p s → Prime q\nis_coprime : ∀ (q : α), q ∈ insert p s → ∀ (q' : α), q' ∈ insert p s → q ∣ q' → q = q'\nhp : Prime p\nx✝ d : α\nhdprod : d ∣ ∏ p' in s, p' ^ i p'\nhd : Prime d\nhdp : d ∣ p\nq : α\nq_mem : q ∈ s.val\nq_mem' : q ^ i q ∈ Multiset.map (fun p' => p' ^ i p') s.val\nhdq : d ∣ q ^ i q\n⊢ p ∈ s\n[PROOFSTEP]\nreplace hdq := hd.dvd_of_dvd_pow hdq\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nR : Type u_2\ninst✝⁵ : CancelCommMonoidWithZero R\ninst✝⁴ : UniqueFactorizationMonoid R\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝¹ : CancelCommMonoidWithZero β\ninst✝ : DecidableEq α\ns : Finset α\ni : α → ℕ\np : α\nhps : ¬p ∈ s\nis_prime : ∀ (q : α), q ∈ insert p s → Prime q\nis_coprime : ∀ (q : α), q ∈ insert p s → ∀ (q' : α), q' ∈ insert p s → q ∣ q' → q = q'\nhp : Prime p\nx✝ d : α\nhdprod : d ∣ ∏ p' in s, p' ^ i p'\nhd : Prime d\nhdp : d ∣ p\nq : α\nq_mem : q ∈ s.val\nq_mem' : q ^ i q ∈ Multiset.map (fun p' => p' ^ i p') s.val\nhdq : d ∣ q\n⊢ p ∈ s\n[PROOFSTEP]\nhave : p ∣ q := dvd_trans (hd.irreducible.dvd_symm hp.irreducible hdp) hdq\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nR : Type u_2\ninst✝⁵ : CancelCommMonoidWithZero R\ninst✝⁴ : UniqueFactorizationMonoid R\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝¹ : CancelCommMonoidWithZero β\ninst✝ : DecidableEq α\ns : Finset α\ni : α → ℕ\np : α\nhps : ¬p ∈ s\nis_prime : ∀ (q : α), q ∈ insert p s → Prime q\nis_coprime : ∀ (q : α), q ∈ insert p s → ∀ (q' : α), q' ∈ insert p s → q ∣ q' → q = q'\nhp : Prime p\nx✝ d : α\nhdprod : d ∣ ∏ p' in s, p' ^ i p'\nhd : Prime d\nhdp : d ∣ p\nq : α\nq_mem : q ∈ s.val\nq_mem' : q ^ i q ∈ Multiset.map (fun p' => p' ^ i p') s.val\nhdq : d ∣ q\nthis : p ∣ q\n⊢ p ∈ s\n[PROOFSTEP]\nconvert q_mem\n[GOAL]\ncase a\nα : Type u_1\nR : Type u_2\ninst✝⁵ : CancelCommMonoidWithZero R\ninst✝⁴ : UniqueFactorizationMonoid R\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝¹ : CancelCommMonoidWithZero β\ninst✝ : DecidableEq α\ns : Finset α\ni : α → ℕ\np : α\nhps : ¬p ∈ s\nis_prime : ∀ (q : α), q ∈ insert p s → Prime q\nis_coprime : ∀ (q : α), q ∈ insert p s → ∀ (q' : α), q' ∈ insert p s → q ∣ q' → q = q'\nhp : Prime p\nx✝ d : α\nhdprod : d ∣ ∏ p' in s, p' ^ i p'\nhd : Prime d\nhdp : d ∣ p\nq : α\nq_mem : q ∈ s.val\nq_mem' : q ^ i q ∈ Multiset.map (fun p' => p' ^ i p') s.val\nhdq : d ∣ q\nthis : p ∣ q\n⊢ p ∈ s ↔ q ∈ s.val\n[PROOFSTEP]\nrw [Finset.mem_val, is_coprime _ (Finset.mem_insert_self p s) _ (Finset.mem_insert_of_mem q_mem) this]\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nP : α → Prop\ns : Finset α\ni : α → ℕ\nis_prime : ∀ (p : α), p ∈ s → Prime p\nis_coprime : ∀ (p : α), p ∈ s → ∀ (q : α), q ∈ s → p ∣ q → p = q\nh1 : ∀ {x : α}, IsUnit x → P x\nhpr : ∀ {p : α} (i : ℕ), Prime p → P (p ^ i)\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → P x → P y → P (x * y)\n⊢ P (∏ p in s, p ^ i p)\n[PROOFSTEP]\nletI := Classical.decEq α\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nP : α → Prop\ns : Finset α\ni : α → ℕ\nis_prime : ∀ (p : α), p ∈ s → Prime p\nis_coprime : ∀ (p : α), p ∈ s → ∀ (q : α), q ∈ s → p ∣ q → p = q\nh1 : ∀ {x : α}, IsUnit x → P x\nhpr : ∀ {p : α} (i : ℕ), Prime p → P (p ^ i)\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → P x → P y → P (x * y)\nthis : DecidableEq α := Classical.decEq α\n⊢ P (∏ p in s, p ^ i p)\n[PROOFSTEP]\ninduction' s using Finset.induction_on with p f' hpf' ih\n[GOAL]\ncase empty\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nP : α → Prop\ns : Finset α\ni : α → ℕ\nis_prime✝ : ∀ (p : α), p ∈ s → Prime p\nis_coprime✝ : ∀ (p : α), p ∈ s → ∀ (q : α), q ∈ s → p ∣ q → p = q\nh1 : ∀ {x : α}, IsUnit x → P x\nhpr : ∀ {p : α} (i : ℕ), Prime p → P (p ^ i)\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → P x → P y → P (x * y)\nthis : DecidableEq α := Classical.decEq α\nis_prime : ∀ (p : α), p ∈ ∅ → Prime p\nis_coprime : ∀ (p : α), p ∈ ∅ → ∀ (q : α), q ∈ ∅ → p ∣ q → p = q\n⊢ P (∏ p in ∅, p ^ i p)\n[PROOFSTEP]\nsimpa using h1 isUnit_one\n[GOAL]\ncase insert\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nP : α → Prop\ns : Finset α\ni : α → ℕ\nis_prime✝ : ∀ (p : α), p ∈ s → Prime p\nis_coprime✝ : ∀ (p : α), p ∈ s → ∀ (q : α), q ∈ s → p ∣ q → p = q\nh1 : ∀ {x : α}, IsUnit x → P x\nhpr : ∀ {p : α} (i : ℕ), Prime p → P (p ^ i)\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → P x → P y → P (x * y)\nthis : DecidableEq α := Classical.decEq α\np : α\nf' : Finset α\nhpf' : ¬p ∈ f'\nih : (∀ (p : α), p ∈ f' → Prime p) → (∀ (p : α), p ∈ f' → ∀ (q : α), q ∈ f' → p ∣ q → p = q) → P (∏ p in f', p ^ i p)\nis_prime : ∀ (p_1 : α), p_1 ∈ insert p f' → Prime p_1\nis_coprime : ∀ (p_1 : α), p_1 ∈ insert p f' → ∀ (q : α), q ∈ insert p f' → p_1 ∣ q → p_1 = q\n⊢ P (∏ p in insert p f', p ^ i p)\n[PROOFSTEP]\nrw [Finset.prod_insert hpf']\n[GOAL]\ncase insert\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nP : α → Prop\ns : Finset α\ni : α → ℕ\nis_prime✝ : ∀ (p : α), p ∈ s → Prime p\nis_coprime✝ : ∀ (p : α), p ∈ s → ∀ (q : α), q ∈ s → p ∣ q → p = q\nh1 : ∀ {x : α}, IsUnit x → P x\nhpr : ∀ {p : α} (i : ℕ), Prime p → P (p ^ i)\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → P x → P y → P (x * y)\nthis : DecidableEq α := Classical.decEq α\np : α\nf' : Finset α\nhpf' : ¬p ∈ f'\nih : (∀ (p : α), p ∈ f' → Prime p) → (∀ (p : α), p ∈ f' → ∀ (q : α), q ∈ f' → p ∣ q → p = q) → P (∏ p in f', p ^ i p)\nis_prime : ∀ (p_1 : α), p_1 ∈ insert p f' → Prime p_1\nis_coprime : ∀ (p_1 : α), p_1 ∈ insert p f' → ∀ (q : α), q ∈ insert p f' → p_1 ∣ q → p_1 = q\n⊢ P (p ^ i p * ∏ x in f', x ^ i x)\n[PROOFSTEP]\nexact\n hcp (prime_pow_coprime_prod_of_coprime_insert i p hpf' is_prime is_coprime)\n (hpr (i p) (is_prime _ (Finset.mem_insert_self _ _)))\n (ih (fun q hq => is_prime _ (Finset.mem_insert_of_mem hq)) fun q hq q' hq' =>\n is_coprime _ (Finset.mem_insert_of_mem hq) _ (Finset.mem_insert_of_mem hq'))\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nP : α → Prop\na : α\nh0 : P 0\nh1 : ∀ {x : α}, IsUnit x → P x\nhpr : ∀ {p : α} (i : ℕ), Prime p → P (p ^ i)\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → P x → P y → P (x * y)\n⊢ P a\n[PROOFSTEP]\nletI := Classical.decEq α\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nP : α → Prop\na : α\nh0 : P 0\nh1 : ∀ {x : α}, IsUnit x → P x\nhpr : ∀ {p : α} (i : ℕ), Prime p → P (p ^ i)\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → P x → P y → P (x * y)\nthis : DecidableEq α := Classical.decEq α\n⊢ P a\n[PROOFSTEP]\nhave P_of_associated : ∀ {x y}, Associated x y → P x → P y :=\n by\n rintro x y ⟨u, rfl⟩ hx\n exact hcp (fun p _ hpx => isUnit_of_dvd_unit hpx u.isUnit) hx (h1 u.isUnit)\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nP : α → Prop\na : α\nh0 : P 0\nh1 : ∀ {x : α}, IsUnit x → P x\nhpr : ∀ {p : α} (i : ℕ), Prime p → P (p ^ i)\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → P x → P y → P (x * y)\nthis : DecidableEq α := Classical.decEq α\n⊢ ∀ {x y : α}, x ~ᵤ y → P x → P y\n[PROOFSTEP]\nrintro x y ⟨u, rfl⟩ hx\n[GOAL]\ncase intro\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nP : α → Prop\na : α\nh0 : P 0\nh1 : ∀ {x : α}, IsUnit x → P x\nhpr : ∀ {p : α} (i : ℕ), Prime p → P (p ^ i)\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → P x → P y → P (x * y)\nthis : DecidableEq α := Classical.decEq α\nx : α\nu : αˣ\nhx : P x\n⊢ P (x * ↑u)\n[PROOFSTEP]\nexact hcp (fun p _ hpx => isUnit_of_dvd_unit hpx u.isUnit) hx (h1 u.isUnit)\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nP : α → Prop\na : α\nh0 : P 0\nh1 : ∀ {x : α}, IsUnit x → P x\nhpr : ∀ {p : α} (i : ℕ), Prime p → P (p ^ i)\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → P x → P y → P (x * y)\nthis : DecidableEq α := Classical.decEq α\nP_of_associated : ∀ {x y : α}, x ~ᵤ y → P x → P y\n⊢ P a\n[PROOFSTEP]\nby_cases ha0 : a = 0\n[GOAL]\ncase pos\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nP : α → Prop\na : α\nh0 : P 0\nh1 : ∀ {x : α}, IsUnit x → P x\nhpr : ∀ {p : α} (i : ℕ), Prime p → P (p ^ i)\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → P x → P y → P (x * y)\nthis : DecidableEq α := Classical.decEq α\nP_of_associated : ∀ {x y : α}, x ~ᵤ y → P x → P y\nha0 : a = 0\n⊢ P a\n[PROOFSTEP]\nrwa [ha0]\n[GOAL]\ncase neg\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nP : α → Prop\na : α\nh0 : P 0\nh1 : ∀ {x : α}, IsUnit x → P x\nhpr : ∀ {p : α} (i : ℕ), Prime p → P (p ^ i)\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → P x → P y → P (x * y)\nthis : DecidableEq α := Classical.decEq α\nP_of_associated : ∀ {x y : α}, x ~ᵤ y → P x → P y\nha0 : ¬a = 0\n⊢ P a\n[PROOFSTEP]\nhaveI : Nontrivial α := ⟨⟨_, _, ha0⟩⟩\n[GOAL]\ncase neg\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nP : α → Prop\na : α\nh0 : P 0\nh1 : ∀ {x : α}, IsUnit x → P x\nhpr : ∀ {p : α} (i : ℕ), Prime p → P (p ^ i)\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → P x → P y → P (x * y)\nthis✝ : DecidableEq α := Classical.decEq α\nP_of_associated : ∀ {x y : α}, x ~ᵤ y → P x → P y\nha0 : ¬a = 0\nthis : Nontrivial α\n⊢ P a\n[PROOFSTEP]\nletI : NormalizationMonoid α := UniqueFactorizationMonoid.normalizationMonoid\n[GOAL]\ncase neg\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nP : α → Prop\na : α\nh0 : P 0\nh1 : ∀ {x : α}, IsUnit x → P x\nhpr : ∀ {p : α} (i : ℕ), Prime p → P (p ^ i)\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → P x → P y → P (x * y)\nthis✝¹ : DecidableEq α := Classical.decEq α\nP_of_associated : ∀ {x y : α}, x ~ᵤ y → P x → P y\nha0 : ¬a = 0\nthis✝ : Nontrivial α\nthis : NormalizationMonoid α := UniqueFactorizationMonoid.normalizationMonoid\n⊢ P a\n[PROOFSTEP]\nrefine' P_of_associated (normalizedFactors_prod ha0) _\n[GOAL]\ncase neg\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nP : α → Prop\na : α\nh0 : P 0\nh1 : ∀ {x : α}, IsUnit x → P x\nhpr : ∀ {p : α} (i : ℕ), Prime p → P (p ^ i)\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → P x → P y → P (x * y)\nthis✝¹ : DecidableEq α := Classical.decEq α\nP_of_associated : ∀ {x y : α}, x ~ᵤ y → P x → P y\nha0 : ¬a = 0\nthis✝ : Nontrivial α\nthis : NormalizationMonoid α := UniqueFactorizationMonoid.normalizationMonoid\n⊢ P (Multiset.prod (normalizedFactors a))\n[PROOFSTEP]\nrw [← (normalizedFactors a).map_id, Finset.prod_multiset_map_count]\n[GOAL]\ncase neg\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nP : α → Prop\na : α\nh0 : P 0\nh1 : ∀ {x : α}, IsUnit x → P x\nhpr : ∀ {p : α} (i : ℕ), Prime p → P (p ^ i)\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → P x → P y → P (x * y)\nthis✝¹ : DecidableEq α := Classical.decEq α\nP_of_associated : ∀ {x y : α}, x ~ᵤ y → P x → P y\nha0 : ¬a = 0\nthis✝ : Nontrivial α\nthis : NormalizationMonoid α := UniqueFactorizationMonoid.normalizationMonoid\n⊢ P (∏ m in Multiset.toFinset (normalizedFactors a), id m ^ Multiset.count m (normalizedFactors a))\n[PROOFSTEP]\nrefine' induction_on_prime_power _ _ _ _ @h1 @hpr @hcp\n[GOAL]\ncase neg.refine'_1\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nP : α → Prop\na : α\nh0 : P 0\nh1 : ∀ {x : α}, IsUnit x → P x\nhpr : ∀ {p : α} (i : ℕ), Prime p → P (p ^ i)\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → P x → P y → P (x * y)\nthis✝¹ : DecidableEq α := Classical.decEq α\nP_of_associated : ∀ {x y : α}, x ~ᵤ y → P x → P y\nha0 : ¬a = 0\nthis✝ : Nontrivial α\nthis : NormalizationMonoid α := UniqueFactorizationMonoid.normalizationMonoid\n⊢ ∀ (p : α), p ∈ Multiset.toFinset (normalizedFactors a) → Prime p\n[PROOFSTEP]\nsimp only [Multiset.mem_toFinset]\n[GOAL]\ncase neg.refine'_2\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nP : α → Prop\na : α\nh0 : P 0\nh1 : ∀ {x : α}, IsUnit x → P x\nhpr : ∀ {p : α} (i : ℕ), Prime p → P (p ^ i)\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → P x → P y → P (x * y)\nthis✝¹ : DecidableEq α := Classical.decEq α\nP_of_associated : ∀ {x y : α}, x ~ᵤ y → P x → P y\nha0 : ¬a = 0\nthis✝ : Nontrivial α\nthis : NormalizationMonoid α := UniqueFactorizationMonoid.normalizationMonoid\n⊢ ∀ (p : α),\n p ∈ Multiset.toFinset (normalizedFactors a) → ∀ (q : α), q ∈ Multiset.toFinset (normalizedFactors a) → p ∣ q → p = q\n[PROOFSTEP]\nsimp only [Multiset.mem_toFinset]\n[GOAL]\ncase neg.refine'_1\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nP : α → Prop\na : α\nh0 : P 0\nh1 : ∀ {x : α}, IsUnit x → P x\nhpr : ∀ {p : α} (i : ℕ), Prime p → P (p ^ i)\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → P x → P y → P (x * y)\nthis✝¹ : DecidableEq α := Classical.decEq α\nP_of_associated : ∀ {x y : α}, x ~ᵤ y → P x → P y\nha0 : ¬a = 0\nthis✝ : Nontrivial α\nthis : NormalizationMonoid α := UniqueFactorizationMonoid.normalizationMonoid\n⊢ ∀ (p : α), p ∈ normalizedFactors a → Prime p\n[PROOFSTEP]\napply prime_of_normalized_factor\n[GOAL]\ncase neg.refine'_2\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nP : α → Prop\na : α\nh0 : P 0\nh1 : ∀ {x : α}, IsUnit x → P x\nhpr : ∀ {p : α} (i : ℕ), Prime p → P (p ^ i)\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → P x → P y → P (x * y)\nthis✝¹ : DecidableEq α := Classical.decEq α\nP_of_associated : ∀ {x y : α}, x ~ᵤ y → P x → P y\nha0 : ¬a = 0\nthis✝ : Nontrivial α\nthis : NormalizationMonoid α := UniqueFactorizationMonoid.normalizationMonoid\n⊢ ∀ (p : α), p ∈ normalizedFactors a → ∀ (q : α), q ∈ normalizedFactors a → p ∣ q → p = q\n[PROOFSTEP]\napply normalizedFactors_eq_of_dvd\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\ns : Finset α\ni j : α → ℕ\nis_prime : ∀ (p : α), p ∈ s → Prime p\nis_coprime : ∀ (p : α), p ∈ s → ∀ (q : α), q ∈ s → p ∣ q → p = q\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\n⊢ f (∏ p in s, p ^ (i p + j p)) = f (∏ p in s, p ^ i p) * f (∏ p in s, p ^ j p)\n[PROOFSTEP]\nletI := Classical.decEq α\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\ns : Finset α\ni j : α → ℕ\nis_prime : ∀ (p : α), p ∈ s → Prime p\nis_coprime : ∀ (p : α), p ∈ s → ∀ (q : α), q ∈ s → p ∣ q → p = q\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis : DecidableEq α := Classical.decEq α\n⊢ f (∏ p in s, p ^ (i p + j p)) = f (∏ p in s, p ^ i p) * f (∏ p in s, p ^ j p)\n[PROOFSTEP]\ninduction' s using Finset.induction_on with p s hps ih\n[GOAL]\ncase empty\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\ns : Finset α\ni j : α → ℕ\nis_prime✝ : ∀ (p : α), p ∈ s → Prime p\nis_coprime✝ : ∀ (p : α), p ∈ s → ∀ (q : α), q ∈ s → p ∣ q → p = q\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis : DecidableEq α := Classical.decEq α\nis_prime : ∀ (p : α), p ∈ ∅ → Prime p\nis_coprime : ∀ (p : α), p ∈ ∅ → ∀ (q : α), q ∈ ∅ → p ∣ q → p = q\n⊢ f (∏ p in ∅, p ^ (i p + j p)) = f (∏ p in ∅, p ^ i p) * f (∏ p in ∅, p ^ j p)\n[PROOFSTEP]\nsimpa using h1 isUnit_one\n[GOAL]\ncase insert\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\ns✝ : Finset α\ni j : α → ℕ\nis_prime✝ : ∀ (p : α), p ∈ s✝ → Prime p\nis_coprime✝ : ∀ (p : α), p ∈ s✝ → ∀ (q : α), q ∈ s✝ → p ∣ q → p = q\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis : DecidableEq α := Classical.decEq α\np : α\ns : Finset α\nhps : ¬p ∈ s\nih :\n (∀ (p : α), p ∈ s → Prime p) →\n (∀ (p : α), p ∈ s → ∀ (q : α), q ∈ s → p ∣ q → p = q) →\n f (∏ p in s, p ^ (i p + j p)) = f (∏ p in s, p ^ i p) * f (∏ p in s, p ^ j p)\nis_prime : ∀ (p_1 : α), p_1 ∈ insert p s → Prime p_1\nis_coprime : ∀ (p_1 : α), p_1 ∈ insert p s → ∀ (q : α), q ∈ insert p s → p_1 ∣ q → p_1 = q\n⊢ f (∏ p in insert p s, p ^ (i p + j p)) = f (∏ p in insert p s, p ^ i p) * f (∏ p in insert p s, p ^ j p)\n[PROOFSTEP]\nhave hpr_p := is_prime _ (Finset.mem_insert_self _ _)\n[GOAL]\ncase insert\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\ns✝ : Finset α\ni j : α → ℕ\nis_prime✝ : ∀ (p : α), p ∈ s✝ → Prime p\nis_coprime✝ : ∀ (p : α), p ∈ s✝ → ∀ (q : α), q ∈ s✝ → p ∣ q → p = q\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis : DecidableEq α := Classical.decEq α\np : α\ns : Finset α\nhps : ¬p ∈ s\nih :\n (∀ (p : α), p ∈ s → Prime p) →\n (∀ (p : α), p ∈ s → ∀ (q : α), q ∈ s → p ∣ q → p = q) →\n f (∏ p in s, p ^ (i p + j p)) = f (∏ p in s, p ^ i p) * f (∏ p in s, p ^ j p)\nis_prime : ∀ (p_1 : α), p_1 ∈ insert p s → Prime p_1\nis_coprime : ∀ (p_1 : α), p_1 ∈ insert p s → ∀ (q : α), q ∈ insert p s → p_1 ∣ q → p_1 = q\nhpr_p : Prime p\n⊢ f (∏ p in insert p s, p ^ (i p + j p)) = f (∏ p in insert p s, p ^ i p) * f (∏ p in insert p s, p ^ j p)\n[PROOFSTEP]\nhave hpr_s : ∀ p ∈ s, Prime p := fun p hp => is_prime _ (Finset.mem_insert_of_mem hp)\n[GOAL]\ncase insert\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\ns✝ : Finset α\ni j : α → ℕ\nis_prime✝ : ∀ (p : α), p ∈ s✝ → Prime p\nis_coprime✝ : ∀ (p : α), p ∈ s✝ → ∀ (q : α), q ∈ s✝ → p ∣ q → p = q\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis : DecidableEq α := Classical.decEq α\np : α\ns : Finset α\nhps : ¬p ∈ s\nih :\n (∀ (p : α), p ∈ s → Prime p) →\n (∀ (p : α), p ∈ s → ∀ (q : α), q ∈ s → p ∣ q → p = q) →\n f (∏ p in s, p ^ (i p + j p)) = f (∏ p in s, p ^ i p) * f (∏ p in s, p ^ j p)\nis_prime : ∀ (p_1 : α), p_1 ∈ insert p s → Prime p_1\nis_coprime : ∀ (p_1 : α), p_1 ∈ insert p s → ∀ (q : α), q ∈ insert p s → p_1 ∣ q → p_1 = q\nhpr_p : Prime p\nhpr_s : ∀ (p : α), p ∈ s → Prime p\n⊢ f (∏ p in insert p s, p ^ (i p + j p)) = f (∏ p in insert p s, p ^ i p) * f (∏ p in insert p s, p ^ j p)\n[PROOFSTEP]\nhave hcp_p := fun i => prime_pow_coprime_prod_of_coprime_insert i p hps is_prime is_coprime\n[GOAL]\ncase insert\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\ns✝ : Finset α\ni j : α → ℕ\nis_prime✝ : ∀ (p : α), p ∈ s✝ → Prime p\nis_coprime✝ : ∀ (p : α), p ∈ s✝ → ∀ (q : α), q ∈ s✝ → p ∣ q → p = q\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis : DecidableEq α := Classical.decEq α\np : α\ns : Finset α\nhps : ¬p ∈ s\nih :\n (∀ (p : α), p ∈ s → Prime p) →\n (∀ (p : α), p ∈ s → ∀ (q : α), q ∈ s → p ∣ q → p = q) →\n f (∏ p in s, p ^ (i p + j p)) = f (∏ p in s, p ^ i p) * f (∏ p in s, p ^ j p)\nis_prime : ∀ (p_1 : α), p_1 ∈ insert p s → Prime p_1\nis_coprime : ∀ (p_1 : α), p_1 ∈ insert p s → ∀ (q : α), q ∈ insert p s → p_1 ∣ q → p_1 = q\nhpr_p : Prime p\nhpr_s : ∀ (p : α), p ∈ s → Prime p\nhcp_p : ∀ (i : α → ℕ) (q : α), q ∣ p ^ i p → q ∣ ∏ p' in s, p' ^ i p' → IsUnit q\n⊢ f (∏ p in insert p s, p ^ (i p + j p)) = f (∏ p in insert p s, p ^ i p) * f (∏ p in insert p s, p ^ j p)\n[PROOFSTEP]\nhave hcp_s : ∀ (p) (_ : p ∈ s) (q) (_ : q ∈ s), p ∣ q → p = q := fun p hp q hq =>\n is_coprime p (Finset.mem_insert_of_mem hp) q (Finset.mem_insert_of_mem hq)\n[GOAL]\ncase insert\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\ns✝ : Finset α\ni j : α → ℕ\nis_prime✝ : ∀ (p : α), p ∈ s✝ → Prime p\nis_coprime✝ : ∀ (p : α), p ∈ s✝ → ∀ (q : α), q ∈ s✝ → p ∣ q → p = q\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis : DecidableEq α := Classical.decEq α\np : α\ns : Finset α\nhps : ¬p ∈ s\nih :\n (∀ (p : α), p ∈ s → Prime p) →\n (∀ (p : α), p ∈ s → ∀ (q : α), q ∈ s → p ∣ q → p = q) →\n f (∏ p in s, p ^ (i p + j p)) = f (∏ p in s, p ^ i p) * f (∏ p in s, p ^ j p)\nis_prime : ∀ (p_1 : α), p_1 ∈ insert p s → Prime p_1\nis_coprime : ∀ (p_1 : α), p_1 ∈ insert p s → ∀ (q : α), q ∈ insert p s → p_1 ∣ q → p_1 = q\nhpr_p : Prime p\nhpr_s : ∀ (p : α), p ∈ s → Prime p\nhcp_p : ∀ (i : α → ℕ) (q : α), q ∣ p ^ i p → q ∣ ∏ p' in s, p' ^ i p' → IsUnit q\nhcp_s : ∀ (p : α), p ∈ s → ∀ (q : α), q ∈ s → p ∣ q → p = q\n⊢ f (∏ p in insert p s, p ^ (i p + j p)) = f (∏ p in insert p s, p ^ i p) * f (∏ p in insert p s, p ^ j p)\n[PROOFSTEP]\nrw [Finset.prod_insert hps, Finset.prod_insert hps, Finset.prod_insert hps, hcp (hcp_p _), hpr _ hpr_p, hcp (hcp_p _),\n hpr _ hpr_p, hcp (hcp_p (fun p => i p + j p)), hpr _ hpr_p, ih hpr_s hcp_s, pow_add, mul_assoc,\n mul_left_comm (f p ^ j p), mul_assoc]\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\na b : α\nh0 : f 0 = 0\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\n⊢ f (a * b) = f a * f b\n[PROOFSTEP]\nletI := Classical.decEq α\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\na b : α\nh0 : f 0 = 0\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis : DecidableEq α := Classical.decEq α\n⊢ f (a * b) = f a * f b\n[PROOFSTEP]\nby_cases ha0 : a = 0\n[GOAL]\ncase pos\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\na b : α\nh0 : f 0 = 0\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis : DecidableEq α := Classical.decEq α\nha0 : a = 0\n⊢ f (a * b) = f a * f b\n[PROOFSTEP]\nrw [ha0, zero_mul, h0, zero_mul]\n[GOAL]\ncase neg\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\na b : α\nh0 : f 0 = 0\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis : DecidableEq α := Classical.decEq α\nha0 : ¬a = 0\n⊢ f (a * b) = f a * f b\n[PROOFSTEP]\nby_cases hb0 : b = 0\n[GOAL]\ncase pos\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\na b : α\nh0 : f 0 = 0\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis : DecidableEq α := Classical.decEq α\nha0 : ¬a = 0\nhb0 : b = 0\n⊢ f (a * b) = f a * f b\n[PROOFSTEP]\nrw [hb0, mul_zero, h0, mul_zero]\n[GOAL]\ncase neg\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\na b : α\nh0 : f 0 = 0\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis : DecidableEq α := Classical.decEq α\nha0 : ¬a = 0\nhb0 : ¬b = 0\n⊢ f (a * b) = f a * f b\n[PROOFSTEP]\nby_cases hf1 : f 1 = 0\n[GOAL]\ncase pos\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\na b : α\nh0 : f 0 = 0\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis : DecidableEq α := Classical.decEq α\nha0 : ¬a = 0\nhb0 : ¬b = 0\nhf1 : f 1 = 0\n⊢ f (a * b) = f a * f b\n[PROOFSTEP]\ncalc\n f (a * b) = f (a * b * 1) := by rw [mul_one]\n _ = 0 := by simp only [h1 isUnit_one, hf1, mul_zero]\n _ = f a * f (b * 1) := by simp only [h1 isUnit_one, hf1, mul_zero]\n _ = f a * f b := by rw [mul_one]\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\na b : α\nh0 : f 0 = 0\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis : DecidableEq α := Classical.decEq α\nha0 : ¬a = 0\nhb0 : ¬b = 0\nhf1 : f 1 = 0\n⊢ f (a * b) = f (a * b * 1)\n[PROOFSTEP]\nrw [mul_one]\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\na b : α\nh0 : f 0 = 0\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis : DecidableEq α := Classical.decEq α\nha0 : ¬a = 0\nhb0 : ¬b = 0\nhf1 : f 1 = 0\n⊢ f (a * b * 1) = 0\n[PROOFSTEP]\nsimp only [h1 isUnit_one, hf1, mul_zero]\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\na b : α\nh0 : f 0 = 0\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis : DecidableEq α := Classical.decEq α\nha0 : ¬a = 0\nhb0 : ¬b = 0\nhf1 : f 1 = 0\n⊢ 0 = f a * f (b * 1)\n[PROOFSTEP]\nsimp only [h1 isUnit_one, hf1, mul_zero]\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\na b : α\nh0 : f 0 = 0\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis : DecidableEq α := Classical.decEq α\nha0 : ¬a = 0\nhb0 : ¬b = 0\nhf1 : f 1 = 0\n⊢ f a * f (b * 1) = f a * f b\n[PROOFSTEP]\nrw [mul_one]\n[GOAL]\ncase neg\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\na b : α\nh0 : f 0 = 0\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis : DecidableEq α := Classical.decEq α\nha0 : ¬a = 0\nhb0 : ¬b = 0\nhf1 : ¬f 1 = 0\n⊢ f (a * b) = f a * f b\n[PROOFSTEP]\nhaveI : Nontrivial α := ⟨⟨_, _, ha0⟩⟩\n[GOAL]\ncase neg\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\na b : α\nh0 : f 0 = 0\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis✝ : DecidableEq α := Classical.decEq α\nha0 : ¬a = 0\nhb0 : ¬b = 0\nhf1 : ¬f 1 = 0\nthis : Nontrivial α\n⊢ f (a * b) = f a * f b\n[PROOFSTEP]\nletI : NormalizationMonoid α := UniqueFactorizationMonoid.normalizationMonoid\n[GOAL]\ncase neg\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\na b : α\nh0 : f 0 = 0\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis✝¹ : DecidableEq α := Classical.decEq α\nha0 : ¬a = 0\nhb0 : ¬b = 0\nhf1 : ¬f 1 = 0\nthis✝ : Nontrivial α\nthis : NormalizationMonoid α := UniqueFactorizationMonoid.normalizationMonoid\n⊢ f (a * b) = f a * f b\n[PROOFSTEP]\nsuffices\n f\n (∏ p in (normalizedFactors a).toFinset ∪ (normalizedFactors b).toFinset,\n p ^ ((normalizedFactors a).count p + (normalizedFactors b).count p)) =\n f (∏ p in (normalizedFactors a).toFinset ∪ (normalizedFactors b).toFinset, p ^ (normalizedFactors a).count p) *\n f (∏ p : α in (normalizedFactors a).toFinset ∪ (normalizedFactors b).toFinset, p ^ (normalizedFactors b).count p)\n by\n obtain ⟨ua, a_eq⟩ := normalizedFactors_prod ha0\n obtain ⟨ub, b_eq⟩ := normalizedFactors_prod hb0\n rw [← a_eq, ← b_eq,\n mul_right_comm (Multiset.prod (normalizedFactors a)) ua (Multiset.prod (normalizedFactors b) * ub), h1 ua.isUnit,\n h1 ub.isUnit, h1 ua.isUnit, ← mul_assoc, h1 ub.isUnit, mul_right_comm _ (f ua), ← mul_assoc]\n congr\n rw [← (normalizedFactors a).map_id, ← (normalizedFactors b).map_id, Finset.prod_multiset_map_count,\n Finset.prod_multiset_map_count, Finset.prod_subset (Finset.subset_union_left _ (normalizedFactors b).toFinset),\n Finset.prod_subset (Finset.subset_union_right _ (normalizedFactors b).toFinset), ← Finset.prod_mul_distrib]\n simp_rw [id.def, ← pow_add, this]\n all_goals simp only [Multiset.mem_toFinset]\n · intro p _ hpb\n simp [hpb]\n · intro p _ hpa\n simp [hpa]\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\na b : α\nh0 : f 0 = 0\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis✝² : DecidableEq α := Classical.decEq α\nha0 : ¬a = 0\nhb0 : ¬b = 0\nhf1 : ¬f 1 = 0\nthis✝¹ : Nontrivial α\nthis✝ : NormalizationMonoid α := UniqueFactorizationMonoid.normalizationMonoid\nthis :\n f\n (∏ p in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n p ^ (Multiset.count p (normalizedFactors a) + Multiset.count p (normalizedFactors b))) =\n f\n (∏ p in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n p ^ Multiset.count p (normalizedFactors a)) *\n f\n (∏ p in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n p ^ Multiset.count p (normalizedFactors b))\n⊢ f (a * b) = f a * f b\n[PROOFSTEP]\nobtain ⟨ua, a_eq⟩ := normalizedFactors_prod ha0\n[GOAL]\ncase intro\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\na b : α\nh0 : f 0 = 0\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis✝² : DecidableEq α := Classical.decEq α\nha0 : ¬a = 0\nhb0 : ¬b = 0\nhf1 : ¬f 1 = 0\nthis✝¹ : Nontrivial α\nthis✝ : NormalizationMonoid α := UniqueFactorizationMonoid.normalizationMonoid\nthis :\n f\n (∏ p in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n p ^ (Multiset.count p (normalizedFactors a) + Multiset.count p (normalizedFactors b))) =\n f\n (∏ p in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n p ^ Multiset.count p (normalizedFactors a)) *\n f\n (∏ p in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n p ^ Multiset.count p (normalizedFactors b))\nua : αˣ\na_eq : Multiset.prod (normalizedFactors a) * ↑ua = a\n⊢ f (a * b) = f a * f b\n[PROOFSTEP]\nobtain ⟨ub, b_eq⟩ := normalizedFactors_prod hb0\n[GOAL]\ncase intro.intro\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\na b : α\nh0 : f 0 = 0\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis✝² : DecidableEq α := Classical.decEq α\nha0 : ¬a = 0\nhb0 : ¬b = 0\nhf1 : ¬f 1 = 0\nthis✝¹ : Nontrivial α\nthis✝ : NormalizationMonoid α := UniqueFactorizationMonoid.normalizationMonoid\nthis :\n f\n (∏ p in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n p ^ (Multiset.count p (normalizedFactors a) + Multiset.count p (normalizedFactors b))) =\n f\n (∏ p in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n p ^ Multiset.count p (normalizedFactors a)) *\n f\n (∏ p in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n p ^ Multiset.count p (normalizedFactors b))\nua : αˣ\na_eq : Multiset.prod (normalizedFactors a) * ↑ua = a\nub : αˣ\nb_eq : Multiset.prod (normalizedFactors b) * ↑ub = b\n⊢ f (a * b) = f a * f b\n[PROOFSTEP]\nrw [← a_eq, ← b_eq, mul_right_comm (Multiset.prod (normalizedFactors a)) ua (Multiset.prod (normalizedFactors b) * ub),\n h1 ua.isUnit, h1 ub.isUnit, h1 ua.isUnit, ← mul_assoc, h1 ub.isUnit, mul_right_comm _ (f ua), ← mul_assoc]\n[GOAL]\ncase intro.intro\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\na b : α\nh0 : f 0 = 0\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis✝² : DecidableEq α := Classical.decEq α\nha0 : ¬a = 0\nhb0 : ¬b = 0\nhf1 : ¬f 1 = 0\nthis✝¹ : Nontrivial α\nthis✝ : NormalizationMonoid α := UniqueFactorizationMonoid.normalizationMonoid\nthis :\n f\n (∏ p in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n p ^ (Multiset.count p (normalizedFactors a) + Multiset.count p (normalizedFactors b))) =\n f\n (∏ p in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n p ^ Multiset.count p (normalizedFactors a)) *\n f\n (∏ p in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n p ^ Multiset.count p (normalizedFactors b))\nua : αˣ\na_eq : Multiset.prod (normalizedFactors a) * ↑ua = a\nub : αˣ\nb_eq : Multiset.prod (normalizedFactors b) * ↑ub = b\n⊢ f (Multiset.prod (normalizedFactors a) * Multiset.prod (normalizedFactors b)) * f ↑ub * f ↑ua =\n f (Multiset.prod (normalizedFactors a)) * f (Multiset.prod (normalizedFactors b)) * f ↑ub * f ↑ua\n[PROOFSTEP]\ncongr\n[GOAL]\ncase intro.intro.e_a.e_a\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\na b : α\nh0 : f 0 = 0\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis✝² : DecidableEq α := Classical.decEq α\nha0 : ¬a = 0\nhb0 : ¬b = 0\nhf1 : ¬f 1 = 0\nthis✝¹ : Nontrivial α\nthis✝ : NormalizationMonoid α := UniqueFactorizationMonoid.normalizationMonoid\nthis :\n f\n (∏ p in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n p ^ (Multiset.count p (normalizedFactors a) + Multiset.count p (normalizedFactors b))) =\n f\n (∏ p in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n p ^ Multiset.count p (normalizedFactors a)) *\n f\n (∏ p in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n p ^ Multiset.count p (normalizedFactors b))\nua : αˣ\na_eq : Multiset.prod (normalizedFactors a) * ↑ua = a\nub : αˣ\nb_eq : Multiset.prod (normalizedFactors b) * ↑ub = b\n⊢ f (Multiset.prod (normalizedFactors a) * Multiset.prod (normalizedFactors b)) =\n f (Multiset.prod (normalizedFactors a)) * f (Multiset.prod (normalizedFactors b))\n[PROOFSTEP]\nrw [← (normalizedFactors a).map_id, ← (normalizedFactors b).map_id, Finset.prod_multiset_map_count,\n Finset.prod_multiset_map_count, Finset.prod_subset (Finset.subset_union_left _ (normalizedFactors b).toFinset),\n Finset.prod_subset (Finset.subset_union_right _ (normalizedFactors b).toFinset), ← Finset.prod_mul_distrib]\n[GOAL]\ncase intro.intro.e_a.e_a\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\na b : α\nh0 : f 0 = 0\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis✝² : DecidableEq α := Classical.decEq α\nha0 : ¬a = 0\nhb0 : ¬b = 0\nhf1 : ¬f 1 = 0\nthis✝¹ : Nontrivial α\nthis✝ : NormalizationMonoid α := UniqueFactorizationMonoid.normalizationMonoid\nthis :\n f\n (∏ p in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n p ^ (Multiset.count p (normalizedFactors a) + Multiset.count p (normalizedFactors b))) =\n f\n (∏ p in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n p ^ Multiset.count p (normalizedFactors a)) *\n f\n (∏ p in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n p ^ Multiset.count p (normalizedFactors b))\nua : αˣ\na_eq : Multiset.prod (normalizedFactors a) * ↑ua = a\nub : αˣ\nb_eq : Multiset.prod (normalizedFactors b) * ↑ub = b\n⊢ f\n (∏ x in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n id x ^ Multiset.count x (normalizedFactors a) * id x ^ Multiset.count x (normalizedFactors b)) =\n f\n (∏ x in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n id x ^ Multiset.count x (normalizedFactors a)) *\n f\n (∏ x in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n id x ^ Multiset.count x (normalizedFactors b))\ncase intro.intro.e_a.e_a\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\na b : α\nh0 : f 0 = 0\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis✝² : DecidableEq α := Classical.decEq α\nha0 : ¬a = 0\nhb0 : ¬b = 0\nhf1 : ¬f 1 = 0\nthis✝¹ : Nontrivial α\nthis✝ : NormalizationMonoid α := UniqueFactorizationMonoid.normalizationMonoid\nthis :\n f\n (∏ p in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n p ^ (Multiset.count p (normalizedFactors a) + Multiset.count p (normalizedFactors b))) =\n f\n (∏ p in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n p ^ Multiset.count p (normalizedFactors a)) *\n f\n (∏ p in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n p ^ Multiset.count p (normalizedFactors b))\nua : αˣ\na_eq : Multiset.prod (normalizedFactors a) * ↑ua = a\nub : αˣ\nb_eq : Multiset.prod (normalizedFactors b) * ↑ub = b\n⊢ ∀ (x : α),\n x ∈ Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b) →\n ¬x ∈ Multiset.toFinset (normalizedFactors b) → id x ^ Multiset.count x (normalizedFactors b) = 1\ncase intro.intro.e_a.e_a\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\na b : α\nh0 : f 0 = 0\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis✝² : DecidableEq α := Classical.decEq α\nha0 : ¬a = 0\nhb0 : ¬b = 0\nhf1 : ¬f 1 = 0\nthis✝¹ : Nontrivial α\nthis✝ : NormalizationMonoid α := UniqueFactorizationMonoid.normalizationMonoid\nthis :\n f\n (∏ p in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n p ^ (Multiset.count p (normalizedFactors a) + Multiset.count p (normalizedFactors b))) =\n f\n (∏ p in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n p ^ Multiset.count p (normalizedFactors a)) *\n f\n (∏ p in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n p ^ Multiset.count p (normalizedFactors b))\nua : αˣ\na_eq : Multiset.prod (normalizedFactors a) * ↑ua = a\nub : αˣ\nb_eq : Multiset.prod (normalizedFactors b) * ↑ub = b\n⊢ ∀ (x : α),\n x ∈ Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b) →\n ¬x ∈ Multiset.toFinset (normalizedFactors a) → id x ^ Multiset.count x (normalizedFactors a) = 1\n[PROOFSTEP]\nsimp_rw [id.def, ← pow_add, this]\n[GOAL]\ncase intro.intro.e_a.e_a\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\na b : α\nh0 : f 0 = 0\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis✝² : DecidableEq α := Classical.decEq α\nha0 : ¬a = 0\nhb0 : ¬b = 0\nhf1 : ¬f 1 = 0\nthis✝¹ : Nontrivial α\nthis✝ : NormalizationMonoid α := UniqueFactorizationMonoid.normalizationMonoid\nthis :\n f\n (∏ p in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n p ^ (Multiset.count p (normalizedFactors a) + Multiset.count p (normalizedFactors b))) =\n f\n (∏ p in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n p ^ Multiset.count p (normalizedFactors a)) *\n f\n (∏ p in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n p ^ Multiset.count p (normalizedFactors b))\nua : αˣ\na_eq : Multiset.prod (normalizedFactors a) * ↑ua = a\nub : αˣ\nb_eq : Multiset.prod (normalizedFactors b) * ↑ub = b\n⊢ ∀ (x : α),\n x ∈ Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b) →\n ¬x ∈ Multiset.toFinset (normalizedFactors b) → id x ^ Multiset.count x (normalizedFactors b) = 1\ncase intro.intro.e_a.e_a\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\na b : α\nh0 : f 0 = 0\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis✝² : DecidableEq α := Classical.decEq α\nha0 : ¬a = 0\nhb0 : ¬b = 0\nhf1 : ¬f 1 = 0\nthis✝¹ : Nontrivial α\nthis✝ : NormalizationMonoid α := UniqueFactorizationMonoid.normalizationMonoid\nthis :\n f\n (∏ p in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n p ^ (Multiset.count p (normalizedFactors a) + Multiset.count p (normalizedFactors b))) =\n f\n (∏ p in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n p ^ Multiset.count p (normalizedFactors a)) *\n f\n (∏ p in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n p ^ Multiset.count p (normalizedFactors b))\nua : αˣ\na_eq : Multiset.prod (normalizedFactors a) * ↑ua = a\nub : αˣ\nb_eq : Multiset.prod (normalizedFactors b) * ↑ub = b\n⊢ ∀ (x : α),\n x ∈ Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b) →\n ¬x ∈ Multiset.toFinset (normalizedFactors a) → id x ^ Multiset.count x (normalizedFactors a) = 1\n[PROOFSTEP]\nall_goals simp only [Multiset.mem_toFinset]\n[GOAL]\ncase intro.intro.e_a.e_a\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\na b : α\nh0 : f 0 = 0\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis✝² : DecidableEq α := Classical.decEq α\nha0 : ¬a = 0\nhb0 : ¬b = 0\nhf1 : ¬f 1 = 0\nthis✝¹ : Nontrivial α\nthis✝ : NormalizationMonoid α := UniqueFactorizationMonoid.normalizationMonoid\nthis :\n f\n (∏ p in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n p ^ (Multiset.count p (normalizedFactors a) + Multiset.count p (normalizedFactors b))) =\n f\n (∏ p in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n p ^ Multiset.count p (normalizedFactors a)) *\n f\n (∏ p in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n p ^ Multiset.count p (normalizedFactors b))\nua : αˣ\na_eq : Multiset.prod (normalizedFactors a) * ↑ua = a\nub : αˣ\nb_eq : Multiset.prod (normalizedFactors b) * ↑ub = b\n⊢ ∀ (x : α),\n x ∈ Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b) →\n ¬x ∈ Multiset.toFinset (normalizedFactors b) → id x ^ Multiset.count x (normalizedFactors b) = 1\n[PROOFSTEP]\nsimp only [Multiset.mem_toFinset]\n[GOAL]\ncase intro.intro.e_a.e_a\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\na b : α\nh0 : f 0 = 0\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis✝² : DecidableEq α := Classical.decEq α\nha0 : ¬a = 0\nhb0 : ¬b = 0\nhf1 : ¬f 1 = 0\nthis✝¹ : Nontrivial α\nthis✝ : NormalizationMonoid α := UniqueFactorizationMonoid.normalizationMonoid\nthis :\n f\n (∏ p in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n p ^ (Multiset.count p (normalizedFactors a) + Multiset.count p (normalizedFactors b))) =\n f\n (∏ p in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n p ^ Multiset.count p (normalizedFactors a)) *\n f\n (∏ p in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n p ^ Multiset.count p (normalizedFactors b))\nua : αˣ\na_eq : Multiset.prod (normalizedFactors a) * ↑ua = a\nub : αˣ\nb_eq : Multiset.prod (normalizedFactors b) * ↑ub = b\n⊢ ∀ (x : α),\n x ∈ Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b) →\n ¬x ∈ Multiset.toFinset (normalizedFactors a) → id x ^ Multiset.count x (normalizedFactors a) = 1\n[PROOFSTEP]\nsimp only [Multiset.mem_toFinset]\n[GOAL]\ncase intro.intro.e_a.e_a\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\na b : α\nh0 : f 0 = 0\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis✝² : DecidableEq α := Classical.decEq α\nha0 : ¬a = 0\nhb0 : ¬b = 0\nhf1 : ¬f 1 = 0\nthis✝¹ : Nontrivial α\nthis✝ : NormalizationMonoid α := UniqueFactorizationMonoid.normalizationMonoid\nthis :\n f\n (∏ p in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n p ^ (Multiset.count p (normalizedFactors a) + Multiset.count p (normalizedFactors b))) =\n f\n (∏ p in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n p ^ Multiset.count p (normalizedFactors a)) *\n f\n (∏ p in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n p ^ Multiset.count p (normalizedFactors b))\nua : αˣ\na_eq : Multiset.prod (normalizedFactors a) * ↑ua = a\nub : αˣ\nb_eq : Multiset.prod (normalizedFactors b) * ↑ub = b\n⊢ ∀ (x : α),\n x ∈ Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b) →\n ¬x ∈ normalizedFactors b → id x ^ Multiset.count x (normalizedFactors b) = 1\n[PROOFSTEP]\nintro p _ hpb\n[GOAL]\ncase intro.intro.e_a.e_a\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\na b : α\nh0 : f 0 = 0\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis✝² : DecidableEq α := Classical.decEq α\nha0 : ¬a = 0\nhb0 : ¬b = 0\nhf1 : ¬f 1 = 0\nthis✝¹ : Nontrivial α\nthis✝ : NormalizationMonoid α := UniqueFactorizationMonoid.normalizationMonoid\nthis :\n f\n (∏ p in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n p ^ (Multiset.count p (normalizedFactors a) + Multiset.count p (normalizedFactors b))) =\n f\n (∏ p in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n p ^ Multiset.count p (normalizedFactors a)) *\n f\n (∏ p in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n p ^ Multiset.count p (normalizedFactors b))\nua : αˣ\na_eq : Multiset.prod (normalizedFactors a) * ↑ua = a\nub : αˣ\nb_eq : Multiset.prod (normalizedFactors b) * ↑ub = b\np : α\na✝ : p ∈ Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b)\nhpb : ¬p ∈ normalizedFactors b\n⊢ id p ^ Multiset.count p (normalizedFactors b) = 1\n[PROOFSTEP]\nsimp [hpb]\n[GOAL]\ncase intro.intro.e_a.e_a\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\na b : α\nh0 : f 0 = 0\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis✝² : DecidableEq α := Classical.decEq α\nha0 : ¬a = 0\nhb0 : ¬b = 0\nhf1 : ¬f 1 = 0\nthis✝¹ : Nontrivial α\nthis✝ : NormalizationMonoid α := UniqueFactorizationMonoid.normalizationMonoid\nthis :\n f\n (∏ p in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n p ^ (Multiset.count p (normalizedFactors a) + Multiset.count p (normalizedFactors b))) =\n f\n (∏ p in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n p ^ Multiset.count p (normalizedFactors a)) *\n f\n (∏ p in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n p ^ Multiset.count p (normalizedFactors b))\nua : αˣ\na_eq : Multiset.prod (normalizedFactors a) * ↑ua = a\nub : αˣ\nb_eq : Multiset.prod (normalizedFactors b) * ↑ub = b\n⊢ ∀ (x : α),\n x ∈ Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b) →\n ¬x ∈ normalizedFactors a → id x ^ Multiset.count x (normalizedFactors a) = 1\n[PROOFSTEP]\nintro p _ hpa\n[GOAL]\ncase intro.intro.e_a.e_a\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\na b : α\nh0 : f 0 = 0\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis✝² : DecidableEq α := Classical.decEq α\nha0 : ¬a = 0\nhb0 : ¬b = 0\nhf1 : ¬f 1 = 0\nthis✝¹ : Nontrivial α\nthis✝ : NormalizationMonoid α := UniqueFactorizationMonoid.normalizationMonoid\nthis :\n f\n (∏ p in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n p ^ (Multiset.count p (normalizedFactors a) + Multiset.count p (normalizedFactors b))) =\n f\n (∏ p in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n p ^ Multiset.count p (normalizedFactors a)) *\n f\n (∏ p in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n p ^ Multiset.count p (normalizedFactors b))\nua : αˣ\na_eq : Multiset.prod (normalizedFactors a) * ↑ua = a\nub : αˣ\nb_eq : Multiset.prod (normalizedFactors b) * ↑ub = b\np : α\na✝ : p ∈ Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b)\nhpa : ¬p ∈ normalizedFactors a\n⊢ id p ^ Multiset.count p (normalizedFactors a) = 1\n[PROOFSTEP]\nsimp [hpa]\n[GOAL]\ncase neg\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\na b : α\nh0 : f 0 = 0\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis✝¹ : DecidableEq α := Classical.decEq α\nha0 : ¬a = 0\nhb0 : ¬b = 0\nhf1 : ¬f 1 = 0\nthis✝ : Nontrivial α\nthis : NormalizationMonoid α := UniqueFactorizationMonoid.normalizationMonoid\n⊢ f\n (∏ p in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n p ^ (Multiset.count p (normalizedFactors a) + Multiset.count p (normalizedFactors b))) =\n f\n (∏ p in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n p ^ Multiset.count p (normalizedFactors a)) *\n f\n (∏ p in Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b),\n p ^ Multiset.count p (normalizedFactors b))\n[PROOFSTEP]\nrefine' multiplicative_prime_power _ _ _ _ _ @h1 @hpr @hcp\n[GOAL]\ncase neg.refine'_1\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\na b : α\nh0 : f 0 = 0\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis✝¹ : DecidableEq α := Classical.decEq α\nha0 : ¬a = 0\nhb0 : ¬b = 0\nhf1 : ¬f 1 = 0\nthis✝ : Nontrivial α\nthis : NormalizationMonoid α := UniqueFactorizationMonoid.normalizationMonoid\n⊢ ∀ (p : α), p ∈ Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b) → Prime p\ncase neg.refine'_2\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\na b : α\nh0 : f 0 = 0\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis✝¹ : DecidableEq α := Classical.decEq α\nha0 : ¬a = 0\nhb0 : ¬b = 0\nhf1 : ¬f 1 = 0\nthis✝ : Nontrivial α\nthis : NormalizationMonoid α := UniqueFactorizationMonoid.normalizationMonoid\n⊢ ∀ (p : α),\n p ∈ Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b) →\n ∀ (q : α), q ∈ Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b) → p ∣ q → p = q\n[PROOFSTEP]\nall_goals simp only [Multiset.mem_toFinset, Finset.mem_union]\n[GOAL]\ncase neg.refine'_1\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\na b : α\nh0 : f 0 = 0\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis✝¹ : DecidableEq α := Classical.decEq α\nha0 : ¬a = 0\nhb0 : ¬b = 0\nhf1 : ¬f 1 = 0\nthis✝ : Nontrivial α\nthis : NormalizationMonoid α := UniqueFactorizationMonoid.normalizationMonoid\n⊢ ∀ (p : α), p ∈ Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b) → Prime p\n[PROOFSTEP]\nsimp only [Multiset.mem_toFinset, Finset.mem_union]\n[GOAL]\ncase neg.refine'_2\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\na b : α\nh0 : f 0 = 0\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis✝¹ : DecidableEq α := Classical.decEq α\nha0 : ¬a = 0\nhb0 : ¬b = 0\nhf1 : ¬f 1 = 0\nthis✝ : Nontrivial α\nthis : NormalizationMonoid α := UniqueFactorizationMonoid.normalizationMonoid\n⊢ ∀ (p : α),\n p ∈ Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b) →\n ∀ (q : α), q ∈ Multiset.toFinset (normalizedFactors a) ∪ Multiset.toFinset (normalizedFactors b) → p ∣ q → p = q\n[PROOFSTEP]\nsimp only [Multiset.mem_toFinset, Finset.mem_union]\n[GOAL]\ncase neg.refine'_1\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\na b : α\nh0 : f 0 = 0\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis✝¹ : DecidableEq α := Classical.decEq α\nha0 : ¬a = 0\nhb0 : ¬b = 0\nhf1 : ¬f 1 = 0\nthis✝ : Nontrivial α\nthis : NormalizationMonoid α := UniqueFactorizationMonoid.normalizationMonoid\n⊢ ∀ (p : α), p ∈ normalizedFactors a ∨ p ∈ normalizedFactors b → Prime p\n[PROOFSTEP]\nrintro p (hpa | hpb)\n[GOAL]\ncase neg.refine'_1.inl\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\na b : α\nh0 : f 0 = 0\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis✝¹ : DecidableEq α := Classical.decEq α\nha0 : ¬a = 0\nhb0 : ¬b = 0\nhf1 : ¬f 1 = 0\nthis✝ : Nontrivial α\nthis : NormalizationMonoid α := UniqueFactorizationMonoid.normalizationMonoid\np : α\nhpa : p ∈ normalizedFactors a\n⊢ Prime p\n[PROOFSTEP]\napply prime_of_normalized_factor\n[GOAL]\ncase neg.refine'_1.inr\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\na b : α\nh0 : f 0 = 0\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis✝¹ : DecidableEq α := Classical.decEq α\nha0 : ¬a = 0\nhb0 : ¬b = 0\nhf1 : ¬f 1 = 0\nthis✝ : Nontrivial α\nthis : NormalizationMonoid α := UniqueFactorizationMonoid.normalizationMonoid\np : α\nhpb : p ∈ normalizedFactors b\n⊢ Prime p\n[PROOFSTEP]\napply prime_of_normalized_factor\n[GOAL]\ncase neg.refine'_1.inl.a\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\na b : α\nh0 : f 0 = 0\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis✝¹ : DecidableEq α := Classical.decEq α\nha0 : ¬a = 0\nhb0 : ¬b = 0\nhf1 : ¬f 1 = 0\nthis✝ : Nontrivial α\nthis : NormalizationMonoid α := UniqueFactorizationMonoid.normalizationMonoid\np : α\nhpa : p ∈ normalizedFactors a\n⊢ p ∈ normalizedFactors ?neg.refine'_1.inl.a✝\n[PROOFSTEP]\nassumption\n[GOAL]\ncase neg.refine'_1.inr.a\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\na b : α\nh0 : f 0 = 0\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis✝¹ : DecidableEq α := Classical.decEq α\nha0 : ¬a = 0\nhb0 : ¬b = 0\nhf1 : ¬f 1 = 0\nthis✝ : Nontrivial α\nthis : NormalizationMonoid α := UniqueFactorizationMonoid.normalizationMonoid\np : α\nhpb : p ∈ normalizedFactors b\n⊢ p ∈ normalizedFactors ?neg.refine'_1.inr.a✝\n[PROOFSTEP]\nassumption\n[GOAL]\ncase neg.refine'_2\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\na b : α\nh0 : f 0 = 0\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis✝¹ : DecidableEq α := Classical.decEq α\nha0 : ¬a = 0\nhb0 : ¬b = 0\nhf1 : ¬f 1 = 0\nthis✝ : Nontrivial α\nthis : NormalizationMonoid α := UniqueFactorizationMonoid.normalizationMonoid\n⊢ ∀ (p : α),\n p ∈ normalizedFactors a ∨ p ∈ normalizedFactors b →\n ∀ (q : α), q ∈ normalizedFactors a ∨ q ∈ normalizedFactors b → p ∣ q → p = q\n[PROOFSTEP]\nrintro p (hp | hp) q (hq | hq) hdvd\n[GOAL]\ncase neg.refine'_2.inl.inl\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\na b : α\nh0 : f 0 = 0\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis✝¹ : DecidableEq α := Classical.decEq α\nha0 : ¬a = 0\nhb0 : ¬b = 0\nhf1 : ¬f 1 = 0\nthis✝ : Nontrivial α\nthis : NormalizationMonoid α := UniqueFactorizationMonoid.normalizationMonoid\np : α\nhp : p ∈ normalizedFactors a\nq : α\nhq : q ∈ normalizedFactors a\nhdvd : p ∣ q\n⊢ p = q\n[PROOFSTEP]\nrw [← normalize_normalized_factor _ hp, ← normalize_normalized_factor _ hq]\n[GOAL]\ncase neg.refine'_2.inl.inr\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\na b : α\nh0 : f 0 = 0\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis✝¹ : DecidableEq α := Classical.decEq α\nha0 : ¬a = 0\nhb0 : ¬b = 0\nhf1 : ¬f 1 = 0\nthis✝ : Nontrivial α\nthis : NormalizationMonoid α := UniqueFactorizationMonoid.normalizationMonoid\np : α\nhp : p ∈ normalizedFactors a\nq : α\nhq : q ∈ normalizedFactors b\nhdvd : p ∣ q\n⊢ p = q\n[PROOFSTEP]\nrw [← normalize_normalized_factor _ hp, ← normalize_normalized_factor _ hq]\n[GOAL]\ncase neg.refine'_2.inr.inl\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\na b : α\nh0 : f 0 = 0\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis✝¹ : DecidableEq α := Classical.decEq α\nha0 : ¬a = 0\nhb0 : ¬b = 0\nhf1 : ¬f 1 = 0\nthis✝ : Nontrivial α\nthis : NormalizationMonoid α := UniqueFactorizationMonoid.normalizationMonoid\np : α\nhp : p ∈ normalizedFactors b\nq : α\nhq : q ∈ normalizedFactors a\nhdvd : p ∣ q\n⊢ p = q\n[PROOFSTEP]\nrw [← normalize_normalized_factor _ hp, ← normalize_normalized_factor _ hq]\n[GOAL]\ncase neg.refine'_2.inr.inr\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\na b : α\nh0 : f 0 = 0\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis✝¹ : DecidableEq α := Classical.decEq α\nha0 : ¬a = 0\nhb0 : ¬b = 0\nhf1 : ¬f 1 = 0\nthis✝ : Nontrivial α\nthis : NormalizationMonoid α := UniqueFactorizationMonoid.normalizationMonoid\np : α\nhp : p ∈ normalizedFactors b\nq : α\nhq : q ∈ normalizedFactors b\nhdvd : p ∣ q\n⊢ p = q\n[PROOFSTEP]\nrw [← normalize_normalized_factor _ hp, ← normalize_normalized_factor _ hq]\n[GOAL]\ncase neg.refine'_2.inl.inl\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\na b : α\nh0 : f 0 = 0\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis✝¹ : DecidableEq α := Classical.decEq α\nha0 : ¬a = 0\nhb0 : ¬b = 0\nhf1 : ¬f 1 = 0\nthis✝ : Nontrivial α\nthis : NormalizationMonoid α := UniqueFactorizationMonoid.normalizationMonoid\np : α\nhp : p ∈ normalizedFactors a\nq : α\nhq : q ∈ normalizedFactors a\nhdvd : p ∣ q\n⊢ ↑normalize p = ↑normalize q\n[PROOFSTEP]\nexact\n normalize_eq_normalize hdvd\n ((prime_of_normalized_factor _ hp).irreducible.dvd_symm (prime_of_normalized_factor _ hq).irreducible hdvd)\n[GOAL]\ncase neg.refine'_2.inl.inr\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\na b : α\nh0 : f 0 = 0\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis✝¹ : DecidableEq α := Classical.decEq α\nha0 : ¬a = 0\nhb0 : ¬b = 0\nhf1 : ¬f 1 = 0\nthis✝ : Nontrivial α\nthis : NormalizationMonoid α := UniqueFactorizationMonoid.normalizationMonoid\np : α\nhp : p ∈ normalizedFactors a\nq : α\nhq : q ∈ normalizedFactors b\nhdvd : p ∣ q\n⊢ ↑normalize p = ↑normalize q\n[PROOFSTEP]\nexact\n normalize_eq_normalize hdvd\n ((prime_of_normalized_factor _ hp).irreducible.dvd_symm (prime_of_normalized_factor _ hq).irreducible hdvd)\n[GOAL]\ncase neg.refine'_2.inr.inl\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\na b : α\nh0 : f 0 = 0\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis✝¹ : DecidableEq α := Classical.decEq α\nha0 : ¬a = 0\nhb0 : ¬b = 0\nhf1 : ¬f 1 = 0\nthis✝ : Nontrivial α\nthis : NormalizationMonoid α := UniqueFactorizationMonoid.normalizationMonoid\np : α\nhp : p ∈ normalizedFactors b\nq : α\nhq : q ∈ normalizedFactors a\nhdvd : p ∣ q\n⊢ ↑normalize p = ↑normalize q\n[PROOFSTEP]\nexact\n normalize_eq_normalize hdvd\n ((prime_of_normalized_factor _ hp).irreducible.dvd_symm (prime_of_normalized_factor _ hq).irreducible hdvd)\n[GOAL]\ncase neg.refine'_2.inr.inr\nα : Type u_1\nR : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero R\ninst✝³ : UniqueFactorizationMonoid R\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : UniqueFactorizationMonoid α\nβ : Type u_3\ninst✝ : CancelCommMonoidWithZero β\nf : α → β\na b : α\nh0 : f 0 = 0\nh1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y\nhpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i\nhcp : ∀ {x y : α}, (∀ (p : α), p ∣ x → p ∣ y → IsUnit p) → f (x * y) = f x * f y\nthis✝¹ : DecidableEq α := Classical.decEq α\nha0 : ¬a = 0\nhb0 : ¬b = 0\nhf1 : ¬f 1 = 0\nthis✝ : Nontrivial α\nthis : NormalizationMonoid α := UniqueFactorizationMonoid.normalizationMonoid\np : α\nhp : p ∈ normalizedFactors b\nq : α\nhq : q ∈ normalizedFactors b\nhdvd : p ∣ q\n⊢ ↑normalize p = ↑normalize q\n[PROOFSTEP]\nexact\n normalize_eq_normalize hdvd\n ((prime_of_normalized_factor _ hp).irreducible.dvd_symm (prime_of_normalized_factor _ hq).irreducible hdvd)\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\na b : Multiset { a // Irreducible a }\n⊢ ↑(a + b) = ↑a + ↑b\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ninst✝ : DecidableEq (Associates α)\nb : FactorSet α\n⊢ ⊤ ⊔ b + ⊤ ⊓ b = ⊤ + b\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ninst✝ : DecidableEq (Associates α)\na : FactorSet α\n⊢ a ⊔ ⊤ + a ⊓ ⊤ = a + ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ninst✝ : DecidableEq (Associates α)\na b : Multiset { a // Irreducible a }\n⊢ ↑a ⊔ ↑b + ↑a ⊓ ↑b = ↑a + ↑b\n[PROOFSTEP]\nrw [← WithTop.coe_sup, ← WithTop.coe_inf, ← WithTop.coe_add, ← WithTop.coe_add, WithTop.coe_eq_coe]\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ninst✝ : DecidableEq (Associates α)\na b : Multiset { a // Irreducible a }\n⊢ a ⊔ b + a ⊓ b = a + b\n[PROOFSTEP]\nexact Multiset.union_add_inter _ _\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\nb : FactorSet α\n⊢ FactorSet.prod (⊤ + b) = FactorSet.prod ⊤ * FactorSet.prod b\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\na : FactorSet α\n⊢ FactorSet.prod (a + ⊤) = FactorSet.prod a * FactorSet.prod ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\na b : Multiset { a // Irreducible a }\n⊢ FactorSet.prod (↑a + ↑b) = FactorSet.prod ↑a * FactorSet.prod ↑b\n[PROOFSTEP]\nrw [← FactorSet.coe_add, prod_coe, prod_coe, prod_coe, Multiset.map_add, Multiset.prod_add]\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\nb : FactorSet α\nh : none ≤ b\n⊢ FactorSet.prod none ≤ FactorSet.prod b\n[PROOFSTEP]\nhave : b = ⊤ := top_unique h\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\nb : FactorSet α\nh : none ≤ b\nthis : b = ⊤\n⊢ FactorSet.prod none ≤ FactorSet.prod b\n[PROOFSTEP]\nrw [this, prod_top]\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\nb : FactorSet α\nh : none ≤ b\nthis : b = ⊤\n⊢ FactorSet.prod none ≤ 0\n[PROOFSTEP]\nexact le_rfl\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\na : FactorSet α\nx✝ : a ≤ none\n⊢ FactorSet.prod a ≤ FactorSet.prod ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\na : FactorSet α\nx✝ : a ≤ none\n⊢ FactorSet.prod a ≤ 0\n[PROOFSTEP]\nexact le_top\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ninst✝ : Nontrivial α\np : FactorSet α\n⊢ prod p = 0 ↔ p = ⊤\n[PROOFSTEP]\ninduction p using WithTop.recTopCoe\n[GOAL]\ncase top\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ninst✝ : Nontrivial α\n⊢ prod ⊤ = 0 ↔ ⊤ = ⊤\n[PROOFSTEP]\nsimp only [iff_self_iff, eq_self_iff_true, Associates.prod_top]\n[GOAL]\ncase coe\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ninst✝ : Nontrivial α\na✝ : Multiset { a // Irreducible a }\n⊢ prod ↑a✝ = 0 ↔ ↑a✝ = ⊤\n[PROOFSTEP]\nrw [prod_coe, Multiset.prod_eq_zero_iff, Multiset.mem_map, eq_false WithTop.coe_ne_top, iff_false_iff, not_exists]\n[GOAL]\ncase coe\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ninst✝ : Nontrivial α\na✝ : Multiset { a // Irreducible a }\n⊢ ∀ (x : { a // Irreducible a }), ¬(x ∈ a✝ ∧ ↑x = 0)\n[PROOFSTEP]\nexact fun a => not_and_of_not_right _ a.prop.ne_zero\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : DecidableEq (Associates α)\np : Associates α\nhp : Irreducible p\ns : Multiset { a // Irreducible a }\n⊢ count p (some s) = Multiset.count { val := p, property := hp } s\n[PROOFSTEP]\ndsimp only [count]\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : DecidableEq (Associates α)\np : Associates α\nhp : Irreducible p\ns : Multiset { a // Irreducible a }\n⊢ dite (Irreducible p) (fun hp => bcount { val := p, property := hp }) (fun hp => 0) (some s) =\n Multiset.count { val := p, property := hp } s\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : DecidableEq (Associates α)\np : Associates α\nhp : Irreducible p\ns : Multiset { a // Irreducible a }\n⊢ bcount { val := p, property := hp } (some s) = Multiset.count { val := p, property := hp } s\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : DecidableEq (Associates α)\np : Associates α\nhp : Irreducible p\n⊢ count p 0 = 0\n[PROOFSTEP]\ndsimp only [count]\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : DecidableEq (Associates α)\np : Associates α\nhp : Irreducible p\n⊢ dite (Irreducible p) (fun hp => bcount { val := p, property := hp }) (fun hp => 0) 0 = 0\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : DecidableEq (Associates α)\np : Associates α\nhp : Irreducible p\n⊢ bcount { val := p, property := hp } 0 = 0\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\np : Associates α\nhp : Irreducible p\n⊢ p ∈ ⊤\n[PROOFSTEP]\ndsimp only [Membership.mem]\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\np : Associates α\nhp : Irreducible p\n⊢ FactorSetMem p ⊤\n[PROOFSTEP]\ndsimp only [FactorSetMem]\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\np : Associates α\nhp : Irreducible p\n⊢ if hp : Irreducible p then BfactorSetMem { val := p, property := hp } ⊤ else False\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\np : Associates α\nhp : Irreducible p\n⊢ BfactorSetMem { val := p, property := hp } ⊤\n[PROOFSTEP]\nexact trivial\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\np : Associates α\nhp : Irreducible p\nl : Multiset { a // Irreducible a }\n⊢ p ∈ ↑l ↔ { val := p, property := hp } ∈ l\n[PROOFSTEP]\ndsimp only [Membership.mem]\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\np : Associates α\nhp : Irreducible p\nl : Multiset { a // Irreducible a }\n⊢ FactorSetMem p ↑l ↔ Mem { val := p, property := hp } l\n[PROOFSTEP]\ndsimp only [FactorSetMem]\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\np : Associates α\nhp : Irreducible p\nl : Multiset { a // Irreducible a }\n⊢ (if hp : Irreducible p then BfactorSetMem { val := p, property := hp } ↑l else False) ↔\n Mem { val := p, property := hp } l\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\np : Associates α\nhp : Irreducible p\nl : Multiset { a // Irreducible a }\n⊢ BfactorSetMem { val := p, property := hp } ↑l ↔ Mem { val := p, property := hp } l\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\np : Associates α\nhp : ¬Irreducible p\ns : FactorSet α\nh : if hp : Irreducible p then BfactorSetMem { val := p, property := hp } s else False\n⊢ False\n[PROOFSTEP]\nrwa [dif_neg hp] at h \n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\np q : Multiset (Associates α)\n⊢ (∀ (a : Associates α), a ∈ p → Irreducible a) →\n (∀ (a : Associates α), a ∈ q → Irreducible a) → prod p = prod q → p = q\n[PROOFSTEP]\napply Multiset.induction_on_multiset_quot p\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\np q : Multiset (Associates α)\n⊢ ∀ (s : Multiset α),\n (∀ (a : Associates α), a ∈ map (Quot.mk Setoid.r) s → Irreducible a) →\n (∀ (a : Associates α), a ∈ q → Irreducible a) →\n prod (map (Quot.mk Setoid.r) s) = prod q → map (Quot.mk Setoid.r) s = q\n[PROOFSTEP]\napply Multiset.induction_on_multiset_quot q\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\np q : Multiset (Associates α)\n⊢ ∀ (s s_1 : Multiset α),\n (∀ (a : Associates α), a ∈ map (Quot.mk Setoid.r) s_1 → Irreducible a) →\n (∀ (a : Associates α), a ∈ map (Quot.mk Setoid.r) s → Irreducible a) →\n prod (map (Quot.mk Setoid.r) s_1) = prod (map (Quot.mk Setoid.r) s) →\n map (Quot.mk Setoid.r) s_1 = map (Quot.mk Setoid.r) s\n[PROOFSTEP]\nintro s t hs ht eq\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\np q : Multiset (Associates α)\ns t : Multiset α\nhs : ∀ (a : Associates α), a ∈ map (Quot.mk Setoid.r) t → Irreducible a\nht : ∀ (a : Associates α), a ∈ map (Quot.mk Setoid.r) s → Irreducible a\neq : prod (map (Quot.mk Setoid.r) t) = prod (map (Quot.mk Setoid.r) s)\n⊢ map (Quot.mk Setoid.r) t = map (Quot.mk Setoid.r) s\n[PROOFSTEP]\nrefine' Multiset.map_mk_eq_map_mk_of_rel (UniqueFactorizationMonoid.factors_unique _ _ _)\n[GOAL]\ncase refine'_1\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\np q : Multiset (Associates α)\ns t : Multiset α\nhs : ∀ (a : Associates α), a ∈ map (Quot.mk Setoid.r) t → Irreducible a\nht : ∀ (a : Associates α), a ∈ map (Quot.mk Setoid.r) s → Irreducible a\neq : prod (map (Quot.mk Setoid.r) t) = prod (map (Quot.mk Setoid.r) s)\n⊢ ∀ (x : α), x ∈ t → Irreducible x\n[PROOFSTEP]\nexact fun a ha => (irreducible_mk _).1 <| hs _ <| Multiset.mem_map_of_mem _ ha\n[GOAL]\ncase refine'_2\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\np q : Multiset (Associates α)\ns t : Multiset α\nhs : ∀ (a : Associates α), a ∈ map (Quot.mk Setoid.r) t → Irreducible a\nht : ∀ (a : Associates α), a ∈ map (Quot.mk Setoid.r) s → Irreducible a\neq : prod (map (Quot.mk Setoid.r) t) = prod (map (Quot.mk Setoid.r) s)\n⊢ ∀ (x : α), x ∈ s → Irreducible x\n[PROOFSTEP]\nexact fun a ha => (irreducible_mk _).1 <| ht _ <| Multiset.mem_map_of_mem _ ha\n[GOAL]\ncase refine'_3\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\np q : Multiset (Associates α)\ns t : Multiset α\nhs : ∀ (a : Associates α), a ∈ map (Quot.mk Setoid.r) t → Irreducible a\nht : ∀ (a : Associates α), a ∈ map (Quot.mk Setoid.r) s → Irreducible a\neq : prod (map (Quot.mk Setoid.r) t) = prod (map (Quot.mk Setoid.r) s)\n⊢ prod t ~ᵤ prod s\n[PROOFSTEP]\nhave eq' : (Quot.mk Setoid.r : α → Associates α) = Associates.mk := funext quot_mk_eq_mk\n[GOAL]\ncase refine'_3\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\np q : Multiset (Associates α)\ns t : Multiset α\nhs : ∀ (a : Associates α), a ∈ map (Quot.mk Setoid.r) t → Irreducible a\nht : ∀ (a : Associates α), a ∈ map (Quot.mk Setoid.r) s → Irreducible a\neq : prod (map (Quot.mk Setoid.r) t) = prod (map (Quot.mk Setoid.r) s)\neq' : Quot.mk Setoid.r = Associates.mk\n⊢ prod t ~ᵤ prod s\n[PROOFSTEP]\nrwa [eq', prod_mk, prod_mk, mk_eq_mk_iff_associated] at eq \n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ninst✝ : Nontrivial α\np q : FactorSet α\nh : prod p = prod q\n⊢ p = q\n[PROOFSTEP]\ninduction p using WithTop.recTopCoe\n[GOAL]\ncase top\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ninst✝ : Nontrivial α\nq : FactorSet α\nh : prod ⊤ = prod q\n⊢ ⊤ = q\n[PROOFSTEP]\ninduction q using WithTop.recTopCoe\n[GOAL]\ncase coe\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ninst✝ : Nontrivial α\nq : FactorSet α\na✝ : Multiset { a // Irreducible a }\nh : prod ↑a✝ = prod q\n⊢ ↑a✝ = q\n[PROOFSTEP]\ninduction q using WithTop.recTopCoe\n[GOAL]\ncase top.top\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ninst✝ : Nontrivial α\nh : prod ⊤ = prod ⊤\n⊢ ⊤ = ⊤\n[PROOFSTEP]\nrfl\n[GOAL]\ncase top.coe\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ninst✝ : Nontrivial α\na✝ : Multiset { a // Irreducible a }\nh : prod ⊤ = prod ↑a✝\n⊢ ⊤ = ↑a✝\n[PROOFSTEP]\nrw [eq_comm, ← FactorSet.prod_eq_zero_iff, ← h, Associates.prod_top]\n[GOAL]\ncase coe.top\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ninst✝ : Nontrivial α\na✝ : Multiset { a // Irreducible a }\nh : prod ↑a✝ = prod ⊤\n⊢ ↑a✝ = ⊤\n[PROOFSTEP]\nrw [← FactorSet.prod_eq_zero_iff, h, Associates.prod_top]\n[GOAL]\ncase coe.coe\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ninst✝ : Nontrivial α\na✝¹ a✝ : Multiset { a // Irreducible a }\nh : prod ↑a✝¹ = prod ↑a✝\n⊢ ↑a✝¹ = ↑a✝\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase coe.coe.e_a\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ninst✝ : Nontrivial α\na✝¹ a✝ : Multiset { a // Irreducible a }\nh : prod ↑a✝¹ = prod ↑a✝\n⊢ a✝¹ = a✝\n[PROOFSTEP]\nrw [← Multiset.map_eq_map Subtype.coe_injective]\n[GOAL]\ncase coe.coe.e_a\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ninst✝ : Nontrivial α\na✝¹ a✝ : Multiset { a // Irreducible a }\nh : prod ↑a✝¹ = prod ↑a✝\n⊢ map (fun a => ↑a) a✝¹ = map (fun a => ↑a) a✝\n[PROOFSTEP]\napply unique' _ _ h\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ninst✝ : Nontrivial α\na✝¹ a✝ : Multiset { a // Irreducible a }\nh : prod ↑a✝¹ = prod ↑a✝\n⊢ ∀ (a : Associates α), a ∈ map Subtype.val a✝¹ → Irreducible a\n[PROOFSTEP]\nintro a ha\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ninst✝ : Nontrivial α\na✝¹ a✝ : Multiset { a // Irreducible a }\nh : prod ↑a✝¹ = prod ↑a✝\na : Associates α\nha : a ∈ map Subtype.val a✝¹\n⊢ Irreducible a\n[PROOFSTEP]\nobtain ⟨⟨a', irred⟩, -, rfl⟩ := Multiset.mem_map.mp ha\n[GOAL]\ncase intro.mk.intro\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ninst✝ : Nontrivial α\na✝¹ a✝ : Multiset { a // Irreducible a }\nh : prod ↑a✝¹ = prod ↑a✝\na' : Associates α\nirred : Irreducible a'\nha : ↑{ val := a', property := irred } ∈ map Subtype.val a✝¹\n⊢ Irreducible ↑{ val := a', property := irred }\n[PROOFSTEP]\nrwa [Subtype.coe_mk]\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ninst✝ : Nontrivial α\na✝¹ a✝ : Multiset { a // Irreducible a }\nh : prod ↑a✝¹ = prod ↑a✝\n⊢ ∀ (a : Associates α), a ∈ map Subtype.val a✝ → Irreducible a\n[PROOFSTEP]\nintro a ha\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ninst✝ : Nontrivial α\na✝¹ a✝ : Multiset { a // Irreducible a }\nh : prod ↑a✝¹ = prod ↑a✝\na : Associates α\nha : a ∈ map Subtype.val a✝\n⊢ Irreducible a\n[PROOFSTEP]\nobtain ⟨⟨a', irred⟩, -, rfl⟩ := Multiset.mem_map.mp ha\n[GOAL]\ncase intro.mk.intro\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ninst✝ : Nontrivial α\na✝¹ a✝ : Multiset { a // Irreducible a }\nh : prod ↑a✝¹ = prod ↑a✝\na' : Associates α\nirred : Irreducible a'\nha : ↑{ val := a', property := irred } ∈ map Subtype.val a✝\n⊢ Irreducible ↑{ val := a', property := irred }\n[PROOFSTEP]\nrwa [Subtype.coe_mk]\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ninst✝ : Nontrivial α\np q : Multiset (Associates α)\nhp : ∀ (a : Associates α), a ∈ p → Irreducible a\nhq : ∀ (a : Associates α), a ∈ q → Irreducible a\n⊢ prod p ≤ prod q → p ≤ q\n[PROOFSTEP]\nclassical\nrintro ⟨c, eqc⟩\nrefine' Multiset.le_iff_exists_add.2 ⟨factors c, unique' hq (fun x hx => _) _⟩\n· obtain h | h := Multiset.mem_add.1 hx\n · exact hp x h\n · exact irreducible_of_factor _ h\n· rw [eqc, Multiset.prod_add]\n congr\n refine' associated_iff_eq.mp (factors_prod fun hc => _).symm\n refine' not_irreducible_zero (hq _ _)\n rw [← prod_eq_zero_iff, eqc, hc, mul_zero]\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ninst✝ : Nontrivial α\np q : Multiset (Associates α)\nhp : ∀ (a : Associates α), a ∈ p → Irreducible a\nhq : ∀ (a : Associates α), a ∈ q → Irreducible a\n⊢ prod p ≤ prod q → p ≤ q\n[PROOFSTEP]\nrintro ⟨c, eqc⟩\n[GOAL]\ncase intro\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ninst✝ : Nontrivial α\np q : Multiset (Associates α)\nhp : ∀ (a : Associates α), a ∈ p → Irreducible a\nhq : ∀ (a : Associates α), a ∈ q → Irreducible a\nc : Associates α\neqc : prod q = prod p * c\n⊢ p ≤ q\n[PROOFSTEP]\nrefine' Multiset.le_iff_exists_add.2 ⟨factors c, unique' hq (fun x hx => _) _⟩\n[GOAL]\ncase intro.refine'_1\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ninst✝ : Nontrivial α\np q : Multiset (Associates α)\nhp : ∀ (a : Associates α), a ∈ p → Irreducible a\nhq : ∀ (a : Associates α), a ∈ q → Irreducible a\nc : Associates α\neqc : prod q = prod p * c\nx : Associates α\nhx : x ∈ p + factors c\n⊢ Irreducible x\n[PROOFSTEP]\nobtain h | h := Multiset.mem_add.1 hx\n[GOAL]\ncase intro.refine'_1.inl\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ninst✝ : Nontrivial α\np q : Multiset (Associates α)\nhp : ∀ (a : Associates α), a ∈ p → Irreducible a\nhq : ∀ (a : Associates α), a ∈ q → Irreducible a\nc : Associates α\neqc : prod q = prod p * c\nx : Associates α\nhx : x ∈ p + factors c\nh : x ∈ p\n⊢ Irreducible x\n[PROOFSTEP]\nexact hp x h\n[GOAL]\ncase intro.refine'_1.inr\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ninst✝ : Nontrivial α\np q : Multiset (Associates α)\nhp : ∀ (a : Associates α), a ∈ p → Irreducible a\nhq : ∀ (a : Associates α), a ∈ q → Irreducible a\nc : Associates α\neqc : prod q = prod p * c\nx : Associates α\nhx : x ∈ p + factors c\nh : x ∈ factors c\n⊢ Irreducible x\n[PROOFSTEP]\nexact irreducible_of_factor _ h\n[GOAL]\ncase intro.refine'_2\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ninst✝ : Nontrivial α\np q : Multiset (Associates α)\nhp : ∀ (a : Associates α), a ∈ p → Irreducible a\nhq : ∀ (a : Associates α), a ∈ q → Irreducible a\nc : Associates α\neqc : prod q = prod p * c\n⊢ prod q = prod (p + factors c)\n[PROOFSTEP]\nrw [eqc, Multiset.prod_add]\n[GOAL]\ncase intro.refine'_2\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ninst✝ : Nontrivial α\np q : Multiset (Associates α)\nhp : ∀ (a : Associates α), a ∈ p → Irreducible a\nhq : ∀ (a : Associates α), a ∈ q → Irreducible a\nc : Associates α\neqc : prod q = prod p * c\n⊢ prod p * c = prod p * prod (factors c)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase intro.refine'_2.e_a\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ninst✝ : Nontrivial α\np q : Multiset (Associates α)\nhp : ∀ (a : Associates α), a ∈ p → Irreducible a\nhq : ∀ (a : Associates α), a ∈ q → Irreducible a\nc : Associates α\neqc : prod q = prod p * c\n⊢ c = prod (factors c)\n[PROOFSTEP]\nrefine' associated_iff_eq.mp (factors_prod fun hc => _).symm\n[GOAL]\ncase intro.refine'_2.e_a\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ninst✝ : Nontrivial α\np q : Multiset (Associates α)\nhp : ∀ (a : Associates α), a ∈ p → Irreducible a\nhq : ∀ (a : Associates α), a ∈ q → Irreducible a\nc : Associates α\neqc : prod q = prod p * c\nhc : c = 0\n⊢ False\n[PROOFSTEP]\nrefine' not_irreducible_zero (hq _ _)\n[GOAL]\ncase intro.refine'_2.e_a\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ninst✝ : Nontrivial α\np q : Multiset (Associates α)\nhp : ∀ (a : Associates α), a ∈ p → Irreducible a\nhq : ∀ (a : Associates α), a ∈ q → Irreducible a\nc : Associates α\neqc : prod q = prod p * c\nhc : c = 0\n⊢ 0 ∈ q\n[PROOFSTEP]\nrw [← prod_eq_zero_iff, eqc, hc, mul_zero]\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na : α\n⊢ map Subtype.val (factors' a) = map Associates.mk (factors a)\n[PROOFSTEP]\nsimp [factors', Multiset.map_pmap, Multiset.pmap_eq_map]\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : α\nh : a ~ᵤ b\n⊢ factors' a = factors' b\n[PROOFSTEP]\nobtain rfl | hb := eq_or_ne b 0\n[GOAL]\ncase inl\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na : α\nh : a ~ᵤ 0\n⊢ factors' a = factors' 0\n[PROOFSTEP]\nrw [associated_zero_iff_eq_zero] at h \n[GOAL]\ncase inl\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na : α\nh : a = 0\n⊢ factors' a = factors' 0\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase inr\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : α\nh : a ~ᵤ b\nhb : b ≠ 0\n⊢ factors' a = factors' b\n[PROOFSTEP]\nhave ha : a ≠ 0 := by\n contrapose! hb with ha\n rw [← associated_zero_iff_eq_zero, ← ha]\n exact h.symm\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : α\nh : a ~ᵤ b\nhb : b ≠ 0\n⊢ a ≠ 0\n[PROOFSTEP]\ncontrapose! hb with ha\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : α\nh : a ~ᵤ b\nha : a = 0\n⊢ b = 0\n[PROOFSTEP]\nrw [← associated_zero_iff_eq_zero, ← ha]\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : α\nh : a ~ᵤ b\nha : a = 0\n⊢ b ~ᵤ a\n[PROOFSTEP]\nexact h.symm\n[GOAL]\ncase inr\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : α\nh : a ~ᵤ b\nhb : b ≠ 0\nha : a ≠ 0\n⊢ factors' a = factors' b\n[PROOFSTEP]\nrw [← Multiset.map_eq_map Subtype.coe_injective, map_subtype_coe_factors', map_subtype_coe_factors', ←\n rel_associated_iff_map_eq_map]\n[GOAL]\ncase inr\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : α\nh : a ~ᵤ b\nhb : b ≠ 0\nha : a ≠ 0\n⊢ Rel Associated (factors a) (factors b)\n[PROOFSTEP]\nexact\n factors_unique irreducible_of_factor irreducible_of_factor\n ((factors_prod ha).trans <| h.trans <| (factors_prod hb).symm)\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na : Associates α\n⊢ FactorSet α\n[PROOFSTEP]\nrefine' if h : a = 0 then ⊤ else Quotient.hrecOn a (fun x _ => some <| factors' x) _ h\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na : Associates α\nh : ¬a = 0\n⊢ ∀ (a b : α), a ≈ b → HEq (fun x => some (factors' a)) fun x => some (factors' b)\n[PROOFSTEP]\nintro a b hab\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na✝ : Associates α\nh : ¬a✝ = 0\na b : α\nhab : a ≈ b\n⊢ HEq (fun x => some (factors' a)) fun x => some (factors' b)\n[PROOFSTEP]\napply Function.hfunext\n[GOAL]\ncase hα\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na✝ : Associates α\nh : ¬a✝ = 0\na b : α\nhab : a ≈ b\n⊢ (¬Quotient.mk (Associated.setoid α) a = 0) = ¬Quotient.mk (Associated.setoid α) b = 0\n[PROOFSTEP]\nhave : a ~ᵤ 0 ↔ b ~ᵤ 0 := Iff.intro (fun ha0 => hab.symm.trans ha0) fun hb0 => hab.trans hb0\n[GOAL]\ncase hα\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na✝ : Associates α\nh : ¬a✝ = 0\na b : α\nhab : a ≈ b\nthis : a ~ᵤ 0 ↔ b ~ᵤ 0\n⊢ (¬Quotient.mk (Associated.setoid α) a = 0) = ¬Quotient.mk (Associated.setoid α) b = 0\n[PROOFSTEP]\nsimp only [associated_zero_iff_eq_zero] at this \n[GOAL]\ncase hα\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na✝ : Associates α\nh : ¬a✝ = 0\na b : α\nhab : a ≈ b\nthis : a = 0 ↔ b = 0\n⊢ (¬Quotient.mk (Associated.setoid α) a = 0) = ¬Quotient.mk (Associated.setoid α) b = 0\n[PROOFSTEP]\nsimp only [quotient_mk_eq_mk, this, mk_eq_zero]\n[GOAL]\ncase h\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na✝ : Associates α\nh : ¬a✝ = 0\na b : α\nhab : a ≈ b\n⊢ ∀ (a_1 : ¬Quotient.mk (Associated.setoid α) a = 0) (a' : ¬Quotient.mk (Associated.setoid α) b = 0),\n HEq a_1 a' → HEq (some (factors' a)) (some (factors' b))\n[PROOFSTEP]\nexact fun ha hb _ => heq_of_eq <| congr_arg some <| factors'_cong hab\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na : α\nh : a ≠ 0\n⊢ factors (Associates.mk a) = ↑(factors' a)\n[PROOFSTEP]\nclassical\napply dif_neg\napply mt mk_eq_zero.1 h\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na : α\nh : a ≠ 0\n⊢ factors (Associates.mk a) = ↑(factors' a)\n[PROOFSTEP]\napply dif_neg\n[GOAL]\ncase hnc\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na : α\nh : a ≠ 0\n⊢ ¬Associates.mk a = 0\n[PROOFSTEP]\napply mt mk_eq_zero.1 h\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na : Associates α\nb : α\nthis : Associates.mk b = 0\n⊢ FactorSet.prod (factors (Quotient.mk (Associated.setoid α) b)) = Quotient.mk (Associated.setoid α) b\n[PROOFSTEP]\nsimp [quotient_mk_eq_mk, this]\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na : Associates α\nb : α\nx✝ : Associates.mk b ≠ 0\n⊢ FactorSet.prod (factors (Quotient.mk (Associated.setoid α) b)) = Quotient.mk (Associated.setoid α) b\n[PROOFSTEP]\nhave : b ≠ 0 := by simp_all\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na : Associates α\nb : α\nx✝ : Associates.mk b ≠ 0\n⊢ b ≠ 0\n[PROOFSTEP]\nsimp_all\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na : Associates α\nb : α\nx✝ : Associates.mk b ≠ 0\nthis : b ≠ 0\n⊢ FactorSet.prod (factors (Quotient.mk (Associated.setoid α) b)) = Quotient.mk (Associated.setoid α) b\n[PROOFSTEP]\nsimp [this, quotient_mk_eq_mk, prod_mk, mk_eq_mk_iff_associated.2 (UniqueFactorizationMonoid.factors_prod this)]\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Subsingleton α\na : Associates α\n⊢ factors a = none\n[PROOFSTEP]\nconvert @factors_0 _ _ _ _ _\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na : Associates α\n⊢ factors a = none ↔ a = 0\n[PROOFSTEP]\nnontriviality α\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na : Associates α\n✝ : Nontrivial α\n⊢ factors a = none ↔ a = 0\n[PROOFSTEP]\nexact ⟨fun h => by rwa [← factors_prod a, FactorSet.prod_eq_zero_iff], fun h => h.symm ▸ factors_0⟩\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na : Associates α\n✝ : Nontrivial α\nh : factors a = none\n⊢ a = 0\n[PROOFSTEP]\nrwa [← factors_prod a, FactorSet.prod_eq_zero_iff]\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na : Associates α\n⊢ (∃ s, factors a = some s) ↔ a ≠ 0\n[PROOFSTEP]\nrw [← Option.isSome_iff_exists, ← Option.ne_none_iff_isSome, Ne.def, Ne.def, factors_eq_none_iff_zero]\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : Associates α\nh : factors a = factors b\n⊢ a = b\n[PROOFSTEP]\nhave : a.factors.prod = b.factors.prod := by rw [h]\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : Associates α\nh : factors a = factors b\n⊢ FactorSet.prod (factors a) = FactorSet.prod (factors b)\n[PROOFSTEP]\nrw [h]\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : Associates α\nh : factors a = factors b\nthis : FactorSet.prod (factors a) = FactorSet.prod (factors b)\n⊢ a = b\n[PROOFSTEP]\nrwa [factors_prod, factors_prod] at this \n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\na b : FactorSet α\nh : FactorSet.prod a = FactorSet.prod b\n⊢ a = b\n[PROOFSTEP]\nclassical\nhave : a.prod.factors = b.prod.factors := by rw [h]\nrwa [prod_factors, prod_factors] at this \n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\na b : FactorSet α\nh : FactorSet.prod a = FactorSet.prod b\n⊢ a = b\n[PROOFSTEP]\nhave : a.prod.factors = b.prod.factors := by rw [h]\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\na b : FactorSet α\nh : FactorSet.prod a = FactorSet.prod b\n⊢ factors (FactorSet.prod a) = factors (FactorSet.prod b)\n[PROOFSTEP]\nrw [h]\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\na b : FactorSet α\nh : FactorSet.prod a = FactorSet.prod b\nthis : factors (FactorSet.prod a) = factors (FactorSet.prod b)\n⊢ a = b\n[PROOFSTEP]\nrwa [prod_factors, prod_factors] at this \n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : Associates α\nha : a ≠ 0\nhb : b ≠ 0\nh : ∀ (p : Associates α), Irreducible p → count p (factors a) = count p (factors b)\n⊢ factors a = factors b\n[PROOFSTEP]\nobtain ⟨sa, h_sa⟩ := factors_eq_some_iff_ne_zero.mpr ha\n[GOAL]\ncase intro\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : Associates α\nha : a ≠ 0\nhb : b ≠ 0\nh : ∀ (p : Associates α), Irreducible p → count p (factors a) = count p (factors b)\nsa : Multiset { p // Irreducible p }\nh_sa : factors a = some sa\n⊢ factors a = factors b\n[PROOFSTEP]\nobtain ⟨sb, h_sb⟩ := factors_eq_some_iff_ne_zero.mpr hb\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : Associates α\nha : a ≠ 0\nhb : b ≠ 0\nh : ∀ (p : Associates α), Irreducible p → count p (factors a) = count p (factors b)\nsa : Multiset { p // Irreducible p }\nh_sa : factors a = some sa\nsb : Multiset { p // Irreducible p }\nh_sb : factors b = some sb\n⊢ factors a = factors b\n[PROOFSTEP]\nrw [h_sa, h_sb] at h ⊢\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : Associates α\nha : a ≠ 0\nhb : b ≠ 0\nsa : Multiset { p // Irreducible p }\nh_sa : factors a = some sa\nsb : Multiset { p // Irreducible p }\nh : ∀ (p : Associates α), Irreducible p → count p (some sa) = count p (some sb)\nh_sb : factors b = some sb\n⊢ some sa = some sb\n[PROOFSTEP]\nrw [Option.some_inj]\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : Associates α\nha : a ≠ 0\nhb : b ≠ 0\nsa : Multiset { p // Irreducible p }\nh_sa : factors a = some sa\nsb : Multiset { p // Irreducible p }\nh : ∀ (p : Associates α), Irreducible p → count p (some sa) = count p (some sb)\nh_sb : factors b = some sb\n⊢ sa = sb\n[PROOFSTEP]\nhave h_count : ∀ (p : Associates α) (hp : Irreducible p), sa.count ⟨p, hp⟩ = sb.count ⟨p, hp⟩ :=\n by\n intro p hp\n rw [← count_some, ← count_some, h p hp]\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : Associates α\nha : a ≠ 0\nhb : b ≠ 0\nsa : Multiset { p // Irreducible p }\nh_sa : factors a = some sa\nsb : Multiset { p // Irreducible p }\nh : ∀ (p : Associates α), Irreducible p → count p (some sa) = count p (some sb)\nh_sb : factors b = some sb\n⊢ ∀ (p : Associates α) (hp : Irreducible p),\n Multiset.count { val := p, property := hp } sa = Multiset.count { val := p, property := hp } sb\n[PROOFSTEP]\nintro p hp\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : Associates α\nha : a ≠ 0\nhb : b ≠ 0\nsa : Multiset { p // Irreducible p }\nh_sa : factors a = some sa\nsb : Multiset { p // Irreducible p }\nh : ∀ (p : Associates α), Irreducible p → count p (some sa) = count p (some sb)\nh_sb : factors b = some sb\np : Associates α\nhp : Irreducible p\n⊢ Multiset.count { val := p, property := hp } sa = Multiset.count { val := p, property := hp } sb\n[PROOFSTEP]\nrw [← count_some, ← count_some, h p hp]\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : Associates α\nha : a ≠ 0\nhb : b ≠ 0\nsa : Multiset { p // Irreducible p }\nh_sa : factors a = some sa\nsb : Multiset { p // Irreducible p }\nh : ∀ (p : Associates α), Irreducible p → count p (some sa) = count p (some sb)\nh_sb : factors b = some sb\nh_count :\n ∀ (p : Associates α) (hp : Irreducible p),\n Multiset.count { val := p, property := hp } sa = Multiset.count { val := p, property := hp } sb\n⊢ sa = sb\n[PROOFSTEP]\napply Multiset.toFinsupp.injective\n[GOAL]\ncase intro.intro.a\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : Associates α\nha : a ≠ 0\nhb : b ≠ 0\nsa : Multiset { p // Irreducible p }\nh_sa : factors a = some sa\nsb : Multiset { p // Irreducible p }\nh : ∀ (p : Associates α), Irreducible p → count p (some sa) = count p (some sb)\nh_sb : factors b = some sb\nh_count :\n ∀ (p : Associates α) (hp : Irreducible p),\n Multiset.count { val := p, property := hp } sa = Multiset.count { val := p, property := hp } sb\n⊢ ↑toFinsupp sa = ↑toFinsupp sb\n[PROOFSTEP]\next ⟨p, hp⟩\n[GOAL]\ncase intro.intro.a.h.mk\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : Associates α\nha : a ≠ 0\nhb : b ≠ 0\nsa : Multiset { p // Irreducible p }\nh_sa : factors a = some sa\nsb : Multiset { p // Irreducible p }\nh : ∀ (p : Associates α), Irreducible p → count p (some sa) = count p (some sb)\nh_sb : factors b = some sb\nh_count :\n ∀ (p : Associates α) (hp : Irreducible p),\n Multiset.count { val := p, property := hp } sa = Multiset.count { val := p, property := hp } sb\np : Associates α\nhp : Irreducible p\n⊢ ↑(↑toFinsupp sa) { val := p, property := hp } = ↑(↑toFinsupp sb) { val := p, property := hp }\n[PROOFSTEP]\nrw [Multiset.toFinsupp_apply, Multiset.toFinsupp_apply, h_count p hp]\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b p : Associates α\nhb : b ≠ 0\nhp : Irreducible p\nh : factors a ≤ factors b\n⊢ count p (factors a) ≤ count p (factors b)\n[PROOFSTEP]\nby_cases ha : a = 0\n[GOAL]\ncase pos\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b p : Associates α\nhb : b ≠ 0\nhp : Irreducible p\nh : factors a ≤ factors b\nha : a = 0\n⊢ count p (factors a) ≤ count p (factors b)\n[PROOFSTEP]\nsimp_all\n[GOAL]\ncase neg\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b p : Associates α\nhb : b ≠ 0\nhp : Irreducible p\nh : factors a ≤ factors b\nha : ¬a = 0\n⊢ count p (factors a) ≤ count p (factors b)\n[PROOFSTEP]\nobtain ⟨sa, h_sa⟩ := factors_eq_some_iff_ne_zero.mpr ha\n[GOAL]\ncase neg.intro\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b p : Associates α\nhb : b ≠ 0\nhp : Irreducible p\nh : factors a ≤ factors b\nha : ¬a = 0\nsa : Multiset { p // Irreducible p }\nh_sa : factors a = some sa\n⊢ count p (factors a) ≤ count p (factors b)\n[PROOFSTEP]\nobtain ⟨sb, h_sb⟩ := factors_eq_some_iff_ne_zero.mpr hb\n[GOAL]\ncase neg.intro.intro\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b p : Associates α\nhb : b ≠ 0\nhp : Irreducible p\nh : factors a ≤ factors b\nha : ¬a = 0\nsa : Multiset { p // Irreducible p }\nh_sa : factors a = some sa\nsb : Multiset { p // Irreducible p }\nh_sb : factors b = some sb\n⊢ count p (factors a) ≤ count p (factors b)\n[PROOFSTEP]\nrw [h_sa, h_sb] at h ⊢\n[GOAL]\ncase neg.intro.intro\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b p : Associates α\nhb : b ≠ 0\nhp : Irreducible p\nha : ¬a = 0\nsa : Multiset { p // Irreducible p }\nh_sa : factors a = some sa\nsb : Multiset { p // Irreducible p }\nh : some sa ≤ some sb\nh_sb : factors b = some sb\n⊢ count p (some sa) ≤ count p (some sb)\n[PROOFSTEP]\nrw [count_some hp, count_some hp]\n[GOAL]\ncase neg.intro.intro\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b p : Associates α\nhb : b ≠ 0\nhp : Irreducible p\nha : ¬a = 0\nsa : Multiset { p // Irreducible p }\nh_sa : factors a = some sa\nsb : Multiset { p // Irreducible p }\nh : some sa ≤ some sb\nh_sb : factors b = some sb\n⊢ Multiset.count { val := p, property := hp } sa ≤ Multiset.count { val := p, property := hp } sb\n[PROOFSTEP]\nrw [WithTop.some_le_some] at h \n[GOAL]\ncase neg.intro.intro\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b p : Associates α\nhb : b ≠ 0\nhp : Irreducible p\nha : ¬a = 0\nsa : Multiset { p // Irreducible p }\nh_sa : factors a = some sa\nsb : Multiset { p // Irreducible p }\nh : sa ≤ sb\nh_sb : factors b = some sb\n⊢ Multiset.count { val := p, property := hp } sa ≤ Multiset.count { val := p, property := hp } sb\n[PROOFSTEP]\nexact Multiset.count_le_of_le _ h\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : Associates α\n⊢ factors (a * b) = factors a + factors b\n[PROOFSTEP]\ncases subsingleton_or_nontrivial α\n[GOAL]\ncase inl\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : Associates α\nh✝ : Subsingleton α\n⊢ factors (a * b) = factors a + factors b\n[PROOFSTEP]\nsimp [Subsingleton.elim a 0]\n[GOAL]\ncase inr\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : Associates α\nh✝ : Nontrivial α\n⊢ factors (a * b) = factors a + factors b\n[PROOFSTEP]\nrefine' eq_of_prod_eq_prod (eq_of_factors_eq_factors _)\n[GOAL]\ncase inr\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : Associates α\nh✝ : Nontrivial α\n⊢ factors (FactorSet.prod (factors (a * b))) = factors (FactorSet.prod (factors a + factors b))\n[PROOFSTEP]\nrw [prod_add, factors_prod, factors_prod, factors_prod]\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ns t : Associates α\nd : Associates α\neq : t = s * d\n⊢ factors s ≤ factors t\n[PROOFSTEP]\nrw [eq, factors_mul]\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ns t : Associates α\nd : Associates α\neq : t = s * d\n⊢ factors s ≤ factors s + factors d\n[PROOFSTEP]\nexact le_add_of_nonneg_right bot_le\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : Associates α\nh : factors a ≤ factors b\n⊢ a ≤ b\n[PROOFSTEP]\nhave : a.factors.prod ≤ b.factors.prod := prod_mono h\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : Associates α\nh : factors a ≤ factors b\nthis : FactorSet.prod (factors a) ≤ FactorSet.prod (factors b)\n⊢ a ≤ b\n[PROOFSTEP]\nrwa [factors_prod, factors_prod] at this \n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\na b : FactorSet α\n⊢ FactorSet.prod a ≤ FactorSet.prod b ↔ a ≤ b\n[PROOFSTEP]\nclassical exact\n Iff.intro\n (fun h => by\n have : a.prod.factors ≤ b.prod.factors := factors_mono h\n rwa [prod_factors, prod_factors] at this )\n prod_mono\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\na b : FactorSet α\n⊢ FactorSet.prod a ≤ FactorSet.prod b ↔ a ≤ b\n[PROOFSTEP]\nexact\n Iff.intro\n (fun h => by\n have : a.prod.factors ≤ b.prod.factors := factors_mono h\n rwa [prod_factors, prod_factors] at this )\n prod_mono\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\na b : FactorSet α\nh : FactorSet.prod a ≤ FactorSet.prod b\n⊢ a ≤ b\n[PROOFSTEP]\nhave : a.prod.factors ≤ b.prod.factors := factors_mono h\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\na b : FactorSet α\nh : FactorSet.prod a ≤ FactorSet.prod b\nthis : factors (FactorSet.prod a) ≤ factors (FactorSet.prod b)\n⊢ a ≤ b\n[PROOFSTEP]\nrwa [prod_factors, prod_factors] at this \n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : Associates α\n⊢ FactorSet.prod (factors a ⊔ factors b) * FactorSet.prod (factors a ⊓ factors b) = a * b\n[PROOFSTEP]\nnontriviality α\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : Associates α\n✝ : Nontrivial α\n⊢ FactorSet.prod (factors a ⊔ factors b) * FactorSet.prod (factors a ⊓ factors b) = a * b\n[PROOFSTEP]\nrefine' eq_of_factors_eq_factors _\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : Associates α\n✝ : Nontrivial α\n⊢ factors (FactorSet.prod (factors a ⊔ factors b) * FactorSet.prod (factors a ⊓ factors b)) = factors (a * b)\n[PROOFSTEP]\nrw [← prod_add, prod_factors, factors_mul, FactorSet.sup_add_inf_eq_add]\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na p : Associates α\nhp : Irreducible p\nhm : p ∈ factors a\n⊢ p ∣ a\n[PROOFSTEP]\nby_cases ha0 : a = 0\n[GOAL]\ncase pos\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na p : Associates α\nhp : Irreducible p\nhm : p ∈ factors a\nha0 : a = 0\n⊢ p ∣ a\n[PROOFSTEP]\nrw [ha0]\n[GOAL]\ncase pos\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na p : Associates α\nhp : Irreducible p\nhm : p ∈ factors a\nha0 : a = 0\n⊢ p ∣ 0\n[PROOFSTEP]\nexact dvd_zero p\n[GOAL]\ncase neg\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na p : Associates α\nhp : Irreducible p\nhm : p ∈ factors a\nha0 : ¬a = 0\n⊢ p ∣ a\n[PROOFSTEP]\nobtain ⟨a0, nza, ha'⟩ := exists_non_zero_rep ha0\n[GOAL]\ncase neg.intro.intro\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na p : Associates α\nhp : Irreducible p\nhm : p ∈ factors a\nha0 : ¬a = 0\na0 : α\nnza : a0 ≠ 0\nha' : Associates.mk a0 = a\n⊢ p ∣ a\n[PROOFSTEP]\nrw [← Associates.factors_prod a]\n[GOAL]\ncase neg.intro.intro\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na p : Associates α\nhp : Irreducible p\nhm : p ∈ factors a\nha0 : ¬a = 0\na0 : α\nnza : a0 ≠ 0\nha' : Associates.mk a0 = a\n⊢ p ∣ FactorSet.prod (factors a)\n[PROOFSTEP]\nrw [← ha', factors_mk a0 nza] at hm ⊢\n[GOAL]\ncase neg.intro.intro\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na p : Associates α\nhp : Irreducible p\nha0 : ¬a = 0\na0 : α\nhm : p ∈ ↑(factors' a0)\nnza : a0 ≠ 0\nha' : Associates.mk a0 = a\n⊢ p ∣ FactorSet.prod ↑(factors' a0)\n[PROOFSTEP]\nrw [prod_coe]\n[GOAL]\ncase neg.intro.intro\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na p : Associates α\nhp : Irreducible p\nha0 : ¬a = 0\na0 : α\nhm : p ∈ ↑(factors' a0)\nnza : a0 ≠ 0\nha' : Associates.mk a0 = a\n⊢ p ∣ prod (map Subtype.val (factors' a0))\n[PROOFSTEP]\napply Multiset.dvd_prod\n[GOAL]\ncase neg.intro.intro.a\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na p : Associates α\nhp : Irreducible p\nha0 : ¬a = 0\na0 : α\nhm : p ∈ ↑(factors' a0)\nnza : a0 ≠ 0\nha' : Associates.mk a0 = a\n⊢ p ∈ map Subtype.val (factors' a0)\n[PROOFSTEP]\napply Multiset.mem_map.mpr\n[GOAL]\ncase neg.intro.intro.a\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na p : Associates α\nhp : Irreducible p\nha0 : ¬a = 0\na0 : α\nhm : p ∈ ↑(factors' a0)\nnza : a0 ≠ 0\nha' : Associates.mk a0 = a\n⊢ ∃ a, a ∈ factors' a0 ∧ ↑a = p\n[PROOFSTEP]\nexact ⟨⟨p, hp⟩, mem_factorSet_some.mp hm, rfl⟩\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na : α\np : Associates α\nhp : Irreducible p\nhz : a ≠ 0\nh_mem : { val := p, property := hp } ∈ factors' a\n⊢ p ∣ Associates.mk a\n[PROOFSTEP]\nhaveI := Classical.decEq (Associates α)\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na : α\np : Associates α\nhp : Irreducible p\nhz : a ≠ 0\nh_mem : { val := p, property := hp } ∈ factors' a\nthis : DecidableEq (Associates α)\n⊢ p ∣ Associates.mk a\n[PROOFSTEP]\napply dvd_of_mem_factors (hp := hp)\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na : α\np : Associates α\nhp : Irreducible p\nhz : a ≠ 0\nh_mem : { val := p, property := hp } ∈ factors' a\nthis : DecidableEq (Associates α)\n⊢ p ∈ factors (Associates.mk a)\n[PROOFSTEP]\nrw [factors_mk _ hz]\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na : α\np : Associates α\nhp : Irreducible p\nhz : a ≠ 0\nh_mem : { val := p, property := hp } ∈ factors' a\nthis : DecidableEq (Associates α)\n⊢ p ∈ ↑(factors' a)\n[PROOFSTEP]\napply mem_factorSet_some.2 h_mem\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na p : α\nha0 : a ≠ 0\nhp : Irreducible p\nhd : p ∣ a\n⊢ { val := Associates.mk p, property := (_ : Irreducible (Associates.mk p)) } ∈ factors' a\n[PROOFSTEP]\nobtain ⟨q, hq, hpq⟩ := exists_mem_factors_of_dvd ha0 hp hd\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na p : α\nha0 : a ≠ 0\nhp : Irreducible p\nhd : p ∣ a\nq : α\nhq : q ∈ UniqueFactorizationMonoid.factors a\nhpq : p ~ᵤ q\n⊢ { val := Associates.mk p, property := (_ : Irreducible (Associates.mk p)) } ∈ factors' a\n[PROOFSTEP]\napply Multiset.mem_pmap.mpr\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na p : α\nha0 : a ≠ 0\nhp : Irreducible p\nhd : p ∣ a\nq : α\nhq : q ∈ UniqueFactorizationMonoid.factors a\nhpq : p ~ᵤ q\n⊢ ∃ a_1 h,\n { val := Associates.mk a_1, property := (_ : Irreducible (Associates.mk a_1)) } =\n { val := Associates.mk p, property := (_ : Irreducible (Associates.mk p)) }\n[PROOFSTEP]\nuse q\n[GOAL]\ncase h\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na p : α\nha0 : a ≠ 0\nhp : Irreducible p\nhd : p ∣ a\nq : α\nhq : q ∈ UniqueFactorizationMonoid.factors a\nhpq : p ~ᵤ q\n⊢ ∃ h,\n { val := Associates.mk q, property := (_ : Irreducible (Associates.mk q)) } =\n { val := Associates.mk p, property := (_ : Irreducible (Associates.mk p)) }\n[PROOFSTEP]\nuse hq\n[GOAL]\ncase h\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na p : α\nha0 : a ≠ 0\nhp : Irreducible p\nhd : p ∣ a\nq : α\nhq : q ∈ UniqueFactorizationMonoid.factors a\nhpq : p ~ᵤ q\n⊢ { val := Associates.mk q, property := (_ : Irreducible (Associates.mk q)) } =\n { val := Associates.mk p, property := (_ : Irreducible (Associates.mk p)) }\n[PROOFSTEP]\nexact Subtype.eq (Eq.symm (mk_eq_mk_iff_associated.mpr hpq))\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na p : α\nha0 : a ≠ 0\nhp : Irreducible p\n⊢ { val := Associates.mk p, property := (_ : Irreducible (Associates.mk p)) } ∈ factors' a ↔ p ∣ a\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na p : α\nha0 : a ≠ 0\nhp : Irreducible p\n⊢ { val := Associates.mk p, property := (_ : Irreducible (Associates.mk p)) } ∈ factors' a → p ∣ a\n[PROOFSTEP]\nrw [← mk_dvd_mk]\n[GOAL]\ncase mp\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na p : α\nha0 : a ≠ 0\nhp : Irreducible p\n⊢ { val := Associates.mk p, property := (_ : Irreducible (Associates.mk p)) } ∈ factors' a →\n Associates.mk p ∣ Associates.mk a\n[PROOFSTEP]\napply dvd_of_mem_factors'\n[GOAL]\ncase mp.hz\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na p : α\nha0 : a ≠ 0\nhp : Irreducible p\n⊢ a ≠ 0\n[PROOFSTEP]\napply ha0\n[GOAL]\ncase mpr\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na p : α\nha0 : a ≠ 0\nhp : Irreducible p\n⊢ p ∣ a → { val := Associates.mk p, property := (_ : Irreducible (Associates.mk p)) } ∈ factors' a\n[PROOFSTEP]\napply mem_factors'_of_dvd ha0 hp\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na p : α\nha0 : a ≠ 0\nhp : Irreducible p\nhd : p ∣ a\n⊢ Associates.mk p ∈ factors (Associates.mk a)\n[PROOFSTEP]\nrw [factors_mk _ ha0]\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na p : α\nha0 : a ≠ 0\nhp : Irreducible p\nhd : p ∣ a\n⊢ Associates.mk p ∈ ↑(factors' a)\n[PROOFSTEP]\nexact mem_factorSet_some.mpr (mem_factors'_of_dvd ha0 hp hd)\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na p : α\nha0 : a ≠ 0\nhp : Irreducible p\n⊢ Associates.mk p ∈ factors (Associates.mk a) ↔ p ∣ a\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na p : α\nha0 : a ≠ 0\nhp : Irreducible p\n⊢ Associates.mk p ∈ factors (Associates.mk a) → p ∣ a\n[PROOFSTEP]\nrw [← mk_dvd_mk]\n[GOAL]\ncase mp\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na p : α\nha0 : a ≠ 0\nhp : Irreducible p\n⊢ Associates.mk p ∈ factors (Associates.mk a) → Associates.mk p ∣ Associates.mk a\n[PROOFSTEP]\napply dvd_of_mem_factors\n[GOAL]\ncase mp.hp\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na p : α\nha0 : a ≠ 0\nhp : Irreducible p\n⊢ Irreducible (Associates.mk p)\n[PROOFSTEP]\nexact (irreducible_mk p).mpr hp\n[GOAL]\ncase mpr\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na p : α\nha0 : a ≠ 0\nhp : Irreducible p\n⊢ p ∣ a → Associates.mk p ∈ factors (Associates.mk a)\n[PROOFSTEP]\napply mem_factors_of_dvd ha0 hp\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : α\nha : a ≠ 0\nhb : b ≠ 0\nh : Associates.mk a ⊓ Associates.mk b ≠ 1\n⊢ ∃ p, Prime p ∧ p ∣ a ∧ p ∣ b\n[PROOFSTEP]\nhave hz : factors (Associates.mk a) ⊓ factors (Associates.mk b) ≠ 0 :=\n by\n contrapose! h with hf\n change (factors (Associates.mk a) ⊓ factors (Associates.mk b)).prod = 1\n rw [hf]\n exact Multiset.prod_zero\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : α\nha : a ≠ 0\nhb : b ≠ 0\nh : Associates.mk a ⊓ Associates.mk b ≠ 1\n⊢ factors (Associates.mk a) ⊓ factors (Associates.mk b) ≠ 0\n[PROOFSTEP]\ncontrapose! h with hf\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : α\nha : a ≠ 0\nhb : b ≠ 0\nhf : factors (Associates.mk a) ⊓ factors (Associates.mk b) = 0\n⊢ Associates.mk a ⊓ Associates.mk b = 1\n[PROOFSTEP]\nchange (factors (Associates.mk a) ⊓ factors (Associates.mk b)).prod = 1\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : α\nha : a ≠ 0\nhb : b ≠ 0\nhf : factors (Associates.mk a) ⊓ factors (Associates.mk b) = 0\n⊢ FactorSet.prod (factors (Associates.mk a) ⊓ factors (Associates.mk b)) = 1\n[PROOFSTEP]\nrw [hf]\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : α\nha : a ≠ 0\nhb : b ≠ 0\nhf : factors (Associates.mk a) ⊓ factors (Associates.mk b) = 0\n⊢ FactorSet.prod 0 = 1\n[PROOFSTEP]\nexact Multiset.prod_zero\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : α\nha : a ≠ 0\nhb : b ≠ 0\nh : Associates.mk a ⊓ Associates.mk b ≠ 1\nhz : factors (Associates.mk a) ⊓ factors (Associates.mk b) ≠ 0\n⊢ ∃ p, Prime p ∧ p ∣ a ∧ p ∣ b\n[PROOFSTEP]\nrw [factors_mk a ha, factors_mk b hb, ← WithTop.coe_inf] at hz \n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : α\nha : a ≠ 0\nhb : b ≠ 0\nh : Associates.mk a ⊓ Associates.mk b ≠ 1\nhz : ↑(factors' a ⊓ factors' b) ≠ 0\n⊢ ∃ p, Prime p ∧ p ∣ a ∧ p ∣ b\n[PROOFSTEP]\nobtain ⟨⟨p0, p0_irr⟩, p0_mem⟩ := Multiset.exists_mem_of_ne_zero ((mt WithTop.coe_eq_coe.mpr) hz)\n[GOAL]\ncase intro.mk\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : α\nha : a ≠ 0\nhb : b ≠ 0\nh : Associates.mk a ⊓ Associates.mk b ≠ 1\nhz : ↑(factors' a ⊓ factors' b) ≠ 0\np0 : Associates α\np0_irr : Irreducible p0\np0_mem : { val := p0, property := p0_irr } ∈ factors' a ⊓ factors' b\n⊢ ∃ p, Prime p ∧ p ∣ a ∧ p ∣ b\n[PROOFSTEP]\nrw [Multiset.inf_eq_inter] at p0_mem \n[GOAL]\ncase intro.mk\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : α\nha : a ≠ 0\nhb : b ≠ 0\nh : Associates.mk a ⊓ Associates.mk b ≠ 1\nhz : ↑(factors' a ⊓ factors' b) ≠ 0\np0 : Associates α\np0_irr : Irreducible p0\np0_mem : { val := p0, property := p0_irr } ∈ factors' a ∩ factors' b\n⊢ ∃ p, Prime p ∧ p ∣ a ∧ p ∣ b\n[PROOFSTEP]\nobtain ⟨p, rfl⟩ : ∃ p, Associates.mk p = p0 := Quot.exists_rep p0\n[GOAL]\ncase intro.mk.intro\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : α\nha : a ≠ 0\nhb : b ≠ 0\nh : Associates.mk a ⊓ Associates.mk b ≠ 1\nhz : ↑(factors' a ⊓ factors' b) ≠ 0\np : α\np0_irr : Irreducible (Associates.mk p)\np0_mem : { val := Associates.mk p, property := p0_irr } ∈ factors' a ∩ factors' b\n⊢ ∃ p, Prime p ∧ p ∣ a ∧ p ∣ b\n[PROOFSTEP]\nrefine' ⟨p, _, _, _⟩\n[GOAL]\ncase intro.mk.intro.refine'_1\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : α\nha : a ≠ 0\nhb : b ≠ 0\nh : Associates.mk a ⊓ Associates.mk b ≠ 1\nhz : ↑(factors' a ⊓ factors' b) ≠ 0\np : α\np0_irr : Irreducible (Associates.mk p)\np0_mem : { val := Associates.mk p, property := p0_irr } ∈ factors' a ∩ factors' b\n⊢ Prime p\n[PROOFSTEP]\nrw [← irreducible_iff_prime, ← irreducible_mk]\n[GOAL]\ncase intro.mk.intro.refine'_1\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : α\nha : a ≠ 0\nhb : b ≠ 0\nh : Associates.mk a ⊓ Associates.mk b ≠ 1\nhz : ↑(factors' a ⊓ factors' b) ≠ 0\np : α\np0_irr : Irreducible (Associates.mk p)\np0_mem : { val := Associates.mk p, property := p0_irr } ∈ factors' a ∩ factors' b\n⊢ Irreducible (Associates.mk p)\n[PROOFSTEP]\nexact p0_irr\n[GOAL]\ncase intro.mk.intro.refine'_2\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : α\nha : a ≠ 0\nhb : b ≠ 0\nh : Associates.mk a ⊓ Associates.mk b ≠ 1\nhz : ↑(factors' a ⊓ factors' b) ≠ 0\np : α\np0_irr : Irreducible (Associates.mk p)\np0_mem : { val := Associates.mk p, property := p0_irr } ∈ factors' a ∩ factors' b\n⊢ p ∣ a\n[PROOFSTEP]\napply dvd_of_mk_le_mk\n[GOAL]\ncase intro.mk.intro.refine'_2.a\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : α\nha : a ≠ 0\nhb : b ≠ 0\nh : Associates.mk a ⊓ Associates.mk b ≠ 1\nhz : ↑(factors' a ⊓ factors' b) ≠ 0\np : α\np0_irr : Irreducible (Associates.mk p)\np0_mem : { val := Associates.mk p, property := p0_irr } ∈ factors' a ∩ factors' b\n⊢ Associates.mk p ≤ Associates.mk a\n[PROOFSTEP]\napply dvd_of_mem_factors' (Multiset.mem_inter.mp p0_mem).left\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : α\nha : a ≠ 0\nhb : b ≠ 0\nh : Associates.mk a ⊓ Associates.mk b ≠ 1\nhz : ↑(factors' a ⊓ factors' b) ≠ 0\np : α\np0_irr : Irreducible (Associates.mk p)\np0_mem : { val := Associates.mk p, property := p0_irr } ∈ factors' a ∩ factors' b\n⊢ a ≠ 0\n[PROOFSTEP]\napply ha\n[GOAL]\ncase intro.mk.intro.refine'_3\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : α\nha : a ≠ 0\nhb : b ≠ 0\nh : Associates.mk a ⊓ Associates.mk b ≠ 1\nhz : ↑(factors' a ⊓ factors' b) ≠ 0\np : α\np0_irr : Irreducible (Associates.mk p)\np0_mem : { val := Associates.mk p, property := p0_irr } ∈ factors' a ∩ factors' b\n⊢ p ∣ b\n[PROOFSTEP]\napply dvd_of_mk_le_mk\n[GOAL]\ncase intro.mk.intro.refine'_3.a\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : α\nha : a ≠ 0\nhb : b ≠ 0\nh : Associates.mk a ⊓ Associates.mk b ≠ 1\nhz : ↑(factors' a ⊓ factors' b) ≠ 0\np : α\np0_irr : Irreducible (Associates.mk p)\np0_mem : { val := Associates.mk p, property := p0_irr } ∈ factors' a ∩ factors' b\n⊢ Associates.mk p ≤ Associates.mk b\n[PROOFSTEP]\napply dvd_of_mem_factors' (Multiset.mem_inter.mp p0_mem).right\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : α\nha : a ≠ 0\nhb : b ≠ 0\nh : Associates.mk a ⊓ Associates.mk b ≠ 1\nhz : ↑(factors' a ⊓ factors' b) ≠ 0\np : α\np0_irr : Irreducible (Associates.mk p)\np0_mem : { val := Associates.mk p, property := p0_irr } ∈ factors' a ∩ factors' b\n⊢ b ≠ 0\n[PROOFSTEP]\napply hb\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : α\nha0 : a ≠ 0\nhb0 : b ≠ 0\n⊢ Associates.mk a ⊓ Associates.mk b = 1 ↔ ∀ {d : α}, d ∣ a → d ∣ b → ¬Prime d\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : α\nha0 : a ≠ 0\nhb0 : b ≠ 0\n⊢ Associates.mk a ⊓ Associates.mk b = 1 → ∀ {d : α}, d ∣ a → d ∣ b → ¬Prime d\n[PROOFSTEP]\nintro hg p ha hb hp\n[GOAL]\ncase mp\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : α\nha0 : a ≠ 0\nhb0 : b ≠ 0\nhg : Associates.mk a ⊓ Associates.mk b = 1\np : α\nha : p ∣ a\nhb : p ∣ b\nhp : Prime p\n⊢ False\n[PROOFSTEP]\nrefine' ((Associates.prime_mk _).mpr hp).not_unit (isUnit_of_dvd_one _)\n[GOAL]\ncase mp\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : α\nha0 : a ≠ 0\nhb0 : b ≠ 0\nhg : Associates.mk a ⊓ Associates.mk b = 1\np : α\nha : p ∣ a\nhb : p ∣ b\nhp : Prime p\n⊢ Associates.mk p ∣ 1\n[PROOFSTEP]\nrw [← hg]\n[GOAL]\ncase mp\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : α\nha0 : a ≠ 0\nhb0 : b ≠ 0\nhg : Associates.mk a ⊓ Associates.mk b = 1\np : α\nha : p ∣ a\nhb : p ∣ b\nhp : Prime p\n⊢ Associates.mk p ∣ Associates.mk a ⊓ Associates.mk b\n[PROOFSTEP]\nexact le_inf (mk_le_mk_of_dvd ha) (mk_le_mk_of_dvd hb)\n[GOAL]\ncase mpr\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : α\nha0 : a ≠ 0\nhb0 : b ≠ 0\n⊢ (∀ {d : α}, d ∣ a → d ∣ b → ¬Prime d) → Associates.mk a ⊓ Associates.mk b = 1\n[PROOFSTEP]\ncontrapose\n[GOAL]\ncase mpr\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : α\nha0 : a ≠ 0\nhb0 : b ≠ 0\n⊢ ¬Associates.mk a ⊓ Associates.mk b = 1 → ¬∀ {d : α}, d ∣ a → d ∣ b → ¬Prime d\n[PROOFSTEP]\nintro hg hc\n[GOAL]\ncase mpr\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : α\nha0 : a ≠ 0\nhb0 : b ≠ 0\nhg : ¬Associates.mk a ⊓ Associates.mk b = 1\nhc : ∀ {d : α}, d ∣ a → d ∣ b → ¬Prime d\n⊢ False\n[PROOFSTEP]\nobtain ⟨p, hp, hpa, hpb⟩ := exists_prime_dvd_of_not_inf_one ha0 hb0 hg\n[GOAL]\ncase mpr.intro.intro.intro\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : α\nha0 : a ≠ 0\nhb0 : b ≠ 0\nhg : ¬Associates.mk a ⊓ Associates.mk b = 1\nhc : ∀ {d : α}, d ∣ a → d ∣ b → ¬Prime d\np : α\nhp : Prime p\nhpa : p ∣ a\nhpb : p ∣ b\n⊢ False\n[PROOFSTEP]\nexact hc hpa hpb hp\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\np : Associates α\nhp : Irreducible p\n⊢ FactorSet.prod (factors p) = FactorSet.prod (some {{ val := p, property := hp }})\n[PROOFSTEP]\nrw [factors_prod, FactorSet.prod]\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\np : Associates α\nhp : Irreducible p\n⊢ p =\n match some {{ val := p, property := hp }} with\n | none => 0\n | some s => prod (map Subtype.val s)\n[PROOFSTEP]\ndsimp\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\np : Associates α\nhp : Irreducible p\n⊢ p = prod {p}\n[PROOFSTEP]\nrw [prod_singleton]\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\np : Associates α\nhp : Irreducible p\nk : ℕ\n⊢ FactorSet.prod (factors (p ^ k)) = FactorSet.prod (some (replicate k { val := p, property := hp }))\n[PROOFSTEP]\nrw [Associates.factors_prod, FactorSet.prod]\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\np : Associates α\nhp : Irreducible p\nk : ℕ\n⊢ p ^ k =\n match some (replicate k { val := p, property := hp }) with\n | none => 0\n | some s => prod (map Subtype.val s)\n[PROOFSTEP]\ndsimp\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\np : Associates α\nhp : Irreducible p\nk : ℕ\n⊢ p ^ k = prod (map Subtype.val (replicate k { val := p, property := hp }))\n[PROOFSTEP]\nrw [Multiset.map_replicate, Multiset.prod_replicate, Subtype.coe_mk]\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\nm p : Associates α\nh₁ : m ≠ 0\nh₂ : Irreducible p\nk : ℕ\n⊢ p ^ k ≤ m ↔ k ≤ count p (factors m)\n[PROOFSTEP]\nobtain ⟨a, nz, rfl⟩ := Associates.exists_non_zero_rep h₁\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\np : Associates α\nh₂ : Irreducible p\nk : ℕ\na : α\nnz : a ≠ 0\nh₁ : Associates.mk a ≠ 0\n⊢ p ^ k ≤ Associates.mk a ↔ k ≤ count p (factors (Associates.mk a))\n[PROOFSTEP]\nrw [factors_mk _ nz, ← WithTop.some_eq_coe, count_some, Multiset.le_count_iff_replicate_le, ← factors_le,\n factors_prime_pow h₂, factors_mk _ nz]\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\np : Associates α\nh₂ : Irreducible p\nk : ℕ\na : α\nnz : a ≠ 0\nh₁ : Associates.mk a ≠ 0\n⊢ some (replicate k { val := p, property := h₂ }) ≤ ↑(factors' a) ↔\n replicate k { val := p, property := ?intro.intro.hp } ≤ factors' a\ncase intro.intro.hp\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\np : Associates α\nh₂ : Irreducible p\nk : ℕ\na : α\nnz : a ≠ 0\nh₁ : Associates.mk a ≠ 0\n⊢ Irreducible p\ncase intro.intro.hp\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\np : Associates α\nh₂ : Irreducible p\nk : ℕ\na : α\nnz : a ≠ 0\nh₁ : Associates.mk a ≠ 0\n⊢ Irreducible p\ncase intro.intro.hp\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\np : Associates α\nh₂ : Irreducible p\nk : ℕ\na : α\nnz : a ≠ 0\nh₁ : Associates.mk a ≠ 0\n⊢ Irreducible p\ncase intro.intro.hp\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\np : Associates α\nh₂ : Irreducible p\nk : ℕ\na : α\nnz : a ≠ 0\nh₁ : Associates.mk a ≠ 0\n⊢ Irreducible p\ncase intro.intro.hp\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\np : Associates α\nh₂ : Irreducible p\nk : ℕ\na : α\nnz : a ≠ 0\nh₁ : Associates.mk a ≠ 0\n⊢ Irreducible p\n[PROOFSTEP]\nexact WithTop.coe_le_coe\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\nm p : Associates α\nh0 : m ≠ 0\nhp : Irreducible p\n⊢ count p (factors m) ≠ 0 → p ≤ m\n[PROOFSTEP]\nnontriviality α\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\nm p : Associates α\nh0 : m ≠ 0\nhp : Irreducible p\n✝ : Nontrivial α\n⊢ count p (factors m) ≠ 0 → p ≤ m\n[PROOFSTEP]\nrw [← pos_iff_ne_zero]\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\nm p : Associates α\nh0 : m ≠ 0\nhp : Irreducible p\n✝ : Nontrivial α\n⊢ 0 < count p (factors m) → p ≤ m\n[PROOFSTEP]\nintro h\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\nm p : Associates α\nh0 : m ≠ 0\nhp : Irreducible p\n✝ : Nontrivial α\nh : 0 < count p (factors m)\n⊢ p ≤ m\n[PROOFSTEP]\nrw [← pow_one p]\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\nm p : Associates α\nh0 : m ≠ 0\nhp : Irreducible p\n✝ : Nontrivial α\nh : 0 < count p (factors m)\n⊢ p ^ 1 ≤ m\n[PROOFSTEP]\napply (prime_pow_dvd_iff_le h0 hp).2\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\nm p : Associates α\nh0 : m ≠ 0\nhp : Irreducible p\n✝ : Nontrivial α\nh : 0 < count p (factors m)\n⊢ 1 ≤ count p (factors m)\n[PROOFSTEP]\nsimpa only\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na p : α\nha0 : a ≠ 0\nhp : Irreducible p\n⊢ count (Associates.mk p) (factors (Associates.mk a)) ≠ 0 ↔ p ∣ a\n[PROOFSTEP]\nnontriviality α\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na p : α\nha0 : a ≠ 0\nhp : Irreducible p\ninst✝ : Nontrivial α\n⊢ count (Associates.mk p) (factors (Associates.mk a)) ≠ 0 ↔ p ∣ a\n[PROOFSTEP]\nrw [← Associates.mk_le_mk_iff_dvd_iff]\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na p : α\nha0 : a ≠ 0\nhp : Irreducible p\ninst✝ : Nontrivial α\n⊢ count (Associates.mk p) (factors (Associates.mk a)) ≠ 0 ↔ Associates.mk p ≤ Associates.mk a\n[PROOFSTEP]\nrefine'\n ⟨fun h => Associates.le_of_count_ne_zero (Associates.mk_ne_zero.mpr ha0) ((Associates.irreducible_mk p).mpr hp) h,\n fun h => _⟩\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na p : α\nha0 : a ≠ 0\nhp : Irreducible p\ninst✝ : Nontrivial α\nh : Associates.mk p ≤ Associates.mk a\n⊢ count (Associates.mk p) (factors (Associates.mk a)) ≠ 0\n[PROOFSTEP]\nrw [← pow_one (Associates.mk p),\n Associates.prime_pow_dvd_iff_le (Associates.mk_ne_zero.mpr ha0) ((Associates.irreducible_mk p).mpr hp)] at h \n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na p : α\nha0 : a ≠ 0\nhp : Irreducible p\ninst✝ : Nontrivial α\nh : 1 ≤ count (Associates.mk p) (factors (Associates.mk a))\n⊢ count (Associates.mk p) (factors (Associates.mk a)) ≠ 0\n[PROOFSTEP]\nexact (zero_lt_one.trans_le h).ne'\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\np : Associates α\nhp : Irreducible p\n⊢ count p (factors p) = 1\n[PROOFSTEP]\nsimp [factors_self hp, Associates.count_some hp]\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\np q : Associates α\nhp : Irreducible p\nhq : Irreducible q\nh : p ≠ q\nh' : count p (factors q) ≠ 0\n⊢ p ∣ q\n[PROOFSTEP]\nnontriviality α\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\np q : Associates α\nhp : Irreducible p\nhq : Irreducible q\nh : p ≠ q\nh' : count p (factors q) ≠ 0\n✝ : Nontrivial α\n⊢ p ∣ q\n[PROOFSTEP]\nexact le_of_count_ne_zero hq.ne_zero hp h'\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na : Associates α\nha : a ≠ 0\nb : Associates α\nhb : b ≠ 0\np : Associates α\nhp : Irreducible p\n⊢ count p (factors (a * b)) = count p (factors a) + count p (factors b)\n[PROOFSTEP]\nobtain ⟨a0, nza, ha'⟩ := exists_non_zero_rep ha\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na : Associates α\nha : a ≠ 0\nb : Associates α\nhb : b ≠ 0\np : Associates α\nhp : Irreducible p\na0 : α\nnza : a0 ≠ 0\nha' : Associates.mk a0 = a\n⊢ count p (factors (a * b)) = count p (factors a) + count p (factors b)\n[PROOFSTEP]\nobtain ⟨b0, nzb, hb'⟩ := exists_non_zero_rep hb\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na : Associates α\nha : a ≠ 0\nb : Associates α\nhb : b ≠ 0\np : Associates α\nhp : Irreducible p\na0 : α\nnza : a0 ≠ 0\nha' : Associates.mk a0 = a\nb0 : α\nnzb : b0 ≠ 0\nhb' : Associates.mk b0 = b\n⊢ count p (factors (a * b)) = count p (factors a) + count p (factors b)\n[PROOFSTEP]\nrw [factors_mul, ← ha', ← hb', factors_mk a0 nza, factors_mk b0 nzb, ← FactorSet.coe_add, ← WithTop.some_eq_coe, ←\n WithTop.some_eq_coe, ← WithTop.some_eq_coe, count_some hp, Multiset.count_add, count_some hp, count_some hp]\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na : Associates α\nha : a ≠ 0\nb : Associates α\nhb : b ≠ 0\nhab : ∀ (d : Associates α), d ∣ a → d ∣ b → ¬Prime d\np : Associates α\nhp : Irreducible p\n⊢ count p (factors a) = 0 ∨ count p (factors b) = 0\n[PROOFSTEP]\nrw [or_iff_not_imp_left, ← Ne.def]\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na : Associates α\nha : a ≠ 0\nb : Associates α\nhb : b ≠ 0\nhab : ∀ (d : Associates α), d ∣ a → d ∣ b → ¬Prime d\np : Associates α\nhp : Irreducible p\n⊢ count p (factors a) ≠ 0 → count p (factors b) = 0\n[PROOFSTEP]\nintro hca\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na : Associates α\nha : a ≠ 0\nb : Associates α\nhb : b ≠ 0\nhab : ∀ (d : Associates α), d ∣ a → d ∣ b → ¬Prime d\np : Associates α\nhp : Irreducible p\nhca : count p (factors a) ≠ 0\n⊢ count p (factors b) = 0\n[PROOFSTEP]\ncontrapose! hab with hcb\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na : Associates α\nha : a ≠ 0\nb : Associates α\nhb : b ≠ 0\np : Associates α\nhp : Irreducible p\nhca : count p (factors a) ≠ 0\nhcb : count p (factors b) ≠ 0\n⊢ ∃ d, d ∣ a ∧ d ∣ b ∧ Prime d\n[PROOFSTEP]\nexact ⟨p, le_of_count_ne_zero ha hp hca, le_of_count_ne_zero hb hp hcb, irreducible_iff_prime.mp hp⟩\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : Associates α\nhb : b ≠ 0\np : Associates α\nhp : Irreducible p\nhab : ∀ (d : Associates α), d ∣ a → d ∣ b → ¬Prime d\n⊢ count p (factors a) = 0 ∨ count p (factors a) = count p (factors (a * b))\n[PROOFSTEP]\nby_cases ha : a = 0\n[GOAL]\ncase pos\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : Associates α\nhb : b ≠ 0\np : Associates α\nhp : Irreducible p\nhab : ∀ (d : Associates α), d ∣ a → d ∣ b → ¬Prime d\nha : a = 0\n⊢ count p (factors a) = 0 ∨ count p (factors a) = count p (factors (a * b))\n[PROOFSTEP]\nsimp [ha]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : Associates α\nhb : b ≠ 0\np : Associates α\nhp : Irreducible p\nhab : ∀ (d : Associates α), d ∣ a → d ∣ b → ¬Prime d\nha : ¬a = 0\n⊢ count p (factors a) = 0 ∨ count p (factors a) = count p (factors (a * b))\n[PROOFSTEP]\ncases' count_of_coprime ha hb hab hp with hz hb0\n[GOAL]\ncase neg.inl\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : Associates α\nhb : b ≠ 0\np : Associates α\nhp : Irreducible p\nhab : ∀ (d : Associates α), d ∣ a → d ∣ b → ¬Prime d\nha : ¬a = 0\nhz : count p (factors a) = 0\n⊢ count p (factors a) = 0 ∨ count p (factors a) = count p (factors (a * b))\n[PROOFSTEP]\ntauto\n[GOAL]\ncase neg.inr\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : Associates α\nhb : b ≠ 0\np : Associates α\nhp : Irreducible p\nhab : ∀ (d : Associates α), d ∣ a → d ∣ b → ¬Prime d\nha : ¬a = 0\nhb0 : count p (factors b) = 0\n⊢ count p (factors a) = 0 ∨ count p (factors a) = count p (factors (a * b))\n[PROOFSTEP]\napply Or.intro_right\n[GOAL]\ncase neg.inr.h\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : Associates α\nhb : b ≠ 0\np : Associates α\nhp : Irreducible p\nhab : ∀ (d : Associates α), d ∣ a → d ∣ b → ¬Prime d\nha : ¬a = 0\nhb0 : count p (factors b) = 0\n⊢ count p (factors a) = count p (factors (a * b))\n[PROOFSTEP]\nrw [count_mul ha hb hp, hb0, add_zero]\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b p : Associates α\nhp : Irreducible p\nhab : ∀ (d : Associates α), d ∣ a → d ∣ b → ¬Prime d\n⊢ count p (factors (a * b)) = count p (factors a) ∨ count p (factors (a * b)) = count p (factors b)\n[PROOFSTEP]\nby_cases ha : a = 0\n[GOAL]\ncase pos\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b p : Associates α\nhp : Irreducible p\nhab : ∀ (d : Associates α), d ∣ a → d ∣ b → ¬Prime d\nha : a = 0\n⊢ count p (factors (a * b)) = count p (factors a) ∨ count p (factors (a * b)) = count p (factors b)\n[PROOFSTEP]\nsimp [ha]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b p : Associates α\nhp : Irreducible p\nhab : ∀ (d : Associates α), d ∣ a → d ∣ b → ¬Prime d\nha : ¬a = 0\n⊢ count p (factors (a * b)) = count p (factors a) ∨ count p (factors (a * b)) = count p (factors b)\n[PROOFSTEP]\nby_cases hb : b = 0\n[GOAL]\ncase pos\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b p : Associates α\nhp : Irreducible p\nhab : ∀ (d : Associates α), d ∣ a → d ∣ b → ¬Prime d\nha : ¬a = 0\nhb : b = 0\n⊢ count p (factors (a * b)) = count p (factors a) ∨ count p (factors (a * b)) = count p (factors b)\n[PROOFSTEP]\nsimp [hb]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b p : Associates α\nhp : Irreducible p\nhab : ∀ (d : Associates α), d ∣ a → d ∣ b → ¬Prime d\nha : ¬a = 0\nhb : ¬b = 0\n⊢ count p (factors (a * b)) = count p (factors a) ∨ count p (factors (a * b)) = count p (factors b)\n[PROOFSTEP]\nrw [count_mul ha hb hp]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b p : Associates α\nhp : Irreducible p\nhab : ∀ (d : Associates α), d ∣ a → d ∣ b → ¬Prime d\nha : ¬a = 0\nhb : ¬b = 0\n⊢ count p (factors a) + count p (factors b) = count p (factors a) ∨\n count p (factors a) + count p (factors b) = count p (factors b)\n[PROOFSTEP]\ncases' count_of_coprime ha hb hab hp with ha0 hb0\n[GOAL]\ncase neg.inl\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b p : Associates α\nhp : Irreducible p\nhab : ∀ (d : Associates α), d ∣ a → d ∣ b → ¬Prime d\nha : ¬a = 0\nhb : ¬b = 0\nha0 : count p (factors a) = 0\n⊢ count p (factors a) + count p (factors b) = count p (factors a) ∨\n count p (factors a) + count p (factors b) = count p (factors b)\n[PROOFSTEP]\napply Or.intro_right\n[GOAL]\ncase neg.inl.h\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b p : Associates α\nhp : Irreducible p\nhab : ∀ (d : Associates α), d ∣ a → d ∣ b → ¬Prime d\nha : ¬a = 0\nhb : ¬b = 0\nha0 : count p (factors a) = 0\n⊢ count p (factors a) + count p (factors b) = count p (factors b)\n[PROOFSTEP]\nrw [ha0, zero_add]\n[GOAL]\ncase neg.inr\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b p : Associates α\nhp : Irreducible p\nhab : ∀ (d : Associates α), d ∣ a → d ∣ b → ¬Prime d\nha : ¬a = 0\nhb : ¬b = 0\nhb0 : count p (factors b) = 0\n⊢ count p (factors a) + count p (factors b) = count p (factors a) ∨\n count p (factors a) + count p (factors b) = count p (factors b)\n[PROOFSTEP]\napply Or.intro_left\n[GOAL]\ncase neg.inr.h\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b p : Associates α\nhp : Irreducible p\nhab : ∀ (d : Associates α), d ∣ a → d ∣ b → ¬Prime d\nha : ¬a = 0\nhb : ¬b = 0\nhb0 : count p (factors b) = 0\n⊢ count p (factors a) + count p (factors b) = count p (factors a)\n[PROOFSTEP]\nrw [hb0, add_zero]\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : Associates α\nhb : b ≠ 0\np : Associates α\nhp : Irreducible p\nhab : ∀ (d : Associates α), d ∣ a → d ∣ b → ¬Prime d\nk : ℕ\nhabk : k ∣ count p (factors (a * b))\n⊢ k ∣ count p (factors a)\n[PROOFSTEP]\nby_cases ha : a = 0\n[GOAL]\ncase pos\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : Associates α\nhb : b ≠ 0\np : Associates α\nhp : Irreducible p\nhab : ∀ (d : Associates α), d ∣ a → d ∣ b → ¬Prime d\nk : ℕ\nhabk : k ∣ count p (factors (a * b))\nha : a = 0\n⊢ k ∣ count p (factors a)\n[PROOFSTEP]\nsimpa [*] using habk\n[GOAL]\ncase neg\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : Associates α\nhb : b ≠ 0\np : Associates α\nhp : Irreducible p\nhab : ∀ (d : Associates α), d ∣ a → d ∣ b → ¬Prime d\nk : ℕ\nhabk : k ∣ count p (factors (a * b))\nha : ¬a = 0\n⊢ k ∣ count p (factors a)\n[PROOFSTEP]\ncases' count_of_coprime ha hb hab hp with hz h\n[GOAL]\ncase neg.inl\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : Associates α\nhb : b ≠ 0\np : Associates α\nhp : Irreducible p\nhab : ∀ (d : Associates α), d ∣ a → d ∣ b → ¬Prime d\nk : ℕ\nhabk : k ∣ count p (factors (a * b))\nha : ¬a = 0\nhz : count p (factors a) = 0\n⊢ k ∣ count p (factors a)\n[PROOFSTEP]\nrw [hz]\n[GOAL]\ncase neg.inl\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : Associates α\nhb : b ≠ 0\np : Associates α\nhp : Irreducible p\nhab : ∀ (d : Associates α), d ∣ a → d ∣ b → ¬Prime d\nk : ℕ\nhabk : k ∣ count p (factors (a * b))\nha : ¬a = 0\nhz : count p (factors a) = 0\n⊢ k ∣ 0\n[PROOFSTEP]\nexact dvd_zero k\n[GOAL]\ncase neg.inr\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : Associates α\nhb : b ≠ 0\np : Associates α\nhp : Irreducible p\nhab : ∀ (d : Associates α), d ∣ a → d ∣ b → ¬Prime d\nk : ℕ\nhabk : k ∣ count p (factors (a * b))\nha : ¬a = 0\nh : count p (factors b) = 0\n⊢ k ∣ count p (factors a)\n[PROOFSTEP]\nrw [count_mul ha hb hp, h] at habk \n[GOAL]\ncase neg.inr\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na b : Associates α\nhb : b ≠ 0\np : Associates α\nhp : Irreducible p\nhab : ∀ (d : Associates α), d ∣ a → d ∣ b → ¬Prime d\nk : ℕ\nhabk : k ∣ count p (factors a) + 0\nha : ¬a = 0\nh : count p (factors b) = 0\n⊢ k ∣ count p (factors a)\n[PROOFSTEP]\nexact habk\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\n⊢ factors 1 = 0\n[PROOFSTEP]\napply eq_of_prod_eq_prod\n[GOAL]\ncase h\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\n⊢ FactorSet.prod (factors 1) = FactorSet.prod 0\n[PROOFSTEP]\nrw [Associates.factors_prod]\n[GOAL]\ncase h\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\n⊢ 1 = FactorSet.prod 0\n[PROOFSTEP]\nexact Multiset.prod_zero\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\na : Associates α\nk : ℕ\n⊢ factors (a ^ k) = k • factors a\n[PROOFSTEP]\ninduction' k with n h\n[GOAL]\ncase zero\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\na : Associates α\n⊢ factors (a ^ Nat.zero) = Nat.zero • factors a\n[PROOFSTEP]\nrw [zero_nsmul, pow_zero]\n[GOAL]\ncase zero\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\na : Associates α\n⊢ factors 1 = 0\n[PROOFSTEP]\nexact factors_one\n[GOAL]\ncase succ\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\na : Associates α\nn : ℕ\nh : factors (a ^ n) = n • factors a\n⊢ factors (a ^ Nat.succ n) = Nat.succ n • factors a\n[PROOFSTEP]\nrw [pow_succ, succ_nsmul, factors_mul, h]\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\na : Associates α\nha : a ≠ 0\np : Associates α\nhp : Irreducible p\nk : ℕ\n⊢ count p (factors (a ^ k)) = k * count p (factors a)\n[PROOFSTEP]\ninduction' k with n h\n[GOAL]\ncase zero\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\na : Associates α\nha : a ≠ 0\np : Associates α\nhp : Irreducible p\n⊢ count p (factors (a ^ Nat.zero)) = Nat.zero * count p (factors a)\n[PROOFSTEP]\nrw [pow_zero, factors_one, Nat.zero_eq, zero_mul, count_zero hp]\n[GOAL]\ncase succ\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\na : Associates α\nha : a ≠ 0\np : Associates α\nhp : Irreducible p\nn : ℕ\nh : count p (factors (a ^ n)) = n * count p (factors a)\n⊢ count p (factors (a ^ Nat.succ n)) = Nat.succ n * count p (factors a)\n[PROOFSTEP]\nrw [pow_succ, count_mul ha (pow_ne_zero _ ha) hp, h, Nat.succ_eq_add_one]\n[GOAL]\ncase succ\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\na : Associates α\nha : a ≠ 0\np : Associates α\nhp : Irreducible p\nn : ℕ\nh : count p (factors (a ^ n)) = n * count p (factors a)\n⊢ count p (factors a) + n * count p (factors a) = (n + 1) * count p (factors a)\n[PROOFSTEP]\nring\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\na : Associates α\nha : a ≠ 0\np : Associates α\nhp : Irreducible p\nk : ℕ\n⊢ k ∣ count p (factors (a ^ k))\n[PROOFSTEP]\nrw [count_pow ha hp]\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\na : Associates α\nha : a ≠ 0\np : Associates α\nhp : Irreducible p\nk : ℕ\n⊢ k ∣ k * count p (factors a)\n[PROOFSTEP]\napply dvd_mul_right\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\na : Associates α\nha : a ≠ 0\nk : ℕ\nhk : ∀ (p : Associates α), Irreducible p → k ∣ count p (factors a)\n⊢ ∃ b, a = b ^ k\n[PROOFSTEP]\nobtain ⟨a0, hz, rfl⟩ := exists_non_zero_rep ha\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\nk : ℕ\na0 : α\nhz : a0 ≠ 0\nha : Associates.mk a0 ≠ 0\nhk : ∀ (p : Associates α), Irreducible p → k ∣ count p (factors (Associates.mk a0))\n⊢ ∃ b, Associates.mk a0 = b ^ k\n[PROOFSTEP]\nrw [factors_mk a0 hz] at hk \n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\nk : ℕ\na0 : α\nhz : a0 ≠ 0\nha : Associates.mk a0 ≠ 0\nhk : ∀ (p : Associates α), Irreducible p → k ∣ count p ↑(factors' a0)\n⊢ ∃ b, Associates.mk a0 = b ^ k\n[PROOFSTEP]\nhave hk' : ∀ p, p ∈ factors' a0 → k ∣ (factors' a0).count p :=\n by\n rintro p -\n have pp : p = ⟨p.val, p.2⟩ := by simp only [Subtype.coe_eta]\n rw [pp, ← count_some p.2]\n exact hk p.val p.2\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\nk : ℕ\na0 : α\nhz : a0 ≠ 0\nha : Associates.mk a0 ≠ 0\nhk : ∀ (p : Associates α), Irreducible p → k ∣ count p ↑(factors' a0)\n⊢ ∀ (p : { a // Irreducible a }), p ∈ factors' a0 → k ∣ Multiset.count p (factors' a0)\n[PROOFSTEP]\nrintro p -\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\nk : ℕ\na0 : α\nhz : a0 ≠ 0\nha : Associates.mk a0 ≠ 0\nhk : ∀ (p : Associates α), Irreducible p → k ∣ count p ↑(factors' a0)\np : { a // Irreducible a }\n⊢ k ∣ Multiset.count p (factors' a0)\n[PROOFSTEP]\nhave pp : p = ⟨p.val, p.2⟩ := by simp only [Subtype.coe_eta]\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\nk : ℕ\na0 : α\nhz : a0 ≠ 0\nha : Associates.mk a0 ≠ 0\nhk : ∀ (p : Associates α), Irreducible p → k ∣ count p ↑(factors' a0)\np : { a // Irreducible a }\n⊢ p = { val := ↑p, property := (_ : Irreducible ↑p) }\n[PROOFSTEP]\nsimp only [Subtype.coe_eta]\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\nk : ℕ\na0 : α\nhz : a0 ≠ 0\nha : Associates.mk a0 ≠ 0\nhk : ∀ (p : Associates α), Irreducible p → k ∣ count p ↑(factors' a0)\np : { a // Irreducible a }\npp : p = { val := ↑p, property := (_ : Irreducible ↑p) }\n⊢ k ∣ Multiset.count p (factors' a0)\n[PROOFSTEP]\nrw [pp, ← count_some p.2]\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\nk : ℕ\na0 : α\nhz : a0 ≠ 0\nha : Associates.mk a0 ≠ 0\nhk : ∀ (p : Associates α), Irreducible p → k ∣ count p ↑(factors' a0)\np : { a // Irreducible a }\npp : p = { val := ↑p, property := (_ : Irreducible ↑p) }\n⊢ k ∣ count (↑p) (some (factors' a0))\n[PROOFSTEP]\nexact hk p.val p.2\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\nk : ℕ\na0 : α\nhz : a0 ≠ 0\nha : Associates.mk a0 ≠ 0\nhk : ∀ (p : Associates α), Irreducible p → k ∣ count p ↑(factors' a0)\nhk' : ∀ (p : { a // Irreducible a }), p ∈ factors' a0 → k ∣ Multiset.count p (factors' a0)\n⊢ ∃ b, Associates.mk a0 = b ^ k\n[PROOFSTEP]\nobtain ⟨u, hu⟩ := Multiset.exists_smul_of_dvd_count _ hk'\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\nk : ℕ\na0 : α\nhz : a0 ≠ 0\nha : Associates.mk a0 ≠ 0\nhk : ∀ (p : Associates α), Irreducible p → k ∣ count p ↑(factors' a0)\nhk' : ∀ (p : { a // Irreducible a }), p ∈ factors' a0 → k ∣ Multiset.count p (factors' a0)\nu : Multiset { a // Irreducible a }\nhu : factors' a0 = k • u\n⊢ ∃ b, Associates.mk a0 = b ^ k\n[PROOFSTEP]\nuse FactorSet.prod (u : FactorSet α)\n[GOAL]\ncase h\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\nk : ℕ\na0 : α\nhz : a0 ≠ 0\nha : Associates.mk a0 ≠ 0\nhk : ∀ (p : Associates α), Irreducible p → k ∣ count p ↑(factors' a0)\nhk' : ∀ (p : { a // Irreducible a }), p ∈ factors' a0 → k ∣ Multiset.count p (factors' a0)\nu : Multiset { a // Irreducible a }\nhu : factors' a0 = k • u\n⊢ Associates.mk a0 = FactorSet.prod ↑u ^ k\n[PROOFSTEP]\napply eq_of_factors_eq_factors\n[GOAL]\ncase h.h\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\nk : ℕ\na0 : α\nhz : a0 ≠ 0\nha : Associates.mk a0 ≠ 0\nhk : ∀ (p : Associates α), Irreducible p → k ∣ count p ↑(factors' a0)\nhk' : ∀ (p : { a // Irreducible a }), p ∈ factors' a0 → k ∣ Multiset.count p (factors' a0)\nu : Multiset { a // Irreducible a }\nhu : factors' a0 = k • u\n⊢ factors (Associates.mk a0) = factors (FactorSet.prod ↑u ^ k)\n[PROOFSTEP]\nrw [pow_factors, prod_factors, factors_mk a0 hz, ← WithTop.some_eq_coe, hu]\n[GOAL]\ncase h.h\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\nk : ℕ\na0 : α\nhz : a0 ≠ 0\nha : Associates.mk a0 ≠ 0\nhk : ∀ (p : Associates α), Irreducible p → k ∣ count p ↑(factors' a0)\nhk' : ∀ (p : { a // Irreducible a }), p ∈ factors' a0 → k ∣ Multiset.count p (factors' a0)\nu : Multiset { a // Irreducible a }\nhu : factors' a0 = k • u\n⊢ some (k • u) = k • ↑u\n[PROOFSTEP]\nexact WithBot.coe_nsmul u k\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\np a : Associates α\nhp : Irreducible p\nn : ℕ\nh : a ∣ p ^ n\n⊢ a = p ^ count p (factors a)\n[PROOFSTEP]\nnontriviality α\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\np a : Associates α\nhp : Irreducible p\nn : ℕ\nh : a ∣ p ^ n\n✝ : Nontrivial α\n⊢ a = p ^ count p (factors a)\n[PROOFSTEP]\nhave hph := pow_ne_zero n hp.ne_zero\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\np a : Associates α\nhp : Irreducible p\nn : ℕ\nh : a ∣ p ^ n\n✝ : Nontrivial α\nhph : p ^ n ≠ 0\n⊢ a = p ^ count p (factors a)\n[PROOFSTEP]\nhave ha := ne_zero_of_dvd_ne_zero hph h\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\np a : Associates α\nhp : Irreducible p\nn : ℕ\nh : a ∣ p ^ n\n✝ : Nontrivial α\nhph : p ^ n ≠ 0\nha : a ≠ 0\n⊢ a = p ^ count p (factors a)\n[PROOFSTEP]\napply eq_of_eq_counts ha (pow_ne_zero _ hp.ne_zero)\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\np a : Associates α\nhp : Irreducible p\nn : ℕ\nh : a ∣ p ^ n\n✝ : Nontrivial α\nhph : p ^ n ≠ 0\nha : a ≠ 0\n⊢ ∀ (p_1 : Associates α), Irreducible p_1 → count p_1 (factors a) = count p_1 (factors (p ^ count p (factors a)))\n[PROOFSTEP]\nhave eq_zero_of_ne : ∀ q : Associates α, Irreducible q → q ≠ p → _ = 0 := fun q hq h' =>\n Nat.eq_zero_of_le_zero <| by\n convert count_le_count_of_le hph hq h\n symm\n rw [count_pow hp.ne_zero hq, count_eq_zero_of_ne hq hp h', mul_zero]\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\np a : Associates α\nhp : Irreducible p\nn : ℕ\nh : a ∣ p ^ n\n✝ : Nontrivial α\nhph : p ^ n ≠ 0\nha : a ≠ 0\nq : Associates α\nhq : Irreducible q\nh' : q ≠ p\n⊢ ?m.3109694 q ≤ 0\n[PROOFSTEP]\nconvert count_le_count_of_le hph hq h\n[GOAL]\ncase h.e'_4\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\np a : Associates α\nhp : Irreducible p\nn : ℕ\nh : a ∣ p ^ n\n✝ : Nontrivial α\nhph : p ^ n ≠ 0\nha : a ≠ 0\nq : Associates α\nhq : Irreducible q\nh' : q ≠ p\n⊢ 0 = count q (factors (p ^ n))\n[PROOFSTEP]\nsymm\n[GOAL]\ncase h.e'_4\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\np a : Associates α\nhp : Irreducible p\nn : ℕ\nh : a ∣ p ^ n\n✝ : Nontrivial α\nhph : p ^ n ≠ 0\nha : a ≠ 0\nq : Associates α\nhq : Irreducible q\nh' : q ≠ p\n⊢ count q (factors (p ^ n)) = 0\n[PROOFSTEP]\nrw [count_pow hp.ne_zero hq, count_eq_zero_of_ne hq hp h', mul_zero]\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\np a : Associates α\nhp : Irreducible p\nn : ℕ\nh : a ∣ p ^ n\n✝ : Nontrivial α\nhph : p ^ n ≠ 0\nha : a ≠ 0\neq_zero_of_ne : ∀ (q : Associates α), Irreducible q → q ≠ p → count q (factors a) = 0\n⊢ ∀ (p_1 : Associates α), Irreducible p_1 → count p_1 (factors a) = count p_1 (factors (p ^ count p (factors a)))\n[PROOFSTEP]\nintro q hq\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\np a : Associates α\nhp : Irreducible p\nn : ℕ\nh : a ∣ p ^ n\n✝ : Nontrivial α\nhph : p ^ n ≠ 0\nha : a ≠ 0\neq_zero_of_ne : ∀ (q : Associates α), Irreducible q → q ≠ p → count q (factors a) = 0\nq : Associates α\nhq : Irreducible q\n⊢ count q (factors a) = count q (factors (p ^ count p (factors a)))\n[PROOFSTEP]\nrw [count_pow hp.ne_zero hq]\n[GOAL]\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\np a : Associates α\nhp : Irreducible p\nn : ℕ\nh : a ∣ p ^ n\n✝ : Nontrivial α\nhph : p ^ n ≠ 0\nha : a ≠ 0\neq_zero_of_ne : ∀ (q : Associates α), Irreducible q → q ≠ p → count q (factors a) = 0\nq : Associates α\nhq : Irreducible q\n⊢ count q (factors a) = count p (factors a) * count q (factors p)\n[PROOFSTEP]\nby_cases h : q = p\n[GOAL]\ncase pos\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\np a : Associates α\nhp : Irreducible p\nn : ℕ\nh✝ : a ∣ p ^ n\n✝ : Nontrivial α\nhph : p ^ n ≠ 0\nha : a ≠ 0\neq_zero_of_ne : ∀ (q : Associates α), Irreducible q → q ≠ p → count q (factors a) = 0\nq : Associates α\nhq : Irreducible q\nh : q = p\n⊢ count q (factors a) = count p (factors a) * count q (factors p)\n[PROOFSTEP]\nrw [h, count_self hp, mul_one]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝¹ : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\np a : Associates α\nhp : Irreducible p\nn : ℕ\nh✝ : a ∣ p ^ n\n✝ : Nontrivial α\nhph : p ^ n ≠ 0\nha : a ≠ 0\neq_zero_of_ne : ∀ (q : Associates α), Irreducible q → q ≠ p → count q (factors a) = 0\nq : Associates α\nhq : Irreducible q\nh : ¬q = p\n⊢ count q (factors a) = count p (factors a) * count q (factors p)\n[PROOFSTEP]\nrw [count_eq_zero_of_ne hq hp h, mul_zero, eq_zero_of_ne q hq h]\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na p : Associates α\nhp : Irreducible p\ninst✝ : (n : ℕ) → Decidable (a ∣ p ^ n)\nn : ℕ\nh : a ∣ p ^ n\n⊢ Nat.find (_ : ∃ n, (fun n => a ∣ p ^ n) n) = count p (factors a)\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na p : Associates α\nhp : Irreducible p\ninst✝ : (n : ℕ) → Decidable (a ∣ p ^ n)\nn : ℕ\nh : a ∣ p ^ n\n⊢ Nat.find (_ : ∃ n, (fun n => a ∣ p ^ n) n) ≤ count p (factors a)\n[PROOFSTEP]\nrefine' Nat.find_le ⟨1, _⟩\n[GOAL]\ncase a\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na p : Associates α\nhp : Irreducible p\ninst✝ : (n : ℕ) → Decidable (a ∣ p ^ n)\nn : ℕ\nh : a ∣ p ^ n\n⊢ p ^ count p (factors a) = a * 1\n[PROOFSTEP]\nrw [mul_one]\n[GOAL]\ncase a\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na p : Associates α\nhp : Irreducible p\ninst✝ : (n : ℕ) → Decidable (a ∣ p ^ n)\nn : ℕ\nh : a ∣ p ^ n\n⊢ p ^ count p (factors a) = a\n[PROOFSTEP]\nsymm\n[GOAL]\ncase a\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na p : Associates α\nhp : Irreducible p\ninst✝ : (n : ℕ) → Decidable (a ∣ p ^ n)\nn : ℕ\nh : a ∣ p ^ n\n⊢ a = p ^ count p (factors a)\n[PROOFSTEP]\nexact eq_pow_count_factors_of_dvd_pow hp h\n[GOAL]\ncase a\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na p : Associates α\nhp : Irreducible p\ninst✝ : (n : ℕ) → Decidable (a ∣ p ^ n)\nn : ℕ\nh : a ∣ p ^ n\n⊢ count p (factors a) ≤ Nat.find (_ : ∃ n, (fun n => a ∣ p ^ n) n)\n[PROOFSTEP]\nhave hph := pow_ne_zero (@Nat.find (fun n => a ∣ p ^ n) _ ⟨n, h⟩) hp.ne_zero\n[GOAL]\ncase a\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na p : Associates α\nhp : Irreducible p\ninst✝ : (n : ℕ) → Decidable (a ∣ p ^ n)\nn : ℕ\nh : a ∣ p ^ n\nhph : p ^ Nat.find (_ : ∃ n, (fun n => a ∣ p ^ n) n) ≠ 0\n⊢ count p (factors a) ≤ Nat.find (_ : ∃ n, (fun n => a ∣ p ^ n) n)\n[PROOFSTEP]\ncases' subsingleton_or_nontrivial α with hα hα\n[GOAL]\ncase a.inl\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na p : Associates α\nhp : Irreducible p\ninst✝ : (n : ℕ) → Decidable (a ∣ p ^ n)\nn : ℕ\nh : a ∣ p ^ n\nhph : p ^ Nat.find (_ : ∃ n, (fun n => a ∣ p ^ n) n) ≠ 0\nhα : Subsingleton α\n⊢ count p (factors a) ≤ Nat.find (_ : ∃ n, (fun n => a ∣ p ^ n) n)\n[PROOFSTEP]\nsimp at hph \n[GOAL]\ncase a.inr\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na p : Associates α\nhp : Irreducible p\ninst✝ : (n : ℕ) → Decidable (a ∣ p ^ n)\nn : ℕ\nh : a ∣ p ^ n\nhph : p ^ Nat.find (_ : ∃ n, (fun n => a ∣ p ^ n) n) ≠ 0\nhα : Nontrivial α\n⊢ count p (factors a) ≤ Nat.find (_ : ∃ n, (fun n => a ∣ p ^ n) n)\n[PROOFSTEP]\nconvert count_le_count_of_le hph hp (@Nat.find_spec (fun n => a ∣ p ^ n) _ ⟨n, h⟩)\n[GOAL]\ncase h.e'_4\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na p : Associates α\nhp : Irreducible p\ninst✝ : (n : ℕ) → Decidable (a ∣ p ^ n)\nn : ℕ\nh : a ∣ p ^ n\nhph : p ^ Nat.find (_ : ∃ n, (fun n => a ∣ p ^ n) n) ≠ 0\nhα : Nontrivial α\n⊢ Nat.find (_ : ∃ n, (fun n => a ∣ p ^ n) n) = count p (factors (p ^ Nat.find (_ : ∃ n, (fun n => a ∣ p ^ n) n)))\n[PROOFSTEP]\nrw [count_pow hp.ne_zero hp, count_self hp, mul_one]\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\na b c : Associates α\nha : a ≠ 0\nhb : b ≠ 0\nhab : ∀ (d : Associates α), d ∣ a → d ∣ b → ¬Prime d\nk : ℕ\nh : a * b = c ^ k\n⊢ ∃ d, a = d ^ k\n[PROOFSTEP]\nclassical\nby_cases hk0 : k = 0\n· use 1\n rw [hk0, pow_zero] at h ⊢\n apply (mul_eq_one_iff.1 h).1\n· refine' is_pow_of_dvd_count ha _\n intro p hp\n apply dvd_count_of_dvd_count_mul hb hp hab\n rw [h]\n apply dvd_count_pow _ hp\n rintro rfl\n rw [zero_pow' _ hk0] at h \n cases mul_eq_zero.mp h <;> contradiction\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\na b c : Associates α\nha : a ≠ 0\nhb : b ≠ 0\nhab : ∀ (d : Associates α), d ∣ a → d ∣ b → ¬Prime d\nk : ℕ\nh : a * b = c ^ k\n⊢ ∃ d, a = d ^ k\n[PROOFSTEP]\nby_cases hk0 : k = 0\n[GOAL]\ncase pos\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\na b c : Associates α\nha : a ≠ 0\nhb : b ≠ 0\nhab : ∀ (d : Associates α), d ∣ a → d ∣ b → ¬Prime d\nk : ℕ\nh : a * b = c ^ k\nhk0 : k = 0\n⊢ ∃ d, a = d ^ k\n[PROOFSTEP]\nuse 1\n[GOAL]\ncase h\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\na b c : Associates α\nha : a ≠ 0\nhb : b ≠ 0\nhab : ∀ (d : Associates α), d ∣ a → d ∣ b → ¬Prime d\nk : ℕ\nh : a * b = c ^ k\nhk0 : k = 0\n⊢ a = 1 ^ k\n[PROOFSTEP]\nrw [hk0, pow_zero] at h ⊢\n[GOAL]\ncase h\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\na b c : Associates α\nha : a ≠ 0\nhb : b ≠ 0\nhab : ∀ (d : Associates α), d ∣ a → d ∣ b → ¬Prime d\nk : ℕ\nh : a * b = 1\nhk0 : k = 0\n⊢ a = 1\n[PROOFSTEP]\napply (mul_eq_one_iff.1 h).1\n[GOAL]\ncase neg\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\na b c : Associates α\nha : a ≠ 0\nhb : b ≠ 0\nhab : ∀ (d : Associates α), d ∣ a → d ∣ b → ¬Prime d\nk : ℕ\nh : a * b = c ^ k\nhk0 : ¬k = 0\n⊢ ∃ d, a = d ^ k\n[PROOFSTEP]\nrefine' is_pow_of_dvd_count ha _\n[GOAL]\ncase neg\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\na b c : Associates α\nha : a ≠ 0\nhb : b ≠ 0\nhab : ∀ (d : Associates α), d ∣ a → d ∣ b → ¬Prime d\nk : ℕ\nh : a * b = c ^ k\nhk0 : ¬k = 0\n⊢ ∀ (p : Associates α), Irreducible p → k ∣ count p (factors a)\n[PROOFSTEP]\nintro p hp\n[GOAL]\ncase neg\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\na b c : Associates α\nha : a ≠ 0\nhb : b ≠ 0\nhab : ∀ (d : Associates α), d ∣ a → d ∣ b → ¬Prime d\nk : ℕ\nh : a * b = c ^ k\nhk0 : ¬k = 0\np : Associates α\nhp : Irreducible p\n⊢ k ∣ count p (factors a)\n[PROOFSTEP]\napply dvd_count_of_dvd_count_mul hb hp hab\n[GOAL]\ncase neg\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\na b c : Associates α\nha : a ≠ 0\nhb : b ≠ 0\nhab : ∀ (d : Associates α), d ∣ a → d ∣ b → ¬Prime d\nk : ℕ\nh : a * b = c ^ k\nhk0 : ¬k = 0\np : Associates α\nhp : Irreducible p\n⊢ k ∣ count p (factors (a * b))\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\na b c : Associates α\nha : a ≠ 0\nhb : b ≠ 0\nhab : ∀ (d : Associates α), d ∣ a → d ∣ b → ¬Prime d\nk : ℕ\nh : a * b = c ^ k\nhk0 : ¬k = 0\np : Associates α\nhp : Irreducible p\n⊢ k ∣ count p (factors (c ^ k))\n[PROOFSTEP]\napply dvd_count_pow _ hp\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\na b c : Associates α\nha : a ≠ 0\nhb : b ≠ 0\nhab : ∀ (d : Associates α), d ∣ a → d ∣ b → ¬Prime d\nk : ℕ\nh : a * b = c ^ k\nhk0 : ¬k = 0\np : Associates α\nhp : Irreducible p\n⊢ c ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\na b : Associates α\nha : a ≠ 0\nhb : b ≠ 0\nhab : ∀ (d : Associates α), d ∣ a → d ∣ b → ¬Prime d\nk : ℕ\nhk0 : ¬k = 0\np : Associates α\nhp : Irreducible p\nh : a * b = 0 ^ k\n⊢ False\n[PROOFSTEP]\nrw [zero_pow' _ hk0] at h \n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\na b : Associates α\nha : a ≠ 0\nhb : b ≠ 0\nhab : ∀ (d : Associates α), d ∣ a → d ∣ b → ¬Prime d\nk : ℕ\nhk0 : ¬k = 0\np : Associates α\nhp : Irreducible p\nh : a * b = 0\n⊢ False\n[PROOFSTEP]\ncases mul_eq_zero.mp h\n[GOAL]\ncase inl\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\na b : Associates α\nha : a ≠ 0\nhb : b ≠ 0\nhab : ∀ (d : Associates α), d ∣ a → d ∣ b → ¬Prime d\nk : ℕ\nhk0 : ¬k = 0\np : Associates α\nhp : Irreducible p\nh : a * b = 0\nh✝ : a = 0\n⊢ False\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase inr\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\ninst✝ : Nontrivial α\na b : Associates α\nha : a ≠ 0\nhb : b ≠ 0\nhab : ∀ (d : Associates α), d ∣ a → d ∣ b → ¬Prime d\nk : ℕ\nhk0 : ¬k = 0\np : Associates α\nhp : Irreducible p\nh : a * b = 0\nh✝ : b = 0\n⊢ False\n[PROOFSTEP]\ncontradiction\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na p : Associates α\nhp : Irreducible p\ninst✝ : (n : ℕ) → Decidable (a ∣ p ^ n)\nn : ℕ\nh : a ∣ p ^ n\n⊢ a = p ^ Nat.find (_ : ∃ n, (fun n => a ∣ p ^ n) n)\n[PROOFSTEP]\nclassical rw [count_factors_eq_find_of_dvd_pow hp, ← eq_pow_count_factors_of_dvd_pow hp h]\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na p : Associates α\nhp : Irreducible p\ninst✝ : (n : ℕ) → Decidable (a ∣ p ^ n)\nn : ℕ\nh : a ∣ p ^ n\n⊢ a = p ^ Nat.find (_ : ∃ n, (fun n => a ∣ p ^ n) n)\n[PROOFSTEP]\nrw [count_factors_eq_find_of_dvd_pow hp, ← eq_pow_count_factors_of_dvd_pow hp h]\n[GOAL]\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na p : Associates α\nhp : Irreducible p\ninst✝ : (n : ℕ) → Decidable (a ∣ p ^ n)\nn : ℕ\nh : a ∣ p ^ n\n⊢ a ∣ p ^ ?m.3699339\nα : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ndec_irr : (p : Associates α) → Decidable (Irreducible p)\ninst✝¹ : UniqueFactorizationMonoid α\ndec : DecidableEq α\ndec' : DecidableEq (Associates α)\na p : Associates α\nhp : Irreducible p\ninst✝ : (n : ℕ) → Decidable (a ∣ p ^ n)\nn : ℕ\nh : a ∣ p ^ n\n⊢ ℕ\n[PROOFSTEP]\nexact h\n[GOAL]\nα✝ : Type u_1\nα : Type u_2\ninst✝ : CommMonoid α\na : Associates α\n⊢ Associates.mk (Quot.out a) = a\n[PROOFSTEP]\nrw [← quot_mk_eq_mk, Quot.out_eq]\n[GOAL]\nα✝ : Type u_1\nα : Type u_2\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : UniqueFactorizationMonoid α\ninst✝¹ : DecidableEq (Associates α)\ninst✝ : DecidableEq α\na b : α\n⊢ (fun a b => Quot.out (Associates.mk a ⊓ Associates.mk b)) a b ∣ a\n[PROOFSTEP]\nrw [← mk_dvd_mk, (Associates.mk a ⊓ Associates.mk b).quot_out, congr_fun₂ dvd_eq_le]\n[GOAL]\nα✝ : Type u_1\nα : Type u_2\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : UniqueFactorizationMonoid α\ninst✝¹ : DecidableEq (Associates α)\ninst✝ : DecidableEq α\na b : α\n⊢ Associates.mk a ⊓ Associates.mk b ≤ Associates.mk a\n[PROOFSTEP]\nexact inf_le_left\n[GOAL]\nα✝ : Type u_1\nα : Type u_2\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : UniqueFactorizationMonoid α\ninst✝¹ : DecidableEq (Associates α)\ninst✝ : DecidableEq α\na b : α\n⊢ (fun a b => Quot.out (Associates.mk a ⊓ Associates.mk b)) a b ∣ b\n[PROOFSTEP]\nrw [← mk_dvd_mk, (Associates.mk a ⊓ Associates.mk b).quot_out, congr_fun₂ dvd_eq_le]\n[GOAL]\nα✝ : Type u_1\nα : Type u_2\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : UniqueFactorizationMonoid α\ninst✝¹ : DecidableEq (Associates α)\ninst✝ : DecidableEq α\na b : α\n⊢ Associates.mk a ⊓ Associates.mk b ≤ Associates.mk b\n[PROOFSTEP]\nexact inf_le_right\n[GOAL]\nα✝ : Type u_1\nα : Type u_2\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : UniqueFactorizationMonoid α\ninst✝¹ : DecidableEq (Associates α)\ninst✝ : DecidableEq α\na b c : α\nhac : a ∣ c\nhab : a ∣ b\n⊢ a ∣ (fun a b => Quot.out (Associates.mk a ⊓ Associates.mk b)) c b\n[PROOFSTEP]\nrw [← mk_dvd_mk, (Associates.mk c ⊓ Associates.mk b).quot_out, congr_fun₂ dvd_eq_le, le_inf_iff, mk_le_mk_iff_dvd_iff,\n mk_le_mk_iff_dvd_iff]\n[GOAL]\nα✝ : Type u_1\nα : Type u_2\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : UniqueFactorizationMonoid α\ninst✝¹ : DecidableEq (Associates α)\ninst✝ : DecidableEq α\na b c : α\nhac : a ∣ c\nhab : a ∣ b\n⊢ a ∣ c ∧ a ∣ b\n[PROOFSTEP]\nexact ⟨hac, hab⟩\n[GOAL]\nα✝ : Type u_1\nα : Type u_2\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : UniqueFactorizationMonoid α\ninst✝¹ : DecidableEq (Associates α)\ninst✝ : DecidableEq α\na b : α\n⊢ (fun a b => Quot.out (Associates.mk a ⊓ Associates.mk b)) a b *\n (fun a b => Quot.out (Associates.mk a ⊔ Associates.mk b)) a b ~ᵤ\n a * b\n[PROOFSTEP]\nrw [← mk_eq_mk_iff_associated, ← Associates.mk_mul_mk, ← associated_iff_eq, Associates.quot_out, Associates.quot_out,\n mul_comm, sup_mul_inf, Associates.mk_mul_mk]\n[GOAL]\nα✝ : Type u_1\nα : Type u_2\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : UniqueFactorizationMonoid α\ninst✝¹ : DecidableEq (Associates α)\ninst✝ : DecidableEq α\na : α\n⊢ (fun a b => Quot.out (Associates.mk a ⊔ Associates.mk b)) 0 a = 0\n[PROOFSTEP]\nhave : Associates.mk (0 : α) = ⊤ := rfl\n[GOAL]\nα✝ : Type u_1\nα : Type u_2\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : UniqueFactorizationMonoid α\ninst✝¹ : DecidableEq (Associates α)\ninst✝ : DecidableEq α\na : α\nthis : Associates.mk 0 = ⊤\n⊢ (fun a b => Quot.out (Associates.mk a ⊔ Associates.mk b)) 0 a = 0\n[PROOFSTEP]\ndsimp\n[GOAL]\nα✝ : Type u_1\nα : Type u_2\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : UniqueFactorizationMonoid α\ninst✝¹ : DecidableEq (Associates α)\ninst✝ : DecidableEq α\na : α\nthis : Associates.mk 0 = ⊤\n⊢ Quot.out (Associates.mk 0 ⊔ Associates.mk a) = 0\n[PROOFSTEP]\nrw [this, top_sup_eq, ← this, ← associated_zero_iff_eq_zero, ← mk_eq_mk_iff_associated, ← associated_iff_eq,\n Associates.quot_out]\n[GOAL]\nα✝ : Type u_1\nα : Type u_2\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : UniqueFactorizationMonoid α\ninst✝¹ : DecidableEq (Associates α)\ninst✝ : DecidableEq α\na : α\n⊢ (fun a b => Quot.out (Associates.mk a ⊔ Associates.mk b)) a 0 = 0\n[PROOFSTEP]\nhave : Associates.mk (0 : α) = ⊤ := rfl\n[GOAL]\nα✝ : Type u_1\nα : Type u_2\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : UniqueFactorizationMonoid α\ninst✝¹ : DecidableEq (Associates α)\ninst✝ : DecidableEq α\na : α\nthis : Associates.mk 0 = ⊤\n⊢ (fun a b => Quot.out (Associates.mk a ⊔ Associates.mk b)) a 0 = 0\n[PROOFSTEP]\ndsimp\n[GOAL]\nα✝ : Type u_1\nα : Type u_2\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : UniqueFactorizationMonoid α\ninst✝¹ : DecidableEq (Associates α)\ninst✝ : DecidableEq α\na : α\nthis : Associates.mk 0 = ⊤\n⊢ Quot.out (Associates.mk a ⊔ Associates.mk 0) = 0\n[PROOFSTEP]\nrw [this, sup_top_eq, ← this, ← associated_zero_iff_eq_zero, ← mk_eq_mk_iff_associated, ← associated_iff_eq,\n Associates.quot_out]\n[GOAL]\nα✝ : Type u_1\nα : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero α\ninst✝³ : UniqueFactorizationMonoid α\ninst✝² : NormalizationMonoid α\ninst✝¹ : DecidableEq (Associates α)\ninst✝ : DecidableEq α\nsrc✝ : NormalizationMonoid α := inst✝²\na b c : α\nhac : a ∣ c\nhab : a ∣ b\n⊢ a ∣ Associates.out (Associates.mk c ⊓ Associates.mk b)\n[PROOFSTEP]\nrw [dvd_out_iff, le_inf_iff, mk_le_mk_iff_dvd_iff, mk_le_mk_iff_dvd_iff]\n[GOAL]\nα✝ : Type u_1\nα : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero α\ninst✝³ : UniqueFactorizationMonoid α\ninst✝² : NormalizationMonoid α\ninst✝¹ : DecidableEq (Associates α)\ninst✝ : DecidableEq α\nsrc✝ : NormalizationMonoid α := inst✝²\na b c : α\nhac : a ∣ c\nhab : a ∣ b\n⊢ a ∣ c ∧ a ∣ b\n[PROOFSTEP]\nexact ⟨hac, hab⟩\n[GOAL]\nα✝ : Type u_1\nα : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero α\ninst✝³ : UniqueFactorizationMonoid α\ninst✝² : NormalizationMonoid α\ninst✝¹ : DecidableEq (Associates α)\ninst✝ : DecidableEq α\nsrc✝ : NormalizationMonoid α := inst✝²\na b : α\n⊢ (fun a b => Associates.out (Associates.mk a ⊓ Associates.mk b)) a b *\n (fun a b => Associates.out (Associates.mk a ⊔ Associates.mk b)) a b ~ᵤ\n a * b\n[PROOFSTEP]\nrw [← out_mul, mul_comm, sup_mul_inf, mk_mul_mk, out_mk]\n[GOAL]\nα✝ : Type u_1\nα : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero α\ninst✝³ : UniqueFactorizationMonoid α\ninst✝² : NormalizationMonoid α\ninst✝¹ : DecidableEq (Associates α)\ninst✝ : DecidableEq α\nsrc✝ : NormalizationMonoid α := inst✝²\na b : α\n⊢ ↑normalize (a * b) ~ᵤ a * b\n[PROOFSTEP]\nexact normalize_associated (a * b)\n[GOAL]\nα✝ : Type u_1\nα : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero α\ninst✝³ : UniqueFactorizationMonoid α\ninst✝² : NormalizationMonoid α\ninst✝¹ : DecidableEq (Associates α)\ninst✝ : DecidableEq α\nsrc✝ : NormalizationMonoid α := inst✝²\na : α\n⊢ Associates.out (⊤ ⊔ Associates.mk a) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nα✝ : Type u_1\nα : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero α\ninst✝³ : UniqueFactorizationMonoid α\ninst✝² : NormalizationMonoid α\ninst✝¹ : DecidableEq (Associates α)\ninst✝ : DecidableEq α\nsrc✝ : NormalizationMonoid α := inst✝²\na : α\n⊢ Associates.out (Associates.mk a ⊔ ⊤) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nα✝ : Type u_1\nα : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero α\ninst✝³ : UniqueFactorizationMonoid α\ninst✝² : NormalizationMonoid α\ninst✝¹ : DecidableEq (Associates α)\ninst✝ : DecidableEq α\nsrc✝ : NormalizationMonoid α := inst✝²\na b : α\n⊢ ↑normalize (gcd a b) = gcd a b\n[PROOFSTEP]\ncongr\n[GOAL]\nα✝ : Type u_1\nα : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero α\ninst✝³ : UniqueFactorizationMonoid α\ninst✝² : NormalizationMonoid α\ninst✝¹ : DecidableEq (Associates α)\ninst✝ : DecidableEq α\nsrc✝ : NormalizationMonoid α := inst✝²\na b : α\n⊢ ↑normalize (gcd a b) = gcd a b\n[PROOFSTEP]\napply normalize_out _\n[GOAL]\nα✝ : Type u_1\nα : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero α\ninst✝³ : UniqueFactorizationMonoid α\ninst✝² : NormalizationMonoid α\ninst✝¹ : DecidableEq (Associates α)\ninst✝ : DecidableEq α\nsrc✝ : NormalizationMonoid α := inst✝²\na b : α\n⊢ ↑normalize (lcm a b) = lcm a b\n[PROOFSTEP]\ncongr\n[GOAL]\nα✝ : Type u_1\nα : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero α\ninst✝³ : UniqueFactorizationMonoid α\ninst✝² : NormalizationMonoid α\ninst✝¹ : DecidableEq (Associates α)\ninst✝ : DecidableEq α\nsrc✝ : NormalizationMonoid α := inst✝²\na b : α\n⊢ ↑normalize (lcm a b) = lcm a b\n[PROOFSTEP]\napply normalize_out _\n[GOAL]\nα : Type u_1\nM : Type u_2\ninst✝² : CancelCommMonoidWithZero M\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : Fintype Mˣ\ny : M\nhy : y ≠ 0\n⊢ Fintype { x // x ∣ y }\n[PROOFSTEP]\nhaveI : Nontrivial M := ⟨⟨y, 0, hy⟩⟩\n[GOAL]\nα : Type u_1\nM : Type u_2\ninst✝² : CancelCommMonoidWithZero M\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : Fintype Mˣ\ny : M\nhy : y ≠ 0\nthis : Nontrivial M\n⊢ Fintype { x // x ∣ y }\n[PROOFSTEP]\nhaveI : NormalizationMonoid M := UniqueFactorizationMonoid.normalizationMonoid\n[GOAL]\nα : Type u_1\nM : Type u_2\ninst✝² : CancelCommMonoidWithZero M\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : Fintype Mˣ\ny : M\nhy : y ≠ 0\nthis✝ : Nontrivial M\nthis : NormalizationMonoid M\n⊢ Fintype { x // x ∣ y }\n[PROOFSTEP]\nhaveI := Classical.decEq M\n[GOAL]\nα : Type u_1\nM : Type u_2\ninst✝² : CancelCommMonoidWithZero M\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : Fintype Mˣ\ny : M\nhy : y ≠ 0\nthis✝¹ : Nontrivial M\nthis✝ : NormalizationMonoid M\nthis : DecidableEq M\n⊢ Fintype { x // x ∣ y }\n[PROOFSTEP]\nhaveI :=\n Classical.decEq\n (Associates M)\n -- We'll show `λ (u : Mˣ) (f ⊆ factors y) → u * Π f` is injective\n -- and has image exactly the divisors of `y`.\n[GOAL]\nα : Type u_1\nM : Type u_2\ninst✝² : CancelCommMonoidWithZero M\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : Fintype Mˣ\ny : M\nhy : y ≠ 0\nthis✝² : Nontrivial M\nthis✝¹ : NormalizationMonoid M\nthis✝ : DecidableEq M\nthis : DecidableEq (Associates M)\n⊢ Fintype { x // x ∣ y }\n[PROOFSTEP]\nrefine'\n Fintype.ofFinset\n (((normalizedFactors y).powerset.toFinset ×ˢ (Finset.univ : Finset Mˣ)).image fun s => (s.snd : M) * s.fst.prod)\n fun x => _\n[GOAL]\nα : Type u_1\nM : Type u_2\ninst✝² : CancelCommMonoidWithZero M\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : Fintype Mˣ\ny : M\nhy : y ≠ 0\nthis✝² : Nontrivial M\nthis✝¹ : NormalizationMonoid M\nthis✝ : DecidableEq M\nthis : DecidableEq (Associates M)\nx : M\n⊢ x ∈\n Finset.image (fun s => ↑s.snd * Multiset.prod s.fst)\n (Multiset.toFinset (Multiset.powerset (normalizedFactors y)) ×ˢ Finset.univ) ↔\n x ∈ fun x => ∃ c, y = x * c\n[PROOFSTEP]\nsimp only [exists_prop, Finset.mem_image, Finset.mem_product, Finset.mem_univ, and_true_iff, Multiset.mem_toFinset,\n Multiset.mem_powerset, exists_eq_right, Multiset.mem_map]\n[GOAL]\nα : Type u_1\nM : Type u_2\ninst✝² : CancelCommMonoidWithZero M\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : Fintype Mˣ\ny : M\nhy : y ≠ 0\nthis✝² : Nontrivial M\nthis✝¹ : NormalizationMonoid M\nthis✝ : DecidableEq M\nthis : DecidableEq (Associates M)\nx : M\n⊢ (∃ a, a.fst ≤ normalizedFactors y ∧ ↑a.snd * Multiset.prod a.fst = x) ↔ x ∈ fun x => ∃ c, y = x * c\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\nM : Type u_2\ninst✝² : CancelCommMonoidWithZero M\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : Fintype Mˣ\ny : M\nhy : y ≠ 0\nthis✝² : Nontrivial M\nthis✝¹ : NormalizationMonoid M\nthis✝ : DecidableEq M\nthis : DecidableEq (Associates M)\nx : M\n⊢ (∃ a, a.fst ≤ normalizedFactors y ∧ ↑a.snd * Multiset.prod a.fst = x) → x ∈ fun x => ∃ c, y = x * c\n[PROOFSTEP]\nrintro ⟨s, hs, rfl⟩\n[GOAL]\ncase mp.intro.intro\nα : Type u_1\nM : Type u_2\ninst✝² : CancelCommMonoidWithZero M\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : Fintype Mˣ\ny : M\nhy : y ≠ 0\nthis✝² : Nontrivial M\nthis✝¹ : NormalizationMonoid M\nthis✝ : DecidableEq M\nthis : DecidableEq (Associates M)\ns : Multiset M × Mˣ\nhs : s.fst ≤ normalizedFactors y\n⊢ ↑s.snd * Multiset.prod s.fst ∈ fun x => ∃ c, y = x * c\n[PROOFSTEP]\nshow (s.snd : M) * s.fst.prod ∣ y\n[GOAL]\ncase mp.intro.intro\nα : Type u_1\nM : Type u_2\ninst✝² : CancelCommMonoidWithZero M\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : Fintype Mˣ\ny : M\nhy : y ≠ 0\nthis✝² : Nontrivial M\nthis✝¹ : NormalizationMonoid M\nthis✝ : DecidableEq M\nthis : DecidableEq (Associates M)\ns : Multiset M × Mˣ\nhs : s.fst ≤ normalizedFactors y\n⊢ ↑s.snd * Multiset.prod s.fst ∣ y\n[PROOFSTEP]\nrw [(unit_associated_one.mul_right s.fst.prod).dvd_iff_dvd_left, one_mul, ←\n (normalizedFactors_prod hy).dvd_iff_dvd_right]\n[GOAL]\ncase mp.intro.intro\nα : Type u_1\nM : Type u_2\ninst✝² : CancelCommMonoidWithZero M\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : Fintype Mˣ\ny : M\nhy : y ≠ 0\nthis✝² : Nontrivial M\nthis✝¹ : NormalizationMonoid M\nthis✝ : DecidableEq M\nthis : DecidableEq (Associates M)\ns : Multiset M × Mˣ\nhs : s.fst ≤ normalizedFactors y\n⊢ Multiset.prod s.fst ∣ Multiset.prod (normalizedFactors y)\n[PROOFSTEP]\nexact Multiset.prod_dvd_prod_of_le hs\n[GOAL]\ncase mpr\nα : Type u_1\nM : Type u_2\ninst✝² : CancelCommMonoidWithZero M\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : Fintype Mˣ\ny : M\nhy : y ≠ 0\nthis✝² : Nontrivial M\nthis✝¹ : NormalizationMonoid M\nthis✝ : DecidableEq M\nthis : DecidableEq (Associates M)\nx : M\n⊢ (x ∈ fun x => ∃ c, y = x * c) → ∃ a, a.fst ≤ normalizedFactors y ∧ ↑a.snd * Multiset.prod a.fst = x\n[PROOFSTEP]\nrintro (h : x ∣ y)\n[GOAL]\ncase mpr\nα : Type u_1\nM : Type u_2\ninst✝² : CancelCommMonoidWithZero M\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : Fintype Mˣ\ny : M\nhy : y ≠ 0\nthis✝² : Nontrivial M\nthis✝¹ : NormalizationMonoid M\nthis✝ : DecidableEq M\nthis : DecidableEq (Associates M)\nx : M\nh : x ∣ y\n⊢ ∃ a, a.fst ≤ normalizedFactors y ∧ ↑a.snd * Multiset.prod a.fst = x\n[PROOFSTEP]\nhave hx : x ≠ 0 := by\n refine' mt (fun hx => _) hy\n rwa [hx, zero_dvd_iff] at h \n[GOAL]\nα : Type u_1\nM : Type u_2\ninst✝² : CancelCommMonoidWithZero M\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : Fintype Mˣ\ny : M\nhy : y ≠ 0\nthis✝² : Nontrivial M\nthis✝¹ : NormalizationMonoid M\nthis✝ : DecidableEq M\nthis : DecidableEq (Associates M)\nx : M\nh : x ∣ y\n⊢ x ≠ 0\n[PROOFSTEP]\nrefine' mt (fun hx => _) hy\n[GOAL]\nα : Type u_1\nM : Type u_2\ninst✝² : CancelCommMonoidWithZero M\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : Fintype Mˣ\ny : M\nhy : y ≠ 0\nthis✝² : Nontrivial M\nthis✝¹ : NormalizationMonoid M\nthis✝ : DecidableEq M\nthis : DecidableEq (Associates M)\nx : M\nh : x ∣ y\nhx : x = 0\n⊢ y = 0\n[PROOFSTEP]\nrwa [hx, zero_dvd_iff] at h \n[GOAL]\ncase mpr\nα : Type u_1\nM : Type u_2\ninst✝² : CancelCommMonoidWithZero M\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : Fintype Mˣ\ny : M\nhy : y ≠ 0\nthis✝² : Nontrivial M\nthis✝¹ : NormalizationMonoid M\nthis✝ : DecidableEq M\nthis : DecidableEq (Associates M)\nx : M\nh : x ∣ y\nhx : x ≠ 0\n⊢ ∃ a, a.fst ≤ normalizedFactors y ∧ ↑a.snd * Multiset.prod a.fst = x\n[PROOFSTEP]\nobtain ⟨u, hu⟩ := normalizedFactors_prod hx\n[GOAL]\ncase mpr.intro\nα : Type u_1\nM : Type u_2\ninst✝² : CancelCommMonoidWithZero M\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : Fintype Mˣ\ny : M\nhy : y ≠ 0\nthis✝² : Nontrivial M\nthis✝¹ : NormalizationMonoid M\nthis✝ : DecidableEq M\nthis : DecidableEq (Associates M)\nx : M\nh : x ∣ y\nhx : x ≠ 0\nu : Mˣ\nhu : Multiset.prod (normalizedFactors x) * ↑u = x\n⊢ ∃ a, a.fst ≤ normalizedFactors y ∧ ↑a.snd * Multiset.prod a.fst = x\n[PROOFSTEP]\nrefine' ⟨⟨normalizedFactors x, u⟩, _, (mul_comm _ _).trans hu⟩\n[GOAL]\ncase mpr.intro\nα : Type u_1\nM : Type u_2\ninst✝² : CancelCommMonoidWithZero M\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : Fintype Mˣ\ny : M\nhy : y ≠ 0\nthis✝² : Nontrivial M\nthis✝¹ : NormalizationMonoid M\nthis✝ : DecidableEq M\nthis : DecidableEq (Associates M)\nx : M\nh : x ∣ y\nhx : x ≠ 0\nu : Mˣ\nhu : Multiset.prod (normalizedFactors x) * ↑u = x\n⊢ (normalizedFactors x, u).fst ≤ normalizedFactors y\n[PROOFSTEP]\nexact (dvd_iff_normalizedFactors_le_normalizedFactors hx hy).mp h\n[GOAL]\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : UniqueFactorizationMonoid α\ninst✝¹ : NormalizationMonoid α\ninst✝ : DecidableEq α\nn p : α\n⊢ ↑(factorization n) p = Multiset.count p (normalizedFactors n)\n[PROOFSTEP]\nsimp [factorization]\n[GOAL]\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : UniqueFactorizationMonoid α\ninst✝¹ : NormalizationMonoid α\ninst✝ : DecidableEq α\n⊢ factorization 0 = 0\n[PROOFSTEP]\nsimp [factorization]\n[GOAL]\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : UniqueFactorizationMonoid α\ninst✝¹ : NormalizationMonoid α\ninst✝ : DecidableEq α\n⊢ factorization 1 = 0\n[PROOFSTEP]\nsimp [factorization]\n[GOAL]\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : UniqueFactorizationMonoid α\ninst✝¹ : NormalizationMonoid α\ninst✝ : DecidableEq α\nn : α\n⊢ (factorization n).support = Multiset.toFinset (normalizedFactors n)\n[PROOFSTEP]\nsimp [factorization, Multiset.toFinsupp_support]\n[GOAL]\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : UniqueFactorizationMonoid α\ninst✝¹ : NormalizationMonoid α\ninst✝ : DecidableEq α\na b : α\nha : a ≠ 0\nhb : b ≠ 0\n⊢ factorization (a * b) = factorization a + factorization b\n[PROOFSTEP]\nsimp [factorization, normalizedFactors_mul ha hb]\n[GOAL]\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : UniqueFactorizationMonoid α\ninst✝¹ : NormalizationMonoid α\ninst✝ : DecidableEq α\nx : α\nn : ℕ\n⊢ factorization (x ^ n) = n • factorization x\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : UniqueFactorizationMonoid α\ninst✝¹ : NormalizationMonoid α\ninst✝ : DecidableEq α\nx : α\nn : ℕ\na✝ : α\n⊢ ↑(factorization (x ^ n)) a✝ = ↑(n • factorization x) a✝\n[PROOFSTEP]\nsimp [factorization]\n[GOAL]\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : UniqueFactorizationMonoid α\ninst✝¹ : NormalizationMonoid α\ninst✝ : DecidableEq α\na b : α\nha : a ≠ 0\nhb : b ≠ 0\nh : factorization a = factorization b\n⊢ a ~ᵤ b\n[PROOFSTEP]\nsimp_rw [factorization, AddEquiv.apply_eq_iff_eq] at h \n[GOAL]\nα : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : UniqueFactorizationMonoid α\ninst✝¹ : NormalizationMonoid α\ninst✝ : DecidableEq α\na b : α\nha : a ≠ 0\nhb : b ≠ 0\nh : normalizedFactors a = normalizedFactors b\n⊢ a ~ᵤ b\n[PROOFSTEP]\nrwa [associated_iff_normalizedFactors_eq_normalizedFactors ha hb]\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.UniqueFactorizationDomain", "llama_tokens": 185858, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO", "lm_q1_score": 0.5, "lm_q2_score": 0.02716923320955869, "lm_q1q2_score": 0.013584616604779345}} {"text": "[GOAL]\nG : Type u_1\ninst✝ : Group G\nH : Subgroup G\nR S : Set G\nhR : R ∈ rightTransversals ↑H\nhR1 : 1 ∈ R\nhS : closure S = ⊤\n⊢ ↑(closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S))) * R = ⊤\n[PROOFSTEP]\nlet f : G → R := fun g => toFun hR g\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH : Subgroup G\nR S : Set G\nhR : R ∈ rightTransversals ↑H\nhR1 : 1 ∈ R\nhS : closure S = ⊤\nf : G → ↑R := fun g => toFun hR g\n⊢ ↑(closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S))) * R = ⊤\n[PROOFSTEP]\nlet U : Set G := (R * S).image fun g => g * (f g : G)⁻¹\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH : Subgroup G\nR S : Set G\nhR : R ∈ rightTransversals ↑H\nhR1 : 1 ∈ R\nhS : closure S = ⊤\nf : G → ↑R := fun g => toFun hR g\nU : Set G := (fun g => g * (↑(f g))⁻¹) '' (R * S)\n⊢ ↑(closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S))) * R = ⊤\n[PROOFSTEP]\nchange (closure U : Set G) * R = ⊤\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH : Subgroup G\nR S : Set G\nhR : R ∈ rightTransversals ↑H\nhR1 : 1 ∈ R\nhS : closure S = ⊤\nf : G → ↑R := fun g => toFun hR g\nU : Set G := (fun g => g * (↑(f g))⁻¹) '' (R * S)\n⊢ ↑(closure U) * R = ⊤\n[PROOFSTEP]\nrefine' top_le_iff.mp fun g _ => _\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH : Subgroup G\nR S : Set G\nhR : R ∈ rightTransversals ↑H\nhR1 : 1 ∈ R\nhS : closure S = ⊤\nf : G → ↑R := fun g => toFun hR g\nU : Set G := (fun g => g * (↑(f g))⁻¹) '' (R * S)\ng : G\nx✝ : g ∈ ⊤\n⊢ g ∈ ↑(closure U) * R\n[PROOFSTEP]\napply closure_induction_right (eq_top_iff.mp hS (mem_top g))\n[GOAL]\ncase H1\nG : Type u_1\ninst✝ : Group G\nH : Subgroup G\nR S : Set G\nhR : R ∈ rightTransversals ↑H\nhR1 : 1 ∈ R\nhS : closure S = ⊤\nf : G → ↑R := fun g => toFun hR g\nU : Set G := (fun g => g * (↑(f g))⁻¹) '' (R * S)\ng : G\nx✝ : g ∈ ⊤\n⊢ 1 ∈ ↑(closure U) * R\n[PROOFSTEP]\nexact ⟨1, 1, (closure U).one_mem, hR1, one_mul 1⟩\n[GOAL]\ncase Hmul\nG : Type u_1\ninst✝ : Group G\nH : Subgroup G\nR S : Set G\nhR : R ∈ rightTransversals ↑H\nhR1 : 1 ∈ R\nhS : closure S = ⊤\nf : G → ↑R := fun g => toFun hR g\nU : Set G := (fun g => g * (↑(f g))⁻¹) '' (R * S)\ng : G\nx✝ : g ∈ ⊤\n⊢ ∀ (x y : G), y ∈ S → x ∈ ↑(closure U) * R → x * y ∈ ↑(closure U) * R\n[PROOFSTEP]\nrintro - s hs ⟨u, r, hu, hr, rfl⟩\n[GOAL]\ncase Hmul.intro.intro.intro.intro\nG : Type u_1\ninst✝ : Group G\nH : Subgroup G\nR S : Set G\nhR : R ∈ rightTransversals ↑H\nhR1 : 1 ∈ R\nhS : closure S = ⊤\nf : G → ↑R := fun g => toFun hR g\nU : Set G := (fun g => g * (↑(f g))⁻¹) '' (R * S)\ng : G\nx✝ : g ∈ ⊤\ns : G\nhs : s ∈ S\nu r : G\nhu : u ∈ ↑(closure U)\nhr : r ∈ R\n⊢ (fun x x_1 => x * x_1) u r * s ∈ ↑(closure U) * R\n[PROOFSTEP]\nrw [show u * r * s = u * (r * s * (f (r * s) : G)⁻¹) * f (r * s) by group]\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH : Subgroup G\nR S : Set G\nhR : R ∈ rightTransversals ↑H\nhR1 : 1 ∈ R\nhS : closure S = ⊤\nf : G → ↑R := fun g => toFun hR g\nU : Set G := (fun g => g * (↑(f g))⁻¹) '' (R * S)\ng : G\nx✝ : g ∈ ⊤\ns : G\nhs : s ∈ S\nu r : G\nhu : u ∈ ↑(closure U)\nhr : r ∈ R\n⊢ u * r * s = u * (r * s * (↑(f (r * s)))⁻¹) * ↑(f (r * s))\n[PROOFSTEP]\ngroup\n[GOAL]\ncase Hmul.intro.intro.intro.intro\nG : Type u_1\ninst✝ : Group G\nH : Subgroup G\nR S : Set G\nhR : R ∈ rightTransversals ↑H\nhR1 : 1 ∈ R\nhS : closure S = ⊤\nf : G → ↑R := fun g => toFun hR g\nU : Set G := (fun g => g * (↑(f g))⁻¹) '' (R * S)\ng : G\nx✝ : g ∈ ⊤\ns : G\nhs : s ∈ S\nu r : G\nhu : u ∈ ↑(closure U)\nhr : r ∈ R\n⊢ u * (r * s * (↑(f (r * s)))⁻¹) * ↑(f (r * s)) ∈ ↑(closure U) * R\n[PROOFSTEP]\nrefine' Set.mul_mem_mul ((closure U).mul_mem hu _) (f (r * s)).coe_prop\n[GOAL]\ncase Hmul.intro.intro.intro.intro\nG : Type u_1\ninst✝ : Group G\nH : Subgroup G\nR S : Set G\nhR : R ∈ rightTransversals ↑H\nhR1 : 1 ∈ R\nhS : closure S = ⊤\nf : G → ↑R := fun g => toFun hR g\nU : Set G := (fun g => g * (↑(f g))⁻¹) '' (R * S)\ng : G\nx✝ : g ∈ ⊤\ns : G\nhs : s ∈ S\nu r : G\nhu : u ∈ ↑(closure U)\nhr : r ∈ R\n⊢ r * s * (↑(f (r * s)))⁻¹ ∈ closure U\n[PROOFSTEP]\nexact subset_closure ⟨r * s, Set.mul_mem_mul hr hs, rfl⟩\n[GOAL]\ncase Hinv\nG : Type u_1\ninst✝ : Group G\nH : Subgroup G\nR S : Set G\nhR : R ∈ rightTransversals ↑H\nhR1 : 1 ∈ R\nhS : closure S = ⊤\nf : G → ↑R := fun g => toFun hR g\nU : Set G := (fun g => g * (↑(f g))⁻¹) '' (R * S)\ng : G\nx✝ : g ∈ ⊤\n⊢ ∀ (x y : G), y ∈ S → x ∈ ↑(closure U) * R → x * y⁻¹ ∈ ↑(closure U) * R\n[PROOFSTEP]\nrintro - s hs ⟨u, r, hu, hr, rfl⟩\n[GOAL]\ncase Hinv.intro.intro.intro.intro\nG : Type u_1\ninst✝ : Group G\nH : Subgroup G\nR S : Set G\nhR : R ∈ rightTransversals ↑H\nhR1 : 1 ∈ R\nhS : closure S = ⊤\nf : G → ↑R := fun g => toFun hR g\nU : Set G := (fun g => g * (↑(f g))⁻¹) '' (R * S)\ng : G\nx✝ : g ∈ ⊤\ns : G\nhs : s ∈ S\nu r : G\nhu : u ∈ ↑(closure U)\nhr : r ∈ R\n⊢ (fun x x_1 => x * x_1) u r * s⁻¹ ∈ ↑(closure U) * R\n[PROOFSTEP]\nrw [show u * r * s⁻¹ = u * (f (r * s⁻¹) * s * r⁻¹)⁻¹ * f (r * s⁻¹) by group]\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH : Subgroup G\nR S : Set G\nhR : R ∈ rightTransversals ↑H\nhR1 : 1 ∈ R\nhS : closure S = ⊤\nf : G → ↑R := fun g => toFun hR g\nU : Set G := (fun g => g * (↑(f g))⁻¹) '' (R * S)\ng : G\nx✝ : g ∈ ⊤\ns : G\nhs : s ∈ S\nu r : G\nhu : u ∈ ↑(closure U)\nhr : r ∈ R\n⊢ u * r * s⁻¹ = u * (↑(f (r * s⁻¹)) * s * r⁻¹)⁻¹ * ↑(f (r * s⁻¹))\n[PROOFSTEP]\ngroup\n[GOAL]\ncase Hinv.intro.intro.intro.intro\nG : Type u_1\ninst✝ : Group G\nH : Subgroup G\nR S : Set G\nhR : R ∈ rightTransversals ↑H\nhR1 : 1 ∈ R\nhS : closure S = ⊤\nf : G → ↑R := fun g => toFun hR g\nU : Set G := (fun g => g * (↑(f g))⁻¹) '' (R * S)\ng : G\nx✝ : g ∈ ⊤\ns : G\nhs : s ∈ S\nu r : G\nhu : u ∈ ↑(closure U)\nhr : r ∈ R\n⊢ u * (↑(f (r * s⁻¹)) * s * r⁻¹)⁻¹ * ↑(f (r * s⁻¹)) ∈ ↑(closure U) * R\n[PROOFSTEP]\nrefine' Set.mul_mem_mul ((closure U).mul_mem hu ((closure U).inv_mem _)) (f (r * s⁻¹)).2\n[GOAL]\ncase Hinv.intro.intro.intro.intro\nG : Type u_1\ninst✝ : Group G\nH : Subgroup G\nR S : Set G\nhR : R ∈ rightTransversals ↑H\nhR1 : 1 ∈ R\nhS : closure S = ⊤\nf : G → ↑R := fun g => toFun hR g\nU : Set G := (fun g => g * (↑(f g))⁻¹) '' (R * S)\ng : G\nx✝ : g ∈ ⊤\ns : G\nhs : s ∈ S\nu r : G\nhu : u ∈ ↑(closure U)\nhr : r ∈ R\n⊢ ↑(f (r * s⁻¹)) * s * r⁻¹ ∈ closure U\n[PROOFSTEP]\nrefine' subset_closure ⟨f (r * s⁻¹) * s, Set.mul_mem_mul (f (r * s⁻¹)).2 hs, _⟩\n[GOAL]\ncase Hinv.intro.intro.intro.intro\nG : Type u_1\ninst✝ : Group G\nH : Subgroup G\nR S : Set G\nhR : R ∈ rightTransversals ↑H\nhR1 : 1 ∈ R\nhS : closure S = ⊤\nf : G → ↑R := fun g => toFun hR g\nU : Set G := (fun g => g * (↑(f g))⁻¹) '' (R * S)\ng : G\nx✝ : g ∈ ⊤\ns : G\nhs : s ∈ S\nu r : G\nhu : u ∈ ↑(closure U)\nhr : r ∈ R\n⊢ (fun g => g * (↑(f g))⁻¹) (↑(f (r * s⁻¹)) * s) = ↑(f (r * s⁻¹)) * s * r⁻¹\n[PROOFSTEP]\nrw [mul_right_inj, inv_inj, ← Subtype.coe_mk r hr, ← Subtype.ext_iff, Subtype.coe_mk]\n[GOAL]\ncase Hinv.intro.intro.intro.intro\nG : Type u_1\ninst✝ : Group G\nH : Subgroup G\nR S : Set G\nhR : R ∈ rightTransversals ↑H\nhR1 : 1 ∈ R\nhS : closure S = ⊤\nf : G → ↑R := fun g => toFun hR g\nU : Set G := (fun g => g * (↑(f g))⁻¹) '' (R * S)\ng : G\nx✝ : g ∈ ⊤\ns : G\nhs : s ∈ S\nu r : G\nhu : u ∈ ↑(closure U)\nhr : r ∈ R\n⊢ f (↑(toFun hR (↑{ val := r, property := hr } * s⁻¹)) * s) = { val := r, property := hr }\n[PROOFSTEP]\napply\n (mem_rightTransversals_iff_existsUnique_mul_inv_mem.mp hR (f (r * s⁻¹) * s)).unique\n (mul_inv_toFun_mem hR (f (r * s⁻¹) * s))\n[GOAL]\ncase Hinv.intro.intro.intro.intro\nG : Type u_1\ninst✝ : Group G\nH : Subgroup G\nR S : Set G\nhR : R ∈ rightTransversals ↑H\nhR1 : 1 ∈ R\nhS : closure S = ⊤\nf : G → ↑R := fun g => toFun hR g\nU : Set G := (fun g => g * (↑(f g))⁻¹) '' (R * S)\ng : G\nx✝ : g ∈ ⊤\ns : G\nhs : s ∈ S\nu r : G\nhu : u ∈ ↑(closure U)\nhr : r ∈ R\n⊢ ↑(f (r * s⁻¹)) * s * (↑{ val := r, property := hr })⁻¹ ∈ ↑H\n[PROOFSTEP]\nrw [mul_assoc, ← inv_inv s, ← mul_inv_rev, inv_inv]\n[GOAL]\ncase Hinv.intro.intro.intro.intro\nG : Type u_1\ninst✝ : Group G\nH : Subgroup G\nR S : Set G\nhR : R ∈ rightTransversals ↑H\nhR1 : 1 ∈ R\nhS : closure S = ⊤\nf : G → ↑R := fun g => toFun hR g\nU : Set G := (fun g => g * (↑(f g))⁻¹) '' (R * S)\ng : G\nx✝ : g ∈ ⊤\ns : G\nhs : s ∈ S\nu r : G\nhu : u ∈ ↑(closure U)\nhr : r ∈ R\n⊢ ↑(f (r * s⁻¹)) * (↑{ val := r, property := hr } * s⁻¹)⁻¹ ∈ ↑H\n[PROOFSTEP]\nexact toFun_mul_inv_mem hR (r * s⁻¹)\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH : Subgroup G\nR S : Set G\nhR : R ∈ rightTransversals ↑H\nhR1 : 1 ∈ R\nhS : closure S = ⊤\n⊢ closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S)) = H\n[PROOFSTEP]\nhave hU : closure ((R * S).image fun g => g * (toFun hR g : G)⁻¹) ≤ H :=\n by\n rw [closure_le]\n rintro - ⟨g, -, rfl⟩\n exact mul_inv_toFun_mem hR g\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH : Subgroup G\nR S : Set G\nhR : R ∈ rightTransversals ↑H\nhR1 : 1 ∈ R\nhS : closure S = ⊤\n⊢ closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S)) ≤ H\n[PROOFSTEP]\nrw [closure_le]\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH : Subgroup G\nR S : Set G\nhR : R ∈ rightTransversals ↑H\nhR1 : 1 ∈ R\nhS : closure S = ⊤\n⊢ (fun g => g * (↑(toFun hR g))⁻¹) '' (R * S) ⊆ ↑H\n[PROOFSTEP]\nrintro - ⟨g, -, rfl⟩\n[GOAL]\ncase intro.intro\nG : Type u_1\ninst✝ : Group G\nH : Subgroup G\nR S : Set G\nhR : R ∈ rightTransversals ↑H\nhR1 : 1 ∈ R\nhS : closure S = ⊤\ng : G\n⊢ (fun g => g * (↑(toFun hR g))⁻¹) g ∈ ↑H\n[PROOFSTEP]\nexact mul_inv_toFun_mem hR g\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH : Subgroup G\nR S : Set G\nhR : R ∈ rightTransversals ↑H\nhR1 : 1 ∈ R\nhS : closure S = ⊤\nhU : closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S)) ≤ H\n⊢ closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S)) = H\n[PROOFSTEP]\nrefine' le_antisymm hU fun h hh => _\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH : Subgroup G\nR S : Set G\nhR : R ∈ rightTransversals ↑H\nhR1 : 1 ∈ R\nhS : closure S = ⊤\nhU : closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S)) ≤ H\nh : G\nhh : h ∈ H\n⊢ h ∈ closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S))\n[PROOFSTEP]\nobtain ⟨g, r, hg, hr, rfl⟩ := show h ∈ _ from eq_top_iff.mp (closure_mul_image_mul_eq_top hR hR1 hS) (mem_top h)\n[GOAL]\ncase intro.intro.intro.intro\nG : Type u_1\ninst✝ : Group G\nH : Subgroup G\nR S : Set G\nhR : R ∈ rightTransversals ↑H\nhR1 : 1 ∈ R\nhS : closure S = ⊤\nhU : closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S)) ≤ H\ng r : G\nhg : g ∈ ↑(closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S)))\nhr : r ∈ R\nhh : (fun x x_1 => x * x_1) g r ∈ H\n⊢ (fun x x_1 => x * x_1) g r ∈ closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S))\n[PROOFSTEP]\nsuffices (⟨r, hr⟩ : R) = (⟨1, hR1⟩ : R) by simpa only [show r = 1 from Subtype.ext_iff.mp this, mul_one]\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH : Subgroup G\nR S : Set G\nhR : R ∈ rightTransversals ↑H\nhR1 : 1 ∈ R\nhS : closure S = ⊤\nhU : closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S)) ≤ H\ng r : G\nhg : g ∈ ↑(closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S)))\nhr : r ∈ R\nhh : (fun x x_1 => x * x_1) g r ∈ H\nthis : { val := r, property := hr } = { val := 1, property := hR1 }\n⊢ (fun x x_1 => x * x_1) g r ∈ closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S))\n[PROOFSTEP]\nsimpa only [show r = 1 from Subtype.ext_iff.mp this, mul_one]\n[GOAL]\ncase intro.intro.intro.intro\nG : Type u_1\ninst✝ : Group G\nH : Subgroup G\nR S : Set G\nhR : R ∈ rightTransversals ↑H\nhR1 : 1 ∈ R\nhS : closure S = ⊤\nhU : closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S)) ≤ H\ng r : G\nhg : g ∈ ↑(closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S)))\nhr : r ∈ R\nhh : (fun x x_1 => x * x_1) g r ∈ H\n⊢ { val := r, property := hr } = { val := 1, property := hR1 }\n[PROOFSTEP]\napply (mem_rightTransversals_iff_existsUnique_mul_inv_mem.mp hR r).unique\n[GOAL]\ncase intro.intro.intro.intro.py₁\nG : Type u_1\ninst✝ : Group G\nH : Subgroup G\nR S : Set G\nhR : R ∈ rightTransversals ↑H\nhR1 : 1 ∈ R\nhS : closure S = ⊤\nhU : closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S)) ≤ H\ng r : G\nhg : g ∈ ↑(closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S)))\nhr : r ∈ R\nhh : (fun x x_1 => x * x_1) g r ∈ H\n⊢ r * (↑{ val := r, property := hr })⁻¹ ∈ ↑H\n[PROOFSTEP]\nrw [Subtype.coe_mk, mul_inv_self]\n[GOAL]\ncase intro.intro.intro.intro.py₁\nG : Type u_1\ninst✝ : Group G\nH : Subgroup G\nR S : Set G\nhR : R ∈ rightTransversals ↑H\nhR1 : 1 ∈ R\nhS : closure S = ⊤\nhU : closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S)) ≤ H\ng r : G\nhg : g ∈ ↑(closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S)))\nhr : r ∈ R\nhh : (fun x x_1 => x * x_1) g r ∈ H\n⊢ 1 ∈ ↑H\n[PROOFSTEP]\nexact H.one_mem\n[GOAL]\ncase intro.intro.intro.intro.py₂\nG : Type u_1\ninst✝ : Group G\nH : Subgroup G\nR S : Set G\nhR : R ∈ rightTransversals ↑H\nhR1 : 1 ∈ R\nhS : closure S = ⊤\nhU : closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S)) ≤ H\ng r : G\nhg : g ∈ ↑(closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S)))\nhr : r ∈ R\nhh : (fun x x_1 => x * x_1) g r ∈ H\n⊢ r * (↑{ val := 1, property := hR1 })⁻¹ ∈ ↑H\n[PROOFSTEP]\nrw [Subtype.coe_mk, inv_one, mul_one]\n[GOAL]\ncase intro.intro.intro.intro.py₂\nG : Type u_1\ninst✝ : Group G\nH : Subgroup G\nR S : Set G\nhR : R ∈ rightTransversals ↑H\nhR1 : 1 ∈ R\nhS : closure S = ⊤\nhU : closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S)) ≤ H\ng r : G\nhg : g ∈ ↑(closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S)))\nhr : r ∈ R\nhh : (fun x x_1 => x * x_1) g r ∈ H\n⊢ r ∈ ↑H\n[PROOFSTEP]\nexact (H.mul_mem_cancel_left (hU hg)).mp hh\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH : Subgroup G\nR S : Set G\nhR : R ∈ rightTransversals ↑H\nhR1 : 1 ∈ R\nhS : closure S = ⊤\n⊢ closure ((fun g => { val := g * (↑(toFun hR g))⁻¹, property := (_ : g * (↑(toFun hR g))⁻¹ ∈ H) }) '' (R * S)) = ⊤\n[PROOFSTEP]\nrw [eq_top_iff, ← map_subtype_le_map_subtype, MonoidHom.map_closure, Set.image_image]\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH : Subgroup G\nR S : Set G\nhR : R ∈ rightTransversals ↑H\nhR1 : 1 ∈ R\nhS : closure S = ⊤\n⊢ map (Subgroup.subtype H) ⊤ ≤\n closure\n ((fun x => ↑(Subgroup.subtype H) { val := x * (↑(toFun hR x))⁻¹, property := (_ : x * (↑(toFun hR x))⁻¹ ∈ H) }) ''\n (R * S))\n[PROOFSTEP]\nexact (map_subtype_le ⊤).trans (ge_of_eq (closure_mul_image_eq hR hR1 hS))\n[GOAL]\nG : Type u_1\ninst✝¹ : Group G\nH : Subgroup G\nR✝ S✝ : Set G\ninst✝ : DecidableEq G\nR S : Finset G\nhR : ↑R ∈ rightTransversals ↑H\nhR1 : 1 ∈ R\nhS : closure ↑S = ⊤\n⊢ closure\n ↑(Finset.image (fun g => { val := g * (↑(toFun hR g))⁻¹, property := (_ : g * (↑(toFun hR g))⁻¹ ∈ H) }) (R * S)) =\n ⊤\n[PROOFSTEP]\nrw [Finset.coe_image, Finset.coe_mul]\n[GOAL]\nG : Type u_1\ninst✝¹ : Group G\nH : Subgroup G\nR✝ S✝ : Set G\ninst✝ : DecidableEq G\nR S : Finset G\nhR : ↑R ∈ rightTransversals ↑H\nhR1 : 1 ∈ R\nhS : closure ↑S = ⊤\n⊢ closure ((fun g => { val := g * (↑(toFun hR g))⁻¹, property := (_ : g * (↑(toFun hR g))⁻¹ ∈ H) }) '' (↑R * ↑S)) = ⊤\n[PROOFSTEP]\nexact closure_mul_image_eq_top hR hR1 hS\n[GOAL]\nG : Type u_1\ninst✝¹ : Group G\nH : Subgroup G\nR S✝ : Set G\ninst✝ : FiniteIndex H\nS : Finset G\nhS : closure ↑S = ⊤\n⊢ ∃ T, Finset.card T ≤ index H * Finset.card S ∧ closure ↑T = ⊤\n[PROOFSTEP]\nletI := H.fintypeQuotientOfFiniteIndex\n[GOAL]\nG : Type u_1\ninst✝¹ : Group G\nH : Subgroup G\nR S✝ : Set G\ninst✝ : FiniteIndex H\nS : Finset G\nhS : closure ↑S = ⊤\nthis : Fintype (G ⧸ H) := fintypeQuotientOfFiniteIndex H\n⊢ ∃ T, Finset.card T ≤ index H * Finset.card S ∧ closure ↑T = ⊤\n[PROOFSTEP]\nhaveI : DecidableEq G := Classical.decEq G\n[GOAL]\nG : Type u_1\ninst✝¹ : Group G\nH : Subgroup G\nR S✝ : Set G\ninst✝ : FiniteIndex H\nS : Finset G\nhS : closure ↑S = ⊤\nthis✝ : Fintype (G ⧸ H) := fintypeQuotientOfFiniteIndex H\nthis : DecidableEq G\n⊢ ∃ T, Finset.card T ≤ index H * Finset.card S ∧ closure ↑T = ⊤\n[PROOFSTEP]\nobtain ⟨R₀, hR : R₀ ∈ rightTransversals (H : Set G), hR1⟩ := exists_right_transversal (1 : G)\n[GOAL]\ncase intro.intro\nG : Type u_1\ninst✝¹ : Group G\nH : Subgroup G\nR S✝ : Set G\ninst✝ : FiniteIndex H\nS : Finset G\nhS : closure ↑S = ⊤\nthis✝ : Fintype (G ⧸ H) := fintypeQuotientOfFiniteIndex H\nthis : DecidableEq G\nR₀ : Set G\nhR : R₀ ∈ rightTransversals ↑H\nhR1 : 1 ∈ R₀\n⊢ ∃ T, Finset.card T ≤ index H * Finset.card S ∧ closure ↑T = ⊤\n[PROOFSTEP]\nhaveI : Fintype R₀ := Fintype.ofEquiv _ (toEquiv hR)\n[GOAL]\ncase intro.intro\nG : Type u_1\ninst✝¹ : Group G\nH : Subgroup G\nR S✝ : Set G\ninst✝ : FiniteIndex H\nS : Finset G\nhS : closure ↑S = ⊤\nthis✝¹ : Fintype (G ⧸ H) := fintypeQuotientOfFiniteIndex H\nthis✝ : DecidableEq G\nR₀ : Set G\nhR : R₀ ∈ rightTransversals ↑H\nhR1 : 1 ∈ R₀\nthis : Fintype ↑R₀\n⊢ ∃ T, Finset.card T ≤ index H * Finset.card S ∧ closure ↑T = ⊤\n[PROOFSTEP]\nlet R : Finset G := Set.toFinset R₀\n[GOAL]\ncase intro.intro\nG : Type u_1\ninst✝¹ : Group G\nH : Subgroup G\nR✝ S✝ : Set G\ninst✝ : FiniteIndex H\nS : Finset G\nhS : closure ↑S = ⊤\nthis✝¹ : Fintype (G ⧸ H) := fintypeQuotientOfFiniteIndex H\nthis✝ : DecidableEq G\nR₀ : Set G\nhR : R₀ ∈ rightTransversals ↑H\nhR1 : 1 ∈ R₀\nthis : Fintype ↑R₀\nR : Finset G := Set.toFinset R₀\n⊢ ∃ T, Finset.card T ≤ index H * Finset.card S ∧ closure ↑T = ⊤\n[PROOFSTEP]\nreplace hR : (R : Set G) ∈ rightTransversals (H : Set G) := by rwa [Set.coe_toFinset]\n[GOAL]\nG : Type u_1\ninst✝¹ : Group G\nH : Subgroup G\nR✝ S✝ : Set G\ninst✝ : FiniteIndex H\nS : Finset G\nhS : closure ↑S = ⊤\nthis✝¹ : Fintype (G ⧸ H) := fintypeQuotientOfFiniteIndex H\nthis✝ : DecidableEq G\nR₀ : Set G\nhR : R₀ ∈ rightTransversals ↑H\nhR1 : 1 ∈ R₀\nthis : Fintype ↑R₀\nR : Finset G := Set.toFinset R₀\n⊢ ↑R ∈ rightTransversals ↑H\n[PROOFSTEP]\nrwa [Set.coe_toFinset]\n[GOAL]\ncase intro.intro\nG : Type u_1\ninst✝¹ : Group G\nH : Subgroup G\nR✝ S✝ : Set G\ninst✝ : FiniteIndex H\nS : Finset G\nhS : closure ↑S = ⊤\nthis✝¹ : Fintype (G ⧸ H) := fintypeQuotientOfFiniteIndex H\nthis✝ : DecidableEq G\nR₀ : Set G\nhR1 : 1 ∈ R₀\nthis : Fintype ↑R₀\nR : Finset G := Set.toFinset R₀\nhR : ↑R ∈ rightTransversals ↑H\n⊢ ∃ T, Finset.card T ≤ index H * Finset.card S ∧ closure ↑T = ⊤\n[PROOFSTEP]\nreplace hR1 : (1 : G) ∈ R := by rwa [Set.mem_toFinset]\n[GOAL]\nG : Type u_1\ninst✝¹ : Group G\nH : Subgroup G\nR✝ S✝ : Set G\ninst✝ : FiniteIndex H\nS : Finset G\nhS : closure ↑S = ⊤\nthis✝¹ : Fintype (G ⧸ H) := fintypeQuotientOfFiniteIndex H\nthis✝ : DecidableEq G\nR₀ : Set G\nhR1 : 1 ∈ R₀\nthis : Fintype ↑R₀\nR : Finset G := Set.toFinset R₀\nhR : ↑R ∈ rightTransversals ↑H\n⊢ 1 ∈ R\n[PROOFSTEP]\nrwa [Set.mem_toFinset]\n[GOAL]\ncase intro.intro\nG : Type u_1\ninst✝¹ : Group G\nH : Subgroup G\nR✝ S✝ : Set G\ninst✝ : FiniteIndex H\nS : Finset G\nhS : closure ↑S = ⊤\nthis✝¹ : Fintype (G ⧸ H) := fintypeQuotientOfFiniteIndex H\nthis✝ : DecidableEq G\nR₀ : Set G\nthis : Fintype ↑R₀\nR : Finset G := Set.toFinset R₀\nhR : ↑R ∈ rightTransversals ↑H\nhR1 : 1 ∈ R\n⊢ ∃ T, Finset.card T ≤ index H * Finset.card S ∧ closure ↑T = ⊤\n[PROOFSTEP]\nrefine' ⟨_, _, closure_mul_image_eq_top' hR hR1 hS⟩\n[GOAL]\ncase intro.intro\nG : Type u_1\ninst✝¹ : Group G\nH : Subgroup G\nR✝ S✝ : Set G\ninst✝ : FiniteIndex H\nS : Finset G\nhS : closure ↑S = ⊤\nthis✝¹ : Fintype (G ⧸ H) := fintypeQuotientOfFiniteIndex H\nthis✝ : DecidableEq G\nR₀ : Set G\nthis : Fintype ↑R₀\nR : Finset G := Set.toFinset R₀\nhR : ↑R ∈ rightTransversals ↑H\nhR1 : 1 ∈ R\n⊢ Finset.card\n (Finset.image (fun g => { val := g * (↑(toFun hR g))⁻¹, property := (_ : g * (↑(toFun hR g))⁻¹ ∈ H) }) (R * S)) ≤\n index H * Finset.card S\n[PROOFSTEP]\ncalc\n _ ≤ (R * S).card := Finset.card_image_le\n _ ≤ (R ×ˢ S).card := Finset.card_image_le\n _ = R.card * S.card := (R.card_product S)\n _ = H.index * S.card := congr_arg (· * S.card) ?_\n[GOAL]\ncase intro.intro\nG : Type u_1\ninst✝¹ : Group G\nH : Subgroup G\nR✝ S✝ : Set G\ninst✝ : FiniteIndex H\nS : Finset G\nhS : closure ↑S = ⊤\nthis✝¹ : Fintype (G ⧸ H) := fintypeQuotientOfFiniteIndex H\nthis✝ : DecidableEq G\nR₀ : Set G\nthis : Fintype ↑R₀\nR : Finset G := Set.toFinset R₀\nhR : ↑R ∈ rightTransversals ↑H\nhR1 : 1 ∈ R\n⊢ Finset.card R = index H\n[PROOFSTEP]\ncalc\n R.card = Fintype.card R := (Fintype.card_coe R).symm\n _ = _ := (Fintype.card_congr (toEquiv hR)).symm\n _ = Fintype.card (G ⧸ H) := (QuotientGroup.card_quotient_rightRel H)\n _ = H.index := H.index_eq_card.symm\n[GOAL]\nG : Type u_1\ninst✝¹ : Group G\nH : Subgroup G\nR S : Set G\nhG : Group.FG G\ninst✝ : FiniteIndex H\n⊢ Group.FG { x // x ∈ H }\n[PROOFSTEP]\nobtain ⟨S, hS⟩ := hG.1\n[GOAL]\ncase intro\nG : Type u_1\ninst✝¹ : Group G\nH : Subgroup G\nR S✝ : Set G\nhG : Group.FG G\ninst✝ : FiniteIndex H\nS : Finset G\nhS : closure ↑S = ⊤\n⊢ Group.FG { x // x ∈ H }\n[PROOFSTEP]\nobtain ⟨T, -, hT⟩ := exists_finset_card_le_mul H hS\n[GOAL]\ncase intro.intro.intro\nG : Type u_1\ninst✝¹ : Group G\nH : Subgroup G\nR S✝ : Set G\nhG : Group.FG G\ninst✝ : FiniteIndex H\nS : Finset G\nhS : closure ↑S = ⊤\nT : Finset { x // x ∈ H }\nhT : closure ↑T = ⊤\n⊢ Group.FG { x // x ∈ H }\n[PROOFSTEP]\nexact ⟨⟨T, hT⟩⟩\n[GOAL]\nG : Type u_1\ninst✝¹ : Group G\nH : Subgroup G\nR S : Set G\nhG : Group.FG G\ninst✝ : FiniteIndex H\n⊢ Group.rank { x // x ∈ H } ≤ index H * Group.rank G\n[PROOFSTEP]\nhaveI := H.fg_of_index_ne_zero\n[GOAL]\nG : Type u_1\ninst✝¹ : Group G\nH : Subgroup G\nR S : Set G\nhG : Group.FG G\ninst✝ : FiniteIndex H\nthis : Group.FG { x // x ∈ H }\n⊢ Group.rank { x // x ∈ H } ≤ index H * Group.rank G\n[PROOFSTEP]\nobtain ⟨S, hS₀, hS⟩ := Group.rank_spec G\n[GOAL]\ncase intro.intro\nG : Type u_1\ninst✝¹ : Group G\nH : Subgroup G\nR S✝ : Set G\nhG : Group.FG G\ninst✝ : FiniteIndex H\nthis : Group.FG { x // x ∈ H }\nS : Finset G\nhS₀ : Finset.card S = Group.rank G\nhS : closure ↑S = ⊤\n⊢ Group.rank { x // x ∈ H } ≤ index H * Group.rank G\n[PROOFSTEP]\nobtain ⟨T, hT₀, hT⟩ := exists_finset_card_le_mul H hS\n[GOAL]\ncase intro.intro.intro.intro\nG : Type u_1\ninst✝¹ : Group G\nH : Subgroup G\nR S✝ : Set G\nhG : Group.FG G\ninst✝ : FiniteIndex H\nthis : Group.FG { x // x ∈ H }\nS : Finset G\nhS₀ : Finset.card S = Group.rank G\nhS : closure ↑S = ⊤\nT : Finset { x // x ∈ H }\nhT₀ : Finset.card T ≤ index H * Finset.card S\nhT : closure ↑T = ⊤\n⊢ Group.rank { x // x ∈ H } ≤ index H * Group.rank G\n[PROOFSTEP]\ncalc\n Group.rank H ≤ T.card := Group.rank_le H hT\n _ ≤ H.index * S.card := hT₀\n _ = H.index * Group.rank G := congr_arg ((· * ·) H.index) hS₀\n[GOAL]\nG : Type u_1\ninst✝¹ : Group G\nH : Subgroup G\nR S : Set G\ninst✝ : Finite ↑(commutatorSet G)\n⊢ Nat.card { x // x ∈ _root_.commutator G } ∣ index (center G) ^ (index (center G) * Nat.card ↑(commutatorSet G) + 1)\n[PROOFSTEP]\nby_cases hG : (center G).index = 0\n[GOAL]\ncase pos\nG : Type u_1\ninst✝¹ : Group G\nH : Subgroup G\nR S : Set G\ninst✝ : Finite ↑(commutatorSet G)\nhG : index (center G) = 0\n⊢ Nat.card { x // x ∈ _root_.commutator G } ∣ index (center G) ^ (index (center G) * Nat.card ↑(commutatorSet G) + 1)\n[PROOFSTEP]\nsimp_rw [hG, zero_mul, zero_add, pow_one, dvd_zero]\n[GOAL]\ncase neg\nG : Type u_1\ninst✝¹ : Group G\nH : Subgroup G\nR S : Set G\ninst✝ : Finite ↑(commutatorSet G)\nhG : ¬index (center G) = 0\n⊢ Nat.card { x // x ∈ _root_.commutator G } ∣ index (center G) ^ (index (center G) * Nat.card ↑(commutatorSet G) + 1)\n[PROOFSTEP]\nhaveI : FiniteIndex (center G) :=\n ⟨hG⟩\n -- Rewrite as `|Z(G) ∩ G'| * [G' : Z(G) ∩ G'] ∣ [G : Z(G)] ^ ([G : Z(G)] * n) * [G : Z(G)]`\n[GOAL]\ncase neg\nG : Type u_1\ninst✝¹ : Group G\nH : Subgroup G\nR S : Set G\ninst✝ : Finite ↑(commutatorSet G)\nhG : ¬index (center G) = 0\nthis : FiniteIndex (center G)\n⊢ Nat.card { x // x ∈ _root_.commutator G } ∣ index (center G) ^ (index (center G) * Nat.card ↑(commutatorSet G) + 1)\n[PROOFSTEP]\nrw [← ((center G).subgroupOf (_root_.commutator G)).card_mul_index, pow_succ']\n -- We have `h1 : [G' : Z(G) ∩ G'] ∣ [G : Z(G)]`\n[GOAL]\ncase neg\nG : Type u_1\ninst✝¹ : Group G\nH : Subgroup G\nR S : Set G\ninst✝ : Finite ↑(commutatorSet G)\nhG : ¬index (center G) = 0\nthis : FiniteIndex (center G)\n⊢ Nat.card { x // x ∈ subgroupOf (center G) (_root_.commutator G) } *\n index (subgroupOf (center G) (_root_.commutator G)) ∣\n index (center G) ^ (index (center G) * Nat.card ↑(commutatorSet G)) * index (center G)\n[PROOFSTEP]\nhave h1 :=\n relindex_dvd_index_of_normal (center G)\n (_root_.commutator G)\n -- So we can reduce to proving `|Z(G) ∩ G'| ∣ [G : Z(G)] ^ ([G : Z(G)] * n)`\n[GOAL]\ncase neg\nG : Type u_1\ninst✝¹ : Group G\nH : Subgroup G\nR S : Set G\ninst✝ : Finite ↑(commutatorSet G)\nhG : ¬index (center G) = 0\nthis : FiniteIndex (center G)\nh1 : relindex (center G) (_root_.commutator G) ∣ index (center G)\n⊢ Nat.card { x // x ∈ subgroupOf (center G) (_root_.commutator G) } *\n index (subgroupOf (center G) (_root_.commutator G)) ∣\n index (center G) ^ (index (center G) * Nat.card ↑(commutatorSet G)) * index (center G)\n[PROOFSTEP]\nrefine' mul_dvd_mul _ h1\n[GOAL]\ncase neg\nG : Type u_1\ninst✝¹ : Group G\nH : Subgroup G\nR S : Set G\ninst✝ : Finite ↑(commutatorSet G)\nhG : ¬index (center G) = 0\nthis : FiniteIndex (center G)\nh1 : relindex (center G) (_root_.commutator G) ∣ index (center G)\n⊢ Nat.card { x // x ∈ subgroupOf (center G) (_root_.commutator G) } ∣\n index (center G) ^ (index (center G) * Nat.card ↑(commutatorSet G))\n[PROOFSTEP]\nhaveI : FiniteIndex ((center G).subgroupOf (_root_.commutator G)) :=\n ⟨ne_zero_of_dvd_ne_zero hG h1⟩\n -- We have `h2 : rank (Z(G) ∩ G') ≤ [G' : Z(G) ∩ G'] * rank G'` by Schreier's lemma\n[GOAL]\ncase neg\nG : Type u_1\ninst✝¹ : Group G\nH : Subgroup G\nR S : Set G\ninst✝ : Finite ↑(commutatorSet G)\nhG : ¬index (center G) = 0\nthis✝ : FiniteIndex (center G)\nh1 : relindex (center G) (_root_.commutator G) ∣ index (center G)\nthis : FiniteIndex (subgroupOf (center G) (_root_.commutator G))\n⊢ Nat.card { x // x ∈ subgroupOf (center G) (_root_.commutator G) } ∣\n index (center G) ^ (index (center G) * Nat.card ↑(commutatorSet G))\n[PROOFSTEP]\nhave h2 :=\n rank_le_index_mul_rank\n ((center G).subgroupOf (_root_.commutator G))\n -- We have `h3 : [G' : Z(G) ∩ G'] * rank G' ≤ [G : Z(G)] * n` by `h1` and `rank G' ≤ n`\n[GOAL]\ncase neg\nG : Type u_1\ninst✝¹ : Group G\nH : Subgroup G\nR S : Set G\ninst✝ : Finite ↑(commutatorSet G)\nhG : ¬index (center G) = 0\nthis✝ : FiniteIndex (center G)\nh1 : relindex (center G) (_root_.commutator G) ∣ index (center G)\nthis : FiniteIndex (subgroupOf (center G) (_root_.commutator G))\nh2 :\n Group.rank { x // x ∈ subgroupOf (center G) (_root_.commutator G) } ≤\n index (subgroupOf (center G) (_root_.commutator G)) * Group.rank { x // x ∈ _root_.commutator G }\n⊢ Nat.card { x // x ∈ subgroupOf (center G) (_root_.commutator G) } ∣\n index (center G) ^ (index (center G) * Nat.card ↑(commutatorSet G))\n[PROOFSTEP]\nhave h3 :=\n Nat.mul_le_mul (Nat.le_of_dvd (Nat.pos_of_ne_zero hG) h1)\n (rank_commutator_le_card G)\n -- So we can reduce to proving `|Z(G) ∩ G'| ∣ [G : Z(G)] ^ rank (Z(G) ∩ G')`\n[GOAL]\ncase neg\nG : Type u_1\ninst✝¹ : Group G\nH : Subgroup G\nR S : Set G\ninst✝ : Finite ↑(commutatorSet G)\nhG : ¬index (center G) = 0\nthis✝ : FiniteIndex (center G)\nh1 : relindex (center G) (_root_.commutator G) ∣ index (center G)\nthis : FiniteIndex (subgroupOf (center G) (_root_.commutator G))\nh2 :\n Group.rank { x // x ∈ subgroupOf (center G) (_root_.commutator G) } ≤\n index (subgroupOf (center G) (_root_.commutator G)) * Group.rank { x // x ∈ _root_.commutator G }\nh3 :\n relindex (center G) (_root_.commutator G) * Group.rank { x // x ∈ _root_.commutator G } ≤\n index (center G) * Nat.card ↑(commutatorSet G)\n⊢ Nat.card { x // x ∈ subgroupOf (center G) (_root_.commutator G) } ∣\n index (center G) ^ (index (center G) * Nat.card ↑(commutatorSet G))\n[PROOFSTEP]\nrefine'\n dvd_trans _\n (pow_dvd_pow (center G).index (h2.trans h3))\n -- `Z(G) ∩ G'` is abelian, so it enough to prove that `g ^ [G : Z(G)] = 1` for `g ∈ Z(G) ∩ G'`\n[GOAL]\ncase neg\nG : Type u_1\ninst✝¹ : Group G\nH : Subgroup G\nR S : Set G\ninst✝ : Finite ↑(commutatorSet G)\nhG : ¬index (center G) = 0\nthis✝ : FiniteIndex (center G)\nh1 : relindex (center G) (_root_.commutator G) ∣ index (center G)\nthis : FiniteIndex (subgroupOf (center G) (_root_.commutator G))\nh2 :\n Group.rank { x // x ∈ subgroupOf (center G) (_root_.commutator G) } ≤\n index (subgroupOf (center G) (_root_.commutator G)) * Group.rank { x // x ∈ _root_.commutator G }\nh3 :\n relindex (center G) (_root_.commutator G) * Group.rank { x // x ∈ _root_.commutator G } ≤\n index (center G) * Nat.card ↑(commutatorSet G)\n⊢ Nat.card { x // x ∈ subgroupOf (center G) (_root_.commutator G) } ∣\n index (center G) ^ Group.rank { x // x ∈ subgroupOf (center G) (_root_.commutator G) }\n[PROOFSTEP]\napply card_dvd_exponent_pow_rank'\n[GOAL]\ncase neg.hG\nG : Type u_1\ninst✝¹ : Group G\nH : Subgroup G\nR S : Set G\ninst✝ : Finite ↑(commutatorSet G)\nhG : ¬index (center G) = 0\nthis✝ : FiniteIndex (center G)\nh1 : relindex (center G) (_root_.commutator G) ∣ index (center G)\nthis : FiniteIndex (subgroupOf (center G) (_root_.commutator G))\nh2 :\n Group.rank { x // x ∈ subgroupOf (center G) (_root_.commutator G) } ≤\n index (subgroupOf (center G) (_root_.commutator G)) * Group.rank { x // x ∈ _root_.commutator G }\nh3 :\n relindex (center G) (_root_.commutator G) * Group.rank { x // x ∈ _root_.commutator G } ≤\n index (center G) * Nat.card ↑(commutatorSet G)\n⊢ ∀ (g : { x // x ∈ subgroupOf (center G) (_root_.commutator G) }), g ^ index (center G) = 1\n[PROOFSTEP]\nintro g\n[GOAL]\ncase neg.hG\nG : Type u_1\ninst✝¹ : Group G\nH : Subgroup G\nR S : Set G\ninst✝ : Finite ↑(commutatorSet G)\nhG : ¬index (center G) = 0\nthis✝ : FiniteIndex (center G)\nh1 : relindex (center G) (_root_.commutator G) ∣ index (center G)\nthis : FiniteIndex (subgroupOf (center G) (_root_.commutator G))\nh2 :\n Group.rank { x // x ∈ subgroupOf (center G) (_root_.commutator G) } ≤\n index (subgroupOf (center G) (_root_.commutator G)) * Group.rank { x // x ∈ _root_.commutator G }\nh3 :\n relindex (center G) (_root_.commutator G) * Group.rank { x // x ∈ _root_.commutator G } ≤\n index (center G) * Nat.card ↑(commutatorSet G)\ng : { x // x ∈ subgroupOf (center G) (_root_.commutator G) }\n⊢ g ^ index (center G) = 1\n[PROOFSTEP]\nhave :=\n Abelianization.commutator_subset_ker (MonoidHom.transferCenterPow G)\n g.1.2\n -- `transfer g` is defeq to `g ^ [G : Z(G)]`, so we are done\n[GOAL]\ncase neg.hG\nG : Type u_1\ninst✝¹ : Group G\nH : Subgroup G\nR S : Set G\ninst✝ : Finite ↑(commutatorSet G)\nhG : ¬index (center G) = 0\nthis✝¹ : FiniteIndex (center G)\nh1 : relindex (center G) (_root_.commutator G) ∣ index (center G)\nthis✝ : FiniteIndex (subgroupOf (center G) (_root_.commutator G))\nh2 :\n Group.rank { x // x ∈ subgroupOf (center G) (_root_.commutator G) } ≤\n index (subgroupOf (center G) (_root_.commutator G)) * Group.rank { x // x ∈ _root_.commutator G }\nh3 :\n relindex (center G) (_root_.commutator G) * Group.rank { x // x ∈ _root_.commutator G } ≤\n index (center G) * Nat.card ↑(commutatorSet G)\ng : { x // x ∈ subgroupOf (center G) (_root_.commutator G) }\nthis : ↑↑g ∈ MonoidHom.ker (MonoidHom.transferCenterPow G)\n⊢ g ^ index (center G) = 1\n[PROOFSTEP]\nsimpa only [MonoidHom.mem_ker, Subtype.ext_iff] using this\n[GOAL]\nG : Type u_1\ninst✝¹ : Group G\nH : Subgroup G\nR S : Set G\ninst✝ : Finite ↑(commutatorSet G)\n⊢ Nat.card { x // x ∈ _root_.commutator G } ≤ cardCommutatorBound (Nat.card ↑(commutatorSet G))\n[PROOFSTEP]\nhave h1 := index_center_le_pow (closureCommutatorRepresentatives G)\n[GOAL]\nG : Type u_1\ninst✝¹ : Group G\nH : Subgroup G\nR S : Set G\ninst✝ : Finite ↑(commutatorSet G)\nh1 :\n index (center { x // x ∈ closureCommutatorRepresentatives G }) ≤\n Nat.card ↑(commutatorSet { x // x ∈ closureCommutatorRepresentatives G }) ^\n Group.rank { x // x ∈ closureCommutatorRepresentatives G }\n⊢ Nat.card { x // x ∈ _root_.commutator G } ≤ cardCommutatorBound (Nat.card ↑(commutatorSet G))\n[PROOFSTEP]\nhave h2 := card_commutator_dvd_index_center_pow (closureCommutatorRepresentatives G)\n[GOAL]\nG : Type u_1\ninst✝¹ : Group G\nH : Subgroup G\nR S : Set G\ninst✝ : Finite ↑(commutatorSet G)\nh1 :\n index (center { x // x ∈ closureCommutatorRepresentatives G }) ≤\n Nat.card ↑(commutatorSet { x // x ∈ closureCommutatorRepresentatives G }) ^\n Group.rank { x // x ∈ closureCommutatorRepresentatives G }\nh2 :\n Nat.card { x // x ∈ _root_.commutator { x // x ∈ closureCommutatorRepresentatives G } } ∣\n index (center { x // x ∈ closureCommutatorRepresentatives G }) ^\n (index (center { x // x ∈ closureCommutatorRepresentatives G }) *\n Nat.card ↑(commutatorSet { x // x ∈ closureCommutatorRepresentatives G }) +\n 1)\n⊢ Nat.card { x // x ∈ _root_.commutator G } ≤ cardCommutatorBound (Nat.card ↑(commutatorSet G))\n[PROOFSTEP]\nrw [card_commutatorSet_closureCommutatorRepresentatives] at h1 h2 \n[GOAL]\nG : Type u_1\ninst✝¹ : Group G\nH : Subgroup G\nR S : Set G\ninst✝ : Finite ↑(commutatorSet G)\nh1 :\n index (center { x // x ∈ closureCommutatorRepresentatives G }) ≤\n Nat.card ↑(commutatorSet G) ^ Group.rank { x // x ∈ closureCommutatorRepresentatives G }\nh2 :\n Nat.card { x // x ∈ _root_.commutator { x // x ∈ closureCommutatorRepresentatives G } } ∣\n index (center { x // x ∈ closureCommutatorRepresentatives G }) ^\n (index (center { x // x ∈ closureCommutatorRepresentatives G }) * Nat.card ↑(commutatorSet G) + 1)\n⊢ Nat.card { x // x ∈ _root_.commutator G } ≤ cardCommutatorBound (Nat.card ↑(commutatorSet G))\n[PROOFSTEP]\nrw [card_commutator_closureCommutatorRepresentatives] at h2 \n[GOAL]\nG : Type u_1\ninst✝¹ : Group G\nH : Subgroup G\nR S : Set G\ninst✝ : Finite ↑(commutatorSet G)\nh1 :\n index (center { x // x ∈ closureCommutatorRepresentatives G }) ≤\n Nat.card ↑(commutatorSet G) ^ Group.rank { x // x ∈ closureCommutatorRepresentatives G }\nh2 :\n Nat.card { x // x ∈ _root_.commutator G } ∣\n index (center { x // x ∈ closureCommutatorRepresentatives G }) ^\n (index (center { x // x ∈ closureCommutatorRepresentatives G }) * Nat.card ↑(commutatorSet G) + 1)\n⊢ Nat.card { x // x ∈ _root_.commutator G } ≤ cardCommutatorBound (Nat.card ↑(commutatorSet G))\n[PROOFSTEP]\nreplace h1 := h1.trans (Nat.pow_le_pow_of_le_right Finite.card_pos (rank_closureCommutatorRepresentatives_le G))\n[GOAL]\nG : Type u_1\ninst✝¹ : Group G\nH : Subgroup G\nR S : Set G\ninst✝ : Finite ↑(commutatorSet G)\nh2 :\n Nat.card { x // x ∈ _root_.commutator G } ∣\n index (center { x // x ∈ closureCommutatorRepresentatives G }) ^\n (index (center { x // x ∈ closureCommutatorRepresentatives G }) * Nat.card ↑(commutatorSet G) + 1)\nh1 :\n index (center { x // x ∈ closureCommutatorRepresentatives G }) ≤\n Nat.card ↑(commutatorSet G) ^ (2 * Nat.card ↑(commutatorSet G))\n⊢ Nat.card { x // x ∈ _root_.commutator G } ≤ cardCommutatorBound (Nat.card ↑(commutatorSet G))\n[PROOFSTEP]\nreplace h2 := h2.trans (pow_dvd_pow _ (add_le_add_right (mul_le_mul_right' h1 _) 1))\n[GOAL]\nG : Type u_1\ninst✝¹ : Group G\nH : Subgroup G\nR S : Set G\ninst✝ : Finite ↑(commutatorSet G)\nh1 :\n index (center { x // x ∈ closureCommutatorRepresentatives G }) ≤\n Nat.card ↑(commutatorSet G) ^ (2 * Nat.card ↑(commutatorSet G))\nh2 :\n Nat.card { x // x ∈ _root_.commutator G } ∣\n index (center { x // x ∈ closureCommutatorRepresentatives G }) ^\n (Nat.card ↑(commutatorSet G) ^ (2 * Nat.card ↑(commutatorSet G)) * Nat.card ↑(commutatorSet G) + 1)\n⊢ Nat.card { x // x ∈ _root_.commutator G } ≤ cardCommutatorBound (Nat.card ↑(commutatorSet G))\n[PROOFSTEP]\nrw [← pow_succ'] at h2 \n[GOAL]\nG : Type u_1\ninst✝¹ : Group G\nH : Subgroup G\nR S : Set G\ninst✝ : Finite ↑(commutatorSet G)\nh1 :\n index (center { x // x ∈ closureCommutatorRepresentatives G }) ≤\n Nat.card ↑(commutatorSet G) ^ (2 * Nat.card ↑(commutatorSet G))\nh2 :\n Nat.card { x // x ∈ _root_.commutator G } ∣\n index (center { x // x ∈ closureCommutatorRepresentatives G }) ^\n (Nat.card ↑(commutatorSet G) ^ (2 * Nat.card ↑(commutatorSet G) + 1) + 1)\n⊢ Nat.card { x // x ∈ _root_.commutator G } ≤ cardCommutatorBound (Nat.card ↑(commutatorSet G))\n[PROOFSTEP]\nrefine' (Nat.le_of_dvd _ h2).trans (Nat.pow_le_pow_of_le_left h1 _)\n[GOAL]\nG : Type u_1\ninst✝¹ : Group G\nH : Subgroup G\nR S : Set G\ninst✝ : Finite ↑(commutatorSet G)\nh1 :\n index (center { x // x ∈ closureCommutatorRepresentatives G }) ≤\n Nat.card ↑(commutatorSet G) ^ (2 * Nat.card ↑(commutatorSet G))\nh2 :\n Nat.card { x // x ∈ _root_.commutator G } ∣\n index (center { x // x ∈ closureCommutatorRepresentatives G }) ^\n (Nat.card ↑(commutatorSet G) ^ (2 * Nat.card ↑(commutatorSet G) + 1) + 1)\n⊢ 0 <\n index (center { x // x ∈ closureCommutatorRepresentatives G }) ^\n (Nat.card ↑(commutatorSet G) ^ (2 * Nat.card ↑(commutatorSet G) + 1) + 1)\n[PROOFSTEP]\nexact pow_pos (Nat.pos_of_ne_zero FiniteIndex.finiteIndex) _\n[GOAL]\nG : Type u_1\ninst✝¹ : Group G\nH : Subgroup G\nR S : Set G\ninst✝ : Finite ↑(commutatorSet G)\n⊢ Finite { x // x ∈ _root_.commutator G }\n[PROOFSTEP]\nhave h2 := card_commutator_dvd_index_center_pow (closureCommutatorRepresentatives G)\n[GOAL]\nG : Type u_1\ninst✝¹ : Group G\nH : Subgroup G\nR S : Set G\ninst✝ : Finite ↑(commutatorSet G)\nh2 :\n Nat.card { x // x ∈ _root_.commutator { x // x ∈ closureCommutatorRepresentatives G } } ∣\n index (center { x // x ∈ closureCommutatorRepresentatives G }) ^\n (index (center { x // x ∈ closureCommutatorRepresentatives G }) *\n Nat.card ↑(commutatorSet { x // x ∈ closureCommutatorRepresentatives G }) +\n 1)\n⊢ Finite { x // x ∈ _root_.commutator G }\n[PROOFSTEP]\nrefine' Nat.finite_of_card_ne_zero fun h => _\n[GOAL]\nG : Type u_1\ninst✝¹ : Group G\nH : Subgroup G\nR S : Set G\ninst✝ : Finite ↑(commutatorSet G)\nh2 :\n Nat.card { x // x ∈ _root_.commutator { x // x ∈ closureCommutatorRepresentatives G } } ∣\n index (center { x // x ∈ closureCommutatorRepresentatives G }) ^\n (index (center { x // x ∈ closureCommutatorRepresentatives G }) *\n Nat.card ↑(commutatorSet { x // x ∈ closureCommutatorRepresentatives G }) +\n 1)\nh : Nat.card { x // x ∈ _root_.commutator G } = 0\n⊢ False\n[PROOFSTEP]\nrw [card_commutator_closureCommutatorRepresentatives, h, zero_dvd_iff] at h2 \n[GOAL]\nG : Type u_1\ninst✝¹ : Group G\nH : Subgroup G\nR S : Set G\ninst✝ : Finite ↑(commutatorSet G)\nh2 :\n index (center { x // x ∈ closureCommutatorRepresentatives G }) ^\n (index (center { x // x ∈ closureCommutatorRepresentatives G }) *\n Nat.card ↑(commutatorSet { x // x ∈ closureCommutatorRepresentatives G }) +\n 1) =\n 0\nh : Nat.card { x // x ∈ _root_.commutator G } = 0\n⊢ False\n[PROOFSTEP]\nexact FiniteIndex.finiteIndex (pow_eq_zero h2)\n", "meta": {"mathlib_filename": "Mathlib.GroupTheory.Schreier", "llama_tokens": 17761, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO", "lm_q1_score": 0.4960938294709195, "lm_q2_score": 0.026759284737740304, "lm_q1q2_score": 0.013275116039448318}} {"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\n⊢ Injective toFun\n[PROOFSTEP]\nrintro ⟨s, f, hf⟩ ⟨t, g, hg⟩ (rfl : f = g)\n[GOAL]\ncase mk.mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\ns : Finset α\nf : α → M\nhf : ∀ (a : α), a ∈ s ↔ f a ≠ 0\nt : Finset α\nhg : ∀ (a : α), a ∈ t ↔ f a ≠ 0\n⊢ { support := s, toFun := f, mem_support_toFun := hf } = { support := t, toFun := f, mem_support_toFun := hg }\n[PROOFSTEP]\ncongr\n[GOAL]\ncase mk.mk.e_support\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\ns : Finset α\nf : α → M\nhf : ∀ (a : α), a ∈ s ↔ f a ≠ 0\nt : Finset α\nhg : ∀ (a : α), a ∈ t ↔ f a ≠ 0\n⊢ s = t\n[PROOFSTEP]\next a\n[GOAL]\ncase mk.mk.e_support.a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\ns : Finset α\nf : α → M\nhf : ∀ (a : α), a ∈ s ↔ f a ≠ 0\nt : Finset α\nhg : ∀ (a : α), a ∈ t ↔ f a ≠ 0\na : α\n⊢ a ∈ s ↔ a ∈ t\n[PROOFSTEP]\nexact (hf _).trans (hg _).symm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\nf : α →₀ M\n⊢ ↑f = 0 ↔ f = 0\n[PROOFSTEP]\nrw [← coe_zero, FunLike.coe_fn_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\nf g : α →₀ M\nx✝ : f.support = g.support ∧ ∀ (x : α), x ∈ f.support → ↑f x = ↑g x\nh₁ : f.support = g.support\nh₂ : ∀ (x : α), x ∈ f.support → ↑f x = ↑g x\na : α\n⊢ ↑f a = ↑g a\n[PROOFSTEP]\nclassical exact\n if h : a ∈ f.support then h₂ a h\n else by\n have hf : f a = 0 := not_mem_support_iff.1 h\n have hg : g a = 0 := by rwa [h₁, not_mem_support_iff] at h \n rw [hf, hg]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\nf g : α →₀ M\nx✝ : f.support = g.support ∧ ∀ (x : α), x ∈ f.support → ↑f x = ↑g x\nh₁ : f.support = g.support\nh₂ : ∀ (x : α), x ∈ f.support → ↑f x = ↑g x\na : α\n⊢ ↑f a = ↑g a\n[PROOFSTEP]\nexact\n if h : a ∈ f.support then h₂ a h\n else by\n have hf : f a = 0 := not_mem_support_iff.1 h\n have hg : g a = 0 := by rwa [h₁, not_mem_support_iff] at h \n rw [hf, hg]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\nf g : α →₀ M\nx✝ : f.support = g.support ∧ ∀ (x : α), x ∈ f.support → ↑f x = ↑g x\nh₁ : f.support = g.support\nh₂ : ∀ (x : α), x ∈ f.support → ↑f x = ↑g x\na : α\nh : ¬a ∈ f.support\n⊢ ↑f a = ↑g a\n[PROOFSTEP]\nhave hf : f a = 0 := not_mem_support_iff.1 h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\nf g : α →₀ M\nx✝ : f.support = g.support ∧ ∀ (x : α), x ∈ f.support → ↑f x = ↑g x\nh₁ : f.support = g.support\nh₂ : ∀ (x : α), x ∈ f.support → ↑f x = ↑g x\na : α\nh : ¬a ∈ f.support\nhf : ↑f a = 0\n⊢ ↑f a = ↑g a\n[PROOFSTEP]\nhave hg : g a = 0 := by rwa [h₁, not_mem_support_iff] at h \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\nf g : α →₀ M\nx✝ : f.support = g.support ∧ ∀ (x : α), x ∈ f.support → ↑f x = ↑g x\nh₁ : f.support = g.support\nh₂ : ∀ (x : α), x ∈ f.support → ↑f x = ↑g x\na : α\nh : ¬a ∈ f.support\nhf : ↑f a = 0\n⊢ ↑g a = 0\n[PROOFSTEP]\nrwa [h₁, not_mem_support_iff] at h \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\nf g : α →₀ M\nx✝ : f.support = g.support ∧ ∀ (x : α), x ∈ f.support → ↑f x = ↑g x\nh₁ : f.support = g.support\nh₂ : ∀ (x : α), x ∈ f.support → ↑f x = ↑g x\na : α\nh : ¬a ∈ f.support\nhf : ↑f a = 0\nhg : ↑g a = 0\n⊢ ↑f a = ↑g a\n[PROOFSTEP]\nrw [hf, hg]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\nf : α →₀ M\n⊢ f.support = ∅ ↔ f = 0\n[PROOFSTEP]\nexact_mod_cast @Function.support_eq_empty_iff _ _ _ f\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\nf : α →₀ M\n⊢ Finset.Nonempty f.support ↔ f ≠ 0\n[PROOFSTEP]\nsimp only [Finsupp.support_eq_empty, Finset.nonempty_iff_ne_empty, Ne.def]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\nf : α →₀ M\n⊢ f ≠ 0 ↔ ∃ a, ↑f a ≠ 0\n[PROOFSTEP]\nsimp [← Finsupp.support_eq_empty, Finset.eq_empty_iff_forall_not_mem]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\nf : α →₀ M\n⊢ card f.support = 0 ↔ f = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\ns : Set α\nf : α →₀ M\n⊢ ↑f.support ⊆ s ↔ ∀ (a : α), ¬a ∈ s → ↑f a = 0\n[PROOFSTEP]\nsimp only [Set.subset_def, mem_coe, mem_support_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\ns : Set α\nf : α →₀ M\n⊢ (∀ (x : α), ↑f x ≠ 0 → x ∈ s) ↔ ∀ (a : α), ¬a ∈ s → ↑f a = 0\n[PROOFSTEP]\nexact forall_congr' fun a => not_imp_comm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Unique α\nf g : α →₀ M\nh : ↑f default = ↑g default\na : α\n⊢ ↑f a = ↑g a\n[PROOFSTEP]\nrwa [Unique.eq_default a]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na✝ a'✝ : α\nb✝ : M\na : α\nb : M\na' : α\n⊢ (a' ∈ if b = 0 then ∅ else {a}) ↔ Pi.single a b a' ≠ 0\n[PROOFSTEP]\nclassical\nobtain rfl | hb := eq_or_ne b 0\n· simp [Pi.single, update]\nrw [if_neg hb, mem_singleton]\nobtain rfl | ha := eq_or_ne a' a\n· simp [hb, Pi.single, update]\nsimp [Pi.single_eq_of_ne' ha.symm, ha]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na✝ a'✝ : α\nb✝ : M\na : α\nb : M\na' : α\n⊢ (a' ∈ if b = 0 then ∅ else {a}) ↔ Pi.single a b a' ≠ 0\n[PROOFSTEP]\nobtain rfl | hb := eq_or_ne b 0\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na✝ a'✝ : α\nb : M\na a' : α\n⊢ (a' ∈ if 0 = 0 then ∅ else {a}) ↔ Pi.single a 0 a' ≠ 0\n[PROOFSTEP]\nsimp [Pi.single, update]\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na✝ a'✝ : α\nb✝ : M\na : α\nb : M\na' : α\nhb : b ≠ 0\n⊢ (a' ∈ if b = 0 then ∅ else {a}) ↔ Pi.single a b a' ≠ 0\n[PROOFSTEP]\nrw [if_neg hb, mem_singleton]\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na✝ a'✝ : α\nb✝ : M\na : α\nb : M\na' : α\nhb : b ≠ 0\n⊢ a' = a ↔ Pi.single a b a' ≠ 0\n[PROOFSTEP]\nobtain rfl | ha := eq_or_ne a' a\n[GOAL]\ncase inr.inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na a'✝ : α\nb✝ b : M\na' : α\nhb : b ≠ 0\n⊢ a' = a' ↔ Pi.single a' b a' ≠ 0\n[PROOFSTEP]\nsimp [hb, Pi.single, update]\n[GOAL]\ncase inr.inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na✝ a'✝ : α\nb✝ : M\na : α\nb : M\na' : α\nhb : b ≠ 0\nha : a' ≠ a\n⊢ a' = a ↔ Pi.single a b a' ≠ 0\n[PROOFSTEP]\nsimp [Pi.single_eq_of_ne' ha.symm, ha]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\na a' : α\nb : M\ninst✝ : Decidable (a = a')\n⊢ ↑(single a b) a' = if a = a' then b else 0\n[PROOFSTEP]\nclassical\nsimp_rw [@eq_comm _ a a']\nconvert Pi.single_apply a b a'\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\na a' : α\nb : M\ninst✝ : Decidable (a = a')\n⊢ ↑(single a b) a' = if a = a' then b else 0\n[PROOFSTEP]\nsimp_rw [@eq_comm _ a a']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\na a' : α\nb : M\ninst✝ : Decidable (a = a')\n⊢ ↑(single a b) a' = if a' = a then b else 0\n[PROOFSTEP]\nconvert Pi.single_apply a b a'\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na a' : α\nb : M\nf : α → β\nhf : Injective f\nx z : α\ny : M\n⊢ ↑(single (f x) y) (f z) = ↑(single x y) z\n[PROOFSTEP]\nclassical simp only [single_apply, hf.eq_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na a' : α\nb : M\nf : α → β\nhf : Injective f\nx z : α\ny : M\n⊢ ↑(single (f x) y) (f z) = ↑(single x y) z\n[PROOFSTEP]\nsimp only [single_apply, hf.eq_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na a' : α\nb : M\n⊢ ↑(single a b) = Set.indicator {a} fun x => b\n[PROOFSTEP]\nclassical\next\nsimp [single_apply, Set.indicator, @eq_comm _ a]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na a' : α\nb : M\n⊢ ↑(single a b) = Set.indicator {a} fun x => b\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na a' : α\nb : M\nx✝ : α\n⊢ ↑(single a b) x✝ = Set.indicator {a} (fun x => b) x✝\n[PROOFSTEP]\nsimp [single_apply, Set.indicator, @eq_comm _ a]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na a' : α\nb : M\n⊢ ↑(single a b) a = b\n[PROOFSTEP]\nclassical exact Pi.single_eq_same (f := λ _ => M) a b\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na a' : α\nb : M\n⊢ ↑(single a b) a = b\n[PROOFSTEP]\nexact Pi.single_eq_same (f := λ _ => M) a b\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na a' : α\nb : M\nh : a ≠ a'\n⊢ ↑(single a b) a' = 0\n[PROOFSTEP]\nclassical exact Pi.single_eq_of_ne' h _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na a' : α\nb : M\nh : a ≠ a'\n⊢ ↑(single a b) a' = 0\n[PROOFSTEP]\nexact Pi.single_eq_of_ne' h _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\na✝ a' : α\nb✝ : M\ninst✝ : DecidableEq α\na : α\nb : M\n⊢ ↑(single a b) = update 0 a b\n[PROOFSTEP]\nclassical rw [single_eq_set_indicator, ← Set.piecewise_eq_indicator, Set.piecewise_singleton]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\na✝ a' : α\nb✝ : M\ninst✝ : DecidableEq α\na : α\nb : M\n⊢ ↑(single a b) = update 0 a b\n[PROOFSTEP]\nrw [single_eq_set_indicator, ← Set.piecewise_eq_indicator, Set.piecewise_singleton]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na✝ a' : α\nb : M\na : α\n⊢ (fun f => ↑f) (single a 0) = (fun f => ↑f) 0\n[PROOFSTEP]\nclassical simpa only [single_eq_update, coe_zero] using Function.update_eq_self a (0 : α → M)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na✝ a' : α\nb : M\na : α\n⊢ (fun f => ↑f) (single a 0) = (fun f => ↑f) 0\n[PROOFSTEP]\nsimpa only [single_eq_update, coe_zero] using Function.update_eq_self a (0 : α → M)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na✝ a'✝ : α\nb✝ : M\na a' : α\nb : M\n⊢ single a (↑(single a' b) a) = ↑(single a' (single a' b)) a\n[PROOFSTEP]\nclassical\nrw [single_apply, single_apply]\next\nsplit_ifs with h\n· rw [h]\n· rw [zero_apply, single_apply, ite_self]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na✝ a'✝ : α\nb✝ : M\na a' : α\nb : M\n⊢ single a (↑(single a' b) a) = ↑(single a' (single a' b)) a\n[PROOFSTEP]\nrw [single_apply, single_apply]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na✝ a'✝ : α\nb✝ : M\na a' : α\nb : M\n⊢ single a (if a' = a then b else 0) = if a' = a then single a' b else 0\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na✝¹ a'✝ : α\nb✝ : M\na a' : α\nb : M\na✝ : α\n⊢ ↑(single a (if a' = a then b else 0)) a✝ = ↑(if a' = a then single a' b else 0) a✝\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na✝¹ a'✝ : α\nb✝ : M\na a' : α\nb : M\na✝ : α\nh : a' = a\n⊢ ↑(single a b) a✝ = ↑(single a' b) a✝\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na✝¹ a'✝ : α\nb✝ : M\na a' : α\nb : M\na✝ : α\nh : ¬a' = a\n⊢ ↑(single a 0) a✝ = ↑0 a✝\n[PROOFSTEP]\nrw [zero_apply, single_apply, ite_self]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na a' : α\nb : M\n⊢ (single a b).support ⊆ {a}\n[PROOFSTEP]\nclassical show ite _ _ _ ⊆ _; split_ifs <;> [exact empty_subset _; exact Subset.refl _]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na a' : α\nb : M\n⊢ (single a b).support ⊆ {a}\n[PROOFSTEP]\nshow ite _ _ _ ⊆ _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na a' : α\nb : M\n⊢ (if b = 0 then ∅ else {a}) ⊆ {a}\n[PROOFSTEP]\nsplit_ifs <;> [exact empty_subset _; exact Subset.refl _]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na a' : α\nb : M\n⊢ (if b = 0 then ∅ else {a}) ⊆ {a}\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na a' : α\nb : M\nh✝ : b = 0\n⊢ ∅ ⊆ {a}\n[PROOFSTEP]\nexact empty_subset _\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na a' : α\nb : M\nh✝ : ¬b = 0\n⊢ {a} ⊆ {a}\n[PROOFSTEP]\nexact Subset.refl _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na a' : α\nb : M\nx : α\n⊢ ↑(single a b) x ∈ {0, b}\n[PROOFSTEP]\nrcases em (a = x) with (rfl | hx) <;> [simp; simp [single_eq_of_ne hx]]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na a' : α\nb : M\nx : α\n⊢ ↑(single a b) x ∈ {0, b}\n[PROOFSTEP]\nrcases em (a = x) with (rfl | hx)\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na a' : α\nb : M\n⊢ ↑(single a b) a ∈ {0, b}\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na a' : α\nb : M\nx : α\nhx : ¬a = x\n⊢ ↑(single a b) x ∈ {0, b}\n[PROOFSTEP]\nsimp [single_eq_of_ne hx]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na✝ a' : α\nb : M\na : α\nb₁ b₂ : M\neq : single a b₁ = single a b₂\n⊢ b₁ = b₂\n[PROOFSTEP]\nhave : (single a b₁ : α →₀ M) a = (single a b₂ : α →₀ M) a := by rw [eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na✝ a' : α\nb : M\na : α\nb₁ b₂ : M\neq : single a b₁ = single a b₂\n⊢ ↑(single a b₁) a = ↑(single a b₂) a\n[PROOFSTEP]\nrw [eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na✝ a' : α\nb : M\na : α\nb₁ b₂ : M\neq : single a b₁ = single a b₂\nthis : ↑(single a b₁) a = ↑(single a b₂) a\n⊢ b₁ = b₂\n[PROOFSTEP]\nrwa [single_eq_same, single_eq_same] at this \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na✝ a' : α\nb✝ : M\na x : α\nb : M\n⊢ ↑(single a b) x = 0 ↔ x = a → b = 0\n[PROOFSTEP]\nsimp [single_eq_set_indicator]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na✝ a' : α\nb✝ : M\na x : α\nb : M\n⊢ ↑(single a b) x ≠ 0 ↔ x = a ∧ b ≠ 0\n[PROOFSTEP]\nsimp [single_apply_eq_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na✝ a'✝ : α\nb✝ : M\na a' : α\nb : M\n⊢ a ∈ (single a' b).support ↔ a = a' ∧ b ≠ 0\n[PROOFSTEP]\nsimp [single_apply_eq_zero, not_or]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na✝ a' : α\nb✝ : M\nf : α →₀ M\na : α\nb : M\n⊢ f = single a b ↔ f.support ⊆ {a} ∧ ↑f a = b\n[PROOFSTEP]\nrefine' ⟨fun h => h.symm ▸ ⟨support_single_subset, single_eq_same⟩, _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na✝ a' : α\nb✝ : M\nf : α →₀ M\na : α\nb : M\n⊢ f.support ⊆ {a} ∧ ↑f a = b → f = single a b\n[PROOFSTEP]\nrintro ⟨h, rfl⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na✝ a' : α\nb : M\nf : α →₀ M\na : α\nh : f.support ⊆ {a}\n⊢ f = single a (↑f a)\n[PROOFSTEP]\next x\n[GOAL]\ncase intro.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na✝ a' : α\nb : M\nf : α →₀ M\na : α\nh : f.support ⊆ {a}\nx : α\n⊢ ↑f x = ↑(single a (↑f a)) x\n[PROOFSTEP]\nby_cases hx : a = x\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na✝ a' : α\nb : M\nf : α →₀ M\na : α\nh : f.support ⊆ {a}\nx : α\nhx : a = x\n⊢ ↑f x = ↑(single a (↑f a)) x\n[PROOFSTEP]\nsimp only [hx, single_eq_same, single_eq_of_ne, Ne.def, not_false_iff]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na✝ a' : α\nb : M\nf : α →₀ M\na : α\nh : f.support ⊆ {a}\nx : α\nhx : ¬a = x\n⊢ ↑f x = ↑(single a (↑f a)) x\n[PROOFSTEP]\nsimp only [hx, single_eq_same, single_eq_of_ne, Ne.def, not_false_iff]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na✝ a' : α\nb : M\nf : α →₀ M\na : α\nh : f.support ⊆ {a}\nx : α\nhx : ¬a = x\n⊢ ↑f x = 0\n[PROOFSTEP]\nexact not_mem_support_iff.1 (mt (fun hx => (mem_singleton.1 (h hx)).symm) hx)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na a' : α\nb : M\na₁ a₂ : α\nb₁ b₂ : M\n⊢ single a₁ b₁ = single a₂ b₂ ↔ a₁ = a₂ ∧ b₁ = b₂ ∨ b₁ = 0 ∧ b₂ = 0\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na a' : α\nb : M\na₁ a₂ : α\nb₁ b₂ : M\n⊢ single a₁ b₁ = single a₂ b₂ → a₁ = a₂ ∧ b₁ = b₂ ∨ b₁ = 0 ∧ b₂ = 0\n[PROOFSTEP]\nintro eq\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na a' : α\nb : M\na₁ a₂ : α\nb₁ b₂ : M\neq : single a₁ b₁ = single a₂ b₂\n⊢ a₁ = a₂ ∧ b₁ = b₂ ∨ b₁ = 0 ∧ b₂ = 0\n[PROOFSTEP]\nby_cases h : a₁ = a₂\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na a' : α\nb : M\na₁ a₂ : α\nb₁ b₂ : M\neq : single a₁ b₁ = single a₂ b₂\nh : a₁ = a₂\n⊢ a₁ = a₂ ∧ b₁ = b₂ ∨ b₁ = 0 ∧ b₂ = 0\n[PROOFSTEP]\nrefine' Or.inl ⟨h, _⟩\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na a' : α\nb : M\na₁ a₂ : α\nb₁ b₂ : M\neq : single a₁ b₁ = single a₂ b₂\nh : a₁ = a₂\n⊢ b₁ = b₂\n[PROOFSTEP]\nrwa [h, (single_injective a₂).eq_iff] at eq \n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na a' : α\nb : M\na₁ a₂ : α\nb₁ b₂ : M\neq : single a₁ b₁ = single a₂ b₂\nh : ¬a₁ = a₂\n⊢ a₁ = a₂ ∧ b₁ = b₂ ∨ b₁ = 0 ∧ b₂ = 0\n[PROOFSTEP]\nrw [FunLike.ext_iff] at eq \n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na a' : α\nb : M\na₁ a₂ : α\nb₁ b₂ : M\neq✝ : single a₁ b₁ = single a₂ b₂\neq : ∀ (x : α), ↑(single a₁ b₁) x = ↑(single a₂ b₂) x\nh : ¬a₁ = a₂\n⊢ a₁ = a₂ ∧ b₁ = b₂ ∨ b₁ = 0 ∧ b₂ = 0\n[PROOFSTEP]\nhave h₁ := eq a₁\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na a' : α\nb : M\na₁ a₂ : α\nb₁ b₂ : M\neq✝ : single a₁ b₁ = single a₂ b₂\neq : ∀ (x : α), ↑(single a₁ b₁) x = ↑(single a₂ b₂) x\nh : ¬a₁ = a₂\nh₁ : ↑(single a₁ b₁) a₁ = ↑(single a₂ b₂) a₁\n⊢ a₁ = a₂ ∧ b₁ = b₂ ∨ b₁ = 0 ∧ b₂ = 0\n[PROOFSTEP]\nhave h₂ := eq a₂\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na a' : α\nb : M\na₁ a₂ : α\nb₁ b₂ : M\neq✝ : single a₁ b₁ = single a₂ b₂\neq : ∀ (x : α), ↑(single a₁ b₁) x = ↑(single a₂ b₂) x\nh : ¬a₁ = a₂\nh₁ : ↑(single a₁ b₁) a₁ = ↑(single a₂ b₂) a₁\nh₂ : ↑(single a₁ b₁) a₂ = ↑(single a₂ b₂) a₂\n⊢ a₁ = a₂ ∧ b₁ = b₂ ∨ b₁ = 0 ∧ b₂ = 0\n[PROOFSTEP]\nsimp only [single_eq_same, single_eq_of_ne h, single_eq_of_ne (Ne.symm h)] at h₁ h₂ \n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na a' : α\nb : M\na₁ a₂ : α\nb₁ b₂ : M\neq✝ : single a₁ b₁ = single a₂ b₂\neq : ∀ (x : α), ↑(single a₁ b₁) x = ↑(single a₂ b₂) x\nh : ¬a₁ = a₂\nh₁ : b₁ = 0\nh₂ : 0 = b₂\n⊢ a₁ = a₂ ∧ b₁ = b₂ ∨ b₁ = 0 ∧ b₂ = 0\n[PROOFSTEP]\nexact Or.inr ⟨h₁, h₂.symm⟩\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na a' : α\nb : M\na₁ a₂ : α\nb₁ b₂ : M\n⊢ a₁ = a₂ ∧ b₁ = b₂ ∨ b₁ = 0 ∧ b₂ = 0 → single a₁ b₁ = single a₂ b₂\n[PROOFSTEP]\nrintro (⟨rfl, rfl⟩ | ⟨rfl, rfl⟩)\n[GOAL]\ncase mpr.inl.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na a' : α\nb : M\na₁ : α\nb₁ : M\n⊢ single a₁ b₁ = single a₁ b₁\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mpr.inr.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na a' : α\nb : M\na₁ a₂ : α\n⊢ single a₁ 0 = single a₂ 0\n[PROOFSTEP]\nrw [single_zero, single_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na a' : α\nb : M\ni : α\nh : b ≠ 0\n⊢ (single i b).support ≠ ⊥\n[PROOFSTEP]\nsimpa only [support_single_ne_zero _ h] using singleton_ne_empty _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na a' : α\nb b' : M\nhb : b ≠ 0\nhb' : b' ≠ 0\ni j : α\n⊢ Disjoint (single i b).support (single j b').support ↔ i ≠ j\n[PROOFSTEP]\nrw [support_single_ne_zero _ hb, support_single_ne_zero _ hb', disjoint_singleton]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na a' : α\nb : M\n⊢ single a b = 0 ↔ b = 0\n[PROOFSTEP]\nsimp [FunLike.ext_iff, single_eq_set_indicator]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na a' : α\nb✝ : M\na₁ a₂ : α\nb : M\n⊢ ↑(single a₁ b) a₂ = ↑(single a₂ b) a₁\n[PROOFSTEP]\nclassical simp only [single_apply, eq_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na a' : α\nb✝ : M\na₁ a₂ : α\nb : M\n⊢ ↑(single a₁ b) a₂ = ↑(single a₂ b) a₁\n[PROOFSTEP]\nsimp only [single_apply, eq_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝² : Zero M\na a' : α\nb : M\ninst✝¹ : Nonempty α\ninst✝ : Nontrivial M\n⊢ Nontrivial (α →₀ M)\n[PROOFSTEP]\ninhabit α\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝² : Zero M\na a' : α\nb : M\ninst✝¹ : Nonempty α\ninst✝ : Nontrivial M\ninhabited_h : Inhabited α\n⊢ Nontrivial (α →₀ M)\n[PROOFSTEP]\nrcases exists_ne (0 : M) with ⟨x, hx⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝² : Zero M\na a' : α\nb : M\ninst✝¹ : Nonempty α\ninst✝ : Nontrivial M\ninhabited_h : Inhabited α\nx : M\nhx : x ≠ 0\n⊢ Nontrivial (α →₀ M)\n[PROOFSTEP]\nexact nontrivial_of_ne (single default x) 0 (mt single_eq_zero.1 hx)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\na a' : α\nb : M\ninst✝ : Unique α\nb' : M\n⊢ single a b = single a' b' ↔ b = b'\n[PROOFSTEP]\nrw [unique_ext_iff, Unique.eq_default a, Unique.eq_default a', single_eq_same, single_eq_same]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na a' : α\nb : M\nf : α →₀ M\n⊢ card f.support = 1 ↔ ∃ a, ↑f a ≠ 0 ∧ f = single a (↑f a)\n[PROOFSTEP]\nsimp only [card_eq_one, support_eq_singleton]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na a' : α\nb : M\nf : α →₀ M\n⊢ card f.support = 1 ↔ ∃ a b x, f = single a b\n[PROOFSTEP]\nsimp only [card_eq_one, support_eq_singleton']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na✝ a' : α\nb✝ : M\nf : α →₀ M\na : α\nx✝ : ∃ b, f = single a b\nb : M\nhb : f = single a b\n⊢ f.support ⊆ {a}\n[PROOFSTEP]\nrw [hb, support_subset_singleton, single_eq_same]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\na a' : α\nb : M\ninst✝ : Nonempty α\nf : α →₀ M\n⊢ card f.support ≤ 1 ↔ ∃ a, f = single a (↑f a)\n[PROOFSTEP]\nsimp only [card_le_one_iff_subset_singleton, support_subset_singleton]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\na a' : α\nb : M\ninst✝ : Nonempty α\nf : α →₀ M\n⊢ card f.support ≤ 1 ↔ ∃ a b, f = single a b\n[PROOFSTEP]\nsimp only [card_le_one_iff_subset_singleton, support_subset_singleton']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝² : Zero M\na a' : α\nb : M\ninst✝¹ : DecidableEq α\ninst✝ : Finite α\nx : α\nm : M\n⊢ ↑equivFunOnFinite (single x m) = Pi.single x m\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝² : Zero M\na a' : α\nb : M\ninst✝¹ : DecidableEq α\ninst✝ : Finite α\nx : α\nm : M\nx✝ : α\n⊢ ↑equivFunOnFinite (single x m) x✝ = Pi.single x m x✝\n[PROOFSTEP]\nsimp [Finsupp.single_eq_pi_single, equivFunOnFinite]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝² : Zero M\na a' : α\nb : M\ninst✝¹ : DecidableEq α\ninst✝ : Finite α\nx : α\nm : M\n⊢ ↑equivFunOnFinite.symm (Pi.single x m) = single x m\n[PROOFSTEP]\nrw [← equivFunOnFinite_single, Equiv.symm_apply_apply]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\nf✝ : α →₀ M\na✝ : α\nb✝ : M\ni : α\nf : α →₀ M\na : α\nb : M\n⊢ Finset α\n[PROOFSTEP]\nhaveI := Classical.decEq α\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\nf✝ : α →₀ M\na✝ : α\nb✝ : M\ni : α\nf : α →₀ M\na : α\nb : M\nthis : DecidableEq α\n⊢ Finset α\n[PROOFSTEP]\nhaveI := Classical.decEq M\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\nf✝ : α →₀ M\na✝ : α\nb✝ : M\ni : α\nf : α →₀ M\na : α\nb : M\nthis✝ : DecidableEq α\nthis : DecidableEq M\n⊢ Finset α\n[PROOFSTEP]\nexact if b = 0 then f.support.erase a else insert a f.support\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\nf✝ : α →₀ M\na✝ : α\nb✝ : M\ni✝ : α\nf : α →₀ M\na : α\nb : M\ni : α\n⊢ (i ∈ if b = 0 then erase f.support a else insert a f.support) ↔ Function.update (↑f) a b i ≠ 0\n[PROOFSTEP]\nclassical\nsimp [Function.update, Ne.def]\nsplit_ifs with hb ha ha <;> try simp only [*, not_false_iff, iff_true, not_true, iff_false]\n· rw [Finset.mem_erase]\n simp\n· rw [Finset.mem_erase]\n simp [ha]\n· rw [Finset.mem_insert]\n simp [ha]\n· rw [Finset.mem_insert]\n simp [ha]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\nf✝ : α →₀ M\na✝ : α\nb✝ : M\ni✝ : α\nf : α →₀ M\na : α\nb : M\ni : α\n⊢ (i ∈ if b = 0 then erase f.support a else insert a f.support) ↔ Function.update (↑f) a b i ≠ 0\n[PROOFSTEP]\nsimp [Function.update, Ne.def]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\nf✝ : α →₀ M\na✝ : α\nb✝ : M\ni✝ : α\nf : α →₀ M\na : α\nb : M\ni : α\n⊢ (i ∈ if b = 0 then erase f.support a else insert a f.support) ↔ ¬(if i = a then b else ↑f i) = 0\n[PROOFSTEP]\nsplit_ifs with hb ha ha\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\nf✝ : α →₀ M\na✝ : α\nb✝ : M\ni✝ : α\nf : α →₀ M\na : α\nb : M\ni : α\nhb : b = 0\nha : i = a\n⊢ i ∈ erase f.support a ↔ ¬b = 0\n[PROOFSTEP]\ntry simp only [*, not_false_iff, iff_true, not_true, iff_false]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\nf✝ : α →₀ M\na✝ : α\nb✝ : M\ni✝ : α\nf : α →₀ M\na : α\nb : M\ni : α\nhb : b = 0\nha : i = a\n⊢ i ∈ erase f.support a ↔ ¬b = 0\n[PROOFSTEP]\nsimp only [*, not_false_iff, iff_true, not_true, iff_false]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\nf✝ : α →₀ M\na✝ : α\nb✝ : M\ni✝ : α\nf : α →₀ M\na : α\nb : M\ni : α\nhb : b = 0\nha : ¬i = a\n⊢ i ∈ erase f.support a ↔ ¬↑f i = 0\n[PROOFSTEP]\ntry simp only [*, not_false_iff, iff_true, not_true, iff_false]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\nf✝ : α →₀ M\na✝ : α\nb✝ : M\ni✝ : α\nf : α →₀ M\na : α\nb : M\ni : α\nhb : b = 0\nha : ¬i = a\n⊢ i ∈ erase f.support a ↔ ¬↑f i = 0\n[PROOFSTEP]\nsimp only [*, not_false_iff, iff_true, not_true, iff_false]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\nf✝ : α →₀ M\na✝ : α\nb✝ : M\ni✝ : α\nf : α →₀ M\na : α\nb : M\ni : α\nhb : ¬b = 0\nha : i = a\n⊢ i ∈ insert a f.support ↔ ¬b = 0\n[PROOFSTEP]\ntry simp only [*, not_false_iff, iff_true, not_true, iff_false]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\nf✝ : α →₀ M\na✝ : α\nb✝ : M\ni✝ : α\nf : α →₀ M\na : α\nb : M\ni : α\nhb : ¬b = 0\nha : i = a\n⊢ i ∈ insert a f.support ↔ ¬b = 0\n[PROOFSTEP]\nsimp only [*, not_false_iff, iff_true, not_true, iff_false]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\nf✝ : α →₀ M\na✝ : α\nb✝ : M\ni✝ : α\nf : α →₀ M\na : α\nb : M\ni : α\nhb : ¬b = 0\nha : ¬i = a\n⊢ i ∈ insert a f.support ↔ ¬↑f i = 0\n[PROOFSTEP]\ntry simp only [*, not_false_iff, iff_true, not_true, iff_false]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\nf✝ : α →₀ M\na✝ : α\nb✝ : M\ni✝ : α\nf : α →₀ M\na : α\nb : M\ni : α\nhb : ¬b = 0\nha : ¬i = a\n⊢ i ∈ insert a f.support ↔ ¬↑f i = 0\n[PROOFSTEP]\nsimp only [*, not_false_iff, iff_true, not_true, iff_false]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\nf✝ : α →₀ M\na✝ : α\nb✝ : M\ni✝ : α\nf : α →₀ M\na : α\nb : M\ni : α\nhb : b = 0\nha : i = a\n⊢ ¬a ∈ erase f.support a\n[PROOFSTEP]\nrw [Finset.mem_erase]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\nf✝ : α →₀ M\na✝ : α\nb✝ : M\ni✝ : α\nf : α →₀ M\na : α\nb : M\ni : α\nhb : b = 0\nha : i = a\n⊢ ¬(a ≠ a ∧ a ∈ f.support)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\nf✝ : α →₀ M\na✝ : α\nb✝ : M\ni✝ : α\nf : α →₀ M\na : α\nb : M\ni : α\nhb : b = 0\nha : ¬i = a\n⊢ i ∈ erase f.support a ↔ ¬↑f i = 0\n[PROOFSTEP]\nrw [Finset.mem_erase]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\nf✝ : α →₀ M\na✝ : α\nb✝ : M\ni✝ : α\nf : α →₀ M\na : α\nb : M\ni : α\nhb : b = 0\nha : ¬i = a\n⊢ i ≠ a ∧ i ∈ f.support ↔ ¬↑f i = 0\n[PROOFSTEP]\nsimp [ha]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\nf✝ : α →₀ M\na✝ : α\nb✝ : M\ni✝ : α\nf : α →₀ M\na : α\nb : M\ni : α\nhb : ¬b = 0\nha : i = a\n⊢ a ∈ insert a f.support\n[PROOFSTEP]\nrw [Finset.mem_insert]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\nf✝ : α →₀ M\na✝ : α\nb✝ : M\ni✝ : α\nf : α →₀ M\na : α\nb : M\ni : α\nhb : ¬b = 0\nha : i = a\n⊢ a = a ∨ a ∈ f.support\n[PROOFSTEP]\nsimp [ha]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\nf✝ : α →₀ M\na✝ : α\nb✝ : M\ni✝ : α\nf : α →₀ M\na : α\nb : M\ni : α\nhb : ¬b = 0\nha : ¬i = a\n⊢ i ∈ insert a f.support ↔ ¬↑f i = 0\n[PROOFSTEP]\nrw [Finset.mem_insert]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\nf✝ : α →₀ M\na✝ : α\nb✝ : M\ni✝ : α\nf : α →₀ M\na : α\nb : M\ni : α\nhb : ¬b = 0\nha : ¬i = a\n⊢ i = a ∨ i ∈ f.support ↔ ¬↑f i = 0\n[PROOFSTEP]\nsimp [ha]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\nf : α →₀ M\na : α\nb : M\ni : α\ninst✝ : DecidableEq α\n⊢ ↑(update f a b) = Function.update (↑f) a b\n[PROOFSTEP]\ndelta update Function.update\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\nf : α →₀ M\na : α\nb : M\ni : α\ninst✝ : DecidableEq α\n⊢ ↑{ support := if b = 0 then erase f.support a else insert a f.support,\n toFun := fun a_1 => if h : a_1 = a then (_ : a = a_1) ▸ b else ↑f a_1,\n mem_support_toFun :=\n (_ :\n ∀ (i : α),\n (i ∈ if b = 0 then erase f.support a else insert a f.support) ↔ Function.update (↑f) a b i ≠ 0) } =\n fun a_1 => if h : a_1 = a then (_ : a = a_1) ▸ b else ↑f a_1\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\nf : α →₀ M\na : α\nb : M\ni : α\ninst✝ : DecidableEq α\nx✝ : α\n⊢ ↑{ support := if b = 0 then erase f.support a else insert a f.support,\n toFun := fun a_1 => if h : a_1 = a then (_ : a = a_1) ▸ b else ↑f a_1,\n mem_support_toFun :=\n (_ :\n ∀ (i : α),\n (i ∈ if b = 0 then erase f.support a else insert a f.support) ↔ Function.update (↑f) a b i ≠ 0) }\n x✝ =\n if h : x✝ = a then (_ : a = x✝) ▸ b else ↑f x✝\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\nf : α →₀ M\na : α\nb : M\ni : α\ninst✝ : DecidableEq α\nx✝ : α\n⊢ (if h : x✝ = a then (_ : a = x✝) ▸ b else ↑f x✝) = if h : x✝ = a then (_ : a = x✝) ▸ b else ↑f x✝\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\nf : α →₀ M\na : α\nb : M\ni : α\ninst✝ : DecidableEq α\nx✝ : α\nh✝ : x✝ = a\n⊢ (_ : a = x✝) ▸ b = (_ : a = x✝) ▸ b\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\nf : α →₀ M\na : α\nb : M\ni : α\ninst✝ : DecidableEq α\nx✝ : α\nh✝ : ¬x✝ = a\n⊢ ↑f x✝ = ↑f x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\nf : α →₀ M\na : α\nb : M\ni : α\n⊢ update f a (↑f a) = f\n[PROOFSTEP]\nclassical\next\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\nf : α →₀ M\na : α\nb : M\ni : α\n⊢ update f a (↑f a) = f\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\nf : α →₀ M\na : α\nb : M\ni a✝ : α\n⊢ ↑(update f a (↑f a)) a✝ = ↑f a✝\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\nf : α →₀ M\na : α\nb : M\ni : α\n⊢ update 0 a b = single a b\n[PROOFSTEP]\nclassical\next\nrw [single_eq_update]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\nf : α →₀ M\na : α\nb : M\ni : α\n⊢ update 0 a b = single a b\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\nf : α →₀ M\na : α\nb : M\ni a✝ : α\n⊢ ↑(update 0 a b) a✝ = ↑(single a b) a✝\n[PROOFSTEP]\nrw [single_eq_update]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\nf : α →₀ M\na : α\nb : M\ni a✝ : α\n⊢ ↑(update 0 a b) a✝ = Function.update 0 a b a✝\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝² : Zero M\nf : α →₀ M\na : α\nb : M\ni : α\ninst✝¹ : DecidableEq α\ninst✝ : DecidableEq M\n⊢ (update f a b).support = if b = 0 then erase f.support a else insert a f.support\n[PROOFSTEP]\nclassical dsimp [update]; congr <;> apply Subsingleton.elim\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝² : Zero M\nf : α →₀ M\na : α\nb : M\ni : α\ninst✝¹ : DecidableEq α\ninst✝ : DecidableEq M\n⊢ (update f a b).support = if b = 0 then erase f.support a else insert a f.support\n[PROOFSTEP]\ndsimp [update]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝² : Zero M\nf : α →₀ M\na : α\nb : M\ni : α\ninst✝¹ : DecidableEq α\ninst✝ : DecidableEq M\n⊢ (if b = 0 then erase f.support a else insert a f.support) = if b = 0 then erase f.support a else insert a f.support\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_t.h.e_2.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝² : Zero M\nf : α →₀ M\na : α\nb : M\ni : α\ninst✝¹ : DecidableEq α\ninst✝ : DecidableEq M\n⊢ (fun a b => Classical.decEq α a b) = fun a b => inst✝¹ a b\n[PROOFSTEP]\napply Subsingleton.elim\n[GOAL]\ncase e_e.h.e_3.h.h.e_2.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝² : Zero M\nf : α →₀ M\na : α\nb : M\ni : α\ninst✝¹ : DecidableEq α\ninst✝ : DecidableEq M\n⊢ (fun a b => Classical.decEq α a b) = fun a b => inst✝¹ a b\n[PROOFSTEP]\napply Subsingleton.elim\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\nf : α →₀ M\na : α\nb : M\ni : α\ninst✝ : DecidableEq α\n⊢ (update f a 0).support = erase f.support a\n[PROOFSTEP]\nclassical\nsimp only [update, ite_true, mem_support_iff, ne_eq, not_not]\ncongr; apply Subsingleton.elim\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\nf : α →₀ M\na : α\nb : M\ni : α\ninst✝ : DecidableEq α\n⊢ (update f a 0).support = erase f.support a\n[PROOFSTEP]\nsimp only [update, ite_true, mem_support_iff, ne_eq, not_not]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\nf : α →₀ M\na : α\nb : M\ni : α\ninst✝ : DecidableEq α\n⊢ erase f.support a = erase f.support a\n[PROOFSTEP]\ncongr\n[GOAL]\ncase h.e_2.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\nf : α →₀ M\na : α\nb : M\ni : α\ninst✝ : DecidableEq α\n⊢ (fun a b => Classical.decEq α a b) = fun a b => inst✝ a b\n[PROOFSTEP]\napply Subsingleton.elim\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\nf : α →₀ M\na : α\nb : M\ni : α\ninst✝ : DecidableEq α\nh : b ≠ 0\n⊢ (update f a b).support = insert a f.support\n[PROOFSTEP]\nclassical\nsimp only [update, h, ite_false, mem_support_iff, ne_eq]\ncongr; apply Subsingleton.elim\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\nf : α →₀ M\na : α\nb : M\ni : α\ninst✝ : DecidableEq α\nh : b ≠ 0\n⊢ (update f a b).support = insert a f.support\n[PROOFSTEP]\nsimp only [update, h, ite_false, mem_support_iff, ne_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\nf : α →₀ M\na : α\nb : M\ni : α\ninst✝ : DecidableEq α\nh : b ≠ 0\n⊢ insert a f.support = insert a f.support\n[PROOFSTEP]\ncongr\n[GOAL]\ncase h.e_3.h.h.e_2.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\nf : α →₀ M\na : α\nb : M\ni : α\ninst✝ : DecidableEq α\nh : b ≠ 0\n⊢ (fun a b => Classical.decEq α a b) = fun a b => inst✝ a b\n[PROOFSTEP]\napply Subsingleton.elim\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na : α\nf : α →₀ M\na' : α\n⊢ a' ∈ Finset.erase f.support a ↔ (fun a' => if a' = a then 0 else ↑f a') a' ≠ 0\n[PROOFSTEP]\nclassical\nrw [mem_erase, mem_support_iff]; dsimp\nsplit_ifs with h\nexact ⟨fun H _ => H.1 h, fun H => (H rfl).elim⟩\nexact and_iff_right h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na : α\nf : α →₀ M\na' : α\n⊢ a' ∈ Finset.erase f.support a ↔ (fun a' => if a' = a then 0 else ↑f a') a' ≠ 0\n[PROOFSTEP]\nrw [mem_erase, mem_support_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na : α\nf : α →₀ M\na' : α\n⊢ a' ≠ a ∧ ↑f a' ≠ 0 ↔ (fun a' => if a' = a then 0 else ↑f a') a' ≠ 0\n[PROOFSTEP]\ndsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na : α\nf : α →₀ M\na' : α\n⊢ ¬a' = a ∧ ¬↑f a' = 0 ↔ ¬(if a' = a then 0 else ↑f a') = 0\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na : α\nf : α →₀ M\na' : α\nh : a' = a\n⊢ ¬a' = a ∧ ¬↑f a' = 0 ↔ ¬0 = 0\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na : α\nf : α →₀ M\na' : α\nh : ¬a' = a\n⊢ ¬a' = a ∧ ¬↑f a' = 0 ↔ ¬↑f a' = 0\n[PROOFSTEP]\nexact ⟨fun H _ => H.1 h, fun H => (H rfl).elim⟩\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na : α\nf : α →₀ M\na' : α\nh : ¬a' = a\n⊢ ¬a' = a ∧ ¬↑f a' = 0 ↔ ¬↑f a' = 0\n[PROOFSTEP]\nexact and_iff_right h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : DecidableEq α\na : α\nf : α →₀ M\n⊢ (erase a f).support = Finset.erase f.support a\n[PROOFSTEP]\nclassical\ndsimp [erase]\ncongr; apply Subsingleton.elim\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : DecidableEq α\na : α\nf : α →₀ M\n⊢ (erase a f).support = Finset.erase f.support a\n[PROOFSTEP]\ndsimp [erase]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : DecidableEq α\na : α\nf : α →₀ M\n⊢ Finset.erase f.support a = Finset.erase f.support a\n[PROOFSTEP]\ncongr\n[GOAL]\ncase h.e_2.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : DecidableEq α\na : α\nf : α →₀ M\n⊢ (fun a b => Classical.decEq α a b) = fun a b => inst✝ a b\n[PROOFSTEP]\napply Subsingleton.elim\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na : α\nf : α →₀ M\n⊢ ↑(erase a f) a = 0\n[PROOFSTEP]\nclassical simp only [erase, coe_mk, ite_true]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na : α\nf : α →₀ M\n⊢ ↑(erase a f) a = 0\n[PROOFSTEP]\nsimp only [erase, coe_mk, ite_true]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na a' : α\nf : α →₀ M\nh : a' ≠ a\n⊢ ↑(erase a f) a' = ↑f a'\n[PROOFSTEP]\nclassical simp only [erase, coe_mk, h, ite_false]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na a' : α\nf : α →₀ M\nh : a' ≠ a\n⊢ ↑(erase a f) a' = ↑f a'\n[PROOFSTEP]\nsimp only [erase, coe_mk, h, ite_false]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na : α\nb : M\n⊢ erase a (single a b) = 0\n[PROOFSTEP]\next s\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na : α\nb : M\ns : α\n⊢ ↑(erase a (single a b)) s = ↑0 s\n[PROOFSTEP]\nby_cases hs : s = a\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na : α\nb : M\ns : α\nhs : s = a\n⊢ ↑(erase a (single a b)) s = ↑0 s\n[PROOFSTEP]\nrw [hs, erase_same]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na : α\nb : M\ns : α\nhs : s = a\n⊢ 0 = ↑0 a\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na : α\nb : M\ns : α\nhs : ¬s = a\n⊢ ↑(erase a (single a b)) s = ↑0 s\n[PROOFSTEP]\nrw [erase_ne hs]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na : α\nb : M\ns : α\nhs : ¬s = a\n⊢ ↑(single a b) s = ↑0 s\n[PROOFSTEP]\nexact single_eq_of_ne (Ne.symm hs)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na a' : α\nb : M\nh : a ≠ a'\n⊢ erase a (single a' b) = single a' b\n[PROOFSTEP]\next s\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na a' : α\nb : M\nh : a ≠ a'\ns : α\n⊢ ↑(erase a (single a' b)) s = ↑(single a' b) s\n[PROOFSTEP]\nby_cases hs : s = a\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na a' : α\nb : M\nh : a ≠ a'\ns : α\nhs : s = a\n⊢ ↑(erase a (single a' b)) s = ↑(single a' b) s\n[PROOFSTEP]\nrw [hs, erase_same, single_eq_of_ne h.symm]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na a' : α\nb : M\nh : a ≠ a'\ns : α\nhs : ¬s = a\n⊢ ↑(erase a (single a' b)) s = ↑(single a' b) s\n[PROOFSTEP]\nrw [erase_ne hs]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\nf : α →₀ M\na : α\nhaf : ¬a ∈ f.support\n⊢ erase a f = f\n[PROOFSTEP]\next b\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\nf : α →₀ M\na : α\nhaf : ¬a ∈ f.support\nb : α\n⊢ ↑(erase a f) b = ↑f b\n[PROOFSTEP]\nby_cases hab : b = a\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\nf : α →₀ M\na : α\nhaf : ¬a ∈ f.support\nb : α\nhab : b = a\n⊢ ↑(erase a f) b = ↑f b\n[PROOFSTEP]\nrwa [hab, erase_same, eq_comm, ← not_mem_support_iff]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\nf : α →₀ M\na : α\nhaf : ¬a ∈ f.support\nb : α\nhab : ¬b = a\n⊢ ↑(erase a f) b = ↑f b\n[PROOFSTEP]\nrw [erase_ne hab]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na : α\n⊢ erase a 0 = 0\n[PROOFSTEP]\nclassical rw [← support_eq_empty, support_erase, support_zero, erase_empty]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\na : α\n⊢ erase a 0 = 0\n[PROOFSTEP]\nrw [← support_eq_empty, support_erase, support_zero, erase_empty]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\ns : Finset α\nf : α → M\nhf : ∀ (a : α), f a ≠ 0 → a ∈ s\n⊢ ∀ (a : α), a ∈ filter (fun x => f x ≠ 0) s ↔ f a ≠ 0\n[PROOFSTEP]\nclassical simpa\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\ns : Finset α\nf : α → M\nhf : ∀ (a : α), f a ≠ 0 → a ∈ s\n⊢ ∀ (a : α), a ∈ filter (fun x => f x ≠ 0) s ↔ f a ≠ 0\n[PROOFSTEP]\nsimpa\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\ns : Finset α\nf : α → M\nhf : ∀ (a : α), f a ≠ 0 → a ∈ s\n⊢ (onFinset s f hf).support ⊆ s\n[PROOFSTEP]\nclassical convert filter_subset (f · ≠ 0) s\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\ns : Finset α\nf : α → M\nhf : ∀ (a : α), f a ≠ 0 → a ∈ s\n⊢ (onFinset s f hf).support ⊆ s\n[PROOFSTEP]\nconvert filter_subset (f · ≠ 0) s\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : Zero M\ns : Finset α\nf : α → M\nhf : ∀ (a : α), f a ≠ 0 → a ∈ s\na : α\n⊢ a ∈ (onFinset s f hf).support ↔ f a ≠ 0\n[PROOFSTEP]\nrw [Finsupp.mem_support_iff, Finsupp.onFinset_apply]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : DecidableEq M\ns : Finset α\nf : α → M\nhf : ∀ (a : α), f a ≠ 0 → a ∈ s\n⊢ (onFinset s f hf).support = filter (fun a => f a ≠ 0) s\n[PROOFSTEP]\ndsimp [onFinset]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : DecidableEq M\ns : Finset α\nf : α → M\nhf : ∀ (a : α), f a ≠ 0 → a ∈ s\n⊢ filter (fun x => ¬f x = 0) s = filter (fun a => ¬f a = 0) s\n[PROOFSTEP]\ncongr\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝² : Zero M\ninst✝¹ : Zero N\ninst✝ : Zero P\nf : M → N\nhf : f 0 = 0\ng : α →₀ M\na : α\n⊢ (f ∘ ↑g) a ≠ 0 → a ∈ g.support\n[PROOFSTEP]\nrw [mem_support_iff, not_imp_not]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝² : Zero M\ninst✝¹ : Zero N\ninst✝ : Zero P\nf : M → N\nhf : f 0 = 0\ng : α →₀ M\na : α\n⊢ ↑g a = 0 → (f ∘ ↑g) a = 0\n[PROOFSTEP]\nexact fun H => (congr_arg f H).trans hf\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝² : Zero M\ninst✝¹ : Zero N\ninst✝ : Zero P\nf : M → N\nhf : f 0 = 0\na : α\n⊢ ↑(mapRange f hf 0) a = ↑0 a\n[PROOFSTEP]\nsimp only [hf, zero_apply, mapRange_apply]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝² : Zero M\ninst✝¹ : Zero N\ninst✝ : Zero P\nf : M → N\nhf : f 0 = 0\na : α\nb : M\na' : α\n⊢ ↑(mapRange f hf (single a b)) a' = ↑(single a (f b)) a'\n[PROOFSTEP]\nclassical simpa only [single_eq_pi_single] using Pi.apply_single _ (fun _ => hf) a _ a'\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝² : Zero M\ninst✝¹ : Zero N\ninst✝ : Zero P\nf : M → N\nhf : f 0 = 0\na : α\nb : M\na' : α\n⊢ ↑(mapRange f hf (single a b)) a' = ↑(single a (f b)) a'\n[PROOFSTEP]\nsimpa only [single_eq_pi_single] using Pi.apply_single _ (fun _ => hf) a _ a'\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝² : Zero M\ninst✝¹ : Zero N\ninst✝ : Zero P\ne : M → N\nhe0 : e 0 = 0\nf : ι →₀ M\nhe : Injective e\n⊢ (mapRange e he0 f).support = f.support\n[PROOFSTEP]\next\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝² : Zero M\ninst✝¹ : Zero N\ninst✝ : Zero P\ne : M → N\nhe0 : e 0 = 0\nf : ι →₀ M\nhe : Injective e\na✝ : ι\n⊢ a✝ ∈ (mapRange e he0 f).support ↔ a✝ ∈ f.support\n[PROOFSTEP]\nsimp only [Finsupp.mem_support_iff, Ne.def, Finsupp.mapRange_apply]\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝² : Zero M\ninst✝¹ : Zero N\ninst✝ : Zero P\ne : M → N\nhe0 : e 0 = 0\nf : ι →₀ M\nhe : Injective e\na✝ : ι\n⊢ ¬e (↑f a✝) = 0 ↔ ¬↑f a✝ = 0\n[PROOFSTEP]\nexact he.ne_iff' he0\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nf : α ↪ β\nv : α →₀ M\na₂ : β\nthis : DecidableEq β\nh : a₂ ∈ map f v.support\n⊢ ∃! a, a ∈ v.support ∧ (fun a₁ => ↑f a₁ = a₂) a\n[PROOFSTEP]\nrcases Finset.mem_map.1 h with ⟨a, ha, rfl⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nf : α ↪ β\nv : α →₀ M\nthis : DecidableEq β\na : α\nha : a ∈ v.support\nh : ↑f a ∈ map f v.support\n⊢ ∃! a_1, a_1 ∈ v.support ∧ (fun a₁ => ↑f a₁ = ↑f a) a_1\n[PROOFSTEP]\nexact ExistsUnique.intro a ⟨ha, rfl⟩ fun b ⟨_, hb⟩ => f.injective hb\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nf : α ↪ β\nv : α →₀ M\na₂ : β\n⊢ a₂ ∈ map f v.support ↔\n (fun a₂ =>\n if h : a₂ ∈ map f v.support then\n ↑v (choose (fun a₁ => ↑f a₁ = a₂) v.support (_ : ∃! a, a ∈ v.support ∧ (fun a₁ => ↑f a₁ = a₂) a))\n else 0)\n a₂ ≠\n 0\n[PROOFSTEP]\ndsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nf : α ↪ β\nv : α →₀ M\na₂ : β\n⊢ a₂ ∈ map f v.support ↔\n ¬(if h : a₂ ∈ map f v.support then\n ↑v (choose (fun a₁ => ↑f a₁ = a₂) v.support (_ : ∃! a, a ∈ v.support ∧ ↑f a = a₂))\n else 0) =\n 0\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nf : α ↪ β\nv : α →₀ M\na₂ : β\nh : a₂ ∈ map f v.support\n⊢ a₂ ∈ map f v.support ↔ ¬↑v (choose (fun a₁ => ↑f a₁ = a₂) v.support (_ : ∃! a, a ∈ v.support ∧ ↑f a = a₂)) = 0\n[PROOFSTEP]\nsimp only [h, true_iff_iff, Ne.def]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nf : α ↪ β\nv : α →₀ M\na₂ : β\nh : a₂ ∈ map f v.support\n⊢ ¬↑v (choose (fun a₁ => ↑f a₁ = a₂) v.support (_ : ∃! a, a ∈ v.support ∧ ↑f a = a₂)) = 0\n[PROOFSTEP]\nrw [← not_mem_support_iff, not_not]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nf : α ↪ β\nv : α →₀ M\na₂ : β\nh : a₂ ∈ map f v.support\n⊢ choose (fun a₁ => ↑f a₁ = a₂) v.support (_ : ∃! a, a ∈ v.support ∧ ↑f a = a₂) ∈ v.support\n[PROOFSTEP]\nclassical apply Finset.choose_mem\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nf : α ↪ β\nv : α →₀ M\na₂ : β\nh : a₂ ∈ map f v.support\n⊢ choose (fun a₁ => ↑f a₁ = a₂) v.support (_ : ∃! a, a ∈ v.support ∧ ↑f a = a₂) ∈ v.support\n[PROOFSTEP]\napply Finset.choose_mem\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nf : α ↪ β\nv : α →₀ M\na₂ : β\nh : ¬a₂ ∈ map f v.support\n⊢ a₂ ∈ map f v.support ↔ ¬0 = 0\n[PROOFSTEP]\nsimp only [h, Ne.def, ne_self_iff_false]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nf : α ↪ β\nv : α →₀ M\na : α\n⊢ ↑(embDomain f v) (↑f a) = ↑v a\n[PROOFSTEP]\nclassical\nchange dite _ _ _ = _\nsplit_ifs with h <;> rw [Finset.mem_map' f] at h \n· refine' congr_arg (v : α → M) (f.inj' _)\n exact Finset.choose_property (fun a₁ => f a₁ = f a) _ _\n· exact (not_mem_support_iff.1 h).symm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nf : α ↪ β\nv : α →₀ M\na : α\n⊢ ↑(embDomain f v) (↑f a) = ↑v a\n[PROOFSTEP]\nchange dite _ _ _ = _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nf : α ↪ β\nv : α →₀ M\na : α\n⊢ (if h : ↑f a ∈ map f v.support then\n (fun h =>\n ↑v (choose (fun a₁ => ↑f a₁ = ↑f a) v.support (_ : ∃! a_1, a_1 ∈ v.support ∧ (fun a₁ => ↑f a₁ = ↑f a) a_1)))\n h\n else (fun h => 0) h) =\n ↑v a\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nf : α ↪ β\nv : α →₀ M\na : α\nh : ↑f a ∈ map f v.support\n⊢ (fun h => ↑v (choose (fun a₁ => ↑f a₁ = ↑f a) v.support (_ : ∃! a_1, a_1 ∈ v.support ∧ (fun a₁ => ↑f a₁ = ↑f a) a_1)))\n h =\n ↑v a\n[PROOFSTEP]\nrw [Finset.mem_map' f] at h \n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nf : α ↪ β\nv : α →₀ M\na : α\nh : ¬↑f a ∈ map f v.support\n⊢ (fun h => 0) h = ↑v a\n[PROOFSTEP]\nrw [Finset.mem_map' f] at h \n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nf : α ↪ β\nv : α →₀ M\na : α\nh✝ : ↑f a ∈ map f v.support\nh : a ∈ v.support\n⊢ (fun h => ↑v (choose (fun a₁ => ↑f a₁ = ↑f a) v.support (_ : ∃! a_1, a_1 ∈ v.support ∧ (fun a₁ => ↑f a₁ = ↑f a) a_1)))\n h✝ =\n ↑v a\n[PROOFSTEP]\nrefine' congr_arg (v : α → M) (f.inj' _)\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nf : α ↪ β\nv : α →₀ M\na : α\nh✝ : ↑f a ∈ map f v.support\nh : a ∈ v.support\n⊢ Embedding.toFun f\n (choose (fun a₁ => ↑f a₁ = ↑f a) v.support (_ : ∃! a_1, a_1 ∈ v.support ∧ (fun a₁ => ↑f a₁ = ↑f a) a_1)) =\n Embedding.toFun f a\n[PROOFSTEP]\nexact Finset.choose_property (fun a₁ => f a₁ = f a) _ _\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nf : α ↪ β\nv : α →₀ M\na : α\nh✝ : ¬↑f a ∈ map f v.support\nh : ¬a ∈ v.support\n⊢ (fun h => 0) h✝ = ↑v a\n[PROOFSTEP]\nexact (not_mem_support_iff.1 h).symm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nf : α ↪ β\nv : α →₀ M\na : β\nh : ¬a ∈ Set.range ↑f\n⊢ ↑(embDomain f v) a = 0\n[PROOFSTEP]\nclassical\nrefine' dif_neg (mt (fun h => _) h)\nrcases Finset.mem_map.1 h with ⟨a, _h, rfl⟩\nexact Set.mem_range_self a\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nf : α ↪ β\nv : α →₀ M\na : β\nh : ¬a ∈ Set.range ↑f\n⊢ ↑(embDomain f v) a = 0\n[PROOFSTEP]\nrefine' dif_neg (mt (fun h => _) h)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nf : α ↪ β\nv : α →₀ M\na : β\nh✝ : ¬a ∈ Set.range ↑f\nh : a ∈ map f v.support\n⊢ a ∈ Set.range ↑f\n[PROOFSTEP]\nrcases Finset.mem_map.1 h with ⟨a, _h, rfl⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nf : α ↪ β\nv : α →₀ M\na : α\n_h : a ∈ v.support\nh✝ : ¬↑f a ∈ Set.range ↑f\nh : ↑f a ∈ map f v.support\n⊢ ↑f a ∈ Set.range ↑f\n[PROOFSTEP]\nexact Set.mem_range_self a\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nf : α ↪ β\nl₁ l₂ : α →₀ M\nh : embDomain f l₁ = embDomain f l₂\na : α\n⊢ ↑l₁ a = ↑l₂ a\n[PROOFSTEP]\nsimpa only [embDomain_apply] using FunLike.ext_iff.1 h (f a)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nf : α ↪ β\ng : M → N\np : α →₀ M\nhg : g 0 = 0\n⊢ embDomain f (mapRange g hg p) = mapRange g hg (embDomain f p)\n[PROOFSTEP]\next a\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nf : α ↪ β\ng : M → N\np : α →₀ M\nhg : g 0 = 0\na : β\n⊢ ↑(embDomain f (mapRange g hg p)) a = ↑(mapRange g hg (embDomain f p)) a\n[PROOFSTEP]\nby_cases h : a ∈ Set.range f\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nf : α ↪ β\ng : M → N\np : α →₀ M\nhg : g 0 = 0\na : β\nh : a ∈ Set.range ↑f\n⊢ ↑(embDomain f (mapRange g hg p)) a = ↑(mapRange g hg (embDomain f p)) a\n[PROOFSTEP]\nrcases h with ⟨a', rfl⟩\n[GOAL]\ncase pos.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nf : α ↪ β\ng : M → N\np : α →₀ M\nhg : g 0 = 0\na' : α\n⊢ ↑(embDomain f (mapRange g hg p)) (↑f a') = ↑(mapRange g hg (embDomain f p)) (↑f a')\n[PROOFSTEP]\nrw [mapRange_apply, embDomain_apply, embDomain_apply, mapRange_apply]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nf : α ↪ β\ng : M → N\np : α →₀ M\nhg : g 0 = 0\na : β\nh : ¬a ∈ Set.range ↑f\n⊢ ↑(embDomain f (mapRange g hg p)) a = ↑(mapRange g hg (embDomain f p)) a\n[PROOFSTEP]\nrw [mapRange_apply, embDomain_notin_range, embDomain_notin_range, ← hg]\n[GOAL]\ncase neg.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nf : α ↪ β\ng : M → N\np : α →₀ M\nhg : g 0 = 0\na : β\nh : ¬a ∈ Set.range ↑f\n⊢ ¬a ∈ Set.range ↑f\n[PROOFSTEP]\nassumption\n[GOAL]\ncase neg.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nf : α ↪ β\ng : M → N\np : α →₀ M\nhg : g 0 = 0\na : β\nh : ¬a ∈ Set.range ↑f\n⊢ ¬a ∈ Set.range ↑f\n[PROOFSTEP]\nassumption\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nl : α →₀ M\nf : α ↪ β\na : β\nb : M\nhb : b ≠ 0\nh : embDomain f l = single a b\n⊢ ∃ x, l = single x b ∧ ↑f x = a\n[PROOFSTEP]\nclassical\nhave h_map_support : Finset.map f l.support = { a } := by rw [← support_embDomain, h, support_single_ne_zero _ hb]\nhave ha : a ∈ Finset.map f l.support := by simp only [h_map_support, Finset.mem_singleton]\nrcases Finset.mem_map.1 ha with ⟨c, _hc₁, hc₂⟩\nuse c\nconstructor\n· ext d\n rw [← embDomain_apply f l, h]\n by_cases h_cases : c = d\n · simp only [Eq.symm h_cases, hc₂, single_eq_same]\n · rw [single_apply, single_apply, if_neg, if_neg h_cases]\n by_contra hfd\n exact h_cases (f.injective (hc₂.trans hfd))\n· exact hc₂\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nl : α →₀ M\nf : α ↪ β\na : β\nb : M\nhb : b ≠ 0\nh : embDomain f l = single a b\n⊢ ∃ x, l = single x b ∧ ↑f x = a\n[PROOFSTEP]\nhave h_map_support : Finset.map f l.support = { a } := by rw [← support_embDomain, h, support_single_ne_zero _ hb]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nl : α →₀ M\nf : α ↪ β\na : β\nb : M\nhb : b ≠ 0\nh : embDomain f l = single a b\n⊢ map f l.support = {a}\n[PROOFSTEP]\nrw [← support_embDomain, h, support_single_ne_zero _ hb]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nl : α →₀ M\nf : α ↪ β\na : β\nb : M\nhb : b ≠ 0\nh : embDomain f l = single a b\nh_map_support : map f l.support = {a}\n⊢ ∃ x, l = single x b ∧ ↑f x = a\n[PROOFSTEP]\nhave ha : a ∈ Finset.map f l.support := by simp only [h_map_support, Finset.mem_singleton]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nl : α →₀ M\nf : α ↪ β\na : β\nb : M\nhb : b ≠ 0\nh : embDomain f l = single a b\nh_map_support : map f l.support = {a}\n⊢ a ∈ map f l.support\n[PROOFSTEP]\nsimp only [h_map_support, Finset.mem_singleton]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nl : α →₀ M\nf : α ↪ β\na : β\nb : M\nhb : b ≠ 0\nh : embDomain f l = single a b\nh_map_support : map f l.support = {a}\nha : a ∈ map f l.support\n⊢ ∃ x, l = single x b ∧ ↑f x = a\n[PROOFSTEP]\nrcases Finset.mem_map.1 ha with ⟨c, _hc₁, hc₂⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nl : α →₀ M\nf : α ↪ β\na : β\nb : M\nhb : b ≠ 0\nh : embDomain f l = single a b\nh_map_support : map f l.support = {a}\nha : a ∈ map f l.support\nc : α\n_hc₁ : c ∈ l.support\nhc₂ : ↑f c = a\n⊢ ∃ x, l = single x b ∧ ↑f x = a\n[PROOFSTEP]\nuse c\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nl : α →₀ M\nf : α ↪ β\na : β\nb : M\nhb : b ≠ 0\nh : embDomain f l = single a b\nh_map_support : map f l.support = {a}\nha : a ∈ map f l.support\nc : α\n_hc₁ : c ∈ l.support\nhc₂ : ↑f c = a\n⊢ l = single c b ∧ ↑f c = a\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.left\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nl : α →₀ M\nf : α ↪ β\na : β\nb : M\nhb : b ≠ 0\nh : embDomain f l = single a b\nh_map_support : map f l.support = {a}\nha : a ∈ map f l.support\nc : α\n_hc₁ : c ∈ l.support\nhc₂ : ↑f c = a\n⊢ l = single c b\n[PROOFSTEP]\next d\n[GOAL]\ncase h.left.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nl : α →₀ M\nf : α ↪ β\na : β\nb : M\nhb : b ≠ 0\nh : embDomain f l = single a b\nh_map_support : map f l.support = {a}\nha : a ∈ map f l.support\nc : α\n_hc₁ : c ∈ l.support\nhc₂ : ↑f c = a\nd : α\n⊢ ↑l d = ↑(single c b) d\n[PROOFSTEP]\nrw [← embDomain_apply f l, h]\n[GOAL]\ncase h.left.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nl : α →₀ M\nf : α ↪ β\na : β\nb : M\nhb : b ≠ 0\nh : embDomain f l = single a b\nh_map_support : map f l.support = {a}\nha : a ∈ map f l.support\nc : α\n_hc₁ : c ∈ l.support\nhc₂ : ↑f c = a\nd : α\n⊢ ↑(single a b) (↑f d) = ↑(single c b) d\n[PROOFSTEP]\nby_cases h_cases : c = d\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nl : α →₀ M\nf : α ↪ β\na : β\nb : M\nhb : b ≠ 0\nh : embDomain f l = single a b\nh_map_support : map f l.support = {a}\nha : a ∈ map f l.support\nc : α\n_hc₁ : c ∈ l.support\nhc₂ : ↑f c = a\nd : α\nh_cases : c = d\n⊢ ↑(single a b) (↑f d) = ↑(single c b) d\n[PROOFSTEP]\nsimp only [Eq.symm h_cases, hc₂, single_eq_same]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nl : α →₀ M\nf : α ↪ β\na : β\nb : M\nhb : b ≠ 0\nh : embDomain f l = single a b\nh_map_support : map f l.support = {a}\nha : a ∈ map f l.support\nc : α\n_hc₁ : c ∈ l.support\nhc₂ : ↑f c = a\nd : α\nh_cases : ¬c = d\n⊢ ↑(single a b) (↑f d) = ↑(single c b) d\n[PROOFSTEP]\nrw [single_apply, single_apply, if_neg, if_neg h_cases]\n[GOAL]\ncase neg.hnc\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nl : α →₀ M\nf : α ↪ β\na : β\nb : M\nhb : b ≠ 0\nh : embDomain f l = single a b\nh_map_support : map f l.support = {a}\nha : a ∈ map f l.support\nc : α\n_hc₁ : c ∈ l.support\nhc₂ : ↑f c = a\nd : α\nh_cases : ¬c = d\n⊢ ¬a = ↑f d\n[PROOFSTEP]\nby_contra hfd\n[GOAL]\ncase neg.hnc\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nl : α →₀ M\nf : α ↪ β\na : β\nb : M\nhb : b ≠ 0\nh : embDomain f l = single a b\nh_map_support : map f l.support = {a}\nha : a ∈ map f l.support\nc : α\n_hc₁ : c ∈ l.support\nhc₂ : ↑f c = a\nd : α\nh_cases : ¬c = d\nhfd : a = ↑f d\n⊢ False\n[PROOFSTEP]\nexact h_cases (f.injective (hc₂.trans hfd))\n[GOAL]\ncase h.right\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nl : α →₀ M\nf : α ↪ β\na : β\nb : M\nhb : b ≠ 0\nh : embDomain f l = single a b\nh_map_support : map f l.support = {a}\nha : a ∈ map f l.support\nc : α\n_hc₁ : c ∈ l.support\nhc₂ : ↑f c = a\n⊢ ↑f c = a\n[PROOFSTEP]\nexact hc₂\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nf : α ↪ β\na : α\nm : M\n⊢ embDomain f (single a m) = single (↑f a) m\n[PROOFSTEP]\nclassical\next b\nby_cases h : b ∈ Set.range f\n· rcases h with ⟨a', rfl⟩\n simp [single_apply]\n· simp only [embDomain_notin_range, h, single_apply, not_false_iff]\n rw [if_neg]\n rintro rfl\n simp at h \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nf : α ↪ β\na : α\nm : M\n⊢ embDomain f (single a m) = single (↑f a) m\n[PROOFSTEP]\next b\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nf : α ↪ β\na : α\nm : M\nb : β\n⊢ ↑(embDomain f (single a m)) b = ↑(single (↑f a) m) b\n[PROOFSTEP]\nby_cases h : b ∈ Set.range f\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nf : α ↪ β\na : α\nm : M\nb : β\nh : b ∈ Set.range ↑f\n⊢ ↑(embDomain f (single a m)) b = ↑(single (↑f a) m) b\n[PROOFSTEP]\nrcases h with ⟨a', rfl⟩\n[GOAL]\ncase pos.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nf : α ↪ β\na : α\nm : M\na' : α\n⊢ ↑(embDomain f (single a m)) (↑f a') = ↑(single (↑f a) m) (↑f a')\n[PROOFSTEP]\nsimp [single_apply]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nf : α ↪ β\na : α\nm : M\nb : β\nh : ¬b ∈ Set.range ↑f\n⊢ ↑(embDomain f (single a m)) b = ↑(single (↑f a) m) b\n[PROOFSTEP]\nsimp only [embDomain_notin_range, h, single_apply, not_false_iff]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nf : α ↪ β\na : α\nm : M\nb : β\nh : ¬b ∈ Set.range ↑f\n⊢ 0 = if ↑f a = b then m else 0\n[PROOFSTEP]\nrw [if_neg]\n[GOAL]\ncase neg.hnc\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nf : α ↪ β\na : α\nm : M\nb : β\nh : ¬b ∈ Set.range ↑f\n⊢ ¬↑f a = b\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase neg.hnc\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : Zero M\ninst✝ : Zero N\nf : α ↪ β\na : α\nm : M\nh : ¬↑f a ∈ Set.range ↑f\n⊢ False\n[PROOFSTEP]\nsimp at h \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH✝ : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝² : Zero M\ninst✝¹ : Zero N\ninst✝ : Zero P\nf : M → N → P\nhf : f 0 0 = 0\ng₁ : α →₀ M\ng₂ : α →₀ N\na : α\nH : f (↑g₁ a) (↑g₂ a) ≠ 0\n⊢ a ∈ g₁.support ∪ g₂.support\n[PROOFSTEP]\nclassical\nrw [mem_union, mem_support_iff, mem_support_iff, ← not_and_or]\nrintro ⟨h₁, h₂⟩; rw [h₁, h₂] at H ; exact H hf\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH✝ : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝² : Zero M\ninst✝¹ : Zero N\ninst✝ : Zero P\nf : M → N → P\nhf : f 0 0 = 0\ng₁ : α →₀ M\ng₂ : α →₀ N\na : α\nH : f (↑g₁ a) (↑g₂ a) ≠ 0\n⊢ a ∈ g₁.support ∪ g₂.support\n[PROOFSTEP]\nrw [mem_union, mem_support_iff, mem_support_iff, ← not_and_or]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH✝ : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝² : Zero M\ninst✝¹ : Zero N\ninst✝ : Zero P\nf : M → N → P\nhf : f 0 0 = 0\ng₁ : α →₀ M\ng₂ : α →₀ N\na : α\nH : f (↑g₁ a) (↑g₂ a) ≠ 0\n⊢ ¬(↑g₁ a = 0 ∧ ↑g₂ a = 0)\n[PROOFSTEP]\nrintro ⟨h₁, h₂⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH✝ : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝² : Zero M\ninst✝¹ : Zero N\ninst✝ : Zero P\nf : M → N → P\nhf : f 0 0 = 0\ng₁ : α →₀ M\ng₂ : α →₀ N\na : α\nH : f (↑g₁ a) (↑g₂ a) ≠ 0\nh₁ : ↑g₁ a = 0\nh₂ : ↑g₂ a = 0\n⊢ False\n[PROOFSTEP]\nrw [h₁, h₂] at H \n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH✝ : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝² : Zero M\ninst✝¹ : Zero N\ninst✝ : Zero P\nf : M → N → P\nhf : f 0 0 = 0\ng₁ : α →₀ M\ng₂ : α →₀ N\na : α\nH : f 0 0 ≠ 0\nh₁ : ↑g₁ a = 0\nh₂ : ↑g₂ a = 0\n⊢ False\n[PROOFSTEP]\nexact H hf\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝² : Zero M\ninst✝¹ : Zero N\ninst✝ : Zero P\nD : DecidableEq α\nf : M → N → P\nhf : f 0 0 = 0\ng₁ : α →₀ M\ng₂ : α →₀ N\n⊢ (zipWith f hf g₁ g₂).support ⊆ g₁.support ∪ g₂.support\n[PROOFSTEP]\nrw [Subsingleton.elim D]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝² : Zero M\ninst✝¹ : Zero N\ninst✝ : Zero P\nD : DecidableEq α\nf : M → N → P\nhf : f 0 0 = 0\ng₁ : α →₀ M\ng₂ : α →₀ N\n⊢ (zipWith f hf g₁ g₂).support ⊆ g₁.support ∪ g₂.support\n[PROOFSTEP]\nexact support_onFinset_subset\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : AddZeroClass M\ninst✝ : DecidableEq α\ng₁ g₂ : α →₀ M\nh : Disjoint g₁.support g₂.support\na : α\nha✝ : a ∈ g₁.support ∪ g₂.support\nha : a ∈ g₁.support\n⊢ a ∈ (g₁ + g₂).support\n[PROOFSTEP]\nhave : a ∉ g₂.support := disjoint_left.1 h ha\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : AddZeroClass M\ninst✝ : DecidableEq α\ng₁ g₂ : α →₀ M\nh : Disjoint g₁.support g₂.support\na : α\nha✝ : a ∈ g₁.support ∪ g₂.support\nha : a ∈ g₁.support\nthis : ¬a ∈ g₂.support\n⊢ a ∈ (g₁ + g₂).support\n[PROOFSTEP]\nsimp only [mem_support_iff, not_not] at *\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : AddZeroClass M\ninst✝ : DecidableEq α\ng₁ g₂ : α →₀ M\nh : Disjoint g₁.support g₂.support\na : α\nha✝ : a ∈ g₁.support ∪ g₂.support\nha : ↑g₁ a ≠ 0\nthis : ↑g₂ a = 0\n⊢ ↑(g₁ + g₂) a ≠ 0\n[PROOFSTEP]\nsimpa only [add_apply, this, add_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : AddZeroClass M\ninst✝ : DecidableEq α\ng₁ g₂ : α →₀ M\nh : Disjoint g₁.support g₂.support\na : α\nha✝ : a ∈ g₁.support ∪ g₂.support\nha : a ∈ g₂.support\n⊢ a ∈ (g₁ + g₂).support\n[PROOFSTEP]\nhave : a ∉ g₁.support := disjoint_right.1 h ha\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : AddZeroClass M\ninst✝ : DecidableEq α\ng₁ g₂ : α →₀ M\nh : Disjoint g₁.support g₂.support\na : α\nha✝ : a ∈ g₁.support ∪ g₂.support\nha : a ∈ g₂.support\nthis : ¬a ∈ g₁.support\n⊢ a ∈ (g₁ + g₂).support\n[PROOFSTEP]\nsimp only [mem_support_iff, not_not] at *\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : AddZeroClass M\ninst✝ : DecidableEq α\ng₁ g₂ : α →₀ M\nh : Disjoint g₁.support g₂.support\na : α\nha✝ : a ∈ g₁.support ∪ g₂.support\nha : ↑g₂ a ≠ 0\nthis : ↑g₁ a = 0\n⊢ ↑(g₁ + g₂) a ≠ 0\n[PROOFSTEP]\nsimpa only [add_apply, this, zero_add]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddZeroClass M\na : α\nb₁ b₂ : M\na' : α\n⊢ ↑(single a (b₁ + b₂)) a' = ↑(single a b₁ + single a b₂) a'\n[PROOFSTEP]\nby_cases h : a = a'\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddZeroClass M\na : α\nb₁ b₂ : M\na' : α\nh : a = a'\n⊢ ↑(single a (b₁ + b₂)) a' = ↑(single a b₁ + single a b₂) a'\n[PROOFSTEP]\nrw [h, add_apply, single_eq_same, single_eq_same, single_eq_same]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddZeroClass M\na : α\nb₁ b₂ : M\na' : α\nh : ¬a = a'\n⊢ ↑(single a (b₁ + b₂)) a' = ↑(single a b₁ + single a b₂) a'\n[PROOFSTEP]\nrw [add_apply, single_eq_of_ne h, single_eq_of_ne h, single_eq_of_ne h, zero_add]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddZeroClass M\nf : α →₀ M\na : α\nb : M\n⊢ update f a b = single a b + erase a f\n[PROOFSTEP]\nclassical\next j\nrcases eq_or_ne a j with (rfl | h)\n· simp\n· simp [Function.update_noteq h.symm, single_apply, h, erase_ne, h.symm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddZeroClass M\nf : α →₀ M\na : α\nb : M\n⊢ update f a b = single a b + erase a f\n[PROOFSTEP]\next j\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddZeroClass M\nf : α →₀ M\na : α\nb : M\nj : α\n⊢ ↑(update f a b) j = ↑(single a b + erase a f) j\n[PROOFSTEP]\nrcases eq_or_ne a j with (rfl | h)\n[GOAL]\ncase h.inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddZeroClass M\nf : α →₀ M\na : α\nb : M\n⊢ ↑(update f a b) a = ↑(single a b + erase a f) a\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddZeroClass M\nf : α →₀ M\na : α\nb : M\nj : α\nh : a ≠ j\n⊢ ↑(update f a b) j = ↑(single a b + erase a f) j\n[PROOFSTEP]\nsimp [Function.update_noteq h.symm, single_apply, h, erase_ne, h.symm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddZeroClass M\nf : α →₀ M\na : α\nb : M\n⊢ update f a b = erase a f + single a b\n[PROOFSTEP]\nclassical\next j\nrcases eq_or_ne a j with (rfl | h)\n· simp\n· simp [Function.update_noteq h.symm, single_apply, h, erase_ne, h.symm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddZeroClass M\nf : α →₀ M\na : α\nb : M\n⊢ update f a b = erase a f + single a b\n[PROOFSTEP]\next j\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddZeroClass M\nf : α →₀ M\na : α\nb : M\nj : α\n⊢ ↑(update f a b) j = ↑(erase a f + single a b) j\n[PROOFSTEP]\nrcases eq_or_ne a j with (rfl | h)\n[GOAL]\ncase h.inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddZeroClass M\nf : α →₀ M\na : α\nb : M\n⊢ ↑(update f a b) a = ↑(erase a f + single a b) a\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddZeroClass M\nf : α →₀ M\na : α\nb : M\nj : α\nh : a ≠ j\n⊢ ↑(update f a b) j = ↑(erase a f + single a b) j\n[PROOFSTEP]\nsimp [Function.update_noteq h.symm, single_apply, h, erase_ne, h.symm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddZeroClass M\na : α\nf : α →₀ M\n⊢ single a (↑f a) + erase a f = f\n[PROOFSTEP]\nrw [← update_eq_single_add_erase, update_self]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddZeroClass M\na : α\nf : α →₀ M\n⊢ erase a f + single a (↑f a) = f\n[PROOFSTEP]\nrw [← update_eq_erase_add_single, update_self]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddZeroClass M\na : α\nf f' : α →₀ M\n⊢ erase a (f + f') = erase a f + erase a f'\n[PROOFSTEP]\next s\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddZeroClass M\na : α\nf f' : α →₀ M\ns : α\n⊢ ↑(erase a (f + f')) s = ↑(erase a f + erase a f') s\n[PROOFSTEP]\nby_cases hs : s = a\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddZeroClass M\na : α\nf f' : α →₀ M\ns : α\nhs : s = a\n⊢ ↑(erase a (f + f')) s = ↑(erase a f + erase a f') s\n[PROOFSTEP]\nrw [hs, add_apply, erase_same, erase_same, erase_same, add_zero]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddZeroClass M\na : α\nf f' : α →₀ M\ns : α\nhs : ¬s = a\n⊢ ↑(erase a (f + f')) s = ↑(erase a f + erase a f') s\n[PROOFSTEP]\nrw [add_apply, erase_ne hs, erase_ne hs, erase_ne hs, add_apply]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddZeroClass M\np : (α →₀ M) → Prop\nf✝ : α →₀ M\nh0 : p 0\nha : ∀ (a : α) (b : M) (f : α →₀ M), ¬a ∈ f.support → b ≠ 0 → p f → p (single a b + f)\ns : Finset α\nf : α →₀ M\nhf : f.support = ∅\n⊢ p f\n[PROOFSTEP]\nrwa [support_eq_empty.1 hf]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddZeroClass M\np : (α →₀ M) → Prop\nf✝ : α →₀ M\nh0 : p 0\nha : ∀ (a : α) (b : M) (f : α →₀ M), ¬a ∈ f.support → b ≠ 0 → p f → p (single a b + f)\ns✝ : Finset α\na : α\ns : Finset α\nhas : ¬a ∈ s\nih : ∀ (f : α →₀ M), f.support = s → p f\nf : α →₀ M\nhf : f.support = cons a s has\n⊢ p f\n[PROOFSTEP]\nsuffices p (single a (f a) + f.erase a) by rwa [single_add_erase] at this \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddZeroClass M\np : (α →₀ M) → Prop\nf✝ : α →₀ M\nh0 : p 0\nha : ∀ (a : α) (b : M) (f : α →₀ M), ¬a ∈ f.support → b ≠ 0 → p f → p (single a b + f)\ns✝ : Finset α\na : α\ns : Finset α\nhas : ¬a ∈ s\nih : ∀ (f : α →₀ M), f.support = s → p f\nf : α →₀ M\nhf : f.support = cons a s has\nthis : p (single a (↑f a) + erase a f)\n⊢ p f\n[PROOFSTEP]\nrwa [single_add_erase] at this \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddZeroClass M\np : (α →₀ M) → Prop\nf✝ : α →₀ M\nh0 : p 0\nha : ∀ (a : α) (b : M) (f : α →₀ M), ¬a ∈ f.support → b ≠ 0 → p f → p (single a b + f)\ns✝ : Finset α\na : α\ns : Finset α\nhas : ¬a ∈ s\nih : ∀ (f : α →₀ M), f.support = s → p f\nf : α →₀ M\nhf : f.support = cons a s has\n⊢ p (single a (↑f a) + erase a f)\n[PROOFSTEP]\nclassical\napply ha\n· rw [support_erase, mem_erase]\n exact fun H => H.1 rfl\n· rw [← mem_support_iff, hf]\n exact mem_cons_self _ _\n· apply ih _ _\n rw [support_erase, hf, Finset.erase_cons]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddZeroClass M\np : (α →₀ M) → Prop\nf✝ : α →₀ M\nh0 : p 0\nha : ∀ (a : α) (b : M) (f : α →₀ M), ¬a ∈ f.support → b ≠ 0 → p f → p (single a b + f)\ns✝ : Finset α\na : α\ns : Finset α\nhas : ¬a ∈ s\nih : ∀ (f : α →₀ M), f.support = s → p f\nf : α →₀ M\nhf : f.support = cons a s has\n⊢ p (single a (↑f a) + erase a f)\n[PROOFSTEP]\napply ha\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddZeroClass M\np : (α →₀ M) → Prop\nf✝ : α →₀ M\nh0 : p 0\nha : ∀ (a : α) (b : M) (f : α →₀ M), ¬a ∈ f.support → b ≠ 0 → p f → p (single a b + f)\ns✝ : Finset α\na : α\ns : Finset α\nhas : ¬a ∈ s\nih : ∀ (f : α →₀ M), f.support = s → p f\nf : α →₀ M\nhf : f.support = cons a s has\n⊢ ¬a ∈ (erase a f).support\n[PROOFSTEP]\nrw [support_erase, mem_erase]\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddZeroClass M\np : (α →₀ M) → Prop\nf✝ : α →₀ M\nh0 : p 0\nha : ∀ (a : α) (b : M) (f : α →₀ M), ¬a ∈ f.support → b ≠ 0 → p f → p (single a b + f)\ns✝ : Finset α\na : α\ns : Finset α\nhas : ¬a ∈ s\nih : ∀ (f : α →₀ M), f.support = s → p f\nf : α →₀ M\nhf : f.support = cons a s has\n⊢ ¬(a ≠ a ∧ a ∈ f.support)\n[PROOFSTEP]\nexact fun H => H.1 rfl\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddZeroClass M\np : (α →₀ M) → Prop\nf✝ : α →₀ M\nh0 : p 0\nha : ∀ (a : α) (b : M) (f : α →₀ M), ¬a ∈ f.support → b ≠ 0 → p f → p (single a b + f)\ns✝ : Finset α\na : α\ns : Finset α\nhas : ¬a ∈ s\nih : ∀ (f : α →₀ M), f.support = s → p f\nf : α →₀ M\nhf : f.support = cons a s has\n⊢ ↑f a ≠ 0\n[PROOFSTEP]\nrw [← mem_support_iff, hf]\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddZeroClass M\np : (α →₀ M) → Prop\nf✝ : α →₀ M\nh0 : p 0\nha : ∀ (a : α) (b : M) (f : α →₀ M), ¬a ∈ f.support → b ≠ 0 → p f → p (single a b + f)\ns✝ : Finset α\na : α\ns : Finset α\nhas : ¬a ∈ s\nih : ∀ (f : α →₀ M), f.support = s → p f\nf : α →₀ M\nhf : f.support = cons a s has\n⊢ a ∈ cons a s has\n[PROOFSTEP]\nexact mem_cons_self _ _\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddZeroClass M\np : (α →₀ M) → Prop\nf✝ : α →₀ M\nh0 : p 0\nha : ∀ (a : α) (b : M) (f : α →₀ M), ¬a ∈ f.support → b ≠ 0 → p f → p (single a b + f)\ns✝ : Finset α\na : α\ns : Finset α\nhas : ¬a ∈ s\nih : ∀ (f : α →₀ M), f.support = s → p f\nf : α →₀ M\nhf : f.support = cons a s has\n⊢ p (erase a f)\n[PROOFSTEP]\napply ih _ _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddZeroClass M\np : (α →₀ M) → Prop\nf✝ : α →₀ M\nh0 : p 0\nha : ∀ (a : α) (b : M) (f : α →₀ M), ¬a ∈ f.support → b ≠ 0 → p f → p (single a b + f)\ns✝ : Finset α\na : α\ns : Finset α\nhas : ¬a ∈ s\nih : ∀ (f : α →₀ M), f.support = s → p f\nf : α →₀ M\nhf : f.support = cons a s has\n⊢ (erase a f).support = s\n[PROOFSTEP]\nrw [support_erase, hf, Finset.erase_cons]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddZeroClass M\np : (α →₀ M) → Prop\nf✝ : α →₀ M\nh0 : p 0\nha : ∀ (a : α) (b : M) (f : α →₀ M), ¬a ∈ f.support → b ≠ 0 → p f → p (f + single a b)\ns : Finset α\nf : α →₀ M\nhf : f.support = ∅\n⊢ p f\n[PROOFSTEP]\nrwa [support_eq_empty.1 hf]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddZeroClass M\np : (α →₀ M) → Prop\nf✝ : α →₀ M\nh0 : p 0\nha : ∀ (a : α) (b : M) (f : α →₀ M), ¬a ∈ f.support → b ≠ 0 → p f → p (f + single a b)\ns✝ : Finset α\na : α\ns : Finset α\nhas : ¬a ∈ s\nih : ∀ (f : α →₀ M), f.support = s → p f\nf : α →₀ M\nhf : f.support = cons a s has\n⊢ p f\n[PROOFSTEP]\nsuffices p (f.erase a + single a (f a)) by rwa [erase_add_single] at this \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddZeroClass M\np : (α →₀ M) → Prop\nf✝ : α →₀ M\nh0 : p 0\nha : ∀ (a : α) (b : M) (f : α →₀ M), ¬a ∈ f.support → b ≠ 0 → p f → p (f + single a b)\ns✝ : Finset α\na : α\ns : Finset α\nhas : ¬a ∈ s\nih : ∀ (f : α →₀ M), f.support = s → p f\nf : α →₀ M\nhf : f.support = cons a s has\nthis : p (erase a f + single a (↑f a))\n⊢ p f\n[PROOFSTEP]\nrwa [erase_add_single] at this \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddZeroClass M\np : (α →₀ M) → Prop\nf✝ : α →₀ M\nh0 : p 0\nha : ∀ (a : α) (b : M) (f : α →₀ M), ¬a ∈ f.support → b ≠ 0 → p f → p (f + single a b)\ns✝ : Finset α\na : α\ns : Finset α\nhas : ¬a ∈ s\nih : ∀ (f : α →₀ M), f.support = s → p f\nf : α →₀ M\nhf : f.support = cons a s has\n⊢ p (erase a f + single a (↑f a))\n[PROOFSTEP]\nclassical\napply ha\n· rw [support_erase, mem_erase]\n exact fun H => H.1 rfl\n· rw [← mem_support_iff, hf]\n exact mem_cons_self _ _\n· apply ih _ _\n rw [support_erase, hf, Finset.erase_cons]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddZeroClass M\np : (α →₀ M) → Prop\nf✝ : α →₀ M\nh0 : p 0\nha : ∀ (a : α) (b : M) (f : α →₀ M), ¬a ∈ f.support → b ≠ 0 → p f → p (f + single a b)\ns✝ : Finset α\na : α\ns : Finset α\nhas : ¬a ∈ s\nih : ∀ (f : α →₀ M), f.support = s → p f\nf : α →₀ M\nhf : f.support = cons a s has\n⊢ p (erase a f + single a (↑f a))\n[PROOFSTEP]\napply ha\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddZeroClass M\np : (α →₀ M) → Prop\nf✝ : α →₀ M\nh0 : p 0\nha : ∀ (a : α) (b : M) (f : α →₀ M), ¬a ∈ f.support → b ≠ 0 → p f → p (f + single a b)\ns✝ : Finset α\na : α\ns : Finset α\nhas : ¬a ∈ s\nih : ∀ (f : α →₀ M), f.support = s → p f\nf : α →₀ M\nhf : f.support = cons a s has\n⊢ ¬a ∈ (erase a f).support\n[PROOFSTEP]\nrw [support_erase, mem_erase]\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddZeroClass M\np : (α →₀ M) → Prop\nf✝ : α →₀ M\nh0 : p 0\nha : ∀ (a : α) (b : M) (f : α →₀ M), ¬a ∈ f.support → b ≠ 0 → p f → p (f + single a b)\ns✝ : Finset α\na : α\ns : Finset α\nhas : ¬a ∈ s\nih : ∀ (f : α →₀ M), f.support = s → p f\nf : α →₀ M\nhf : f.support = cons a s has\n⊢ ¬(a ≠ a ∧ a ∈ f.support)\n[PROOFSTEP]\nexact fun H => H.1 rfl\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddZeroClass M\np : (α →₀ M) → Prop\nf✝ : α →₀ M\nh0 : p 0\nha : ∀ (a : α) (b : M) (f : α →₀ M), ¬a ∈ f.support → b ≠ 0 → p f → p (f + single a b)\ns✝ : Finset α\na : α\ns : Finset α\nhas : ¬a ∈ s\nih : ∀ (f : α →₀ M), f.support = s → p f\nf : α →₀ M\nhf : f.support = cons a s has\n⊢ ↑f a ≠ 0\n[PROOFSTEP]\nrw [← mem_support_iff, hf]\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddZeroClass M\np : (α →₀ M) → Prop\nf✝ : α →₀ M\nh0 : p 0\nha : ∀ (a : α) (b : M) (f : α →₀ M), ¬a ∈ f.support → b ≠ 0 → p f → p (f + single a b)\ns✝ : Finset α\na : α\ns : Finset α\nhas : ¬a ∈ s\nih : ∀ (f : α →₀ M), f.support = s → p f\nf : α →₀ M\nhf : f.support = cons a s has\n⊢ a ∈ cons a s has\n[PROOFSTEP]\nexact mem_cons_self _ _\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddZeroClass M\np : (α →₀ M) → Prop\nf✝ : α →₀ M\nh0 : p 0\nha : ∀ (a : α) (b : M) (f : α →₀ M), ¬a ∈ f.support → b ≠ 0 → p f → p (f + single a b)\ns✝ : Finset α\na : α\ns : Finset α\nhas : ¬a ∈ s\nih : ∀ (f : α →₀ M), f.support = s → p f\nf : α →₀ M\nhf : f.support = cons a s has\n⊢ p (erase a f)\n[PROOFSTEP]\napply ih _ _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddZeroClass M\np : (α →₀ M) → Prop\nf✝ : α →₀ M\nh0 : p 0\nha : ∀ (a : α) (b : M) (f : α →₀ M), ¬a ∈ f.support → b ≠ 0 → p f → p (f + single a b)\ns✝ : Finset α\na : α\ns : Finset α\nhas : ¬a ∈ s\nih : ∀ (f : α →₀ M), f.support = s → p f\nf : α →₀ M\nhf : f.support = cons a s has\n⊢ (erase a f).support = s\n[PROOFSTEP]\nrw [support_erase, hf, Finset.erase_cons]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH✝ : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : AddZeroClass M\ninst✝ : AddZeroClass N\nf g : (α →₀ M) →+ N\nH : ∀ (x : α) (y : M), ↑f (single x y) = ↑g (single x y)\n⊢ f = g\n[PROOFSTEP]\nrefine' AddMonoidHom.eq_of_eqOn_denseM add_closure_setOf_eq_single _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH✝ : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : AddZeroClass M\ninst✝ : AddZeroClass N\nf g : (α →₀ M) →+ N\nH : ∀ (x : α) (y : M), ↑f (single x y) = ↑g (single x y)\n⊢ Set.EqOn ↑f ↑g {f | ∃ a b, f = single a b}\n[PROOFSTEP]\nrintro _ ⟨x, y, rfl⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH✝ : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : AddZeroClass M\ninst✝ : AddZeroClass N\nf g : (α →₀ M) →+ N\nH : ∀ (x : α) (y : M), ↑f (single x y) = ↑g (single x y)\nx : α\ny : M\n⊢ ↑f (single x y) = ↑g (single x y)\n[PROOFSTEP]\napply H\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH✝ : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : AddZeroClass M\ninst✝ : MulOneClass N\nf g : Multiplicative (α →₀ M) →* N\nH : ∀ (x : α) (y : M), ↑f (↑Multiplicative.ofAdd (single x y)) = ↑g (↑Multiplicative.ofAdd (single x y))\n⊢ f = g\n[PROOFSTEP]\nhave := @addHom_ext α M (Additive N) _ _ (MonoidHom.toAdditive'' f) (MonoidHom.toAdditive'' g) H\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH✝ : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : AddZeroClass M\ninst✝ : MulOneClass N\nf g : Multiplicative (α →₀ M) →* N\nH : ∀ (x : α) (y : M), ↑f (↑Multiplicative.ofAdd (single x y)) = ↑g (↑Multiplicative.ofAdd (single x y))\nthis : ↑MonoidHom.toAdditive'' f = ↑MonoidHom.toAdditive'' g\n⊢ f = g\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH✝ : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : AddZeroClass M\ninst✝ : MulOneClass N\nf g : Multiplicative (α →₀ M) →* N\nH : ∀ (x : α) (y : M), ↑f (↑Multiplicative.ofAdd (single x y)) = ↑g (↑Multiplicative.ofAdd (single x y))\nthis : ↑MonoidHom.toAdditive'' f = ↑MonoidHom.toAdditive'' g\nx✝ : Multiplicative (α →₀ M)\n⊢ ↑f x✝ = ↑g x✝\n[PROOFSTEP]\nrw [FunLike.ext_iff] at this \n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH✝ : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : AddZeroClass M\ninst✝ : MulOneClass N\nf g : Multiplicative (α →₀ M) →* N\nH : ∀ (x : α) (y : M), ↑f (↑Multiplicative.ofAdd (single x y)) = ↑g (↑Multiplicative.ofAdd (single x y))\nthis✝ : ↑MonoidHom.toAdditive'' f = ↑MonoidHom.toAdditive'' g\nthis : ∀ (x : α →₀ M), ↑(↑MonoidHom.toAdditive'' f) x = ↑(↑MonoidHom.toAdditive'' g) x\nx✝ : Multiplicative (α →₀ M)\n⊢ ↑f x✝ = ↑g x✝\n[PROOFSTEP]\napply this\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : AddZeroClass M\ninst✝ : AddZeroClass N\nf : M → N\nhf : f 0 = 0\nhf' : ∀ (x y : M), f (x + y) = f x + f y\nv₁ v₂ : α →₀ M\nx✝ : α\n⊢ ↑(mapRange f hf (v₁ + v₂)) x✝ = ↑(mapRange f hf v₁ + mapRange f hf v₂) x✝\n[PROOFSTEP]\nsimp only [hf', add_apply, mapRange_apply]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddZeroClass M\nf : α ↪ β\n⊢ (fun v => embDomain f v) 0 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddZeroClass M\nf : α ↪ β\nv w : α →₀ M\n⊢ ZeroHom.toFun { toFun := fun v => embDomain f v, map_zero' := (_ : 0 = 0) } (v + w) =\n ZeroHom.toFun { toFun := fun v => embDomain f v, map_zero' := (_ : 0 = 0) } v +\n ZeroHom.toFun { toFun := fun v => embDomain f v, map_zero' := (_ : 0 = 0) } w\n[PROOFSTEP]\next b\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddZeroClass M\nf : α ↪ β\nv w : α →₀ M\nb : β\n⊢ ↑(ZeroHom.toFun { toFun := fun v => embDomain f v, map_zero' := (_ : 0 = 0) } (v + w)) b =\n ↑(ZeroHom.toFun { toFun := fun v => embDomain f v, map_zero' := (_ : 0 = 0) } v +\n ZeroHom.toFun { toFun := fun v => embDomain f v, map_zero' := (_ : 0 = 0) } w)\n b\n[PROOFSTEP]\nby_cases h : b ∈ Set.range f\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddZeroClass M\nf : α ↪ β\nv w : α →₀ M\nb : β\nh : b ∈ Set.range ↑f\n⊢ ↑(ZeroHom.toFun { toFun := fun v => embDomain f v, map_zero' := (_ : 0 = 0) } (v + w)) b =\n ↑(ZeroHom.toFun { toFun := fun v => embDomain f v, map_zero' := (_ : 0 = 0) } v +\n ZeroHom.toFun { toFun := fun v => embDomain f v, map_zero' := (_ : 0 = 0) } w)\n b\n[PROOFSTEP]\nrcases h with ⟨a, rfl⟩\n[GOAL]\ncase pos.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddZeroClass M\nf : α ↪ β\nv w : α →₀ M\na : α\n⊢ ↑(ZeroHom.toFun { toFun := fun v => embDomain f v, map_zero' := (_ : 0 = 0) } (v + w)) (↑f a) =\n ↑(ZeroHom.toFun { toFun := fun v => embDomain f v, map_zero' := (_ : 0 = 0) } v +\n ZeroHom.toFun { toFun := fun v => embDomain f v, map_zero' := (_ : 0 = 0) } w)\n (↑f a)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddZeroClass M\nf : α ↪ β\nv w : α →₀ M\nb : β\nh : ¬b ∈ Set.range ↑f\n⊢ ↑(ZeroHom.toFun { toFun := fun v => embDomain f v, map_zero' := (_ : 0 = 0) } (v + w)) b =\n ↑(ZeroHom.toFun { toFun := fun v => embDomain f v, map_zero' := (_ : 0 = 0) } v +\n ZeroHom.toFun { toFun := fun v => embDomain f v, map_zero' := (_ : 0 = 0) } w)\n b\n[PROOFSTEP]\nsimp only [Set.mem_range, not_exists, coe_add, Pi.add_apply, embDomain_notin_range _ _ _ h, add_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : NegZeroClass G\ninst✝ : NegZeroClass H\nf : G → H\nhf : f 0 = 0\nhf' : ∀ (x : G), f (-x) = -f x\nv : α →₀ G\nx✝ : α\n⊢ ↑(mapRange f hf (-v)) x✝ = ↑(-mapRange f hf v) x✝\n[PROOFSTEP]\nsimp only [hf', neg_apply, mapRange_apply]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : SubNegZeroMonoid G\ninst✝ : SubNegZeroMonoid H\nf : G → H\nhf : f 0 = 0\nhf' : ∀ (x y : G), f (x - y) = f x - f y\nv₁ v₂ : α →₀ G\nx✝ : α\n⊢ ↑(mapRange f hf (v₁ - v₂)) x✝ = ↑(mapRange f hf v₁ - mapRange f hf v₂) x✝\n[PROOFSTEP]\nsimp only [hf', sub_apply, mapRange_apply]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddCommMonoid M\nk l m n : α\nu v : M\nhu : u ≠ 0\nhv : v ≠ 0\n⊢ single k u + single l v = single m u + single n v ↔ k = m ∧ l = n ∨ u = v ∧ k = n ∧ l = m ∨ u + v = 0 ∧ k = l ∧ m = n\n[PROOFSTEP]\nclassical\nsimp_rw [FunLike.ext_iff, coe_add, single_eq_pi_single, ← funext_iff]\nexact Pi.single_add_single_eq_single_add_single hu hv\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddCommMonoid M\nk l m n : α\nu v : M\nhu : u ≠ 0\nhv : v ≠ 0\n⊢ single k u + single l v = single m u + single n v ↔ k = m ∧ l = n ∨ u = v ∧ k = n ∧ l = m ∨ u + v = 0 ∧ k = l ∧ m = n\n[PROOFSTEP]\nsimp_rw [FunLike.ext_iff, coe_add, single_eq_pi_single, ← funext_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddCommMonoid M\nk l m n : α\nu v : M\nhu : u ≠ 0\nhv : v ≠ 0\n⊢ ((fun a => (Pi.single k u + Pi.single l v) a) = fun a => (Pi.single m u + Pi.single n v) a) ↔\n k = m ∧ l = n ∨ u = v ∧ k = n ∧ l = m ∨ u + v = 0 ∧ k = l ∧ m = n\n[PROOFSTEP]\nexact Pi.single_add_single_eq_single_add_single hu hv\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : DecidableEq α\ninst✝ : AddGroup G\nf g : α →₀ G\n⊢ (f - g).support ⊆ f.support ∪ g.support\n[PROOFSTEP]\nrw [sub_eq_add_neg, ← support_neg g]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝¹ : DecidableEq α\ninst✝ : AddGroup G\nf g : α →₀ G\n⊢ (f + -g).support ⊆ f.support ∪ (-g).support\n[PROOFSTEP]\nexact support_add\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddGroup G\nf : α →₀ G\na : α\n⊢ erase a f = f - single a (↑f a)\n[PROOFSTEP]\next a'\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddGroup G\nf : α →₀ G\na a' : α\n⊢ ↑(erase a f) a' = ↑(f - single a (↑f a)) a'\n[PROOFSTEP]\nrcases eq_or_ne a a' with (rfl | h)\n[GOAL]\ncase h.inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddGroup G\nf : α →₀ G\na : α\n⊢ ↑(erase a f) a = ↑(f - single a (↑f a)) a\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddGroup G\nf : α →₀ G\na a' : α\nh : a ≠ a'\n⊢ ↑(erase a f) a' = ↑(f - single a (↑f a)) a'\n[PROOFSTEP]\nsimp [erase_ne h.symm, single_eq_of_ne h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nM : Type u_5\nM' : Type u_6\nN : Type u_7\nP : Type u_8\nG : Type u_9\nH : Type u_10\nR : Type u_11\nS : Type u_12\ninst✝ : AddGroup G\nf : α →₀ G\na : α\nb : G\n⊢ update f a b = f - single a (↑f a) + single a b\n[PROOFSTEP]\nrw [update_eq_erase_add_single, erase_eq_sub_single]\n", "meta": {"mathlib_filename": "Mathlib.Data.Finsupp.Defs", "llama_tokens": 66341, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO", "lm_q1_score": 0.44552952031526044, "lm_q2_score": 0.0297600957745801, "lm_q1q2_score": 0.01325900119498488}} {"text": "[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX✝ Y Z : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nX : C\nf g : MonoOver X\n⊢ ∀ (a b : f ⟶ g), a = b\n[PROOFSTEP]\nintro h₁ h₂\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX✝ Y Z : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nX : C\nf g : MonoOver X\nh₁ h₂ : f ⟶ g\n⊢ h₁ = h₂\n[PROOFSTEP]\napply Over.OverMorphism.ext\n[GOAL]\ncase h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX✝ Y Z : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nX : C\nf g : MonoOver X\nh₁ h₂ : f ⟶ g\n⊢ h₁.left = h₂.left\n[PROOFSTEP]\nerw [← cancel_mono g.arrow, Over.w h₁, Over.w h₂]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nf g : MonoOver X\nh : f.obj.left ≅ g.obj.left\nw : autoParam (h.hom ≫ arrow g = arrow f) _auto✝\n⊢ h.inv ≫ arrow f = arrow g\n[PROOFSTEP]\nrw [h.inv_comp_eq, w]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : HasPullbacks C\nf : X ⟶ Y\ng : MonoOver Y\n⊢ Mono ((Over.pullback f).obj ((forget Y).obj g)).hom\n[PROOFSTEP]\nhaveI : Mono ((forget Y).obj g).hom := (inferInstance : Mono g.arrow)\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : HasPullbacks C\nf : X ⟶ Y\ng : MonoOver Y\nthis : Mono ((forget Y).obj g).hom\n⊢ Mono ((Over.pullback f).obj ((forget Y).obj g)).hom\n[PROOFSTEP]\napply pullback.snd_of_mono\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nf : X ⟶ Y\ninst✝ : Mono f\ng : MonoOver X\n⊢ Mono ((Over.map f).obj ((forget X).obj g)).hom\n[PROOFSTEP]\napply mono_comp g.arrow f\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nf : X ⟶ Y\ninst✝ : Mono f\ng h : MonoOver X\ne : (map f).obj g ⟶ (map f).obj h\n⊢ g ⟶ h\n[PROOFSTEP]\nrefine' homMk e.left _\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nf : X ⟶ Y\ninst✝ : Mono f\ng h : MonoOver X\ne : (map f).obj g ⟶ (map f).obj h\n⊢ e.left ≫ arrow h = arrow g\n[PROOFSTEP]\nrw [← cancel_mono f, assoc]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nf : X ⟶ Y\ninst✝ : Mono f\ng h : MonoOver X\ne : (map f).obj g ⟶ (map f).obj h\n⊢ e.left ≫ arrow h ≫ f = arrow g ≫ f\n[PROOFSTEP]\napply w e\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nA B : C\ne : A ≅ B\n⊢ map (e.hom ≫ e.inv) = map (𝟙 A)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nA B : C\ne : A ≅ B\n⊢ map (e.inv ≫ e.hom) = map (𝟙 B)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nf : MonoOver X\n⊢ Mono ((Over.post e.functor).obj ((forget X).obj f)).hom\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nf : MonoOver X\n⊢ Mono (e.functor.map (arrow f))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nf : MonoOver (e.functor.obj X)\n⊢ Mono ((Over.post e.inverse).obj ((forget (e.functor.obj X)).obj f)).hom\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nf : MonoOver (e.functor.obj X)\n⊢ Mono (e.inverse.map (arrow f))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : HasImages C\nf g : Over X\nk : f ⟶ g\n⊢ (fun f => imageMonoOver f.hom) f ⟶ (fun f => imageMonoOver f.hom) g\n[PROOFSTEP]\napply (forget X).preimage _\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : HasImages C\nf g : Over X\nk : f ⟶ g\n⊢ (forget X).obj ((fun f => imageMonoOver f.hom) f) ⟶ (forget X).obj ((fun f => imageMonoOver f.hom) g)\n[PROOFSTEP]\napply Over.homMk _ _\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : HasImages C\nf g : Over X\nk : f ⟶ g\n⊢ ((forget X).obj ((fun f => imageMonoOver f.hom) f)).left ⟶ ((forget X).obj ((fun f => imageMonoOver f.hom) g)).left\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : HasImages C\nf g : Over X\nk : f ⟶ g\n⊢ ?m.186308 ≫ ((forget X).obj ((fun f => imageMonoOver f.hom) g)).hom =\n ((forget X).obj ((fun f => imageMonoOver f.hom) f)).hom\n[PROOFSTEP]\nrefine'\n image.lift\n { I := Limits.image _\n m := image.ι g.hom\n e := k.left ≫ factorThruImage g.hom }\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : HasImages C\nf g : Over X\nk : f ⟶ g\n⊢ image.lift (MonoFactorisation.mk (Limits.image g.hom) (image.ι g.hom) (k.left ≫ factorThruImage g.hom)) ≫\n ((forget X).obj ((fun f => imageMonoOver f.hom) g)).hom =\n ((forget X).obj ((fun f => imageMonoOver f.hom) f)).hom\n[PROOFSTEP]\napply image.lift_fac\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : HasImages C\nf : Over X\ng : MonoOver X\nk : image.obj f ⟶ g\n⊢ f ⟶ (forget X).obj g\n[PROOFSTEP]\napply Over.homMk (factorThruImage f.hom ≫ k.left) _\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : HasImages C\nf : Over X\ng : MonoOver X\nk : image.obj f ⟶ g\n⊢ (factorThruImage f.hom ≫ k.left) ≫ g.obj.hom = f.hom\n[PROOFSTEP]\nchange (factorThruImage f.hom ≫ k.left) ≫ _ = f.hom\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : HasImages C\nf : Over X\ng : MonoOver X\nk : image.obj f ⟶ g\n⊢ (factorThruImage f.hom ≫ k.left) ≫ g.obj.hom = f.hom\n[PROOFSTEP]\nrw [assoc, Over.w k]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : HasImages C\nf : Over X\ng : MonoOver X\nk : image.obj f ⟶ g\n⊢ factorThruImage f.hom ≫ (image.obj f).obj.hom = f.hom\n[PROOFSTEP]\napply image.fac\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : HasImages C\nf : Over X\ng : MonoOver X\nk : f ⟶ (forget X).obj g\n⊢ image.obj f ⟶ g\n[PROOFSTEP]\nrefine' Over.homMk _ _\n[GOAL]\ncase refine'_1\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : HasImages C\nf : Over X\ng : MonoOver X\nk : f ⟶ (forget X).obj g\n⊢ (image.obj f).obj.left ⟶ g.obj.left\ncase refine'_2\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : HasImages C\nf : Over X\ng : MonoOver X\nk : f ⟶ (forget X).obj g\n⊢ ?refine'_1 ≫ g.obj.hom = (image.obj f).obj.hom\n[PROOFSTEP]\nrefine'\n image.lift\n { I := g.obj.left\n m := g.arrow\n e := k.left\n fac := Over.w k }\n[GOAL]\ncase refine'_2\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : HasImages C\nf : Over X\ng : MonoOver X\nk : f ⟶ (forget X).obj g\n⊢ image.lift (MonoFactorisation.mk g.obj.left (arrow g) k.left) ≫ g.obj.hom = (image.obj f).obj.hom\n[PROOFSTEP]\napply image.lift_fac\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : HasImages C\nf : Over X\ng : MonoOver X\nk : f ⟶ (forget X).obj g\n⊢ (fun k => Over.homMk (factorThruImage f.hom ≫ k.left))\n ((fun k => Over.homMk (image.lift (MonoFactorisation.mk g.obj.left (arrow g) k.left))) k) =\n k\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : HasImages C\nf : Over X\ng : MonoOver X\nk : f ⟶ (forget X).obj g\n⊢ ((fun k => Over.homMk (factorThruImage f.hom ≫ k.left))\n ((fun k => Over.homMk (image.lift (MonoFactorisation.mk g.obj.left (arrow g) k.left))) k)).left =\n k.left\n[PROOFSTEP]\nchange factorThruImage _ ≫ image.lift _ = _\n[GOAL]\ncase h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : HasImages C\nf : Over X\ng : MonoOver X\nk : f ⟶ (forget X).obj g\n⊢ factorThruImage f.hom ≫ image.lift (MonoFactorisation.mk g.obj.left (arrow g) k.left) = k.left\n[PROOFSTEP]\nrw [← cancel_mono g.arrow, assoc, image.lift_fac, image.fac f.hom]\n[GOAL]\ncase h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : HasImages C\nf : Over X\ng : MonoOver X\nk : f ⟶ (forget X).obj g\n⊢ f.hom = k.left ≫ arrow g\n[PROOFSTEP]\nexact (Over.w k).symm\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : HasImages C\nf : X ⟶ Y\ninst✝ : Mono f\n⊢ (X_1 : MonoOver X) → (exists f).obj X_1 ≅ (map f).obj X_1\n[PROOFSTEP]\nintro Z\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nX Y Z✝ : C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : HasImages C\nf : X ⟶ Y\ninst✝ : Mono f\nZ : MonoOver X\n⊢ (exists f).obj Z ≅ (map f).obj Z\n[PROOFSTEP]\nsuffices : (forget _).obj ((exists f).obj Z) ≅ (forget _).obj ((map f).obj Z)\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nX Y Z✝ : C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : HasImages C\nf : X ⟶ Y\ninst✝ : Mono f\nZ : MonoOver X\nthis : (forget Y).obj ((exists f).obj Z) ≅ (forget Y).obj ((map f).obj Z)\n⊢ (exists f).obj Z ≅ (map f).obj Z\ncase this\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nX Y Z✝ : C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : HasImages C\nf : X ⟶ Y\ninst✝ : Mono f\nZ : MonoOver X\n⊢ (forget Y).obj ((exists f).obj Z) ≅ (forget Y).obj ((map f).obj Z)\n[PROOFSTEP]\napply (forget _).preimageIso this\n[GOAL]\ncase this\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nX Y Z✝ : C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : HasImages C\nf : X ⟶ Y\ninst✝ : Mono f\nZ : MonoOver X\n⊢ (forget Y).obj ((exists f).obj Z) ≅ (forget Y).obj ((map f).obj Z)\n[PROOFSTEP]\napply Over.isoMk _ _\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nX Y Z✝ : C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : HasImages C\nf : X ⟶ Y\ninst✝ : Mono f\nZ : MonoOver X\n⊢ ((forget Y).obj ((exists f).obj Z)).left ≅ ((forget Y).obj ((map f).obj Z)).left\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nX Y Z✝ : C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : HasImages C\nf : X ⟶ Y\ninst✝ : Mono f\nZ : MonoOver X\n⊢ ?m.226355.hom ≫ ((forget Y).obj ((map f).obj Z)).hom = ((forget Y).obj ((exists f).obj Z)).hom\n[PROOFSTEP]\napply imageMonoIsoSource (Z.arrow ≫ f)\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nX Y Z✝ : C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : HasImages C\nf : X ⟶ Y\ninst✝ : Mono f\nZ : MonoOver X\n⊢ (imageMonoIsoSource (arrow Z ≫ f)).hom ≫ ((forget Y).obj ((map f).obj Z)).hom =\n ((forget Y).obj ((exists f).obj Z)).hom\n[PROOFSTEP]\napply imageMonoIsoSource_hom_self\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Subobject.MonoOver", "llama_tokens": 5525, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO", "lm_q1_score": 0.44939263446475963, "lm_q2_score": 0.029312232553284526, "lm_q1q2_score": 0.013172701409164222}} {"text": "[GOAL]\nα : Sort u_1\na : α\n⊢ out (mk a) = a\n[PROOFSTEP]\nlet h := (mk a).2\n[GOAL]\nα : Sort u_1\na : α\nh : ∃ a_1, (fun b => a_1 = b) = (mk a).fst := (mk a).snd\n⊢ out (mk a) = a\n[PROOFSTEP]\nshow Classical.choose h = a\n[GOAL]\nα : Sort u_1\na : α\nh : ∃ a_1, (fun b => a_1 = b) = (mk a).fst := (mk a).snd\n⊢ Classical.choose h = a\n[PROOFSTEP]\nhave := Classical.choose_spec h\n[GOAL]\nα : Sort u_1\na : α\nh : ∃ a_1, (fun b => a_1 = b) = (mk a).fst := (mk a).snd\nthis : (fun b => Classical.choose h = b) = (mk a).fst\n⊢ Classical.choose h = a\n[PROOFSTEP]\nexact cast (congr_fun this a).symm rfl\n[GOAL]\nα : Sort u_1\ns : α → Prop\nh : ∃ a, (fun b => a = b) = s\n⊢ mk (out { fst := s, snd := h }) = { fst := s, snd := h }\n[PROOFSTEP]\nsimp [mk]\n[GOAL]\nα : Sort u_1\ns : α → Prop\nh : ∃ a, (fun b => a = b) = s\n⊢ { fst := fun b => out { fst := s, snd := h } = b,\n snd := (_ : ∃ a, (fun b => a = b) = fun b => out { fst := s, snd := h } = b) } =\n { fst := s, snd := h }\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_fst\nα : Sort u_1\ns : α → Prop\nh : ∃ a, (fun b => a = b) = s\n⊢ (fun b => out { fst := s, snd := h } = b) = s\n[PROOFSTEP]\nexact Classical.choose_spec h\n[GOAL]\nα : Sort u_1\na b : Erased α\nh : out a = out b\n⊢ a = b\n[PROOFSTEP]\nsimpa using congr_arg mk h\n[GOAL]\nα : Sort u_1\nβ : Sort u_2\nf : α → β\na : Erased α\n⊢ out (map f a) = f (out a)\n[PROOFSTEP]\nsimp [map]\n[GOAL]\nsrc✝ : Monad Erased := Erased.Monad\n⊢ ∀ {α β : Type ?u.5529}, Functor.mapConst = Functor.map ∘ Function.const β\n[PROOFSTEP]\nintros\n[GOAL]\nsrc✝ : Monad Erased := Erased.Monad\nα✝ β✝ : Type ?u.5529\n⊢ Functor.mapConst = Functor.map ∘ Function.const β✝\n[PROOFSTEP]\next\n[GOAL]\ncase h.h.h\nsrc✝ : Monad Erased := Erased.Monad\nα✝ β✝ : Type ?u.5529\nx✝¹ : α✝\nx✝ : Erased β✝\n⊢ out (Functor.mapConst x✝¹ x✝) = out ((Functor.map ∘ Function.const β✝) x✝¹ x✝)\n[PROOFSTEP]\nsimp [Functor.mapConst]\n[GOAL]\nsrc✝ : Monad Erased := Erased.Monad\n⊢ ∀ {α : Type ?u.5529} (x : Erased α), id <$> x = x\n[PROOFSTEP]\nintros\n[GOAL]\nsrc✝ : Monad Erased := Erased.Monad\nα✝ : Type ?u.5529\nx✝ : Erased α✝\n⊢ id <$> x✝ = x✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nsrc✝ : Monad Erased := Erased.Monad\nα✝ : Type ?u.5529\nx✝ : Erased α✝\n⊢ out (id <$> x✝) = out x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nsrc✝ : Monad Erased := Erased.Monad\n⊢ ∀ {α β : Type ?u.5529} (x : Erased α) (y : Erased β),\n (SeqLeft.seqLeft x fun x => y) = Seq.seq (Function.const β <$> x) fun x => y\n[PROOFSTEP]\nintros\n[GOAL]\nsrc✝ : Monad Erased := Erased.Monad\nα✝ β✝ : Type ?u.5529\nx✝ : Erased α✝\ny✝ : Erased β✝\n⊢ (SeqLeft.seqLeft x✝ fun x => y✝) = Seq.seq (Function.const β✝ <$> x✝) fun x => y✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nsrc✝ : Monad Erased := Erased.Monad\nα✝ β✝ : Type ?u.5529\nx✝ : Erased α✝\ny✝ : Erased β✝\n⊢ out (SeqLeft.seqLeft x✝ fun x => y✝) = out (Seq.seq (Function.const β✝ <$> x✝) fun x => y✝)\n[PROOFSTEP]\nsimp [Seq.seq, Functor.mapConst, SeqLeft.seqLeft]\n[GOAL]\nsrc✝ : Monad Erased := Erased.Monad\n⊢ ∀ {α β : Type ?u.5529} (x : Erased α) (y : Erased β),\n (SeqRight.seqRight x fun x => y) = Seq.seq (Function.const α id <$> x) fun x => y\n[PROOFSTEP]\nintros\n[GOAL]\nsrc✝ : Monad Erased := Erased.Monad\nα✝ β✝ : Type ?u.5529\nx✝ : Erased α✝\ny✝ : Erased β✝\n⊢ (SeqRight.seqRight x✝ fun x => y✝) = Seq.seq (Function.const α✝ id <$> x✝) fun x => y✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nsrc✝ : Monad Erased := Erased.Monad\nα✝ β✝ : Type ?u.5529\nx✝ : Erased α✝\ny✝ : Erased β✝\n⊢ out (SeqRight.seqRight x✝ fun x => y✝) = out (Seq.seq (Function.const α✝ id <$> x✝) fun x => y✝)\n[PROOFSTEP]\nsimp [Seq.seq, Functor.mapConst, SeqRight.seqRight]\n[GOAL]\nsrc✝ : Monad Erased := Erased.Monad\n⊢ ∀ {α β : Type ?u.5529} (g : α → β) (x : Erased α), (Seq.seq (pure g) fun x_1 => x) = g <$> x\n[PROOFSTEP]\nintros\n[GOAL]\nsrc✝ : Monad Erased := Erased.Monad\nα✝ β✝ : Type ?u.5529\ng✝ : α✝ → β✝\nx✝ : Erased α✝\n⊢ (Seq.seq (pure g✝) fun x => x✝) = g✝ <$> x✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nsrc✝ : Monad Erased := Erased.Monad\nα✝ β✝ : Type ?u.5529\ng✝ : α✝ → β✝\nx✝ : Erased α✝\n⊢ out (Seq.seq (pure g✝) fun x => x✝) = out (g✝ <$> x✝)\n[PROOFSTEP]\nsimp [Seq.seq, Functor.mapConst, SeqRight.seqRight]\n[GOAL]\nsrc✝ : Monad Erased := Erased.Monad\n⊢ ∀ {α β : Type ?u.5529} (f : α → β) (x : Erased α),\n (do\n let a ← x\n pure (f a)) =\n f <$> x\n[PROOFSTEP]\nintros\n[GOAL]\nsrc✝ : Monad Erased := Erased.Monad\nα✝ β✝ : Type ?u.5529\nf✝ : α✝ → β✝\nx✝ : Erased α✝\n⊢ (do\n let a ← x✝\n pure (f✝ a)) =\n f✝ <$> x✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nsrc✝ : Monad Erased := Erased.Monad\nα✝ β✝ : Type ?u.5529\nf✝ : α✝ → β✝\nx✝ : Erased α✝\n⊢ (out do\n let a ← x✝\n pure (f✝ a)) =\n out (f✝ <$> x✝)\n[PROOFSTEP]\nsimp\n[GOAL]\nsrc✝ : Monad Erased := Erased.Monad\n⊢ ∀ {α β : Type ?u.5529} (f : Erased (α → β)) (x : Erased α),\n (do\n let x_1 ← f\n x_1 <$> x) =\n Seq.seq f fun x_1 => x\n[PROOFSTEP]\nintros\n[GOAL]\nsrc✝ : Monad Erased := Erased.Monad\nα✝ β✝ : Type ?u.5529\nf✝ : Erased (α✝ → β✝)\nx✝ : Erased α✝\n⊢ (do\n let x ← f✝\n x <$> x✝) =\n Seq.seq f✝ fun x => x✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nsrc✝ : Monad Erased := Erased.Monad\nα✝ β✝ : Type ?u.5529\nf✝ : Erased (α✝ → β✝)\nx✝ : Erased α✝\n⊢ (out do\n let x ← f✝\n x <$> x✝) =\n out (Seq.seq f✝ fun x => x✝)\n[PROOFSTEP]\nsimp [Seq.seq]\n[GOAL]\nsrc✝ : Monad Erased := Erased.Monad\n⊢ ∀ {α β : Type ?u.5529} (x : α) (f : α → Erased β), pure x >>= f = f x\n[PROOFSTEP]\nintros\n[GOAL]\nsrc✝ : Monad Erased := Erased.Monad\nα✝ β✝ : Type ?u.5529\nx✝ : α✝\nf✝ : α✝ → Erased β✝\n⊢ pure x✝ >>= f✝ = f✝ x✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nsrc✝ : Monad Erased := Erased.Monad\nα✝ β✝ : Type ?u.5529\nx✝ : α✝\nf✝ : α✝ → Erased β✝\n⊢ out (pure x✝ >>= f✝) = out (f✝ x✝)\n[PROOFSTEP]\nsimp\n[GOAL]\nsrc✝ : Monad Erased := Erased.Monad\n⊢ ∀ {α β γ : Type ?u.5529} (x : Erased α) (f : α → Erased β) (g : β → Erased γ),\n x >>= f >>= g = x >>= fun x => f x >>= g\n[PROOFSTEP]\nintros\n[GOAL]\nsrc✝ : Monad Erased := Erased.Monad\nα✝ β✝ γ✝ : Type ?u.5529\nx✝ : Erased α✝\nf✝ : α✝ → Erased β✝\ng✝ : β✝ → Erased γ✝\n⊢ x✝ >>= f✝ >>= g✝ = x✝ >>= fun x => f✝ x >>= g✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nsrc✝ : Monad Erased := Erased.Monad\nα✝ β✝ γ✝ : Type ?u.5529\nx✝ : Erased α✝\nf✝ : α✝ → Erased β✝\ng✝ : β✝ → Erased γ✝\n⊢ out (x✝ >>= f✝ >>= g✝) = out (x✝ >>= fun x => f✝ x >>= g✝)\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.Data.Erased", "llama_tokens": 3582, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO", "lm_q1_score": 0.4455295350395727, "lm_q2_score": 0.029312228525445152, "lm_q1q2_score": 0.013059463545915279}} {"text": "[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nI : Ideal R\nh : FG I\n⊢ IsIdempotentElem I ↔ ∃ e, IsIdempotentElem e ∧ I = Submodule.span R {e}\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\ninst✝ : CommRing R\nI : Ideal R\nh : FG I\n⊢ IsIdempotentElem I → ∃ e, IsIdempotentElem e ∧ I = Submodule.span R {e}\n[PROOFSTEP]\nintro e\n[GOAL]\ncase mp\nR : Type u_1\ninst✝ : CommRing R\nI : Ideal R\nh : FG I\ne : IsIdempotentElem I\n⊢ ∃ e, IsIdempotentElem e ∧ I = Submodule.span R {e}\n[PROOFSTEP]\nobtain ⟨r, hr, hr'⟩ :=\n Submodule.exists_mem_and_smul_eq_self_of_fg_of_le_smul I I h\n (by\n rw [smul_eq_mul]\n exact e.ge)\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nI : Ideal R\nh : FG I\ne : IsIdempotentElem I\n⊢ I ≤ I • I\n[PROOFSTEP]\nrw [smul_eq_mul]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nI : Ideal R\nh : FG I\ne : IsIdempotentElem I\n⊢ I ≤ I * I\n[PROOFSTEP]\nexact e.ge\n[GOAL]\ncase mp.intro.intro\nR : Type u_1\ninst✝ : CommRing R\nI : Ideal R\nh : FG I\ne : IsIdempotentElem I\nr : R\nhr : r ∈ I\nhr' : ∀ (n : R), n ∈ I → r • n = n\n⊢ ∃ e, IsIdempotentElem e ∧ I = Submodule.span R {e}\n[PROOFSTEP]\nsimp_rw [smul_eq_mul] at hr' \n[GOAL]\ncase mp.intro.intro\nR : Type u_1\ninst✝ : CommRing R\nI : Ideal R\nh : FG I\ne : IsIdempotentElem I\nr : R\nhr : r ∈ I\nhr' : ∀ (n : R), n ∈ I → r * n = n\n⊢ ∃ e, IsIdempotentElem e ∧ I = Submodule.span R {e}\n[PROOFSTEP]\nrefine' ⟨r, hr' r hr, antisymm _ ((Submodule.span_singleton_le_iff_mem _ _).mpr hr)⟩\n[GOAL]\ncase mp.intro.intro\nR : Type u_1\ninst✝ : CommRing R\nI : Ideal R\nh : FG I\ne : IsIdempotentElem I\nr : R\nhr : r ∈ I\nhr' : ∀ (n : R), n ∈ I → r * n = n\n⊢ I ≤ Submodule.span R {r}\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase mp.intro.intro\nR : Type u_1\ninst✝ : CommRing R\nI : Ideal R\nh : FG I\ne : IsIdempotentElem I\nr : R\nhr : r ∈ I\nhr' : ∀ (n : R), n ∈ I → r * n = n\nx : R\nhx : x ∈ I\n⊢ x ∈ Submodule.span R {r}\n[PROOFSTEP]\nrw [← hr' x hx]\n[GOAL]\ncase mp.intro.intro\nR : Type u_1\ninst✝ : CommRing R\nI : Ideal R\nh : FG I\ne : IsIdempotentElem I\nr : R\nhr : r ∈ I\nhr' : ∀ (n : R), n ∈ I → r * n = n\nx : R\nhx : x ∈ I\n⊢ r * x ∈ Submodule.span R {r}\n[PROOFSTEP]\nexact Ideal.mem_span_singleton'.mpr ⟨_, mul_comm _ _⟩\n[GOAL]\ncase mpr\nR : Type u_1\ninst✝ : CommRing R\nI : Ideal R\nh : FG I\n⊢ (∃ e, IsIdempotentElem e ∧ I = Submodule.span R {e}) → IsIdempotentElem I\n[PROOFSTEP]\nrintro ⟨e, he, rfl⟩\n[GOAL]\ncase mpr.intro.intro\nR : Type u_1\ninst✝ : CommRing R\ne : R\nhe : IsIdempotentElem e\nh : FG (Submodule.span R {e})\n⊢ IsIdempotentElem (Submodule.span R {e})\n[PROOFSTEP]\nsimp [IsIdempotentElem, Ideal.span_singleton_mul_span_singleton, he.eq]\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nI : Ideal R\nh : FG I\n⊢ IsIdempotentElem I ↔ I = ⊥ ∨ I = ⊤\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nI : Ideal R\nh : FG I\n⊢ IsIdempotentElem I → I = ⊥ ∨ I = ⊤\n[PROOFSTEP]\nintro H\n[GOAL]\ncase mp\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nI : Ideal R\nh : FG I\nH : IsIdempotentElem I\n⊢ I = ⊥ ∨ I = ⊤\n[PROOFSTEP]\nobtain ⟨e, he, rfl⟩ := (I.isIdempotentElem_iff_of_fg h).mp H\n[GOAL]\ncase mp.intro.intro\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\ne : R\nhe : IsIdempotentElem e\nh : FG (Submodule.span R {e})\nH : IsIdempotentElem (Submodule.span R {e})\n⊢ Submodule.span R {e} = ⊥ ∨ Submodule.span R {e} = ⊤\n[PROOFSTEP]\nsimp only [Ideal.submodule_span_eq, Ideal.span_singleton_eq_bot]\n[GOAL]\ncase mp.intro.intro\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\ne : R\nhe : IsIdempotentElem e\nh : FG (Submodule.span R {e})\nH : IsIdempotentElem (Submodule.span R {e})\n⊢ e = 0 ∨ span {e} = ⊤\n[PROOFSTEP]\napply Or.imp id _ (IsIdempotentElem.iff_eq_zero_or_one.mp he)\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\ne : R\nhe : IsIdempotentElem e\nh : FG (Submodule.span R {e})\nH : IsIdempotentElem (Submodule.span R {e})\n⊢ e = 1 → span {e} = ⊤\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nhe : IsIdempotentElem 1\nh : FG (Submodule.span R {1})\nH : IsIdempotentElem (Submodule.span R {1})\n⊢ span {1} = ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mpr\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nI : Ideal R\nh : FG I\n⊢ I = ⊥ ∨ I = ⊤ → IsIdempotentElem I\n[PROOFSTEP]\nrintro (rfl | rfl)\n[GOAL]\ncase mpr.inl\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nh : FG ⊥\n⊢ IsIdempotentElem ⊥\n[PROOFSTEP]\nsimp [IsIdempotentElem]\n[GOAL]\ncase mpr.inr\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nh : FG ⊤\n⊢ IsIdempotentElem ⊤\n[PROOFSTEP]\nsimp [IsIdempotentElem]\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.Ideal.IdempotentFG", "llama_tokens": 2341, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO", "lm_q1_score": 0.4378234991142019, "lm_q2_score": 0.029312231281335196, "lm_q1q2_score": 0.012833583666438941}} {"text": "[GOAL]\nX : Type u_1\nY Z : CompHaus\nf : of (Ultrafilter X) ⟶ Z\ng : Y ⟶ Z\nhg : Epi g\n⊢ ∃ f', f' ≫ g = f\n[PROOFSTEP]\nrw [epi_iff_surjective] at hg \n[GOAL]\nX : Type u_1\nY Z : CompHaus\nf : of (Ultrafilter X) ⟶ Z\ng : Y ⟶ Z\nhg : Surjective ↑g\n⊢ ∃ f', f' ≫ g = f\n[PROOFSTEP]\nobtain ⟨g', hg'⟩ := hg.hasRightInverse\n[GOAL]\ncase intro\nX : Type u_1\nY Z : CompHaus\nf : of (Ultrafilter X) ⟶ Z\ng : Y ⟶ Z\nhg : Surjective ↑g\ng' : (forget CompHaus).obj Z → (forget CompHaus).obj Y\nhg' : Function.RightInverse g' ↑g\n⊢ ∃ f', f' ≫ g = f\n[PROOFSTEP]\nlet t : X → Y := g' ∘ f ∘ (pure : X → Ultrafilter X)\n[GOAL]\ncase intro\nX : Type u_1\nY Z : CompHaus\nf : of (Ultrafilter X) ⟶ Z\ng : Y ⟶ Z\nhg : Surjective ↑g\ng' : (forget CompHaus).obj Z → (forget CompHaus).obj Y\nhg' : Function.RightInverse g' ↑g\nt : X → ↑Y.toTop := g' ∘ ↑f ∘ pure\n⊢ ∃ f', f' ≫ g = f\n[PROOFSTEP]\nlet h : Ultrafilter X → Y := Ultrafilter.extend t\n[GOAL]\ncase intro\nX : Type u_1\nY Z : CompHaus\nf : of (Ultrafilter X) ⟶ Z\ng : Y ⟶ Z\nhg : Surjective ↑g\ng' : (forget CompHaus).obj Z → (forget CompHaus).obj Y\nhg' : Function.RightInverse g' ↑g\nt : X → ↑Y.toTop := g' ∘ ↑f ∘ pure\nh : Ultrafilter X → ↑Y.toTop := Ultrafilter.extend t\n⊢ ∃ f', f' ≫ g = f\n[PROOFSTEP]\nhave hh : Continuous h := continuous_ultrafilter_extend _\n[GOAL]\ncase intro\nX : Type u_1\nY Z : CompHaus\nf : of (Ultrafilter X) ⟶ Z\ng : Y ⟶ Z\nhg : Surjective ↑g\ng' : (forget CompHaus).obj Z → (forget CompHaus).obj Y\nhg' : Function.RightInverse g' ↑g\nt : X → ↑Y.toTop := g' ∘ ↑f ∘ pure\nh : Ultrafilter X → ↑Y.toTop := Ultrafilter.extend t\nhh : Continuous h\n⊢ ∃ f', f' ≫ g = f\n[PROOFSTEP]\nuse⟨h, hh⟩\n[GOAL]\ncase h\nX : Type u_1\nY Z : CompHaus\nf : of (Ultrafilter X) ⟶ Z\ng : Y ⟶ Z\nhg : Surjective ↑g\ng' : (forget CompHaus).obj Z → (forget CompHaus).obj Y\nhg' : Function.RightInverse g' ↑g\nt : X → ↑Y.toTop := g' ∘ ↑f ∘ pure\nh : Ultrafilter X → ↑Y.toTop := Ultrafilter.extend t\nhh : Continuous h\n⊢ ContinuousMap.mk h ≫ g = f\n[PROOFSTEP]\napply Faithful.map_injective (F := forget CompHaus)\n[GOAL]\ncase h.a\nX : Type u_1\nY Z : CompHaus\nf : of (Ultrafilter X) ⟶ Z\ng : Y ⟶ Z\nhg : Surjective ↑g\ng' : (forget CompHaus).obj Z → (forget CompHaus).obj Y\nhg' : Function.RightInverse g' ↑g\nt : X → ↑Y.toTop := g' ∘ ↑f ∘ pure\nh : Ultrafilter X → ↑Y.toTop := Ultrafilter.extend t\nhh : Continuous h\n⊢ (forget CompHaus).map (ContinuousMap.mk h ≫ g) = (forget CompHaus).map f\n[PROOFSTEP]\nsimp only [Functor.map_comp, ContinuousMap.coe_mk, coe_comp]\n[GOAL]\ncase h.a\nX : Type u_1\nY Z : CompHaus\nf : of (Ultrafilter X) ⟶ Z\ng : Y ⟶ Z\nhg : Surjective ↑g\ng' : (forget CompHaus).obj Z → (forget CompHaus).obj Y\nhg' : Function.RightInverse g' ↑g\nt : X → ↑Y.toTop := g' ∘ ↑f ∘ pure\nh : Ultrafilter X → ↑Y.toTop := Ultrafilter.extend t\nhh : Continuous h\n⊢ (forget CompHaus).map (ContinuousMap.mk (Ultrafilter.extend (g' ∘ ↑f ∘ pure))) ≫ (forget CompHaus).map g =\n (forget CompHaus).map f\n[PROOFSTEP]\nconvert\n denseRange_pure.equalizer (g.continuous.comp hh) f.continuous\n _\n -- Porting note: We need to get the coercions to functions under control.\n -- The next two lines should not be needed.\n[GOAL]\ncase h.a\nX : Type u_1\nY Z : CompHaus\nf : of (Ultrafilter X) ⟶ Z\ng : Y ⟶ Z\nhg : Surjective ↑g\ng' : (forget CompHaus).obj Z → (forget CompHaus).obj Y\nhg' : Function.RightInverse g' ↑g\nt : X → ↑Y.toTop := g' ∘ ↑f ∘ pure\nh : Ultrafilter X → ↑Y.toTop := Ultrafilter.extend t\nhh : Continuous h\n⊢ (↑g ∘ h) ∘ pure = ↑f ∘ pure\n[PROOFSTEP]\nlet g'' : ContinuousMap Y Z := g\n[GOAL]\ncase h.a\nX : Type u_1\nY Z : CompHaus\nf : of (Ultrafilter X) ⟶ Z\ng : Y ⟶ Z\nhg : Surjective ↑g\ng' : (forget CompHaus).obj Z → (forget CompHaus).obj Y\nhg' : Function.RightInverse g' ↑g\nt : X → ↑Y.toTop := g' ∘ ↑f ∘ pure\nh : Ultrafilter X → ↑Y.toTop := Ultrafilter.extend t\nhh : Continuous h\ng'' : C(↑Y.toTop, ↑Z.toTop) := g\n⊢ (↑g ∘ h) ∘ pure = ↑f ∘ pure\n[PROOFSTEP]\nhave : g'' ∘ g' = id := hg'.comp_eq_id\n[GOAL]\ncase h.a\nX : Type u_1\nY Z : CompHaus\nf : of (Ultrafilter X) ⟶ Z\ng : Y ⟶ Z\nhg : Surjective ↑g\ng' : (forget CompHaus).obj Z → (forget CompHaus).obj Y\nhg' : Function.RightInverse g' ↑g\nt : X → ↑Y.toTop := g' ∘ ↑f ∘ pure\nh : Ultrafilter X → ↑Y.toTop := Ultrafilter.extend t\nhh : Continuous h\ng'' : C(↑Y.toTop, ↑Z.toTop) := g\nthis : ↑g'' ∘ g' = id\n⊢ (↑g ∘ h) ∘ pure = ↑f ∘ pure\n[PROOFSTEP]\nrw [comp.assoc, ultrafilter_extend_extends, ← comp.assoc, this, comp.left_id]\n", "meta": {"mathlib_filename": "Mathlib.Topology.Category.CompHaus.Projective", "llama_tokens": 2071, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO", "lm_q1_score": 0.43782349911420193, "lm_q2_score": 0.028870907468524765, "lm_q1q2_score": 0.01264036173047186}} {"text": "[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.73, u_1} C\ninst✝ : MonoidalCategory C\n⊢ Inhabited (MonoidalSingleObj C)\n[PROOFSTEP]\nunfold MonoidalSingleObj\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.73, u_1} C\ninst✝ : MonoidalCategory C\n⊢ Inhabited PUnit\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.162, u_1} C\ninst✝ : MonoidalCategory C\na✝ b✝ : MonoidalSingleObj C\nf✝ g✝ : a✝ ⟶ b✝\nx✝ : f✝ ⟶ g✝\n⊢ (fun {a b c} X Y Z f => 𝟙 X ⊗ f) (𝟙 a✝) f✝ g✝ x✝ =\n ((fun {a b} X => λ_ X) f✝).hom ≫ x✝ ≫ ((fun {a b} X => λ_ X) g✝).inv\n[PROOFSTEP]\nsimp_rw [leftUnitor_inv_naturality, Iso.hom_inv_id_assoc]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.162, u_1} C\ninst✝ : MonoidalCategory C\na✝ b✝ c✝ d✝ : MonoidalSingleObj C\nx✝⁴ : a✝ ⟶ b✝\nx✝³ : b✝ ⟶ c✝\nx✝² x✝¹ : c✝ ⟶ d✝\nx✝ : x✝² ⟶ x✝¹\n⊢ (fun {a b c} X Y Z f => 𝟙 X ⊗ f) (x✝⁴ ≫ x✝³) x✝² x✝¹ x✝ =\n ((fun {a b c d} X Y Z => α_ X Y Z) x✝⁴ x✝³ x✝²).hom ≫\n (fun {a b c} X Y Z f => 𝟙 X ⊗ f) x✝⁴ (x✝³ ≫ x✝²) (x✝³ ≫ x✝¹) ((fun {a b c} X Y Z f => 𝟙 X ⊗ f) x✝³ x✝² x✝¹ x✝) ≫\n ((fun {a b c d} X Y Z => α_ X Y Z) x✝⁴ x✝³ x✝¹).inv\n[PROOFSTEP]\nsimp_rw [associator_inv_naturality, Iso.hom_inv_id_assoc, tensor_id]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.162, u_1} C\ninst✝ : MonoidalCategory C\na✝ b✝ : MonoidalSingleObj C\nf✝ g✝ : a✝ ⟶ b✝\nx✝ : f✝ ⟶ g✝\n⊢ (fun {a b c} {f g} f_1 Z => f_1 ⊗ 𝟙 Z) x✝ (𝟙 b✝) =\n ((fun {a b} X => ρ_ X) f✝).hom ≫ x✝ ≫ ((fun {a b} X => ρ_ X) g✝).inv\n[PROOFSTEP]\nsimp_rw [rightUnitor_inv_naturality, Iso.hom_inv_id_assoc]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.162, u_1} C\ninst✝ : MonoidalCategory C\na✝ b✝ c✝ d✝ : MonoidalSingleObj C\nf✝ f'✝ : a✝ ⟶ b✝\nx✝² : f✝ ⟶ f'✝\nx✝¹ : b✝ ⟶ c✝\nx✝ : c✝ ⟶ d✝\n⊢ (fun {a b c} {f g} f_1 Z => f_1 ⊗ 𝟙 Z) x✝² (x✝¹ ≫ x✝) =\n ((fun {a b c d} X Y Z => α_ X Y Z) f✝ x✝¹ x✝).inv ≫\n (fun {a b c} {f g} f_1 Z => f_1 ⊗ 𝟙 Z) ((fun {a b c} {f g} f_1 Z => f_1 ⊗ 𝟙 Z) x✝² x✝¹) x✝ ≫\n ((fun {a b c d} X Y Z => α_ X Y Z) f'✝ x✝¹ x✝).hom\n[PROOFSTEP]\nsimp_rw [← tensor_id, associator_naturality, Iso.inv_hom_id_assoc]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.162, u_1} C\ninst✝ : MonoidalCategory C\na✝ b✝ c✝ d✝ : MonoidalSingleObj C\nx✝⁴ : a✝ ⟶ b✝\nx✝³ x✝² : b✝ ⟶ c✝\nx✝¹ : x✝³ ⟶ x✝²\nx✝ : c✝ ⟶ d✝\n⊢ (fun {a b c} {f g} f_1 Z => f_1 ⊗ 𝟙 Z) ((fun {a b c} X Y Z f => 𝟙 X ⊗ f) x✝⁴ x✝³ x✝² x✝¹) x✝ =\n ((fun {a b c d} X Y Z => α_ X Y Z) x✝⁴ x✝³ x✝).hom ≫\n (fun {a b c} X Y Z f => 𝟙 X ⊗ f) x✝⁴ (x✝³ ≫ x✝) (x✝² ≫ x✝) ((fun {a b c} {f g} f_1 Z => f_1 ⊗ 𝟙 Z) x✝¹ x✝) ≫\n ((fun {a b c d} X Y Z => α_ X Y Z) x✝⁴ x✝² x✝).inv\n[PROOFSTEP]\nsimp_rw [associator_inv_naturality, Iso.hom_inv_id_assoc]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.162, u_1} C\ninst✝ : MonoidalCategory C\na✝ b✝ c✝ d✝ e✝ : MonoidalSingleObj C\nx✝³ : a✝ ⟶ b✝\nx✝² : b✝ ⟶ c✝\nx✝¹ : c✝ ⟶ d✝\nx✝ : d✝ ⟶ e✝\n⊢ (fun {a b c} {f g} f_1 Z => f_1 ⊗ 𝟙 Z) ((fun {a b c d} X Y Z => α_ X Y Z) x✝³ x✝² x✝¹).hom x✝ ≫\n ((fun {a b c d} X Y Z => α_ X Y Z) x✝³ (x✝² ≫ x✝¹) x✝).hom ≫\n (fun {a b c} X Y Z f => 𝟙 X ⊗ f) x✝³ ((x✝² ≫ x✝¹) ≫ x✝) (x✝² ≫ x✝¹ ≫ x✝)\n ((fun {a b c d} X Y Z => α_ X Y Z) x✝² x✝¹ x✝).hom =\n ((fun {a b c d} X Y Z => α_ X Y Z) (x✝³ ≫ x✝²) x✝¹ x✝).hom ≫\n ((fun {a b c d} X Y Z => α_ X Y Z) x✝³ x✝² (x✝¹ ≫ x✝)).hom\n[PROOFSTEP]\nsimp_rw [pentagon]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.14692, u_1} C\ninst✝ : MonoidalCategory C\nX✝ Y✝ X'✝ Y'✝ : EndMonoidal (MonoidalSingleObj.star C)\nf : X✝ ⟶ Y✝\ng : X'✝ ⟶ Y'✝\n⊢ ((Functor.mk { obj := fun X => X, map := fun {X Y} f => f }).map f ⊗\n (Functor.mk { obj := fun X => X, map := fun {X Y} f => f }).map g) ≫\n (fun X Y =>\n 𝟙\n ((Functor.mk { obj := fun X => X, map := fun {X Y} f => f }).obj X ⊗\n (Functor.mk { obj := fun X => X, map := fun {X Y} f => f }).obj Y))\n Y✝ Y'✝ =\n (fun X Y =>\n 𝟙\n ((Functor.mk { obj := fun X => X, map := fun {X Y} f => f }).obj X ⊗\n (Functor.mk { obj := fun X => X, map := fun {X Y} f => f }).obj Y))\n X✝ X'✝ ≫\n (Functor.mk { obj := fun X => X, map := fun {X Y} f => f }).map (f ⊗ g)\n[PROOFSTEP]\nsimp_rw [Category.id_comp, Category.comp_id]\n -- Should we provide further simp lemmas so this goal becomes visible?\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.14692, u_1} C\ninst✝ : MonoidalCategory C\nX✝ Y✝ X'✝ Y'✝ : EndMonoidal (MonoidalSingleObj.star C)\nf : X✝ ⟶ Y✝\ng : X'✝ ⟶ Y'✝\n⊢ f ⊗ g = f ⊗ g\n[PROOFSTEP]\nexact (tensor_id_comp_id_tensor _ _).symm\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Bicategory.SingleObj", "llama_tokens": 2815, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO", "lm_q1_score": 0.44552952031526044, "lm_q2_score": 0.0280075200989184, "lm_q1q2_score": 0.01247817699489113}} {"text": "[GOAL]\nX : CompHaus\ninst✝ : Projective X\n⊢ ExtremallyDisconnected ↑X.toTop\n[PROOFSTEP]\napply CompactT2.Projective.extremallyDisconnected\n[GOAL]\ncase h\nX : CompHaus\ninst✝ : Projective X\n⊢ CompactT2.Projective ↑X.toTop\n[PROOFSTEP]\nintro A B _ _ _ _ _ _ f g hf hg hsurj\n[GOAL]\ncase h\nX : CompHaus\ninst✝⁶ : Projective X\nA B : Type u\ninst✝⁵ : TopologicalSpace A\ninst✝⁴ : TopologicalSpace B\ninst✝³ : CompactSpace A\ninst✝² : T2Space A\ninst✝¹ : CompactSpace B\ninst✝ : T2Space B\nf : ↑X.toTop → B\ng : A → B\nhf : Continuous f\nhg : Continuous g\nhsurj : Function.Surjective g\n⊢ ∃ h, Continuous h ∧ g ∘ h = f\n[PROOFSTEP]\nhave : CompactSpace (TopCat.of A) := by assumption\n[GOAL]\nX : CompHaus\ninst✝⁶ : Projective X\nA B : Type u\ninst✝⁵ : TopologicalSpace A\ninst✝⁴ : TopologicalSpace B\ninst✝³ : CompactSpace A\ninst✝² : T2Space A\ninst✝¹ : CompactSpace B\ninst✝ : T2Space B\nf : ↑X.toTop → B\ng : A → B\nhf : Continuous f\nhg : Continuous g\nhsurj : Function.Surjective g\n⊢ CompactSpace ↑(TopCat.of A)\n[PROOFSTEP]\nassumption\n[GOAL]\ncase h\nX : CompHaus\ninst✝⁶ : Projective X\nA B : Type u\ninst✝⁵ : TopologicalSpace A\ninst✝⁴ : TopologicalSpace B\ninst✝³ : CompactSpace A\ninst✝² : T2Space A\ninst✝¹ : CompactSpace B\ninst✝ : T2Space B\nf : ↑X.toTop → B\ng : A → B\nhf : Continuous f\nhg : Continuous g\nhsurj : Function.Surjective g\nthis : CompactSpace ↑(TopCat.of A)\n⊢ ∃ h, Continuous h ∧ g ∘ h = f\n[PROOFSTEP]\nhave : T2Space (TopCat.of A) := by assumption\n[GOAL]\nX : CompHaus\ninst✝⁶ : Projective X\nA B : Type u\ninst✝⁵ : TopologicalSpace A\ninst✝⁴ : TopologicalSpace B\ninst✝³ : CompactSpace A\ninst✝² : T2Space A\ninst✝¹ : CompactSpace B\ninst✝ : T2Space B\nf : ↑X.toTop → B\ng : A → B\nhf : Continuous f\nhg : Continuous g\nhsurj : Function.Surjective g\nthis : CompactSpace ↑(TopCat.of A)\n⊢ T2Space ↑(TopCat.of A)\n[PROOFSTEP]\nassumption\n[GOAL]\ncase h\nX : CompHaus\ninst✝⁶ : Projective X\nA B : Type u\ninst✝⁵ : TopologicalSpace A\ninst✝⁴ : TopologicalSpace B\ninst✝³ : CompactSpace A\ninst✝² : T2Space A\ninst✝¹ : CompactSpace B\ninst✝ : T2Space B\nf : ↑X.toTop → B\ng : A → B\nhf : Continuous f\nhg : Continuous g\nhsurj : Function.Surjective g\nthis✝ : CompactSpace ↑(TopCat.of A)\nthis : T2Space ↑(TopCat.of A)\n⊢ ∃ h, Continuous h ∧ g ∘ h = f\n[PROOFSTEP]\nhave : CompactSpace (TopCat.of B) := by assumption\n[GOAL]\nX : CompHaus\ninst✝⁶ : Projective X\nA B : Type u\ninst✝⁵ : TopologicalSpace A\ninst✝⁴ : TopologicalSpace B\ninst✝³ : CompactSpace A\ninst✝² : T2Space A\ninst✝¹ : CompactSpace B\ninst✝ : T2Space B\nf : ↑X.toTop → B\ng : A → B\nhf : Continuous f\nhg : Continuous g\nhsurj : Function.Surjective g\nthis✝ : CompactSpace ↑(TopCat.of A)\nthis : T2Space ↑(TopCat.of A)\n⊢ CompactSpace ↑(TopCat.of B)\n[PROOFSTEP]\nassumption\n[GOAL]\ncase h\nX : CompHaus\ninst✝⁶ : Projective X\nA B : Type u\ninst✝⁵ : TopologicalSpace A\ninst✝⁴ : TopologicalSpace B\ninst✝³ : CompactSpace A\ninst✝² : T2Space A\ninst✝¹ : CompactSpace B\ninst✝ : T2Space B\nf : ↑X.toTop → B\ng : A → B\nhf : Continuous f\nhg : Continuous g\nhsurj : Function.Surjective g\nthis✝¹ : CompactSpace ↑(TopCat.of A)\nthis✝ : T2Space ↑(TopCat.of A)\nthis : CompactSpace ↑(TopCat.of B)\n⊢ ∃ h, Continuous h ∧ g ∘ h = f\n[PROOFSTEP]\nhave : T2Space (TopCat.of B) := by assumption\n[GOAL]\nX : CompHaus\ninst✝⁶ : Projective X\nA B : Type u\ninst✝⁵ : TopologicalSpace A\ninst✝⁴ : TopologicalSpace B\ninst✝³ : CompactSpace A\ninst✝² : T2Space A\ninst✝¹ : CompactSpace B\ninst✝ : T2Space B\nf : ↑X.toTop → B\ng : A → B\nhf : Continuous f\nhg : Continuous g\nhsurj : Function.Surjective g\nthis✝¹ : CompactSpace ↑(TopCat.of A)\nthis✝ : T2Space ↑(TopCat.of A)\nthis : CompactSpace ↑(TopCat.of B)\n⊢ T2Space ↑(TopCat.of B)\n[PROOFSTEP]\nassumption\n[GOAL]\ncase h\nX : CompHaus\ninst✝⁶ : Projective X\nA B : Type u\ninst✝⁵ : TopologicalSpace A\ninst✝⁴ : TopologicalSpace B\ninst✝³ : CompactSpace A\ninst✝² : T2Space A\ninst✝¹ : CompactSpace B\ninst✝ : T2Space B\nf : ↑X.toTop → B\ng : A → B\nhf : Continuous f\nhg : Continuous g\nhsurj : Function.Surjective g\nthis✝² : CompactSpace ↑(TopCat.of A)\nthis✝¹ : T2Space ↑(TopCat.of A)\nthis✝ : CompactSpace ↑(TopCat.of B)\nthis : T2Space ↑(TopCat.of B)\n⊢ ∃ h, Continuous h ∧ g ∘ h = f\n[PROOFSTEP]\nlet A' : CompHaus := ⟨TopCat.of A⟩\n[GOAL]\ncase h\nX : CompHaus\ninst✝⁶ : Projective X\nA B : Type u\ninst✝⁵ : TopologicalSpace A\ninst✝⁴ : TopologicalSpace B\ninst✝³ : CompactSpace A\ninst✝² : T2Space A\ninst✝¹ : CompactSpace B\ninst✝ : T2Space B\nf : ↑X.toTop → B\ng : A → B\nhf : Continuous f\nhg : Continuous g\nhsurj : Function.Surjective g\nthis✝² : CompactSpace ↑(TopCat.of A)\nthis✝¹ : T2Space ↑(TopCat.of A)\nthis✝ : CompactSpace ↑(TopCat.of B)\nthis : T2Space ↑(TopCat.of B)\nA' : CompHaus := mk (TopCat.of A)\n⊢ ∃ h, Continuous h ∧ g ∘ h = f\n[PROOFSTEP]\nlet B' : CompHaus := ⟨TopCat.of B⟩\n[GOAL]\ncase h\nX : CompHaus\ninst✝⁶ : Projective X\nA B : Type u\ninst✝⁵ : TopologicalSpace A\ninst✝⁴ : TopologicalSpace B\ninst✝³ : CompactSpace A\ninst✝² : T2Space A\ninst✝¹ : CompactSpace B\ninst✝ : T2Space B\nf : ↑X.toTop → B\ng : A → B\nhf : Continuous f\nhg : Continuous g\nhsurj : Function.Surjective g\nthis✝² : CompactSpace ↑(TopCat.of A)\nthis✝¹ : T2Space ↑(TopCat.of A)\nthis✝ : CompactSpace ↑(TopCat.of B)\nthis : T2Space ↑(TopCat.of B)\nA' : CompHaus := mk (TopCat.of A)\nB' : CompHaus := mk (TopCat.of B)\n⊢ ∃ h, Continuous h ∧ g ∘ h = f\n[PROOFSTEP]\nlet f' : X ⟶ B' := ⟨f, hf⟩\n[GOAL]\ncase h\nX : CompHaus\ninst✝⁶ : Projective X\nA B : Type u\ninst✝⁵ : TopologicalSpace A\ninst✝⁴ : TopologicalSpace B\ninst✝³ : CompactSpace A\ninst✝² : T2Space A\ninst✝¹ : CompactSpace B\ninst✝ : T2Space B\nf : ↑X.toTop → B\ng : A → B\nhf : Continuous f\nhg : Continuous g\nhsurj : Function.Surjective g\nthis✝² : CompactSpace ↑(TopCat.of A)\nthis✝¹ : T2Space ↑(TopCat.of A)\nthis✝ : CompactSpace ↑(TopCat.of B)\nthis : T2Space ↑(TopCat.of B)\nA' : CompHaus := mk (TopCat.of A)\nB' : CompHaus := mk (TopCat.of B)\nf' : X ⟶ B' := ContinuousMap.mk f\n⊢ ∃ h, Continuous h ∧ g ∘ h = f\n[PROOFSTEP]\nlet g' : A' ⟶ B' := ⟨g, hg⟩\n[GOAL]\ncase h\nX : CompHaus\ninst✝⁶ : Projective X\nA B : Type u\ninst✝⁵ : TopologicalSpace A\ninst✝⁴ : TopologicalSpace B\ninst✝³ : CompactSpace A\ninst✝² : T2Space A\ninst✝¹ : CompactSpace B\ninst✝ : T2Space B\nf : ↑X.toTop → B\ng : A → B\nhf : Continuous f\nhg : Continuous g\nhsurj : Function.Surjective g\nthis✝² : CompactSpace ↑(TopCat.of A)\nthis✝¹ : T2Space ↑(TopCat.of A)\nthis✝ : CompactSpace ↑(TopCat.of B)\nthis : T2Space ↑(TopCat.of B)\nA' : CompHaus := mk (TopCat.of A)\nB' : CompHaus := mk (TopCat.of B)\nf' : X ⟶ B' := ContinuousMap.mk f\ng' : A' ⟶ B' := ContinuousMap.mk g\n⊢ ∃ h, Continuous h ∧ g ∘ h = f\n[PROOFSTEP]\nhave : Epi g' := by\n rw [CompHaus.epi_iff_surjective]\n assumption\n[GOAL]\nX : CompHaus\ninst✝⁶ : Projective X\nA B : Type u\ninst✝⁵ : TopologicalSpace A\ninst✝⁴ : TopologicalSpace B\ninst✝³ : CompactSpace A\ninst✝² : T2Space A\ninst✝¹ : CompactSpace B\ninst✝ : T2Space B\nf : ↑X.toTop → B\ng : A → B\nhf : Continuous f\nhg : Continuous g\nhsurj : Function.Surjective g\nthis✝² : CompactSpace ↑(TopCat.of A)\nthis✝¹ : T2Space ↑(TopCat.of A)\nthis✝ : CompactSpace ↑(TopCat.of B)\nthis : T2Space ↑(TopCat.of B)\nA' : CompHaus := mk (TopCat.of A)\nB' : CompHaus := mk (TopCat.of B)\nf' : X ⟶ B' := ContinuousMap.mk f\ng' : A' ⟶ B' := ContinuousMap.mk g\n⊢ Epi g'\n[PROOFSTEP]\nrw [CompHaus.epi_iff_surjective]\n[GOAL]\nX : CompHaus\ninst✝⁶ : Projective X\nA B : Type u\ninst✝⁵ : TopologicalSpace A\ninst✝⁴ : TopologicalSpace B\ninst✝³ : CompactSpace A\ninst✝² : T2Space A\ninst✝¹ : CompactSpace B\ninst✝ : T2Space B\nf : ↑X.toTop → B\ng : A → B\nhf : Continuous f\nhg : Continuous g\nhsurj : Function.Surjective g\nthis✝² : CompactSpace ↑(TopCat.of A)\nthis✝¹ : T2Space ↑(TopCat.of A)\nthis✝ : CompactSpace ↑(TopCat.of B)\nthis : T2Space ↑(TopCat.of B)\nA' : CompHaus := mk (TopCat.of A)\nB' : CompHaus := mk (TopCat.of B)\nf' : X ⟶ B' := ContinuousMap.mk f\ng' : A' ⟶ B' := ContinuousMap.mk g\n⊢ Function.Surjective ↑g'\n[PROOFSTEP]\nassumption\n[GOAL]\ncase h\nX : CompHaus\ninst✝⁶ : Projective X\nA B : Type u\ninst✝⁵ : TopologicalSpace A\ninst✝⁴ : TopologicalSpace B\ninst✝³ : CompactSpace A\ninst✝² : T2Space A\ninst✝¹ : CompactSpace B\ninst✝ : T2Space B\nf : ↑X.toTop → B\ng : A → B\nhf : Continuous f\nhg : Continuous g\nhsurj : Function.Surjective g\nthis✝³ : CompactSpace ↑(TopCat.of A)\nthis✝² : T2Space ↑(TopCat.of A)\nthis✝¹ : CompactSpace ↑(TopCat.of B)\nthis✝ : T2Space ↑(TopCat.of B)\nA' : CompHaus := mk (TopCat.of A)\nB' : CompHaus := mk (TopCat.of B)\nf' : X ⟶ B' := ContinuousMap.mk f\ng' : A' ⟶ B' := ContinuousMap.mk g\nthis : Epi g'\n⊢ ∃ h, Continuous h ∧ g ∘ h = f\n[PROOFSTEP]\nobtain ⟨h, hh⟩ := Projective.factors f' g'\n[GOAL]\ncase h.intro\nX : CompHaus\ninst✝⁶ : Projective X\nA B : Type u\ninst✝⁵ : TopologicalSpace A\ninst✝⁴ : TopologicalSpace B\ninst✝³ : CompactSpace A\ninst✝² : T2Space A\ninst✝¹ : CompactSpace B\ninst✝ : T2Space B\nf : ↑X.toTop → B\ng : A → B\nhf : Continuous f\nhg : Continuous g\nhsurj : Function.Surjective g\nthis✝³ : CompactSpace ↑(TopCat.of A)\nthis✝² : T2Space ↑(TopCat.of A)\nthis✝¹ : CompactSpace ↑(TopCat.of B)\nthis✝ : T2Space ↑(TopCat.of B)\nA' : CompHaus := mk (TopCat.of A)\nB' : CompHaus := mk (TopCat.of B)\nf' : X ⟶ B' := ContinuousMap.mk f\ng' : A' ⟶ B' := ContinuousMap.mk g\nthis : Epi g'\nh : X ⟶ A'\nhh : h ≫ g' = f'\n⊢ ∃ h, Continuous h ∧ g ∘ h = f\n[PROOFSTEP]\nrefine ⟨h, h.2, ?_⟩\n[GOAL]\ncase h.intro\nX : CompHaus\ninst✝⁶ : Projective X\nA B : Type u\ninst✝⁵ : TopologicalSpace A\ninst✝⁴ : TopologicalSpace B\ninst✝³ : CompactSpace A\ninst✝² : T2Space A\ninst✝¹ : CompactSpace B\ninst✝ : T2Space B\nf : ↑X.toTop → B\ng : A → B\nhf : Continuous f\nhg : Continuous g\nhsurj : Function.Surjective g\nthis✝³ : CompactSpace ↑(TopCat.of A)\nthis✝² : T2Space ↑(TopCat.of A)\nthis✝¹ : CompactSpace ↑(TopCat.of B)\nthis✝ : T2Space ↑(TopCat.of B)\nA' : CompHaus := mk (TopCat.of A)\nB' : CompHaus := mk (TopCat.of B)\nf' : X ⟶ B' := ContinuousMap.mk f\ng' : A' ⟶ B' := ContinuousMap.mk g\nthis : Epi g'\nh : X ⟶ A'\nhh : h ≫ g' = f'\n⊢ g ∘ ↑h = f\n[PROOFSTEP]\next t\n[GOAL]\ncase h.intro.h\nX : CompHaus\ninst✝⁶ : Projective X\nA B : Type u\ninst✝⁵ : TopologicalSpace A\ninst✝⁴ : TopologicalSpace B\ninst✝³ : CompactSpace A\ninst✝² : T2Space A\ninst✝¹ : CompactSpace B\ninst✝ : T2Space B\nf : ↑X.toTop → B\ng : A → B\nhf : Continuous f\nhg : Continuous g\nhsurj : Function.Surjective g\nthis✝³ : CompactSpace ↑(TopCat.of A)\nthis✝² : T2Space ↑(TopCat.of A)\nthis✝¹ : CompactSpace ↑(TopCat.of B)\nthis✝ : T2Space ↑(TopCat.of B)\nA' : CompHaus := mk (TopCat.of A)\nB' : CompHaus := mk (TopCat.of B)\nf' : X ⟶ B' := ContinuousMap.mk f\ng' : A' ⟶ B' := ContinuousMap.mk g\nthis : Epi g'\nh : X ⟶ A'\nhh : h ≫ g' = f'\nt : ↑X.toTop\n⊢ (g ∘ ↑h) t = f t\n[PROOFSTEP]\napply_fun (fun e => e t) at hh \n[GOAL]\ncase h.intro.h\nX : CompHaus\ninst✝⁶ : Projective X\nA B : Type u\ninst✝⁵ : TopologicalSpace A\ninst✝⁴ : TopologicalSpace B\ninst✝³ : CompactSpace A\ninst✝² : T2Space A\ninst✝¹ : CompactSpace B\ninst✝ : T2Space B\nf : ↑X.toTop → B\ng : A → B\nhf : Continuous f\nhg : Continuous g\nhsurj : Function.Surjective g\nthis✝³ : CompactSpace ↑(TopCat.of A)\nthis✝² : T2Space ↑(TopCat.of A)\nthis✝¹ : CompactSpace ↑(TopCat.of B)\nthis✝ : T2Space ↑(TopCat.of B)\nA' : CompHaus := mk (TopCat.of A)\nB' : CompHaus := mk (TopCat.of B)\nf' : X ⟶ B' := ContinuousMap.mk f\ng' : A' ⟶ B' := ContinuousMap.mk g\nthis : Epi g'\nh : X ⟶ A'\nt : ↑X.toTop\nhh : ↑(h ≫ g') t = ↑f' t\n⊢ (g ∘ ↑h) t = f t\n[PROOFSTEP]\nexact hh\n", "meta": {"mathlib_filename": "Mathlib.Topology.Category.Stonean.Basic", "llama_tokens": 5413, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO", "lm_q1_score": 0.480478678047907, "lm_q2_score": 0.02517884051192404, "lm_q1q2_score": 0.012097896003948349}} {"text": "[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf : Y ⟶ X\n⊢ CompleteLattice (Presieve X)\n[PROOFSTEP]\ndsimp [Presieve]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf : Y ⟶ X\n⊢ CompleteLattice (⦃Y : C⦄ → Set (Y ⟶ X))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf✝ f g : Y ⟶ X\n⊢ singleton f g ↔ f = g\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf✝ f g : Y ⟶ X\n⊢ singleton f g → f = g\n[PROOFSTEP]\nrintro ⟨a, rfl⟩\n[GOAL]\ncase mp.mk\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y✝ Z : C\nf✝ f : Y✝ ⟶ X\nY : C\n⊢ f = f\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mpr\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf✝ f g : Y ⟶ X\n⊢ f = g → singleton f g\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase mpr\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf✝ f : Y ⟶ X\n⊢ singleton f f\n[PROOFSTEP]\napply singleton.mk\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf : Y ⟶ X\ninst✝ : HasPullbacks C\ng : Z ⟶ X\n⊢ pullbackArrows f (singleton g) = singleton pullback.snd\n[PROOFSTEP]\nfunext W\n[GOAL]\ncase h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf : Y ⟶ X\ninst✝ : HasPullbacks C\ng : Z ⟶ X\nW : C\n⊢ pullbackArrows f (singleton g) = singleton pullback.snd\n[PROOFSTEP]\next h\n[GOAL]\ncase h.h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf : Y ⟶ X\ninst✝ : HasPullbacks C\ng : Z ⟶ X\nW : C\nh : W ⟶ Y\n⊢ h ∈ pullbackArrows f (singleton g) ↔ h ∈ singleton pullback.snd\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.h.mp\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf : Y ⟶ X\ninst✝ : HasPullbacks C\ng : Z ⟶ X\nW : C\nh : W ⟶ Y\n⊢ h ∈ pullbackArrows f (singleton g) → h ∈ singleton pullback.snd\n[PROOFSTEP]\nrintro ⟨W, _, _, _⟩\n[GOAL]\ncase h.h.mp.mk.mk\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y✝¹ Z : C\nf : Y✝¹ ⟶ X\ninst✝ : HasPullbacks C\ng : Z ⟶ X\nY✝ Y : C\n⊢ pullback.snd ∈ singleton pullback.snd\n[PROOFSTEP]\nexact singleton.mk\n[GOAL]\ncase h.h.mpr\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf : Y ⟶ X\ninst✝ : HasPullbacks C\ng : Z ⟶ X\nW : C\nh : W ⟶ Y\n⊢ h ∈ singleton pullback.snd → h ∈ pullbackArrows f (singleton g)\n[PROOFSTEP]\nrintro ⟨_⟩\n[GOAL]\ncase h.h.mpr.mk\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y✝ Z : C\nf : Y✝ ⟶ X\ninst✝ : HasPullbacks C\ng : Z ⟶ X\nY : C\n⊢ pullback.snd ∈ pullbackArrows f (singleton g)\n[PROOFSTEP]\nexact pullbackArrows.mk Z g singleton.mk\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf : Y ⟶ X\n⊢ (ofArrows (fun x => Y) fun x => f) = singleton f\n[PROOFSTEP]\nfunext Y\n[GOAL]\ncase h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y✝ Z : C\nf : Y✝ ⟶ X\nY : C\n⊢ (ofArrows (fun x => Y✝) fun x => f) = singleton f\n[PROOFSTEP]\next g\n[GOAL]\ncase h.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y✝ Z : C\nf : Y✝ ⟶ X\nY : C\ng : Y ⟶ X\n⊢ (g ∈ ofArrows (fun x => Y✝) fun x => f) ↔ g ∈ singleton f\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.h.mp\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y✝ Z : C\nf : Y✝ ⟶ X\nY : C\ng : Y ⟶ X\n⊢ (g ∈ ofArrows (fun x => Y✝) fun x => f) → g ∈ singleton f\n[PROOFSTEP]\nrintro ⟨_⟩\n[GOAL]\ncase h.h.mp.mk\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y✝ Z : C\nf : Y✝ ⟶ X\nY : C\ni✝ : PUnit\n⊢ f ∈ singleton f\n[PROOFSTEP]\napply singleton.mk\n[GOAL]\ncase h.h.mpr\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y✝ Z : C\nf : Y✝ ⟶ X\nY : C\ng : Y ⟶ X\n⊢ g ∈ singleton f → g ∈ ofArrows (fun x => Y✝) fun x => f\n[PROOFSTEP]\nrintro ⟨_⟩\n[GOAL]\ncase h.h.mpr.mk\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y✝ Z : C\nf : Y✝ ⟶ X\nY : C\n⊢ f ∈ ofArrows (fun x => Y✝) fun x => f\n[PROOFSTEP]\nexact ofArrows.mk PUnit.unit\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z✝ : C\nf : Y ⟶ X\ninst✝ : HasPullbacks C\nι : Type u_1\nZ : ι → C\ng : (i : ι) → Z i ⟶ X\n⊢ (ofArrows (fun i => pullback (g i) f) fun i => pullback.snd) = pullbackArrows f (ofArrows Z g)\n[PROOFSTEP]\nfunext T\n[GOAL]\ncase h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z✝ : C\nf : Y ⟶ X\ninst✝ : HasPullbacks C\nι : Type u_1\nZ : ι → C\ng : (i : ι) → Z i ⟶ X\nT : C\n⊢ (ofArrows (fun i => pullback (g i) f) fun i => pullback.snd) = pullbackArrows f (ofArrows Z g)\n[PROOFSTEP]\next h\n[GOAL]\ncase h.h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z✝ : C\nf : Y ⟶ X\ninst✝ : HasPullbacks C\nι : Type u_1\nZ : ι → C\ng : (i : ι) → Z i ⟶ X\nT : C\nh : T ⟶ Y\n⊢ (h ∈ ofArrows (fun i => pullback (g i) f) fun i => pullback.snd) ↔ h ∈ pullbackArrows f (ofArrows Z g)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.h.mp\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z✝ : C\nf : Y ⟶ X\ninst✝ : HasPullbacks C\nι : Type u_1\nZ : ι → C\ng : (i : ι) → Z i ⟶ X\nT : C\nh : T ⟶ Y\n⊢ (h ∈ ofArrows (fun i => pullback (g i) f) fun i => pullback.snd) → h ∈ pullbackArrows f (ofArrows Z g)\n[PROOFSTEP]\nrintro ⟨hk⟩\n[GOAL]\ncase h.h.mp.mk\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y✝ Z✝ : C\nf : Y✝ ⟶ X\ninst✝ : HasPullbacks C\nι : Type u_1\nZ : ι → C\ng : (i : ι) → Z i ⟶ X\nY : C\nhk : ι\n⊢ pullback.snd ∈ pullbackArrows f (ofArrows Z g)\n[PROOFSTEP]\nexact pullbackArrows.mk _ _ (ofArrows.mk hk)\n[GOAL]\ncase h.h.mpr\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z✝ : C\nf : Y ⟶ X\ninst✝ : HasPullbacks C\nι : Type u_1\nZ : ι → C\ng : (i : ι) → Z i ⟶ X\nT : C\nh : T ⟶ Y\n⊢ h ∈ pullbackArrows f (ofArrows Z g) → h ∈ ofArrows (fun i => pullback (g i) f) fun i => pullback.snd\n[PROOFSTEP]\nrintro ⟨W, k, hk₁⟩\n[GOAL]\ncase h.h.mpr.mk\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y✝ Z✝ : C\nf : Y✝ ⟶ X\ninst✝ : HasPullbacks C\nι : Type u_1\nZ : ι → C\ng : (i : ι) → Z i ⟶ X\nY W : C\nk : W ⟶ X\nhk₁ : ofArrows Z g k\n⊢ pullback.snd ∈ ofArrows (fun i => pullback (g i) f) fun i => pullback.snd\n[PROOFSTEP]\ncases' hk₁ with i hi\n[GOAL]\ncase h.h.mpr.mk.mk\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y✝ Z✝ : C\nf : Y✝ ⟶ X\ninst✝ : HasPullbacks C\nι : Type u_1\nZ : ι → C\ng : (i : ι) → Z i ⟶ X\nY : C\ni : ι\n⊢ pullback.snd ∈ ofArrows (fun i => pullback (g i) f) fun i => pullback.snd\n[PROOFSTEP]\napply ofArrows.mk\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z✝ : C\nf : Y ⟶ X\nι : Type u_1\nZ : ι → C\ng : (i : ι) → Z i ⟶ X\nj : ⦃Y : C⦄ → (f : Y ⟶ X) → ofArrows Z g f → Type u_2\nW : ⦃Y : C⦄ → (f : Y ⟶ X) → (H : ofArrows Z g f) → j f H → C\nk : ⦃Y : C⦄ → (f : Y ⟶ X) → (H : ofArrows Z g f) → (i : j f H) → W f H i ⟶ Y\n⊢ (bind (ofArrows Z g) fun Y f H => ofArrows (W f H) (k f H)) =\n ofArrows (fun i => W (g i.fst) (_ : ofArrows Z g (g i.fst)) i.snd) fun ij =>\n k (g ij.fst) (_ : ofArrows Z g (g ij.fst)) ij.snd ≫ g ij.fst\n[PROOFSTEP]\nfunext Y\n[GOAL]\ncase h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y✝ Z✝ : C\nf : Y✝ ⟶ X\nι : Type u_1\nZ : ι → C\ng : (i : ι) → Z i ⟶ X\nj : ⦃Y : C⦄ → (f : Y ⟶ X) → ofArrows Z g f → Type u_2\nW : ⦃Y : C⦄ → (f : Y ⟶ X) → (H : ofArrows Z g f) → j f H → C\nk : ⦃Y : C⦄ → (f : Y ⟶ X) → (H : ofArrows Z g f) → (i : j f H) → W f H i ⟶ Y\nY : C\n⊢ (bind (ofArrows Z g) fun Y f H => ofArrows (W f H) (k f H)) =\n ofArrows (fun i => W (g i.fst) (_ : ofArrows Z g (g i.fst)) i.snd) fun ij =>\n k (g ij.fst) (_ : ofArrows Z g (g ij.fst)) ij.snd ≫ g ij.fst\n[PROOFSTEP]\next f\n[GOAL]\ncase h.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y✝ Z✝ : C\nf✝ : Y✝ ⟶ X\nι : Type u_1\nZ : ι → C\ng : (i : ι) → Z i ⟶ X\nj : ⦃Y : C⦄ → (f : Y ⟶ X) → ofArrows Z g f → Type u_2\nW : ⦃Y : C⦄ → (f : Y ⟶ X) → (H : ofArrows Z g f) → j f H → C\nk : ⦃Y : C⦄ → (f : Y ⟶ X) → (H : ofArrows Z g f) → (i : j f H) → W f H i ⟶ Y\nY : C\nf : Y ⟶ X\n⊢ (f ∈ bind (ofArrows Z g) fun Y f H => ofArrows (W f H) (k f H)) ↔\n f ∈\n ofArrows (fun i => W (g i.fst) (_ : ofArrows Z g (g i.fst)) i.snd) fun ij =>\n k (g ij.fst) (_ : ofArrows Z g (g ij.fst)) ij.snd ≫ g ij.fst\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.h.mp\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y✝ Z✝ : C\nf✝ : Y✝ ⟶ X\nι : Type u_1\nZ : ι → C\ng : (i : ι) → Z i ⟶ X\nj : ⦃Y : C⦄ → (f : Y ⟶ X) → ofArrows Z g f → Type u_2\nW : ⦃Y : C⦄ → (f : Y ⟶ X) → (H : ofArrows Z g f) → j f H → C\nk : ⦃Y : C⦄ → (f : Y ⟶ X) → (H : ofArrows Z g f) → (i : j f H) → W f H i ⟶ Y\nY : C\nf : Y ⟶ X\n⊢ (f ∈ bind (ofArrows Z g) fun Y f H => ofArrows (W f H) (k f H)) →\n f ∈\n ofArrows (fun i => W (g i.fst) (_ : ofArrows Z g (g i.fst)) i.snd) fun ij =>\n k (g ij.fst) (_ : ofArrows Z g (g ij.fst)) ij.snd ≫ g ij.fst\n[PROOFSTEP]\nrintro ⟨_, _, _, ⟨i⟩, ⟨i'⟩, rfl⟩\n[GOAL]\ncase h.h.mp.intro.intro.intro.intro.mk.intro.mk\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y✝¹ Z✝ : C\nf : Y✝¹ ⟶ X\nι : Type u_1\nZ : ι → C\ng : (i : ι) → Z i ⟶ X\nj : ⦃Y : C⦄ → (f : Y ⟶ X) → ofArrows Z g f → Type u_2\nW : ⦃Y : C⦄ → (f : Y ⟶ X) → (H : ofArrows Z g f) → j f H → C\nk : ⦃Y : C⦄ → (f : Y ⟶ X) → (H : ofArrows Z g f) → (i : j f H) → W f H i ⟶ Y\nY✝ : C\ni : ι\nY : C\ni' : j (g i) (_ : ofArrows Z g (g i))\n⊢ k (g i) (_ : ofArrows Z g (g i)) i' ≫ g i ∈\n ofArrows (fun i => W (g i.fst) (_ : ofArrows Z g (g i.fst)) i.snd) fun ij =>\n k (g ij.fst) (_ : ofArrows Z g (g ij.fst)) ij.snd ≫ g ij.fst\n[PROOFSTEP]\nexact ofArrows.mk (Sigma.mk _ _)\n[GOAL]\ncase h.h.mpr\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y✝ Z✝ : C\nf✝ : Y✝ ⟶ X\nι : Type u_1\nZ : ι → C\ng : (i : ι) → Z i ⟶ X\nj : ⦃Y : C⦄ → (f : Y ⟶ X) → ofArrows Z g f → Type u_2\nW : ⦃Y : C⦄ → (f : Y ⟶ X) → (H : ofArrows Z g f) → j f H → C\nk : ⦃Y : C⦄ → (f : Y ⟶ X) → (H : ofArrows Z g f) → (i : j f H) → W f H i ⟶ Y\nY : C\nf : Y ⟶ X\n⊢ (f ∈\n ofArrows (fun i => W (g i.fst) (_ : ofArrows Z g (g i.fst)) i.snd) fun ij =>\n k (g ij.fst) (_ : ofArrows Z g (g ij.fst)) ij.snd ≫ g ij.fst) →\n f ∈ bind (ofArrows Z g) fun Y f H => ofArrows (W f H) (k f H)\n[PROOFSTEP]\nrintro ⟨i⟩\n[GOAL]\ncase h.h.mpr.mk\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y✝ Z✝ : C\nf : Y✝ ⟶ X\nι : Type u_1\nZ : ι → C\ng : (i : ι) → Z i ⟶ X\nj : ⦃Y : C⦄ → (f : Y ⟶ X) → ofArrows Z g f → Type u_2\nW : ⦃Y : C⦄ → (f : Y ⟶ X) → (H : ofArrows Z g f) → j f H → C\nk : ⦃Y : C⦄ → (f : Y ⟶ X) → (H : ofArrows Z g f) → (i : j f H) → W f H i ⟶ Y\nY : C\ni : (i : ι) × j (g i) (_ : ofArrows Z g (g i))\n⊢ k (g i.fst) (_ : ofArrows Z g (g i.fst)) i.snd ≫ g i.fst ∈ bind (ofArrows Z g) fun Y f H => ofArrows (W f H) (k f H)\n[PROOFSTEP]\nexact bind_comp _ (ofArrows.mk _) (ofArrows.mk _)\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF✝ : C ⥤ D\nX Y✝ Z : C\nf✝ : Y✝ ⟶ X\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nF : C ⥤ D\nS : Presieve X\nY : D\nf : Y ⟶ F.obj X\nh : functorPushforward F S f\n⊢ FunctorPushforwardStructure F S f\n[PROOFSTEP]\nchoose Z f' g h₁ h using h\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF✝ : C ⥤ D\nX Y✝ Z✝ : C\nf✝ : Y✝ ⟶ X\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nF : C ⥤ D\nS : Presieve X\nY : D\nf : Y ⟶ F.obj X\nZ : C\nf' : Z ⟶ X\ng : Y ⟶ F.obj Z\nh₁ : S f'\nh : f = g ≫ F.map f'\n⊢ FunctorPushforwardStructure F S f\n[PROOFSTEP]\nexact ⟨Z, f', g, h₁, h⟩\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf : Y ⟶ X\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nR : Presieve X\n⊢ functorPushforward (F ⋙ G) R = functorPushforward G (functorPushforward F R)\n[PROOFSTEP]\nfunext x\n[GOAL]\ncase h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf : Y ⟶ X\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nR : Presieve X\nx : E\n⊢ functorPushforward (F ⋙ G) R = functorPushforward G (functorPushforward F R)\n[PROOFSTEP]\next f\n[GOAL]\ncase h.h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf✝ : Y ⟶ X\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nR : Presieve X\nx : E\nf : x ⟶ (F ⋙ G).obj X\n⊢ f ∈ functorPushforward (F ⋙ G) R ↔ f ∈ functorPushforward G (functorPushforward F R)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.h.mp\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf✝ : Y ⟶ X\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nR : Presieve X\nx : E\nf : x ⟶ (F ⋙ G).obj X\n⊢ f ∈ functorPushforward (F ⋙ G) R → f ∈ functorPushforward G (functorPushforward F R)\n[PROOFSTEP]\nrintro ⟨X, f₁, g₁, h₁, rfl⟩\n[GOAL]\ncase h.h.mp.intro.intro.intro.intro\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX✝ Y Z : C\nf : Y ⟶ X✝\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nR : Presieve X✝\nx : E\nX : C\nf₁ : X ⟶ X✝\ng₁ : x ⟶ (F ⋙ G).obj X\nh₁ : R f₁\n⊢ g₁ ≫ (F ⋙ G).map f₁ ∈ functorPushforward G (functorPushforward F R)\n[PROOFSTEP]\nexact ⟨F.obj X, F.map f₁, g₁, ⟨X, f₁, 𝟙 _, h₁, by simp⟩, rfl⟩\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX✝ Y Z : C\nf : Y ⟶ X✝\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nR : Presieve X✝\nx : E\nX : C\nf₁ : X ⟶ X✝\ng₁ : x ⟶ (F ⋙ G).obj X\nh₁ : R f₁\n⊢ F.map f₁ = 𝟙 (F.obj X) ≫ F.map f₁\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.h.mpr\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf✝ : Y ⟶ X\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nR : Presieve X\nx : E\nf : x ⟶ (F ⋙ G).obj X\n⊢ f ∈ functorPushforward G (functorPushforward F R) → f ∈ functorPushforward (F ⋙ G) R\n[PROOFSTEP]\nrintro ⟨X, f₁, g₁, ⟨X', f₂, g₂, h₁, rfl⟩, rfl⟩\n[GOAL]\ncase h.h.mpr.intro.intro.intro.intro.intro.intro.intro.intro\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX✝ Y Z : C\nf : Y ⟶ X✝\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nR : Presieve X✝\nx : E\nX : D\ng₁ : x ⟶ G.obj X\nX' : C\nf₂ : X' ⟶ X✝\ng₂ : X ⟶ F.obj X'\nh₁ : R f₂\n⊢ g₁ ≫ G.map (g₂ ≫ F.map f₂) ∈ functorPushforward (F ⋙ G) R\n[PROOFSTEP]\nexact ⟨X', f₂, g₁ ≫ G.map g₂, h₁, by simp⟩\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX✝ Y Z : C\nf : Y ⟶ X✝\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nR : Presieve X✝\nx : E\nX : D\ng₁ : x ⟶ G.obj X\nX' : C\nf₂ : X' ⟶ X✝\ng₂ : X ⟶ F.obj X'\nh₁ : R f₂\n⊢ g₁ ≫ G.map (g₂ ≫ F.map f₂) = (g₁ ≫ G.map g₂) ≫ (F ⋙ G).map f₂\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf✝ : Y ⟶ X\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nR : Presieve X\nf : Y ⟶ X\nh : R f\n⊢ F.map f = 𝟙 (F.obj Y) ≫ F.map f\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf : Y ⟶ X\nS R : Sieve X\n⊢ ∀ {R S : Sieve X}, R.arrows = S.arrows → R = S\n[PROOFSTEP]\nrintro ⟨_, _⟩ ⟨_, _⟩ rfl\n[GOAL]\ncase mk.mk\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf : Y ⟶ X\nS R : Sieve X\narrows✝ : Presieve X\ndownward_closed✝¹ : ∀ {Y Z : C} {f : Y ⟶ X}, arrows✝ f → ∀ (g : Z ⟶ Y), arrows✝ (g ≫ f)\ndownward_closed✝ :\n ∀ {Y Z : C} {f : Y ⟶ X},\n { arrows := arrows✝, downward_closed := downward_closed✝¹ }.arrows f →\n ∀ (g : Z ⟶ Y), { arrows := arrows✝, downward_closed := downward_closed✝¹ }.arrows (g ≫ f)\n⊢ { arrows := arrows✝, downward_closed := downward_closed✝¹ } =\n { arrows := { arrows := arrows✝, downward_closed := downward_closed✝¹ }.arrows,\n downward_closed := downward_closed✝ }\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf✝ : Y ⟶ X\nS R : Sieve X\n𝒮 : Set (Sieve X)\nx✝² x✝¹ : C\nf : x✝² ⟶ X\nhf : (fun Y => {f | ∃ S, S ∈ 𝒮 ∧ S.arrows f}) x✝² f\nx✝ : x✝¹ ⟶ x✝²\n⊢ (fun Y => {f | ∃ S, S ∈ 𝒮 ∧ S.arrows f}) x✝¹ (x✝ ≫ f)\n[PROOFSTEP]\nobtain ⟨S, hS, hf⟩ := hf\n[GOAL]\ncase intro.intro\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf✝ : Y ⟶ X\nS✝ R : Sieve X\n𝒮 : Set (Sieve X)\nx✝² x✝¹ : C\nf : x✝² ⟶ X\nx✝ : x✝¹ ⟶ x✝²\nS : Sieve X\nhS : S ∈ 𝒮\nhf : S.arrows f\n⊢ setOf (fun f => ∃ S, S ∈ 𝒮 ∧ S.arrows f) (x✝ ≫ f)\n[PROOFSTEP]\nexact ⟨S, hS, S.downward_closed hf _⟩\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf : Y ⟶ X\nS✝ R✝ S R : Sieve X\n⊢ ∀ {Y Z : C} {f : Y ⟶ X},\n (fun Y f => S.arrows f ∨ R.arrows f) Y f → ∀ (g : Z ⟶ Y), (fun Y f => S.arrows f ∨ R.arrows f) Z (g ≫ f)\n[PROOFSTEP]\nrintro _ _ _ (h | h) g\n[GOAL]\ncase inl\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf : Y ⟶ X\nS✝ R✝ S R : Sieve X\nY✝ Z✝ : C\nf✝ : Y✝ ⟶ X\nh : S.arrows f✝\ng : Z✝ ⟶ Y✝\n⊢ S.arrows (g ≫ f✝) ∨ R.arrows (g ≫ f✝)\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase inr\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf : Y ⟶ X\nS✝ R✝ S R : Sieve X\nY✝ Z✝ : C\nf✝ : Y✝ ⟶ X\nh : R.arrows f✝\ng : Z✝ ⟶ Y✝\n⊢ S.arrows (g ≫ f✝) ∨ R.arrows (g ≫ f✝)\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf : Y ⟶ X\nS✝ R✝ S R : Sieve X\n⊢ ∀ {Y Z : C} {f : Y ⟶ X},\n (fun Y f => S.arrows f ∧ R.arrows f) Y f → ∀ (g : Z ⟶ Y), (fun Y f => S.arrows f ∧ R.arrows f) Z (g ≫ f)\n[PROOFSTEP]\nrintro _ _ _ ⟨h₁, h₂⟩ g\n[GOAL]\ncase intro\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf : Y ⟶ X\nS✝ R✝ S R : Sieve X\nY✝ Z✝ : C\nf✝ : Y✝ ⟶ X\nh₁ : S.arrows f✝\nh₂ : R.arrows f✝\ng : Z✝ ⟶ Y✝\n⊢ S.arrows (g ≫ f✝) ∧ R.arrows (g ≫ f✝)\n[PROOFSTEP]\nsimp [h₁, h₂]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf✝ : Y ⟶ X\nS R x✝³ x✝² x✝¹ : Sieve X\nh₁ : x✝³ ≤ x✝¹\nh₂ : x✝² ≤ x✝¹\nx✝ : C\nf : x✝ ⟶ X\n⊢ (x✝³ ⊔ x✝²).arrows f → x✝¹.arrows f\n[PROOFSTEP]\nrintro (hf | hf)\n[GOAL]\ncase inl\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf✝ : Y ⟶ X\nS R x✝³ x✝² x✝¹ : Sieve X\nh₁ : x✝³ ≤ x✝¹\nh₂ : x✝² ≤ x✝¹\nx✝ : C\nf : x✝ ⟶ X\nhf : x✝³.arrows f\n⊢ x✝¹.arrows f\n[PROOFSTEP]\nexact h₁ _ hf\n[GOAL]\ncase inr\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf✝ : Y ⟶ X\nS R x✝³ x✝² x✝¹ : Sieve X\nh₁ : x✝³ ≤ x✝¹\nh₂ : x✝² ≤ x✝¹\nx✝ : C\nf : x✝ ⟶ X\nhf : x✝².arrows f\n⊢ x✝¹.arrows f\n[PROOFSTEP]\nexact h₂ _ hf\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y✝ Z : C\nf✝ : Y✝ ⟶ X\nS R : Sieve X\nSs : Set (Sieve X)\nY : C\nf : Y ⟶ X\n⊢ (sSup Ss).arrows f ↔ ∃ S x, S.arrows f\n[PROOFSTEP]\nsimp [sSup, Sieve.sup, setOf]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf : Y ⟶ X\nS R✝ : Sieve X\nR : Presieve X\n⊢ ∀ {Y Z : C} {f : Y ⟶ X},\n (fun Z f => ∃ Y h g, R g ∧ h ≫ g = f) Y f → ∀ (g : Z ⟶ Y), (fun Z f => ∃ Y h g, R g ∧ h ≫ g = f) Z (g ≫ f)\n[PROOFSTEP]\nrintro Y Z _ ⟨W, g, f, hf, rfl⟩ h\n[GOAL]\ncase intro.intro.intro.intro\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y✝ Z✝ : C\nf✝ : Y✝ ⟶ X\nS R✝ : Sieve X\nR : Presieve X\nY Z W : C\ng : Y ⟶ W\nf : W ⟶ X\nhf : R f\nh : Z ⟶ Y\n⊢ ∃ Y_1 h_1 g_1, R g_1 ∧ h_1 ≫ g_1 = h ≫ g ≫ f\n[PROOFSTEP]\nexact ⟨_, h ≫ g, _, hf, by simp⟩\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y✝ Z✝ : C\nf✝ : Y✝ ⟶ X\nS R✝ : Sieve X\nR : Presieve X\nY Z W : C\ng : Y ⟶ W\nf : W ⟶ X\nhf : R f\nh : Z ⟶ Y\n⊢ (h ≫ g) ≫ f = h ≫ g ≫ f\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf : Y ⟶ X\nS✝ R✝ : Sieve X\nS : Presieve X\nR : ⦃Y : C⦄ → ⦃f : Y ⟶ X⦄ → S f → Sieve Y\n⊢ ∀ {Y Z : C} {f : Y ⟶ X},\n Presieve.bind S (fun Y f h => (R h).arrows) f → ∀ (g : Z ⟶ Y), Presieve.bind S (fun Y f h => (R h).arrows) (g ≫ f)\n[PROOFSTEP]\nrintro Y Z f ⟨W, f, h, hh, hf, rfl⟩ g\n[GOAL]\ncase intro.intro.intro.intro.intro\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y✝ Z✝ : C\nf✝ : Y✝ ⟶ X\nS✝ R✝ : Sieve X\nS : Presieve X\nR : ⦃Y : C⦄ → ⦃f : Y ⟶ X⦄ → S f → Sieve Y\nY Z W : C\nf : Y ⟶ W\nh : W ⟶ X\nhh : S h\nhf : (R hh).arrows f\ng : Z ⟶ Y\n⊢ Presieve.bind S (fun Y f h => (R h).arrows) (g ≫ f ≫ h)\n[PROOFSTEP]\nexact ⟨_, g ≫ f, _, hh, by simp [hf]⟩\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y✝ Z✝ : C\nf✝ : Y✝ ⟶ X\nS✝ R✝ : Sieve X\nS : Presieve X\nR : ⦃Y : C⦄ → ⦃f : Y ⟶ X⦄ → S f → Sieve Y\nY Z W : C\nf : Y ⟶ W\nh : W ⟶ X\nhh : S h\nhf : (R hh).arrows f\ng : Z ⟶ Y\n⊢ (fun Y f h => (R h).arrows) W h hh (g ≫ f) ∧ (g ≫ f) ≫ h = g ≫ f ≫ h\n[PROOFSTEP]\nsimp [hf]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y✝ Z : C\nf✝ : Y✝ ⟶ X\nS✝ R✝ : Sieve X\nR : Presieve X\nS : Sieve X\nss : R ≤ S.arrows\nY : C\nf : Y ⟶ X\n⊢ (generate R).arrows f → S.arrows f\n[PROOFSTEP]\nrintro ⟨Z, f, g, hg, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y✝ Z✝ : C\nf✝ : Y✝ ⟶ X\nS✝ R✝ : Sieve X\nR : Presieve X\nS : Sieve X\nss : R ≤ S.arrows\nY Z : C\nf : Y ⟶ Z\ng : Z ⟶ X\nhg : R g\n⊢ S.arrows (f ≫ g)\n[PROOFSTEP]\nexact S.downward_closed (ss Z hg) f\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y✝ Z : C\nf✝ : Y✝ ⟶ X\nS R : Sieve X\nh : S.arrows (𝟙 X)\nY : C\nf : Y ⟶ X\nx✝ : ⊤.arrows f\n⊢ S.arrows f\n[PROOFSTEP]\nsimpa using downward_closed _ h f\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf✝ : Y ⟶ X\nS R✝ : Sieve X\nR : Presieve X\nf : Y ⟶ X\ninst✝ : IsSplitEpi f\nhf : R f\n⊢ generate R = ⊤\n[PROOFSTEP]\nrw [← id_mem_iff_eq_top]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf✝ : Y ⟶ X\nS R✝ : Sieve X\nR : Presieve X\nf : Y ⟶ X\ninst✝ : IsSplitEpi f\nhf : R f\n⊢ (generate R).arrows (𝟙 X)\n[PROOFSTEP]\nexact ⟨_, section_ f, f, hf, by simp⟩\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf✝ : Y ⟶ X\nS R✝ : Sieve X\nR : Presieve X\nf : Y ⟶ X\ninst✝ : IsSplitEpi f\nhf : R f\n⊢ section_ f ≫ f = 𝟙 X\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf : Y ⟶ X\nS✝ R : Sieve X\nh : Y ⟶ X\nS : Sieve X\nY✝ Z✝ : C\nf✝ : Y✝ ⟶ Y\ng : (fun Y_1 sl => S.arrows (sl ≫ h)) Y✝ f✝\n⊢ ∀ (g : Z✝ ⟶ Y✝), (fun Y_1 sl => S.arrows (sl ≫ h)) Z✝ (g ≫ f✝)\n[PROOFSTEP]\nsimp [g]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf : Y ⟶ X\nS R : Sieve X\n⊢ pullback (𝟙 X) S = S\n[PROOFSTEP]\nsimp [Sieve.ext_iff]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf✝ : Y ⟶ X\nS✝ R : Sieve X\nf : Y ⟶ X\ng : Z ⟶ Y\nS : Sieve X\n⊢ pullback (g ≫ f) S = pullback g (pullback f S)\n[PROOFSTEP]\nsimp [Sieve.ext_iff]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf✝ : Y ⟶ X\nS✝ R✝ : Sieve X\nf : Y ⟶ X\nS R : Sieve X\n⊢ pullback f (S ⊓ R) = pullback f S ⊓ pullback f R\n[PROOFSTEP]\nsimp [Sieve.ext_iff]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf✝ : Y ⟶ X\nS R : Sieve X\nf : Y ⟶ X\n⊢ S.arrows f ↔ pullback f S = ⊤\n[PROOFSTEP]\nrw [← id_mem_iff_eq_top, pullback_apply, id_comp]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf✝¹ : Y ⟶ X\nS R✝ : Sieve X\nf : Y ⟶ X\nR : Sieve Y\nY✝ Z✝ : C\nf✝ : Y✝ ⟶ X\nx✝ : (fun Z gf => ∃ g, g ≫ f = gf ∧ R.arrows g) Y✝ f✝\nh : Z✝ ⟶ Y✝\nj : Y✝ ⟶ Y\nk : j ≫ f = f✝\nz : R.arrows j\n⊢ (h ≫ j) ≫ f = h ≫ f✝\n[PROOFSTEP]\nsimp [k]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf✝¹ : Y ⟶ X\nS R✝ : Sieve X\nf : Y ⟶ X\nR : Sieve Y\nY✝ Z✝ : C\nf✝ : Y✝ ⟶ X\nx✝ : (fun Z gf => ∃ g, g ≫ f = gf ∧ R.arrows g) Y✝ f✝\nh : Z✝ ⟶ Y✝\nj : Y✝ ⟶ Y\nk : j ≫ f = f✝\nz : R.arrows j\n⊢ R.arrows (h ≫ j)\n[PROOFSTEP]\nsimp [z]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf✝ : Y ⟶ X\nS R✝ : Sieve X\nf : Y ⟶ X\ng : Z ⟶ Y\nR : Sieve Z\nW : C\nh : W ⟶ X\nx✝ : (pushforward (g ≫ f) R).arrows h\nf₁ : W ⟶ Z\nhq : f₁ ≫ g ≫ f = h\nhf₁ : R.arrows f₁\n⊢ (f₁ ≫ g) ≫ f = h\n[PROOFSTEP]\nsimpa\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf✝ : Y ⟶ X\nS R✝ : Sieve X\nf : Y ⟶ X\ng : Z ⟶ Y\nR : Sieve Z\nW : C\nh : W ⟶ X\nx✝ : (pushforward f (pushforward g R)).arrows h\ny : W ⟶ Y\nhy : y ≫ f = h\nz : W ⟶ Z\nhR : z ≫ g = y\nhz : R.arrows z\n⊢ z ≫ g ≫ f = h ∧ R.arrows z\n[PROOFSTEP]\nrw [← Category.assoc, hR]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf✝ : Y ⟶ X\nS R✝ : Sieve X\nf : Y ⟶ X\ng : Z ⟶ Y\nR : Sieve Z\nW : C\nh : W ⟶ X\nx✝ : (pushforward f (pushforward g R)).arrows h\ny : W ⟶ Y\nhy : y ≫ f = h\nz : W ⟶ Z\nhR : z ≫ g = y\nhz : R.arrows z\n⊢ y ≫ f = h ∧ R.arrows z\n[PROOFSTEP]\ntauto\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf✝ : Y ⟶ X\nS✝ R✝ : Sieve X\nS : Presieve X\nR : ⦃Y : C⦄ → ⦃f : Y ⟶ X⦄ → S f → Sieve Y\nf : Y ⟶ X\nh : S f\n⊢ pushforward f (R h) ≤ bind S R\n[PROOFSTEP]\nrintro Z _ ⟨g, rfl, hg⟩\n[GOAL]\ncase intro.intro\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z✝ : C\nf✝ : Y ⟶ X\nS✝ R✝ : Sieve X\nS : Presieve X\nR : ⦃Y : C⦄ → ⦃f : Y ⟶ X⦄ → S f → Sieve Y\nf : Y ⟶ X\nh : S f\nZ : C\ng : Z ⟶ Y\nhg : (R h).arrows g\n⊢ (bind S R).arrows (g ≫ f)\n[PROOFSTEP]\nexact ⟨_, g, f, h, hg, rfl⟩\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf✝ : Y ⟶ X\nS✝ R✝ : Sieve X\nS : Presieve X\nR : ⦃Y : C⦄ → ⦃f : Y ⟶ X⦄ → S f → Sieve Y\nf : Y ⟶ X\nh : S f\n⊢ R h ≤ pullback f (bind S R)\n[PROOFSTEP]\nrw [← galoisConnection f]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf✝ : Y ⟶ X\nS✝ R✝ : Sieve X\nS : Presieve X\nR : ⦃Y : C⦄ → ⦃f : Y ⟶ X⦄ → S f → Sieve Y\nf : Y ⟶ X\nh : S f\n⊢ pushforward f (R h) ≤ bind S R\n[PROOFSTEP]\napply pushforward_le_bind_of_mem\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf✝ : Y ⟶ X\nS R : Sieve X\nf : Y ⟶ X\ninst✝ : Mono f\n⊢ GaloisCoinsertion (pushforward f) (pullback f)\n[PROOFSTEP]\napply (galoisConnection f).toGaloisCoinsertion\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf✝ : Y ⟶ X\nS R : Sieve X\nf : Y ⟶ X\ninst✝ : Mono f\n⊢ ∀ (a : Sieve Y), pullback f (pushforward f a) ≤ a\n[PROOFSTEP]\nrintro S Z g ⟨g₁, hf, hg₁⟩\n[GOAL]\ncase intro.intro\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z✝ : C\nf✝ : Y ⟶ X\nS✝ R : Sieve X\nf : Y ⟶ X\ninst✝ : Mono f\nS : Sieve Y\nZ : C\ng g₁ : Z ⟶ Y\nhf : g₁ ≫ f = g ≫ f\nhg₁ : S.arrows g₁\n⊢ S.arrows g\n[PROOFSTEP]\nrw [cancel_mono f] at hf \n[GOAL]\ncase intro.intro\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z✝ : C\nf✝ : Y ⟶ X\nS✝ R : Sieve X\nf : Y ⟶ X\ninst✝ : Mono f\nS : Sieve Y\nZ : C\ng g₁ : Z ⟶ Y\nhf : g₁ = g\nhg₁ : S.arrows g₁\n⊢ S.arrows g\n[PROOFSTEP]\nrwa [← hf]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf✝ : Y ⟶ X\nS R : Sieve X\nf : Y ⟶ X\ninst✝ : IsSplitEpi f\n⊢ GaloisInsertion (pushforward f) (pullback f)\n[PROOFSTEP]\napply (galoisConnection f).toGaloisInsertion\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf✝ : Y ⟶ X\nS R : Sieve X\nf : Y ⟶ X\ninst✝ : IsSplitEpi f\n⊢ ∀ (b : Sieve X), b ≤ pushforward f (pullback f b)\n[PROOFSTEP]\nintro S Z g hg\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z✝ : C\nf✝ : Y ⟶ X\nS✝ R : Sieve X\nf : Y ⟶ X\ninst✝ : IsSplitEpi f\nS : Sieve X\nZ : C\ng : Z ⟶ X\nhg : S.arrows g\n⊢ (pushforward f (pullback f S)).arrows g\n[PROOFSTEP]\nrefine' ⟨g ≫ section_ f, by simpa⟩\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z✝ : C\nf✝ : Y ⟶ X\nS✝ R : Sieve X\nf : Y ⟶ X\ninst✝ : IsSplitEpi f\nS : Sieve X\nZ : C\ng : Z ⟶ X\nhg : S.arrows g\n⊢ (g ≫ section_ f) ≫ f = g ∧ (pullback f S).arrows (g ≫ section_ f)\n[PROOFSTEP]\nsimpa\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX✝ Y✝ Z : C\nf✝ : Y✝ ⟶ X✝\nS R✝ : Sieve X✝\ninst✝ : HasPullbacks C\nX Y : C\nf : Y ⟶ X\nR : Presieve X\n⊢ generate (Presieve.pullbackArrows f R) = pullback f (generate R)\n[PROOFSTEP]\next W g\n[GOAL]\ncase h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX✝ Y✝ Z : C\nf✝ : Y✝ ⟶ X✝\nS R✝ : Sieve X✝\ninst✝ : HasPullbacks C\nX Y : C\nf : Y ⟶ X\nR : Presieve X\nW : C\ng : W ⟶ Y\n⊢ (generate (Presieve.pullbackArrows f R)).arrows g ↔ (pullback f (generate R)).arrows g\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX✝ Y✝ Z : C\nf✝ : Y✝ ⟶ X✝\nS R✝ : Sieve X✝\ninst✝ : HasPullbacks C\nX Y : C\nf : Y ⟶ X\nR : Presieve X\nW : C\ng : W ⟶ Y\n⊢ (generate (Presieve.pullbackArrows f R)).arrows g → (pullback f (generate R)).arrows g\n[PROOFSTEP]\nrintro ⟨_, h, k, hk, rfl⟩\n[GOAL]\ncase h.mp.intro.intro.intro.intro\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX✝ Y✝ Z : C\nf✝ : Y✝ ⟶ X✝\nS R✝ : Sieve X✝\ninst✝ : HasPullbacks C\nX Y : C\nf : Y ⟶ X\nR : Presieve X\nW w✝ : C\nh : W ⟶ w✝\nk : w✝ ⟶ Y\nhk : Presieve.pullbackArrows f R k\n⊢ (pullback f (generate R)).arrows (h ≫ k)\n[PROOFSTEP]\ncases' hk with W g hg\n[GOAL]\ncase h.mp.intro.intro.intro.intro.mk\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX✝ Y✝ Z : C\nf✝ : Y✝ ⟶ X✝\nS R✝ : Sieve X✝\ninst✝ : HasPullbacks C\nX Y : C\nf : Y ⟶ X\nR : Presieve X\nW✝ W : C\ng : W ⟶ X\nhg : R g\nh : W✝ ⟶ Limits.pullback g f\n⊢ (pullback f (generate R)).arrows (h ≫ pullback.snd)\n[PROOFSTEP]\nchange (Sieve.generate R).pullback f (h ≫ pullback.snd)\n[GOAL]\ncase h.mp.intro.intro.intro.intro.mk\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX✝ Y✝ Z : C\nf✝ : Y✝ ⟶ X✝\nS R✝ : Sieve X✝\ninst✝ : HasPullbacks C\nX Y : C\nf : Y ⟶ X\nR : Presieve X\nW✝ W : C\ng : W ⟶ X\nhg : R g\nh : W✝ ⟶ Limits.pullback g f\n⊢ (pullback f (generate R)).arrows (h ≫ pullback.snd)\n[PROOFSTEP]\nrw [Sieve.pullback_apply, assoc, ← pullback.condition, ← assoc]\n[GOAL]\ncase h.mp.intro.intro.intro.intro.mk\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX✝ Y✝ Z : C\nf✝ : Y✝ ⟶ X✝\nS R✝ : Sieve X✝\ninst✝ : HasPullbacks C\nX Y : C\nf : Y ⟶ X\nR : Presieve X\nW✝ W : C\ng : W ⟶ X\nhg : R g\nh : W✝ ⟶ Limits.pullback g f\n⊢ (generate R).arrows ((h ≫ pullback.fst) ≫ g)\n[PROOFSTEP]\nexact Sieve.downward_closed _ (by exact Sieve.le_generate R W hg) (h ≫ pullback.fst)\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX✝ Y✝ Z : C\nf✝ : Y✝ ⟶ X✝\nS R✝ : Sieve X✝\ninst✝ : HasPullbacks C\nX Y : C\nf : Y ⟶ X\nR : Presieve X\nW✝ W : C\ng : W ⟶ X\nhg : R g\nh : W✝ ⟶ Limits.pullback g f\n⊢ (generate R).arrows g\n[PROOFSTEP]\nexact Sieve.le_generate R W hg\n[GOAL]\ncase h.mpr\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX✝ Y✝ Z : C\nf✝ : Y✝ ⟶ X✝\nS R✝ : Sieve X✝\ninst✝ : HasPullbacks C\nX Y : C\nf : Y ⟶ X\nR : Presieve X\nW : C\ng : W ⟶ Y\n⊢ (pullback f (generate R)).arrows g → (generate (Presieve.pullbackArrows f R)).arrows g\n[PROOFSTEP]\nrintro ⟨W, h, k, hk, comm⟩\n[GOAL]\ncase h.mpr.intro.intro.intro.intro\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX✝ Y✝ Z : C\nf✝ : Y✝ ⟶ X✝\nS R✝ : Sieve X✝\ninst✝ : HasPullbacks C\nX Y : C\nf : Y ⟶ X\nR : Presieve X\nW✝ : C\ng : W✝ ⟶ Y\nW : C\nh : W✝ ⟶ W\nk : W ⟶ X\nhk : R k\ncomm : h ≫ k = g ≫ f\n⊢ (generate (Presieve.pullbackArrows f R)).arrows g\n[PROOFSTEP]\nexact ⟨_, _, _, Presieve.pullbackArrows.mk _ _ hk, pullback.lift_snd _ _ comm⟩\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf : Y ⟶ X\nS R✝ : Sieve X\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nR : Sieve (F.obj X)\n⊢ ∀ {Y Z : C} {f : Y ⟶ X},\n Presieve.functorPullback F R.arrows f → ∀ (g : Z ⟶ Y), Presieve.functorPullback F R.arrows (g ≫ f)\n[PROOFSTEP]\nintro _ _ f hf g\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf✝ : Y ⟶ X\nS R✝ : Sieve X\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nR : Sieve (F.obj X)\nY✝ Z✝ : C\nf : Y✝ ⟶ X\nhf : Presieve.functorPullback F R.arrows f\ng : Z✝ ⟶ Y✝\n⊢ Presieve.functorPullback F R.arrows (g ≫ f)\n[PROOFSTEP]\nunfold Presieve.functorPullback\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf✝ : Y ⟶ X\nS R✝ : Sieve X\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nR : Sieve (F.obj X)\nY✝ Z✝ : C\nf : Y✝ ⟶ X\nhf : Presieve.functorPullback F R.arrows f\ng : Z✝ ⟶ Y✝\n⊢ R.arrows (F.map (g ≫ f))\n[PROOFSTEP]\nrw [F.map_comp]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf✝ : Y ⟶ X\nS R✝ : Sieve X\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nR : Sieve (F.obj X)\nY✝ Z✝ : C\nf : Y✝ ⟶ X\nhf : Presieve.functorPullback F R.arrows f\ng : Z✝ ⟶ Y✝\n⊢ R.arrows (F.map g ≫ F.map f)\n[PROOFSTEP]\nexact R.downward_closed hf (F.map g)\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf : Y ⟶ X\nS R✝ : Sieve X\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nR : Sieve X\n⊢ functorPullback (𝟭 C) R = R\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf : Y ⟶ X\nS R✝ : Sieve X\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nR : Sieve X\nY✝ : C\nf✝ : Y✝ ⟶ X\n⊢ (functorPullback (𝟭 C) R).arrows f✝ ↔ R.arrows f✝\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf : Y ⟶ X\nS R✝ : Sieve X\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nR : Sieve ((F ⋙ G).obj X)\n⊢ functorPullback (F ⋙ G) R = functorPullback F (functorPullback G R)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf : Y ⟶ X\nS R✝ : Sieve X\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nR : Sieve ((F ⋙ G).obj X)\nY✝ : C\nf✝ : Y✝ ⟶ X\n⊢ (functorPullback (F ⋙ G) R).arrows f✝ ↔ (functorPullback F (functorPullback G R)).arrows f✝\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf : Y ⟶ X\nS R✝ : Sieve X\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nR : Presieve X\n⊢ Presieve.functorPushforward F (generate R).arrows = Presieve.functorPushforward F R\n[PROOFSTEP]\nfunext Y\n[GOAL]\ncase h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y✝ Z : C\nf : Y✝ ⟶ X\nS R✝ : Sieve X\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nR : Presieve X\nY : D\n⊢ Presieve.functorPushforward F (generate R).arrows = Presieve.functorPushforward F R\n[PROOFSTEP]\next f\n[GOAL]\ncase h.h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y✝ Z : C\nf✝ : Y✝ ⟶ X\nS R✝ : Sieve X\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nR : Presieve X\nY : D\nf : Y ⟶ F.obj X\n⊢ f ∈ Presieve.functorPushforward F (generate R).arrows ↔ f ∈ Presieve.functorPushforward F R\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.h.mp\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y✝ Z : C\nf✝ : Y✝ ⟶ X\nS R✝ : Sieve X\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nR : Presieve X\nY : D\nf : Y ⟶ F.obj X\n⊢ f ∈ Presieve.functorPushforward F (generate R).arrows → f ∈ Presieve.functorPushforward F R\n[PROOFSTEP]\nrintro ⟨X', g, f', ⟨X'', g', f'', h₁, rfl⟩, rfl⟩\n[GOAL]\ncase h.h.mp.intro.intro.intro.intro.intro.intro.intro.intro\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y✝ Z : C\nf : Y✝ ⟶ X\nS R✝ : Sieve X\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nR : Presieve X\nY : D\nX' : C\nf' : Y ⟶ F.obj X'\nX'' : C\ng' : X' ⟶ X''\nf'' : X'' ⟶ X\nh₁ : R f''\n⊢ f' ≫ F.map (g' ≫ f'') ∈ Presieve.functorPushforward F R\n[PROOFSTEP]\nexact ⟨X'', f'', f' ≫ F.map g', h₁, by simp⟩\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y✝ Z : C\nf : Y✝ ⟶ X\nS R✝ : Sieve X\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nR : Presieve X\nY : D\nX' : C\nf' : Y ⟶ F.obj X'\nX'' : C\ng' : X' ⟶ X''\nf'' : X'' ⟶ X\nh₁ : R f''\n⊢ f' ≫ F.map (g' ≫ f'') = (f' ≫ F.map g') ≫ F.map f''\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.h.mpr\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y✝ Z : C\nf✝ : Y✝ ⟶ X\nS R✝ : Sieve X\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nR : Presieve X\nY : D\nf : Y ⟶ F.obj X\n⊢ f ∈ Presieve.functorPushforward F R → f ∈ Presieve.functorPushforward F (generate R).arrows\n[PROOFSTEP]\nrintro ⟨X', g, f', h₁, h₂⟩\n[GOAL]\ncase h.h.mpr.intro.intro.intro.intro\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y✝ Z : C\nf✝ : Y✝ ⟶ X\nS R✝ : Sieve X\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nR : Presieve X\nY : D\nf : Y ⟶ F.obj X\nX' : C\ng : X' ⟶ X\nf' : Y ⟶ F.obj X'\nh₁ : R g\nh₂ : f = f' ≫ F.map g\n⊢ f ∈ Presieve.functorPushforward F (generate R).arrows\n[PROOFSTEP]\nexact ⟨X', g, f', le_generate R _ h₁, h₂⟩\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf : Y ⟶ X\nS R✝ : Sieve X\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nR : Sieve X\n⊢ ∀ {Y Z : D} {f : Y ⟶ F.obj X},\n Presieve.functorPushforward F R.arrows f → ∀ (g : Z ⟶ Y), Presieve.functorPushforward F R.arrows (g ≫ f)\n[PROOFSTEP]\nintro _ _ f h g\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf✝ : Y ⟶ X\nS R✝ : Sieve X\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nR : Sieve X\nY✝ Z✝ : D\nf : Y✝ ⟶ F.obj X\nh : Presieve.functorPushforward F R.arrows f\ng : Z✝ ⟶ Y✝\n⊢ Presieve.functorPushforward F R.arrows (g ≫ f)\n[PROOFSTEP]\nobtain ⟨X, α, β, hα, rfl⟩ := h\n[GOAL]\ncase intro.intro.intro.intro\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX✝ Y Z : C\nf : Y ⟶ X✝\nS R✝ : Sieve X✝\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nR : Sieve X✝\nY✝ Z✝ : D\ng : Z✝ ⟶ Y✝\nX : C\nα : X ⟶ X✝\nβ : Y✝ ⟶ F.obj X\nhα : R.arrows α\n⊢ Presieve.functorPushforward F R.arrows (g ≫ β ≫ F.map α)\n[PROOFSTEP]\nexact ⟨X, α, g ≫ β, hα, by simp⟩\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX✝ Y Z : C\nf : Y ⟶ X✝\nS R✝ : Sieve X✝\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nR : Sieve X✝\nY✝ Z✝ : D\ng : Z✝ ⟶ Y✝\nX : C\nα : X ⟶ X✝\nβ : Y✝ ⟶ F.obj X\nhα : R.arrows α\n⊢ g ≫ β ≫ F.map α = (g ≫ β) ≫ F.map α\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf : Y ⟶ X\nS R✝ : Sieve X\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nR : Sieve X\n⊢ functorPushforward (𝟭 C) R = R\n[PROOFSTEP]\next X f\n[GOAL]\ncase h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX✝ Y Z : C\nf✝ : Y ⟶ X✝\nS R✝ : Sieve X✝\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nR : Sieve X✝\nX : C\nf : X ⟶ (𝟭 C).obj X✝\n⊢ (functorPushforward (𝟭 C) R).arrows f ↔ R.arrows f\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX✝ Y Z : C\nf✝ : Y ⟶ X✝\nS R✝ : Sieve X✝\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nR : Sieve X✝\nX : C\nf : X ⟶ (𝟭 C).obj X✝\n⊢ (functorPushforward (𝟭 C) R).arrows f → R.arrows f\n[PROOFSTEP]\nintro hf\n[GOAL]\ncase h.mp\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX✝ Y Z : C\nf✝ : Y ⟶ X✝\nS R✝ : Sieve X✝\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nR : Sieve X✝\nX : C\nf : X ⟶ (𝟭 C).obj X✝\nhf : (functorPushforward (𝟭 C) R).arrows f\n⊢ R.arrows f\n[PROOFSTEP]\nobtain ⟨X, g, h, hg, rfl⟩ := hf\n[GOAL]\ncase h.mp.intro.intro.intro.intro\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX✝¹ Y Z : C\nf : Y ⟶ X✝¹\nS R✝ : Sieve X✝¹\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nR : Sieve X✝¹\nX✝ X : C\ng : X ⟶ X✝¹\nh : X✝ ⟶ (𝟭 C).obj X\nhg : R.arrows g\n⊢ R.arrows (h ≫ (𝟭 C).map g)\n[PROOFSTEP]\nexact R.downward_closed hg h\n[GOAL]\ncase h.mpr\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX✝ Y Z : C\nf✝ : Y ⟶ X✝\nS R✝ : Sieve X✝\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nR : Sieve X✝\nX : C\nf : X ⟶ (𝟭 C).obj X✝\n⊢ R.arrows f → (functorPushforward (𝟭 C) R).arrows f\n[PROOFSTEP]\nintro hf\n[GOAL]\ncase h.mpr\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX✝ Y Z : C\nf✝ : Y ⟶ X✝\nS R✝ : Sieve X✝\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nR : Sieve X✝\nX : C\nf : X ⟶ (𝟭 C).obj X✝\nhf : R.arrows f\n⊢ (functorPushforward (𝟭 C) R).arrows f\n[PROOFSTEP]\nexact ⟨X, f, 𝟙 _, hf, by simp⟩\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX✝ Y Z : C\nf✝ : Y ⟶ X✝\nS R✝ : Sieve X✝\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nR : Sieve X✝\nX : C\nf : X ⟶ (𝟭 C).obj X✝\nhf : R.arrows f\n⊢ f = 𝟙 X ≫ (𝟭 C).map f\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf : Y ⟶ X\nS R✝ : Sieve X\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nR : Sieve X\n⊢ functorPushforward (F ⋙ G) R = functorPushforward G (functorPushforward F R)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf : Y ⟶ X\nS R✝ : Sieve X\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nR : Sieve X\nY✝ : E\nf✝ : Y✝ ⟶ (F ⋙ G).obj X\n⊢ (functorPushforward (F ⋙ G) R).arrows f✝ ↔ (functorPushforward G (functorPushforward F R)).arrows f✝\n[PROOFSTEP]\nsimp [R.arrows.functorPushforward_comp F G]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX✝ Y Z : C\nf : Y ⟶ X✝\nS R : Sieve X✝\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nX : C\n⊢ GaloisConnection (functorPushforward F) (functorPullback F)\n[PROOFSTEP]\nintro R S\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX✝ Y Z : C\nf : Y ⟶ X✝\nS✝ R✝ : Sieve X✝\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nX : C\nR : Sieve X\nS : Sieve (F.obj X)\n⊢ functorPushforward F R ≤ S ↔ R ≤ functorPullback F S\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX✝ Y Z : C\nf : Y ⟶ X✝\nS✝ R✝ : Sieve X✝\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nX : C\nR : Sieve X\nS : Sieve (F.obj X)\n⊢ functorPushforward F R ≤ S → R ≤ functorPullback F S\n[PROOFSTEP]\nintro hle X f hf\n[GOAL]\ncase mp\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX✝¹ Y Z : C\nf✝ : Y ⟶ X✝¹\nS✝ R✝ : Sieve X✝¹\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nX✝ : C\nR : Sieve X✝\nS : Sieve (F.obj X✝)\nhle : functorPushforward F R ≤ S\nX : C\nf : X ⟶ X✝\nhf : R.arrows f\n⊢ (functorPullback F S).arrows f\n[PROOFSTEP]\napply hle\n[GOAL]\ncase mp.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX✝¹ Y Z : C\nf✝ : Y ⟶ X✝¹\nS✝ R✝ : Sieve X✝¹\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nX✝ : C\nR : Sieve X✝\nS : Sieve (F.obj X✝)\nhle : functorPushforward F R ≤ S\nX : C\nf : X ⟶ X✝\nhf : R.arrows f\n⊢ (functorPushforward F R).arrows (F.map f)\n[PROOFSTEP]\nrefine' ⟨X, f, 𝟙 _, hf, _⟩\n[GOAL]\ncase mp.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX✝¹ Y Z : C\nf✝ : Y ⟶ X✝¹\nS✝ R✝ : Sieve X✝¹\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nX✝ : C\nR : Sieve X✝\nS : Sieve (F.obj X✝)\nhle : functorPushforward F R ≤ S\nX : C\nf : X ⟶ X✝\nhf : R.arrows f\n⊢ F.map f = 𝟙 (F.obj X) ≫ F.map f\n[PROOFSTEP]\nrw [id_comp]\n[GOAL]\ncase mpr\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX✝ Y Z : C\nf : Y ⟶ X✝\nS✝ R✝ : Sieve X✝\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nX : C\nR : Sieve X\nS : Sieve (F.obj X)\n⊢ R ≤ functorPullback F S → functorPushforward F R ≤ S\n[PROOFSTEP]\nrintro hle Y f ⟨X, g, h, hg, rfl⟩\n[GOAL]\ncase mpr.intro.intro.intro.intro\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX✝¹ Y✝ Z : C\nf : Y✝ ⟶ X✝¹\nS✝ R✝ : Sieve X✝¹\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nX✝ : C\nR : Sieve X✝\nS : Sieve (F.obj X✝)\nhle : R ≤ functorPullback F S\nY : D\nX : C\ng : X ⟶ X✝\nh : Y ⟶ F.obj X\nhg : R.arrows g\n⊢ S.arrows (h ≫ F.map g)\n[PROOFSTEP]\napply Sieve.downward_closed S\n[GOAL]\ncase mpr.intro.intro.intro.intro.x\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX✝¹ Y✝ Z : C\nf : Y✝ ⟶ X✝¹\nS✝ R✝ : Sieve X✝¹\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nX✝ : C\nR : Sieve X✝\nS : Sieve (F.obj X✝)\nhle : R ≤ functorPullback F S\nY : D\nX : C\ng : X ⟶ X✝\nh : Y ⟶ F.obj X\nhg : R.arrows g\n⊢ S.arrows (F.map g)\n[PROOFSTEP]\nexact hle g hg\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF✝ : C ⥤ D\nX✝ Y Z : C\nf : Y ⟶ X✝\nS R : Sieve X✝\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nF : C ⥤ D\nX : C\n⊢ functorPushforward F ⊤ = ⊤\n[PROOFSTEP]\nrefine' (generate_sieve _).symm.trans _\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF✝ : C ⥤ D\nX✝ Y Z : C\nf : Y ⟶ X✝\nS R : Sieve X✝\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nF : C ⥤ D\nX : C\n⊢ generate (functorPushforward F ⊤).arrows = ⊤\n[PROOFSTEP]\napply generate_of_contains_isSplitEpi (𝟙 (F.obj X))\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF✝ : C ⥤ D\nX✝ Y Z : C\nf : Y ⟶ X✝\nS R : Sieve X✝\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nF : C ⥤ D\nX : C\n⊢ (functorPushforward F ⊤).arrows (𝟙 (F.obj X))\n[PROOFSTEP]\nrefine' ⟨X, 𝟙 _, 𝟙 _, trivial, by simp⟩\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF✝ : C ⥤ D\nX✝ Y Z : C\nf : Y ⟶ X✝\nS R : Sieve X✝\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nF : C ⥤ D\nX : C\n⊢ 𝟙 (F.obj X) = 𝟙 (F.obj X) ≫ F.map (𝟙 X)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf✝ : Y ⟶ X\nS R✝ : Sieve X\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nR : Sieve X\nV : C\nf : V ⟶ X\nh : R.arrows f\n⊢ F.map f = 𝟙 (F.obj V) ≫ F.map f\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nF : C ⥤ D\nX✝ Y Z : C\nf : Y ⟶ X✝\nS R : Sieve X✝\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\nG : D ⥤ E\ninst✝¹ : EssSurj F\ninst✝ : Full F\nX : C\n⊢ GaloisInsertion (functorPushforward F) (functorPullback F)\n[PROOFSTEP]\napply (functor_galoisConnection F X).toGaloisInsertion\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nF : C ⥤ D\nX✝ Y Z : C\nf : Y ⟶ X✝\nS R : Sieve X✝\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\nG : D ⥤ E\ninst✝¹ : EssSurj F\ninst✝ : Full F\nX : C\n⊢ ∀ (b : Sieve (F.obj X)), b ≤ functorPushforward F (functorPullback F b)\n[PROOFSTEP]\nintro S Y f hf\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nF : C ⥤ D\nX✝ Y✝ Z : C\nf✝ : Y✝ ⟶ X✝\nS✝ R : Sieve X✝\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\nG : D ⥤ E\ninst✝¹ : EssSurj F\ninst✝ : Full F\nX : C\nS : Sieve (F.obj X)\nY : D\nf : Y ⟶ F.obj X\nhf : S.arrows f\n⊢ (functorPushforward F (functorPullback F S)).arrows f\n[PROOFSTEP]\nrefine' ⟨_, F.preimage ((F.objObjPreimageIso Y).hom ≫ f), (F.objObjPreimageIso Y).inv, _⟩\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nF : C ⥤ D\nX✝ Y✝ Z : C\nf✝ : Y✝ ⟶ X✝\nS✝ R : Sieve X✝\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\nG : D ⥤ E\ninst✝¹ : EssSurj F\ninst✝ : Full F\nX : C\nS : Sieve (F.obj X)\nY : D\nf : Y ⟶ F.obj X\nhf : S.arrows f\n⊢ (functorPullback F S).arrows (F.preimage ((Functor.objObjPreimageIso F Y).hom ≫ f)) ∧\n f = (Functor.objObjPreimageIso F Y).inv ≫ F.map (F.preimage ((Functor.objObjPreimageIso F Y).hom ≫ f))\n[PROOFSTEP]\nsimpa using S.downward_closed hf _\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nF : C ⥤ D\nX✝ Y Z : C\nf : Y ⟶ X✝\nS R : Sieve X✝\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\nG : D ⥤ E\ninst✝¹ : Full F\ninst✝ : Faithful F\nX : C\n⊢ GaloisCoinsertion (functorPushforward F) (functorPullback F)\n[PROOFSTEP]\napply (functor_galoisConnection F X).toGaloisCoinsertion\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nF : C ⥤ D\nX✝ Y Z : C\nf : Y ⟶ X✝\nS R : Sieve X✝\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\nG : D ⥤ E\ninst✝¹ : Full F\ninst✝ : Faithful F\nX : C\n⊢ ∀ (a : Sieve X), functorPullback F (functorPushforward F a) ≤ a\n[PROOFSTEP]\nrintro S Y f ⟨Z, g, h, h₁, h₂⟩\n[GOAL]\ncase intro.intro.intro.intro\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nF : C ⥤ D\nX✝ Y✝ Z✝ : C\nf✝ : Y✝ ⟶ X✝\nS✝ R : Sieve X✝\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\nG : D ⥤ E\ninst✝¹ : Full F\ninst✝ : Faithful F\nX : C\nS : Sieve X\nY : C\nf : Y ⟶ X\nZ : C\ng : Z ⟶ X\nh : F.obj Y ⟶ F.obj Z\nh₁ : S.arrows g\nh₂ : F.map f = h ≫ F.map g\n⊢ S.arrows f\n[PROOFSTEP]\nrw [← F.image_preimage h, ← F.map_comp] at h₂ \n[GOAL]\ncase intro.intro.intro.intro\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nF : C ⥤ D\nX✝ Y✝ Z✝ : C\nf✝ : Y✝ ⟶ X✝\nS✝ R : Sieve X✝\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\nG : D ⥤ E\ninst✝¹ : Full F\ninst✝ : Faithful F\nX : C\nS : Sieve X\nY : C\nf : Y ⟶ X\nZ : C\ng : Z ⟶ X\nh : F.obj Y ⟶ F.obj Z\nh₁ : S.arrows g\nh₂ : F.map f = F.map (F.preimage h ≫ g)\n⊢ S.arrows f\n[PROOFSTEP]\nrw [F.map_injective h₂]\n[GOAL]\ncase intro.intro.intro.intro\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nF : C ⥤ D\nX✝ Y✝ Z✝ : C\nf✝ : Y✝ ⟶ X✝\nS✝ R : Sieve X✝\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\nG : D ⥤ E\ninst✝¹ : Full F\ninst✝ : Faithful F\nX : C\nS : Sieve X\nY : C\nf : Y ⟶ X\nZ : C\ng : Z ⟶ X\nh : F.obj Y ⟶ F.obj Z\nh₁ : S.arrows g\nh₂ : F.map f = F.map (F.preimage h ≫ g)\n⊢ S.arrows (F.preimage h ≫ g)\n[PROOFSTEP]\nexact S.downward_closed h₁ _\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf✝ : Y ⟶ X\nS R : Sieve X\nZ✝ : Cᵒᵖ ⥤ Type v₁\nf g : Z✝ ⟶ functor S\nh : f ≫ functorInclusion S = g ≫ functorInclusion S\n⊢ f = g\n[PROOFSTEP]\next Y y\n[GOAL]\ncase w.h.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y✝ Z : C\nf✝ : Y✝ ⟶ X\nS R : Sieve X\nZ✝ : Cᵒᵖ ⥤ Type v₁\nf g : Z✝ ⟶ functor S\nh : f ≫ functorInclusion S = g ≫ functorInclusion S\nY : Cᵒᵖ\ny : Z✝.obj Y\n⊢ NatTrans.app f Y y = NatTrans.app g Y y\n[PROOFSTEP]\nsimpa [Subtype.ext_iff_val] using congr_fun (NatTrans.congr_app h Y) y\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf✝ : Y ⟶ X\nS R✝ : Sieve X\nR : Cᵒᵖ ⥤ Type v₁\nf : R ⟶ yoneda.obj X\n⊢ ∀ {Y Z : C} {f_1 : Y ⟶ X},\n (fun Y g => ∃ t, NatTrans.app f (Opposite.op Y) t = g) Y f_1 →\n ∀ (g : Z ⟶ Y), (fun Y g => ∃ t, NatTrans.app f (Opposite.op Y) t = g) Z (g ≫ f_1)\n[PROOFSTEP]\nrintro Y Z _ ⟨t, rfl⟩ g\n[GOAL]\ncase intro\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y✝ Z✝ : C\nf✝ : Y✝ ⟶ X\nS R✝ : Sieve X\nR : Cᵒᵖ ⥤ Type v₁\nf : R ⟶ yoneda.obj X\nY Z : C\nt : R.obj (Opposite.op Y)\ng : Z ⟶ Y\n⊢ ∃ t_1, NatTrans.app f (Opposite.op Z) t_1 = g ≫ NatTrans.app f (Opposite.op Y) t\n[PROOFSTEP]\nrefine' ⟨R.map g.op t, _⟩\n[GOAL]\ncase intro\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y✝ Z✝ : C\nf✝ : Y✝ ⟶ X\nS R✝ : Sieve X\nR : Cᵒᵖ ⥤ Type v₁\nf : R ⟶ yoneda.obj X\nY Z : C\nt : R.obj (Opposite.op Y)\ng : Z ⟶ Y\n⊢ NatTrans.app f (Opposite.op Z) (R.map g.op t) = g ≫ NatTrans.app f (Opposite.op Y) t\n[PROOFSTEP]\nrw [FunctorToTypes.naturality _ _ f]\n[GOAL]\ncase intro\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y✝ Z✝ : C\nf✝ : Y✝ ⟶ X\nS R✝ : Sieve X\nR : Cᵒᵖ ⥤ Type v₁\nf : R ⟶ yoneda.obj X\nY Z : C\nt : R.obj (Opposite.op Y)\ng : Z ⟶ Y\n⊢ (yoneda.obj X).map g.op (NatTrans.app f (Opposite.op Y) t) = g ≫ NatTrans.app f (Opposite.op Y) t\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf : Y ⟶ X\nS R : Sieve X\n⊢ sieveOfSubfunctor (functorInclusion S) = S\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf : Y ⟶ X\nS R : Sieve X\nY✝ : C\nf✝ : Y✝ ⟶ X\n⊢ (sieveOfSubfunctor (functorInclusion S)).arrows f✝ ↔ S.arrows f✝\n[PROOFSTEP]\nsimp only [functorInclusion_app, sieveOfSubfunctor_apply]\n[GOAL]\ncase h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf : Y ⟶ X\nS R : Sieve X\nY✝ : C\nf✝ : Y✝ ⟶ X\n⊢ (∃ t, ↑t = f✝) ↔ S.arrows f✝\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf : Y ⟶ X\nS R : Sieve X\nY✝ : C\nf✝ : Y✝ ⟶ X\n⊢ (∃ t, ↑t = f✝) → S.arrows f✝\n[PROOFSTEP]\nrintro ⟨⟨f, hf⟩, rfl⟩\n[GOAL]\ncase h.mp.intro.mk\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf✝ : Y ⟶ X\nS R : Sieve X\nY✝ : C\nf : (Opposite.op Y✝).unop ⟶ X\nhf : S.arrows f\n⊢ S.arrows ↑{ val := f, property := hf }\n[PROOFSTEP]\nexact hf\n[GOAL]\ncase h.mpr\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf : Y ⟶ X\nS R : Sieve X\nY✝ : C\nf✝ : Y✝ ⟶ X\n⊢ S.arrows f✝ → ∃ t, ↑t = f✝\n[PROOFSTEP]\nintro hf\n[GOAL]\ncase h.mpr\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y Z : C\nf : Y ⟶ X\nS R : Sieve X\nY✝ : C\nf✝ : Y✝ ⟶ X\nhf : S.arrows f✝\n⊢ ∃ t, ↑t = f✝\n[PROOFSTEP]\nexact ⟨⟨_, hf⟩, rfl⟩\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Sites.Sieves", "llama_tokens": 32831, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO", "lm_q1_score": 0.4455295350395727, "lm_q2_score": 0.026355353706463396, "lm_q1q2_score": 0.011742088482644117}} {"text": "[GOAL]\nα : Type u_1\nβ : α → Type u\nδ : α → Sort v\ninst✝ : DecidableEq α\na : α\nb : δ a\ns : Finset α\nhs : ¬a ∈ s\ne₁ e₂ : (a : α) → a ∈ s → δ a\neq : cons s a b e₁ = cons s a b e₂\ne : α\nh : e ∈ a ::ₘ s.val\n⊢ e ∈ insert a s\n[PROOFSTEP]\nsimpa only [Multiset.mem_cons, mem_insert] using h\n[GOAL]\nα : Type u_1\nβ : α → Type u\nδ : α → Sort v\ninst✝ : DecidableEq α\na : α\nb : δ a\ns : Finset α\nhs : ¬a ∈ s\ne₁ e₂ : (a : α) → a ∈ s → δ a\neq : cons s a b e₁ = cons s a b e₂\ne : α\nh : e ∈ a ::ₘ s.val\n⊢ e ∈ insert a s\n[PROOFSTEP]\nsimpa only [Multiset.mem_cons, mem_insert] using h\n[GOAL]\nα : Type u_1\nβ : α → Type u\nδ : α → Sort v\ninst✝ : DecidableEq α\na : α\nb : δ a\ns : Finset α\nhs : ¬a ∈ s\ne₁ e₂ : (a : α) → a ∈ s → δ a\neq : cons s a b e₁ = cons s a b e₂\ne : α\nh : e ∈ a ::ₘ s.val\n⊢ cons s a b e₁ e (_ : e ∈ insert a s) = cons s a b e₂ e (_ : e ∈ insert a s)\n[PROOFSTEP]\nrw [eq]\n[GOAL]\nα : Type u_1\nβ : α → Type u\nδ : α → Sort v\ninst✝¹ : DecidableEq α\ninst✝ : (a : α) → DecidableEq (β a)\ns : Finset α\nt : (a : α) → Finset (β a)\na : α\nha : ¬a ∈ s\n⊢ pi (insert a s) t = Finset.biUnion (t a) fun b => image (Pi.cons s a b) (pi s t)\n[PROOFSTEP]\napply eq_of_veq\n[GOAL]\ncase a\nα : Type u_1\nβ : α → Type u\nδ : α → Sort v\ninst✝¹ : DecidableEq α\ninst✝ : (a : α) → DecidableEq (β a)\ns : Finset α\nt : (a : α) → Finset (β a)\na : α\nha : ¬a ∈ s\n⊢ (pi (insert a s) t).val = (Finset.biUnion (t a) fun b => image (Pi.cons s a b) (pi s t)).val\n[PROOFSTEP]\nrw [← (pi (insert a s) t).2.dedup]\n[GOAL]\ncase a\nα : Type u_1\nβ : α → Type u\nδ : α → Sort v\ninst✝¹ : DecidableEq α\ninst✝ : (a : α) → DecidableEq (β a)\ns : Finset α\nt : (a : α) → Finset (β a)\na : α\nha : ¬a ∈ s\n⊢ dedup (pi (insert a s) t).val = (Finset.biUnion (t a) fun b => image (Pi.cons s a b) (pi s t)).val\n[PROOFSTEP]\nrefine'\n (fun s' (h : s' = a ::ₘ s.1) =>\n (_ :\n dedup (Multiset.pi s' fun a => (t a).1) =\n dedup\n ((t a).1.bind fun b =>\n dedup <|\n (Multiset.pi s.1 fun a : α => (t a).val).map fun f a' h' => Multiset.Pi.cons s.1 a b f a' (h ▸ h'))))\n _ (insert_val_of_not_mem ha)\n[GOAL]\ncase a\nα : Type u_1\nβ : α → Type u\nδ : α → Sort v\ninst✝¹ : DecidableEq α\ninst✝ : (a : α) → DecidableEq (β a)\ns : Finset α\nt : (a : α) → Finset (β a)\na : α\nha : ¬a ∈ s\ns' : Multiset α\nh : s' = a ::ₘ s.val\n⊢ dedup (Multiset.pi s' fun a => (t a).val) =\n dedup\n (Multiset.bind (t a).val fun b =>\n dedup\n (Multiset.map (fun f a' h' => Multiset.Pi.cons s.val a b f a' (_ : a' ∈ a ::ₘ s.val))\n (Multiset.pi s.val fun a => (t a).val)))\n[PROOFSTEP]\nsubst s'\n[GOAL]\ncase a\nα : Type u_1\nβ : α → Type u\nδ : α → Sort v\ninst✝¹ : DecidableEq α\ninst✝ : (a : α) → DecidableEq (β a)\ns : Finset α\nt : (a : α) → Finset (β a)\na : α\nha : ¬a ∈ s\n⊢ dedup (Multiset.pi (a ::ₘ s.val) fun a => (t a).val) =\n dedup\n (Multiset.bind (t a).val fun b =>\n dedup\n (Multiset.map (fun f a' h' => Multiset.Pi.cons s.val a b f a' (_ : a' ∈ a ::ₘ s.val))\n (Multiset.pi s.val fun a => (t a).val)))\n[PROOFSTEP]\nrw [pi_cons]\n[GOAL]\ncase a\nα : Type u_1\nβ : α → Type u\nδ : α → Sort v\ninst✝¹ : DecidableEq α\ninst✝ : (a : α) → DecidableEq (β a)\ns : Finset α\nt : (a : α) → Finset (β a)\na : α\nha : ¬a ∈ s\n⊢ dedup\n (Multiset.bind (t a).val fun b =>\n Multiset.map (Multiset.Pi.cons s.val a b) (Multiset.pi s.val fun a => (t a).val)) =\n dedup\n (Multiset.bind (t a).val fun b =>\n dedup\n (Multiset.map (fun f a' h' => Multiset.Pi.cons s.val a b f a' (_ : a' ∈ a ::ₘ s.val))\n (Multiset.pi s.val fun a => (t a).val)))\n[PROOFSTEP]\ncongr\n[GOAL]\ncase a.e_s.e_f\nα : Type u_1\nβ : α → Type u\nδ : α → Sort v\ninst✝¹ : DecidableEq α\ninst✝ : (a : α) → DecidableEq (β a)\ns : Finset α\nt : (a : α) → Finset (β a)\na : α\nha : ¬a ∈ s\n⊢ (fun b => Multiset.map (Multiset.Pi.cons s.val a b) (Multiset.pi s.val fun a => (t a).val)) = fun b =>\n dedup\n (Multiset.map (fun f a' h' => Multiset.Pi.cons s.val a b f a' (_ : a' ∈ a ::ₘ s.val))\n (Multiset.pi s.val fun a => (t a).val))\n[PROOFSTEP]\nfunext b\n[GOAL]\ncase a.e_s.e_f.h\nα : Type u_1\nβ : α → Type u\nδ : α → Sort v\ninst✝¹ : DecidableEq α\ninst✝ : (a : α) → DecidableEq (β a)\ns : Finset α\nt : (a : α) → Finset (β a)\na : α\nha : ¬a ∈ s\nb : β a\n⊢ Multiset.map (Multiset.Pi.cons s.val a b) (Multiset.pi s.val fun a => (t a).val) =\n dedup\n (Multiset.map (fun f a' h' => Multiset.Pi.cons s.val a b f a' (_ : a' ∈ a ::ₘ s.val))\n (Multiset.pi s.val fun a => (t a).val))\n[PROOFSTEP]\nexact ((pi s t).nodup.map <| Multiset.Pi.cons_injective ha).dedup.symm\n[GOAL]\nα : Type u_1\nβ✝ : α → Type u\nδ : α → Sort v\ninst✝ : DecidableEq α\nβ : Type u_2\ns : Finset α\nf : α → β\n⊢ (pi s fun a => {f a}) = {fun a x => f a}\n[PROOFSTEP]\nrw [eq_singleton_iff_unique_mem]\n[GOAL]\nα : Type u_1\nβ✝ : α → Type u\nδ : α → Sort v\ninst✝ : DecidableEq α\nβ : Type u_2\ns : Finset α\nf : α → β\n⊢ ((fun a x => f a) ∈ pi s fun a => {f a}) ∧ ∀ (x : (a : α) → a ∈ s → β), (x ∈ pi s fun a => {f a}) → x = fun a x => f a\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nα : Type u_1\nβ✝ : α → Type u\nδ : α → Sort v\ninst✝ : DecidableEq α\nβ : Type u_2\ns : Finset α\nf : α → β\n⊢ (fun a x => f a) ∈ pi s fun a => {f a}\n[PROOFSTEP]\nsimp\n[GOAL]\ncase right\nα : Type u_1\nβ✝ : α → Type u\nδ : α → Sort v\ninst✝ : DecidableEq α\nβ : Type u_2\ns : Finset α\nf : α → β\n⊢ ∀ (x : (a : α) → a ∈ s → β), (x ∈ pi s fun a => {f a}) → x = fun a x => f a\n[PROOFSTEP]\nintro a ha\n[GOAL]\ncase right\nα : Type u_1\nβ✝ : α → Type u\nδ : α → Sort v\ninst✝ : DecidableEq α\nβ : Type u_2\ns : Finset α\nf : α → β\na : (a : α) → a ∈ s → β\nha : a ∈ pi s fun a => {f a}\n⊢ a = fun a x => f a\n[PROOFSTEP]\next i hi\n[GOAL]\ncase right.h.h\nα : Type u_1\nβ✝ : α → Type u\nδ : α → Sort v\ninst✝ : DecidableEq α\nβ : Type u_2\ns : Finset α\nf : α → β\na : (a : α) → a ∈ s → β\nha : a ∈ pi s fun a => {f a}\ni : α\nhi : i ∈ s\n⊢ a i hi = f i\n[PROOFSTEP]\nrw [mem_pi] at ha \n[GOAL]\ncase right.h.h\nα : Type u_1\nβ✝ : α → Type u\nδ : α → Sort v\ninst✝ : DecidableEq α\nβ : Type u_2\ns : Finset α\nf : α → β\na : (a : α) → a ∈ s → β\nha : ∀ (a_1 : α) (h : a_1 ∈ s), a a_1 h ∈ {f a_1}\ni : α\nhi : i ∈ s\n⊢ a i hi = f i\n[PROOFSTEP]\nsimpa using ha i hi\n", "meta": {"mathlib_filename": "Mathlib.Data.Finset.Pi", "llama_tokens": 3113, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO", "lm_q1_score": 0.4339814648038985, "lm_q2_score": 0.02595735682104226, "lm_q1q2_score": 0.011265011735633386}} {"text": "[GOAL]\nR : Type u_1\nc₁ c₂ : R\nf : Fin 4 → R\n⊢ (fun a => ![a.re, a.imI, a.imJ, a.imK]) ((fun a => { re := a 0, imI := a 1, imJ := a 2, imK := a 3 }) f) = f\n[PROOFSTEP]\next ⟨_, _ | _ | _ | _ | _ | ⟨⟩⟩\n[GOAL]\ncase h.mk.refl\nR : Type u_1\nc₁ c₂ : R\nf : Fin 4 → R\n⊢ (fun a => ![a.re, a.imI, a.imJ, a.imK]) ((fun a => { re := a 0, imI := a 1, imJ := a 2, imK := a 3 }) f)\n { val := 3, isLt := (_ : Nat.le (Nat.succ 3) (Nat.succ 3)) } =\n f { val := 3, isLt := (_ : Nat.le (Nat.succ 3) (Nat.succ 3)) }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.mk.step.refl\nR : Type u_1\nc₁ c₂ : R\nf : Fin 4 → R\n⊢ (fun a => ![a.re, a.imI, a.imJ, a.imK]) ((fun a => { re := a 0, imI := a 1, imJ := a 2, imK := a 3 }) f)\n { val := 2, isLt := (_ : Nat.le (Nat.succ 2) (Nat.succ 3)) } =\n f { val := 2, isLt := (_ : Nat.le (Nat.succ 2) (Nat.succ 3)) }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.mk.step.step.refl\nR : Type u_1\nc₁ c₂ : R\nf : Fin 4 → R\n⊢ (fun a => ![a.re, a.imI, a.imJ, a.imK]) ((fun a => { re := a 0, imI := a 1, imJ := a 2, imK := a 3 }) f)\n { val := 1, isLt := (_ : Nat.le (Nat.succ 1) (Nat.succ 3)) } =\n f { val := 1, isLt := (_ : Nat.le (Nat.succ 1) (Nat.succ 3)) }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.mk.step.step.step.refl\nR : Type u_1\nc₁ c₂ : R\nf : Fin 4 → R\n⊢ (fun a => ![a.re, a.imI, a.imJ, a.imK]) ((fun a => { re := a 0, imI := a 1, imJ := a 2, imK := a 3 }) f)\n { val := 0, isLt := (_ : Nat.le (Nat.succ 0) (Nat.succ 3)) } =\n f { val := 0, isLt := (_ : Nat.le (Nat.succ 0) (Nat.succ 3)) }\n[PROOFSTEP]\nrfl\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\n⊢ ↑(x + y) = ↑x + ↑y\n[PROOFSTEP]\next\n[GOAL]\ncase re\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\n⊢ (↑(x + y)).re = (↑x + ↑y).re\n[PROOFSTEP]\nsimp\n[GOAL]\ncase imI\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\n⊢ (↑(x + y)).imI = (↑x + ↑y).imI\n[PROOFSTEP]\nsimp\n[GOAL]\ncase imJ\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\n⊢ (↑(x + y)).imJ = (↑x + ↑y).imJ\n[PROOFSTEP]\nsimp\n[GOAL]\ncase imK\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\n⊢ (↑(x + y)).imK = (↑x + ↑y).imK\n[PROOFSTEP]\nsimp\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\n⊢ ↑(-x) = -↑x\n[PROOFSTEP]\next\n[GOAL]\ncase re\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\n⊢ (↑(-x)).re = (-↑x).re\n[PROOFSTEP]\nsimp\n[GOAL]\ncase imI\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\n⊢ (↑(-x)).imI = (-↑x).imI\n[PROOFSTEP]\nsimp\n[GOAL]\ncase imJ\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\n⊢ (↑(-x)).imJ = (-↑x).imJ\n[PROOFSTEP]\nsimp\n[GOAL]\ncase imK\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\n⊢ (↑(-x)).imK = (-↑x).imK\n[PROOFSTEP]\nsimp\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝⁴ : CommRing R\nc₁ c₂ r x✝ y z : R\na b c : ℍ[R,c₁,c₂]\ninst✝³ : SMul S R\ninst✝² : SMul T R\ns✝ : S\ninst✝¹ : SMul S T\ninst✝ : IsScalarTower S T R\ns : S\nt : T\nx : ℍ[R,c₁,c₂]\n⊢ (s • t) • x = s • t • x\n[PROOFSTEP]\next\n[GOAL]\ncase re\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝⁴ : CommRing R\nc₁ c₂ r x✝ y z : R\na b c : ℍ[R,c₁,c₂]\ninst✝³ : SMul S R\ninst✝² : SMul T R\ns✝ : S\ninst✝¹ : SMul S T\ninst✝ : IsScalarTower S T R\ns : S\nt : T\nx : ℍ[R,c₁,c₂]\n⊢ ((s • t) • x).re = (s • t • x).re\n[PROOFSTEP]\nexact smul_assoc _ _ _\n[GOAL]\ncase imI\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝⁴ : CommRing R\nc₁ c₂ r x✝ y z : R\na b c : ℍ[R,c₁,c₂]\ninst✝³ : SMul S R\ninst✝² : SMul T R\ns✝ : S\ninst✝¹ : SMul S T\ninst✝ : IsScalarTower S T R\ns : S\nt : T\nx : ℍ[R,c₁,c₂]\n⊢ ((s • t) • x).imI = (s • t • x).imI\n[PROOFSTEP]\nexact smul_assoc _ _ _\n[GOAL]\ncase imJ\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝⁴ : CommRing R\nc₁ c₂ r x✝ y z : R\na b c : ℍ[R,c₁,c₂]\ninst✝³ : SMul S R\ninst✝² : SMul T R\ns✝ : S\ninst✝¹ : SMul S T\ninst✝ : IsScalarTower S T R\ns : S\nt : T\nx : ℍ[R,c₁,c₂]\n⊢ ((s • t) • x).imJ = (s • t • x).imJ\n[PROOFSTEP]\nexact smul_assoc _ _ _\n[GOAL]\ncase imK\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝⁴ : CommRing R\nc₁ c₂ r x✝ y z : R\na b c : ℍ[R,c₁,c₂]\ninst✝³ : SMul S R\ninst✝² : SMul T R\ns✝ : S\ninst✝¹ : SMul S T\ninst✝ : IsScalarTower S T R\ns : S\nt : T\nx : ℍ[R,c₁,c₂]\n⊢ ((s • t) • x).imK = (s • t • x).imK\n[PROOFSTEP]\nexact smul_assoc _ _ _\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝³ : CommRing R\nc₁ c₂ r x✝ y z : R\na b c : ℍ[R,c₁,c₂]\ninst✝² : SMul S R\ninst✝¹ : SMul T R\ns✝ : S\ninst✝ : SMulCommClass S T R\ns : S\nt : T\nx : ℍ[R,c₁,c₂]\n⊢ s • t • x = t • s • x\n[PROOFSTEP]\next\n[GOAL]\ncase re\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝³ : CommRing R\nc₁ c₂ r x✝ y z : R\na b c : ℍ[R,c₁,c₂]\ninst✝² : SMul S R\ninst✝¹ : SMul T R\ns✝ : S\ninst✝ : SMulCommClass S T R\ns : S\nt : T\nx : ℍ[R,c₁,c₂]\n⊢ (s • t • x).re = (t • s • x).re\n[PROOFSTEP]\nexact smul_comm _ _ _\n[GOAL]\ncase imI\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝³ : CommRing R\nc₁ c₂ r x✝ y z : R\na b c : ℍ[R,c₁,c₂]\ninst✝² : SMul S R\ninst✝¹ : SMul T R\ns✝ : S\ninst✝ : SMulCommClass S T R\ns : S\nt : T\nx : ℍ[R,c₁,c₂]\n⊢ (s • t • x).imI = (t • s • x).imI\n[PROOFSTEP]\nexact smul_comm _ _ _\n[GOAL]\ncase imJ\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝³ : CommRing R\nc₁ c₂ r x✝ y z : R\na b c : ℍ[R,c₁,c₂]\ninst✝² : SMul S R\ninst✝¹ : SMul T R\ns✝ : S\ninst✝ : SMulCommClass S T R\ns : S\nt : T\nx : ℍ[R,c₁,c₂]\n⊢ (s • t • x).imJ = (t • s • x).imJ\n[PROOFSTEP]\nexact smul_comm _ _ _\n[GOAL]\ncase imK\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝³ : CommRing R\nc₁ c₂ r x✝ y z : R\na b c : ℍ[R,c₁,c₂]\ninst✝² : SMul S R\ninst✝¹ : SMul T R\ns✝ : S\ninst✝ : SMulCommClass S T R\ns : S\nt : T\nx : ℍ[R,c₁,c₂]\n⊢ (s • t • x).imK = (t • s • x).imK\n[PROOFSTEP]\nexact smul_comm _ _ _\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\n⊢ NatCast.natCast 0 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\n⊢ ∀ (n : ℕ), NatCast.natCast (n + 1) = NatCast.natCast n + 1\n[PROOFSTEP]\nsimp\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\nn : ℕ\n⊢ IntCast.intCast (Int.negSucc n) = -↑(n + 1)\n[PROOFSTEP]\nchange coe _ = -coe _\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\nn : ℕ\n⊢ ↑↑(Int.negSucc n) = -↑↑(n + 1)\n[PROOFSTEP]\nrw [Int.cast_negSucc, coe_neg]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\nsrc✝ : AddCommGroupWithOne ℍ[R,c₁,c₂] := inferInstanceAs (AddCommGroupWithOne ℍ[R,c₁,c₂])\nx✝² x✝¹ x✝ : ℍ[R,c₁,c₂]\n⊢ x✝² * (x✝¹ + x✝) = x✝² * x✝¹ + x✝² * x✝\n[PROOFSTEP]\next\n[GOAL]\ncase re\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\nsrc✝ : AddCommGroupWithOne ℍ[R,c₁,c₂] := inferInstanceAs (AddCommGroupWithOne ℍ[R,c₁,c₂])\nx✝² x✝¹ x✝ : ℍ[R,c₁,c₂]\n⊢ (x✝² * (x✝¹ + x✝)).re = (x✝² * x✝¹ + x✝² * x✝).re\n[PROOFSTEP]\nsimp\n[GOAL]\ncase imI\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\nsrc✝ : AddCommGroupWithOne ℍ[R,c₁,c₂] := inferInstanceAs (AddCommGroupWithOne ℍ[R,c₁,c₂])\nx✝² x✝¹ x✝ : ℍ[R,c₁,c₂]\n⊢ (x✝² * (x✝¹ + x✝)).imI = (x✝² * x✝¹ + x✝² * x✝).imI\n[PROOFSTEP]\nsimp\n[GOAL]\ncase imJ\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\nsrc✝ : AddCommGroupWithOne ℍ[R,c₁,c₂] := inferInstanceAs (AddCommGroupWithOne ℍ[R,c₁,c₂])\nx✝² x✝¹ x✝ : ℍ[R,c₁,c₂]\n⊢ (x✝² * (x✝¹ + x✝)).imJ = (x✝² * x✝¹ + x✝² * x✝).imJ\n[PROOFSTEP]\nsimp\n[GOAL]\ncase imK\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\nsrc✝ : AddCommGroupWithOne ℍ[R,c₁,c₂] := inferInstanceAs (AddCommGroupWithOne ℍ[R,c₁,c₂])\nx✝² x✝¹ x✝ : ℍ[R,c₁,c₂]\n⊢ (x✝² * (x✝¹ + x✝)).imK = (x✝² * x✝¹ + x✝² * x✝).imK\n[PROOFSTEP]\nsimp\n[GOAL]\ncase re\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\nsrc✝ : AddCommGroupWithOne ℍ[R,c₁,c₂] := inferInstanceAs (AddCommGroupWithOne ℍ[R,c₁,c₂])\nx✝² x✝¹ x✝ : ℍ[R,c₁,c₂]\n⊢ x✝².re * (x✝¹.re + x✝.re) + c₁ * x✝².imI * (x✝¹.imI + x✝.imI) + c₂ * x✝².imJ * (x✝¹.imJ + x✝.imJ) -\n c₁ * c₂ * x✝².imK * (x✝¹.imK + x✝.imK) =\n x✝².re * x✝¹.re + c₁ * x✝².imI * x✝¹.imI + c₂ * x✝².imJ * x✝¹.imJ - c₁ * c₂ * x✝².imK * x✝¹.imK +\n (x✝².re * x✝.re + c₁ * x✝².imI * x✝.imI + c₂ * x✝².imJ * x✝.imJ - c₁ * c₂ * x✝².imK * x✝.imK)\n[PROOFSTEP]\nring\n[GOAL]\ncase imI\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\nsrc✝ : AddCommGroupWithOne ℍ[R,c₁,c₂] := inferInstanceAs (AddCommGroupWithOne ℍ[R,c₁,c₂])\nx✝² x✝¹ x✝ : ℍ[R,c₁,c₂]\n⊢ x✝².re * (x✝¹.imI + x✝.imI) + x✝².imI * (x✝¹.re + x✝.re) - c₂ * x✝².imJ * (x✝¹.imK + x✝.imK) +\n c₂ * x✝².imK * (x✝¹.imJ + x✝.imJ) =\n x✝².re * x✝¹.imI + x✝².imI * x✝¹.re - c₂ * x✝².imJ * x✝¹.imK + c₂ * x✝².imK * x✝¹.imJ +\n (x✝².re * x✝.imI + x✝².imI * x✝.re - c₂ * x✝².imJ * x✝.imK + c₂ * x✝².imK * x✝.imJ)\n[PROOFSTEP]\nring\n[GOAL]\ncase imJ\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\nsrc✝ : AddCommGroupWithOne ℍ[R,c₁,c₂] := inferInstanceAs (AddCommGroupWithOne ℍ[R,c₁,c₂])\nx✝² x✝¹ x✝ : ℍ[R,c₁,c₂]\n⊢ x✝².re * (x✝¹.imJ + x✝.imJ) + c₁ * x✝².imI * (x✝¹.imK + x✝.imK) + x✝².imJ * (x✝¹.re + x✝.re) -\n c₁ * x✝².imK * (x✝¹.imI + x✝.imI) =\n x✝².re * x✝¹.imJ + c₁ * x✝².imI * x✝¹.imK + x✝².imJ * x✝¹.re - c₁ * x✝².imK * x✝¹.imI +\n (x✝².re * x✝.imJ + c₁ * x✝².imI * x✝.imK + x✝².imJ * x✝.re - c₁ * x✝².imK * x✝.imI)\n[PROOFSTEP]\nring\n[GOAL]\ncase imK\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\nsrc✝ : AddCommGroupWithOne ℍ[R,c₁,c₂] := inferInstanceAs (AddCommGroupWithOne ℍ[R,c₁,c₂])\nx✝² x✝¹ x✝ : ℍ[R,c₁,c₂]\n⊢ x✝².re * (x✝¹.imK + x✝.imK) + x✝².imI * (x✝¹.imJ + x✝.imJ) - x✝².imJ * (x✝¹.imI + x✝.imI) +\n x✝².imK * (x✝¹.re + x✝.re) =\n x✝².re * x✝¹.imK + x✝².imI * x✝¹.imJ - x✝².imJ * x✝¹.imI + x✝².imK * x✝¹.re +\n (x✝².re * x✝.imK + x✝².imI * x✝.imJ - x✝².imJ * x✝.imI + x✝².imK * x✝.re)\n[PROOFSTEP]\nring\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\nsrc✝ : AddCommGroupWithOne ℍ[R,c₁,c₂] := inferInstanceAs (AddCommGroupWithOne ℍ[R,c₁,c₂])\nx✝² x✝¹ x✝ : ℍ[R,c₁,c₂]\n⊢ (x✝² + x✝¹) * x✝ = x✝² * x✝ + x✝¹ * x✝\n[PROOFSTEP]\next\n[GOAL]\ncase re\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\nsrc✝ : AddCommGroupWithOne ℍ[R,c₁,c₂] := inferInstanceAs (AddCommGroupWithOne ℍ[R,c₁,c₂])\nx✝² x✝¹ x✝ : ℍ[R,c₁,c₂]\n⊢ ((x✝² + x✝¹) * x✝).re = (x✝² * x✝ + x✝¹ * x✝).re\n[PROOFSTEP]\nsimp\n[GOAL]\ncase imI\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\nsrc✝ : AddCommGroupWithOne ℍ[R,c₁,c₂] := inferInstanceAs (AddCommGroupWithOne ℍ[R,c₁,c₂])\nx✝² x✝¹ x✝ : ℍ[R,c₁,c₂]\n⊢ ((x✝² + x✝¹) * x✝).imI = (x✝² * x✝ + x✝¹ * x✝).imI\n[PROOFSTEP]\nsimp\n[GOAL]\ncase imJ\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\nsrc✝ : AddCommGroupWithOne ℍ[R,c₁,c₂] := inferInstanceAs (AddCommGroupWithOne ℍ[R,c₁,c₂])\nx✝² x✝¹ x✝ : ℍ[R,c₁,c₂]\n⊢ ((x✝² + x✝¹) * x✝).imJ = (x✝² * x✝ + x✝¹ * x✝).imJ\n[PROOFSTEP]\nsimp\n[GOAL]\ncase imK\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\nsrc✝ : AddCommGroupWithOne ℍ[R,c₁,c₂] := inferInstanceAs (AddCommGroupWithOne ℍ[R,c₁,c₂])\nx✝² x✝¹ x✝ : ℍ[R,c₁,c₂]\n⊢ ((x✝² + x✝¹) * x✝).imK = (x✝² * x✝ + x✝¹ * x✝).imK\n[PROOFSTEP]\nsimp\n[GOAL]\ncase re\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\nsrc✝ : AddCommGroupWithOne ℍ[R,c₁,c₂] := inferInstanceAs (AddCommGroupWithOne ℍ[R,c₁,c₂])\nx✝² x✝¹ x✝ : ℍ[R,c₁,c₂]\n⊢ (x✝².re + x✝¹.re) * x✝.re + c₁ * (x✝².imI + x✝¹.imI) * x✝.imI + c₂ * (x✝².imJ + x✝¹.imJ) * x✝.imJ -\n c₁ * c₂ * (x✝².imK + x✝¹.imK) * x✝.imK =\n x✝².re * x✝.re + c₁ * x✝².imI * x✝.imI + c₂ * x✝².imJ * x✝.imJ - c₁ * c₂ * x✝².imK * x✝.imK +\n (x✝¹.re * x✝.re + c₁ * x✝¹.imI * x✝.imI + c₂ * x✝¹.imJ * x✝.imJ - c₁ * c₂ * x✝¹.imK * x✝.imK)\n[PROOFSTEP]\nring\n[GOAL]\ncase imI\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\nsrc✝ : AddCommGroupWithOne ℍ[R,c₁,c₂] := inferInstanceAs (AddCommGroupWithOne ℍ[R,c₁,c₂])\nx✝² x✝¹ x✝ : ℍ[R,c₁,c₂]\n⊢ (x✝².re + x✝¹.re) * x✝.imI + (x✝².imI + x✝¹.imI) * x✝.re - c₂ * (x✝².imJ + x✝¹.imJ) * x✝.imK +\n c₂ * (x✝².imK + x✝¹.imK) * x✝.imJ =\n x✝².re * x✝.imI + x✝².imI * x✝.re - c₂ * x✝².imJ * x✝.imK + c₂ * x✝².imK * x✝.imJ +\n (x✝¹.re * x✝.imI + x✝¹.imI * x✝.re - c₂ * x✝¹.imJ * x✝.imK + c₂ * x✝¹.imK * x✝.imJ)\n[PROOFSTEP]\nring\n[GOAL]\ncase imJ\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\nsrc✝ : AddCommGroupWithOne ℍ[R,c₁,c₂] := inferInstanceAs (AddCommGroupWithOne ℍ[R,c₁,c₂])\nx✝² x✝¹ x✝ : ℍ[R,c₁,c₂]\n⊢ (x✝².re + x✝¹.re) * x✝.imJ + c₁ * (x✝².imI + x✝¹.imI) * x✝.imK + (x✝².imJ + x✝¹.imJ) * x✝.re -\n c₁ * (x✝².imK + x✝¹.imK) * x✝.imI =\n x✝².re * x✝.imJ + c₁ * x✝².imI * x✝.imK + x✝².imJ * x✝.re - c₁ * x✝².imK * x✝.imI +\n (x✝¹.re * x✝.imJ + c₁ * x✝¹.imI * x✝.imK + x✝¹.imJ * x✝.re - c₁ * x✝¹.imK * x✝.imI)\n[PROOFSTEP]\nring\n[GOAL]\ncase imK\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\nsrc✝ : AddCommGroupWithOne ℍ[R,c₁,c₂] := inferInstanceAs (AddCommGroupWithOne ℍ[R,c₁,c₂])\nx✝² x✝¹ x✝ : ℍ[R,c₁,c₂]\n⊢ (x✝².re + x✝¹.re) * x✝.imK + (x✝².imI + x✝¹.imI) * x✝.imJ - (x✝².imJ + x✝¹.imJ) * x✝.imI +\n (x✝².imK + x✝¹.imK) * x✝.re =\n x✝².re * x✝.imK + x✝².imI * x✝.imJ - x✝².imJ * x✝.imI + x✝².imK * x✝.re +\n (x✝¹.re * x✝.imK + x✝¹.imI * x✝.imJ - x✝¹.imJ * x✝.imI + x✝¹.imK * x✝.re)\n[PROOFSTEP]\nring\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\nsrc✝ : AddCommGroupWithOne ℍ[R,c₁,c₂] := inferInstanceAs (AddCommGroupWithOne ℍ[R,c₁,c₂])\nx✝ : ℍ[R,c₁,c₂]\n⊢ 0 * x✝ = 0\n[PROOFSTEP]\next\n[GOAL]\ncase re\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\nsrc✝ : AddCommGroupWithOne ℍ[R,c₁,c₂] := inferInstanceAs (AddCommGroupWithOne ℍ[R,c₁,c₂])\nx✝ : ℍ[R,c₁,c₂]\n⊢ (0 * x✝).re = 0.re\n[PROOFSTEP]\nsimp\n[GOAL]\ncase imI\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\nsrc✝ : AddCommGroupWithOne ℍ[R,c₁,c₂] := inferInstanceAs (AddCommGroupWithOne ℍ[R,c₁,c₂])\nx✝ : ℍ[R,c₁,c₂]\n⊢ (0 * x✝).imI = 0.imI\n[PROOFSTEP]\nsimp\n[GOAL]\ncase imJ\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\nsrc✝ : AddCommGroupWithOne ℍ[R,c₁,c₂] := inferInstanceAs (AddCommGroupWithOne ℍ[R,c₁,c₂])\nx✝ : ℍ[R,c₁,c₂]\n⊢ (0 * x✝).imJ = 0.imJ\n[PROOFSTEP]\nsimp\n[GOAL]\ncase imK\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\nsrc✝ : AddCommGroupWithOne ℍ[R,c₁,c₂] := inferInstanceAs (AddCommGroupWithOne ℍ[R,c₁,c₂])\nx✝ : ℍ[R,c₁,c₂]\n⊢ (0 * x✝).imK = 0.imK\n[PROOFSTEP]\nsimp\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\nsrc✝ : AddCommGroupWithOne ℍ[R,c₁,c₂] := inferInstanceAs (AddCommGroupWithOne ℍ[R,c₁,c₂])\nx✝ : ℍ[R,c₁,c₂]\n⊢ x✝ * 0 = 0\n[PROOFSTEP]\next\n[GOAL]\ncase re\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\nsrc✝ : AddCommGroupWithOne ℍ[R,c₁,c₂] := inferInstanceAs (AddCommGroupWithOne ℍ[R,c₁,c₂])\nx✝ : ℍ[R,c₁,c₂]\n⊢ (x✝ * 0).re = 0.re\n[PROOFSTEP]\nsimp\n[GOAL]\ncase imI\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\nsrc✝ : AddCommGroupWithOne ℍ[R,c₁,c₂] := inferInstanceAs (AddCommGroupWithOne ℍ[R,c₁,c₂])\nx✝ : ℍ[R,c₁,c₂]\n⊢ (x✝ * 0).imI = 0.imI\n[PROOFSTEP]\nsimp\n[GOAL]\ncase imJ\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\nsrc✝ : AddCommGroupWithOne ℍ[R,c₁,c₂] := inferInstanceAs (AddCommGroupWithOne ℍ[R,c₁,c₂])\nx✝ : ℍ[R,c₁,c₂]\n⊢ (x✝ * 0).imJ = 0.imJ\n[PROOFSTEP]\nsimp\n[GOAL]\ncase imK\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\nsrc✝ : AddCommGroupWithOne ℍ[R,c₁,c₂] := inferInstanceAs (AddCommGroupWithOne ℍ[R,c₁,c₂])\nx✝ : ℍ[R,c₁,c₂]\n⊢ (x✝ * 0).imK = 0.imK\n[PROOFSTEP]\nsimp\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\nsrc✝ : AddCommGroupWithOne ℍ[R,c₁,c₂] := inferInstanceAs (AddCommGroupWithOne ℍ[R,c₁,c₂])\nx✝² x✝¹ x✝ : ℍ[R,c₁,c₂]\n⊢ x✝² * x✝¹ * x✝ = x✝² * (x✝¹ * x✝)\n[PROOFSTEP]\next\n[GOAL]\ncase re\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\nsrc✝ : AddCommGroupWithOne ℍ[R,c₁,c₂] := inferInstanceAs (AddCommGroupWithOne ℍ[R,c₁,c₂])\nx✝² x✝¹ x✝ : ℍ[R,c₁,c₂]\n⊢ (x✝² * x✝¹ * x✝).re = (x✝² * (x✝¹ * x✝)).re\n[PROOFSTEP]\nsimp\n[GOAL]\ncase imI\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\nsrc✝ : AddCommGroupWithOne ℍ[R,c₁,c₂] := inferInstanceAs (AddCommGroupWithOne ℍ[R,c₁,c₂])\nx✝² x✝¹ x✝ : ℍ[R,c₁,c₂]\n⊢ (x✝² * x✝¹ * x✝).imI = (x✝² * (x✝¹ * x✝)).imI\n[PROOFSTEP]\nsimp\n[GOAL]\ncase imJ\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\nsrc✝ : AddCommGroupWithOne ℍ[R,c₁,c₂] := inferInstanceAs (AddCommGroupWithOne ℍ[R,c₁,c₂])\nx✝² x✝¹ x✝ : ℍ[R,c₁,c₂]\n⊢ (x✝² * x✝¹ * x✝).imJ = (x✝² * (x✝¹ * x✝)).imJ\n[PROOFSTEP]\nsimp\n[GOAL]\ncase imK\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\nsrc✝ : AddCommGroupWithOne ℍ[R,c₁,c₂] := inferInstanceAs (AddCommGroupWithOne ℍ[R,c₁,c₂])\nx✝² x✝¹ x✝ : ℍ[R,c₁,c₂]\n⊢ (x✝² * x✝¹ * x✝).imK = (x✝² * (x✝¹ * x✝)).imK\n[PROOFSTEP]\nsimp\n[GOAL]\ncase re\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\nsrc✝ : AddCommGroupWithOne ℍ[R,c₁,c₂] := inferInstanceAs (AddCommGroupWithOne ℍ[R,c₁,c₂])\nx✝² x✝¹ x✝ : ℍ[R,c₁,c₂]\n⊢ (x✝².re * x✝¹.re + c₁ * x✝².imI * x✝¹.imI + c₂ * x✝².imJ * x✝¹.imJ - c₁ * c₂ * x✝².imK * x✝¹.imK) * x✝.re +\n c₁ * (x✝².re * x✝¹.imI + x✝².imI * x✝¹.re - c₂ * x✝².imJ * x✝¹.imK + c₂ * x✝².imK * x✝¹.imJ) * x✝.imI +\n c₂ * (x✝².re * x✝¹.imJ + c₁ * x✝².imI * x✝¹.imK + x✝².imJ * x✝¹.re - c₁ * x✝².imK * x✝¹.imI) * x✝.imJ -\n c₁ * c₂ * (x✝².re * x✝¹.imK + x✝².imI * x✝¹.imJ - x✝².imJ * x✝¹.imI + x✝².imK * x✝¹.re) * x✝.imK =\n x✝².re * (x✝¹.re * x✝.re + c₁ * x✝¹.imI * x✝.imI + c₂ * x✝¹.imJ * x✝.imJ - c₁ * c₂ * x✝¹.imK * x✝.imK) +\n c₁ * x✝².imI * (x✝¹.re * x✝.imI + x✝¹.imI * x✝.re - c₂ * x✝¹.imJ * x✝.imK + c₂ * x✝¹.imK * x✝.imJ) +\n c₂ * x✝².imJ * (x✝¹.re * x✝.imJ + c₁ * x✝¹.imI * x✝.imK + x✝¹.imJ * x✝.re - c₁ * x✝¹.imK * x✝.imI) -\n c₁ * c₂ * x✝².imK * (x✝¹.re * x✝.imK + x✝¹.imI * x✝.imJ - x✝¹.imJ * x✝.imI + x✝¹.imK * x✝.re)\n[PROOFSTEP]\nring\n[GOAL]\ncase imI\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\nsrc✝ : AddCommGroupWithOne ℍ[R,c₁,c₂] := inferInstanceAs (AddCommGroupWithOne ℍ[R,c₁,c₂])\nx✝² x✝¹ x✝ : ℍ[R,c₁,c₂]\n⊢ (x✝².re * x✝¹.re + c₁ * x✝².imI * x✝¹.imI + c₂ * x✝².imJ * x✝¹.imJ - c₁ * c₂ * x✝².imK * x✝¹.imK) * x✝.imI +\n (x✝².re * x✝¹.imI + x✝².imI * x✝¹.re - c₂ * x✝².imJ * x✝¹.imK + c₂ * x✝².imK * x✝¹.imJ) * x✝.re -\n c₂ * (x✝².re * x✝¹.imJ + c₁ * x✝².imI * x✝¹.imK + x✝².imJ * x✝¹.re - c₁ * x✝².imK * x✝¹.imI) * x✝.imK +\n c₂ * (x✝².re * x✝¹.imK + x✝².imI * x✝¹.imJ - x✝².imJ * x✝¹.imI + x✝².imK * x✝¹.re) * x✝.imJ =\n x✝².re * (x✝¹.re * x✝.imI + x✝¹.imI * x✝.re - c₂ * x✝¹.imJ * x✝.imK + c₂ * x✝¹.imK * x✝.imJ) +\n x✝².imI * (x✝¹.re * x✝.re + c₁ * x✝¹.imI * x✝.imI + c₂ * x✝¹.imJ * x✝.imJ - c₁ * c₂ * x✝¹.imK * x✝.imK) -\n c₂ * x✝².imJ * (x✝¹.re * x✝.imK + x✝¹.imI * x✝.imJ - x✝¹.imJ * x✝.imI + x✝¹.imK * x✝.re) +\n c₂ * x✝².imK * (x✝¹.re * x✝.imJ + c₁ * x✝¹.imI * x✝.imK + x✝¹.imJ * x✝.re - c₁ * x✝¹.imK * x✝.imI)\n[PROOFSTEP]\nring\n[GOAL]\ncase imJ\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\nsrc✝ : AddCommGroupWithOne ℍ[R,c₁,c₂] := inferInstanceAs (AddCommGroupWithOne ℍ[R,c₁,c₂])\nx✝² x✝¹ x✝ : ℍ[R,c₁,c₂]\n⊢ (x✝².re * x✝¹.re + c₁ * x✝².imI * x✝¹.imI + c₂ * x✝².imJ * x✝¹.imJ - c₁ * c₂ * x✝².imK * x✝¹.imK) * x✝.imJ +\n c₁ * (x✝².re * x✝¹.imI + x✝².imI * x✝¹.re - c₂ * x✝².imJ * x✝¹.imK + c₂ * x✝².imK * x✝¹.imJ) * x✝.imK +\n (x✝².re * x✝¹.imJ + c₁ * x✝².imI * x✝¹.imK + x✝².imJ * x✝¹.re - c₁ * x✝².imK * x✝¹.imI) * x✝.re -\n c₁ * (x✝².re * x✝¹.imK + x✝².imI * x✝¹.imJ - x✝².imJ * x✝¹.imI + x✝².imK * x✝¹.re) * x✝.imI =\n x✝².re * (x✝¹.re * x✝.imJ + c₁ * x✝¹.imI * x✝.imK + x✝¹.imJ * x✝.re - c₁ * x✝¹.imK * x✝.imI) +\n c₁ * x✝².imI * (x✝¹.re * x✝.imK + x✝¹.imI * x✝.imJ - x✝¹.imJ * x✝.imI + x✝¹.imK * x✝.re) +\n x✝².imJ * (x✝¹.re * x✝.re + c₁ * x✝¹.imI * x✝.imI + c₂ * x✝¹.imJ * x✝.imJ - c₁ * c₂ * x✝¹.imK * x✝.imK) -\n c₁ * x✝².imK * (x✝¹.re * x✝.imI + x✝¹.imI * x✝.re - c₂ * x✝¹.imJ * x✝.imK + c₂ * x✝¹.imK * x✝.imJ)\n[PROOFSTEP]\nring\n[GOAL]\ncase imK\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\nsrc✝ : AddCommGroupWithOne ℍ[R,c₁,c₂] := inferInstanceAs (AddCommGroupWithOne ℍ[R,c₁,c₂])\nx✝² x✝¹ x✝ : ℍ[R,c₁,c₂]\n⊢ (x✝².re * x✝¹.re + c₁ * x✝².imI * x✝¹.imI + c₂ * x✝².imJ * x✝¹.imJ - c₁ * c₂ * x✝².imK * x✝¹.imK) * x✝.imK +\n (x✝².re * x✝¹.imI + x✝².imI * x✝¹.re - c₂ * x✝².imJ * x✝¹.imK + c₂ * x✝².imK * x✝¹.imJ) * x✝.imJ -\n (x✝².re * x✝¹.imJ + c₁ * x✝².imI * x✝¹.imK + x✝².imJ * x✝¹.re - c₁ * x✝².imK * x✝¹.imI) * x✝.imI +\n (x✝².re * x✝¹.imK + x✝².imI * x✝¹.imJ - x✝².imJ * x✝¹.imI + x✝².imK * x✝¹.re) * x✝.re =\n x✝².re * (x✝¹.re * x✝.imK + x✝¹.imI * x✝.imJ - x✝¹.imJ * x✝.imI + x✝¹.imK * x✝.re) +\n x✝².imI * (x✝¹.re * x✝.imJ + c₁ * x✝¹.imI * x✝.imK + x✝¹.imJ * x✝.re - c₁ * x✝¹.imK * x✝.imI) -\n x✝².imJ * (x✝¹.re * x✝.imI + x✝¹.imI * x✝.re - c₂ * x✝¹.imJ * x✝.imK + c₂ * x✝¹.imK * x✝.imJ) +\n x✝².imK * (x✝¹.re * x✝.re + c₁ * x✝¹.imI * x✝.imI + c₂ * x✝¹.imJ * x✝.imJ - c₁ * c₂ * x✝¹.imK * x✝.imK)\n[PROOFSTEP]\nring\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\nsrc✝ : AddCommGroupWithOne ℍ[R,c₁,c₂] := inferInstanceAs (AddCommGroupWithOne ℍ[R,c₁,c₂])\nx✝ : ℍ[R,c₁,c₂]\n⊢ 1 * x✝ = x✝\n[PROOFSTEP]\next\n[GOAL]\ncase re\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\nsrc✝ : AddCommGroupWithOne ℍ[R,c₁,c₂] := inferInstanceAs (AddCommGroupWithOne ℍ[R,c₁,c₂])\nx✝ : ℍ[R,c₁,c₂]\n⊢ (1 * x✝).re = x✝.re\n[PROOFSTEP]\nsimp\n[GOAL]\ncase imI\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\nsrc✝ : AddCommGroupWithOne ℍ[R,c₁,c₂] := inferInstanceAs (AddCommGroupWithOne ℍ[R,c₁,c₂])\nx✝ : ℍ[R,c₁,c₂]\n⊢ (1 * x✝).imI = x✝.imI\n[PROOFSTEP]\nsimp\n[GOAL]\ncase imJ\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\nsrc✝ : AddCommGroupWithOne ℍ[R,c₁,c₂] := inferInstanceAs (AddCommGroupWithOne ℍ[R,c₁,c₂])\nx✝ : ℍ[R,c₁,c₂]\n⊢ (1 * x✝).imJ = x✝.imJ\n[PROOFSTEP]\nsimp\n[GOAL]\ncase imK\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\nsrc✝ : AddCommGroupWithOne ℍ[R,c₁,c₂] := inferInstanceAs (AddCommGroupWithOne ℍ[R,c₁,c₂])\nx✝ : ℍ[R,c₁,c₂]\n⊢ (1 * x✝).imK = x✝.imK\n[PROOFSTEP]\nsimp\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\nsrc✝ : AddCommGroupWithOne ℍ[R,c₁,c₂] := inferInstanceAs (AddCommGroupWithOne ℍ[R,c₁,c₂])\nx✝ : ℍ[R,c₁,c₂]\n⊢ x✝ * 1 = x✝\n[PROOFSTEP]\next\n[GOAL]\ncase re\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\nsrc✝ : AddCommGroupWithOne ℍ[R,c₁,c₂] := inferInstanceAs (AddCommGroupWithOne ℍ[R,c₁,c₂])\nx✝ : ℍ[R,c₁,c₂]\n⊢ (x✝ * 1).re = x✝.re\n[PROOFSTEP]\nsimp\n[GOAL]\ncase imI\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\nsrc✝ : AddCommGroupWithOne ℍ[R,c₁,c₂] := inferInstanceAs (AddCommGroupWithOne ℍ[R,c₁,c₂])\nx✝ : ℍ[R,c₁,c₂]\n⊢ (x✝ * 1).imI = x✝.imI\n[PROOFSTEP]\nsimp\n[GOAL]\ncase imJ\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\nsrc✝ : AddCommGroupWithOne ℍ[R,c₁,c₂] := inferInstanceAs (AddCommGroupWithOne ℍ[R,c₁,c₂])\nx✝ : ℍ[R,c₁,c₂]\n⊢ (x✝ * 1).imJ = x✝.imJ\n[PROOFSTEP]\nsimp\n[GOAL]\ncase imK\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\nsrc✝ : AddCommGroupWithOne ℍ[R,c₁,c₂] := inferInstanceAs (AddCommGroupWithOne ℍ[R,c₁,c₂])\nx✝ : ℍ[R,c₁,c₂]\n⊢ (x✝ * 1).imK = x✝.imK\n[PROOFSTEP]\nsimp\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\n⊢ ↑(x * y) = ↑x * ↑y\n[PROOFSTEP]\next\n[GOAL]\ncase re\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\n⊢ (↑(x * y)).re = (↑x * ↑y).re\n[PROOFSTEP]\nsimp\n[GOAL]\ncase imI\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\n⊢ (↑(x * y)).imI = (↑x * ↑y).imI\n[PROOFSTEP]\nsimp\n[GOAL]\ncase imJ\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\n⊢ (↑(x * y)).imJ = (↑x * ↑y).imJ\n[PROOFSTEP]\nsimp\n[GOAL]\ncase imK\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\n⊢ (↑(x * y)).imK = (↑x * ↑y).imK\n[PROOFSTEP]\nsimp\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝² : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\ninst✝¹ : CommSemiring S\ninst✝ : Algebra S R\n⊢ (fun s => ↑(↑(algebraMap S R) s)) 1 = 1\n[PROOFSTEP]\nsimp only [map_one, coe_one]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝² : CommRing R\nc₁ c₂ r x✝ y✝ z : R\na b c : ℍ[R,c₁,c₂]\ninst✝¹ : CommSemiring S\ninst✝ : Algebra S R\nx y : S\n⊢ OneHom.toFun { toFun := fun s => ↑(↑(algebraMap S R) s), map_one' := (_ : ↑(↑(algebraMap S R) 1) = 1) } (x * y) =\n OneHom.toFun { toFun := fun s => ↑(↑(algebraMap S R) s), map_one' := (_ : ↑(↑(algebraMap S R) 1) = 1) } x *\n OneHom.toFun { toFun := fun s => ↑(↑(algebraMap S R) s), map_one' := (_ : ↑(↑(algebraMap S R) 1) = 1) } y\n[PROOFSTEP]\nsimp only [map_mul, coe_mul]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝² : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\ninst✝¹ : CommSemiring S\ninst✝ : Algebra S R\n⊢ OneHom.toFun\n (↑{ toOneHom := { toFun := fun s => ↑(↑(algebraMap S R) s), map_one' := (_ : ↑(↑(algebraMap S R) 1) = 1) },\n map_mul' :=\n (_ : ∀ (x y : S), ↑(↑(algebraMap S R) (x * y)) = ↑(↑(algebraMap S R) x) * ↑(↑(algebraMap S R) y)) })\n 0 =\n 0\n[PROOFSTEP]\nsimp only [map_zero, coe_zero]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝² : CommRing R\nc₁ c₂ r x✝ y✝ z : R\na b c : ℍ[R,c₁,c₂]\ninst✝¹ : CommSemiring S\ninst✝ : Algebra S R\nx y : S\n⊢ OneHom.toFun\n (↑{ toOneHom := { toFun := fun s => ↑(↑(algebraMap S R) s), map_one' := (_ : ↑(↑(algebraMap S R) 1) = 1) },\n map_mul' :=\n (_ : ∀ (x y : S), ↑(↑(algebraMap S R) (x * y)) = ↑(↑(algebraMap S R) x) * ↑(↑(algebraMap S R) y)) })\n (x + y) =\n OneHom.toFun\n (↑{ toOneHom := { toFun := fun s => ↑(↑(algebraMap S R) s), map_one' := (_ : ↑(↑(algebraMap S R) 1) = 1) },\n map_mul' :=\n (_ : ∀ (x y : S), ↑(↑(algebraMap S R) (x * y)) = ↑(↑(algebraMap S R) x) * ↑(↑(algebraMap S R) y)) })\n x +\n OneHom.toFun\n (↑{ toOneHom := { toFun := fun s => ↑(↑(algebraMap S R) s), map_one' := (_ : ↑(↑(algebraMap S R) 1) = 1) },\n map_mul' :=\n (_ : ∀ (x y : S), ↑(↑(algebraMap S R) (x * y)) = ↑(↑(algebraMap S R) x) * ↑(↑(algebraMap S R) y)) })\n y\n[PROOFSTEP]\nsimp only [map_add, coe_add]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝² : CommRing R\nc₁ c₂ r x✝ y z : R\na b c : ℍ[R,c₁,c₂]\ninst✝¹ : CommSemiring S\ninst✝ : Algebra S R\ns : S\nx : (fun x => ℍ[R,c₁,c₂]) s\n⊢ ↑{\n toMonoidHom :=\n { toOneHom := { toFun := fun s => ↑(↑(algebraMap S R) s), map_one' := (_ : ↑(↑(algebraMap S R) 1) = 1) },\n map_mul' :=\n (_ : ∀ (x y : S), ↑(↑(algebraMap S R) (x * y)) = ↑(↑(algebraMap S R) x) * ↑(↑(algebraMap S R) y)) },\n map_zero' := (_ : ↑(↑(algebraMap S R) 0) = 0),\n map_add' :=\n (_ : ∀ (x y : S), ↑(↑(algebraMap S R) (x + y)) = ↑(↑(algebraMap S R) x) + ↑(↑(algebraMap S R) y)) }\n s *\n x =\n x *\n ↑{\n toMonoidHom :=\n { toOneHom := { toFun := fun s => ↑(↑(algebraMap S R) s), map_one' := (_ : ↑(↑(algebraMap S R) 1) = 1) },\n map_mul' :=\n (_ : ∀ (x y : S), ↑(↑(algebraMap S R) (x * y)) = ↑(↑(algebraMap S R) x) * ↑(↑(algebraMap S R) y)) },\n map_zero' := (_ : ↑(↑(algebraMap S R) 0) = 0),\n map_add' :=\n (_ : ∀ (x y : S), ↑(↑(algebraMap S R) (x + y)) = ↑(↑(algebraMap S R) x) + ↑(↑(algebraMap S R) y)) }\n s\n[PROOFSTEP]\next\n[GOAL]\ncase re\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝² : CommRing R\nc₁ c₂ r x✝ y z : R\na b c : ℍ[R,c₁,c₂]\ninst✝¹ : CommSemiring S\ninst✝ : Algebra S R\ns : S\nx : (fun x => ℍ[R,c₁,c₂]) s\n⊢ (↑{\n toMonoidHom :=\n {\n toOneHom :=\n { toFun := fun s => ↑(↑(algebraMap S R) s), map_one' := (_ : ↑(↑(algebraMap S R) 1) = 1) },\n map_mul' :=\n (_ : ∀ (x y : S), ↑(↑(algebraMap S R) (x * y)) = ↑(↑(algebraMap S R) x) * ↑(↑(algebraMap S R) y)) },\n map_zero' := (_ : ↑(↑(algebraMap S R) 0) = 0),\n map_add' :=\n (_ : ∀ (x y : S), ↑(↑(algebraMap S R) (x + y)) = ↑(↑(algebraMap S R) x) + ↑(↑(algebraMap S R) y)) }\n s *\n x).re =\n (x *\n ↑{\n toMonoidHom :=\n {\n toOneHom :=\n { toFun := fun s => ↑(↑(algebraMap S R) s), map_one' := (_ : ↑(↑(algebraMap S R) 1) = 1) },\n map_mul' :=\n (_ : ∀ (x y : S), ↑(↑(algebraMap S R) (x * y)) = ↑(↑(algebraMap S R) x) * ↑(↑(algebraMap S R) y)) },\n map_zero' := (_ : ↑(↑(algebraMap S R) 0) = 0),\n map_add' :=\n (_ : ∀ (x y : S), ↑(↑(algebraMap S R) (x + y)) = ↑(↑(algebraMap S R) x) + ↑(↑(algebraMap S R) y)) }\n s).re\n[PROOFSTEP]\nsimp [Algebra.commutes]\n[GOAL]\ncase imI\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝² : CommRing R\nc₁ c₂ r x✝ y z : R\na b c : ℍ[R,c₁,c₂]\ninst✝¹ : CommSemiring S\ninst✝ : Algebra S R\ns : S\nx : (fun x => ℍ[R,c₁,c₂]) s\n⊢ (↑{\n toMonoidHom :=\n {\n toOneHom :=\n { toFun := fun s => ↑(↑(algebraMap S R) s), map_one' := (_ : ↑(↑(algebraMap S R) 1) = 1) },\n map_mul' :=\n (_ : ∀ (x y : S), ↑(↑(algebraMap S R) (x * y)) = ↑(↑(algebraMap S R) x) * ↑(↑(algebraMap S R) y)) },\n map_zero' := (_ : ↑(↑(algebraMap S R) 0) = 0),\n map_add' :=\n (_ : ∀ (x y : S), ↑(↑(algebraMap S R) (x + y)) = ↑(↑(algebraMap S R) x) + ↑(↑(algebraMap S R) y)) }\n s *\n x).imI =\n (x *\n ↑{\n toMonoidHom :=\n {\n toOneHom :=\n { toFun := fun s => ↑(↑(algebraMap S R) s), map_one' := (_ : ↑(↑(algebraMap S R) 1) = 1) },\n map_mul' :=\n (_ : ∀ (x y : S), ↑(↑(algebraMap S R) (x * y)) = ↑(↑(algebraMap S R) x) * ↑(↑(algebraMap S R) y)) },\n map_zero' := (_ : ↑(↑(algebraMap S R) 0) = 0),\n map_add' :=\n (_ : ∀ (x y : S), ↑(↑(algebraMap S R) (x + y)) = ↑(↑(algebraMap S R) x) + ↑(↑(algebraMap S R) y)) }\n s).imI\n[PROOFSTEP]\nsimp [Algebra.commutes]\n[GOAL]\ncase imJ\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝² : CommRing R\nc₁ c₂ r x✝ y z : R\na b c : ℍ[R,c₁,c₂]\ninst✝¹ : CommSemiring S\ninst✝ : Algebra S R\ns : S\nx : (fun x => ℍ[R,c₁,c₂]) s\n⊢ (↑{\n toMonoidHom :=\n {\n toOneHom :=\n { toFun := fun s => ↑(↑(algebraMap S R) s), map_one' := (_ : ↑(↑(algebraMap S R) 1) = 1) },\n map_mul' :=\n (_ : ∀ (x y : S), ↑(↑(algebraMap S R) (x * y)) = ↑(↑(algebraMap S R) x) * ↑(↑(algebraMap S R) y)) },\n map_zero' := (_ : ↑(↑(algebraMap S R) 0) = 0),\n map_add' :=\n (_ : ∀ (x y : S), ↑(↑(algebraMap S R) (x + y)) = ↑(↑(algebraMap S R) x) + ↑(↑(algebraMap S R) y)) }\n s *\n x).imJ =\n (x *\n ↑{\n toMonoidHom :=\n {\n toOneHom :=\n { toFun := fun s => ↑(↑(algebraMap S R) s), map_one' := (_ : ↑(↑(algebraMap S R) 1) = 1) },\n map_mul' :=\n (_ : ∀ (x y : S), ↑(↑(algebraMap S R) (x * y)) = ↑(↑(algebraMap S R) x) * ↑(↑(algebraMap S R) y)) },\n map_zero' := (_ : ↑(↑(algebraMap S R) 0) = 0),\n map_add' :=\n (_ : ∀ (x y : S), ↑(↑(algebraMap S R) (x + y)) = ↑(↑(algebraMap S R) x) + ↑(↑(algebraMap S R) y)) }\n s).imJ\n[PROOFSTEP]\nsimp [Algebra.commutes]\n[GOAL]\ncase imK\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝² : CommRing R\nc₁ c₂ r x✝ y z : R\na b c : ℍ[R,c₁,c₂]\ninst✝¹ : CommSemiring S\ninst✝ : Algebra S R\ns : S\nx : (fun x => ℍ[R,c₁,c₂]) s\n⊢ (↑{\n toMonoidHom :=\n {\n toOneHom :=\n { toFun := fun s => ↑(↑(algebraMap S R) s), map_one' := (_ : ↑(↑(algebraMap S R) 1) = 1) },\n map_mul' :=\n (_ : ∀ (x y : S), ↑(↑(algebraMap S R) (x * y)) = ↑(↑(algebraMap S R) x) * ↑(↑(algebraMap S R) y)) },\n map_zero' := (_ : ↑(↑(algebraMap S R) 0) = 0),\n map_add' :=\n (_ : ∀ (x y : S), ↑(↑(algebraMap S R) (x + y)) = ↑(↑(algebraMap S R) x) + ↑(↑(algebraMap S R) y)) }\n s *\n x).imK =\n (x *\n ↑{\n toMonoidHom :=\n {\n toOneHom :=\n { toFun := fun s => ↑(↑(algebraMap S R) s), map_one' := (_ : ↑(↑(algebraMap S R) 1) = 1) },\n map_mul' :=\n (_ : ∀ (x y : S), ↑(↑(algebraMap S R) (x * y)) = ↑(↑(algebraMap S R) x) * ↑(↑(algebraMap S R) y)) },\n map_zero' := (_ : ↑(↑(algebraMap S R) 0) = 0),\n map_add' :=\n (_ : ∀ (x y : S), ↑(↑(algebraMap S R) (x + y)) = ↑(↑(algebraMap S R) x) + ↑(↑(algebraMap S R) y)) }\n s).imK\n[PROOFSTEP]\nsimp [Algebra.commutes]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝² : CommRing R\nc₁ c₂ r x✝ y z : R\na b c : ℍ[R,c₁,c₂]\ninst✝¹ : CommSemiring S\ninst✝ : Algebra S R\ns : S\nx : (fun x => ℍ[R,c₁,c₂]) s\n⊢ s • x =\n ↑{\n toMonoidHom :=\n { toOneHom := { toFun := fun s => ↑(↑(algebraMap S R) s), map_one' := (_ : ↑(↑(algebraMap S R) 1) = 1) },\n map_mul' :=\n (_ : ∀ (x y : S), ↑(↑(algebraMap S R) (x * y)) = ↑(↑(algebraMap S R) x) * ↑(↑(algebraMap S R) y)) },\n map_zero' := (_ : ↑(↑(algebraMap S R) 0) = 0),\n map_add' :=\n (_ : ∀ (x y : S), ↑(↑(algebraMap S R) (x + y)) = ↑(↑(algebraMap S R) x) + ↑(↑(algebraMap S R) y)) }\n s *\n x\n[PROOFSTEP]\next\n[GOAL]\ncase re\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝² : CommRing R\nc₁ c₂ r x✝ y z : R\na b c : ℍ[R,c₁,c₂]\ninst✝¹ : CommSemiring S\ninst✝ : Algebra S R\ns : S\nx : (fun x => ℍ[R,c₁,c₂]) s\n⊢ (s • x).re =\n (↑{\n toMonoidHom :=\n {\n toOneHom :=\n { toFun := fun s => ↑(↑(algebraMap S R) s), map_one' := (_ : ↑(↑(algebraMap S R) 1) = 1) },\n map_mul' :=\n (_ : ∀ (x y : S), ↑(↑(algebraMap S R) (x * y)) = ↑(↑(algebraMap S R) x) * ↑(↑(algebraMap S R) y)) },\n map_zero' := (_ : ↑(↑(algebraMap S R) 0) = 0),\n map_add' :=\n (_ : ∀ (x y : S), ↑(↑(algebraMap S R) (x + y)) = ↑(↑(algebraMap S R) x) + ↑(↑(algebraMap S R) y)) }\n s *\n x).re\n[PROOFSTEP]\nsimp [Algebra.smul_def]\n[GOAL]\ncase imI\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝² : CommRing R\nc₁ c₂ r x✝ y z : R\na b c : ℍ[R,c₁,c₂]\ninst✝¹ : CommSemiring S\ninst✝ : Algebra S R\ns : S\nx : (fun x => ℍ[R,c₁,c₂]) s\n⊢ (s • x).imI =\n (↑{\n toMonoidHom :=\n {\n toOneHom :=\n { toFun := fun s => ↑(↑(algebraMap S R) s), map_one' := (_ : ↑(↑(algebraMap S R) 1) = 1) },\n map_mul' :=\n (_ : ∀ (x y : S), ↑(↑(algebraMap S R) (x * y)) = ↑(↑(algebraMap S R) x) * ↑(↑(algebraMap S R) y)) },\n map_zero' := (_ : ↑(↑(algebraMap S R) 0) = 0),\n map_add' :=\n (_ : ∀ (x y : S), ↑(↑(algebraMap S R) (x + y)) = ↑(↑(algebraMap S R) x) + ↑(↑(algebraMap S R) y)) }\n s *\n x).imI\n[PROOFSTEP]\nsimp [Algebra.smul_def]\n[GOAL]\ncase imJ\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝² : CommRing R\nc₁ c₂ r x✝ y z : R\na b c : ℍ[R,c₁,c₂]\ninst✝¹ : CommSemiring S\ninst✝ : Algebra S R\ns : S\nx : (fun x => ℍ[R,c₁,c₂]) s\n⊢ (s • x).imJ =\n (↑{\n toMonoidHom :=\n {\n toOneHom :=\n { toFun := fun s => ↑(↑(algebraMap S R) s), map_one' := (_ : ↑(↑(algebraMap S R) 1) = 1) },\n map_mul' :=\n (_ : ∀ (x y : S), ↑(↑(algebraMap S R) (x * y)) = ↑(↑(algebraMap S R) x) * ↑(↑(algebraMap S R) y)) },\n map_zero' := (_ : ↑(↑(algebraMap S R) 0) = 0),\n map_add' :=\n (_ : ∀ (x y : S), ↑(↑(algebraMap S R) (x + y)) = ↑(↑(algebraMap S R) x) + ↑(↑(algebraMap S R) y)) }\n s *\n x).imJ\n[PROOFSTEP]\nsimp [Algebra.smul_def]\n[GOAL]\ncase imK\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝² : CommRing R\nc₁ c₂ r x✝ y z : R\na b c : ℍ[R,c₁,c₂]\ninst✝¹ : CommSemiring S\ninst✝ : Algebra S R\ns : S\nx : (fun x => ℍ[R,c₁,c₂]) s\n⊢ (s • x).imK =\n (↑{\n toMonoidHom :=\n {\n toOneHom :=\n { toFun := fun s => ↑(↑(algebraMap S R) s), map_one' := (_ : ↑(↑(algebraMap S R) 1) = 1) },\n map_mul' :=\n (_ : ∀ (x y : S), ↑(↑(algebraMap S R) (x * y)) = ↑(↑(algebraMap S R) x) * ↑(↑(algebraMap S R) y)) },\n map_zero' := (_ : ↑(↑(algebraMap S R) 0) = 0),\n map_add' :=\n (_ : ∀ (x y : S), ↑(↑(algebraMap S R) (x + y)) = ↑(↑(algebraMap S R) x) + ↑(↑(algebraMap S R) y)) }\n s *\n x).imK\n[PROOFSTEP]\nsimp [Algebra.smul_def]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝¹ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\ninst✝ : StrongRankCondition R\n⊢ Module.rank R ℍ[R,c₁,c₂] = 4\n[PROOFSTEP]\nrw [rank_eq_card_basis (basisOneIJK c₁ c₂), Fintype.card_fin]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝¹ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\ninst✝ : StrongRankCondition R\n⊢ ↑4 = 4\n[PROOFSTEP]\nnorm_num\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝¹ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\ninst✝ : StrongRankCondition R\n⊢ FiniteDimensional.finrank R ℍ[R,c₁,c₂] = 4\n[PROOFSTEP]\nrw [FiniteDimensional.finrank, rank_eq_four, Cardinal.toNat_ofNat]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\n⊢ a * ↑r = r • a\n[PROOFSTEP]\nrw [← coe_commutes, coe_mul_eq_smul]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\n⊢ x • ↑y = ↑(x * y)\n[PROOFSTEP]\nrw [coe_mul, coe_mul_eq_smul]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x✝ y z : R\na b c x : ℍ[R,c₁,c₂]\n⊢ star (star x) = x\n[PROOFSTEP]\nsimp [Star.star]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na✝ b✝ c a b : ℍ[R,c₁,c₂]\n⊢ star (a * b) = star b * star a\n[PROOFSTEP]\next\n[GOAL]\ncase re\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na✝ b✝ c a b : ℍ[R,c₁,c₂]\n⊢ (star (a * b)).re = (star b * star a).re\n[PROOFSTEP]\nsimp\n[GOAL]\ncase imI\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na✝ b✝ c a b : ℍ[R,c₁,c₂]\n⊢ (star (a * b)).imI = (star b * star a).imI\n[PROOFSTEP]\nsimp\n[GOAL]\ncase imJ\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na✝ b✝ c a b : ℍ[R,c₁,c₂]\n⊢ (star (a * b)).imJ = (star b * star a).imJ\n[PROOFSTEP]\nsimp\n[GOAL]\ncase imK\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na✝ b✝ c a b : ℍ[R,c₁,c₂]\n⊢ (star (a * b)).imK = (star b * star a).imK\n[PROOFSTEP]\nsimp\n[GOAL]\ncase re\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na✝ b✝ c a b : ℍ[R,c₁,c₂]\n⊢ a.re * b.re + c₁ * a.imI * b.imI + c₂ * a.imJ * b.imJ - c₁ * c₂ * a.imK * b.imK =\n b.re * a.re + c₁ * b.imI * a.imI + c₂ * b.imJ * a.imJ - c₁ * c₂ * b.imK * a.imK\n[PROOFSTEP]\nring\n[GOAL]\ncase imI\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na✝ b✝ c a b : ℍ[R,c₁,c₂]\n⊢ -(c₂ * a.imK * b.imJ) + (c₂ * a.imJ * b.imK - (a.re * b.imI + a.imI * b.re)) =\n -(b.re * a.imI) + -(b.imI * a.re) - c₂ * b.imJ * a.imK + c₂ * b.imK * a.imJ\n[PROOFSTEP]\nring\n[GOAL]\ncase imJ\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na✝ b✝ c a b : ℍ[R,c₁,c₂]\n⊢ c₁ * a.imK * b.imI - (a.re * b.imJ + c₁ * a.imI * b.imK + a.imJ * b.re) =\n -(b.re * a.imJ) + c₁ * b.imI * a.imK + -(b.imJ * a.re) - c₁ * b.imK * a.imI\n[PROOFSTEP]\nring\n[GOAL]\ncase imK\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na✝ b✝ c a b : ℍ[R,c₁,c₂]\n⊢ -(a.imK * b.re) + (a.imJ * b.imI - (a.re * b.imK + a.imI * b.imJ)) =\n -(b.re * a.imK) + b.imI * a.imJ - b.imJ * a.imI + -(b.imK * a.re)\n[PROOFSTEP]\nring\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na✝ b✝ c a b : ℍ[R,c₁,c₂]\n⊢ star (a + b) = star a + star b\n[PROOFSTEP]\next\n[GOAL]\ncase re\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na✝ b✝ c a b : ℍ[R,c₁,c₂]\n⊢ (star (a + b)).re = (star a + star b).re\n[PROOFSTEP]\nsimp [add_comm]\n[GOAL]\ncase imI\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na✝ b✝ c a b : ℍ[R,c₁,c₂]\n⊢ (star (a + b)).imI = (star a + star b).imI\n[PROOFSTEP]\nsimp [add_comm]\n[GOAL]\ncase imJ\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na✝ b✝ c a b : ℍ[R,c₁,c₂]\n⊢ (star (a + b)).imJ = (star a + star b).imJ\n[PROOFSTEP]\nsimp [add_comm]\n[GOAL]\ncase imK\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na✝ b✝ c a b : ℍ[R,c₁,c₂]\n⊢ (star (a + b)).imK = (star a + star b).imK\n[PROOFSTEP]\nsimp [add_comm]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\n⊢ a + star a = ↑(2 * a.re)\n[PROOFSTEP]\next\n[GOAL]\ncase re\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\n⊢ (a + star a).re = (↑(2 * a.re)).re\n[PROOFSTEP]\nsimp [two_mul]\n[GOAL]\ncase imI\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\n⊢ (a + star a).imI = (↑(2 * a.re)).imI\n[PROOFSTEP]\nsimp [two_mul]\n[GOAL]\ncase imJ\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\n⊢ (a + star a).imJ = (↑(2 * a.re)).imJ\n[PROOFSTEP]\nsimp [two_mul]\n[GOAL]\ncase imK\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\n⊢ (a + star a).imK = (↑(2 * a.re)).imK\n[PROOFSTEP]\nsimp [two_mul]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\n⊢ a + star a = 2 * ↑a.re\n[PROOFSTEP]\nsimp only [self_add_star', two_mul, coe_add]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\n⊢ star a + a = ↑(2 * a.re)\n[PROOFSTEP]\nrw [add_comm, self_add_star']\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\n⊢ star a + a = 2 * ↑a.re\n[PROOFSTEP]\nrw [add_comm, self_add_star]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\n⊢ Commute (star a) a\n[PROOFSTEP]\nrw [a.star_eq_two_re_sub]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\n⊢ Commute (↑(2 * a.re) - a) a\n[PROOFSTEP]\nexact (coe_commute (2 * a.re) a).sub_left (Commute.refl a)\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\n⊢ star ↑x = ↑x\n[PROOFSTEP]\next\n[GOAL]\ncase re\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\n⊢ (star ↑x).re = (↑x).re\n[PROOFSTEP]\nsimp\n[GOAL]\ncase imI\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\n⊢ (star ↑x).imI = (↑x).imI\n[PROOFSTEP]\nsimp\n[GOAL]\ncase imJ\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\n⊢ (star ↑x).imJ = (↑x).imJ\n[PROOFSTEP]\nsimp\n[GOAL]\ncase imK\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\n⊢ (star ↑x).imK = (↑x).imK\n[PROOFSTEP]\nsimp\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x✝ y z : R\na✝ b c a : ℍ[R,c₁,c₂]\nx : R\nh : a = ↑x\n⊢ a = ↑a.re\n[PROOFSTEP]\nrw [h, coe_re]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝² : CommRing R\nc₁✝ c₂✝ r x y z : R\na✝ b c : ℍ[R,c₁✝,c₂✝]\ninst✝¹ : NoZeroDivisors R\ninst✝ : CharZero R\nc₁ c₂ : R\na : ℍ[R,c₁,c₂]\n⊢ star a = a ↔ a = ↑a.re\n[PROOFSTEP]\nsimp [QuaternionAlgebra.ext_iff, neg_eq_iff_add_eq_zero, add_self_eq_zero]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝² : CommRing R\nc₁✝ c₂✝ r x y z : R\na✝ b c : ℍ[R,c₁✝,c₂✝]\ninst✝¹ : NoZeroDivisors R\ninst✝ : CharZero R\nc₁ c₂ : R\na : ℍ[R,c₁,c₂]\n⊢ star a = -a ↔ a.re = 0\n[PROOFSTEP]\nsimp [QuaternionAlgebra.ext_iff, eq_neg_iff_add_eq_zero]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\n⊢ star a * a = ↑(star a * a).re\n[PROOFSTEP]\next\n[GOAL]\ncase re\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\n⊢ (star a * a).re = (↑(star a * a).re).re\n[PROOFSTEP]\nsimp\n[GOAL]\ncase imI\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\n⊢ (star a * a).imI = (↑(star a * a).re).imI\n[PROOFSTEP]\nsimp\n[GOAL]\ncase imJ\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\n⊢ (star a * a).imJ = (↑(star a * a).re).imJ\n[PROOFSTEP]\nsimp\n[GOAL]\ncase imK\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\n⊢ (star a * a).imK = (↑(star a * a).re).imK\n[PROOFSTEP]\nsimp\n[GOAL]\ncase imI\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\n⊢ a.re * a.imI + -(a.imI * a.re) + c₂ * a.imJ * a.imK + -(c₂ * a.imK * a.imJ) = 0\n[PROOFSTEP]\nring\n[GOAL]\ncase imJ\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\n⊢ a.re * a.imJ + -(c₁ * a.imI * a.imK) + -(a.imJ * a.re) + c₁ * a.imK * a.imI = 0\n[PROOFSTEP]\nring\n[GOAL]\ncase imK\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\n⊢ a.re * a.imK + -(a.imI * a.imJ) + a.imJ * a.imI + -(a.imK * a.re) = 0\n[PROOFSTEP]\nring\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\n⊢ a * star a = ↑(a * star a).re\n[PROOFSTEP]\nrw [← star_comm_self']\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x y z : R\na b c : ℍ[R,c₁,c₂]\n⊢ star a * a = ↑(star a * a).re\n[PROOFSTEP]\nexact a.star_mul_eq_coe\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r x✝ y✝ z : R\na b c : ℍ[R,c₁,c₂]\nsrc✝ : ℍ[R,c₁,c₂] ≃+ ℍ[R,c₁,c₂]ᵐᵒᵖ := AddEquiv.trans starAddEquiv opAddEquiv\nx y : ℍ[R,c₁,c₂]\n⊢ Equiv.toFun\n { toFun := op ∘ star, invFun := star ∘ unop, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),\n right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }\n (x * y) =\n Equiv.toFun\n { toFun := op ∘ star, invFun := star ∘ unop, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),\n right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }\n x *\n Equiv.toFun\n { toFun := op ∘ star, invFun := star ∘ unop, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),\n right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }\n y\n[PROOFSTEP]\nsimp\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nc₁ c₂ r✝ x y z : R\na b c : ℍ[R,c₁,c₂]\nsrc✝ : ℍ[R,c₁,c₂] ≃+ ℍ[R,c₁,c₂]ᵐᵒᵖ := AddEquiv.trans starAddEquiv opAddEquiv\nr : R\n⊢ Equiv.toFun\n { toFun := op ∘ star, invFun := star ∘ unop, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),\n right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }\n (↑(algebraMap R ℍ[R,c₁,c₂]) r) =\n ↑(algebraMap R ℍ[R,c₁,c₂]ᵐᵒᵖ) r\n[PROOFSTEP]\nsimp\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nr x y z : R\na b c : ℍ[R]\n⊢ a.re * b.re + -1 * a.imI * b.imI + -1 * a.imJ * b.imJ - -1 * -1 * a.imK * b.imK =\n a.re * b.re - a.imI * b.imI - a.imJ * b.imJ - a.imK * b.imK\n[PROOFSTEP]\nsimp only [one_mul, neg_mul, sub_eq_add_neg, neg_neg]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nr x y z : R\na b c : ℍ[R]\n⊢ a.re * b.imI + a.imI * b.re - -1 * a.imJ * b.imK + -1 * a.imK * b.imJ =\n a.re * b.imI + a.imI * b.re + a.imJ * b.imK - a.imK * b.imJ\n[PROOFSTEP]\nsimp only [one_mul, neg_mul, sub_eq_add_neg, neg_neg]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nr x y z : R\na b c : ℍ[R]\n⊢ a.re * b.imJ + -1 * a.imI * b.imK + a.imJ * b.re - -1 * a.imK * b.imI =\n a.re * b.imJ - a.imI * b.imK + a.imJ * b.re + a.imK * b.imI\n[PROOFSTEP]\nsimp only [one_mul, neg_mul, sub_eq_add_neg, neg_neg]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nr x y z : R\na b c : ℍ[R]\n⊢ a.re * b.imK + a.imI * b.imJ - a.imJ * b.imI + a.imK * b.re =\n a.re * b.imK + a.imI * b.imJ - a.imJ * b.imI + a.imK * b.re\n[PROOFSTEP]\nsimp only [one_mul, neg_mul, sub_eq_add_neg, neg_neg]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nr x y z : R\na b c : ℍ[R]\n⊢ (fun a => (a * star a).re) 0 = 0\n[PROOFSTEP]\nsimp only [star_zero, zero_mul, zero_re]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nr x y z : R\na b c : ℍ[R]\n⊢ ZeroHom.toFun { toFun := fun a => (a * star a).re, map_zero' := (_ : (0 * star 0).re = 0) } 1 = 1\n[PROOFSTEP]\nsimp only [star_one, one_mul, one_re]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nr x✝ y✝ z : R\na b c x y : ℍ[R]\n⊢ ↑(ZeroHom.toFun { toFun := fun a => (a * star a).re, map_zero' := (_ : (0 * star 0).re = 0) } (x * y)) =\n ↑(ZeroHom.toFun { toFun := fun a => (a * star a).re, map_zero' := (_ : (0 * star 0).re = 0) } x *\n ZeroHom.toFun { toFun := fun a => (a * star a).re, map_zero' := (_ : (0 * star 0).re = 0) } y)\n[PROOFSTEP]\nconv_lhs =>\n rw [← mul_star_eq_coe, star_mul, mul_assoc, ← mul_assoc y, y.mul_star_eq_coe, coe_commutes, ← mul_assoc,\n x.mul_star_eq_coe, ← coe_mul]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nr x✝ y✝ z : R\na b c x y : ℍ[R]\n| ↑(ZeroHom.toFun { toFun := fun a => (a * star a).re, map_zero' := (_ : (0 * star 0).re = 0) } (x * y))\n[PROOFSTEP]\nrw [← mul_star_eq_coe, star_mul, mul_assoc, ← mul_assoc y, y.mul_star_eq_coe, coe_commutes, ← mul_assoc,\n x.mul_star_eq_coe, ← coe_mul]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nr x✝ y✝ z : R\na b c x y : ℍ[R]\n| ↑(ZeroHom.toFun { toFun := fun a => (a * star a).re, map_zero' := (_ : (0 * star 0).re = 0) } (x * y))\n[PROOFSTEP]\nrw [← mul_star_eq_coe, star_mul, mul_assoc, ← mul_assoc y, y.mul_star_eq_coe, coe_commutes, ← mul_assoc,\n x.mul_star_eq_coe, ← coe_mul]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nr x✝ y✝ z : R\na b c x y : ℍ[R]\n| ↑(ZeroHom.toFun { toFun := fun a => (a * star a).re, map_zero' := (_ : (0 * star 0).re = 0) } (x * y))\n[PROOFSTEP]\nrw [← mul_star_eq_coe, star_mul, mul_assoc, ← mul_assoc y, y.mul_star_eq_coe, coe_commutes, ← mul_assoc,\n x.mul_star_eq_coe, ← coe_mul]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nr x y z : R\na b c : ℍ[R]\n⊢ ↑normSq a = a.re ^ 2 + a.imI ^ 2 + a.imJ ^ 2 + a.imK ^ 2\n[PROOFSTEP]\nsimp only [normSq_def, sq, mul_neg, sub_neg_eq_add, mul_re, star_re, star_imI, star_imJ, star_imK]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nr x y z : R\na b c : ℍ[R]\n⊢ ↑normSq ↑x = x ^ 2\n[PROOFSTEP]\nrw [normSq_def, star_coe, ← coe_mul, coe_re, sq]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nr x y z : R\na b c : ℍ[R]\n⊢ ↑normSq (star a) = ↑normSq a\n[PROOFSTEP]\nsimp [normSq_def']\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nr x y z : R\na b c : ℍ[R]\nn : ℕ\n⊢ ↑normSq ↑n = ↑n ^ 2\n[PROOFSTEP]\nrw [← coe_nat_cast, normSq_coe]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nr x y z✝ : R\na b c : ℍ[R]\nz : ℤ\n⊢ ↑normSq ↑z = ↑z ^ 2\n[PROOFSTEP]\nrw [← coe_int_cast, normSq_coe]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nr x y z : R\na b c : ℍ[R]\n⊢ ↑normSq (-a) = ↑normSq a\n[PROOFSTEP]\nsimp only [normSq_def, star_neg, neg_mul_neg]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nr x y z : R\na b c : ℍ[R]\n⊢ a * star a = ↑(↑normSq a)\n[PROOFSTEP]\nrw [mul_star_eq_coe, normSq_def]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nr x y z : R\na b c : ℍ[R]\n⊢ star a * a = ↑(↑normSq a)\n[PROOFSTEP]\nrw [star_comm_self, self_mul_star]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nr x y z : R\na b c : ℍ[R]\n⊢ im a ^ 2 = -↑(↑normSq (im a))\n[PROOFSTEP]\nsimp_rw [sq, ← star_mul_self, im_star, neg_mul, neg_neg]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nr x y z : R\na b c : ℍ[R]\n⊢ ↑(↑normSq (a + b)) = ↑(↑normSq a) + a * star b + b * star a + ↑(↑normSq b)\n[PROOFSTEP]\nsimp only [star_add, ← self_mul_star, mul_add, add_mul, add_assoc, add_left_comm]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nr✝ x y z : R\na b c : ℍ[R]\nr : R\nq : ℍ[R]\n⊢ ↑normSq (r • q) = r ^ 2 * ↑normSq q\n[PROOFSTEP]\nsimp only [normSq_def', smul_re, smul_imI, smul_imJ, smul_imK, mul_pow, mul_add, smul_eq_mul]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nr x y z : R\na✝ b✝ c a b : ℍ[R]\n⊢ ↑normSq (a + b) = ↑normSq a + (a * star b).re + ((b * star a).re + ↑normSq b)\n[PROOFSTEP]\nsimp_rw [normSq_def, star_add, add_mul, mul_add, add_re]\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nr x y z : R\na✝ b✝ c a b : ℍ[R]\n⊢ ↑normSq a + (a * star b).re + ((b * star a).re + ↑normSq b) =\n ↑normSq a + ↑normSq b + ((a * star b).re + (b * star a).re)\n[PROOFSTEP]\nabel\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nr x y z : R\na✝ b✝ c a b : ℍ[R]\n⊢ ↑normSq a + (a * star b).re + ((b * star a).re + ↑normSq b) =\n ↑normSq a + ↑normSq b + ((a * star b).re + (b * star a).re)\n[PROOFSTEP]\nabel\n[GOAL]\nS : Type u_1\nT : Type u_2\nR : Type u_3\ninst✝ : CommRing R\nr x y z : R\na✝ b✝ c a b : ℍ[R]\n⊢ ↑normSq a + ↑normSq b + ((a * star b).re + (b * star a).re) = ↑normSq a + ↑normSq b + 2 * (a * star b).re\n[PROOFSTEP]\nrw [← add_re, ← star_mul_star a b, self_add_star', coe_re]\n[GOAL]\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\na : ℍ[R]\n⊢ ↑normSq a = 0 ↔ a = 0\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun h => h.symm ▸ normSq.map_zero⟩\n[GOAL]\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\na : ℍ[R]\nh : ↑normSq a = 0\n⊢ a = 0\n[PROOFSTEP]\nrw [normSq_def', add_eq_zero_iff', add_eq_zero_iff', add_eq_zero_iff'] at h \n[GOAL]\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\na : ℍ[R]\nh : ((a.re ^ 2 = 0 ∧ a.imI ^ 2 = 0) ∧ a.imJ ^ 2 = 0) ∧ a.imK ^ 2 = 0\n⊢ a = 0\ncase ha\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\na : ℍ[R]\nh : (a.re ^ 2 + a.imI ^ 2 = 0 ∧ a.imJ ^ 2 = 0) ∧ a.imK ^ 2 = 0\n⊢ 0 ≤ a.re ^ 2\ncase hb\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\na : ℍ[R]\nh : (a.re ^ 2 + a.imI ^ 2 = 0 ∧ a.imJ ^ 2 = 0) ∧ a.imK ^ 2 = 0\n⊢ 0 ≤ a.imI ^ 2\ncase ha\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\na : ℍ[R]\nh : a.re ^ 2 + a.imI ^ 2 + a.imJ ^ 2 = 0 ∧ a.imK ^ 2 = 0\n⊢ 0 ≤ a.re ^ 2 + a.imI ^ 2\ncase hb\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\na : ℍ[R]\nh : a.re ^ 2 + a.imI ^ 2 + a.imJ ^ 2 = 0 ∧ a.imK ^ 2 = 0\n⊢ 0 ≤ a.imJ ^ 2\ncase ha\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\na : ℍ[R]\nh : a.re ^ 2 + a.imI ^ 2 + a.imJ ^ 2 + a.imK ^ 2 = 0\n⊢ 0 ≤ a.re ^ 2 + a.imI ^ 2 + a.imJ ^ 2\ncase hb\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\na : ℍ[R]\nh : a.re ^ 2 + a.imI ^ 2 + a.imJ ^ 2 + a.imK ^ 2 = 0\n⊢ 0 ≤ a.imK ^ 2\n[PROOFSTEP]\nexact ext a 0 (pow_eq_zero h.1.1.1) (pow_eq_zero h.1.1.2) (pow_eq_zero h.1.2) (pow_eq_zero h.2)\n[GOAL]\ncase ha\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\na : ℍ[R]\nh : (a.re ^ 2 + a.imI ^ 2 = 0 ∧ a.imJ ^ 2 = 0) ∧ a.imK ^ 2 = 0\n⊢ 0 ≤ a.re ^ 2\ncase hb\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\na : ℍ[R]\nh : (a.re ^ 2 + a.imI ^ 2 = 0 ∧ a.imJ ^ 2 = 0) ∧ a.imK ^ 2 = 0\n⊢ 0 ≤ a.imI ^ 2\ncase ha\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\na : ℍ[R]\nh : a.re ^ 2 + a.imI ^ 2 + a.imJ ^ 2 = 0 ∧ a.imK ^ 2 = 0\n⊢ 0 ≤ a.re ^ 2 + a.imI ^ 2\ncase hb\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\na : ℍ[R]\nh : a.re ^ 2 + a.imI ^ 2 + a.imJ ^ 2 = 0 ∧ a.imK ^ 2 = 0\n⊢ 0 ≤ a.imJ ^ 2\ncase ha\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\na : ℍ[R]\nh : a.re ^ 2 + a.imI ^ 2 + a.imJ ^ 2 + a.imK ^ 2 = 0\n⊢ 0 ≤ a.re ^ 2 + a.imI ^ 2 + a.imJ ^ 2\ncase hb\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\na : ℍ[R]\nh : a.re ^ 2 + a.imI ^ 2 + a.imJ ^ 2 + a.imK ^ 2 = 0\n⊢ 0 ≤ a.imK ^ 2\n[PROOFSTEP]\nall_goals apply_rules [sq_nonneg, add_nonneg]\n[GOAL]\ncase ha\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\na : ℍ[R]\nh : (a.re ^ 2 + a.imI ^ 2 = 0 ∧ a.imJ ^ 2 = 0) ∧ a.imK ^ 2 = 0\n⊢ 0 ≤ a.re ^ 2\n[PROOFSTEP]\napply_rules [sq_nonneg, add_nonneg]\n[GOAL]\ncase hb\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\na : ℍ[R]\nh : (a.re ^ 2 + a.imI ^ 2 = 0 ∧ a.imJ ^ 2 = 0) ∧ a.imK ^ 2 = 0\n⊢ 0 ≤ a.imI ^ 2\n[PROOFSTEP]\napply_rules [sq_nonneg, add_nonneg]\n[GOAL]\ncase ha\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\na : ℍ[R]\nh : a.re ^ 2 + a.imI ^ 2 + a.imJ ^ 2 = 0 ∧ a.imK ^ 2 = 0\n⊢ 0 ≤ a.re ^ 2 + a.imI ^ 2\n[PROOFSTEP]\napply_rules [sq_nonneg, add_nonneg]\n[GOAL]\ncase hb\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\na : ℍ[R]\nh : a.re ^ 2 + a.imI ^ 2 + a.imJ ^ 2 = 0 ∧ a.imK ^ 2 = 0\n⊢ 0 ≤ a.imJ ^ 2\n[PROOFSTEP]\napply_rules [sq_nonneg, add_nonneg]\n[GOAL]\ncase ha\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\na : ℍ[R]\nh : a.re ^ 2 + a.imI ^ 2 + a.imJ ^ 2 + a.imK ^ 2 = 0\n⊢ 0 ≤ a.re ^ 2 + a.imI ^ 2 + a.imJ ^ 2\n[PROOFSTEP]\napply_rules [sq_nonneg, add_nonneg]\n[GOAL]\ncase hb\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\na : ℍ[R]\nh : a.re ^ 2 + a.imI ^ 2 + a.imJ ^ 2 + a.imK ^ 2 = 0\n⊢ 0 ≤ a.imK ^ 2\n[PROOFSTEP]\napply_rules [sq_nonneg, add_nonneg]\n[GOAL]\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\na : ℍ[R]\n⊢ 0 ≤ ↑normSq a\n[PROOFSTEP]\nrw [normSq_def']\n[GOAL]\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\na : ℍ[R]\n⊢ 0 ≤ a.re ^ 2 + a.imI ^ 2 + a.imJ ^ 2 + a.imK ^ 2\n[PROOFSTEP]\napply_rules [sq_nonneg, add_nonneg]\n[GOAL]\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\na✝ a b : ℍ[R]\nhab : a * b = 0\n⊢ ↑normSq a * ↑normSq b = 0\n[PROOFSTEP]\nrwa [← map_mul, normSq_eq_zero]\n[GOAL]\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\na : ℍ[R]\n⊢ a ^ 2 = ↑(↑normSq a) ↔ a = ↑a.re\n[PROOFSTEP]\nrw [← star_eq_self, ← star_mul_self, sq, mul_eq_mul_right_iff, eq_comm]\n[GOAL]\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\na : ℍ[R]\n⊢ star a = a ∨ a = 0 ↔ star a = a\n[PROOFSTEP]\nexact or_iff_left_of_imp fun ha ↦ ha.symm ▸ star_zero _\n[GOAL]\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\na : ℍ[R]\n⊢ a ^ 2 = -↑(↑normSq a) ↔ a.re = 0\n[PROOFSTEP]\nsimp_rw [← star_eq_neg]\n[GOAL]\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\na : ℍ[R]\n⊢ a ^ 2 = -↑(↑normSq a) ↔ star a = -a\n[PROOFSTEP]\nobtain rfl | hq0 := eq_or_ne a 0\n[GOAL]\ncase inl\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\n⊢ 0 ^ 2 = -↑(↑normSq 0) ↔ star 0 = -0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\na : ℍ[R]\nhq0 : a ≠ 0\n⊢ a ^ 2 = -↑(↑normSq a) ↔ star a = -a\n[PROOFSTEP]\nrw [← star_mul_self, ← mul_neg, ← neg_sq, sq, mul_left_inj' (neg_ne_zero.mpr hq0), eq_comm]\n[GOAL]\nR : Type u_1\ninst✝ : LinearOrderedField R\na b : ℍ[R]\nsrc✝ : Nontrivial ℍ[R] := instNontrivial\n⊢ MonoidWithZero ℍ[R]\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u_1\ninst✝ : LinearOrderedField R\na b : ℍ[R]\nsrc✝¹ : Nontrivial ℍ[R] := instNontrivial\nsrc✝ : MonoidWithZero ℍ[R] := inferInstance\n⊢ 0⁻¹ = 0\n[PROOFSTEP]\nrw [instInv_inv, star_zero, smul_zero]\n[GOAL]\nR : Type u_1\ninst✝ : LinearOrderedField R\na✝ b : ℍ[R]\nsrc✝¹ : Nontrivial ℍ[R] := instNontrivial\nsrc✝ : MonoidWithZero ℍ[R] := inferInstance\na : ℍ[R]\nha : a ≠ 0\n⊢ a * a⁻¹ = 1\n[PROOFSTEP]\nletI : Semiring ℍ[R] := inferInstanceAs (Semiring ℍ[R,-1,-1])\n[GOAL]\nR : Type u_1\ninst✝ : LinearOrderedField R\na✝ b : ℍ[R]\nsrc✝¹ : Nontrivial ℍ[R] := instNontrivial\nsrc✝ : MonoidWithZero ℍ[R] := inferInstance\na : ℍ[R]\nha : a ≠ 0\nthis : Semiring ℍ[R] := inferInstanceAs (Semiring ℍ[R,-1,-1])\n⊢ a * a⁻¹ = 1\n[PROOFSTEP]\nrw [instInv_inv, Algebra.mul_smul_comm (normSq a)⁻¹ a (star a), self_mul_star, smul_coe,\n inv_mul_cancel (normSq_ne_zero.2 ha), coe_one]\n[GOAL]\nR : Type u_1\ninst✝ : LinearOrderedField R\na b : ℍ[R]\nsrc✝¹ : GroupWithZero ℍ[R] := instGroupWithZero\nsrc✝ : Ring ℍ[R] := instRing\nn : ℤ\nd : ℕ\nhd : d ≠ 0\nh : Nat.coprime (Int.natAbs n) d\n⊢ ↑(Rat.mk' n d) = ↑n * (↑d)⁻¹\n[PROOFSTEP]\nrw [← coe_rat_cast, Rat.cast_mk', coe_mul, coe_int_cast, coe_inv, coe_nat_cast]\n[GOAL]\nR : Type u_1\ninst✝ : LinearOrderedField R\na b : ℍ[R]\nsrc✝¹ : GroupWithZero ℍ[R] := instGroupWithZero\nsrc✝ : Ring ℍ[R] := instRing\nq : ℚ\nx : ℍ[R]\n⊢ (fun x x_1 => x • x_1) q x = ↑q * x\n[PROOFSTEP]\nrw [← coe_rat_cast, coe_mul_eq_smul]\n[GOAL]\nR : Type u_1\ninst✝ : LinearOrderedField R\na b : ℍ[R]\nsrc✝¹ : GroupWithZero ℍ[R] := instGroupWithZero\nsrc✝ : Ring ℍ[R] := instRing\nq : ℚ\nx : ℍ[R]\n⊢ (fun x x_1 => x • x_1) q x = ↑q • x\n[PROOFSTEP]\next\n[GOAL]\ncase a\nR : Type u_1\ninst✝ : LinearOrderedField R\na b : ℍ[R]\nsrc✝¹ : GroupWithZero ℍ[R] := instGroupWithZero\nsrc✝ : Ring ℍ[R] := instRing\nq : ℚ\nx : ℍ[R]\n⊢ ((fun x x_1 => x • x_1) q x).re = (↑q • x).re\n[PROOFSTEP]\nexact DivisionRing.qsmul_eq_mul' _ _\n[GOAL]\ncase a\nR : Type u_1\ninst✝ : LinearOrderedField R\na b : ℍ[R]\nsrc✝¹ : GroupWithZero ℍ[R] := instGroupWithZero\nsrc✝ : Ring ℍ[R] := instRing\nq : ℚ\nx : ℍ[R]\n⊢ ((fun x x_1 => x • x_1) q x).imI = (↑q • x).imI\n[PROOFSTEP]\nexact DivisionRing.qsmul_eq_mul' _ _\n[GOAL]\ncase a\nR : Type u_1\ninst✝ : LinearOrderedField R\na b : ℍ[R]\nsrc✝¹ : GroupWithZero ℍ[R] := instGroupWithZero\nsrc✝ : Ring ℍ[R] := instRing\nq : ℚ\nx : ℍ[R]\n⊢ ((fun x x_1 => x • x_1) q x).imJ = (↑q • x).imJ\n[PROOFSTEP]\nexact DivisionRing.qsmul_eq_mul' _ _\n[GOAL]\ncase a\nR : Type u_1\ninst✝ : LinearOrderedField R\na b : ℍ[R]\nsrc✝¹ : GroupWithZero ℍ[R] := instGroupWithZero\nsrc✝ : Ring ℍ[R] := instRing\nq : ℚ\nx : ℍ[R]\n⊢ ((fun x x_1 => x • x_1) q x).imK = (↑q • x).imK\n[PROOFSTEP]\nexact DivisionRing.qsmul_eq_mul' _ _\n[GOAL]\nR : Type u_1\ninst✝ : LinearOrderedField R\na b : ℍ[R]\nq : ℚ\n⊢ ↑(↑normSq ↑q) = ↑q ^ 2\n[PROOFSTEP]\nrw [← coe_rat_cast, normSq_coe, coe_pow]\n[GOAL]\nR : Type u_1\nc₁ c₂ : R\ninst✝ : Infinite R\n⊢ 1 ≤ 4\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nc₁ c₂ : R\n⊢ #ℍ[R,c₁,c₂] = #R ^ 4\n[PROOFSTEP]\nrw [mk_congr (QuaternionAlgebra.equivProd c₁ c₂)]\n[GOAL]\nR : Type u_1\nc₁ c₂ : R\n⊢ #(R × R × R × R) = #R ^ 4\n[PROOFSTEP]\nsimp only [mk_prod, lift_id]\n[GOAL]\nR : Type u_1\nc₁ c₂ : R\n⊢ #R * (#R * (#R * #R)) = #R ^ 4\n[PROOFSTEP]\nring\n[GOAL]\nR : Type u_1\nc₁ c₂ : R\ninst✝ : Infinite R\n⊢ #ℍ[R,c₁,c₂] = #R\n[PROOFSTEP]\nrw [mk_quaternionAlgebra, pow_four]\n[GOAL]\nR : Type u_1\nc₁ c₂ : R\n⊢ #↑Set.univ = #R ^ 4\n[PROOFSTEP]\nrw [mk_univ, mk_quaternionAlgebra]\n[GOAL]\nR : Type u_1\nc₁ c₂ : R\ninst✝ : Infinite R\n⊢ #↑Set.univ = #R\n[PROOFSTEP]\nrw [mk_univ_quaternionAlgebra, pow_four]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Quaternion", "llama_tokens": 38064, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO", "lm_q1_score": 0.5, "lm_q2_score": 0.02228618310405795, "lm_q1q2_score": 0.011143091552028975}} {"text": "[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.243, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : HasZeroMorphisms C\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\n⊢ X.obj Δ ⟶ N s (SimplexCategory.len A.fst.unop)\n[PROOFSTEP]\nrefine' (s.iso Δ).inv ≫ Sigma.desc fun B => _\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.243, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : HasZeroMorphisms C\nΔ : SimplexCategoryᵒᵖ\nA B : IndexSet Δ\n⊢ summand s.N Δ B ⟶ N s (SimplexCategory.len A.fst.unop)\n[PROOFSTEP]\nby_cases B = A\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.243, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : HasZeroMorphisms C\nΔ : SimplexCategoryᵒᵖ\nA B : IndexSet Δ\n⊢ summand s.N Δ B ⟶ N s (SimplexCategory.len A.fst.unop)\n[PROOFSTEP]\nby_cases B = A\n[GOAL]\ncase pos\nC : Type u_1\ninst✝² : Category.{?u.243, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : HasZeroMorphisms C\nΔ : SimplexCategoryᵒᵖ\nA B : IndexSet Δ\nh : B = A\n⊢ summand s.N Δ B ⟶ N s (SimplexCategory.len A.fst.unop)\n[PROOFSTEP]\nexact eqToHom (by subst h; rfl)\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.243, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : HasZeroMorphisms C\nΔ : SimplexCategoryᵒᵖ\nA B : IndexSet Δ\nh : B = A\n⊢ summand s.N Δ B = N s (SimplexCategory.len A.fst.unop)\n[PROOFSTEP]\nsubst h\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.243, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : HasZeroMorphisms C\nΔ : SimplexCategoryᵒᵖ\nB : IndexSet Δ\n⊢ summand s.N Δ B = N s (SimplexCategory.len B.fst.unop)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nC : Type u_1\ninst✝² : Category.{?u.243, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : HasZeroMorphisms C\nΔ : SimplexCategoryᵒᵖ\nA B : IndexSet Δ\nh : ¬B = A\n⊢ summand s.N Δ B ⟶ N s (SimplexCategory.len A.fst.unop)\n[PROOFSTEP]\nexact 0\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : HasZeroMorphisms C\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\n⊢ ιSummand s A ≫ πSummand s A = 𝟙 (N s (SimplexCategory.len A.fst.unop))\n[PROOFSTEP]\ndsimp only [ιSummand, iso_hom, πSummand, iso_inv, summand]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : HasZeroMorphisms C\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\n⊢ ((ιCoprod s.N A ≫ map X s.ι Δ) ≫\n inv (map X s.ι Δ) ≫\n Sigma.desc fun B =>\n if h : B = A then eqToHom (_ : summand s.N Δ B = N s (SimplexCategory.len A.fst.unop)) else 0) =\n 𝟙 (N s (SimplexCategory.len A.fst.unop))\n[PROOFSTEP]\nsimp only [summand, assoc, IsIso.hom_inv_id_assoc]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : HasZeroMorphisms C\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\n⊢ (ιCoprod s.N A ≫\n Sigma.desc fun B =>\n if h : B = A then eqToHom (_ : summand s.N Δ B = N s (SimplexCategory.len A.fst.unop)) else 0) =\n 𝟙 (N s (SimplexCategory.len A.fst.unop))\n[PROOFSTEP]\nerw [colimit.ι_desc, Cofan.mk_ι_app]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : HasZeroMorphisms C\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\n⊢ (if h : { as := A }.as = A then eqToHom (_ : summand s.N Δ { as := A }.as = N s (SimplexCategory.len A.fst.unop))\n else 0) =\n 𝟙 (N s (SimplexCategory.len A.fst.unop))\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : HasZeroMorphisms C\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\n⊢ (if h : A = A then 𝟙 (N s (SimplexCategory.len A.fst.unop)) else 0) = 𝟙 (N s (SimplexCategory.len A.fst.unop))\n[PROOFSTEP]\nsimp only [dite_eq_ite, ite_true]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : HasZeroMorphisms C\nΔ : SimplexCategoryᵒᵖ\nA B : IndexSet Δ\nh : B ≠ A\n⊢ ιSummand s A ≫ πSummand s B = 0\n[PROOFSTEP]\ndsimp only [ιSummand, iso_hom, πSummand, iso_inv, summand]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : HasZeroMorphisms C\nΔ : SimplexCategoryᵒᵖ\nA B : IndexSet Δ\nh : B ≠ A\n⊢ ((ιCoprod s.N A ≫ map X s.ι Δ) ≫\n inv (map X s.ι Δ) ≫\n Sigma.desc fun B_1 =>\n if h : B_1 = B then eqToHom (_ : summand s.N Δ B_1 = N s (SimplexCategory.len B.fst.unop)) else 0) =\n 0\n[PROOFSTEP]\nsimp only [summand, assoc, IsIso.hom_inv_id_assoc]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : HasZeroMorphisms C\nΔ : SimplexCategoryᵒᵖ\nA B : IndexSet Δ\nh : B ≠ A\n⊢ (ιCoprod s.N A ≫\n Sigma.desc fun B_1 =>\n if h : B_1 = B then eqToHom (_ : summand s.N Δ B_1 = N s (SimplexCategory.len B.fst.unop)) else 0) =\n 0\n[PROOFSTEP]\nerw [colimit.ι_desc, Cofan.mk_ι_app]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : HasZeroMorphisms C\nΔ : SimplexCategoryᵒᵖ\nA B : IndexSet Δ\nh : B ≠ A\n⊢ (if h : { as := A }.as = B then eqToHom (_ : summand s.N Δ { as := A }.as = N s (SimplexCategory.len B.fst.unop))\n else 0) =\n 0\n[PROOFSTEP]\nexact dif_neg h.symm\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nΔ : SimplexCategoryᵒᵖ\n⊢ 𝟙 (X.obj Δ) = ∑ A : IndexSet Δ, πSummand s A ≫ ιSummand s A\n[PROOFSTEP]\napply s.hom_ext'\n[GOAL]\ncase h\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nΔ : SimplexCategoryᵒᵖ\n⊢ ∀ (A : IndexSet Δ), ιSummand s A ≫ 𝟙 (X.obj Δ) = ιSummand s A ≫ ∑ A : IndexSet Δ, πSummand s A ≫ ιSummand s A\n[PROOFSTEP]\nintro A\n[GOAL]\ncase h\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\n⊢ ιSummand s A ≫ 𝟙 (X.obj Δ) = ιSummand s A ≫ ∑ A : IndexSet Δ, πSummand s A ≫ ιSummand s A\n[PROOFSTEP]\nrw [comp_id, comp_sum, Finset.sum_eq_single A, ι_πSummand_eq_id_assoc]\n[GOAL]\ncase h.h₀\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\n⊢ ∀ (b : IndexSet Δ), b ∈ Finset.univ → b ≠ A → ιSummand s A ≫ πSummand s b ≫ ιSummand s b = 0\n[PROOFSTEP]\nintro B _ h₂\n[GOAL]\ncase h.h₀\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nΔ : SimplexCategoryᵒᵖ\nA B : IndexSet Δ\na✝ : B ∈ Finset.univ\nh₂ : B ≠ A\n⊢ ιSummand s A ≫ πSummand s B ≫ ιSummand s B = 0\n[PROOFSTEP]\nrw [s.ι_πSummand_eq_zero_assoc _ _ h₂, zero_comp]\n[GOAL]\ncase h.h₁\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\n⊢ ¬A ∈ Finset.univ → ιSummand s A ≫ πSummand s A ≫ ιSummand s A = 0\n[PROOFSTEP]\nsimp only [Finset.mem_univ, not_true, IsEmpty.forall_iff]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nn : ℕ\ni : Fin (n + 1)\n⊢ SimplicialObject.σ X i ≫ πSummand s (IndexSet.id (op [n + 1])) = 0\n[PROOFSTEP]\napply s.hom_ext'\n[GOAL]\ncase h\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nn : ℕ\ni : Fin (n + 1)\n⊢ ∀ (A : IndexSet (op [n])),\n ιSummand s A ≫ SimplicialObject.σ X i ≫ πSummand s (IndexSet.id (op [n + 1])) = ιSummand s A ≫ 0\n[PROOFSTEP]\nintro A\n[GOAL]\ncase h\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nn : ℕ\ni : Fin (n + 1)\nA : IndexSet (op [n])\n⊢ ιSummand s A ≫ SimplicialObject.σ X i ≫ πSummand s (IndexSet.id (op [n + 1])) = ιSummand s A ≫ 0\n[PROOFSTEP]\ndsimp only [SimplicialObject.σ]\n[GOAL]\ncase h\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nn : ℕ\ni : Fin (n + 1)\nA : IndexSet (op [n])\n⊢ ιSummand s A ≫ X.map (SimplexCategory.σ i).op ≫ πSummand s (IndexSet.id (op [n + 1])) = ιSummand s A ≫ 0\n[PROOFSTEP]\nrw [comp_zero, s.ιSummand_epi_naturality_assoc A (SimplexCategory.σ i).op, ι_πSummand_eq_zero]\n[GOAL]\ncase h.h\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nn : ℕ\ni : Fin (n + 1)\nA : IndexSet (op [n])\n⊢ IndexSet.id (op [n + 1]) ≠ IndexSet.epiComp A (SimplexCategory.σ i).op\n[PROOFSTEP]\nrw [ne_comm]\n[GOAL]\ncase h.h\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nn : ℕ\ni : Fin (n + 1)\nA : IndexSet (op [n])\n⊢ IndexSet.epiComp A (SimplexCategory.σ i).op ≠ IndexSet.id (op [n + 1])\n[PROOFSTEP]\nchange ¬(A.epiComp (SimplexCategory.σ i).op).EqId\n[GOAL]\ncase h.h\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nn : ℕ\ni : Fin (n + 1)\nA : IndexSet (op [n])\n⊢ ¬IndexSet.EqId (IndexSet.epiComp A (SimplexCategory.σ i).op)\n[PROOFSTEP]\nrw [IndexSet.eqId_iff_len_eq]\n[GOAL]\ncase h.h\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nn : ℕ\ni : Fin (n + 1)\nA : IndexSet (op [n])\n⊢ ¬SimplexCategory.len (IndexSet.epiComp A (SimplexCategory.σ i).op).fst.unop = SimplexCategory.len (op [n + 1]).unop\n[PROOFSTEP]\nhave h := SimplexCategory.len_le_of_epi (inferInstance : Epi A.e)\n[GOAL]\ncase h.h\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nn : ℕ\ni : Fin (n + 1)\nA : IndexSet (op [n])\nh : SimplexCategory.len A.fst.unop ≤ SimplexCategory.len (op [n]).unop\n⊢ ¬SimplexCategory.len (IndexSet.epiComp A (SimplexCategory.σ i).op).fst.unop = SimplexCategory.len (op [n + 1]).unop\n[PROOFSTEP]\ndsimp at h ⊢\n[GOAL]\ncase h.h\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nn : ℕ\ni : Fin (n + 1)\nA : IndexSet (op [n])\nh : SimplexCategory.len A.fst.unop ≤ n\n⊢ ¬SimplexCategory.len A.fst.unop = n + 1\n[PROOFSTEP]\nlinarith\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX✝ : SimplicialObject C\ns✝ : Splitting X✝\ninst✝ : Preadditive C\nX : SimplicialObject C\ns : Splitting X\nn : ℕ\nA : IndexSet (op [n])\nhA : ¬IndexSet.EqId A\n⊢ ιSummand s A ≫ HomologicalComplex.Hom.f PInfty n = 0\n[PROOFSTEP]\nrw [SimplicialObject.Splitting.IndexSet.eqId_iff_mono] at hA \n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX✝ : SimplicialObject C\ns✝ : Splitting X✝\ninst✝ : Preadditive C\nX : SimplicialObject C\ns : Splitting X\nn : ℕ\nA : IndexSet (op [n])\nhA : ¬Mono (IndexSet.e A)\n⊢ ιSummand s A ≫ HomologicalComplex.Hom.f PInfty n = 0\n[PROOFSTEP]\nrw [SimplicialObject.Splitting.ιSummand_eq, assoc, degeneracy_comp_PInfty X n A.e hA, comp_zero]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nZ : C\nn : ℕ\nf : Z ⟶ X.obj (op [n])\n⊢ f ≫ HomologicalComplex.Hom.f PInfty n = 0 ↔ f ≫ πSummand s (IndexSet.id (op [n])) = 0\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nZ : C\nn : ℕ\nf : Z ⟶ X.obj (op [n])\n⊢ f ≫ HomologicalComplex.Hom.f PInfty n = 0 → f ≫ πSummand s (IndexSet.id (op [n])) = 0\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nZ : C\nn : ℕ\nf : Z ⟶ X.obj (op [n])\nh : f ≫ HomologicalComplex.Hom.f PInfty n = 0\n⊢ f ≫ πSummand s (IndexSet.id (op [n])) = 0\n[PROOFSTEP]\nrcases n with _ | n\n[GOAL]\ncase mp.zero\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nZ : C\nf : Z ⟶ X.obj (op [Nat.zero])\nh : f ≫ HomologicalComplex.Hom.f PInfty Nat.zero = 0\n⊢ f ≫ πSummand s (IndexSet.id (op [Nat.zero])) = 0\n[PROOFSTEP]\ndsimp at h \n[GOAL]\ncase mp.zero\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nZ : C\nf : Z ⟶ X.obj (op [Nat.zero])\nh : f ≫ 𝟙 (X.obj (op [0])) = 0\n⊢ f ≫ πSummand s (IndexSet.id (op [Nat.zero])) = 0\n[PROOFSTEP]\nrw [comp_id] at h \n[GOAL]\ncase mp.zero\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nZ : C\nf : Z ⟶ X.obj (op [Nat.zero])\nh : f = 0\n⊢ f ≫ πSummand s (IndexSet.id (op [Nat.zero])) = 0\n[PROOFSTEP]\nrw [h, zero_comp]\n[GOAL]\ncase mp.succ\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nZ : C\nn : ℕ\nf : Z ⟶ X.obj (op [Nat.succ n])\nh : f ≫ HomologicalComplex.Hom.f PInfty (Nat.succ n) = 0\n⊢ f ≫ πSummand s (IndexSet.id (op [Nat.succ n])) = 0\n[PROOFSTEP]\nhave h' := f ≫= PInfty_f_add_QInfty_f (n + 1)\n[GOAL]\ncase mp.succ\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nZ : C\nn : ℕ\nf : Z ⟶ X.obj (op [Nat.succ n])\nh : f ≫ HomologicalComplex.Hom.f PInfty (Nat.succ n) = 0\nh' :\n f ≫ (HomologicalComplex.Hom.f PInfty (n + 1) + HomologicalComplex.Hom.f QInfty (n + 1)) =\n f ≫ 𝟙 (HomologicalComplex.X K[X] (n + 1))\n⊢ f ≫ πSummand s (IndexSet.id (op [Nat.succ n])) = 0\n[PROOFSTEP]\ndsimp at h' \n[GOAL]\ncase mp.succ\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nZ : C\nn : ℕ\nf : Z ⟶ X.obj (op [Nat.succ n])\nh : f ≫ HomologicalComplex.Hom.f PInfty (Nat.succ n) = 0\nh' :\n f ≫ (HomologicalComplex.Hom.f PInfty (n + 1) + HomologicalComplex.Hom.f QInfty (n + 1)) = f ≫ 𝟙 (X.obj (op [n + 1]))\n⊢ f ≫ πSummand s (IndexSet.id (op [Nat.succ n])) = 0\n[PROOFSTEP]\nrw [comp_id, comp_add, h, zero_add] at h' \n[GOAL]\ncase mp.succ\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nZ : C\nn : ℕ\nf : Z ⟶ X.obj (op [Nat.succ n])\nh : f ≫ HomologicalComplex.Hom.f PInfty (Nat.succ n) = 0\nh' : f ≫ HomologicalComplex.Hom.f QInfty (n + 1) = f\n⊢ f ≫ πSummand s (IndexSet.id (op [Nat.succ n])) = 0\n[PROOFSTEP]\nrw [← h', assoc, QInfty_f, decomposition_Q, Preadditive.sum_comp, Preadditive.comp_sum, Finset.sum_eq_zero]\n[GOAL]\ncase mp.succ\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nZ : C\nn : ℕ\nf : Z ⟶ X.obj (op [Nat.succ n])\nh : f ≫ HomologicalComplex.Hom.f PInfty (Nat.succ n) = 0\nh' : f ≫ HomologicalComplex.Hom.f QInfty (n + 1) = f\n⊢ ∀ (x : Fin (n + 1)),\n x ∈ Finset.filter (fun i => ↑i < n + 1) Finset.univ →\n f ≫\n (HomologicalComplex.Hom.f (P ↑x) (n + 1) ≫\n SimplicialObject.δ X (Fin.succ (↑Fin.revPerm x)) ≫ SimplicialObject.σ X (↑Fin.revPerm x)) ≫\n πSummand s (IndexSet.id (op [Nat.succ n])) =\n 0\n[PROOFSTEP]\nintro i _\n[GOAL]\ncase mp.succ\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nZ : C\nn : ℕ\nf : Z ⟶ X.obj (op [Nat.succ n])\nh : f ≫ HomologicalComplex.Hom.f PInfty (Nat.succ n) = 0\nh' : f ≫ HomologicalComplex.Hom.f QInfty (n + 1) = f\ni : Fin (n + 1)\na✝ : i ∈ Finset.filter (fun i => ↑i < n + 1) Finset.univ\n⊢ f ≫\n (HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i)) ≫\n πSummand s (IndexSet.id (op [Nat.succ n])) =\n 0\n[PROOFSTEP]\nsimp only [assoc, σ_comp_πSummand_id_eq_zero, comp_zero]\n[GOAL]\ncase mpr\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nZ : C\nn : ℕ\nf : Z ⟶ X.obj (op [n])\n⊢ f ≫ πSummand s (IndexSet.id (op [n])) = 0 → f ≫ HomologicalComplex.Hom.f PInfty n = 0\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nZ : C\nn : ℕ\nf : Z ⟶ X.obj (op [n])\nh : f ≫ πSummand s (IndexSet.id (op [n])) = 0\n⊢ f ≫ HomologicalComplex.Hom.f PInfty n = 0\n[PROOFSTEP]\nrw [← comp_id f, assoc, s.decomposition_id, Preadditive.sum_comp, Preadditive.comp_sum, Fintype.sum_eq_zero]\n[GOAL]\ncase mpr.h\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nZ : C\nn : ℕ\nf : Z ⟶ X.obj (op [n])\nh : f ≫ πSummand s (IndexSet.id (op [n])) = 0\n⊢ ∀ (a : IndexSet (op [n])), f ≫ (πSummand s a ≫ ιSummand s a) ≫ HomologicalComplex.Hom.f PInfty n = 0\n[PROOFSTEP]\nintro A\n[GOAL]\ncase mpr.h\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nZ : C\nn : ℕ\nf : Z ⟶ X.obj (op [n])\nh : f ≫ πSummand s (IndexSet.id (op [n])) = 0\nA : IndexSet (op [n])\n⊢ f ≫ (πSummand s A ≫ ιSummand s A) ≫ HomologicalComplex.Hom.f PInfty n = 0\n[PROOFSTEP]\nby_cases hA : A.EqId\n[GOAL]\ncase pos\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nZ : C\nn : ℕ\nf : Z ⟶ X.obj (op [n])\nh : f ≫ πSummand s (IndexSet.id (op [n])) = 0\nA : IndexSet (op [n])\nhA : IndexSet.EqId A\n⊢ f ≫ (πSummand s A ≫ ιSummand s A) ≫ HomologicalComplex.Hom.f PInfty n = 0\n[PROOFSTEP]\ndsimp at hA \n[GOAL]\ncase pos\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nZ : C\nn : ℕ\nf : Z ⟶ X.obj (op [n])\nh : f ≫ πSummand s (IndexSet.id (op [n])) = 0\nA : IndexSet (op [n])\nhA : A = IndexSet.id (op [n])\n⊢ f ≫ (πSummand s A ≫ ιSummand s A) ≫ HomologicalComplex.Hom.f PInfty n = 0\n[PROOFSTEP]\nsubst hA\n[GOAL]\ncase pos\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nZ : C\nn : ℕ\nf : Z ⟶ X.obj (op [n])\nh : f ≫ πSummand s (IndexSet.id (op [n])) = 0\n⊢ f ≫ (πSummand s (IndexSet.id (op [n])) ≫ ιSummand s (IndexSet.id (op [n]))) ≫ HomologicalComplex.Hom.f PInfty n = 0\n[PROOFSTEP]\nrw [assoc, reassoc_of% h, zero_comp]\n[GOAL]\ncase neg\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nZ : C\nn : ℕ\nf : Z ⟶ X.obj (op [n])\nh : f ≫ πSummand s (IndexSet.id (op [n])) = 0\nA : IndexSet (op [n])\nhA : ¬IndexSet.EqId A\n⊢ f ≫ (πSummand s A ≫ ιSummand s A) ≫ HomologicalComplex.Hom.f PInfty n = 0\n[PROOFSTEP]\nsimp only [assoc, s.ιSummand_comp_PInfty_eq_zero A hA, comp_zero]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nn : ℕ\n⊢ HomologicalComplex.Hom.f PInfty n ≫ πSummand s (IndexSet.id (op [n])) = πSummand s (IndexSet.id (op [n]))\n[PROOFSTEP]\nconv_rhs => rw [← id_comp (s.πSummand _)]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nn : ℕ\n| πSummand s (IndexSet.id (op [n]))\n[PROOFSTEP]\nrw [← id_comp (s.πSummand _)]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nn : ℕ\n| πSummand s (IndexSet.id (op [n]))\n[PROOFSTEP]\nrw [← id_comp (s.πSummand _)]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nn : ℕ\n| πSummand s (IndexSet.id (op [n]))\n[PROOFSTEP]\nrw [← id_comp (s.πSummand _)]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nn : ℕ\n⊢ HomologicalComplex.Hom.f PInfty n ≫ πSummand s (IndexSet.id (op [n])) =\n 𝟙 (X.obj (op [n])) ≫ πSummand s (IndexSet.id (op [n]))\n[PROOFSTEP]\nsymm\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nn : ℕ\n⊢ 𝟙 (X.obj (op [n])) ≫ πSummand s (IndexSet.id (op [n])) =\n HomologicalComplex.Hom.f PInfty n ≫ πSummand s (IndexSet.id (op [n]))\n[PROOFSTEP]\nrw [← sub_eq_zero, ← sub_comp, ← comp_PInfty_eq_zero_iff, sub_comp, id_comp, PInfty_f_idem, sub_self]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nn : ℕ\n⊢ πSummand s (IndexSet.id (op [n])) ≫ ιSummand s (IndexSet.id (op [n])) ≫ HomologicalComplex.Hom.f PInfty n =\n HomologicalComplex.Hom.f PInfty n\n[PROOFSTEP]\nconv_rhs => rw [← id_comp (PInfty.f n)]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nn : ℕ\n| HomologicalComplex.Hom.f PInfty n\n[PROOFSTEP]\nrw [← id_comp (PInfty.f n)]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nn : ℕ\n| HomologicalComplex.Hom.f PInfty n\n[PROOFSTEP]\nrw [← id_comp (PInfty.f n)]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nn : ℕ\n| HomologicalComplex.Hom.f PInfty n\n[PROOFSTEP]\nrw [← id_comp (PInfty.f n)]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nn : ℕ\n⊢ πSummand s (IndexSet.id (op [n])) ≫ ιSummand s (IndexSet.id (op [n])) ≫ HomologicalComplex.Hom.f PInfty n =\n 𝟙 (HomologicalComplex.X K[X] n) ≫ HomologicalComplex.Hom.f PInfty n\n[PROOFSTEP]\nerw [s.decomposition_id, Preadditive.sum_comp]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nn : ℕ\n⊢ πSummand s (IndexSet.id (op [n])) ≫ ιSummand s (IndexSet.id (op [n])) ≫ HomologicalComplex.Hom.f PInfty n =\n ∑ j : IndexSet (op [n]), (πSummand s j ≫ ιSummand s j) ≫ HomologicalComplex.Hom.f PInfty n\n[PROOFSTEP]\nrw [Fintype.sum_eq_single (IndexSet.id (op [n])), assoc]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nn : ℕ\n⊢ ∀ (x : IndexSet (op [n])),\n x ≠ IndexSet.id (op [n]) → (πSummand s x ≫ ιSummand s x) ≫ HomologicalComplex.Hom.f PInfty n = 0\n[PROOFSTEP]\nrintro A (hA : ¬A.EqId)\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nn : ℕ\nA : IndexSet (op [n])\nhA : ¬IndexSet.EqId A\n⊢ (πSummand s A ≫ ιSummand s A) ≫ HomologicalComplex.Hom.f PInfty n = 0\n[PROOFSTEP]\nrw [assoc, s.ιSummand_comp_PInfty_eq_zero A hA, comp_zero]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nj k : ℕ\nA : IndexSet (op [j])\nhA : ¬IndexSet.EqId A\n⊢ ιSummand s A ≫ HomologicalComplex.d K[X] j k ≫ πSummand s (IndexSet.id (op [k])) = 0\n[PROOFSTEP]\nrw [A.eqId_iff_mono] at hA \n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nj k : ℕ\nA : IndexSet (op [j])\nhA : ¬Mono (IndexSet.e A)\n⊢ ιSummand s A ≫ HomologicalComplex.d K[X] j k ≫ πSummand s (IndexSet.id (op [k])) = 0\n[PROOFSTEP]\nrw [← assoc, ← s.comp_PInfty_eq_zero_iff, assoc, ← PInfty.comm j k, s.ιSummand_eq, assoc,\n degeneracy_comp_PInfty_assoc X j A.e hA, zero_comp, comp_zero]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.276754, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\ni j : ℕ\nhij : ¬ComplexShape.Rel (ComplexShape.down ℕ) i j\n⊢ d s i j = 0\n[PROOFSTEP]\nsimp only [d, K[X].shape i j hij, zero_comp, comp_zero]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.276754, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\ni j k : ℕ\nx✝¹ : ComplexShape.Rel (ComplexShape.down ℕ) i j\nx✝ : ComplexShape.Rel (ComplexShape.down ℕ) j k\n⊢ d s i j ≫ d s j k = 0\n[PROOFSTEP]\nsimp only [d, assoc]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.276754, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\ni j k : ℕ\nx✝¹ : ComplexShape.Rel (ComplexShape.down ℕ) i j\nx✝ : ComplexShape.Rel (ComplexShape.down ℕ) j k\n⊢ ιSummand s (IndexSet.id (op [i])) ≫\n HomologicalComplex.d K[X] i j ≫\n πSummand s (IndexSet.id (op [j])) ≫\n ιSummand s (IndexSet.id (op [j])) ≫ HomologicalComplex.d K[X] j k ≫ πSummand s (IndexSet.id (op [k])) =\n 0\n[PROOFSTEP]\nhave eq : K[X].d i j ≫ 𝟙 (X.obj (op [j])) ≫ K[X].d j k ≫ s.πSummand (IndexSet.id (op [k])) = 0 := by\n erw [id_comp, HomologicalComplex.d_comp_d_assoc, zero_comp]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.276754, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\ni j k : ℕ\nx✝¹ : ComplexShape.Rel (ComplexShape.down ℕ) i j\nx✝ : ComplexShape.Rel (ComplexShape.down ℕ) j k\n⊢ HomologicalComplex.d K[X] i j ≫\n 𝟙 (X.obj (op [j])) ≫ HomologicalComplex.d K[X] j k ≫ πSummand s (IndexSet.id (op [k])) =\n 0\n[PROOFSTEP]\nerw [id_comp, HomologicalComplex.d_comp_d_assoc, zero_comp]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.276754, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\ni j k : ℕ\nx✝¹ : ComplexShape.Rel (ComplexShape.down ℕ) i j\nx✝ : ComplexShape.Rel (ComplexShape.down ℕ) j k\neq :\n HomologicalComplex.d K[X] i j ≫\n 𝟙 (X.obj (op [j])) ≫ HomologicalComplex.d K[X] j k ≫ πSummand s (IndexSet.id (op [k])) =\n 0\n⊢ ιSummand s (IndexSet.id (op [i])) ≫\n HomologicalComplex.d K[X] i j ≫\n πSummand s (IndexSet.id (op [j])) ≫\n ιSummand s (IndexSet.id (op [j])) ≫ HomologicalComplex.d K[X] j k ≫ πSummand s (IndexSet.id (op [k])) =\n 0\n[PROOFSTEP]\nrw [s.decomposition_id] at eq \n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.276754, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\ni j k : ℕ\nx✝¹ : ComplexShape.Rel (ComplexShape.down ℕ) i j\nx✝ : ComplexShape.Rel (ComplexShape.down ℕ) j k\neq :\n HomologicalComplex.d K[X] i j ≫\n (∑ A : IndexSet (op [j]), πSummand s A ≫ ιSummand s A) ≫\n HomologicalComplex.d K[X] j k ≫ πSummand s (IndexSet.id (op [k])) =\n 0\n⊢ ιSummand s (IndexSet.id (op [i])) ≫\n HomologicalComplex.d K[X] i j ≫\n πSummand s (IndexSet.id (op [j])) ≫\n ιSummand s (IndexSet.id (op [j])) ≫ HomologicalComplex.d K[X] j k ≫ πSummand s (IndexSet.id (op [k])) =\n 0\n[PROOFSTEP]\nclassical\nrw [Fintype.sum_eq_add_sum_compl (IndexSet.id (op [j])), add_comp, comp_add, assoc, Preadditive.sum_comp,\n Preadditive.comp_sum, Finset.sum_eq_zero, add_zero] at eq \nswap\n· intro A hA\n simp only [Finset.mem_compl, Finset.mem_singleton] at hA \n simp only [assoc, ιSummand_comp_d_comp_πSummand_eq_zero _ _ _ _ hA, comp_zero]\nrw [eq, comp_zero]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.276754, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\ni j k : ℕ\nx✝¹ : ComplexShape.Rel (ComplexShape.down ℕ) i j\nx✝ : ComplexShape.Rel (ComplexShape.down ℕ) j k\neq :\n HomologicalComplex.d K[X] i j ≫\n (∑ A : IndexSet (op [j]), πSummand s A ≫ ιSummand s A) ≫\n HomologicalComplex.d K[X] j k ≫ πSummand s (IndexSet.id (op [k])) =\n 0\n⊢ ιSummand s (IndexSet.id (op [i])) ≫\n HomologicalComplex.d K[X] i j ≫\n πSummand s (IndexSet.id (op [j])) ≫\n ιSummand s (IndexSet.id (op [j])) ≫ HomologicalComplex.d K[X] j k ≫ πSummand s (IndexSet.id (op [k])) =\n 0\n[PROOFSTEP]\nrw [Fintype.sum_eq_add_sum_compl (IndexSet.id (op [j])), add_comp, comp_add, assoc, Preadditive.sum_comp,\n Preadditive.comp_sum, Finset.sum_eq_zero, add_zero] at eq \n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.276754, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\ni j k : ℕ\nx✝¹ : ComplexShape.Rel (ComplexShape.down ℕ) i j\nx✝ : ComplexShape.Rel (ComplexShape.down ℕ) j k\neq :\n HomologicalComplex.d K[X] i j ≫\n πSummand s (IndexSet.id (op [j])) ≫\n ιSummand s (IndexSet.id (op [j])) ≫ HomologicalComplex.d K[X] j k ≫ πSummand s (IndexSet.id (op [k])) =\n 0\n⊢ ιSummand s (IndexSet.id (op [i])) ≫\n HomologicalComplex.d K[X] i j ≫\n πSummand s (IndexSet.id (op [j])) ≫\n ιSummand s (IndexSet.id (op [j])) ≫ HomologicalComplex.d K[X] j k ≫ πSummand s (IndexSet.id (op [k])) =\n 0\nC : Type u_1\ninst✝² : Category.{?u.276754, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\ni j k : ℕ\nx✝¹ : ComplexShape.Rel (ComplexShape.down ℕ) i j\nx✝ : ComplexShape.Rel (ComplexShape.down ℕ) j k\neq :\n HomologicalComplex.d K[X] i j ≫\n πSummand s (IndexSet.id (op [j])) ≫\n ιSummand s (IndexSet.id (op [j])) ≫ HomologicalComplex.d K[X] j k ≫ πSummand s (IndexSet.id (op [k])) +\n ∑ j_1 in {IndexSet.id (op [j])}ᶜ,\n HomologicalComplex.d K[X] i j ≫\n (πSummand s j_1 ≫ ιSummand s j_1) ≫ HomologicalComplex.d K[X] j k ≫ πSummand s (IndexSet.id (op [k])) =\n 0\n⊢ ∀ (x : IndexSet (op [j])),\n x ∈ {IndexSet.id (op [j])}ᶜ →\n HomologicalComplex.d K[X] i j ≫\n (πSummand s x ≫ ιSummand s x) ≫ HomologicalComplex.d K[X] j k ≫ πSummand s (IndexSet.id (op [k])) =\n 0\n[PROOFSTEP]\nswap\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.276754, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\ni j k : ℕ\nx✝¹ : ComplexShape.Rel (ComplexShape.down ℕ) i j\nx✝ : ComplexShape.Rel (ComplexShape.down ℕ) j k\neq :\n HomologicalComplex.d K[X] i j ≫\n πSummand s (IndexSet.id (op [j])) ≫\n ιSummand s (IndexSet.id (op [j])) ≫ HomologicalComplex.d K[X] j k ≫ πSummand s (IndexSet.id (op [k])) +\n ∑ j_1 in {IndexSet.id (op [j])}ᶜ,\n HomologicalComplex.d K[X] i j ≫\n (πSummand s j_1 ≫ ιSummand s j_1) ≫ HomologicalComplex.d K[X] j k ≫ πSummand s (IndexSet.id (op [k])) =\n 0\n⊢ ∀ (x : IndexSet (op [j])),\n x ∈ {IndexSet.id (op [j])}ᶜ →\n HomologicalComplex.d K[X] i j ≫\n (πSummand s x ≫ ιSummand s x) ≫ HomologicalComplex.d K[X] j k ≫ πSummand s (IndexSet.id (op [k])) =\n 0\n[PROOFSTEP]\nintro A hA\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.276754, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\ni j k : ℕ\nx✝¹ : ComplexShape.Rel (ComplexShape.down ℕ) i j\nx✝ : ComplexShape.Rel (ComplexShape.down ℕ) j k\neq :\n HomologicalComplex.d K[X] i j ≫\n πSummand s (IndexSet.id (op [j])) ≫\n ιSummand s (IndexSet.id (op [j])) ≫ HomologicalComplex.d K[X] j k ≫ πSummand s (IndexSet.id (op [k])) +\n ∑ j_1 in {IndexSet.id (op [j])}ᶜ,\n HomologicalComplex.d K[X] i j ≫\n (πSummand s j_1 ≫ ιSummand s j_1) ≫ HomologicalComplex.d K[X] j k ≫ πSummand s (IndexSet.id (op [k])) =\n 0\nA : IndexSet (op [j])\nhA : A ∈ {IndexSet.id (op [j])}ᶜ\n⊢ HomologicalComplex.d K[X] i j ≫\n (πSummand s A ≫ ιSummand s A) ≫ HomologicalComplex.d K[X] j k ≫ πSummand s (IndexSet.id (op [k])) =\n 0\n[PROOFSTEP]\nsimp only [Finset.mem_compl, Finset.mem_singleton] at hA \n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.276754, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\ni j k : ℕ\nx✝¹ : ComplexShape.Rel (ComplexShape.down ℕ) i j\nx✝ : ComplexShape.Rel (ComplexShape.down ℕ) j k\neq :\n HomologicalComplex.d K[X] i j ≫\n πSummand s (IndexSet.id (op [j])) ≫\n ιSummand s (IndexSet.id (op [j])) ≫ HomologicalComplex.d K[X] j k ≫ πSummand s (IndexSet.id (op [k])) +\n ∑ j_1 in {IndexSet.id (op [j])}ᶜ,\n HomologicalComplex.d K[X] i j ≫\n (πSummand s j_1 ≫ ιSummand s j_1) ≫ HomologicalComplex.d K[X] j k ≫ πSummand s (IndexSet.id (op [k])) =\n 0\nA : IndexSet (op [j])\nhA : ¬A = IndexSet.id (op [j])\n⊢ HomologicalComplex.d K[X] i j ≫\n (πSummand s A ≫ ιSummand s A) ≫ HomologicalComplex.d K[X] j k ≫ πSummand s (IndexSet.id (op [k])) =\n 0\n[PROOFSTEP]\nsimp only [assoc, ιSummand_comp_d_comp_πSummand_eq_zero _ _ _ _ hA, comp_zero]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.276754, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\ni j k : ℕ\nx✝¹ : ComplexShape.Rel (ComplexShape.down ℕ) i j\nx✝ : ComplexShape.Rel (ComplexShape.down ℕ) j k\neq :\n HomologicalComplex.d K[X] i j ≫\n πSummand s (IndexSet.id (op [j])) ≫\n ιSummand s (IndexSet.id (op [j])) ≫ HomologicalComplex.d K[X] j k ≫ πSummand s (IndexSet.id (op [k])) =\n 0\n⊢ ιSummand s (IndexSet.id (op [i])) ≫\n HomologicalComplex.d K[X] i j ≫\n πSummand s (IndexSet.id (op [j])) ≫\n ιSummand s (IndexSet.id (op [j])) ≫ HomologicalComplex.d K[X] j k ≫ πSummand s (IndexSet.id (op [k])) =\n 0\n[PROOFSTEP]\nrw [eq, comp_zero]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.336016, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\ni j : ℕ\nx✝ : ComplexShape.Rel (ComplexShape.down ℕ) i j\n⊢ (fun n => ιSummand s (IndexSet.id (op [n])) ≫ HomologicalComplex.Hom.f PInfty n) i ≫\n HomologicalComplex.d (N₁.obj X).X i j =\n HomologicalComplex.d ((toKaroubi (ChainComplex C ℕ)).obj (nondegComplex s)).X i j ≫\n (fun n => ιSummand s (IndexSet.id (op [n])) ≫ HomologicalComplex.Hom.f PInfty n) j\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.336016, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\ni j : ℕ\nx✝ : ComplexShape.Rel (ComplexShape.down ℕ) i j\n⊢ (ιSummand s (IndexSet.id (op [i])) ≫ HomologicalComplex.Hom.f PInfty i) ≫ HomologicalComplex.d K[X] i j =\n (ιSummand s (IndexSet.id (op [i])) ≫ HomologicalComplex.d K[X] i j ≫ πSummand s (IndexSet.id (op [j]))) ≫\n ιSummand s (IndexSet.id (op [j])) ≫ HomologicalComplex.Hom.f PInfty j\n[PROOFSTEP]\nrw [assoc, assoc, assoc, πSummand_comp_ιSummand_comp_PInfty_eq_PInfty, HomologicalComplex.Hom.comm]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.336016, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\n⊢ (HomologicalComplex.Hom.mk fun n => ιSummand s (IndexSet.id (op [n])) ≫ HomologicalComplex.Hom.f PInfty n) =\n ((toKaroubi (ChainComplex C ℕ)).obj (nondegComplex s)).p ≫\n (HomologicalComplex.Hom.mk fun n => ιSummand s (IndexSet.id (op [n])) ≫ HomologicalComplex.Hom.f PInfty n) ≫\n (N₁.obj X).p\n[PROOFSTEP]\next n\n[GOAL]\ncase h\nC : Type u_1\ninst✝² : Category.{?u.336016, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nn : ℕ\n⊢ HomologicalComplex.Hom.f\n (HomologicalComplex.Hom.mk fun n => ιSummand s (IndexSet.id (op [n])) ≫ HomologicalComplex.Hom.f PInfty n) n =\n HomologicalComplex.Hom.f\n (((toKaroubi (ChainComplex C ℕ)).obj (nondegComplex s)).p ≫\n (HomologicalComplex.Hom.mk fun n => ιSummand s (IndexSet.id (op [n])) ≫ HomologicalComplex.Hom.f PInfty n) ≫\n (N₁.obj X).p)\n n\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h\nC : Type u_1\ninst✝² : Category.{?u.336016, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nn : ℕ\n⊢ ιSummand s (IndexSet.id (op [n])) ≫ HomologicalComplex.Hom.f PInfty n =\n 𝟙 (N s n) ≫\n (ιSummand s (IndexSet.id (op [n])) ≫ HomologicalComplex.Hom.f PInfty n) ≫ HomologicalComplex.Hom.f PInfty n\n[PROOFSTEP]\nrw [id_comp, assoc, PInfty_f_idem]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.336016, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\ni j : ℕ\nx✝ : ComplexShape.Rel (ComplexShape.down ℕ) i j\n⊢ (fun n => πSummand s (IndexSet.id (op [n]))) i ≫\n HomologicalComplex.d ((toKaroubi (ChainComplex C ℕ)).obj (nondegComplex s)).X i j =\n HomologicalComplex.d (N₁.obj X).X i j ≫ (fun n => πSummand s (IndexSet.id (op [n]))) j\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.336016, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\ni j : ℕ\nx✝ : ComplexShape.Rel (ComplexShape.down ℕ) i j\n⊢ πSummand s (IndexSet.id (op [i])) ≫\n ιSummand s (IndexSet.id (op [i])) ≫ HomologicalComplex.d K[X] i j ≫ πSummand s (IndexSet.id (op [j])) =\n HomologicalComplex.d K[X] i j ≫ πSummand s (IndexSet.id (op [j]))\n[PROOFSTEP]\nslice_rhs 1 1 => rw [← id_comp (K[X].d i j)]\n[GOAL]\ncase a\nC : Type u_1\ninst✝² : Category.{?u.336016, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\ni j : ℕ\nx✝ : ComplexShape.Rel (ComplexShape.down ℕ) i j\n| HomologicalComplex.d K[X] i j\ncase a\nC : Type u_1\ninst✝² : Category.{?u.336016, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\ni j : ℕ\nx✝ : ComplexShape.Rel (ComplexShape.down ℕ) i j\n| πSummand s (IndexSet.id (op [j]))\n[PROOFSTEP]\nrw [← id_comp (K[X].d i j)]\n[GOAL]\ncase a\nC : Type u_1\ninst✝² : Category.{?u.336016, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\ni j : ℕ\nx✝ : ComplexShape.Rel (ComplexShape.down ℕ) i j\n| HomologicalComplex.d K[X] i j\ncase a\nC : Type u_1\ninst✝² : Category.{?u.336016, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\ni j : ℕ\nx✝ : ComplexShape.Rel (ComplexShape.down ℕ) i j\n| πSummand s (IndexSet.id (op [j]))\n[PROOFSTEP]\nrw [← id_comp (K[X].d i j)]\n[GOAL]\ncase a\nC : Type u_1\ninst✝² : Category.{?u.336016, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\ni j : ℕ\nx✝ : ComplexShape.Rel (ComplexShape.down ℕ) i j\n| HomologicalComplex.d K[X] i j\ncase a\nC : Type u_1\ninst✝² : Category.{?u.336016, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\ni j : ℕ\nx✝ : ComplexShape.Rel (ComplexShape.down ℕ) i j\n| πSummand s (IndexSet.id (op [j]))\n[PROOFSTEP]\nrw [← id_comp (K[X].d i j)]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.336016, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\ni j : ℕ\nx✝ : ComplexShape.Rel (ComplexShape.down ℕ) i j\n⊢ πSummand s (IndexSet.id (op [i])) ≫\n ιSummand s (IndexSet.id (op [i])) ≫ HomologicalComplex.d K[X] i j ≫ πSummand s (IndexSet.id (op [j])) =\n (𝟙 (HomologicalComplex.X K[X] i) ≫ HomologicalComplex.d K[X] i j) ≫ πSummand s (IndexSet.id (op [j]))\n[PROOFSTEP]\nerw [s.decomposition_id]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.336016, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\ni j : ℕ\nx✝ : ComplexShape.Rel (ComplexShape.down ℕ) i j\n⊢ πSummand s (IndexSet.id (op [i])) ≫\n ιSummand s (IndexSet.id (op [i])) ≫ HomologicalComplex.d K[X] i j ≫ πSummand s (IndexSet.id (op [j])) =\n ((∑ A : IndexSet (op [i]), πSummand s A ≫ ιSummand s A) ≫ HomologicalComplex.d K[X] i j) ≫\n πSummand s (IndexSet.id (op [j]))\n[PROOFSTEP]\nrw [sum_comp, sum_comp, Finset.sum_eq_single (IndexSet.id (op [i])), assoc, assoc]\n[GOAL]\ncase h₀\nC : Type u_1\ninst✝² : Category.{?u.336016, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\ni j : ℕ\nx✝ : ComplexShape.Rel (ComplexShape.down ℕ) i j\n⊢ ∀ (b : IndexSet (op [i])),\n b ∈ Finset.univ →\n b ≠ IndexSet.id (op [i]) →\n ((πSummand s b ≫ ιSummand s b) ≫ HomologicalComplex.d K[X] i j) ≫ πSummand s (IndexSet.id (op [j])) = 0\n[PROOFSTEP]\nintro A _ hA\n[GOAL]\ncase h₀\nC : Type u_1\ninst✝² : Category.{?u.336016, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\ni j : ℕ\nx✝ : ComplexShape.Rel (ComplexShape.down ℕ) i j\nA : IndexSet (op [i])\na✝ : A ∈ Finset.univ\nhA : A ≠ IndexSet.id (op [i])\n⊢ ((πSummand s A ≫ ιSummand s A) ≫ HomologicalComplex.d K[X] i j) ≫ πSummand s (IndexSet.id (op [j])) = 0\n[PROOFSTEP]\nsimp only [assoc, s.ιSummand_comp_d_comp_πSummand_eq_zero _ _ _ hA, comp_zero]\n[GOAL]\ncase h₁\nC : Type u_1\ninst✝² : Category.{?u.336016, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\ni j : ℕ\nx✝ : ComplexShape.Rel (ComplexShape.down ℕ) i j\n⊢ ¬IndexSet.id (op [i]) ∈ Finset.univ →\n ((πSummand s (IndexSet.id (op [i])) ≫ ιSummand s (IndexSet.id (op [i]))) ≫ HomologicalComplex.d K[X] i j) ≫\n πSummand s (IndexSet.id (op [j])) =\n 0\n[PROOFSTEP]\nsimp only [Finset.mem_univ, not_true, IsEmpty.forall_iff]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.336016, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\n⊢ (HomologicalComplex.Hom.mk fun n => πSummand s (IndexSet.id (op [n]))) =\n (N₁.obj X).p ≫\n (HomologicalComplex.Hom.mk fun n => πSummand s (IndexSet.id (op [n]))) ≫\n ((toKaroubi (ChainComplex C ℕ)).obj (nondegComplex s)).p\n[PROOFSTEP]\next n\n[GOAL]\ncase h\nC : Type u_1\ninst✝² : Category.{?u.336016, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nn : ℕ\n⊢ HomologicalComplex.Hom.f (HomologicalComplex.Hom.mk fun n => πSummand s (IndexSet.id (op [n]))) n =\n HomologicalComplex.Hom.f\n ((N₁.obj X).p ≫\n (HomologicalComplex.Hom.mk fun n => πSummand s (IndexSet.id (op [n]))) ≫\n ((toKaroubi (ChainComplex C ℕ)).obj (nondegComplex s)).p)\n n\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h\nC : Type u_1\ninst✝² : Category.{?u.336016, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nn : ℕ\n⊢ πSummand s (IndexSet.id (op [n])) = HomologicalComplex.Hom.f PInfty n ≫ πSummand s (IndexSet.id (op [n])) ≫ 𝟙 (N s n)\n[PROOFSTEP]\nsimp only [comp_id, PInfty_comp_πSummand_id]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.336016, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\n⊢ Karoubi.Hom.mk\n (HomologicalComplex.Hom.mk fun n => ιSummand s (IndexSet.id (op [n])) ≫ HomologicalComplex.Hom.f PInfty n) ≫\n Karoubi.Hom.mk (HomologicalComplex.Hom.mk fun n => πSummand s (IndexSet.id (op [n]))) =\n 𝟙 ((toKaroubi (ChainComplex C ℕ)).obj (nondegComplex s))\n[PROOFSTEP]\next n\n[GOAL]\ncase h.h\nC : Type u_1\ninst✝² : Category.{?u.336016, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nn : ℕ\n⊢ HomologicalComplex.Hom.f\n (Karoubi.Hom.mk\n (HomologicalComplex.Hom.mk fun n => ιSummand s (IndexSet.id (op [n])) ≫ HomologicalComplex.Hom.f PInfty n) ≫\n Karoubi.Hom.mk (HomologicalComplex.Hom.mk fun n => πSummand s (IndexSet.id (op [n])))).f\n n =\n HomologicalComplex.Hom.f (𝟙 ((toKaroubi (ChainComplex C ℕ)).obj (nondegComplex s))).f n\n[PROOFSTEP]\nsimp only [assoc, PInfty_comp_πSummand_id, Karoubi.comp_f, HomologicalComplex.comp_f, ι_πSummand_eq_id]\n[GOAL]\ncase h.h\nC : Type u_1\ninst✝² : Category.{?u.336016, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nn : ℕ\n⊢ 𝟙 (N s (SimplexCategory.len (IndexSet.id (op [n])).fst.unop)) =\n HomologicalComplex.Hom.f (𝟙 ((toKaroubi (ChainComplex C ℕ)).obj (nondegComplex s))).f n\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.336016, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\n⊢ Karoubi.Hom.mk (HomologicalComplex.Hom.mk fun n => πSummand s (IndexSet.id (op [n]))) ≫\n Karoubi.Hom.mk\n (HomologicalComplex.Hom.mk fun n => ιSummand s (IndexSet.id (op [n])) ≫ HomologicalComplex.Hom.f PInfty n) =\n 𝟙 (N₁.obj X)\n[PROOFSTEP]\next n\n[GOAL]\ncase h.h\nC : Type u_1\ninst✝² : Category.{?u.336016, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX : SimplicialObject C\ns : Splitting X\ninst✝ : Preadditive C\nn : ℕ\n⊢ HomologicalComplex.Hom.f\n (Karoubi.Hom.mk (HomologicalComplex.Hom.mk fun n => πSummand s (IndexSet.id (op [n]))) ≫\n Karoubi.Hom.mk\n (HomologicalComplex.Hom.mk fun n =>\n ιSummand s (IndexSet.id (op [n])) ≫ HomologicalComplex.Hom.f PInfty n)).f\n n =\n HomologicalComplex.Hom.f (𝟙 (N₁.obj X)).f n\n[PROOFSTEP]\nsimp only [πSummand_comp_ιSummand_comp_PInfty_eq_PInfty, Karoubi.comp_f, HomologicalComplex.comp_f, N₁_obj_p,\n Karoubi.id_eq]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.406470, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nS₁ S₂ : Split C\nΦ : S₁ ⟶ S₂\ni j : ℕ\nx✝ : ComplexShape.Rel (ComplexShape.down ℕ) i j\n⊢ Hom.f Φ i ≫ HomologicalComplex.d ((fun S => Splitting.nondegComplex S.s) S₂) i j =\n HomologicalComplex.d ((fun S => Splitting.nondegComplex S.s) S₁) i j ≫ Hom.f Φ j\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.406470, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nS₁ S₂ : Split C\nΦ : S₁ ⟶ S₂\ni j : ℕ\nx✝ : ComplexShape.Rel (ComplexShape.down ℕ) i j\n⊢ Hom.f Φ i ≫\n Splitting.ιSummand S₂.s (Splitting.IndexSet.id (op [i])) ≫\n HomologicalComplex.d K[S₂.X] i j ≫ Splitting.πSummand S₂.s (Splitting.IndexSet.id (op [j])) =\n (Splitting.ιSummand S₁.s (Splitting.IndexSet.id (op [i])) ≫\n HomologicalComplex.d K[S₁.X] i j ≫ Splitting.πSummand S₁.s (Splitting.IndexSet.id (op [j]))) ≫\n Hom.f Φ j\n[PROOFSTEP]\nerw [← ιSummand_naturality_symm_assoc Φ (Splitting.IndexSet.id (op [i])),\n ((alternatingFaceMapComplex C).map Φ.F).comm_assoc i j]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.406470, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nS₁ S₂ : Split C\nΦ : S₁ ⟶ S₂\ni j : ℕ\nx✝ : ComplexShape.Rel (ComplexShape.down ℕ) i j\n⊢ Splitting.ιSummand S₁.s (Splitting.IndexSet.id (op [i])) ≫\n HomologicalComplex.d ((alternatingFaceMapComplex C).obj S₁.X) i j ≫\n HomologicalComplex.Hom.f ((alternatingFaceMapComplex C).map Φ.F) j ≫\n Splitting.πSummand S₂.s (Splitting.IndexSet.id (op [j])) =\n (Splitting.ιSummand S₁.s (Splitting.IndexSet.id (op [i])) ≫\n HomologicalComplex.d K[S₁.X] i j ≫ Splitting.πSummand S₁.s (Splitting.IndexSet.id (op [j]))) ≫\n Hom.f Φ j\n[PROOFSTEP]\nsimp only [assoc]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.406470, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nS₁ S₂ : Split C\nΦ : S₁ ⟶ S₂\ni j : ℕ\nx✝ : ComplexShape.Rel (ComplexShape.down ℕ) i j\n⊢ Splitting.ιSummand S₁.s (Splitting.IndexSet.id (op [i])) ≫\n HomologicalComplex.d ((alternatingFaceMapComplex C).obj S₁.X) i j ≫\n HomologicalComplex.Hom.f ((alternatingFaceMapComplex C).map Φ.F) j ≫\n Splitting.πSummand S₂.s (Splitting.IndexSet.id (op [j])) =\n Splitting.ιSummand S₁.s (Splitting.IndexSet.id (op [i])) ≫\n HomologicalComplex.d K[S₁.X] i j ≫ Splitting.πSummand S₁.s (Splitting.IndexSet.id (op [j])) ≫ Hom.f Φ j\n[PROOFSTEP]\ncongr 2\n[GOAL]\ncase e_a.e_a\nC : Type u_1\ninst✝² : Category.{?u.406470, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nS₁ S₂ : Split C\nΦ : S₁ ⟶ S₂\ni j : ℕ\nx✝ : ComplexShape.Rel (ComplexShape.down ℕ) i j\n⊢ HomologicalComplex.Hom.f ((alternatingFaceMapComplex C).map Φ.F) j ≫\n Splitting.πSummand S₂.s (Splitting.IndexSet.id (op [j])) =\n Splitting.πSummand S₁.s (Splitting.IndexSet.id (op [j])) ≫ Hom.f Φ j\n[PROOFSTEP]\napply S₁.s.hom_ext'\n[GOAL]\ncase e_a.e_a.h\nC : Type u_1\ninst✝² : Category.{?u.406470, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nS₁ S₂ : Split C\nΦ : S₁ ⟶ S₂\ni j : ℕ\nx✝ : ComplexShape.Rel (ComplexShape.down ℕ) i j\n⊢ ∀ (A : Splitting.IndexSet (op [j])),\n Splitting.ιSummand S₁.s A ≫\n HomologicalComplex.Hom.f ((alternatingFaceMapComplex C).map Φ.F) j ≫\n Splitting.πSummand S₂.s (Splitting.IndexSet.id (op [j])) =\n Splitting.ιSummand S₁.s A ≫ Splitting.πSummand S₁.s (Splitting.IndexSet.id (op [j])) ≫ Hom.f Φ j\n[PROOFSTEP]\nintro A\n[GOAL]\ncase e_a.e_a.h\nC : Type u_1\ninst✝² : Category.{?u.406470, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nS₁ S₂ : Split C\nΦ : S₁ ⟶ S₂\ni j : ℕ\nx✝ : ComplexShape.Rel (ComplexShape.down ℕ) i j\nA : Splitting.IndexSet (op [j])\n⊢ Splitting.ιSummand S₁.s A ≫\n HomologicalComplex.Hom.f ((alternatingFaceMapComplex C).map Φ.F) j ≫\n Splitting.πSummand S₂.s (Splitting.IndexSet.id (op [j])) =\n Splitting.ιSummand S₁.s A ≫ Splitting.πSummand S₁.s (Splitting.IndexSet.id (op [j])) ≫ Hom.f Φ j\n[PROOFSTEP]\ndsimp [alternatingFaceMapComplex]\n[GOAL]\ncase e_a.e_a.h\nC : Type u_1\ninst✝² : Category.{?u.406470, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nS₁ S₂ : Split C\nΦ : S₁ ⟶ S₂\ni j : ℕ\nx✝ : ComplexShape.Rel (ComplexShape.down ℕ) i j\nA : Splitting.IndexSet (op [j])\n⊢ Splitting.ιSummand S₁.s A ≫ NatTrans.app Φ.F (op [j]) ≫ Splitting.πSummand S₂.s (Splitting.IndexSet.id (op [j])) =\n Splitting.ιSummand S₁.s A ≫ Splitting.πSummand S₁.s (Splitting.IndexSet.id (op [j])) ≫ Hom.f Φ j\n[PROOFSTEP]\nerw [ιSummand_naturality_symm_assoc Φ A]\n[GOAL]\ncase e_a.e_a.h\nC : Type u_1\ninst✝² : Category.{?u.406470, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nS₁ S₂ : Split C\nΦ : S₁ ⟶ S₂\ni j : ℕ\nx✝ : ComplexShape.Rel (ComplexShape.down ℕ) i j\nA : Splitting.IndexSet (op [j])\n⊢ Hom.f Φ (SimplexCategory.len A.fst.unop) ≫\n Splitting.ιSummand S₂.s A ≫ Splitting.πSummand S₂.s (Splitting.IndexSet.id (op [j])) =\n Splitting.ιSummand S₁.s A ≫ Splitting.πSummand S₁.s (Splitting.IndexSet.id (op [j])) ≫ Hom.f Φ j\n[PROOFSTEP]\nby_cases A.EqId\n[GOAL]\ncase e_a.e_a.h\nC : Type u_1\ninst✝² : Category.{?u.406470, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nS₁ S₂ : Split C\nΦ : S₁ ⟶ S₂\ni j : ℕ\nx✝ : ComplexShape.Rel (ComplexShape.down ℕ) i j\nA : Splitting.IndexSet (op [j])\n⊢ Hom.f Φ (SimplexCategory.len A.fst.unop) ≫\n Splitting.ιSummand S₂.s A ≫ Splitting.πSummand S₂.s (Splitting.IndexSet.id (op [j])) =\n Splitting.ιSummand S₁.s A ≫ Splitting.πSummand S₁.s (Splitting.IndexSet.id (op [j])) ≫ Hom.f Φ j\n[PROOFSTEP]\nby_cases A.EqId\n[GOAL]\ncase pos\nC : Type u_1\ninst✝² : Category.{?u.406470, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nS₁ S₂ : Split C\nΦ : S₁ ⟶ S₂\ni j : ℕ\nx✝ : ComplexShape.Rel (ComplexShape.down ℕ) i j\nA : Splitting.IndexSet (op [j])\nh : Splitting.IndexSet.EqId A\n⊢ Hom.f Φ (SimplexCategory.len A.fst.unop) ≫\n Splitting.ιSummand S₂.s A ≫ Splitting.πSummand S₂.s (Splitting.IndexSet.id (op [j])) =\n Splitting.ιSummand S₁.s A ≫ Splitting.πSummand S₁.s (Splitting.IndexSet.id (op [j])) ≫ Hom.f Φ j\n[PROOFSTEP]\ndsimp at h \n[GOAL]\ncase pos\nC : Type u_1\ninst✝² : Category.{?u.406470, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nS₁ S₂ : Split C\nΦ : S₁ ⟶ S₂\ni j : ℕ\nx✝ : ComplexShape.Rel (ComplexShape.down ℕ) i j\nA : Splitting.IndexSet (op [j])\nh : A = Splitting.IndexSet.id (op [j])\n⊢ Hom.f Φ (SimplexCategory.len A.fst.unop) ≫\n Splitting.ιSummand S₂.s A ≫ Splitting.πSummand S₂.s (Splitting.IndexSet.id (op [j])) =\n Splitting.ιSummand S₁.s A ≫ Splitting.πSummand S₁.s (Splitting.IndexSet.id (op [j])) ≫ Hom.f Φ j\n[PROOFSTEP]\nsubst h\n[GOAL]\ncase pos\nC : Type u_1\ninst✝² : Category.{?u.406470, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nS₁ S₂ : Split C\nΦ : S₁ ⟶ S₂\ni j : ℕ\nx✝ : ComplexShape.Rel (ComplexShape.down ℕ) i j\n⊢ Hom.f Φ (SimplexCategory.len (Splitting.IndexSet.id (op [j])).fst.unop) ≫\n Splitting.ιSummand S₂.s (Splitting.IndexSet.id (op [j])) ≫\n Splitting.πSummand S₂.s (Splitting.IndexSet.id (op [j])) =\n Splitting.ιSummand S₁.s (Splitting.IndexSet.id (op [j])) ≫\n Splitting.πSummand S₁.s (Splitting.IndexSet.id (op [j])) ≫ Hom.f Φ j\n[PROOFSTEP]\nsimp only [Splitting.ι_πSummand_eq_id, comp_id, Splitting.ι_πSummand_eq_id_assoc]\n[GOAL]\ncase pos\nC : Type u_1\ninst✝² : Category.{?u.406470, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nS₁ S₂ : Split C\nΦ : S₁ ⟶ S₂\ni j : ℕ\nx✝ : ComplexShape.Rel (ComplexShape.down ℕ) i j\n⊢ Hom.f Φ (SimplexCategory.len (Splitting.IndexSet.id (op [j])).fst.unop) = Hom.f Φ j\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nC : Type u_1\ninst✝² : Category.{?u.406470, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nS₁ S₂ : Split C\nΦ : S₁ ⟶ S₂\ni j : ℕ\nx✝ : ComplexShape.Rel (ComplexShape.down ℕ) i j\nA : Splitting.IndexSet (op [j])\nh : ¬Splitting.IndexSet.EqId A\n⊢ Hom.f Φ (SimplexCategory.len A.fst.unop) ≫\n Splitting.ιSummand S₂.s A ≫ Splitting.πSummand S₂.s (Splitting.IndexSet.id (op [j])) =\n Splitting.ιSummand S₁.s A ≫ Splitting.πSummand S₁.s (Splitting.IndexSet.id (op [j])) ≫ Hom.f Φ j\n[PROOFSTEP]\nhave h' : Splitting.IndexSet.id (op [j]) ≠ A := by\n rw [ne_comm]\n exact h\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.406470, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nS₁ S₂ : Split C\nΦ : S₁ ⟶ S₂\ni j : ℕ\nx✝ : ComplexShape.Rel (ComplexShape.down ℕ) i j\nA : Splitting.IndexSet (op [j])\nh : ¬Splitting.IndexSet.EqId A\n⊢ Splitting.IndexSet.id (op [j]) ≠ A\n[PROOFSTEP]\nrw [ne_comm]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.406470, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nS₁ S₂ : Split C\nΦ : S₁ ⟶ S₂\ni j : ℕ\nx✝ : ComplexShape.Rel (ComplexShape.down ℕ) i j\nA : Splitting.IndexSet (op [j])\nh : ¬Splitting.IndexSet.EqId A\n⊢ A ≠ Splitting.IndexSet.id (op [j])\n[PROOFSTEP]\nexact h\n[GOAL]\ncase neg\nC : Type u_1\ninst✝² : Category.{?u.406470, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nS₁ S₂ : Split C\nΦ : S₁ ⟶ S₂\ni j : ℕ\nx✝ : ComplexShape.Rel (ComplexShape.down ℕ) i j\nA : Splitting.IndexSet (op [j])\nh : ¬Splitting.IndexSet.EqId A\nh' : Splitting.IndexSet.id (op [j]) ≠ A\n⊢ Hom.f Φ (SimplexCategory.len A.fst.unop) ≫\n Splitting.ιSummand S₂.s A ≫ Splitting.πSummand S₂.s (Splitting.IndexSet.id (op [j])) =\n Splitting.ιSummand S₁.s A ≫ Splitting.πSummand S₁.s (Splitting.IndexSet.id (op [j])) ≫ Hom.f Φ j\n[PROOFSTEP]\nrw [S₁.s.ι_πSummand_eq_zero_assoc _ _ h', S₂.s.ι_πSummand_eq_zero _ _ h', zero_comp, comp_zero]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.449707, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nX✝ Y✝ : Split C\nΦ : X✝ ⟶ Y✝\n⊢ (nondegComplexFunctor ⋙ toKaroubi (ChainComplex C ℕ)).map Φ ≫\n ((fun S => Splitting.toKaroubiNondegComplexIsoN₁ S.s) Y✝).hom =\n ((fun S => Splitting.toKaroubiNondegComplexIsoN₁ S.s) X✝).hom ≫ (forget C ⋙ N₁).map Φ\n[PROOFSTEP]\next n\n[GOAL]\ncase h.h\nC : Type u_1\ninst✝² : Category.{?u.449707, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nX✝ Y✝ : Split C\nΦ : X✝ ⟶ Y✝\nn : ℕ\n⊢ HomologicalComplex.Hom.f\n ((nondegComplexFunctor ⋙ toKaroubi (ChainComplex C ℕ)).map Φ ≫\n ((fun S => Splitting.toKaroubiNondegComplexIsoN₁ S.s) Y✝).hom).f\n n =\n HomologicalComplex.Hom.f (((fun S => Splitting.toKaroubiNondegComplexIsoN₁ S.s) X✝).hom ≫ (forget C ⋙ N₁).map Φ).f n\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h.h\nC : Type u_1\ninst✝² : Category.{?u.449707, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nX✝ Y✝ : Split C\nΦ : X✝ ⟶ Y✝\nn : ℕ\n⊢ Hom.f Φ n ≫ Splitting.ιSummand Y✝.s (Splitting.IndexSet.id (op [n])) ≫ HomologicalComplex.Hom.f PInfty n =\n (Splitting.ιSummand X✝.s (Splitting.IndexSet.id (op [n])) ≫ HomologicalComplex.Hom.f PInfty n) ≫\n HomologicalComplex.Hom.f PInfty n ≫ NatTrans.app Φ.F (op [n])\n[PROOFSTEP]\nsimp only [Karoubi.comp_f, toKaroubi_map_f, HomologicalComplex.comp_f, nondegComplexFunctor_map_f,\n Splitting.toKaroubiNondegComplexIsoN₁_hom_f_f, N₁_map_f, AlternatingFaceMapComplex.map_f, assoc, PInfty_f_idem_assoc]\n[GOAL]\ncase h.h\nC : Type u_1\ninst✝² : Category.{?u.449707, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nX✝ Y✝ : Split C\nΦ : X✝ ⟶ Y✝\nn : ℕ\n⊢ Hom.f Φ n ≫ Splitting.ιSummand Y✝.s (Splitting.IndexSet.id (op [n])) ≫ HomologicalComplex.Hom.f PInfty n =\n Splitting.ιSummand X✝.s (Splitting.IndexSet.id (op [n])) ≫\n HomologicalComplex.Hom.f PInfty n ≫ NatTrans.app Φ.F (op [n])\n[PROOFSTEP]\nerw [← Split.ιSummand_naturality_symm_assoc Φ (Splitting.IndexSet.id (op [n]))]\n[GOAL]\ncase h.h\nC : Type u_1\ninst✝² : Category.{?u.449707, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nX✝ Y✝ : Split C\nΦ : X✝ ⟶ Y✝\nn : ℕ\n⊢ Splitting.ιSummand X✝.s (Splitting.IndexSet.id (op [n])) ≫\n NatTrans.app Φ.F (op [n]) ≫ HomologicalComplex.Hom.f PInfty n =\n Splitting.ιSummand X✝.s (Splitting.IndexSet.id (op [n])) ≫\n HomologicalComplex.Hom.f PInfty n ≫ NatTrans.app Φ.F (op [n])\n[PROOFSTEP]\nrw [PInfty_f_naturality]\n", "meta": {"mathlib_filename": "Mathlib.AlgebraicTopology.DoldKan.SplitSimplicialObject", "llama_tokens": 28454, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO", "lm_q1_score": 0.48438008427698437, "lm_q2_score": 0.022977370286363187, "lm_q1q2_score": 0.011129780555772077}} {"text": "[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\n⊢ Category.{?u.61, max u v} (SimplicialObject C)\n[PROOFSTEP]\ndsimp only [SimplicialObject]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\n⊢ Category.{?u.61, max u v} (SimplexCategoryᵒᵖ ⥤ C)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : HasLimitsOfShape J C\n⊢ HasLimitsOfShape J (SimplicialObject C)\n[PROOFSTEP]\ndsimp [SimplicialObject]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : HasLimitsOfShape J C\n⊢ HasLimitsOfShape J (SimplexCategoryᵒᵖ ⥤ C)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : HasColimitsOfShape J C\n⊢ HasColimitsOfShape J (SimplicialObject C)\n[PROOFSTEP]\ndsimp [SimplicialObject]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : HasColimitsOfShape J C\n⊢ HasColimitsOfShape J (SimplexCategoryᵒᵖ ⥤ C)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : SimplicialObject C\nf g : X ⟶ Y\nh : ∀ (n : SimplexCategoryᵒᵖ), NatTrans.app f n = NatTrans.app g n\n⊢ f.app = g.app\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : SimplicialObject C\nf g : X ⟶ Y\nh : ∀ (n : SimplexCategoryᵒᵖ), NatTrans.app f n = NatTrans.app g n\nx✝ : SimplexCategoryᵒᵖ\n⊢ NatTrans.app f x✝ = NatTrans.app g x✝\n[PROOFSTEP]\napply h\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : SimplicialObject C\nn m : ℕ\nh : n = m\n⊢ op [n] = op [m]\n[PROOFSTEP]\ncongr\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : SimplicialObject C\nn : ℕ\nh : n = n\n⊢ eqToIso X h = Iso.refl (X.obj (op [n]))\n[PROOFSTEP]\next\n[GOAL]\ncase w\nC : Type u\ninst✝ : Category.{v, u} C\nX : SimplicialObject C\nn : ℕ\nh : n = n\n⊢ (eqToIso X h).hom = (Iso.refl (X.obj (op [n]))).hom\n[PROOFSTEP]\nsimp [eqToIso]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : SimplicialObject C\nn : ℕ\ni j : Fin (n + 2)\nH : i ≤ j\n⊢ δ X (Fin.succ j) ≫ δ X i = δ X (Fin.castSucc i) ≫ δ X j\n[PROOFSTEP]\ndsimp [δ]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : SimplicialObject C\nn : ℕ\ni j : Fin (n + 2)\nH : i ≤ j\n⊢ X.map (SimplexCategory.δ (Fin.succ j)).op ≫ X.map (SimplexCategory.δ i).op =\n X.map (SimplexCategory.δ (Fin.castSucc i)).op ≫ X.map (SimplexCategory.δ j).op\n[PROOFSTEP]\nsimp only [← X.map_comp, ← op_comp, SimplexCategory.δ_comp_δ H]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : SimplicialObject C\nn : ℕ\ni : Fin (n + 2)\nj : Fin (n + 3)\nH : Fin.castSucc i < j\nhj : j = 0\n⊢ False\n[PROOFSTEP]\nsimp [hj, Fin.not_lt_zero] at H \n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : SimplicialObject C\nn : ℕ\ni : Fin (n + 2)\nj : Fin (n + 3)\nH : Fin.castSucc i < j\n⊢ δ X j ≫ δ X i = δ X (Fin.castSucc i) ≫ δ X (Fin.pred j (_ : j = 0 → False))\n[PROOFSTEP]\ndsimp [δ]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : SimplicialObject C\nn : ℕ\ni : Fin (n + 2)\nj : Fin (n + 3)\nH : Fin.castSucc i < j\n⊢ X.map (SimplexCategory.δ j).op ≫ X.map (SimplexCategory.δ i).op =\n X.map (SimplexCategory.δ (Fin.castSucc i)).op ≫ X.map (SimplexCategory.δ (Fin.pred j (_ : j = 0 → False))).op\n[PROOFSTEP]\nsimp only [← X.map_comp, ← op_comp, SimplexCategory.δ_comp_δ' H]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : SimplicialObject C\nn : ℕ\ni : Fin (n + 3)\nj : Fin (n + 2)\nH : i ≤ Fin.castSucc j\n⊢ δ X (Fin.succ j) ≫ δ X (Fin.castLT i (_ : ↑i < n + 2)) = δ X i ≫ δ X j\n[PROOFSTEP]\ndsimp [δ]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : SimplicialObject C\nn : ℕ\ni : Fin (n + 3)\nj : Fin (n + 2)\nH : i ≤ Fin.castSucc j\n⊢ X.map (SimplexCategory.δ (Fin.succ j)).op ≫ X.map (SimplexCategory.δ (Fin.castLT i (_ : ↑i < n + 2))).op =\n X.map (SimplexCategory.δ i).op ≫ X.map (SimplexCategory.δ j).op\n[PROOFSTEP]\nsimp only [← X.map_comp, ← op_comp, SimplexCategory.δ_comp_δ'' H]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : SimplicialObject C\nn : ℕ\ni : Fin (n + 2)\n⊢ δ X (Fin.castSucc i) ≫ δ X i = δ X (Fin.succ i) ≫ δ X i\n[PROOFSTEP]\ndsimp [δ]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : SimplicialObject C\nn : ℕ\ni : Fin (n + 2)\n⊢ X.map (SimplexCategory.δ (Fin.castSucc i)).op ≫ X.map (SimplexCategory.δ i).op =\n X.map (SimplexCategory.δ (Fin.succ i)).op ≫ X.map (SimplexCategory.δ i).op\n[PROOFSTEP]\nsimp only [← X.map_comp, ← op_comp, SimplexCategory.δ_comp_δ_self]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : SimplicialObject C\nn : ℕ\nj : Fin (n + 3)\ni : Fin (n + 2)\nH : j = Fin.castSucc i\n⊢ δ X j ≫ δ X i = δ X (Fin.succ i) ≫ δ X i\n[PROOFSTEP]\nsubst H\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : SimplicialObject C\nn : ℕ\ni : Fin (n + 2)\n⊢ δ X (Fin.castSucc i) ≫ δ X i = δ X (Fin.succ i) ≫ δ X i\n[PROOFSTEP]\nrw [δ_comp_δ_self]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : SimplicialObject C\nn : ℕ\ni : Fin (n + 2)\nj : Fin (n + 1)\nH : i ≤ Fin.castSucc j\n⊢ σ X (Fin.succ j) ≫ δ X (Fin.castSucc i) = δ X i ≫ σ X j\n[PROOFSTEP]\ndsimp [δ, σ]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : SimplicialObject C\nn : ℕ\ni : Fin (n + 2)\nj : Fin (n + 1)\nH : i ≤ Fin.castSucc j\n⊢ X.map (SimplexCategory.σ (Fin.succ j)).op ≫ X.map (SimplexCategory.δ (Fin.castSucc i)).op =\n X.map (SimplexCategory.δ i).op ≫ X.map (SimplexCategory.σ j).op\n[PROOFSTEP]\nsimp only [← X.map_comp, ← op_comp, SimplexCategory.δ_comp_σ_of_le H]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : SimplicialObject C\nn : ℕ\ni : Fin (n + 1)\n⊢ σ X i ≫ δ X (Fin.castSucc i) = 𝟙 (X.obj (op [n]))\n[PROOFSTEP]\ndsimp [δ, σ]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : SimplicialObject C\nn : ℕ\ni : Fin (n + 1)\n⊢ X.map (SimplexCategory.σ i).op ≫ X.map (SimplexCategory.δ (Fin.castSucc i)).op = 𝟙 (X.obj (op [n]))\n[PROOFSTEP]\nsimp only [← X.map_comp, ← op_comp, SimplexCategory.δ_comp_σ_self, op_id, X.map_id]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : SimplicialObject C\nn : ℕ\nj : Fin (n + 2)\ni : Fin (n + 1)\nH : j = Fin.castSucc i\n⊢ σ X i ≫ δ X j = 𝟙 (X.obj (op [n]))\n[PROOFSTEP]\nsubst H\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : SimplicialObject C\nn : ℕ\ni : Fin (n + 1)\n⊢ σ X i ≫ δ X (Fin.castSucc i) = 𝟙 (X.obj (op [n]))\n[PROOFSTEP]\nrw [δ_comp_σ_self]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : SimplicialObject C\nn : ℕ\ni : Fin (n + 1)\n⊢ σ X i ≫ δ X (Fin.succ i) = 𝟙 (X.obj (op [n]))\n[PROOFSTEP]\ndsimp [δ, σ]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : SimplicialObject C\nn : ℕ\ni : Fin (n + 1)\n⊢ X.map (SimplexCategory.σ i).op ≫ X.map (SimplexCategory.δ (Fin.succ i)).op = 𝟙 (X.obj (op [n]))\n[PROOFSTEP]\nsimp only [← X.map_comp, ← op_comp, SimplexCategory.δ_comp_σ_succ, op_id, X.map_id]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : SimplicialObject C\nn : ℕ\nj : Fin (n + 2)\ni : Fin (n + 1)\nH : j = Fin.succ i\n⊢ σ X i ≫ δ X j = 𝟙 (X.obj (op [n]))\n[PROOFSTEP]\nsubst H\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : SimplicialObject C\nn : ℕ\ni : Fin (n + 1)\n⊢ σ X i ≫ δ X (Fin.succ i) = 𝟙 (X.obj (op [n]))\n[PROOFSTEP]\nrw [δ_comp_σ_succ]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : SimplicialObject C\nn : ℕ\ni : Fin (n + 2)\nj : Fin (n + 1)\nH : Fin.castSucc j < i\n⊢ σ X (Fin.castSucc j) ≫ δ X (Fin.succ i) = δ X i ≫ σ X j\n[PROOFSTEP]\ndsimp [δ, σ]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : SimplicialObject C\nn : ℕ\ni : Fin (n + 2)\nj : Fin (n + 1)\nH : Fin.castSucc j < i\n⊢ X.map (SimplexCategory.σ (Fin.castSucc j)).op ≫ X.map (SimplexCategory.δ (Fin.succ i)).op =\n X.map (SimplexCategory.δ i).op ≫ X.map (SimplexCategory.σ j).op\n[PROOFSTEP]\nsimp only [← X.map_comp, ← op_comp, SimplexCategory.δ_comp_σ_of_gt H]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : SimplicialObject C\nn : ℕ\ni : Fin (n + 3)\nj : Fin (n + 2)\nH : Fin.succ j < i\nhi : i = 0\n⊢ False\n[PROOFSTEP]\nsimp only [Fin.not_lt_zero, hi] at H \n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : SimplicialObject C\nn : ℕ\ni : Fin (n + 3)\nj : Fin (n + 2)\nH : Fin.succ j < i\n⊢ σ X j ≫ δ X i = δ X (Fin.pred i (_ : i = 0 → False)) ≫ σ X (Fin.castLT j (_ : ↑j < n + 1))\n[PROOFSTEP]\ndsimp [δ, σ]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : SimplicialObject C\nn : ℕ\ni : Fin (n + 3)\nj : Fin (n + 2)\nH : Fin.succ j < i\n⊢ X.map (SimplexCategory.σ j).op ≫ X.map (SimplexCategory.δ i).op =\n X.map (SimplexCategory.δ (Fin.pred i (_ : i = 0 → False))).op ≫\n X.map (SimplexCategory.σ (Fin.castLT j (_ : ↑j < n + 1))).op\n[PROOFSTEP]\nsimp only [← X.map_comp, ← op_comp, SimplexCategory.δ_comp_σ_of_gt' H]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : SimplicialObject C\nn : ℕ\ni j : Fin (n + 1)\nH : i ≤ j\n⊢ σ X j ≫ σ X (Fin.castSucc i) = σ X i ≫ σ X (Fin.succ j)\n[PROOFSTEP]\ndsimp [δ, σ]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : SimplicialObject C\nn : ℕ\ni j : Fin (n + 1)\nH : i ≤ j\n⊢ X.map (SimplexCategory.σ j).op ≫ X.map (SimplexCategory.σ (Fin.castSucc i)).op =\n X.map (SimplexCategory.σ i).op ≫ X.map (SimplexCategory.σ (Fin.succ j)).op\n[PROOFSTEP]\nsimp only [← X.map_comp, ← op_comp, SimplexCategory.σ_comp_σ H]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : SimplicialObject C\nn : ℕ\n⊢ Category.{?u.68325, max u v} (Truncated C n)\n[PROOFSTEP]\ndsimp [Truncated]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : SimplicialObject C\nn : ℕ\n⊢ Category.{?u.68325, max u v} ((SimplexCategory.Truncated n)ᵒᵖ ⥤ C)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX : SimplicialObject C\nn : ℕ\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : HasLimitsOfShape J C\n⊢ HasLimitsOfShape J (Truncated C n)\n[PROOFSTEP]\ndsimp [Truncated]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX : SimplicialObject C\nn : ℕ\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : HasLimitsOfShape J C\n⊢ HasLimitsOfShape J ((SimplexCategory.Truncated n)ᵒᵖ ⥤ C)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX : SimplicialObject C\nn : ℕ\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : HasColimitsOfShape J C\n⊢ HasColimitsOfShape J (Truncated C n)\n[PROOFSTEP]\ndsimp [Truncated]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX : SimplicialObject C\nn : ℕ\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : HasColimitsOfShape J C\n⊢ HasColimitsOfShape J ((SimplexCategory.Truncated n)ᵒᵖ ⥤ C)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : SimplicialObject C\n⊢ Category.{?u.76503, max u v} (Augmented C)\n[PROOFSTEP]\ndsimp only [Augmented]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : SimplicialObject C\n⊢ Category.{?u.76503, max u v} (Comma (𝟭 (SimplicialObject C)) (const C))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : SimplicialObject C\nX✝ Y✝ : Augmented C\nη : X✝ ⟶ Y✝\n⊢ (𝟭 C).map (NatTrans.app (drop.map η) (op [0])) ≫\n ((fun X => { left := (drop.obj X).obj (op [0]), right := point.obj X, hom := NatTrans.app X.hom (op [0]) })\n Y✝).hom =\n ((fun X => { left := (drop.obj X).obj (op [0]), right := point.obj X, hom := NatTrans.app X.hom (op [0]) })\n X✝).hom ≫\n (𝟭 C).map (point.map η)\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : SimplicialObject C\nX✝ Y✝ : Augmented C\nη : X✝ ⟶ Y✝\n⊢ NatTrans.app η.left (op [0]) ≫ NatTrans.app Y✝.hom (op [0]) = NatTrans.app X✝.hom (op [0]) ≫ η.right\n[PROOFSTEP]\nrw [← NatTrans.comp_app]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : SimplicialObject C\nX✝ Y✝ : Augmented C\nη : X✝ ⟶ Y✝\n⊢ NatTrans.app (η.left ≫ Y✝.hom) (op [0]) = NatTrans.app X✝.hom (op [0]) ≫ η.right\n[PROOFSTEP]\nerw [η.w]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : SimplicialObject C\nX✝ Y✝ : Augmented C\nη : X✝ ⟶ Y✝\n⊢ NatTrans.app (X✝.hom ≫ (const C).map η.right) (op [0]) = NatTrans.app X✝.hom (op [0]) ≫ η.right\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ : SimplicialObject C\nX Y : Augmented C\nf : X ⟶ Y\n⊢ NatTrans.app (drop.map f) (op [0]) ≫ NatTrans.app Y.hom (op [0]) = NatTrans.app X.hom (op [0]) ≫ point.map f\n[PROOFSTEP]\nconvert congr_app f.w (op (SimplexCategory.mk 0))\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : SimplicialObject C\nD : Type u_1\ninst✝ : Category.{?u.105136, u_1} D\nF : C ⥤ D\nX✝ Y✝ : Augmented C\nη : X✝ ⟶ Y✝\n⊢ (𝟭 (SimplicialObject D)).map (whiskerRight η.left F) ≫\n ((fun X =>\n { left := ((whiskering C D).obj F).obj (drop.obj X), right := F.obj (point.obj X),\n hom := whiskerRight X.hom F ≫ (Functor.constComp SimplexCategoryᵒᵖ X.right F).hom })\n Y✝).hom =\n ((fun X =>\n { left := ((whiskering C D).obj F).obj (drop.obj X), right := F.obj (point.obj X),\n hom := whiskerRight X.hom F ≫ (Functor.constComp SimplexCategoryᵒᵖ X.right F).hom })\n X✝).hom ≫\n (const D).map (F.map η.right)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : SimplicialObject C\nD : Type u_1\ninst✝ : Category.{?u.105136, u_1} D\nF : C ⥤ D\nX✝ Y✝ : Augmented C\nη : X✝ ⟶ Y✝\nn✝ : SimplexCategoryᵒᵖ\n⊢ NatTrans.app\n ((𝟭 (SimplicialObject D)).map (whiskerRight η.left F) ≫\n ((fun X =>\n { left := ((whiskering C D).obj F).obj (drop.obj X), right := F.obj (point.obj X),\n hom := whiskerRight X.hom F ≫ (Functor.constComp SimplexCategoryᵒᵖ X.right F).hom })\n Y✝).hom)\n n✝ =\n NatTrans.app\n (((fun X =>\n { left := ((whiskering C D).obj F).obj (drop.obj X), right := F.obj (point.obj X),\n hom := whiskerRight X.hom F ≫ (Functor.constComp SimplexCategoryᵒᵖ X.right F).hom })\n X✝).hom ≫\n (const D).map (F.map η.right))\n n✝\n[PROOFSTEP]\ndsimp [whiskerRight]\n[GOAL]\ncase h\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : SimplicialObject C\nD : Type u_1\ninst✝ : Category.{?u.105136, u_1} D\nF : C ⥤ D\nX✝ Y✝ : Augmented C\nη : X✝ ⟶ Y✝\nn✝ : SimplexCategoryᵒᵖ\n⊢ F.map (NatTrans.app η.left n✝) ≫ F.map (NatTrans.app Y✝.hom n✝) ≫ 𝟙 (F.obj Y✝.right) =\n (F.map (NatTrans.app X✝.hom n✝) ≫ 𝟙 (F.obj X✝.right)) ≫ F.map η.right\n[PROOFSTEP]\nsimp only [Category.comp_id, ← F.map_comp, ← NatTrans.comp_app]\n[GOAL]\ncase h\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : SimplicialObject C\nD : Type u_1\ninst✝ : Category.{?u.105136, u_1} D\nF : C ⥤ D\nX✝ Y✝ : Augmented C\nη : X✝ ⟶ Y✝\nn✝ : SimplexCategoryᵒᵖ\n⊢ F.map (NatTrans.app (η.left ≫ Y✝.hom) n✝) = F.map (NatTrans.app X✝.hom n✝ ≫ η.right)\n[PROOFSTEP]\nerw [η.w]\n[GOAL]\ncase h\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : SimplicialObject C\nD : Type u_1\ninst✝ : Category.{?u.105136, u_1} D\nF : C ⥤ D\nX✝ Y✝ : Augmented C\nη : X✝ ⟶ Y✝\nn✝ : SimplexCategoryᵒᵖ\n⊢ F.map (NatTrans.app (X✝.hom ≫ (const C).map η.right) n✝) = F.map (NatTrans.app X✝.hom n✝ ≫ η.right)\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : SimplicialObject C\nD : Type u'\ninst✝ : Category.{v', u'} D\nX✝ Y✝ : C ⥤ D\nη : X✝ ⟶ Y✝\nA : Augmented C\n⊢ (𝟭 (SimplicialObject D)).map (whiskerLeft (drop.obj A) η) ≫ ((whiskeringObj C D Y✝).obj A).hom =\n ((whiskeringObj C D X✝).obj A).hom ≫ (const D).map (NatTrans.app η (point.obj A))\n[PROOFSTEP]\next n\n[GOAL]\ncase h\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : SimplicialObject C\nD : Type u'\ninst✝ : Category.{v', u'} D\nX✝ Y✝ : C ⥤ D\nη : X✝ ⟶ Y✝\nA : Augmented C\nn : SimplexCategoryᵒᵖ\n⊢ NatTrans.app ((𝟭 (SimplicialObject D)).map (whiskerLeft (drop.obj A) η) ≫ ((whiskeringObj C D Y✝).obj A).hom) n =\n NatTrans.app (((whiskeringObj C D X✝).obj A).hom ≫ (const D).map (NatTrans.app η (point.obj A))) n\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : SimplicialObject C\nD : Type u'\ninst✝ : Category.{v', u'} D\nX✝ Y✝ : C ⥤ D\nη : X✝ ⟶ Y✝\nA : Augmented C\nn : SimplexCategoryᵒᵖ\n⊢ NatTrans.app η (A.left.obj n) ≫ Y✝.map (NatTrans.app A.hom n) ≫ 𝟙 (Y✝.obj A.right) =\n (X✝.map (NatTrans.app A.hom n) ≫ 𝟙 (X✝.obj A.right)) ≫ NatTrans.app η A.right\n[PROOFSTEP]\nrw [Category.comp_id, Category.comp_id, η.naturality]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : SimplicialObject C\nD : Type u'\ninst✝ : Category.{v', u'} D\nX✝ Y✝ Z✝ : C ⥤ D\nx✝¹ : X✝ ⟶ Y✝\nx✝ : Y✝ ⟶ Z✝\n⊢ { obj := whiskeringObj C D,\n map := fun {X Y} η =>\n NatTrans.mk fun A => CommaMorphism.mk (whiskerLeft (drop.obj A) η) (NatTrans.app η (point.obj A)) }.map\n (x✝¹ ≫ x✝) =\n { obj := whiskeringObj C D,\n map := fun {X Y} η =>\n NatTrans.mk fun A => CommaMorphism.mk (whiskerLeft (drop.obj A) η) (NatTrans.app η (point.obj A)) }.map\n x✝¹ ≫\n { obj := whiskeringObj C D,\n map := fun {X Y} η =>\n NatTrans.mk fun A => CommaMorphism.mk (whiskerLeft (drop.obj A) η) (NatTrans.app η (point.obj A)) }.map\n x✝\n[PROOFSTEP]\next\n[GOAL]\ncase w.h.h₁.h\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : SimplicialObject C\nD : Type u'\ninst✝ : Category.{v', u'} D\nX✝ Y✝ Z✝ : C ⥤ D\nx✝² : X✝ ⟶ Y✝\nx✝¹ : Y✝ ⟶ Z✝\nx✝ : Augmented C\nn✝ : SimplexCategoryᵒᵖ\n⊢ NatTrans.app\n (NatTrans.app\n ({ obj := whiskeringObj C D,\n map := fun {X Y} η =>\n NatTrans.mk fun A =>\n CommaMorphism.mk (whiskerLeft (drop.obj A) η) (NatTrans.app η (point.obj A)) }.map\n (x✝² ≫ x✝¹))\n x✝).left\n n✝ =\n NatTrans.app\n (NatTrans.app\n ({ obj := whiskeringObj C D,\n map := fun {X Y} η =>\n NatTrans.mk fun A =>\n CommaMorphism.mk (whiskerLeft (drop.obj A) η) (NatTrans.app η (point.obj A)) }.map\n x✝² ≫\n { obj := whiskeringObj C D,\n map := fun {X Y} η =>\n NatTrans.mk fun A =>\n CommaMorphism.mk (whiskerLeft (drop.obj A) η) (NatTrans.app η (point.obj A)) }.map\n x✝¹)\n x✝).left\n n✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase w.h.h₂\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : SimplicialObject C\nD : Type u'\ninst✝ : Category.{v', u'} D\nX✝ Y✝ Z✝ : C ⥤ D\nx✝² : X✝ ⟶ Y✝\nx✝¹ : Y✝ ⟶ Z✝\nx✝ : Augmented C\n⊢ (NatTrans.app\n ({ obj := whiskeringObj C D,\n map := fun {X Y} η =>\n NatTrans.mk fun A => CommaMorphism.mk (whiskerLeft (drop.obj A) η) (NatTrans.app η (point.obj A)) }.map\n (x✝² ≫ x✝¹))\n x✝).right =\n (NatTrans.app\n ({ obj := whiskeringObj C D,\n map := fun {X Y} η =>\n NatTrans.mk fun A =>\n CommaMorphism.mk (whiskerLeft (drop.obj A) η) (NatTrans.app η (point.obj A)) }.map\n x✝² ≫\n { obj := whiskeringObj C D,\n map := fun {X Y} η =>\n NatTrans.mk fun A =>\n CommaMorphism.mk (whiskerLeft (drop.obj A) η) (NatTrans.app η (point.obj A)) }.map\n x✝¹)\n x✝).right\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ X : SimplicialObject C\nX₀ : C\nf : X.obj (op [0]) ⟶ X₀\nw : ∀ (i : SimplexCategory) (g₁ g₂ : [0] ⟶ i), X.map g₁.op ≫ f = X.map g₂.op ≫ f\n⊢ ∀ ⦃X_1 Y : SimplexCategoryᵒᵖ⦄ (f_1 : X_1 ⟶ Y),\n ((𝟭 (SimplicialObject C)).obj X).map f_1 ≫ (fun i => X.map (SimplexCategory.const i.unop 0).op ≫ f) Y =\n (fun i => X.map (SimplexCategory.const i.unop 0).op ≫ f) X_1 ≫ ((const C).obj X₀).map f_1\n[PROOFSTEP]\nintro i j g\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ X : SimplicialObject C\nX₀ : C\nf : X.obj (op [0]) ⟶ X₀\nw : ∀ (i : SimplexCategory) (g₁ g₂ : [0] ⟶ i), X.map g₁.op ≫ f = X.map g₂.op ≫ f\ni j : SimplexCategoryᵒᵖ\ng : i ⟶ j\n⊢ ((𝟭 (SimplicialObject C)).obj X).map g ≫ (fun i => X.map (SimplexCategory.const i.unop 0).op ≫ f) j =\n (fun i => X.map (SimplexCategory.const i.unop 0).op ≫ f) i ≫ ((const C).obj X₀).map g\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ X : SimplicialObject C\nX₀ : C\nf : X.obj (op [0]) ⟶ X₀\nw : ∀ (i : SimplexCategory) (g₁ g₂ : [0] ⟶ i), X.map g₁.op ≫ f = X.map g₂.op ≫ f\ni j : SimplexCategoryᵒᵖ\ng : i ⟶ j\n⊢ X.map g ≫ X.map (SimplexCategory.const j.unop 0).op ≫ f = (X.map (SimplexCategory.const i.unop 0).op ≫ f) ≫ 𝟙 X₀\n[PROOFSTEP]\nrw [← g.op_unop]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ X : SimplicialObject C\nX₀ : C\nf : X.obj (op [0]) ⟶ X₀\nw : ∀ (i : SimplexCategory) (g₁ g₂ : [0] ⟶ i), X.map g₁.op ≫ f = X.map g₂.op ≫ f\ni j : SimplexCategoryᵒᵖ\ng : i ⟶ j\n⊢ X.map g.unop.op ≫ X.map (SimplexCategory.const j.unop 0).op ≫ f =\n (X.map (SimplexCategory.const i.unop 0).op ≫ f) ≫ 𝟙 X₀\n[PROOFSTEP]\nsimpa only [← X.map_comp, ← Category.assoc, Category.comp_id, ← op_comp] using w _ _ _\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ X : SimplicialObject C\nX₀ : C\nf : X.obj (op [0]) ⟶ X₀\nw : ∀ (i : SimplexCategory) (g₁ g₂ : [0] ⟶ i), X.map g₁.op ≫ f = X.map g₂.op ≫ f\n⊢ NatTrans.app (augment X X₀ f w).hom (op [0]) = f\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ X : SimplicialObject C\nX₀ : C\nf : X.obj (op [0]) ⟶ X₀\nw : ∀ (i : SimplexCategory) (g₁ g₂ : [0] ⟶ i), X.map g₁.op ≫ f = X.map g₂.op ≫ f\n⊢ X.map (SimplexCategory.const [0] 0).op ≫ f = f\n[PROOFSTEP]\nrw [SimplexCategory.hom_zero_zero ([0].const 0), op_id, X.map_id, Category.id_comp]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\n⊢ Category.{?u.208707, max u v} (CosimplicialObject C)\n[PROOFSTEP]\ndsimp only [CosimplicialObject]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\n⊢ Category.{?u.208707, max u v} (SimplexCategory ⥤ C)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : HasLimitsOfShape J C\n⊢ HasLimitsOfShape J (CosimplicialObject C)\n[PROOFSTEP]\ndsimp [CosimplicialObject]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : HasLimitsOfShape J C\n⊢ HasLimitsOfShape J (SimplexCategory ⥤ C)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : HasColimitsOfShape J C\n⊢ HasColimitsOfShape J (CosimplicialObject C)\n[PROOFSTEP]\ndsimp [CosimplicialObject]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : HasColimitsOfShape J C\n⊢ HasColimitsOfShape J (SimplexCategory ⥤ C)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : CosimplicialObject C\nf g : X ⟶ Y\nh : ∀ (n : SimplexCategory), NatTrans.app f n = NatTrans.app g n\n⊢ f.app = g.app\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : CosimplicialObject C\nf g : X ⟶ Y\nh : ∀ (n : SimplexCategory), NatTrans.app f n = NatTrans.app g n\nx✝ : SimplexCategory\n⊢ NatTrans.app f x✝ = NatTrans.app g x✝\n[PROOFSTEP]\napply h\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : CosimplicialObject C\nn m : ℕ\nh : n = m\n⊢ [n] = [m]\n[PROOFSTEP]\nrw [h]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : CosimplicialObject C\nn : ℕ\nh : n = n\n⊢ eqToIso X h = Iso.refl (X.obj [n])\n[PROOFSTEP]\next\n[GOAL]\ncase w\nC : Type u\ninst✝ : Category.{v, u} C\nX : CosimplicialObject C\nn : ℕ\nh : n = n\n⊢ (eqToIso X h).hom = (Iso.refl (X.obj [n])).hom\n[PROOFSTEP]\nsimp [eqToIso]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : CosimplicialObject C\nn : ℕ\ni j : Fin (n + 2)\nH : i ≤ j\n⊢ δ X i ≫ δ X (Fin.succ j) = δ X j ≫ δ X (Fin.castSucc i)\n[PROOFSTEP]\ndsimp [δ]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : CosimplicialObject C\nn : ℕ\ni j : Fin (n + 2)\nH : i ≤ j\n⊢ X.map (SimplexCategory.δ i) ≫ X.map (SimplexCategory.δ (Fin.succ j)) =\n X.map (SimplexCategory.δ j) ≫ X.map (SimplexCategory.δ (Fin.castSucc i))\n[PROOFSTEP]\nsimp only [← X.map_comp, SimplexCategory.δ_comp_δ H]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : CosimplicialObject C\nn : ℕ\ni : Fin (n + 2)\nj : Fin (n + 3)\nH : Fin.castSucc i < j\nhj : j = 0\n⊢ False\n[PROOFSTEP]\nsimp only [hj, Fin.not_lt_zero] at H \n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : CosimplicialObject C\nn : ℕ\ni : Fin (n + 2)\nj : Fin (n + 3)\nH : Fin.castSucc i < j\n⊢ δ X i ≫ δ X j = δ X (Fin.pred j (_ : j = 0 → False)) ≫ δ X (Fin.castSucc i)\n[PROOFSTEP]\ndsimp [δ]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : CosimplicialObject C\nn : ℕ\ni : Fin (n + 2)\nj : Fin (n + 3)\nH : Fin.castSucc i < j\n⊢ X.map (SimplexCategory.δ i) ≫ X.map (SimplexCategory.δ j) =\n X.map (SimplexCategory.δ (Fin.pred j (_ : j = 0 → False))) ≫ X.map (SimplexCategory.δ (Fin.castSucc i))\n[PROOFSTEP]\nsimp only [← X.map_comp, ← op_comp, SimplexCategory.δ_comp_δ' H]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : CosimplicialObject C\nn : ℕ\ni : Fin (n + 3)\nj : Fin (n + 2)\nH : i ≤ Fin.castSucc j\n⊢ δ X (Fin.castLT i (_ : ↑i < n + 2)) ≫ δ X (Fin.succ j) = δ X j ≫ δ X i\n[PROOFSTEP]\ndsimp [δ]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : CosimplicialObject C\nn : ℕ\ni : Fin (n + 3)\nj : Fin (n + 2)\nH : i ≤ Fin.castSucc j\n⊢ X.map (SimplexCategory.δ (Fin.castLT i (_ : ↑i < n + 2))) ≫ X.map (SimplexCategory.δ (Fin.succ j)) =\n X.map (SimplexCategory.δ j) ≫ X.map (SimplexCategory.δ i)\n[PROOFSTEP]\nsimp only [← X.map_comp, ← op_comp, SimplexCategory.δ_comp_δ'' H]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : CosimplicialObject C\nn : ℕ\ni : Fin (n + 2)\n⊢ δ X i ≫ δ X (Fin.castSucc i) = δ X i ≫ δ X (Fin.succ i)\n[PROOFSTEP]\ndsimp [δ]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : CosimplicialObject C\nn : ℕ\ni : Fin (n + 2)\n⊢ X.map (SimplexCategory.δ i) ≫ X.map (SimplexCategory.δ (Fin.castSucc i)) =\n X.map (SimplexCategory.δ i) ≫ X.map (SimplexCategory.δ (Fin.succ i))\n[PROOFSTEP]\nsimp only [← X.map_comp, SimplexCategory.δ_comp_δ_self]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : CosimplicialObject C\nn : ℕ\ni : Fin (n + 2)\nj : Fin (n + 3)\nH : j = Fin.castSucc i\n⊢ δ X i ≫ δ X j = δ X i ≫ δ X (Fin.succ i)\n[PROOFSTEP]\nsubst H\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : CosimplicialObject C\nn : ℕ\ni : Fin (n + 2)\n⊢ δ X i ≫ δ X (Fin.castSucc i) = δ X i ≫ δ X (Fin.succ i)\n[PROOFSTEP]\nrw [δ_comp_δ_self]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : CosimplicialObject C\nn : ℕ\ni : Fin (n + 2)\nj : Fin (n + 1)\nH : i ≤ Fin.castSucc j\n⊢ δ X (Fin.castSucc i) ≫ σ X (Fin.succ j) = σ X j ≫ δ X i\n[PROOFSTEP]\ndsimp [δ, σ]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : CosimplicialObject C\nn : ℕ\ni : Fin (n + 2)\nj : Fin (n + 1)\nH : i ≤ Fin.castSucc j\n⊢ X.map (SimplexCategory.δ (Fin.castSucc i)) ≫ X.map (SimplexCategory.σ (Fin.succ j)) =\n X.map (SimplexCategory.σ j) ≫ X.map (SimplexCategory.δ i)\n[PROOFSTEP]\nsimp only [← X.map_comp, SimplexCategory.δ_comp_σ_of_le H]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : CosimplicialObject C\nn : ℕ\ni : Fin (n + 1)\n⊢ δ X (Fin.castSucc i) ≫ σ X i = 𝟙 (X.obj [n])\n[PROOFSTEP]\ndsimp [δ, σ]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : CosimplicialObject C\nn : ℕ\ni : Fin (n + 1)\n⊢ X.map (SimplexCategory.δ (Fin.castSucc i)) ≫ X.map (SimplexCategory.σ i) = 𝟙 (X.obj [n])\n[PROOFSTEP]\nsimp only [← X.map_comp, SimplexCategory.δ_comp_σ_self, X.map_id]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : CosimplicialObject C\nn : ℕ\nj : Fin (n + 2)\ni : Fin (n + 1)\nH : j = Fin.castSucc i\n⊢ δ X j ≫ σ X i = 𝟙 (X.obj [n])\n[PROOFSTEP]\nsubst H\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : CosimplicialObject C\nn : ℕ\ni : Fin (n + 1)\n⊢ δ X (Fin.castSucc i) ≫ σ X i = 𝟙 (X.obj [n])\n[PROOFSTEP]\nrw [δ_comp_σ_self]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : CosimplicialObject C\nn : ℕ\ni : Fin (n + 1)\n⊢ δ X (Fin.succ i) ≫ σ X i = 𝟙 (X.obj [n])\n[PROOFSTEP]\ndsimp [δ, σ]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : CosimplicialObject C\nn : ℕ\ni : Fin (n + 1)\n⊢ X.map (SimplexCategory.δ (Fin.succ i)) ≫ X.map (SimplexCategory.σ i) = 𝟙 (X.obj [n])\n[PROOFSTEP]\nsimp only [← X.map_comp, SimplexCategory.δ_comp_σ_succ, X.map_id]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : CosimplicialObject C\nn : ℕ\nj : Fin (n + 2)\ni : Fin (n + 1)\nH : j = Fin.succ i\n⊢ δ X j ≫ σ X i = 𝟙 (X.obj [n])\n[PROOFSTEP]\nsubst H\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : CosimplicialObject C\nn : ℕ\ni : Fin (n + 1)\n⊢ δ X (Fin.succ i) ≫ σ X i = 𝟙 (X.obj [n])\n[PROOFSTEP]\nrw [δ_comp_σ_succ]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : CosimplicialObject C\nn : ℕ\ni : Fin (n + 2)\nj : Fin (n + 1)\nH : Fin.castSucc j < i\n⊢ δ X (Fin.succ i) ≫ σ X (Fin.castSucc j) = σ X j ≫ δ X i\n[PROOFSTEP]\ndsimp [δ, σ]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : CosimplicialObject C\nn : ℕ\ni : Fin (n + 2)\nj : Fin (n + 1)\nH : Fin.castSucc j < i\n⊢ X.map (SimplexCategory.δ (Fin.succ i)) ≫ X.map (SimplexCategory.σ (Fin.castSucc j)) =\n X.map (SimplexCategory.σ j) ≫ X.map (SimplexCategory.δ i)\n[PROOFSTEP]\nsimp only [← X.map_comp, SimplexCategory.δ_comp_σ_of_gt H]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : CosimplicialObject C\nn : ℕ\ni : Fin (n + 3)\nj : Fin (n + 2)\nH : Fin.succ j < i\nhi : i = 0\n⊢ False\n[PROOFSTEP]\nsimp only [Fin.not_lt_zero, hi] at H \n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : CosimplicialObject C\nn : ℕ\ni : Fin (n + 3)\nj : Fin (n + 2)\nH : Fin.succ j < i\n⊢ δ X i ≫ σ X j = σ X (Fin.castLT j (_ : ↑j < n + 1)) ≫ δ X (Fin.pred i (_ : i = 0 → False))\n[PROOFSTEP]\ndsimp [δ, σ]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : CosimplicialObject C\nn : ℕ\ni : Fin (n + 3)\nj : Fin (n + 2)\nH : Fin.succ j < i\n⊢ X.map (SimplexCategory.δ i) ≫ X.map (SimplexCategory.σ j) =\n X.map (SimplexCategory.σ (Fin.castLT j (_ : ↑j < n + 1))) ≫\n X.map (SimplexCategory.δ (Fin.pred i (_ : i = 0 → False)))\n[PROOFSTEP]\nsimp only [← X.map_comp, ← op_comp, SimplexCategory.δ_comp_σ_of_gt' H]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : CosimplicialObject C\nn : ℕ\ni j : Fin (n + 1)\nH : i ≤ j\n⊢ σ X (Fin.castSucc i) ≫ σ X j = σ X (Fin.succ j) ≫ σ X i\n[PROOFSTEP]\ndsimp [δ, σ]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : CosimplicialObject C\nn : ℕ\ni j : Fin (n + 1)\nH : i ≤ j\n⊢ X.map (SimplexCategory.σ (Fin.castSucc i)) ≫ X.map (SimplexCategory.σ j) =\n X.map (SimplexCategory.σ (Fin.succ j)) ≫ X.map (SimplexCategory.σ i)\n[PROOFSTEP]\nsimp only [← X.map_comp, SimplexCategory.σ_comp_σ H]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : CosimplicialObject C\nn : ℕ\n⊢ Category.{?u.295628, max u v} (Truncated C n)\n[PROOFSTEP]\ndsimp [Truncated]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : CosimplicialObject C\nn : ℕ\n⊢ Category.{?u.295628, max u v} (SimplexCategory.Truncated n ⥤ C)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX : CosimplicialObject C\nn : ℕ\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : HasLimitsOfShape J C\n⊢ HasLimitsOfShape J (Truncated C n)\n[PROOFSTEP]\ndsimp [Truncated]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX : CosimplicialObject C\nn : ℕ\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : HasLimitsOfShape J C\n⊢ HasLimitsOfShape J (SimplexCategory.Truncated n ⥤ C)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX : CosimplicialObject C\nn : ℕ\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : HasColimitsOfShape J C\n⊢ HasColimitsOfShape J (Truncated C n)\n[PROOFSTEP]\ndsimp [Truncated]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX : CosimplicialObject C\nn : ℕ\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : HasColimitsOfShape J C\n⊢ HasColimitsOfShape J (SimplexCategory.Truncated n ⥤ C)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : CosimplicialObject C\n⊢ Category.{?u.303800, max u v} (Augmented C)\n[PROOFSTEP]\ndsimp only [Augmented]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : CosimplicialObject C\n⊢ Category.{?u.303800, max u v} (Comma (const C) (𝟭 (CosimplicialObject C)))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : CosimplicialObject C\nX✝ Y✝ : Augmented C\nη : X✝ ⟶ Y✝\n⊢ (𝟭 C).map (point.map η) ≫\n ((fun X => { left := point.obj X, right := (drop.obj X).obj [0], hom := NatTrans.app X.hom [0] }) Y✝).hom =\n ((fun X => { left := point.obj X, right := (drop.obj X).obj [0], hom := NatTrans.app X.hom [0] }) X✝).hom ≫\n (𝟭 C).map (NatTrans.app (drop.map η) [0])\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : CosimplicialObject C\nX✝ Y✝ : Augmented C\nη : X✝ ⟶ Y✝\n⊢ η.left ≫ NatTrans.app Y✝.hom [0] = NatTrans.app X✝.hom [0] ≫ NatTrans.app η.right [0]\n[PROOFSTEP]\nrw [← NatTrans.comp_app]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : CosimplicialObject C\nX✝ Y✝ : Augmented C\nη : X✝ ⟶ Y✝\n⊢ η.left ≫ NatTrans.app Y✝.hom [0] = NatTrans.app (X✝.hom ≫ η.right) [0]\n[PROOFSTEP]\nerw [← η.w]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : CosimplicialObject C\nX✝ Y✝ : Augmented C\nη : X✝ ⟶ Y✝\n⊢ η.left ≫ NatTrans.app Y✝.hom [0] = NatTrans.app ((const C).map η.left ≫ Y✝.hom) [0]\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : CosimplicialObject C\nD : Type u_1\ninst✝ : Category.{?u.334362, u_1} D\nF : C ⥤ D\nX✝ Y✝ : Augmented C\nη : X✝ ⟶ Y✝\n⊢ (const D).map (F.map η.left) ≫\n ((fun X =>\n { left := F.obj (point.obj X), right := ((whiskering C D).obj F).obj (drop.obj X),\n hom := (Functor.constComp SimplexCategory (point.obj X) F).inv ≫ whiskerRight X.hom F })\n Y✝).hom =\n ((fun X =>\n { left := F.obj (point.obj X), right := ((whiskering C D).obj F).obj (drop.obj X),\n hom := (Functor.constComp SimplexCategory (point.obj X) F).inv ≫ whiskerRight X.hom F })\n X✝).hom ≫\n (𝟭 (CosimplicialObject D)).map (whiskerRight η.right F)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : CosimplicialObject C\nD : Type u_1\ninst✝ : Category.{?u.334362, u_1} D\nF : C ⥤ D\nX✝ Y✝ : Augmented C\nη : X✝ ⟶ Y✝\nn✝ : SimplexCategory\n⊢ NatTrans.app\n ((const D).map (F.map η.left) ≫\n ((fun X =>\n { left := F.obj (point.obj X), right := ((whiskering C D).obj F).obj (drop.obj X),\n hom := (Functor.constComp SimplexCategory (point.obj X) F).inv ≫ whiskerRight X.hom F })\n Y✝).hom)\n n✝ =\n NatTrans.app\n (((fun X =>\n { left := F.obj (point.obj X), right := ((whiskering C D).obj F).obj (drop.obj X),\n hom := (Functor.constComp SimplexCategory (point.obj X) F).inv ≫ whiskerRight X.hom F })\n X✝).hom ≫\n (𝟭 (CosimplicialObject D)).map (whiskerRight η.right F))\n n✝\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : CosimplicialObject C\nD : Type u_1\ninst✝ : Category.{?u.334362, u_1} D\nF : C ⥤ D\nX✝ Y✝ : Augmented C\nη : X✝ ⟶ Y✝\nn✝ : SimplexCategory\n⊢ F.map η.left ≫ 𝟙 (F.obj Y✝.left) ≫ F.map (NatTrans.app Y✝.hom n✝) =\n (𝟙 (F.obj X✝.left) ≫ F.map (NatTrans.app X✝.hom n✝)) ≫ F.map (NatTrans.app η.right n✝)\n[PROOFSTEP]\nrw [Category.id_comp, Category.id_comp, ← F.map_comp, ← F.map_comp, ← NatTrans.comp_app]\n[GOAL]\ncase h\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : CosimplicialObject C\nD : Type u_1\ninst✝ : Category.{?u.334362, u_1} D\nF : C ⥤ D\nX✝ Y✝ : Augmented C\nη : X✝ ⟶ Y✝\nn✝ : SimplexCategory\n⊢ F.map (η.left ≫ NatTrans.app Y✝.hom n✝) = F.map (NatTrans.app (X✝.hom ≫ η.right) n✝)\n[PROOFSTEP]\nerw [← η.w]\n[GOAL]\ncase h\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : CosimplicialObject C\nD : Type u_1\ninst✝ : Category.{?u.334362, u_1} D\nF : C ⥤ D\nX✝ Y✝ : Augmented C\nη : X✝ ⟶ Y✝\nn✝ : SimplexCategory\n⊢ F.map (η.left ≫ NatTrans.app Y✝.hom n✝) = F.map (NatTrans.app ((const C).map η.left ≫ Y✝.hom) n✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : CosimplicialObject C\nD : Type u'\ninst✝ : Category.{v', u'} D\nX✝ Y✝ : C ⥤ D\nη : X✝ ⟶ Y✝\nA : Augmented C\n⊢ (const D).map (NatTrans.app η (point.obj A)) ≫ ((whiskeringObj C D Y✝).obj A).hom =\n ((whiskeringObj C D X✝).obj A).hom ≫ (𝟭 (CosimplicialObject D)).map (whiskerLeft (drop.obj A) η)\n[PROOFSTEP]\next n\n[GOAL]\ncase h\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : CosimplicialObject C\nD : Type u'\ninst✝ : Category.{v', u'} D\nX✝ Y✝ : C ⥤ D\nη : X✝ ⟶ Y✝\nA : Augmented C\nn : SimplexCategory\n⊢ NatTrans.app ((const D).map (NatTrans.app η (point.obj A)) ≫ ((whiskeringObj C D Y✝).obj A).hom) n =\n NatTrans.app (((whiskeringObj C D X✝).obj A).hom ≫ (𝟭 (CosimplicialObject D)).map (whiskerLeft (drop.obj A) η)) n\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : CosimplicialObject C\nD : Type u'\ninst✝ : Category.{v', u'} D\nX✝ Y✝ : C ⥤ D\nη : X✝ ⟶ Y✝\nA : Augmented C\nn : SimplexCategory\n⊢ NatTrans.app η A.left ≫ 𝟙 (Y✝.obj A.left) ≫ Y✝.map (NatTrans.app A.hom n) =\n (𝟙 (X✝.obj A.left) ≫ X✝.map (NatTrans.app A.hom n)) ≫ NatTrans.app η (A.right.obj n)\n[PROOFSTEP]\nrw [Category.id_comp, Category.id_comp, η.naturality]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : CosimplicialObject C\nD : Type u'\ninst✝ : Category.{v', u'} D\nX✝ Y✝ : C ⥤ D\nη : X✝ ⟶ Y✝\nx✝¹ x✝ : Augmented C\nf : x✝¹ ⟶ x✝\n⊢ (whiskeringObj C D X✝).map f ≫\n (fun A => CommaMorphism.mk (NatTrans.app η (point.obj A)) (whiskerLeft (drop.obj A) η)) x✝ =\n (fun A => CommaMorphism.mk (NatTrans.app η (point.obj A)) (whiskerLeft (drop.obj A) η)) x✝¹ ≫\n (whiskeringObj C D Y✝).map f\n[PROOFSTEP]\next\n[GOAL]\ncase h₁\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : CosimplicialObject C\nD : Type u'\ninst✝ : Category.{v', u'} D\nX✝ Y✝ : C ⥤ D\nη : X✝ ⟶ Y✝\nx✝¹ x✝ : Augmented C\nf : x✝¹ ⟶ x✝\n⊢ ((whiskeringObj C D X✝).map f ≫\n (fun A => CommaMorphism.mk (NatTrans.app η (point.obj A)) (whiskerLeft (drop.obj A) η)) x✝).left =\n ((fun A => CommaMorphism.mk (NatTrans.app η (point.obj A)) (whiskerLeft (drop.obj A) η)) x✝¹ ≫\n (whiskeringObj C D Y✝).map f).left\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h₂.h\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : CosimplicialObject C\nD : Type u'\ninst✝ : Category.{v', u'} D\nX✝ Y✝ : C ⥤ D\nη : X✝ ⟶ Y✝\nx✝¹ x✝ : Augmented C\nf : x✝¹ ⟶ x✝\nn✝ : SimplexCategory\n⊢ NatTrans.app\n ((whiskeringObj C D X✝).map f ≫\n (fun A => CommaMorphism.mk (NatTrans.app η (point.obj A)) (whiskerLeft (drop.obj A) η)) x✝).right\n n✝ =\n NatTrans.app\n ((fun A => CommaMorphism.mk (NatTrans.app η (point.obj A)) (whiskerLeft (drop.obj A) η)) x✝¹ ≫\n (whiskeringObj C D Y✝).map f).right\n n✝\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h₁\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : CosimplicialObject C\nD : Type u'\ninst✝ : Category.{v', u'} D\nX✝ Y✝ : C ⥤ D\nη : X✝ ⟶ Y✝\nx✝¹ x✝ : Augmented C\nf : x✝¹ ⟶ x✝\n⊢ X✝.map f.left ≫ NatTrans.app η x✝.left = NatTrans.app η x✝¹.left ≫ Y✝.map f.left\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h₂.h\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : CosimplicialObject C\nD : Type u'\ninst✝ : Category.{v', u'} D\nX✝ Y✝ : C ⥤ D\nη : X✝ ⟶ Y✝\nx✝¹ x✝ : Augmented C\nf : x✝¹ ⟶ x✝\nn✝ : SimplexCategory\n⊢ X✝.map (NatTrans.app f.right n✝) ≫ NatTrans.app η (x✝.right.obj n✝) =\n NatTrans.app η (x✝¹.right.obj n✝) ≫ Y✝.map (NatTrans.app f.right n✝)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ X : CosimplicialObject C\nX₀ : C\nf : X₀ ⟶ X.obj [0]\nw : ∀ (i : SimplexCategory) (g₁ g₂ : [0] ⟶ i), f ≫ X.map g₁ = f ≫ X.map g₂\n⊢ ∀ ⦃X_1 Y : SimplexCategory⦄ (f_1 : X_1 ⟶ Y),\n ((const C).obj X₀).map f_1 ≫ (fun i => f ≫ X.map (SimplexCategory.const i 0)) Y =\n (fun i => f ≫ X.map (SimplexCategory.const i 0)) X_1 ≫ ((𝟭 (CosimplicialObject C)).obj X).map f_1\n[PROOFSTEP]\nintro i j g\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ X : CosimplicialObject C\nX₀ : C\nf : X₀ ⟶ X.obj [0]\nw : ∀ (i : SimplexCategory) (g₁ g₂ : [0] ⟶ i), f ≫ X.map g₁ = f ≫ X.map g₂\ni j : SimplexCategory\ng : i ⟶ j\n⊢ ((const C).obj X₀).map g ≫ (fun i => f ≫ X.map (SimplexCategory.const i 0)) j =\n (fun i => f ≫ X.map (SimplexCategory.const i 0)) i ≫ ((𝟭 (CosimplicialObject C)).obj X).map g\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ X : CosimplicialObject C\nX₀ : C\nf : X₀ ⟶ X.obj [0]\nw : ∀ (i : SimplexCategory) (g₁ g₂ : [0] ⟶ i), f ≫ X.map g₁ = f ≫ X.map g₂\ni j : SimplexCategory\ng : i ⟶ j\n⊢ 𝟙 X₀ ≫ f ≫ X.map (SimplexCategory.const j 0) = (f ≫ X.map (SimplexCategory.const i 0)) ≫ X.map g\n[PROOFSTEP]\nsimpa [← X.map_comp] using w _ _ _\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ X : CosimplicialObject C\nX₀ : C\nf : X₀ ⟶ X.obj [0]\nw : ∀ (i : SimplexCategory) (g₁ g₂ : [0] ⟶ i), f ≫ X.map g₁ = f ≫ X.map g₂\n⊢ NatTrans.app (augment X X₀ f w).hom [0] = f\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ X : CosimplicialObject C\nX₀ : C\nf : X₀ ⟶ X.obj [0]\nw : ∀ (i : SimplexCategory) (g₁ g₂ : [0] ⟶ i), f ≫ X.map g₁ = f ≫ X.map g₂\n⊢ f ≫ X.map (SimplexCategory.const [0] 0) = f\n[PROOFSTEP]\nrw [SimplexCategory.hom_zero_zero ([0].const 0), X.map_id, Category.comp_id]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : Augmented C\n⊢ (CosimplicialObject.Augmented.leftOp (rightOp X)).right = X.right\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : Augmented Cᵒᵖ\n⊢ (SimplicialObject.Augmented.rightOp (leftOp X)).left = X.left\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ : (SimplicialObject.Augmented C)ᵒᵖ\nf : X✝ ⟶ Y✝\n⊢ (CosimplicialObject.const Cᵒᵖ).map f.unop.right.op ≫ ((fun X => SimplicialObject.Augmented.rightOp X.unop) Y✝).hom =\n ((fun X => SimplicialObject.Augmented.rightOp X.unop) X✝).hom ≫\n (𝟭 (CosimplicialObject Cᵒᵖ)).map (NatTrans.rightOp f.unop.left)\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ : (SimplicialObject.Augmented C)ᵒᵖ\nf : X✝ ⟶ Y✝\nx : SimplexCategory\n⊢ NatTrans.app\n ((CosimplicialObject.const Cᵒᵖ).map f.unop.right.op ≫\n ((fun X => SimplicialObject.Augmented.rightOp X.unop) Y✝).hom)\n x =\n NatTrans.app\n (((fun X => SimplicialObject.Augmented.rightOp X.unop) X✝).hom ≫\n (𝟭 (CosimplicialObject Cᵒᵖ)).map (NatTrans.rightOp f.unop.left))\n x\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ : (SimplicialObject.Augmented C)ᵒᵖ\nf : X✝ ⟶ Y✝\nx : SimplexCategory\n⊢ f.unop.right.op ≫ (NatTrans.app Y✝.unop.hom (op x)).op =\n (NatTrans.app X✝.unop.hom (op x)).op ≫ (NatTrans.app f.unop.left (op x)).op\n[PROOFSTEP]\nsimp_rw [← op_comp]\n[GOAL]\ncase h\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ : (SimplicialObject.Augmented C)ᵒᵖ\nf : X✝ ⟶ Y✝\nx : SimplexCategory\n⊢ (NatTrans.app Y✝.unop.hom (op x) ≫ f.unop.right).op =\n (NatTrans.app f.unop.left (op x) ≫ NatTrans.app X✝.unop.hom (op x)).op\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase h.e_f\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ : (SimplicialObject.Augmented C)ᵒᵖ\nf : X✝ ⟶ Y✝\nx : SimplexCategory\n⊢ NatTrans.app Y✝.unop.hom (op x) ≫ f.unop.right = NatTrans.app f.unop.left (op x) ≫ NatTrans.app X✝.unop.hom (op x)\n[PROOFSTEP]\nexact (congr_app f.unop.w (op x)).symm\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ : CosimplicialObject.Augmented Cᵒᵖ\nf : X✝ ⟶ Y✝\n⊢ (𝟭 (SimplicialObject C)).map (NatTrans.leftOp f.right) ≫ (CosimplicialObject.Augmented.leftOp X✝).hom =\n (CosimplicialObject.Augmented.leftOp Y✝).hom ≫ (SimplicialObject.const C).map f.left.unop\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ : CosimplicialObject.Augmented Cᵒᵖ\nf : X✝ ⟶ Y✝\nx : SimplexCategoryᵒᵖ\n⊢ NatTrans.app ((𝟭 (SimplicialObject C)).map (NatTrans.leftOp f.right) ≫ (CosimplicialObject.Augmented.leftOp X✝).hom)\n x =\n NatTrans.app ((CosimplicialObject.Augmented.leftOp Y✝).hom ≫ (SimplicialObject.const C).map f.left.unop) x\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ : CosimplicialObject.Augmented Cᵒᵖ\nf : X✝ ⟶ Y✝\nx : SimplexCategoryᵒᵖ\n⊢ (NatTrans.app f.right x.unop).unop ≫ (NatTrans.app X✝.hom x.unop).unop =\n (NatTrans.app Y✝.hom x.unop).unop ≫ f.left.unop\n[PROOFSTEP]\nsimp_rw [← unop_comp]\n[GOAL]\ncase h\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ : CosimplicialObject.Augmented Cᵒᵖ\nf : X✝ ⟶ Y✝\nx : SimplexCategoryᵒᵖ\n⊢ (NatTrans.app X✝.hom x.unop ≫ NatTrans.app f.right x.unop).unop = (f.left ≫ NatTrans.app Y✝.hom x.unop).unop\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase h.e_f\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ : CosimplicialObject.Augmented Cᵒᵖ\nf : X✝ ⟶ Y✝\nx : SimplexCategoryᵒᵖ\n⊢ NatTrans.app X✝.hom x.unop ≫ NatTrans.app f.right x.unop = f.left ≫ NatTrans.app Y✝.hom x.unop\n[PROOFSTEP]\nexact (congr_app f.w (unop x)).symm\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ : (SimplicialObject.Augmented C)ᵒᵖ\nf : X✝ ⟶ Y✝\n⊢ (𝟭 (SimplicialObject.Augmented C)ᵒᵖ).map f ≫\n ((fun X => Iso.op (SimplicialObject.Augmented.rightOpLeftOpIso X.unop)) Y✝).hom =\n ((fun X => Iso.op (SimplicialObject.Augmented.rightOpLeftOpIso X.unop)) X✝).hom ≫\n (simplicialToCosimplicialAugmented C ⋙ cosimplicialToSimplicialAugmented C).map f\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ : (SimplicialObject.Augmented C)ᵒᵖ\nf : X✝ ⟶ Y✝\n⊢ f ≫ (SimplicialObject.Augmented.rightOpLeftOpIso Y✝.unop).hom.op =\n (SimplicialObject.Augmented.rightOpLeftOpIso X✝.unop).hom.op ≫\n (CommaMorphism.mk (NatTrans.leftOp (NatTrans.rightOp f.unop.left)) f.unop.right).op\n[PROOFSTEP]\nrw [← f.op_unop]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ : (SimplicialObject.Augmented C)ᵒᵖ\nf : X✝ ⟶ Y✝\n⊢ f.unop.op ≫ (SimplicialObject.Augmented.rightOpLeftOpIso Y✝.unop).hom.op =\n (SimplicialObject.Augmented.rightOpLeftOpIso X✝.unop).hom.op ≫\n (CommaMorphism.mk (NatTrans.leftOp (NatTrans.rightOp f.unop.op.unop.left)) f.unop.op.unop.right).op\n[PROOFSTEP]\nsimp_rw [← op_comp]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ : (SimplicialObject.Augmented C)ᵒᵖ\nf : X✝ ⟶ Y✝\n⊢ ((SimplicialObject.Augmented.rightOpLeftOpIso Y✝.unop).hom ≫ f.unop).op =\n (CommaMorphism.mk (NatTrans.leftOp (NatTrans.rightOp f.unop.op.unop.left)) f.unop.op.unop.right ≫\n (SimplicialObject.Augmented.rightOpLeftOpIso X✝.unop).hom).op\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_f\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ : (SimplicialObject.Augmented C)ᵒᵖ\nf : X✝ ⟶ Y✝\n⊢ (SimplicialObject.Augmented.rightOpLeftOpIso Y✝.unop).hom ≫ f.unop =\n CommaMorphism.mk (NatTrans.leftOp (NatTrans.rightOp f.unop.op.unop.left)) f.unop.op.unop.right ≫\n (SimplicialObject.Augmented.rightOpLeftOpIso X✝.unop).hom\n[PROOFSTEP]\naesop_cat\n", "meta": {"mathlib_filename": "Mathlib.AlgebraicTopology.SimplicialObject", "llama_tokens": 23094, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO", "lm_q1_score": 0.44939263446475963, "lm_q2_score": 0.024423087568798994, "lm_q1q2_score": 0.010975555664306101}} {"text": "[GOAL]\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nα : Type u_1\nx : Option α\n⊢ Option.traverse pure x = x\n[PROOFSTEP]\ncases x\n[GOAL]\ncase none\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nα : Type u_1\n⊢ Option.traverse pure none = none\n[PROOFSTEP]\nrfl\n[GOAL]\ncase some\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nα : Type u_1\nval✝ : α\n⊢ Option.traverse pure (some val✝) = some val✝\n[PROOFSTEP]\nrfl\n[GOAL]\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nα : Type u_1\nβ γ : Type u\nf : β → F γ\ng : α → G β\nx : Option α\n⊢ Option.traverse (Comp.mk ∘ (fun x x_1 => x <$> x_1) f ∘ g) x = Comp.mk (Option.traverse f <$> Option.traverse g x)\n[PROOFSTEP]\ncases x\n[GOAL]\ncase none\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nα : Type u_1\nβ γ : Type u\nf : β → F γ\ng : α → G β\n⊢ Option.traverse (Comp.mk ∘ (fun x x_1 => x <$> x_1) f ∘ g) none =\n Comp.mk (Option.traverse f <$> Option.traverse g none)\n[PROOFSTEP]\nsimp! [functor_norm]\n[GOAL]\ncase some\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nα : Type u_1\nβ γ : Type u\nf : β → F γ\ng : α → G β\nval✝ : α\n⊢ Option.traverse (Comp.mk ∘ (fun x x_1 => x <$> x_1) f ∘ g) (some val✝) =\n Comp.mk (Option.traverse f <$> Option.traverse g (some val✝))\n[PROOFSTEP]\nsimp! [functor_norm]\n[GOAL]\ncase none\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nα : Type u_1\nβ γ : Type u\nf : β → F γ\ng : α → G β\n⊢ pure none = Comp.mk (pure (pure none))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase some\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nα : Type u_1\nβ γ : Type u\nf : β → F γ\ng : α → G β\nval✝ : α\n⊢ Comp.mk (((fun x => some <$> x) ∘ f) <$> g val✝) = Comp.mk ((Option.traverse f ∘ some) <$> g val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nα β : Type u_1\nf : α → β\nx : Option α\n⊢ Option.traverse (pure ∘ f) x = pure (f <$> x)\n[PROOFSTEP]\ncases x\n[GOAL]\ncase none\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nα β : Type u_1\nf : α → β\n⊢ Option.traverse (pure ∘ f) none = pure (f <$> none)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase some\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nα β : Type u_1\nf : α → β\nval✝ : α\n⊢ Option.traverse (pure ∘ f) (some val✝) = pure (f <$> some val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nη : ApplicativeTransformation F G\nα : Type u_1\nβ : Type u\nf : α → F β\nx : Option α\n⊢ (fun {α} => ApplicativeTransformation.app η α) (Option.traverse f x) =\n Option.traverse ((fun {α} => ApplicativeTransformation.app η α) ∘ f) x\n[PROOFSTEP]\ncases' x with x\n[GOAL]\ncase none\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nη : ApplicativeTransformation F G\nα : Type u_1\nβ : Type u\nf : α → F β\n⊢ (fun {α} => ApplicativeTransformation.app η α) (Option.traverse f none) =\n Option.traverse ((fun {α} => ApplicativeTransformation.app η α) ∘ f) none\n[PROOFSTEP]\nsimp! [*, functor_norm, ApplicativeTransformation.preserves_map, ApplicativeTransformation.preserves_seq,\n ApplicativeTransformation.preserves_pure]\n[GOAL]\ncase some\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nη : ApplicativeTransformation F G\nα : Type u_1\nβ : Type u\nf : α → F β\nx : α\n⊢ (fun {α} => ApplicativeTransformation.app η α) (Option.traverse f (some x)) =\n Option.traverse ((fun {α} => ApplicativeTransformation.app η α) ∘ f) (some x)\n[PROOFSTEP]\nsimp! [*, functor_norm, ApplicativeTransformation.preserves_map, ApplicativeTransformation.preserves_seq,\n ApplicativeTransformation.preserves_pure]\n[GOAL]\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nα : Type u_1\nxs : List α\n⊢ List.traverse pure xs = xs\n[PROOFSTEP]\ninduction xs\n[GOAL]\ncase nil\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nα : Type u_1\n⊢ List.traverse pure [] = []\n[PROOFSTEP]\nsimp! [*, List.traverse, functor_norm]\n[GOAL]\ncase cons\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nα : Type u_1\nhead✝ : α\ntail✝ : List α\ntail_ih✝ : List.traverse pure tail✝ = tail✝\n⊢ List.traverse pure (head✝ :: tail✝) = head✝ :: tail✝\n[PROOFSTEP]\nsimp! [*, List.traverse, functor_norm]\n[GOAL]\ncase cons\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nα : Type u_1\nhead✝ : α\ntail✝ : List α\ntail_ih✝ : List.traverse pure tail✝ = tail✝\n⊢ (Seq.seq (cons head✝) fun x => tail✝) = head✝ :: tail✝\n[PROOFSTEP]\nrfl\n[GOAL]\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nα : Type u_1\nβ γ : Type u\nf : β → F γ\ng : α → G β\nx : List α\n⊢ List.traverse (Comp.mk ∘ (fun x x_1 => x <$> x_1) f ∘ g) x = Comp.mk (List.traverse f <$> List.traverse g x)\n[PROOFSTEP]\ninduction x\n[GOAL]\ncase nil\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nα : Type u_1\nβ γ : Type u\nf : β → F γ\ng : α → G β\n⊢ List.traverse (Comp.mk ∘ (fun x x_1 => x <$> x_1) f ∘ g) [] = Comp.mk (List.traverse f <$> List.traverse g [])\n[PROOFSTEP]\nsimp! [*, functor_norm]\n[GOAL]\ncase cons\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nα : Type u_1\nβ γ : Type u\nf : β → F γ\ng : α → G β\nhead✝ : α\ntail✝ : List α\ntail_ih✝ :\n List.traverse (Comp.mk ∘ (fun x x_1 => x <$> x_1) f ∘ g) tail✝ = Comp.mk (List.traverse f <$> List.traverse g tail✝)\n⊢ List.traverse (Comp.mk ∘ (fun x x_1 => x <$> x_1) f ∘ g) (head✝ :: tail✝) =\n Comp.mk (List.traverse f <$> List.traverse g (head✝ :: tail✝))\n[PROOFSTEP]\nsimp! [*, functor_norm]\n[GOAL]\ncase nil\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nα : Type u_1\nβ γ : Type u\nf : β → F γ\ng : α → G β\n⊢ pure [] = Comp.mk (pure (pure []))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nα : Type u_1\nβ γ : Type u\nf : β → F γ\ng : α → G β\nhead✝ : α\ntail✝ : List α\ntail_ih✝ :\n List.traverse (Comp.mk ∘ (fun x x_1 => x <$> x_1) f ∘ g) tail✝ = Comp.mk (List.traverse f <$> List.traverse g tail✝)\n⊢ Comp.mk\n (Seq.seq\n (((fun x => x ∘ List.traverse f) ∘ (fun x x_1 => Seq.seq x fun x => x_1) ∘ (fun x => cons <$> x) ∘ f) <$>\n g head✝)\n fun x => List.traverse g tail✝) =\n Comp.mk (Seq.seq (((fun x => List.traverse f ∘ x) ∘ cons) <$> g head✝) fun x => List.traverse g tail✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nα β : Type u_1\nf : α → β\nx : List α\n⊢ List.traverse (pure ∘ f) x = pure (f <$> x)\n[PROOFSTEP]\ninduction x\n[GOAL]\ncase nil\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nα β : Type u_1\nf : α → β\n⊢ List.traverse (pure ∘ f) [] = pure (f <$> [])\n[PROOFSTEP]\nsimp! [*, functor_norm]\n[GOAL]\ncase cons\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nα β : Type u_1\nf : α → β\nhead✝ : α\ntail✝ : List α\ntail_ih✝ : List.traverse (pure ∘ f) tail✝ = pure (f <$> tail✝)\n⊢ List.traverse (pure ∘ f) (head✝ :: tail✝) = pure (f <$> (head✝ :: tail✝))\n[PROOFSTEP]\nsimp! [*, functor_norm]\n[GOAL]\ncase cons\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nα β : Type u_1\nf : α → β\nhead✝ : α\ntail✝ : List α\ntail_ih✝ : List.traverse (pure ∘ f) tail✝ = pure (f <$> tail✝)\n⊢ (Seq.seq (cons (f head✝)) fun x => map f tail✝) = f head✝ :: map f tail✝\n[PROOFSTEP]\nrfl\n[GOAL]\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nη : ApplicativeTransformation F G\nα : Type u_1\nβ : Type u\nf : α → F β\nx : List α\n⊢ (fun {α} => ApplicativeTransformation.app η α) (List.traverse f x) =\n List.traverse ((fun {α} => ApplicativeTransformation.app η α) ∘ f) x\n[PROOFSTEP]\ninduction x\n[GOAL]\ncase nil\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nη : ApplicativeTransformation F G\nα : Type u_1\nβ : Type u\nf : α → F β\n⊢ (fun {α} => ApplicativeTransformation.app η α) (List.traverse f []) =\n List.traverse ((fun {α} => ApplicativeTransformation.app η α) ∘ f) []\n[PROOFSTEP]\nsimp! [*, functor_norm, ApplicativeTransformation.preserves_map, ApplicativeTransformation.preserves_seq,\n ApplicativeTransformation.preserves_pure]\n[GOAL]\ncase cons\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nη : ApplicativeTransformation F G\nα : Type u_1\nβ : Type u\nf : α → F β\nhead✝ : α\ntail✝ : List α\ntail_ih✝ :\n (fun {α} => ApplicativeTransformation.app η α) (List.traverse f tail✝) =\n List.traverse ((fun {α} => ApplicativeTransformation.app η α) ∘ f) tail✝\n⊢ (fun {α} => ApplicativeTransformation.app η α) (List.traverse f (head✝ :: tail✝)) =\n List.traverse ((fun {α} => ApplicativeTransformation.app η α) ∘ f) (head✝ :: tail✝)\n[PROOFSTEP]\nsimp! [*, functor_norm, ApplicativeTransformation.preserves_map, ApplicativeTransformation.preserves_seq,\n ApplicativeTransformation.preserves_pure]\n[GOAL]\nF G : Type u → Type u\ninst✝² : Applicative F\ninst✝¹ : Applicative G\nα' β' : Type u\nf : α' → F β'\ninst✝ : LawfulApplicative F\nbs : List α'\n⊢ traverse f ([] ++ bs) = Seq.seq ((fun x x_1 => x ++ x_1) <$> traverse f []) fun x => traverse f bs\n[PROOFSTEP]\nsimp [functor_norm]\n[GOAL]\nF G : Type u → Type u\ninst✝² : Applicative F\ninst✝¹ : Applicative G\nα' β' : Type u\nf : α' → F β'\ninst✝ : LawfulApplicative F\na : α'\nas bs : List α'\n⊢ traverse f (a :: as ++ bs) = Seq.seq ((fun x x_1 => x ++ x_1) <$> traverse f (a :: as)) fun x => traverse f bs\n[PROOFSTEP]\nsimp [traverse_append as bs, functor_norm]\n[GOAL]\nF G : Type u → Type u\ninst✝² : Applicative F\ninst✝¹ : Applicative G\nα' β' : Type u\nf : α' → F β'\ninst✝ : LawfulApplicative F\na : α'\nas bs : List α'\n⊢ (Seq.seq\n (Seq.seq (((fun x => x ∘ fun x x_1 => x ++ x_1) ∘ Function.comp ∘ fun x x_1 => x :: x_1) <$> f a) fun x =>\n traverse f as)\n fun x => traverse f bs) =\n Seq.seq (Seq.seq (((fun x => (fun x x_1 => x ++ x_1) ∘ x) ∘ fun x x_1 => x :: x_1) <$> f a) fun x => traverse f as)\n fun x => traverse f bs\n[PROOFSTEP]\ncongr\n[GOAL]\nF G : Type u → Type u\ninst✝² : Applicative F\ninst✝¹ : Applicative G\nα' β' : Type u\nf✝ : α' → F β'\ninst✝ : LawfulApplicative F\nf : α' → Set β'\n⊢ [] ∈ traverse f [] ↔ Forall₂ (fun b a => b ∈ f a) [] []\n[PROOFSTEP]\nsimp\n[GOAL]\nF G : Type u → Type u\ninst✝² : Applicative F\ninst✝¹ : Applicative G\nα' β' : Type u\nf✝ : α' → F β'\ninst✝ : LawfulApplicative F\nf : α' → Set β'\na : α'\nas : List α'\n⊢ [] ∈ traverse f (a :: as) ↔ Forall₂ (fun b a => b ∈ f a) [] (a :: as)\n[PROOFSTEP]\nsimp\n[GOAL]\nF G : Type u → Type u\ninst✝² : Applicative F\ninst✝¹ : Applicative G\nα' β' : Type u\nf✝ : α' → F β'\ninst✝ : LawfulApplicative F\nf : α' → Set β'\nb : β'\nbs : List β'\n⊢ b :: bs ∈ traverse f [] ↔ Forall₂ (fun b a => b ∈ f a) (b :: bs) []\n[PROOFSTEP]\nsimp\n[GOAL]\nF G : Type u → Type u\ninst✝² : Applicative F\ninst✝¹ : Applicative G\nα' β' : Type u\nf✝ : α' → F β'\ninst✝ : LawfulApplicative F\nf : α' → Set β'\na : α'\nas : List α'\nb : β'\nbs : List β'\n⊢ b :: bs ∈ traverse f (a :: as) ↔ Forall₂ (fun b a => b ∈ f a) (b :: bs) (a :: as)\n[PROOFSTEP]\nsimp [mem_traverse as bs]\n[GOAL]\nσ : Type u\nF G : Type u → Type u\ninst✝¹ : Applicative F\ninst✝ : Applicative G\nα β γ : Type u\ng : α → β\nf : β → G γ\nx : σ ⊕ α\n⊢ Sum.traverse f (g <$> x) = Sum.traverse (f ∘ g) x\n[PROOFSTEP]\ncases x\n[GOAL]\ncase inl\nσ : Type u\nF G : Type u → Type u\ninst✝¹ : Applicative F\ninst✝ : Applicative G\nα β γ : Type u\ng : α → β\nf : β → G γ\nval✝ : σ\n⊢ Sum.traverse f (g <$> inl val✝) = Sum.traverse (f ∘ g) (inl val✝)\n[PROOFSTEP]\nsimp [Sum.traverse, id_map, functor_norm]\n[GOAL]\ncase inr\nσ : Type u\nF G : Type u → Type u\ninst✝¹ : Applicative F\ninst✝ : Applicative G\nα β γ : Type u\ng : α → β\nf : β → G γ\nval✝ : α\n⊢ Sum.traverse f (g <$> inr val✝) = Sum.traverse (f ∘ g) (inr val✝)\n[PROOFSTEP]\nsimp [Sum.traverse, id_map, functor_norm]\n[GOAL]\ncase inl\nσ : Type u\nF G : Type u → Type u\ninst✝¹ : Applicative F\ninst✝ : Applicative G\nα β γ : Type u\ng : α → β\nf : β → G γ\nval✝ : σ\n⊢ (match g <$> inl val✝ with\n | inl x => pure (inl x)\n | inr x => inr <$> f x) =\n pure (inl val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inr\nσ : Type u\nF G : Type u → Type u\ninst✝¹ : Applicative F\ninst✝ : Applicative G\nα β γ : Type u\ng : α → β\nf : β → G γ\nval✝ : α\n⊢ (match g <$> inr val✝ with\n | inl x => pure (inl x)\n | inr x => inr <$> f x) =\n inr <$> f (g val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nσ✝ : Type u\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nσ α : Type u_1\nx : σ ⊕ α\n⊢ Sum.traverse pure x = x\n[PROOFSTEP]\ncases x\n[GOAL]\ncase inl\nσ✝ : Type u\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nσ α : Type u_1\nval✝ : σ\n⊢ Sum.traverse pure (inl val✝) = inl val✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inr\nσ✝ : Type u\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nσ α : Type u_1\nval✝ : α\n⊢ Sum.traverse pure (inr val✝) = inr val✝\n[PROOFSTEP]\nrfl\n[GOAL]\nσ : Type u\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nα β γ : Type u\nf : β → F γ\ng : α → G β\nx : σ ⊕ α\n⊢ Sum.traverse (Comp.mk ∘ (fun x x_1 => x <$> x_1) f ∘ g) x = Comp.mk (Sum.traverse f <$> Sum.traverse g x)\n[PROOFSTEP]\ncases x\n[GOAL]\ncase inl\nσ : Type u\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nα β γ : Type u\nf : β → F γ\ng : α → G β\nval✝ : σ\n⊢ Sum.traverse (Comp.mk ∘ (fun x x_1 => x <$> x_1) f ∘ g) (inl val✝) =\n Comp.mk (Sum.traverse f <$> Sum.traverse g (inl val✝))\n[PROOFSTEP]\nsimp! [Sum.traverse, map_id, functor_norm]\n[GOAL]\ncase inr\nσ : Type u\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nα β γ : Type u\nf : β → F γ\ng : α → G β\nval✝ : α\n⊢ Sum.traverse (Comp.mk ∘ (fun x x_1 => x <$> x_1) f ∘ g) (inr val✝) =\n Comp.mk (Sum.traverse f <$> Sum.traverse g (inr val✝))\n[PROOFSTEP]\nsimp! [Sum.traverse, map_id, functor_norm]\n[GOAL]\ncase inl\nσ : Type u\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nα β γ : Type u\nf : β → F γ\ng : α → G β\nval✝ : σ\n⊢ pure (inl val✝) = Comp.mk (pure (pure (inl val✝)))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inr\nσ : Type u\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nα β γ : Type u\nf : β → F γ\ng : α → G β\nval✝ : α\n⊢ Comp.mk (((fun x => inr <$> x) ∘ f) <$> g val✝) = Comp.mk ((Sum.traverse f ∘ inr) <$> g val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nσ : Type u\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nα β : Type u\nf : α → β\nx : σ ⊕ α\n⊢ Sum.traverse (pure ∘ f) x = pure (f <$> x)\n[PROOFSTEP]\ninduction x\n[GOAL]\ncase inl\nσ : Type u\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nα β : Type u\nf : α → β\nval✝ : σ\n⊢ Sum.traverse (pure ∘ f) (inl val✝) = pure (f <$> inl val✝)\n[PROOFSTEP]\nsimp! [*, functor_norm]\n[GOAL]\ncase inr\nσ : Type u\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nα β : Type u\nf : α → β\nval✝ : α\n⊢ Sum.traverse (pure ∘ f) (inr val✝) = pure (f <$> inr val✝)\n[PROOFSTEP]\nsimp! [*, functor_norm]\n[GOAL]\ncase inl\nσ : Type u\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nα β : Type u\nf : α → β\nval✝ : σ\n⊢ inl val✝ = f <$> inl val✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inr\nσ : Type u\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nα β : Type u\nf : α → β\nval✝ : α\n⊢ inr (f val✝) = f <$> inr val✝\n[PROOFSTEP]\nrfl\n[GOAL]\nσ : Type u\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nα : Type u_1\nβ γ : Type u\ng : α → G β\nf : β → γ\nx : σ ⊕ α\n⊢ (fun x x_1 => x <$> x_1) f <$> Sum.traverse g x = Sum.traverse ((fun x x_1 => x <$> x_1) f ∘ g) x\n[PROOFSTEP]\ncases x\n[GOAL]\ncase inl\nσ : Type u\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nα : Type u_1\nβ γ : Type u\ng : α → G β\nf : β → γ\nval✝ : σ\n⊢ (fun x x_1 => x <$> x_1) f <$> Sum.traverse g (inl val✝) = Sum.traverse ((fun x x_1 => x <$> x_1) f ∘ g) (inl val✝)\n[PROOFSTEP]\nsimp [Sum.traverse, id_map, functor_norm]\n[GOAL]\ncase inr\nσ : Type u\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nα : Type u_1\nβ γ : Type u\ng : α → G β\nf : β → γ\nval✝ : α\n⊢ (fun x x_1 => x <$> x_1) f <$> Sum.traverse g (inr val✝) = Sum.traverse ((fun x x_1 => x <$> x_1) f ∘ g) (inr val✝)\n[PROOFSTEP]\nsimp [Sum.traverse, id_map, functor_norm]\n[GOAL]\ncase inl\nσ : Type u\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nα : Type u_1\nβ γ : Type u\ng : α → G β\nf : β → γ\nval✝ : σ\n⊢ pure (f <$> inl val✝) = pure (inl val✝)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase inr\nσ : Type u\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nα : Type u_1\nβ γ : Type u\ng : α → G β\nf : β → γ\nval✝ : α\n⊢ ((fun x => f <$> x) ∘ inr) <$> g val✝ = (inr ∘ f) <$> g val✝\n[PROOFSTEP]\ncongr\n[GOAL]\nσ : Type u\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nη : ApplicativeTransformation F G\nα : Type u_1\nβ : Type u\nf : α → F β\nx : σ ⊕ α\n⊢ (fun {α} => ApplicativeTransformation.app η α) (Sum.traverse f x) =\n Sum.traverse ((fun {α} => ApplicativeTransformation.app η α) ∘ f) x\n[PROOFSTEP]\ncases x\n[GOAL]\ncase inl\nσ : Type u\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nη : ApplicativeTransformation F G\nα : Type u_1\nβ : Type u\nf : α → F β\nval✝ : σ\n⊢ (fun {α} => ApplicativeTransformation.app η α) (Sum.traverse f (inl val✝)) =\n Sum.traverse ((fun {α} => ApplicativeTransformation.app η α) ∘ f) (inl val✝)\n[PROOFSTEP]\nsimp! [Sum.traverse, functor_norm, ApplicativeTransformation.preserves_map, ApplicativeTransformation.preserves_seq,\n ApplicativeTransformation.preserves_pure]\n[GOAL]\ncase inr\nσ : Type u\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nη : ApplicativeTransformation F G\nα : Type u_1\nβ : Type u\nf : α → F β\nval✝ : α\n⊢ (fun {α} => ApplicativeTransformation.app η α) (Sum.traverse f (inr val✝)) =\n Sum.traverse ((fun {α} => ApplicativeTransformation.app η α) ∘ f) (inr val✝)\n[PROOFSTEP]\nsimp! [Sum.traverse, functor_norm, ApplicativeTransformation.preserves_map, ApplicativeTransformation.preserves_seq,\n ApplicativeTransformation.preserves_pure]\n", "meta": {"mathlib_filename": "Mathlib.Control.Traversable.Instances", "llama_tokens": 9933, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO", "lm_q1_score": 0.48438008427698437, "lm_q2_score": 0.022629201804480158, "lm_q1q2_score": 0.010961134677174985}} {"text": "[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\n⊢ (X Y : Discrete PEmpty) → Zero (X ⟶ Y)\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\nX Y : Discrete PUnit\n⊢ Zero (X ⟶ Y)\n[PROOFSTEP]\nrepeat (constructor)\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\nX Y : Discrete PUnit\n⊢ Zero (X ⟶ Y)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase zero\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\nX Y : Discrete PUnit\n⊢ X ⟶ Y\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase zero.down\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\nX Y : Discrete PUnit\n⊢ PLift (X.as = Y.as)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase zero.down.down\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\nX Y : Discrete PUnit\n⊢ X.as = Y.as\n[PROOFSTEP]\nconstructor\n[GOAL]\n\n[PROOFSTEP]\nconstructor\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\nI J : HasZeroMorphisms C\nw : ∀ (X Y : C), Zero.zero = Zero.zero\n⊢ I = J\n[PROOFSTEP]\nhave : I.Zero = J.Zero := by\n funext X Y\n specialize w X Y\n apply congrArg Zero.mk w\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\nI J : HasZeroMorphisms C\nw : ∀ (X Y : C), Zero.zero = Zero.zero\n⊢ Zero = Zero\n[PROOFSTEP]\nfunext X Y\n[GOAL]\ncase h.h\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\nI J : HasZeroMorphisms C\nw : ∀ (X Y : C), Zero.zero = Zero.zero\nX Y : C\n⊢ Zero X Y = Zero X Y\n[PROOFSTEP]\nspecialize w X Y\n[GOAL]\ncase h.h\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\nI J : HasZeroMorphisms C\nX Y : C\nw : Zero.zero = Zero.zero\n⊢ Zero X Y = Zero X Y\n[PROOFSTEP]\napply congrArg Zero.mk w\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\nI J : HasZeroMorphisms C\nw : ∀ (X Y : C), Zero.zero = Zero.zero\nthis : Zero = Zero\n⊢ I = J\n[PROOFSTEP]\ncases I\n[GOAL]\ncase mk\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\nJ : HasZeroMorphisms C\nZero✝ : (X Y : C) → _root_.Zero (X ⟶ Y)\ncomp_zero✝ : ∀ {X Y : C} (f : X ⟶ Y) (Z : C), f ≫ 0 = 0\nzero_comp✝ : ∀ (X : C) {Y Z : C} (f : Y ⟶ Z), 0 ≫ f = 0\nw : ∀ (X Y : C), Zero.zero = Zero.zero\nthis : Zero = Zero\n⊢ mk = J\n[PROOFSTEP]\ncases J\n[GOAL]\ncase mk.mk\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\nZero✝¹ : (X Y : C) → _root_.Zero (X ⟶ Y)\ncomp_zero✝¹ : ∀ {X Y : C} (f : X ⟶ Y) (Z : C), f ≫ 0 = 0\nzero_comp✝¹ : ∀ (X : C) {Y Z : C} (f : Y ⟶ Z), 0 ≫ f = 0\nZero✝ : (X Y : C) → _root_.Zero (X ⟶ Y)\ncomp_zero✝ : ∀ {X Y : C} (f : X ⟶ Y) (Z : C), f ≫ 0 = 0\nzero_comp✝ : ∀ (X : C) {Y Z : C} (f : Y ⟶ Z), 0 ≫ f = 0\nw : ∀ (X Y : C), Zero.zero = Zero.zero\nthis : Zero = Zero\n⊢ mk = mk\n[PROOFSTEP]\ncongr\n[GOAL]\ncase mk.mk.h.e_4\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\nZero✝¹ : (X Y : C) → _root_.Zero (X ⟶ Y)\ncomp_zero✝¹ : ∀ {X Y : C} (f : X ⟶ Y) (Z : C), f ≫ 0 = 0\nzero_comp✝¹ : ∀ (X : C) {Y Z : C} (f : Y ⟶ Z), 0 ≫ f = 0\nZero✝ : (X Y : C) → _root_.Zero (X ⟶ Y)\ncomp_zero✝ : ∀ {X Y : C} (f : X ⟶ Y) (Z : C), f ≫ 0 = 0\nzero_comp✝ : ∀ (X : C) {Y Z : C} (f : Y ⟶ Z), 0 ≫ f = 0\nw : ∀ (X Y : C), Zero.zero = Zero.zero\nthis : Zero = Zero\n⊢ HEq comp_zero✝¹ comp_zero✝\n[PROOFSTEP]\napply proof_irrel_heq\n[GOAL]\ncase mk.mk.h.e_5\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\nZero✝¹ : (X Y : C) → _root_.Zero (X ⟶ Y)\ncomp_zero✝¹ : ∀ {X Y : C} (f : X ⟶ Y) (Z : C), f ≫ 0 = 0\nzero_comp✝¹ : ∀ (X : C) {Y Z : C} (f : Y ⟶ Z), 0 ≫ f = 0\nZero✝ : (X Y : C) → _root_.Zero (X ⟶ Y)\ncomp_zero✝ : ∀ {X Y : C} (f : X ⟶ Y) (Z : C), f ≫ 0 = 0\nzero_comp✝ : ∀ (X : C) {Y Z : C} (f : Y ⟶ Z), 0 ≫ f = 0\nw : ∀ (X Y : C), Zero.zero = Zero.zero\nthis : Zero = Zero\n⊢ HEq zero_comp✝¹ zero_comp✝\n[PROOFSTEP]\napply proof_irrel_heq\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\nI J : HasZeroMorphisms C\n⊢ I = J\n[PROOFSTEP]\napply ext_aux\n[GOAL]\ncase w\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\nI J : HasZeroMorphisms C\n⊢ ∀ (X Y : C), Zero.zero = Zero.zero\n[PROOFSTEP]\nintro X Y\n[GOAL]\ncase w\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\nI J : HasZeroMorphisms C\nX Y : C\n⊢ Zero.zero = Zero.zero\n[PROOFSTEP]\nhave : (I.Zero X Y).zero ≫ (J.Zero Y Y).zero = (I.Zero X Y).zero := by apply I.zero_comp X (J.Zero Y Y).zero\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\nI J : HasZeroMorphisms C\nX Y : C\n⊢ Zero.zero ≫ Zero.zero = Zero.zero\n[PROOFSTEP]\napply I.zero_comp X (J.Zero Y Y).zero\n[GOAL]\ncase w\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\nI J : HasZeroMorphisms C\nX Y : C\nthis : Zero.zero ≫ Zero.zero = Zero.zero\n⊢ Zero.zero = Zero.zero\n[PROOFSTEP]\nhave that : (I.Zero X Y).zero ≫ (J.Zero Y Y).zero = (J.Zero X Y).zero := by apply J.comp_zero (I.Zero X Y).zero Y\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\nI J : HasZeroMorphisms C\nX Y : C\nthis : Zero.zero ≫ Zero.zero = Zero.zero\n⊢ Zero.zero ≫ Zero.zero = Zero.zero\n[PROOFSTEP]\napply J.comp_zero (I.Zero X Y).zero Y\n[GOAL]\ncase w\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\nI J : HasZeroMorphisms C\nX Y : C\nthis : Zero.zero ≫ Zero.zero = Zero.zero\nthat : Zero.zero ≫ Zero.zero = Zero.zero\n⊢ Zero.zero = Zero.zero\n[PROOFSTEP]\nrw [← this, ← that]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝ : Mono g\nh : f ≫ g = 0\n⊢ f = 0\n[PROOFSTEP]\nrw [← zero_comp, cancel_mono] at h \n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝ : Mono g\nh✝ : f ≫ g = 0\nh : f = 0\n⊢ f = 0\n[PROOFSTEP]\nexact h\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝ : Epi f\nh : f ≫ g = 0\n⊢ g = 0\n[PROOFSTEP]\nrw [← comp_zero, cancel_epi] at h \n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝ : Epi f\nh✝ : f ≫ g = 0\nh : g = 0\n⊢ g = 0\n[PROOFSTEP]\nexact h\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\nX Y : C\nf : X ⟶ Y\ninst✝ : HasImage f\nw : image.ι f = 0\n⊢ f = 0\n[PROOFSTEP]\nrw [← image.fac f, w, HasZeroMorphisms.comp_zero]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u'\ninst✝¹ : Category.{v', u'} D\ninst✝ : HasZeroMorphisms D\nX✝ Y✝ : C ⥤ D\nη : X✝ ⟶ Y✝\nH : C ⥤ D\n⊢ η ≫ 0 = 0\n[PROOFSTEP]\next X\n[GOAL]\ncase w.h\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u'\ninst✝¹ : Category.{v', u'} D\ninst✝ : HasZeroMorphisms D\nX✝ Y✝ : C ⥤ D\nη : X✝ ⟶ Y✝\nH : C ⥤ D\nX : C\n⊢ NatTrans.app (η ≫ 0) X = NatTrans.app 0 X\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase w.h\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u'\ninst✝¹ : Category.{v', u'} D\ninst✝ : HasZeroMorphisms D\nX✝ Y✝ : C ⥤ D\nη : X✝ ⟶ Y✝\nH : C ⥤ D\nX : C\n⊢ NatTrans.app η X ≫ NatTrans.app 0 X = NatTrans.app 0 X\n[PROOFSTEP]\napply comp_zero\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u'\ninst✝¹ : Category.{v', u'} D\ninst✝ : HasZeroMorphisms D\nF G H : C ⥤ D\nη : G ⟶ H\n⊢ 0 ≫ η = 0\n[PROOFSTEP]\next X\n[GOAL]\ncase w.h\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u'\ninst✝¹ : Category.{v', u'} D\ninst✝ : HasZeroMorphisms D\nF G H : C ⥤ D\nη : G ⟶ H\nX : C\n⊢ NatTrans.app (0 ≫ η) X = NatTrans.app 0 X\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase w.h\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u'\ninst✝¹ : Category.{v', u'} D\ninst✝ : HasZeroMorphisms D\nF G H : C ⥤ D\nη : G ⟶ H\nX : C\n⊢ NatTrans.app 0 X ≫ NatTrans.app η X = NatTrans.app 0 X\n[PROOFSTEP]\napply zero_comp\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u'\ninst✝¹ : Category.{v', u'} D\ninst✝ : HasZeroMorphisms C\nX : C\nh : 𝟙 X = 0\nY : C\nf : X ⟶ Y\n⊢ f = default\n[PROOFSTEP]\nrw [← id_comp f, ← id_comp (0 : X ⟶ Y), h, zero_comp, zero_comp]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u'\ninst✝¹ : Category.{v', u'} D\ninst✝ : HasZeroMorphisms C\nX : C\nh : 𝟙 X = 0\nY : C\nf : X ⟶ Y\n⊢ 0 = default\n[PROOFSTEP]\nsimp only\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u'\ninst✝¹ : Category.{v', u'} D\ninst✝ : HasZeroMorphisms C\nX : C\nh : 𝟙 X = 0\nY : C\nf : Y ⟶ X\n⊢ f = default\n[PROOFSTEP]\nrw [← comp_id f, ← comp_id (0 : Y ⟶ X), h, comp_zero, comp_zero]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u'\ninst✝¹ : Category.{v', u'} D\ninst✝ : HasZeroMorphisms C\nX : C\nh : 𝟙 X = 0\nY : C\nf : Y ⟶ X\n⊢ 0 = default\n[PROOFSTEP]\nsimp only\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\nX Y : C\ninst✝ : Mono 0\n⊢ 𝟙 X ≫ 0 = 0 ≫ 0\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\nX Y : C\ninst✝ : Epi 0\n⊢ 0 ≫ 𝟙 Y = 0 ≫ 0\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\nX Y : C\nf : X ⟶ Y\ninst✝ : Mono f\nh : f = 0\n⊢ IsZero X\n[PROOFSTEP]\nsubst h\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\nX Y : C\ninst✝ : Mono 0\n⊢ IsZero X\n[PROOFSTEP]\napply of_mono_zero X Y\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\nX Y : C\nf : X ⟶ Y\ninst✝ : Epi f\nh : f = 0\n⊢ IsZero Y\n[PROOFSTEP]\nsubst h\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\nX Y : C\ninst✝ : Epi 0\n⊢ IsZero Y\n[PROOFSTEP]\napply of_epi_zero X Y\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\nX Y : C\nf : X ⟶ Y\ninst✝ : IsSplitMono f\n⊢ IsZero X ↔ f = 0\n[PROOFSTEP]\nrw [iff_id_eq_zero]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\nX Y : C\nf : X ⟶ Y\ninst✝ : IsSplitMono f\n⊢ 𝟙 X = 0 ↔ f = 0\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\nX Y : C\nf : X ⟶ Y\ninst✝ : IsSplitMono f\n⊢ 𝟙 X = 0 → f = 0\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\nX Y : C\nf : X ⟶ Y\ninst✝ : IsSplitMono f\nh : 𝟙 X = 0\n⊢ f = 0\n[PROOFSTEP]\nrw [← Category.id_comp f, h, zero_comp]\n[GOAL]\ncase mpr\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\nX Y : C\nf : X ⟶ Y\ninst✝ : IsSplitMono f\n⊢ f = 0 → 𝟙 X = 0\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\nX Y : C\nf : X ⟶ Y\ninst✝ : IsSplitMono f\nh : f = 0\n⊢ 𝟙 X = 0\n[PROOFSTEP]\nrw [← IsSplitMono.id f]\n[GOAL]\ncase mpr\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\nX Y : C\nf : X ⟶ Y\ninst✝ : IsSplitMono f\nh : f = 0\n⊢ f ≫ retraction f = 0\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\nX Y : C\nf : X ⟶ Y\ninst✝ : IsSplitEpi f\n⊢ IsZero Y ↔ f = 0\n[PROOFSTEP]\nrw [iff_id_eq_zero]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\nX Y : C\nf : X ⟶ Y\ninst✝ : IsSplitEpi f\n⊢ 𝟙 Y = 0 ↔ f = 0\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\nX Y : C\nf : X ⟶ Y\ninst✝ : IsSplitEpi f\n⊢ 𝟙 Y = 0 → f = 0\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\nX Y : C\nf : X ⟶ Y\ninst✝ : IsSplitEpi f\nh : 𝟙 Y = 0\n⊢ f = 0\n[PROOFSTEP]\nrw [← Category.comp_id f, h, comp_zero]\n[GOAL]\ncase mpr\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\nX Y : C\nf : X ⟶ Y\ninst✝ : IsSplitEpi f\n⊢ f = 0 → 𝟙 Y = 0\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\nX Y : C\nf : X ⟶ Y\ninst✝ : IsSplitEpi f\nh : f = 0\n⊢ 𝟙 Y = 0\n[PROOFSTEP]\nrw [← IsSplitEpi.id f]\n[GOAL]\ncase mpr\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\nX Y : C\nf : X ⟶ Y\ninst✝ : IsSplitEpi f\nh : f = 0\n⊢ section_ f ≫ f = 0\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\nX Y : C\nf : X ⟶ Y\ninst✝ : Mono f\ni : IsZero Y\n⊢ IsZero X\n[PROOFSTEP]\nhave hf := i.eq_zero_of_tgt f\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\nX Y : C\nf : X ⟶ Y\ninst✝ : Mono f\ni : IsZero Y\nhf : f = 0\n⊢ IsZero X\n[PROOFSTEP]\nsubst hf\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\nX Y : C\ni : IsZero Y\ninst✝ : Mono 0\n⊢ IsZero X\n[PROOFSTEP]\nexact IsZero.of_mono_zero X Y\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\nX Y : C\nf : X ⟶ Y\ninst✝ : Epi f\ni : IsZero X\n⊢ IsZero Y\n[PROOFSTEP]\nhave hf := i.eq_zero_of_src f\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\nX Y : C\nf : X ⟶ Y\ninst✝ : Epi f\ni : IsZero X\nhf : f = 0\n⊢ IsZero Y\n[PROOFSTEP]\nsubst hf\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\nX Y : C\ni : IsZero X\ninst✝ : Epi 0\n⊢ IsZero Y\n[PROOFSTEP]\nexact IsZero.of_epi_zero X Y\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\nO : C\nhO : IsZero O\nX Y : C\nf : X ⟶ Y\nZ : C\n⊢ f ≫ 0 = 0\n[PROOFSTEP]\nchange f ≫ (hO.from_ Y ≫ hO.to_ Z) = hO.from_ X ≫ hO.to_ Z\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\nO : C\nhO : IsZero O\nX Y : C\nf : X ⟶ Y\nZ : C\n⊢ f ≫ IsZero.from_ hO Y ≫ IsZero.to_ hO Z = IsZero.from_ hO X ≫ IsZero.to_ hO Z\n[PROOFSTEP]\nrw [← Category.assoc]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\nO : C\nhO : IsZero O\nX Y : C\nf : X ⟶ Y\nZ : C\n⊢ (f ≫ IsZero.from_ hO Y) ≫ IsZero.to_ hO Z = IsZero.from_ hO X ≫ IsZero.to_ hO Z\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\nO : C\nhO : IsZero O\nX Y : C\nf : X ⟶ Y\nZ : C\n⊢ f ≫ IsZero.from_ hO Y = IsZero.from_ hO X\n[PROOFSTEP]\napply hO.eq_of_tgt\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\nO : C\nhO : IsZero O\nX Y Z : C\nf : Y ⟶ Z\n⊢ 0 ≫ f = 0\n[PROOFSTEP]\nchange (hO.from_ X ≫ hO.to_ Y) ≫ f = hO.from_ X ≫ hO.to_ Z\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\nO : C\nhO : IsZero O\nX Y Z : C\nf : Y ⟶ Z\n⊢ (IsZero.from_ hO X ≫ IsZero.to_ hO Y) ≫ f = IsZero.from_ hO X ≫ IsZero.to_ hO Z\n[PROOFSTEP]\nrw [Category.assoc]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\nO : C\nhO : IsZero O\nX Y Z : C\nf : Y ⟶ Z\n⊢ IsZero.from_ hO X ≫ IsZero.to_ hO Y ≫ f = IsZero.from_ hO X ≫ IsZero.to_ hO Z\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\nO : C\nhO : IsZero O\nX Y Z : C\nf : Y ⟶ Z\n⊢ IsZero.to_ hO Y ≫ f = IsZero.to_ hO Z\n[PROOFSTEP]\napply hO.eq_of_src\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u'\ninst✝¹ : Category.{v', u'} D\ninst✝ : HasZeroObject C\nX Y : C\nf : X ⟶ Y\nZ : C\n⊢ f ≫ 0 = 0\n[PROOFSTEP]\nchange f ≫ (default : Y ⟶ 0) ≫ default = (default : X ⟶ 0) ≫ default\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u'\ninst✝¹ : Category.{v', u'} D\ninst✝ : HasZeroObject C\nX Y : C\nf : X ⟶ Y\nZ : C\n⊢ f ≫ default ≫ default = default ≫ default\n[PROOFSTEP]\nrw [← Category.assoc]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u'\ninst✝¹ : Category.{v', u'} D\ninst✝ : HasZeroObject C\nX Y : C\nf : X ⟶ Y\nZ : C\n⊢ (f ≫ default) ≫ default = default ≫ default\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u'\ninst✝¹ : Category.{v', u'} D\ninst✝ : HasZeroObject C\nX Y : C\nf : X ⟶ Y\nZ : C\n⊢ f ≫ default = default\n[PROOFSTEP]\nsimp only [eq_iff_true_of_subsingleton]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u'\ninst✝¹ : Category.{v', u'} D\ninst✝ : HasZeroObject C\nX Y Z : C\nf : Y ⟶ Z\n⊢ 0 ≫ f = 0\n[PROOFSTEP]\nchange ((default : X ⟶ 0) ≫ default) ≫ f = (default : X ⟶ 0) ≫ default\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u'\ninst✝¹ : Category.{v', u'} D\ninst✝ : HasZeroObject C\nX Y Z : C\nf : Y ⟶ Z\n⊢ (default ≫ default) ≫ f = default ≫ default\n[PROOFSTEP]\nrw [Category.assoc]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u'\ninst✝¹ : Category.{v', u'} D\ninst✝ : HasZeroObject C\nX Y Z : C\nf : Y ⟶ Z\n⊢ default ≫ default ≫ f = default ≫ default\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u'\ninst✝¹ : Category.{v', u'} D\ninst✝ : HasZeroObject C\nX Y Z : C\nf : Y ⟶ Z\n⊢ default ≫ f = default\n[PROOFSTEP]\nsimp only [eq_iff_true_of_subsingleton]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroObject C\ninst✝ : HasZeroMorphisms C\nX : C\nt : IsInitial X\n⊢ (zeroIsoIsInitial t).hom = 0\n[PROOFSTEP]\next\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroObject C\ninst✝ : HasZeroMorphisms C\nX : C\nt : IsInitial X\n⊢ (zeroIsoIsInitial t).inv = 0\n[PROOFSTEP]\next\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroObject C\ninst✝ : HasZeroMorphisms C\nX : C\nt : IsTerminal X\n⊢ (zeroIsoIsTerminal t).hom = 0\n[PROOFSTEP]\next\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroObject C\ninst✝ : HasZeroMorphisms C\nX : C\nt : IsTerminal X\n⊢ (zeroIsoIsTerminal t).inv = 0\n[PROOFSTEP]\next\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nD : Type u'\ninst✝³ : Category.{v', u'} D\ninst✝² : HasZeroObject C\ninst✝¹ : HasZeroMorphisms C\ninst✝ : HasInitial C\n⊢ zeroIsoInitial.hom = 0\n[PROOFSTEP]\next\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nD : Type u'\ninst✝³ : Category.{v', u'} D\ninst✝² : HasZeroObject C\ninst✝¹ : HasZeroMorphisms C\ninst✝ : HasInitial C\n⊢ zeroIsoInitial.inv = 0\n[PROOFSTEP]\next\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nD : Type u'\ninst✝³ : Category.{v', u'} D\ninst✝² : HasZeroObject C\ninst✝¹ : HasZeroMorphisms C\ninst✝ : HasTerminal C\n⊢ zeroIsoTerminal.hom = 0\n[PROOFSTEP]\next\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nD : Type u'\ninst✝³ : Category.{v', u'} D\ninst✝² : HasZeroObject C\ninst✝¹ : HasZeroMorphisms C\ninst✝ : HasTerminal C\n⊢ zeroIsoTerminal.inv = 0\n[PROOFSTEP]\next\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroObject C\ninst✝ : HasZeroMorphisms C\n⊢ 𝟙 0 = 0\n[PROOFSTEP]\napply HasZeroObject.from_zero_ext\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroObject C\ninst✝ : HasZeroMorphisms C\nX : C\nf : X ⟶ 0\n⊢ f = 0\n[PROOFSTEP]\next\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroObject C\ninst✝ : HasZeroMorphisms C\nX Y : C\nf : X ⟶ Y\ni : Y ≅ 0\n⊢ f = 0\n[PROOFSTEP]\nhave h : f = f ≫ i.hom ≫ 𝟙 0 ≫ i.inv := by simp only [Iso.hom_inv_id, id_comp, comp_id]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroObject C\ninst✝ : HasZeroMorphisms C\nX Y : C\nf : X ⟶ Y\ni : Y ≅ 0\n⊢ f = f ≫ i.hom ≫ 𝟙 0 ≫ i.inv\n[PROOFSTEP]\nsimp only [Iso.hom_inv_id, id_comp, comp_id]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroObject C\ninst✝ : HasZeroMorphisms C\nX Y : C\nf : X ⟶ Y\ni : Y ≅ 0\nh : f = f ≫ i.hom ≫ 𝟙 0 ≫ i.inv\n⊢ f = 0\n[PROOFSTEP]\nsimpa using h\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroObject C\ninst✝ : HasZeroMorphisms C\nX : C\nf : 0 ⟶ X\n⊢ f = 0\n[PROOFSTEP]\next\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroObject C\ninst✝ : HasZeroMorphisms C\nX Y : C\nf : X ⟶ Y\ni : X ≅ 0\n⊢ f = 0\n[PROOFSTEP]\nhave h : f = i.hom ≫ 𝟙 0 ≫ i.inv ≫ f := by simp only [Iso.hom_inv_id_assoc, id_comp, comp_id]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroObject C\ninst✝ : HasZeroMorphisms C\nX Y : C\nf : X ⟶ Y\ni : X ≅ 0\n⊢ f = i.hom ≫ 𝟙 0 ≫ i.inv ≫ f\n[PROOFSTEP]\nsimp only [Iso.hom_inv_id_assoc, id_comp, comp_id]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroObject C\ninst✝ : HasZeroMorphisms C\nX Y : C\nf : X ⟶ Y\ni : X ≅ 0\nh : f = i.hom ≫ 𝟙 0 ≫ i.inv ≫ f\n⊢ f = 0\n[PROOFSTEP]\nsimpa using h\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroObject C\ninst✝ : HasZeroMorphisms C\nX Y : C\nf : X ⟶ Y\ni : X ≅ 0\nZ : C\ng h : Z ⟶ X\nx✝ : g ≫ f = h ≫ f\n⊢ g = h\n[PROOFSTEP]\nrw [zero_of_target_iso_zero g i, zero_of_target_iso_zero h i]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroObject C\ninst✝ : HasZeroMorphisms C\nX Y : C\nf : X ⟶ Y\ni : Y ≅ 0\nZ : C\ng h : Y ⟶ Z\nx✝ : f ≫ g = f ≫ h\n⊢ g = h\n[PROOFSTEP]\nrw [zero_of_source_iso_zero g i, zero_of_source_iso_zero h i]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroObject C\ninst✝ : HasZeroMorphisms C\nX : C\n⊢ Function.LeftInverse (_ : (X ≅ 0) → 𝟙 X = 0) fun h => Iso.mk 0 0\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroObject C\ninst✝ : HasZeroMorphisms C\nX : C\n⊢ Function.RightInverse (_ : (X ≅ 0) → 𝟙 X = 0) fun h => Iso.mk 0 0\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroObject C\ninst✝ : HasZeroMorphisms C\nX Y : C\nh : Mono 0\n⊢ (0 ≫ 0) ≫ 0 = 𝟙 X ≫ 0\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroObject C\ninst✝ : HasZeroMorphisms C\nX Y : C\nh : Epi 0\n⊢ 0 ≫ 0 ≫ 0 = 0 ≫ 𝟙 Y\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nD : Type u'\ninst✝³ : Category.{v', u'} D\ninst✝² : HasZeroObject C\ninst✝¹ : HasZeroMorphisms C\nX Y : C\nf : X ⟶ Y\ninst✝ : Mono f\nh : f = 0\n⊢ X ≅ 0\n[PROOFSTEP]\nsubst h\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nD : Type u'\ninst✝³ : Category.{v', u'} D\ninst✝² : HasZeroObject C\ninst✝¹ : HasZeroMorphisms C\nX Y : C\ninst✝ : Mono 0\n⊢ X ≅ 0\n[PROOFSTEP]\napply isoZeroOfMonoZero ‹_›\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nD : Type u'\ninst✝³ : Category.{v', u'} D\ninst✝² : HasZeroObject C\ninst✝¹ : HasZeroMorphisms C\nX Y : C\nf : X ⟶ Y\ninst✝ : Epi f\nh : f = 0\n⊢ Y ≅ 0\n[PROOFSTEP]\nsubst h\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nD : Type u'\ninst✝³ : Category.{v', u'} D\ninst✝² : HasZeroObject C\ninst✝¹ : HasZeroMorphisms C\nX Y : C\ninst✝ : Epi 0\n⊢ Y ≅ 0\n[PROOFSTEP]\napply isoZeroOfEpiZero ‹_›\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroObject C\ninst✝ : HasZeroMorphisms C\nX : C\nP : IsIsomorphic X 0\n⊢ 0 ≫ 0 = 𝟙 X\n[PROOFSTEP]\ncases' P with P\n[GOAL]\ncase intro\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroObject C\ninst✝ : HasZeroMorphisms C\nX : C\nP : X ≅ 0\n⊢ 0 ≫ 0 = 𝟙 X\n[PROOFSTEP]\nrw [← P.hom_inv_id, ← Category.id_comp P.inv]\n[GOAL]\ncase intro\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroObject C\ninst✝ : HasZeroMorphisms C\nX : C\nP : X ≅ 0\n⊢ 0 ≫ 0 = P.hom ≫ 𝟙 0 ≫ P.inv\n[PROOFSTEP]\napply Eq.symm\n[GOAL]\ncase intro.h\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroObject C\ninst✝ : HasZeroMorphisms C\nX : C\nP : X ≅ 0\n⊢ P.hom ≫ 𝟙 0 ≫ P.inv = 0 ≫ 0\n[PROOFSTEP]\nsimp only [id_comp, Iso.hom_inv_id, comp_zero]\n[GOAL]\ncase intro.h\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroObject C\ninst✝ : HasZeroMorphisms C\nX : C\nP : X ≅ 0\n⊢ 𝟙 X = 0\n[PROOFSTEP]\napply (idZeroEquivIsoZero X).invFun P\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroObject C\ninst✝ : HasZeroMorphisms C\nX : C\nP : IsIsomorphic X 0\n⊢ 0 ≫ 0 = 𝟙 0\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u'\ninst✝¹ : Category.{v', u'} D\ninst✝ : HasZeroMorphisms C\nX Y : C\n⊢ IsIso 0 → 𝟙 X = 0 ∧ 𝟙 Y = 0\n[PROOFSTEP]\nintro i\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u'\ninst✝¹ : Category.{v', u'} D\ninst✝ : HasZeroMorphisms C\nX Y : C\ni : IsIso 0\n⊢ 𝟙 X = 0 ∧ 𝟙 Y = 0\n[PROOFSTEP]\nrw [← IsIso.hom_inv_id (0 : X ⟶ Y)]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u'\ninst✝¹ : Category.{v', u'} D\ninst✝ : HasZeroMorphisms C\nX Y : C\ni : IsIso 0\n⊢ 0 ≫ inv 0 = 0 ∧ 𝟙 Y = 0\n[PROOFSTEP]\nrw [← IsIso.inv_hom_id (0 : X ⟶ Y)]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u'\ninst✝¹ : Category.{v', u'} D\ninst✝ : HasZeroMorphisms C\nX Y : C\ni : IsIso 0\n⊢ 0 ≫ inv 0 = 0 ∧ inv 0 ≫ 0 = 0\n[PROOFSTEP]\nsimp only [eq_self_iff_true, comp_zero, and_self, zero_comp]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u'\ninst✝¹ : Category.{v', u'} D\ninst✝ : HasZeroMorphisms C\nX Y : C\nh : 𝟙 X = 0 ∧ 𝟙 Y = 0\n⊢ 0 ≫ 0 = 𝟙 X ∧ 0 ≫ 0 = 𝟙 Y\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u'\ninst✝¹ : Category.{v', u'} D\ninst✝ : HasZeroMorphisms C\nX Y : C\n⊢ Function.LeftInverse (_ : 𝟙 X = 0 ∧ 𝟙 Y = 0 → IsIso 0) (_ : IsIso 0 → 𝟙 X = 0 ∧ 𝟙 Y = 0)\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u'\ninst✝¹ : Category.{v', u'} D\ninst✝ : HasZeroMorphisms C\nX Y : C\n⊢ Function.RightInverse (_ : 𝟙 X = 0 ∧ 𝟙 Y = 0 → IsIso 0) (_ : IsIso 0 → 𝟙 X = 0 ∧ 𝟙 Y = 0)\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u'\ninst✝¹ : Category.{v', u'} D\ninst✝ : HasZeroMorphisms C\nX : C\n⊢ IsIso 0 ≃ 𝟙 X = 0\n[PROOFSTEP]\nsimpa using isIsoZeroEquiv X X\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\ninst✝ : HasZeroObject C\nX Y : C\n⊢ IsIso 0 ≃ (X ≅ 0) × (Y ≅ 0)\n[PROOFSTEP]\nrefine' (isIsoZeroEquiv X Y).trans _\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\ninst✝ : HasZeroObject C\nX Y : C\n⊢ 𝟙 X = 0 ∧ 𝟙 Y = 0 ≃ (X ≅ 0) × (Y ≅ 0)\n[PROOFSTEP]\nsymm\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\ninst✝ : HasZeroObject C\nX Y : C\n⊢ (X ≅ 0) × (Y ≅ 0) ≃ 𝟙 X = 0 ∧ 𝟙 Y = 0\n[PROOFSTEP]\nfconstructor\n[GOAL]\ncase toFun\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\ninst✝ : HasZeroObject C\nX Y : C\n⊢ (X ≅ 0) × (Y ≅ 0) → 𝟙 X = 0 ∧ 𝟙 Y = 0\n[PROOFSTEP]\nrintro ⟨eX, eY⟩\n[GOAL]\ncase toFun.mk\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\ninst✝ : HasZeroObject C\nX Y : C\neX : X ≅ 0\neY : Y ≅ 0\n⊢ 𝟙 X = 0 ∧ 𝟙 Y = 0\n[PROOFSTEP]\nfconstructor\n[GOAL]\ncase toFun.mk.left\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\ninst✝ : HasZeroObject C\nX Y : C\neX : X ≅ 0\neY : Y ≅ 0\n⊢ 𝟙 X = 0\ncase toFun.mk.right\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\ninst✝ : HasZeroObject C\nX Y : C\neX : X ≅ 0\neY : Y ≅ 0\n⊢ 𝟙 Y = 0\n[PROOFSTEP]\nexact (idZeroEquivIsoZero X).symm eX\n[GOAL]\ncase toFun.mk.right\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\ninst✝ : HasZeroObject C\nX Y : C\neX : X ≅ 0\neY : Y ≅ 0\n⊢ 𝟙 Y = 0\n[PROOFSTEP]\nexact (idZeroEquivIsoZero Y).symm eY\n[GOAL]\ncase invFun\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\ninst✝ : HasZeroObject C\nX Y : C\n⊢ 𝟙 X = 0 ∧ 𝟙 Y = 0 → (X ≅ 0) × (Y ≅ 0)\n[PROOFSTEP]\nrintro ⟨hX, hY⟩\n[GOAL]\ncase invFun.intro\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\ninst✝ : HasZeroObject C\nX Y : C\nhX : 𝟙 X = 0\nhY : 𝟙 Y = 0\n⊢ (X ≅ 0) × (Y ≅ 0)\n[PROOFSTEP]\nfconstructor\n[GOAL]\ncase invFun.intro.fst\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\ninst✝ : HasZeroObject C\nX Y : C\nhX : 𝟙 X = 0\nhY : 𝟙 Y = 0\n⊢ X ≅ 0\ncase invFun.intro.snd\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\ninst✝ : HasZeroObject C\nX Y : C\nhX : 𝟙 X = 0\nhY : 𝟙 Y = 0\n⊢ Y ≅ 0\n[PROOFSTEP]\nexact (idZeroEquivIsoZero X) hX\n[GOAL]\ncase invFun.intro.snd\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\ninst✝ : HasZeroObject C\nX Y : C\nhX : 𝟙 X = 0\nhY : 𝟙 Y = 0\n⊢ Y ≅ 0\n[PROOFSTEP]\nexact (idZeroEquivIsoZero Y) hY\n[GOAL]\ncase left_inv\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\ninst✝ : HasZeroObject C\nX Y : C\n⊢ Function.LeftInverse (fun a => And.casesOn a fun hX hY => (↑(idZeroEquivIsoZero X) hX, ↑(idZeroEquivIsoZero Y) hY))\n (_ : (X ≅ 0) × (Y ≅ 0) → 𝟙 X = 0 ∧ 𝟙 Y = 0)\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase right_inv\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\ninst✝ : HasZeroObject C\nX Y : C\n⊢ Function.RightInverse (fun a => And.casesOn a fun hX hY => (↑(idZeroEquivIsoZero X) hX, ↑(idZeroEquivIsoZero Y) hY))\n (_ : (X ≅ 0) × (Y ≅ 0) → 𝟙 X = 0 ∧ 𝟙 Y = 0)\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\ninst✝ : HasZeroObject C\nX Y : C\nf : X ⟶ Y\ni : X ≅ 0\nj : Y ≅ 0\n⊢ IsIso f\n[PROOFSTEP]\nrw [zero_of_source_iso_zero f i]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\ninst✝ : HasZeroObject C\nX Y : C\nf : X ⟶ Y\ni : X ≅ 0\nj : Y ≅ 0\n⊢ IsIso 0\n[PROOFSTEP]\nexact (isIsoZeroEquivIsoZero _ _).invFun ⟨i, j⟩\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\ninst✝ : HasInitial C\n⊢ HasZeroObject C\n[PROOFSTEP]\nrefine' ⟨⟨⊥_ C, fun X => ⟨⟨⟨0⟩, by aesop_cat⟩⟩, fun X => ⟨⟨⟨0⟩, fun f => _⟩⟩⟩⟩\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\ninst✝ : HasInitial C\nX : C\n⊢ ∀ (a : ⊥_ C ⟶ X), a = default\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\ninst✝ : HasInitial C\nX : C\nf : X ⟶ ⊥_ C\n⊢ f = default\n[PROOFSTEP]\ncalc\n f = f ≫ 𝟙 _ := (Category.comp_id _).symm\n _ = f ≫ 0 := by congr!\n _ = 0 := HasZeroMorphisms.comp_zero _ _\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\ninst✝ : HasInitial C\nX : C\nf : X ⟶ ⊥_ C\n⊢ f ≫ 𝟙 (⊥_ C) = f ≫ 0\n[PROOFSTEP]\ncongr!\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\ninst✝ : HasTerminal C\n⊢ HasZeroObject C\n[PROOFSTEP]\nrefine' ⟨⟨⊤_ C, fun X => ⟨⟨⟨0⟩, fun f => _⟩⟩, fun X => ⟨⟨⟨0⟩, by aesop_cat⟩⟩⟩⟩\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\ninst✝ : HasTerminal C\nX : C\n⊢ ∀ (a : X ⟶ ⊤_ C), a = default\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\ninst✝ : HasTerminal C\nX : C\nf : ⊤_ C ⟶ X\n⊢ f = default\n[PROOFSTEP]\ncalc\n f = 𝟙 _ ≫ f := (Category.id_comp _).symm\n _ = 0 ≫ f := by congr!\n _ = 0 := zero_comp\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\ninst✝ : HasTerminal C\nX : C\nf : ⊤_ C ⟶ X\n⊢ 𝟙 (⊤_ C) ≫ f = 0 ≫ f\n[PROOFSTEP]\ncongr!\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nD : Type u'\ninst✝³ : Category.{v', u'} D\ninst✝² : HasZeroMorphisms C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝¹ : HasImage f\ninst✝ : Epi (factorThruImage f)\nh : f ≫ g = 0\n⊢ factorThruImage f ≫ image.ι f ≫ g = 0\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\ninst✝¹ : HasZeroMorphisms C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝ : HasImage g\nh : f ≫ g = 0\n⊢ (f ≫ factorThruImage g) ≫ image.ι g = 0\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nD : Type u'\ninst✝³ : Category.{v', u'} D\ninst✝² : HasZeroMorphisms C\ninst✝¹ : HasZeroObject C\nX Y : C\ninst✝ : HasImage 0\n⊢ ι 0 = 0\n[PROOFSTEP]\nrw [← image.lift_fac (monoFactorisationZero X Y)]\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nD : Type u'\ninst✝³ : Category.{v', u'} D\ninst✝² : HasZeroMorphisms C\ninst✝¹ : HasZeroObject C\nX Y : C\ninst✝ : HasImage 0\n⊢ lift (monoFactorisationZero X Y) ≫ (monoFactorisationZero X Y).m = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{v, u} C\nD : Type u'\ninst✝⁴ : Category.{v', u'} D\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasZeroObject C\ninst✝¹ : HasEqualizers C\nX Y : C\nf : X ⟶ Y\nh : f = 0\ninst✝ : HasImage f\n⊢ ι f = 0\n[PROOFSTEP]\nrw [image.eq_fac h]\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{v, u} C\nD : Type u'\ninst✝⁴ : Category.{v', u'} D\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasZeroObject C\ninst✝¹ : HasEqualizers C\nX Y : C\nf : X ⟶ Y\nh : f = 0\ninst✝ : HasImage f\n⊢ (eqToIso h).hom ≫ ι 0 = 0\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Limits.Shapes.ZeroMorphisms", "llama_tokens": 18389, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO", "lm_q1_score": 0.4571367168274948, "lm_q2_score": 0.023330768511379073, "lm_q1q2_score": 0.010665350918354128}} {"text": "[GOAL]\nC : Type u_1\ninst✝³ : Category.{v, u_1} C\ninst✝² : Preadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Finite J\nF : J → Karoubi C\n⊢ ((biproduct.map fun j => (F j).p) ≫ biproduct.map fun j => (F j).p) = biproduct.map fun j => (F j).p\n[PROOFSTEP]\next\n[GOAL]\ncase w.w\nC : Type u_1\ninst✝³ : Category.{v, u_1} C\ninst✝² : Preadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Finite J\nF : J → Karoubi C\nj✝¹ j✝ : J\n⊢ biproduct.ι (fun j => (F j).X) j✝ ≫\n ((biproduct.map fun j => (F j).p) ≫ biproduct.map fun j => (F j).p) ≫ biproduct.π (fun j => (F j).X) j✝¹ =\n biproduct.ι (fun j => (F j).X) j✝ ≫ (biproduct.map fun j => (F j).p) ≫ biproduct.π (fun j => (F j).X) j✝¹\n[PROOFSTEP]\nsimp only [assoc, biproduct.map_π, biproduct.map_π_assoc, idem]\n[GOAL]\nC : Type u_1\ninst✝³ : Category.{v, u_1} C\ninst✝² : Preadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Finite J\nF : J → Karoubi C\nj : J\n⊢ (biproduct.map fun j => (F j).p) ≫ Bicone.π (biproduct.bicone fun j => (F j).X) j =\n (mk (⨁ fun j => (F j).X) (biproduct.map fun j => (F j).p)).p ≫\n ((biproduct.map fun j => (F j).p) ≫ Bicone.π (biproduct.bicone fun j => (F j).X) j) ≫ (F j).p\n[PROOFSTEP]\nsimp only [assoc, biproduct.bicone_π, biproduct.map_π, biproduct.map_π_assoc, (F j).idem]\n[GOAL]\nC : Type u_1\ninst✝³ : Category.{v, u_1} C\ninst✝² : Preadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Finite J\nF : J → Karoubi C\nj : J\n⊢ (biproduct.ι (fun j => (F j).X) j ≫ biproduct.map fun j => (F j).p) =\n (F j).p ≫\n (biproduct.ι (fun j => (F j).X) j ≫ biproduct.map fun j => (F j).p) ≫\n (mk (⨁ fun j => (F j).X) (biproduct.map fun j => (F j).p)).p\n[PROOFSTEP]\nsimp only [biproduct.ι_map, assoc, idem_assoc]\n[GOAL]\nC : Type u_1\ninst✝³ : Category.{v, u_1} C\ninst✝² : Preadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Finite J\nF : J → Karoubi C\nj j' : J\n⊢ (fun j => Hom.mk (biproduct.ι (fun j => (F j).X) j ≫ biproduct.map fun j => (F j).p)) j ≫\n (fun j => Hom.mk ((biproduct.map fun j => (F j).p) ≫ Bicone.π (biproduct.bicone fun j => (F j).X) j)) j' =\n if h : j = j' then eqToHom (_ : F j = F j') else 0\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nC : Type u_1\ninst✝³ : Category.{v, u_1} C\ninst✝² : Preadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Finite J\nF : J → Karoubi C\nj j' : J\nh : j = j'\n⊢ (fun j => Hom.mk (biproduct.ι (fun j => (F j).X) j ≫ biproduct.map fun j => (F j).p)) j ≫\n (fun j => Hom.mk ((biproduct.map fun j => (F j).p) ≫ Bicone.π (biproduct.bicone fun j => (F j).X) j)) j' =\n eqToHom (_ : F j = F j')\n[PROOFSTEP]\nsubst h\n[GOAL]\ncase pos\nC : Type u_1\ninst✝³ : Category.{v, u_1} C\ninst✝² : Preadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Finite J\nF : J → Karoubi C\nj : J\n⊢ (fun j => Hom.mk (biproduct.ι (fun j => (F j).X) j ≫ biproduct.map fun j => (F j).p)) j ≫\n (fun j => Hom.mk ((biproduct.map fun j => (F j).p) ≫ Bicone.π (biproduct.bicone fun j => (F j).X) j)) j =\n eqToHom (_ : F j = F j)\n[PROOFSTEP]\nsimp only [biproduct.ι_map, biproduct.bicone_π, biproduct.map_π, eqToHom_refl, id_eq, hom_ext_iff, comp_f, assoc,\n bicone_ι_π_self_assoc, idem]\n[GOAL]\ncase neg\nC : Type u_1\ninst✝³ : Category.{v, u_1} C\ninst✝² : Preadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Finite J\nF : J → Karoubi C\nj j' : J\nh : ¬j = j'\n⊢ (fun j => Hom.mk (biproduct.ι (fun j => (F j).X) j ≫ biproduct.map fun j => (F j).p)) j ≫\n (fun j => Hom.mk ((biproduct.map fun j => (F j).p) ≫ Bicone.π (biproduct.bicone fun j => (F j).X) j)) j' =\n 0\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase neg\nC : Type u_1\ninst✝³ : Category.{v, u_1} C\ninst✝² : Preadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Finite J\nF : J → Karoubi C\nj j' : J\nh : ¬j = j'\n⊢ Hom.mk (biproduct.ι (fun j => (F j).X) j ≫ biproduct.map fun j => (F j).p) ≫\n Hom.mk ((biproduct.map fun j => (F j).p) ≫ biproduct.π (fun j => (F j).X) j') =\n Hom.mk 0\n[PROOFSTEP]\nsimp only [hom_ext_iff, biproduct.ι_map, biproduct.map_π, comp_f, assoc, ne_eq, biproduct.ι_π_ne_assoc _ h, comp_zero,\n zero_comp]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{v, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteBiproducts C\nn : ℕ\nF : Fin n → Karoubi C\n⊢ HasBiproduct F\n[PROOFSTEP]\napply hasBiproduct_of_total (Biproducts.bicone F)\n[GOAL]\nC : Type u_1\ninst✝² : Category.{v, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteBiproducts C\nn : ℕ\nF : Fin n → Karoubi C\n⊢ (Finset.sum Finset.univ fun j => Bicone.π (Biproducts.bicone F) j ≫ Bicone.ι (Biproducts.bicone F) j) =\n 𝟙 (Biproducts.bicone F).pt\n[PROOFSTEP]\nsimp only [hom_ext_iff]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{v, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteBiproducts C\nn : ℕ\nF : Fin n → Karoubi C\n⊢ (Finset.sum Finset.univ fun j => Bicone.π (Biproducts.bicone F) j ≫ Bicone.ι (Biproducts.bicone F) j).f =\n (𝟙 (Biproducts.bicone F).pt).f\n[PROOFSTEP]\nrefine' biproduct.hom_ext' _ _ (fun j => _)\n[GOAL]\nC : Type u_1\ninst✝² : Category.{v, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteBiproducts C\nn : ℕ\nF : Fin n → Karoubi C\nj : Fin n\n⊢ biproduct.ι (fun j => (F j).X) j ≫\n (Finset.sum Finset.univ fun j => Bicone.π (Biproducts.bicone F) j ≫ Bicone.ι (Biproducts.bicone F) j).f =\n biproduct.ι (fun j => (F j).X) j ≫ (𝟙 (Biproducts.bicone F).pt).f\n[PROOFSTEP]\nsimp only [Biproducts.bicone_pt_X, sum_hom, comp_f, Biproducts.bicone_π_f, biproduct.bicone_π, biproduct.map_π,\n Biproducts.bicone_ι_f, biproduct.ι_map, assoc, idem_assoc, id_eq, Biproducts.bicone_pt_p, comp_sum]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{v, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteBiproducts C\nn : ℕ\nF : Fin n → Karoubi C\nj : Fin n\n⊢ (Finset.sum Finset.univ fun j_1 =>\n biproduct.ι (fun j => (F j).X) j ≫\n biproduct.π (fun b => (F b).X) j_1 ≫ (F j_1).p ≫ biproduct.ι (fun j => (F j).X) j_1) =\n (F j).p ≫ biproduct.ι (fun j => (F j).X) j\n[PROOFSTEP]\nrw [Finset.sum_eq_single j]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{v, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteBiproducts C\nn : ℕ\nF : Fin n → Karoubi C\nj : Fin n\n⊢ biproduct.ι (fun j => (F j).X) j ≫ biproduct.π (fun b => (F b).X) j ≫ (F j).p ≫ biproduct.ι (fun j => (F j).X) j =\n (F j).p ≫ biproduct.ι (fun j => (F j).X) j\n[PROOFSTEP]\nsimp only [bicone_ι_π_self_assoc]\n[GOAL]\ncase h₀\nC : Type u_1\ninst✝² : Category.{v, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteBiproducts C\nn : ℕ\nF : Fin n → Karoubi C\nj : Fin n\n⊢ ∀ (b : Fin n),\n b ∈ Finset.univ →\n b ≠ j →\n biproduct.ι (fun j => (F j).X) j ≫\n biproduct.π (fun b => (F b).X) b ≫ (F b).p ≫ biproduct.ι (fun j => (F j).X) b =\n 0\n[PROOFSTEP]\nintro b _ hb\n[GOAL]\ncase h₀\nC : Type u_1\ninst✝² : Category.{v, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteBiproducts C\nn : ℕ\nF : Fin n → Karoubi C\nj b : Fin n\na✝ : b ∈ Finset.univ\nhb : b ≠ j\n⊢ biproduct.ι (fun j => (F j).X) j ≫ biproduct.π (fun b => (F b).X) b ≫ (F b).p ≫ biproduct.ι (fun j => (F j).X) b = 0\n[PROOFSTEP]\nsimp only [biproduct.ι_π_ne_assoc _ hb.symm, zero_comp]\n[GOAL]\ncase h₁\nC : Type u_1\ninst✝² : Category.{v, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteBiproducts C\nn : ℕ\nF : Fin n → Karoubi C\nj : Fin n\n⊢ ¬j ∈ Finset.univ →\n biproduct.ι (fun j => (F j).X) j ≫ biproduct.π (fun b => (F b).X) j ≫ (F j).p ≫ biproduct.ι (fun j => (F j).X) j = 0\n[PROOFSTEP]\nintro hj\n[GOAL]\ncase h₁\nC : Type u_1\ninst✝² : Category.{v, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteBiproducts C\nn : ℕ\nF : Fin n → Karoubi C\nj : Fin n\nhj : ¬j ∈ Finset.univ\n⊢ biproduct.ι (fun j => (F j).X) j ≫ biproduct.π (fun b => (F b).X) j ≫ (F j).p ≫ biproduct.ι (fun j => (F j).X) j = 0\n[PROOFSTEP]\nsimp only [Finset.mem_univ, not_true] at hj \n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{v, u_1} C\ninst✝ : Preadditive C\nP : Karoubi C\n⊢ decompId_i P ≫ decompId_p (complement P) = 0\n[PROOFSTEP]\nsimp only [instAddCommGroupHom_zero, hom_ext_iff, complement_X, comp_f, decompId_i_f, decompId_p_f, complement_p,\n comp_sub, comp_id, idem, sub_self]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{v, u_1} C\ninst✝ : Preadditive C\nP : Karoubi C\n⊢ decompId_i (complement P) ≫ decompId_p P = 0\n[PROOFSTEP]\nsimp only [instAddCommGroupHom_zero, hom_ext_iff, complement_X, comp_f, decompId_i_f, complement_p, decompId_p_f,\n sub_comp, id_comp, idem, sub_self]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{v, u_1} C\ninst✝ : Preadditive C\nP : Karoubi C\n⊢ (BinaryBicone.mk (mk P.X (𝟙 P.X)) (decompId_p P) (decompId_p (complement P)) (decompId_i P)\n (decompId_i (complement P))).fst ≫\n (BinaryBicone.mk (mk P.X (𝟙 P.X)) (decompId_p P) (decompId_p (complement P)) (decompId_i P)\n (decompId_i (complement P))).inl +\n (BinaryBicone.mk (mk P.X (𝟙 P.X)) (decompId_p P) (decompId_p (complement P)) (decompId_i P)\n (decompId_i (complement P))).snd ≫\n (BinaryBicone.mk (mk P.X (𝟙 P.X)) (decompId_p P) (decompId_p (complement P)) (decompId_i P)\n (decompId_i (complement P))).inr =\n 𝟙\n (BinaryBicone.mk (mk P.X (𝟙 P.X)) (decompId_p P) (decompId_p (complement P)) (decompId_i P)\n (decompId_i (complement P))).pt\n[PROOFSTEP]\nsimp only [id_eq, complement_X, comp_f, decompId_i_f, decompId_p_f, complement_p, instAddCommGroupHom_add, idem,\n comp_sub, comp_id, sub_comp, id_comp, sub_self, sub_zero, add_sub_cancel'_right]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{v, u_1} C\ninst✝ : Preadditive C\nP : Karoubi C\n⊢ biprod.desc (decompId_i P) (decompId_i (complement P)) ≫ biprod.lift (decompId_p P) (decompId_p (complement P)) =\n 𝟙 (P ⊞ complement P)\n[PROOFSTEP]\napply biprod.hom_ext'\n[GOAL]\ncase h₀\nC : Type u_1\ninst✝¹ : Category.{v, u_1} C\ninst✝ : Preadditive C\nP : Karoubi C\n⊢ biprod.inl ≫\n biprod.desc (decompId_i P) (decompId_i (complement P)) ≫ biprod.lift (decompId_p P) (decompId_p (complement P)) =\n biprod.inl ≫ 𝟙 (P ⊞ complement P)\n[PROOFSTEP]\nrw [biprod.inl_desc_assoc, comp_id, biprod.lift_eq, comp_add, ← decompId_assoc, add_right_eq_self, ← assoc]\n[GOAL]\ncase h₀\nC : Type u_1\ninst✝¹ : Category.{v, u_1} C\ninst✝ : Preadditive C\nP : Karoubi C\n⊢ (decompId_i P ≫ decompId_p (complement P)) ≫ biprod.inr = 0\n[PROOFSTEP]\nrefine' (_ =≫ _).trans zero_comp\n[GOAL]\ncase h₀\nC : Type u_1\ninst✝¹ : Category.{v, u_1} C\ninst✝ : Preadditive C\nP : Karoubi C\n⊢ decompId_i P ≫ decompId_p (complement P) = 0\n[PROOFSTEP]\next\n[GOAL]\ncase h₀.h\nC : Type u_1\ninst✝¹ : Category.{v, u_1} C\ninst✝ : Preadditive C\nP : Karoubi C\n⊢ (decompId_i P ≫ decompId_p (complement P)).f = 0.f\n[PROOFSTEP]\nsimp only [comp_f, toKaroubi_obj_X, decompId_i_f, decompId_p_f, complement_p, comp_sub, comp_id, idem, sub_self,\n instAddCommGroupHom_zero]\n[GOAL]\ncase h₁\nC : Type u_1\ninst✝¹ : Category.{v, u_1} C\ninst✝ : Preadditive C\nP : Karoubi C\n⊢ biprod.inr ≫\n biprod.desc (decompId_i P) (decompId_i (complement P)) ≫ biprod.lift (decompId_p P) (decompId_p (complement P)) =\n biprod.inr ≫ 𝟙 (P ⊞ complement P)\n[PROOFSTEP]\nrw [biprod.inr_desc_assoc, comp_id, biprod.lift_eq, comp_add, ← decompId_assoc, add_left_eq_self, ← assoc]\n[GOAL]\ncase h₁\nC : Type u_1\ninst✝¹ : Category.{v, u_1} C\ninst✝ : Preadditive C\nP : Karoubi C\n⊢ (decompId_i (complement P) ≫ decompId_p P) ≫ biprod.inl = 0\n[PROOFSTEP]\nrefine' (_ =≫ _).trans zero_comp\n[GOAL]\ncase h₁\nC : Type u_1\ninst✝¹ : Category.{v, u_1} C\ninst✝ : Preadditive C\nP : Karoubi C\n⊢ decompId_i (complement P) ≫ decompId_p P = 0\n[PROOFSTEP]\next\n[GOAL]\ncase h₁.h\nC : Type u_1\ninst✝¹ : Category.{v, u_1} C\ninst✝ : Preadditive C\nP : Karoubi C\n⊢ (decompId_i (complement P) ≫ decompId_p P).f = 0.f\n[PROOFSTEP]\nsimp only [complement_X, comp_f, decompId_i_f, complement_p, decompId_p_f, sub_comp, id_comp, idem, sub_self,\n instAddCommGroupHom_zero]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{v, u_1} C\ninst✝ : Preadditive C\nP : Karoubi C\n⊢ biprod.lift (decompId_p P) (decompId_p (complement P)) ≫ biprod.desc (decompId_i P) (decompId_i (complement P)) =\n 𝟙 ((toKaroubi C).obj P.X)\n[PROOFSTEP]\nsimp only [biprod.lift_desc, instAddCommGroupHom_add, toKaroubi_obj_X, comp_f, decompId_p_f, decompId_i_f, idem,\n complement_X, complement_p, comp_sub, comp_id, sub_comp, id_comp, sub_self, sub_zero, add_sub_cancel'_right, id_eq,\n toKaroubi_obj_p]\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Idempotents.Biproducts", "llama_tokens": 6219, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO", "lm_q1_score": 0.4610167793123159, "lm_q2_score": 0.022286185295708725, "lm_q1q2_score": 0.01027430536818513}} {"text": "[GOAL]\nα : Type ?u.3173\nι : Type ?u.3179\nκ : Type ?u.3180\nC : (ι → Option α) → κ\n⊢ Inhabited (ColorFocused C)\n[PROOFSTEP]\nrefine' ⟨⟨0, fun _ => none, fun h => _, Multiset.nodup_zero⟩⟩\n[GOAL]\nα : Type ?u.3173\nι : Type ?u.3179\nκ : Type ?u.3180\nC : (ι → Option α) → κ\nh : AlmostMono C\n⊢ h ∈ 0 → (fun x i => Option.getD (idxFun h.line i) x) none = fun x => none\n[PROOFSTEP]\nsimp only [Multiset.not_mem_zero, IsEmpty.forall_iff]\n[GOAL]\nα : Type ?u.3673\nα' : Type ?u.3677\nι : Type ?u.3674\nf : α → α'\nl : Line α ι\n⊢ (fun i => Option.map f (idxFun l i)) (Exists.choose (_ : ∃ i, idxFun l i = none)) = none\n[PROOFSTEP]\nsimp only [l.proper.choose_spec, Option.map_none']\n[GOAL]\nα : Type u_1\nι : Type u_2\nl : Line α ι\nx : α\ni : ι\nh : idxFun l i = none\n⊢ (fun x i => Option.getD (idxFun l i) x) x i = x\n[PROOFSTEP]\nsimp only [Option.getD_none, h, l.apply]\n[GOAL]\nα : Type u_1\nι : Type u_2\nl : Line α ι\nx : α\ni : ι\nh : idxFun l i ≠ none\n⊢ some ((fun x i => Option.getD (idxFun l i) x) x i) = idxFun l i\n[PROOFSTEP]\nrw [l.apply, Option.getD_of_ne_none h]\n[GOAL]\nα : Type u_1\nα' : Type u_2\nι : Type u_3\nf : α → α'\nl : Line α ι\nx : α\n⊢ (fun x i => Option.getD (idxFun (map f l) i) x) (f x) = f ∘ (fun x i => Option.getD (idxFun l i) x) x\n[PROOFSTEP]\nsimp only [Line.apply, Line.map, Option.getD_map]\n[GOAL]\nα : Type u_1\nα' : Type u_2\nι : Type u_3\nf : α → α'\nl : Line α ι\nx : α\n⊢ (fun i => f (Option.getD (idxFun l i) x)) = f ∘ fun i => Option.getD (idxFun l i) x\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nι : Type u_2\nι' : Type u_3\nv : ι → α\nl : Line α ι'\nx : α\n⊢ (fun x i => Option.getD (idxFun (vertical v l) i) x) x = Sum.elim v ((fun x i => Option.getD (idxFun l i) x) x)\n[PROOFSTEP]\nfunext i\n[GOAL]\ncase h\nα : Type u_1\nι : Type u_2\nι' : Type u_3\nv : ι → α\nl : Line α ι'\nx : α\ni : ι ⊕ ι'\n⊢ (fun x i => Option.getD (idxFun (vertical v l) i) x) x i = Sum.elim v ((fun x i => Option.getD (idxFun l i) x) x) i\n[PROOFSTEP]\ncases i\n[GOAL]\ncase h.inl\nα : Type u_1\nι : Type u_2\nι' : Type u_3\nv : ι → α\nl : Line α ι'\nx : α\nval✝ : ι\n⊢ (fun x i => Option.getD (idxFun (vertical v l) i) x) x (Sum.inl val✝) =\n Sum.elim v ((fun x i => Option.getD (idxFun l i) x) x) (Sum.inl val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.inr\nα : Type u_1\nι : Type u_2\nι' : Type u_3\nv : ι → α\nl : Line α ι'\nx : α\nval✝ : ι'\n⊢ (fun x i => Option.getD (idxFun (vertical v l) i) x) x (Sum.inr val✝) =\n Sum.elim v ((fun x i => Option.getD (idxFun l i) x) x) (Sum.inr val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nι : Type u_2\nι' : Type u_3\nl : Line α ι\nv : ι' → α\nx : α\n⊢ (fun x i => Option.getD (idxFun (horizontal l v) i) x) x = Sum.elim ((fun x i => Option.getD (idxFun l i) x) x) v\n[PROOFSTEP]\nfunext i\n[GOAL]\ncase h\nα : Type u_1\nι : Type u_2\nι' : Type u_3\nl : Line α ι\nv : ι' → α\nx : α\ni : ι ⊕ ι'\n⊢ (fun x i => Option.getD (idxFun (horizontal l v) i) x) x i = Sum.elim ((fun x i => Option.getD (idxFun l i) x) x) v i\n[PROOFSTEP]\ncases i\n[GOAL]\ncase h.inl\nα : Type u_1\nι : Type u_2\nι' : Type u_3\nl : Line α ι\nv : ι' → α\nx : α\nval✝ : ι\n⊢ (fun x i => Option.getD (idxFun (horizontal l v) i) x) x (Sum.inl val✝) =\n Sum.elim ((fun x i => Option.getD (idxFun l i) x) x) v (Sum.inl val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.inr\nα : Type u_1\nι : Type u_2\nι' : Type u_3\nl : Line α ι\nv : ι' → α\nx : α\nval✝ : ι'\n⊢ (fun x i => Option.getD (idxFun (horizontal l v) i) x) x (Sum.inr val✝) =\n Sum.elim ((fun x i => Option.getD (idxFun l i) x) x) v (Sum.inr val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nι : Type u_2\nι' : Type u_3\nl : Line α ι\nl' : Line α ι'\nx : α\n⊢ (fun x i => Option.getD (idxFun (prod l l') i) x) x =\n Sum.elim ((fun x i => Option.getD (idxFun l i) x) x) ((fun x i => Option.getD (idxFun l' i) x) x)\n[PROOFSTEP]\nfunext i\n[GOAL]\ncase h\nα : Type u_1\nι : Type u_2\nι' : Type u_3\nl : Line α ι\nl' : Line α ι'\nx : α\ni : ι ⊕ ι'\n⊢ (fun x i => Option.getD (idxFun (prod l l') i) x) x i =\n Sum.elim ((fun x i => Option.getD (idxFun l i) x) x) ((fun x i => Option.getD (idxFun l' i) x) x) i\n[PROOFSTEP]\ncases i\n[GOAL]\ncase h.inl\nα : Type u_1\nι : Type u_2\nι' : Type u_3\nl : Line α ι\nl' : Line α ι'\nx : α\nval✝ : ι\n⊢ (fun x i => Option.getD (idxFun (prod l l') i) x) x (Sum.inl val✝) =\n Sum.elim ((fun x i => Option.getD (idxFun l i) x) x) ((fun x i => Option.getD (idxFun l' i) x) x) (Sum.inl val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.inr\nα : Type u_1\nι : Type u_2\nι' : Type u_3\nl : Line α ι\nl' : Line α ι'\nx : α\nval✝ : ι'\n⊢ (fun x i => Option.getD (idxFun (prod l l') i) x) x (Sum.inr val✝) =\n Sum.elim ((fun x i => Option.getD (idxFun l i) x) x) ((fun x i => Option.getD (idxFun l' i) x) x) (Sum.inr val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝ : Nonempty ι\nx : α\n⊢ (fun x i => Option.getD (idxFun (diagonal α ι) i) x) x = fun x_1 => x\n[PROOFSTEP]\nsimp_rw [Line.diagonal, Option.getD_none]\n[GOAL]\nα α' : Type u\ne : α ≃ α'\nκ : Type (max v u)\nx✝¹ : Finite κ\nι : Type\nx✝ : Fintype ι\nh : ∀ (C : (ι → α) → κ), ∃ l, IsMono C l\nC : (ι → α') → κ\nl : Line α ι\nc : κ\nlc : ∀ (x : α), (fun v => C (↑e ∘ v)) ((fun x i => Option.getD (idxFun l i) x) x) = c\nx : α\n⊢ C ((fun x i => Option.getD (idxFun (map (↑e) l) i) x) (↑e x)) = c\n[PROOFSTEP]\nrw [← lc x, Line.map_apply]\n[GOAL]\n⊢ ∀ (κ : Type (max v u)) [inst : Finite κ], ∃ ι x, ∀ (C : (ι → PEmpty) → κ), ∃ l, IsMono C l\n[PROOFSTEP]\nintro κ _\n[GOAL]\nκ : Type (max v u)\ninst✝ : Finite κ\n⊢ ∃ ι x, ∀ (C : (ι → PEmpty) → κ), ∃ l, IsMono C l\n[PROOFSTEP]\nby_cases h : Nonempty κ\n[GOAL]\ncase pos\nκ : Type (max v u)\ninst✝ : Finite κ\nh : Nonempty κ\n⊢ ∃ ι x, ∀ (C : (ι → PEmpty) → κ), ∃ l, IsMono C l\n[PROOFSTEP]\nrefine' ⟨Unit, inferInstance, fun C => ⟨default, Classical.arbitrary _, PEmpty.rec⟩⟩\n[GOAL]\ncase neg\nκ : Type (max v u)\ninst✝ : Finite κ\nh : ¬Nonempty κ\n⊢ ∃ ι x, ∀ (C : (ι → PEmpty) → κ), ∃ l, IsMono C l\n[PROOFSTEP]\nexact ⟨Empty, inferInstance, fun C => (h ⟨C (Empty.rec)⟩).elim⟩\n[GOAL]\n⊢ ∀ {α : Type u} [inst : Fintype α],\n (∀ (κ : Type (max v u)) [inst : Finite κ], ∃ ι x, ∀ (C : (ι → α) → κ), ∃ l, IsMono C l) →\n ∀ (κ : Type (max v u)) [inst : Finite κ], ∃ ι x, ∀ (C : (ι → Option α) → κ), ∃ l, IsMono C l\n[PROOFSTEP]\nintro α _ ihα κ _\n[GOAL]\nα : Type u\ninst✝¹ : Fintype α\nihα : ∀ (κ : Type (max v u)) [inst : Finite κ], ∃ ι x, ∀ (C : (ι → α) → κ), ∃ l, IsMono C l\nκ : Type (max v u)\ninst✝ : Finite κ\n⊢ ∃ ι x, ∀ (C : (ι → Option α) → κ), ∃ l, IsMono C l\n[PROOFSTEP]\ncases nonempty_fintype κ\n[GOAL]\ncase intro\nα : Type u\ninst✝¹ : Fintype α\nihα : ∀ (κ : Type (max v u)) [inst : Finite κ], ∃ ι x, ∀ (C : (ι → α) → κ), ∃ l, IsMono C l\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\n⊢ ∃ ι x, ∀ (C : (ι → Option α) → κ), ∃ l, IsMono C l\n[PROOFSTEP]\nby_cases h : Nonempty α\n[GOAL]\ncase pos\nα : Type u\ninst✝¹ : Fintype α\nihα : ∀ (κ : Type (max v u)) [inst : Finite κ], ∃ ι x, ∀ (C : (ι → α) → κ), ∃ l, IsMono C l\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh : Nonempty α\n⊢ ∃ ι x, ∀ (C : (ι → Option α) → κ), ∃ l, IsMono C l\ncase neg\nα : Type u\ninst✝¹ : Fintype α\nihα : ∀ (κ : Type (max v u)) [inst : Finite κ], ∃ ι x, ∀ (C : (ι → α) → κ), ∃ l, IsMono C l\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh : ¬Nonempty α\n⊢ ∃ ι x, ∀ (C : (ι → Option α) → κ), ∃ l, IsMono C l\n[PROOFSTEP]\ncase neg =>\n refine' ⟨Unit, inferInstance, fun C => ⟨diagonal _ Unit, C fun _ => none, ?_⟩⟩\n rintro (_ | ⟨a⟩)\n · rfl\n · exact (h ⟨a⟩).elim\n[GOAL]\nα : Type u\ninst✝¹ : Fintype α\nihα : ∀ (κ : Type (max v u)) [inst : Finite κ], ∃ ι x, ∀ (C : (ι → α) → κ), ∃ l, IsMono C l\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh : ¬Nonempty α\n⊢ ∃ ι x, ∀ (C : (ι → Option α) → κ), ∃ l, IsMono C l\n[PROOFSTEP]\ncase neg =>\n refine' ⟨Unit, inferInstance, fun C => ⟨diagonal _ Unit, C fun _ => none, ?_⟩⟩\n rintro (_ | ⟨a⟩)\n · rfl\n · exact (h ⟨a⟩).elim\n[GOAL]\nα : Type u\ninst✝¹ : Fintype α\nihα : ∀ (κ : Type (max v u)) [inst : Finite κ], ∃ ι x, ∀ (C : (ι → α) → κ), ∃ l, IsMono C l\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh : ¬Nonempty α\n⊢ ∃ ι x, ∀ (C : (ι → Option α) → κ), ∃ l, IsMono C l\n[PROOFSTEP]\nrefine' ⟨Unit, inferInstance, fun C => ⟨diagonal _ Unit, C fun _ => none, ?_⟩⟩\n[GOAL]\nα : Type u\ninst✝¹ : Fintype α\nihα : ∀ (κ : Type (max v u)) [inst : Finite κ], ∃ ι x, ∀ (C : (ι → α) → κ), ∃ l, IsMono C l\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh : ¬Nonempty α\nC : (Unit → Option α) → κ\n⊢ ∀ (x : Option α), C ((fun x i => Option.getD (idxFun (diagonal (Option α) Unit) i) x) x) = C fun x => none\n[PROOFSTEP]\nrintro (_ | ⟨a⟩)\n[GOAL]\ncase none\nα : Type u\ninst✝¹ : Fintype α\nihα : ∀ (κ : Type (max v u)) [inst : Finite κ], ∃ ι x, ∀ (C : (ι → α) → κ), ∃ l, IsMono C l\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh : ¬Nonempty α\nC : (Unit → Option α) → κ\n⊢ C ((fun x i => Option.getD (idxFun (diagonal (Option α) Unit) i) x) none) = C fun x => none\n[PROOFSTEP]\nrfl\n[GOAL]\ncase some\nα : Type u\ninst✝¹ : Fintype α\nihα : ∀ (κ : Type (max v u)) [inst : Finite κ], ∃ ι x, ∀ (C : (ι → α) → κ), ∃ l, IsMono C l\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh : ¬Nonempty α\nC : (Unit → Option α) → κ\na : α\n⊢ C ((fun x i => Option.getD (idxFun (diagonal (Option α) Unit) i) x) (some a)) = C fun x => none\n[PROOFSTEP]\nexact (h ⟨a⟩).elim\n[GOAL]\ncase pos\nα : Type u\ninst✝¹ : Fintype α\nihα : ∀ (κ : Type (max v u)) [inst : Finite κ], ∃ ι x, ∀ (C : (ι → α) → κ), ∃ l, IsMono C l\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh : Nonempty α\n⊢ ∃ ι x, ∀ (C : (ι → Option α) → κ), ∃ l, IsMono C l\n[PROOFSTEP]\nsuffices key :\n ∀ r : ℕ,\n ∃ (ι : Type) (_ : Fintype ι),\n ∀ C : (ι → Option α) → κ, (∃ s : ColorFocused C, Multiset.card s.lines = r) ∨ ∃ l, IsMono C l\n[GOAL]\ncase pos\nα : Type u\ninst✝¹ : Fintype α\nihα : ∀ (κ : Type (max v u)) [inst : Finite κ], ∃ ι x, ∀ (C : (ι → α) → κ), ∃ l, IsMono C l\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh : Nonempty α\nkey : ∀ (r : ℕ), ∃ ι x, ∀ (C : (ι → Option α) → κ), (∃ s, ↑Multiset.card s.lines = r) ∨ ∃ l, IsMono C l\n⊢ ∃ ι x, ∀ (C : (ι → Option α) → κ), ∃ l, IsMono C l\n[PROOFSTEP]\nobtain ⟨ι, _inst, hι⟩ := key (Fintype.card κ + 1)\n[GOAL]\ncase pos.intro.intro\nα : Type u\ninst✝¹ : Fintype α\nihα : ∀ (κ : Type (max v u)) [inst : Finite κ], ∃ ι x, ∀ (C : (ι → α) → κ), ∃ l, IsMono C l\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh : Nonempty α\nkey : ∀ (r : ℕ), ∃ ι x, ∀ (C : (ι → Option α) → κ), (∃ s, ↑Multiset.card s.lines = r) ∨ ∃ l, IsMono C l\nι : Type\n_inst : Fintype ι\nhι : ∀ (C : (ι → Option α) → κ), (∃ s, ↑Multiset.card s.lines = Fintype.card κ + 1) ∨ ∃ l, IsMono C l\n⊢ ∃ ι x, ∀ (C : (ι → Option α) → κ), ∃ l, IsMono C l\n[PROOFSTEP]\nrefine' ⟨ι, _inst, fun C => (hι C).resolve_left _⟩\n[GOAL]\ncase pos.intro.intro\nα : Type u\ninst✝¹ : Fintype α\nihα : ∀ (κ : Type (max v u)) [inst : Finite κ], ∃ ι x, ∀ (C : (ι → α) → κ), ∃ l, IsMono C l\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh : Nonempty α\nkey : ∀ (r : ℕ), ∃ ι x, ∀ (C : (ι → Option α) → κ), (∃ s, ↑Multiset.card s.lines = r) ∨ ∃ l, IsMono C l\nι : Type\n_inst : Fintype ι\nhι : ∀ (C : (ι → Option α) → κ), (∃ s, ↑Multiset.card s.lines = Fintype.card κ + 1) ∨ ∃ l, IsMono C l\nC : (ι → Option α) → κ\n⊢ ¬∃ s, ↑Multiset.card s.lines = Fintype.card κ + 1\n[PROOFSTEP]\nrintro ⟨s, sr⟩\n[GOAL]\ncase pos.intro.intro.intro\nα : Type u\ninst✝¹ : Fintype α\nihα : ∀ (κ : Type (max v u)) [inst : Finite κ], ∃ ι x, ∀ (C : (ι → α) → κ), ∃ l, IsMono C l\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh : Nonempty α\nkey : ∀ (r : ℕ), ∃ ι x, ∀ (C : (ι → Option α) → κ), (∃ s, ↑Multiset.card s.lines = r) ∨ ∃ l, IsMono C l\nι : Type\n_inst : Fintype ι\nhι : ∀ (C : (ι → Option α) → κ), (∃ s, ↑Multiset.card s.lines = Fintype.card κ + 1) ∨ ∃ l, IsMono C l\nC : (ι → Option α) → κ\ns : ColorFocused C\nsr : ↑Multiset.card s.lines = Fintype.card κ + 1\n⊢ False\n[PROOFSTEP]\napply Nat.not_succ_le_self (Fintype.card κ)\n[GOAL]\ncase pos.intro.intro.intro\nα : Type u\ninst✝¹ : Fintype α\nihα : ∀ (κ : Type (max v u)) [inst : Finite κ], ∃ ι x, ∀ (C : (ι → α) → κ), ∃ l, IsMono C l\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh : Nonempty α\nkey : ∀ (r : ℕ), ∃ ι x, ∀ (C : (ι → Option α) → κ), (∃ s, ↑Multiset.card s.lines = r) ∨ ∃ l, IsMono C l\nι : Type\n_inst : Fintype ι\nhι : ∀ (C : (ι → Option α) → κ), (∃ s, ↑Multiset.card s.lines = Fintype.card κ + 1) ∨ ∃ l, IsMono C l\nC : (ι → Option α) → κ\ns : ColorFocused C\nsr : ↑Multiset.card s.lines = Fintype.card κ + 1\n⊢ Nat.succ (Fintype.card κ) ≤ Fintype.card κ\n[PROOFSTEP]\nrw [← Nat.add_one, ← sr, ← Multiset.card_map, ← Finset.card_mk]\n[GOAL]\ncase pos.intro.intro.intro\nα : Type u\ninst✝¹ : Fintype α\nihα : ∀ (κ : Type (max v u)) [inst : Finite κ], ∃ ι x, ∀ (C : (ι → α) → κ), ∃ l, IsMono C l\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh : Nonempty α\nkey : ∀ (r : ℕ), ∃ ι x, ∀ (C : (ι → Option α) → κ), (∃ s, ↑Multiset.card s.lines = r) ∨ ∃ l, IsMono C l\nι : Type\n_inst : Fintype ι\nhι : ∀ (C : (ι → Option α) → κ), (∃ s, ↑Multiset.card s.lines = Fintype.card κ + 1) ∨ ∃ l, IsMono C l\nC : (ι → Option α) → κ\ns : ColorFocused C\nsr : ↑Multiset.card s.lines = Fintype.card κ + 1\n⊢ Finset.card { val := Multiset.map ?pos.intro.intro.intro.f✝ s.lines, nodup := ?m.16664 } ≤ Fintype.card κ\nα : Type u\ninst✝¹ : Fintype α\nihα : ∀ (κ : Type (max v u)) [inst : Finite κ], ∃ ι x, ∀ (C : (ι → α) → κ), ∃ l, IsMono C l\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh : Nonempty α\nkey : ∀ (r : ℕ), ∃ ι x, ∀ (C : (ι → Option α) → κ), (∃ s, ↑Multiset.card s.lines = r) ∨ ∃ l, IsMono C l\nι : Type\n_inst : Fintype ι\nhι : ∀ (C : (ι → Option α) → κ), (∃ s, ↑Multiset.card s.lines = Fintype.card κ + 1) ∨ ∃ l, IsMono C l\nC : (ι → Option α) → κ\ns : ColorFocused C\nsr : ↑Multiset.card s.lines = Fintype.card κ + 1\n⊢ Type ?u.16661\ncase pos.intro.intro.intro.f\nα : Type u\ninst✝¹ : Fintype α\nihα : ∀ (κ : Type (max v u)) [inst : Finite κ], ∃ ι x, ∀ (C : (ι → α) → κ), ∃ l, IsMono C l\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh : Nonempty α\nkey : ∀ (r : ℕ), ∃ ι x, ∀ (C : (ι → Option α) → κ), (∃ s, ↑Multiset.card s.lines = r) ∨ ∃ l, IsMono C l\nι : Type\n_inst : Fintype ι\nhι : ∀ (C : (ι → Option α) → κ), (∃ s, ↑Multiset.card s.lines = Fintype.card κ + 1) ∨ ∃ l, IsMono C l\nC : (ι → Option α) → κ\ns : ColorFocused C\nsr : ↑Multiset.card s.lines = Fintype.card κ + 1\n⊢ AlmostMono C → ?m.16662\nα : Type u\ninst✝¹ : Fintype α\nihα : ∀ (κ : Type (max v u)) [inst : Finite κ], ∃ ι x, ∀ (C : (ι → α) → κ), ∃ l, IsMono C l\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh : Nonempty α\nkey : ∀ (r : ℕ), ∃ ι x, ∀ (C : (ι → Option α) → κ), (∃ s, ↑Multiset.card s.lines = r) ∨ ∃ l, IsMono C l\nι : Type\n_inst : Fintype ι\nhι : ∀ (C : (ι → Option α) → κ), (∃ s, ↑Multiset.card s.lines = Fintype.card κ + 1) ∨ ∃ l, IsMono C l\nC : (ι → Option α) → κ\ns : ColorFocused C\nsr : ↑Multiset.card s.lines = Fintype.card κ + 1\n⊢ Multiset.Nodup (Multiset.map ?pos.intro.intro.intro.f✝ s.lines)\ncase pos.intro.intro.intro.f\nα : Type u\ninst✝¹ : Fintype α\nihα : ∀ (κ : Type (max v u)) [inst : Finite κ], ∃ ι x, ∀ (C : (ι → α) → κ), ∃ l, IsMono C l\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh : Nonempty α\nkey : ∀ (r : ℕ), ∃ ι x, ∀ (C : (ι → Option α) → κ), (∃ s, ↑Multiset.card s.lines = r) ∨ ∃ l, IsMono C l\nι : Type\n_inst : Fintype ι\nhι : ∀ (C : (ι → Option α) → κ), (∃ s, ↑Multiset.card s.lines = Fintype.card κ + 1) ∨ ∃ l, IsMono C l\nC : (ι → Option α) → κ\ns : ColorFocused C\nsr : ↑Multiset.card s.lines = Fintype.card κ + 1\n⊢ AlmostMono C → ?m.16662\n[PROOFSTEP]\nexact\n Finset.card_le_univ\n ⟨_, s.distinct_colors⟩\n -- We now prove the key claim, by induction on `r`.\n[GOAL]\ncase key\nα : Type u\ninst✝¹ : Fintype α\nihα : ∀ (κ : Type (max v u)) [inst : Finite κ], ∃ ι x, ∀ (C : (ι → α) → κ), ∃ l, IsMono C l\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh : Nonempty α\n⊢ ∀ (r : ℕ), ∃ ι x, ∀ (C : (ι → Option α) → κ), (∃ s, ↑Multiset.card s.lines = r) ∨ ∃ l, IsMono C l\n[PROOFSTEP]\nintro r\n[GOAL]\ncase key\nα : Type u\ninst✝¹ : Fintype α\nihα : ∀ (κ : Type (max v u)) [inst : Finite κ], ∃ ι x, ∀ (C : (ι → α) → κ), ∃ l, IsMono C l\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh : Nonempty α\nr : ℕ\n⊢ ∃ ι x, ∀ (C : (ι → Option α) → κ), (∃ s, ↑Multiset.card s.lines = r) ∨ ∃ l, IsMono C l\n[PROOFSTEP]\ninduction' r with r ihr\n[GOAL]\ncase key.zero\nα : Type u\ninst✝¹ : Fintype α\nihα : ∀ (κ : Type (max v u)) [inst : Finite κ], ∃ ι x, ∀ (C : (ι → α) → κ), ∃ l, IsMono C l\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh : Nonempty α\n⊢ ∃ ι x, ∀ (C : (ι → Option α) → κ), (∃ s, ↑Multiset.card s.lines = Nat.zero) ∨ ∃ l, IsMono C l\n[PROOFSTEP]\nexact\n ⟨Empty, inferInstance, fun C => Or.inl ⟨default, Multiset.card_zero⟩⟩\n -- Supposing the key claim holds for `r`, we need to show it for `r+1`. First pick a high\n -- enough dimension `ι` for `r`.\n[GOAL]\ncase key.succ\nα : Type u\ninst✝¹ : Fintype α\nihα : ∀ (κ : Type (max v u)) [inst : Finite κ], ∃ ι x, ∀ (C : (ι → α) → κ), ∃ l, IsMono C l\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh : Nonempty α\nr : ℕ\nihr : ∃ ι x, ∀ (C : (ι → Option α) → κ), (∃ s, ↑Multiset.card s.lines = r) ∨ ∃ l, IsMono C l\n⊢ ∃ ι x, ∀ (C : (ι → Option α) → κ), (∃ s, ↑Multiset.card s.lines = Nat.succ r) ∨ ∃ l, IsMono C l\n[PROOFSTEP]\nobtain ⟨ι, _inst, hι⟩ := ihr\n[GOAL]\ncase key.succ.intro.intro\nα : Type u\ninst✝¹ : Fintype α\nihα : ∀ (κ : Type (max v u)) [inst : Finite κ], ∃ ι x, ∀ (C : (ι → α) → κ), ∃ l, IsMono C l\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh : Nonempty α\nr : ℕ\nι : Type\n_inst : Fintype ι\nhι : ∀ (C : (ι → Option α) → κ), (∃ s, ↑Multiset.card s.lines = r) ∨ ∃ l, IsMono C l\n⊢ ∃ ι x, ∀ (C : (ι → Option α) → κ), (∃ s, ↑Multiset.card s.lines = Nat.succ r) ∨ ∃ l, IsMono C l\n[PROOFSTEP]\nspecialize ihα ((ι → Option α) → κ)\n[GOAL]\ncase key.succ.intro.intro\nα : Type u\ninst✝¹ : Fintype α\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh : Nonempty α\nr : ℕ\nι : Type\n_inst : Fintype ι\nhι : ∀ (C : (ι → Option α) → κ), (∃ s, ↑Multiset.card s.lines = r) ∨ ∃ l, IsMono C l\nihα : ∃ ι_1 x, ∀ (C : (ι_1 → α) → (ι → Option α) → κ), ∃ l, IsMono C l\n⊢ ∃ ι x, ∀ (C : (ι → Option α) → κ), (∃ s, ↑Multiset.card s.lines = Nat.succ r) ∨ ∃ l, IsMono C l\n[PROOFSTEP]\nobtain ⟨ι', _inst, hι'⟩ := ihα\n[GOAL]\ncase key.succ.intro.intro.intro.intro\nα : Type u\ninst✝¹ : Fintype α\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh : Nonempty α\nr : ℕ\nι : Type\n_inst✝ : Fintype ι\nhι : ∀ (C : (ι → Option α) → κ), (∃ s, ↑Multiset.card s.lines = r) ∨ ∃ l, IsMono C l\nι' : Type\n_inst : Fintype ι'\nhι' : ∀ (C : (ι' → α) → (ι → Option α) → κ), ∃ l, IsMono C l\n⊢ ∃ ι x, ∀ (C : (ι → Option α) → κ), (∃ s, ↑Multiset.card s.lines = Nat.succ r) ∨ ∃ l, IsMono C l\n[PROOFSTEP]\nrefine' ⟨Sum ι ι', inferInstance, _⟩\n[GOAL]\ncase key.succ.intro.intro.intro.intro\nα : Type u\ninst✝¹ : Fintype α\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh : Nonempty α\nr : ℕ\nι : Type\n_inst✝ : Fintype ι\nhι : ∀ (C : (ι → Option α) → κ), (∃ s, ↑Multiset.card s.lines = r) ∨ ∃ l, IsMono C l\nι' : Type\n_inst : Fintype ι'\nhι' : ∀ (C : (ι' → α) → (ι → Option α) → κ), ∃ l, IsMono C l\n⊢ ∀ (C : (ι ⊕ ι' → Option α) → κ), (∃ s, ↑Multiset.card s.lines = Nat.succ r) ∨ ∃ l, IsMono C l\n[PROOFSTEP]\nintro C\n[GOAL]\ncase key.succ.intro.intro.intro.intro\nα : Type u\ninst✝¹ : Fintype α\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh : Nonempty α\nr : ℕ\nι : Type\n_inst✝ : Fintype ι\nhι : ∀ (C : (ι → Option α) → κ), (∃ s, ↑Multiset.card s.lines = r) ∨ ∃ l, IsMono C l\nι' : Type\n_inst : Fintype ι'\nhι' : ∀ (C : (ι' → α) → (ι → Option α) → κ), ∃ l, IsMono C l\nC : (ι ⊕ ι' → Option α) → κ\n⊢ (∃ s, ↑Multiset.card s.lines = Nat.succ r) ∨ ∃ l, IsMono C l\n[PROOFSTEP]\nspecialize\n hι' fun v' v =>\n C\n (Sum.elim v (some ∘ v'))\n -- By choice of `ι'` this coloring has a monochromatic line `l'` with color class `C'`, where\n -- `C'` is a `κ`-coloring of `ι → α`.\n[GOAL]\ncase key.succ.intro.intro.intro.intro\nα : Type u\ninst✝¹ : Fintype α\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh : Nonempty α\nr : ℕ\nι : Type\n_inst✝ : Fintype ι\nhι : ∀ (C : (ι → Option α) → κ), (∃ s, ↑Multiset.card s.lines = r) ∨ ∃ l, IsMono C l\nι' : Type\n_inst : Fintype ι'\nC : (ι ⊕ ι' → Option α) → κ\nhι' : ∃ l, IsMono (fun v' v => C (Sum.elim v (some ∘ v'))) l\n⊢ (∃ s, ↑Multiset.card s.lines = Nat.succ r) ∨ ∃ l, IsMono C l\n[PROOFSTEP]\nobtain ⟨l', C', hl'⟩ := hι'\n[GOAL]\ncase key.succ.intro.intro.intro.intro.intro.intro\nα : Type u\ninst✝¹ : Fintype α\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh : Nonempty α\nr : ℕ\nι : Type\n_inst✝ : Fintype ι\nhι : ∀ (C : (ι → Option α) → κ), (∃ s, ↑Multiset.card s.lines = r) ∨ ∃ l, IsMono C l\nι' : Type\n_inst : Fintype ι'\nC : (ι ⊕ ι' → Option α) → κ\nl' : Line α ι'\nC' : (ι → Option α) → κ\nhl' : ∀ (x : α), (fun v' v => C (Sum.elim v (some ∘ v'))) ((fun x i => Option.getD (idxFun l' i) x) x) = C'\n⊢ (∃ s, ↑Multiset.card s.lines = Nat.succ r) ∨ ∃ l, IsMono C l\n[PROOFSTEP]\nhave mono_of_mono : (∃ l, IsMono C' l) → ∃ l, IsMono C l :=\n by\n rintro ⟨l, c, hl⟩\n refine' ⟨l.horizontal (some ∘ l' (Classical.arbitrary α)), c, fun x => _⟩\n rw [Line.horizontal_apply, ← hl, ← hl']\n -- By choice of `ι`, `C'` either has `r` color-focused lines or a monochromatic line.\n[GOAL]\nα : Type u\ninst✝¹ : Fintype α\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh : Nonempty α\nr : ℕ\nι : Type\n_inst✝ : Fintype ι\nhι : ∀ (C : (ι → Option α) → κ), (∃ s, ↑Multiset.card s.lines = r) ∨ ∃ l, IsMono C l\nι' : Type\n_inst : Fintype ι'\nC : (ι ⊕ ι' → Option α) → κ\nl' : Line α ι'\nC' : (ι → Option α) → κ\nhl' : ∀ (x : α), (fun v' v => C (Sum.elim v (some ∘ v'))) ((fun x i => Option.getD (idxFun l' i) x) x) = C'\n⊢ (∃ l, IsMono C' l) → ∃ l, IsMono C l\n[PROOFSTEP]\nrintro ⟨l, c, hl⟩\n[GOAL]\ncase intro.intro\nα : Type u\ninst✝¹ : Fintype α\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh : Nonempty α\nr : ℕ\nι : Type\n_inst✝ : Fintype ι\nhι : ∀ (C : (ι → Option α) → κ), (∃ s, ↑Multiset.card s.lines = r) ∨ ∃ l, IsMono C l\nι' : Type\n_inst : Fintype ι'\nC : (ι ⊕ ι' → Option α) → κ\nl' : Line α ι'\nC' : (ι → Option α) → κ\nhl' : ∀ (x : α), (fun v' v => C (Sum.elim v (some ∘ v'))) ((fun x i => Option.getD (idxFun l' i) x) x) = C'\nl : Line (Option α) ι\nc : κ\nhl : ∀ (x : Option α), C' ((fun x i => Option.getD (idxFun l i) x) x) = c\n⊢ ∃ l, IsMono C l\n[PROOFSTEP]\nrefine' ⟨l.horizontal (some ∘ l' (Classical.arbitrary α)), c, fun x => _⟩\n[GOAL]\ncase intro.intro\nα : Type u\ninst✝¹ : Fintype α\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh : Nonempty α\nr : ℕ\nι : Type\n_inst✝ : Fintype ι\nhι : ∀ (C : (ι → Option α) → κ), (∃ s, ↑Multiset.card s.lines = r) ∨ ∃ l, IsMono C l\nι' : Type\n_inst : Fintype ι'\nC : (ι ⊕ ι' → Option α) → κ\nl' : Line α ι'\nC' : (ι → Option α) → κ\nhl' : ∀ (x : α), (fun v' v => C (Sum.elim v (some ∘ v'))) ((fun x i => Option.getD (idxFun l' i) x) x) = C'\nl : Line (Option α) ι\nc : κ\nhl : ∀ (x : Option α), C' ((fun x i => Option.getD (idxFun l i) x) x) = c\nx : Option α\n⊢ C\n ((fun x i =>\n Option.getD\n (idxFun (horizontal l (some ∘ (fun x i => Option.getD (idxFun l' i) x) (Classical.arbitrary α))) i) x)\n x) =\n c\n[PROOFSTEP]\nrw [Line.horizontal_apply, ← hl, ← hl']\n -- By choice of `ι`, `C'` either has `r` color-focused lines or a monochromatic line.\n[GOAL]\ncase key.succ.intro.intro.intro.intro.intro.intro\nα : Type u\ninst✝¹ : Fintype α\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh : Nonempty α\nr : ℕ\nι : Type\n_inst✝ : Fintype ι\nhι : ∀ (C : (ι → Option α) → κ), (∃ s, ↑Multiset.card s.lines = r) ∨ ∃ l, IsMono C l\nι' : Type\n_inst : Fintype ι'\nC : (ι ⊕ ι' → Option α) → κ\nl' : Line α ι'\nC' : (ι → Option α) → κ\nhl' : ∀ (x : α), (fun v' v => C (Sum.elim v (some ∘ v'))) ((fun x i => Option.getD (idxFun l' i) x) x) = C'\nmono_of_mono : (∃ l, IsMono C' l) → ∃ l, IsMono C l\n⊢ (∃ s, ↑Multiset.card s.lines = Nat.succ r) ∨ ∃ l, IsMono C l\n[PROOFSTEP]\nspecialize hι C'\n[GOAL]\ncase key.succ.intro.intro.intro.intro.intro.intro\nα : Type u\ninst✝¹ : Fintype α\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh : Nonempty α\nr : ℕ\nι : Type\n_inst✝ : Fintype ι\nι' : Type\n_inst : Fintype ι'\nC : (ι ⊕ ι' → Option α) → κ\nl' : Line α ι'\nC' : (ι → Option α) → κ\nhl' : ∀ (x : α), (fun v' v => C (Sum.elim v (some ∘ v'))) ((fun x i => Option.getD (idxFun l' i) x) x) = C'\nmono_of_mono : (∃ l, IsMono C' l) → ∃ l, IsMono C l\nhι : (∃ s, ↑Multiset.card s.lines = r) ∨ ∃ l, IsMono C' l\n⊢ (∃ s, ↑Multiset.card s.lines = Nat.succ r) ∨ ∃ l, IsMono C l\n[PROOFSTEP]\nrcases hι with (⟨s, sr⟩ | h)\n[GOAL]\ncase key.succ.intro.intro.intro.intro.intro.intro.inl.intro\nα : Type u\ninst✝¹ : Fintype α\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh : Nonempty α\nr : ℕ\nι : Type\n_inst✝ : Fintype ι\nι' : Type\n_inst : Fintype ι'\nC : (ι ⊕ ι' → Option α) → κ\nl' : Line α ι'\nC' : (ι → Option α) → κ\nhl' : ∀ (x : α), (fun v' v => C (Sum.elim v (some ∘ v'))) ((fun x i => Option.getD (idxFun l' i) x) x) = C'\nmono_of_mono : (∃ l, IsMono C' l) → ∃ l, IsMono C l\ns : ColorFocused C'\nsr : ↑Multiset.card s.lines = r\n⊢ (∃ s, ↑Multiset.card s.lines = Nat.succ r) ∨ ∃ l, IsMono C l\ncase key.succ.intro.intro.intro.intro.intro.intro.inr\nα : Type u\ninst✝¹ : Fintype α\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh✝ : Nonempty α\nr : ℕ\nι : Type\n_inst✝ : Fintype ι\nι' : Type\n_inst : Fintype ι'\nC : (ι ⊕ ι' → Option α) → κ\nl' : Line α ι'\nC' : (ι → Option α) → κ\nhl' : ∀ (x : α), (fun v' v => C (Sum.elim v (some ∘ v'))) ((fun x i => Option.getD (idxFun l' i) x) x) = C'\nmono_of_mono : (∃ l, IsMono C' l) → ∃ l, IsMono C l\nh : ∃ l, IsMono C' l\n⊢ (∃ s, ↑Multiset.card s.lines = Nat.succ r) ∨ ∃ l, IsMono C l\n[PROOFSTEP]\non_goal 2 =>\n exact\n Or.inr\n (mono_of_mono h)\n -- Here we assume `C'` has `r` color focused lines. We split into cases depending on whether\n -- one of these `r` lines has the same color as the focus point.\n[GOAL]\ncase key.succ.intro.intro.intro.intro.intro.intro.inl.intro\nα : Type u\ninst✝¹ : Fintype α\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh : Nonempty α\nr : ℕ\nι : Type\n_inst✝ : Fintype ι\nι' : Type\n_inst : Fintype ι'\nC : (ι ⊕ ι' → Option α) → κ\nl' : Line α ι'\nC' : (ι → Option α) → κ\nhl' : ∀ (x : α), (fun v' v => C (Sum.elim v (some ∘ v'))) ((fun x i => Option.getD (idxFun l' i) x) x) = C'\nmono_of_mono : (∃ l, IsMono C' l) → ∃ l, IsMono C l\ns : ColorFocused C'\nsr : ↑Multiset.card s.lines = r\n⊢ (∃ s, ↑Multiset.card s.lines = Nat.succ r) ∨ ∃ l, IsMono C l\ncase key.succ.intro.intro.intro.intro.intro.intro.inr\nα : Type u\ninst✝¹ : Fintype α\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh✝ : Nonempty α\nr : ℕ\nι : Type\n_inst✝ : Fintype ι\nι' : Type\n_inst : Fintype ι'\nC : (ι ⊕ ι' → Option α) → κ\nl' : Line α ι'\nC' : (ι → Option α) → κ\nhl' : ∀ (x : α), (fun v' v => C (Sum.elim v (some ∘ v'))) ((fun x i => Option.getD (idxFun l' i) x) x) = C'\nmono_of_mono : (∃ l, IsMono C' l) → ∃ l, IsMono C l\nh : ∃ l, IsMono C' l\n⊢ (∃ s, ↑Multiset.card s.lines = Nat.succ r) ∨ ∃ l, IsMono C l\n[PROOFSTEP]\non_goal 2 =>\n exact\n Or.inr\n (mono_of_mono h)\n -- Here we assume `C'` has `r` color focused lines. We split into cases depending on whether\n -- one of these `r` lines has the same color as the focus point.\n[GOAL]\ncase key.succ.intro.intro.intro.intro.intro.intro.inr\nα : Type u\ninst✝¹ : Fintype α\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh✝ : Nonempty α\nr : ℕ\nι : Type\n_inst✝ : Fintype ι\nι' : Type\n_inst : Fintype ι'\nC : (ι ⊕ ι' → Option α) → κ\nl' : Line α ι'\nC' : (ι → Option α) → κ\nhl' : ∀ (x : α), (fun v' v => C (Sum.elim v (some ∘ v'))) ((fun x i => Option.getD (idxFun l' i) x) x) = C'\nmono_of_mono : (∃ l, IsMono C' l) → ∃ l, IsMono C l\nh : ∃ l, IsMono C' l\n⊢ (∃ s, ↑Multiset.card s.lines = Nat.succ r) ∨ ∃ l, IsMono C l\n[PROOFSTEP]\nexact\n Or.inr\n (mono_of_mono h)\n -- Here we assume `C'` has `r` color focused lines. We split into cases depending on whether\n -- one of these `r` lines has the same color as the focus point.\n[GOAL]\ncase key.succ.intro.intro.intro.intro.intro.intro.inl.intro\nα : Type u\ninst✝¹ : Fintype α\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh : Nonempty α\nr : ℕ\nι : Type\n_inst✝ : Fintype ι\nι' : Type\n_inst : Fintype ι'\nC : (ι ⊕ ι' → Option α) → κ\nl' : Line α ι'\nC' : (ι → Option α) → κ\nhl' : ∀ (x : α), (fun v' v => C (Sum.elim v (some ∘ v'))) ((fun x i => Option.getD (idxFun l' i) x) x) = C'\nmono_of_mono : (∃ l, IsMono C' l) → ∃ l, IsMono C l\ns : ColorFocused C'\nsr : ↑Multiset.card s.lines = r\n⊢ (∃ s, ↑Multiset.card s.lines = Nat.succ r) ∨ ∃ l, IsMono C l\n[PROOFSTEP]\nby_cases h : ∃ p ∈ s.lines, (p : AlmostMono _).color = C' s.focus\n[GOAL]\ncase pos\nα : Type u\ninst✝¹ : Fintype α\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh✝ : Nonempty α\nr : ℕ\nι : Type\n_inst✝ : Fintype ι\nι' : Type\n_inst : Fintype ι'\nC : (ι ⊕ ι' → Option α) → κ\nl' : Line α ι'\nC' : (ι → Option α) → κ\nhl' : ∀ (x : α), (fun v' v => C (Sum.elim v (some ∘ v'))) ((fun x i => Option.getD (idxFun l' i) x) x) = C'\nmono_of_mono : (∃ l, IsMono C' l) → ∃ l, IsMono C l\ns : ColorFocused C'\nsr : ↑Multiset.card s.lines = r\nh : ∃ p, p ∈ s.lines ∧ p.color = C' s.focus\n⊢ (∃ s, ↑Multiset.card s.lines = Nat.succ r) ∨ ∃ l, IsMono C l\n[PROOFSTEP]\nobtain ⟨p, p_mem, hp⟩ := h\n[GOAL]\ncase pos.intro.intro\nα : Type u\ninst✝¹ : Fintype α\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh : Nonempty α\nr : ℕ\nι : Type\n_inst✝ : Fintype ι\nι' : Type\n_inst : Fintype ι'\nC : (ι ⊕ ι' → Option α) → κ\nl' : Line α ι'\nC' : (ι → Option α) → κ\nhl' : ∀ (x : α), (fun v' v => C (Sum.elim v (some ∘ v'))) ((fun x i => Option.getD (idxFun l' i) x) x) = C'\nmono_of_mono : (∃ l, IsMono C' l) → ∃ l, IsMono C l\ns : ColorFocused C'\nsr : ↑Multiset.card s.lines = r\np : AlmostMono C'\np_mem : p ∈ s.lines\nhp : p.color = C' s.focus\n⊢ (∃ s, ↑Multiset.card s.lines = Nat.succ r) ∨ ∃ l, IsMono C l\n[PROOFSTEP]\nrefine' Or.inr (mono_of_mono ⟨p.line, p.color, _⟩)\n[GOAL]\ncase pos.intro.intro\nα : Type u\ninst✝¹ : Fintype α\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh : Nonempty α\nr : ℕ\nι : Type\n_inst✝ : Fintype ι\nι' : Type\n_inst : Fintype ι'\nC : (ι ⊕ ι' → Option α) → κ\nl' : Line α ι'\nC' : (ι → Option α) → κ\nhl' : ∀ (x : α), (fun v' v => C (Sum.elim v (some ∘ v'))) ((fun x i => Option.getD (idxFun l' i) x) x) = C'\nmono_of_mono : (∃ l, IsMono C' l) → ∃ l, IsMono C l\ns : ColorFocused C'\nsr : ↑Multiset.card s.lines = r\np : AlmostMono C'\np_mem : p ∈ s.lines\nhp : p.color = C' s.focus\n⊢ ∀ (x : Option α), C' ((fun x i => Option.getD (idxFun p.line i) x) x) = p.color\n[PROOFSTEP]\nrintro (_ | _)\n[GOAL]\ncase pos.intro.intro.none\nα : Type u\ninst✝¹ : Fintype α\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh : Nonempty α\nr : ℕ\nι : Type\n_inst✝ : Fintype ι\nι' : Type\n_inst : Fintype ι'\nC : (ι ⊕ ι' → Option α) → κ\nl' : Line α ι'\nC' : (ι → Option α) → κ\nhl' : ∀ (x : α), (fun v' v => C (Sum.elim v (some ∘ v'))) ((fun x i => Option.getD (idxFun l' i) x) x) = C'\nmono_of_mono : (∃ l, IsMono C' l) → ∃ l, IsMono C l\ns : ColorFocused C'\nsr : ↑Multiset.card s.lines = r\np : AlmostMono C'\np_mem : p ∈ s.lines\nhp : p.color = C' s.focus\n⊢ C' ((fun x i => Option.getD (idxFun p.line i) x) none) = p.color\ncase pos.intro.intro.some\nα : Type u\ninst✝¹ : Fintype α\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝¹ : Fintype κ\nh : Nonempty α\nr : ℕ\nι : Type\n_inst✝ : Fintype ι\nι' : Type\n_inst : Fintype ι'\nC : (ι ⊕ ι' → Option α) → κ\nl' : Line α ι'\nC' : (ι → Option α) → κ\nhl' : ∀ (x : α), (fun v' v => C (Sum.elim v (some ∘ v'))) ((fun x i => Option.getD (idxFun l' i) x) x) = C'\nmono_of_mono : (∃ l, IsMono C' l) → ∃ l, IsMono C l\ns : ColorFocused C'\nsr : ↑Multiset.card s.lines = r\np : AlmostMono C'\np_mem : p ∈ s.lines\nhp : p.color = C' s.focus\nval✝ : α\n⊢ C' ((fun x i => Option.getD (idxFun p.line i) x) (some val✝)) = p.color\n[PROOFSTEP]\nrw [hp, s.is_focused p p_mem]\n[GOAL]\ncase pos.intro.intro.some\nα : Type u\ninst✝¹ : Fintype α\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝¹ : Fintype κ\nh : Nonempty α\nr : ℕ\nι : Type\n_inst✝ : Fintype ι\nι' : Type\n_inst : Fintype ι'\nC : (ι ⊕ ι' → Option α) → κ\nl' : Line α ι'\nC' : (ι → Option α) → κ\nhl' : ∀ (x : α), (fun v' v => C (Sum.elim v (some ∘ v'))) ((fun x i => Option.getD (idxFun l' i) x) x) = C'\nmono_of_mono : (∃ l, IsMono C' l) → ∃ l, IsMono C l\ns : ColorFocused C'\nsr : ↑Multiset.card s.lines = r\np : AlmostMono C'\np_mem : p ∈ s.lines\nhp : p.color = C' s.focus\nval✝ : α\n⊢ C' ((fun x i => Option.getD (idxFun p.line i) x) (some val✝)) = p.color\n[PROOFSTEP]\napply p.has_color\n[GOAL]\ncase neg\nα : Type u\ninst✝¹ : Fintype α\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh✝ : Nonempty α\nr : ℕ\nι : Type\n_inst✝ : Fintype ι\nι' : Type\n_inst : Fintype ι'\nC : (ι ⊕ ι' → Option α) → κ\nl' : Line α ι'\nC' : (ι → Option α) → κ\nhl' : ∀ (x : α), (fun v' v => C (Sum.elim v (some ∘ v'))) ((fun x i => Option.getD (idxFun l' i) x) x) = C'\nmono_of_mono : (∃ l, IsMono C' l) → ∃ l, IsMono C l\ns : ColorFocused C'\nsr : ↑Multiset.card s.lines = r\nh : ¬∃ p, p ∈ s.lines ∧ p.color = C' s.focus\n⊢ (∃ s, ↑Multiset.card s.lines = Nat.succ r) ∨ ∃ l, IsMono C l\n[PROOFSTEP]\nrefine'\n Or.inl\n ⟨⟨(s.lines.map _).cons ⟨(l'.map some).vertical s.focus, C' s.focus, fun x => _⟩,\n Sum.elim s.focus (l'.map some none), _, _⟩,\n _⟩\n -- Porting note: Needed to reorder the following two goals\n -- The product lines are almost monochromatic.\n[GOAL]\ncase neg.refine'_1\nα : Type u\ninst✝¹ : Fintype α\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh✝ : Nonempty α\nr : ℕ\nι : Type\n_inst✝ : Fintype ι\nι' : Type\n_inst : Fintype ι'\nC : (ι ⊕ ι' → Option α) → κ\nl' : Line α ι'\nC' : (ι → Option α) → κ\nhl' : ∀ (x : α), (fun v' v => C (Sum.elim v (some ∘ v'))) ((fun x i => Option.getD (idxFun l' i) x) x) = C'\nmono_of_mono : (∃ l, IsMono C' l) → ∃ l, IsMono C l\ns : ColorFocused C'\nsr : ↑Multiset.card s.lines = r\nh : ¬∃ p, p ∈ s.lines ∧ p.color = C' s.focus\n⊢ AlmostMono C' → AlmostMono C\n[PROOFSTEP]\nrefine' fun p => ⟨p.line.prod (l'.map some), p.color, fun x => _⟩\n[GOAL]\ncase neg.refine'_1\nα : Type u\ninst✝¹ : Fintype α\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh✝ : Nonempty α\nr : ℕ\nι : Type\n_inst✝ : Fintype ι\nι' : Type\n_inst : Fintype ι'\nC : (ι ⊕ ι' → Option α) → κ\nl' : Line α ι'\nC' : (ι → Option α) → κ\nhl' : ∀ (x : α), (fun v' v => C (Sum.elim v (some ∘ v'))) ((fun x i => Option.getD (idxFun l' i) x) x) = C'\nmono_of_mono : (∃ l, IsMono C' l) → ∃ l, IsMono C l\ns : ColorFocused C'\nsr : ↑Multiset.card s.lines = r\nh : ¬∃ p, p ∈ s.lines ∧ p.color = C' s.focus\np : AlmostMono C'\nx : α\n⊢ C ((fun x i => Option.getD (idxFun (prod p.line (map some l')) i) x) (some x)) = p.color\n[PROOFSTEP]\nrw [Line.prod_apply, Line.map_apply, ← p.has_color, ← congr_fun (hl' x)]\n -- The vertical line is almost monochromatic.\n[GOAL]\ncase neg.refine'_2\nα : Type u\ninst✝¹ : Fintype α\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh✝ : Nonempty α\nr : ℕ\nι : Type\n_inst✝ : Fintype ι\nι' : Type\n_inst : Fintype ι'\nC : (ι ⊕ ι' → Option α) → κ\nl' : Line α ι'\nC' : (ι → Option α) → κ\nhl' : ∀ (x : α), (fun v' v => C (Sum.elim v (some ∘ v'))) ((fun x i => Option.getD (idxFun l' i) x) x) = C'\nmono_of_mono : (∃ l, IsMono C' l) → ∃ l, IsMono C l\ns : ColorFocused C'\nsr : ↑Multiset.card s.lines = r\nh : ¬∃ p, p ∈ s.lines ∧ p.color = C' s.focus\nx : α\n⊢ C ((fun x i => Option.getD (idxFun (vertical s.focus (map some l')) i) x) (some x)) = C' s.focus\n[PROOFSTEP]\nrw [vertical_apply, ← congr_fun (hl' x), Line.map_apply]\n -- Our `r+1` lines have the same endpoint.\n[GOAL]\ncase neg.refine'_3\nα : Type u\ninst✝¹ : Fintype α\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh✝ : Nonempty α\nr : ℕ\nι : Type\n_inst✝ : Fintype ι\nι' : Type\n_inst : Fintype ι'\nC : (ι ⊕ ι' → Option α) → κ\nl' : Line α ι'\nC' : (ι → Option α) → κ\nhl' : ∀ (x : α), (fun v' v => C (Sum.elim v (some ∘ v'))) ((fun x i => Option.getD (idxFun l' i) x) x) = C'\nmono_of_mono : (∃ l, IsMono C' l) → ∃ l, IsMono C l\ns : ColorFocused C'\nsr : ↑Multiset.card s.lines = r\nh : ¬∃ p, p ∈ s.lines ∧ p.color = C' s.focus\n⊢ ∀ (p : AlmostMono C),\n p ∈\n { line := vertical s.focus (map some l'), color := C' s.focus,\n has_color :=\n (_ :\n ∀ (x : α),\n C ((fun x i => Option.getD (idxFun (vertical s.focus (map some l')) i) x) (some x)) =\n C' s.focus) } ::ₘ\n Multiset.map\n (fun p =>\n { line := prod p.line (map some l'), color := p.color,\n has_color :=\n (_ :\n ∀ (x : α),\n C ((fun x i => Option.getD (idxFun (prod p.line (map some l')) i) x) (some x)) = p.color) })\n s.lines →\n (fun x i => Option.getD (idxFun p.line i) x) none =\n Sum.elim s.focus ((fun x i => Option.getD (idxFun (map some l') i) x) none)\n[PROOFSTEP]\nsimp_rw [Multiset.mem_cons, Multiset.mem_map]\n[GOAL]\ncase neg.refine'_3\nα : Type u\ninst✝¹ : Fintype α\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh✝ : Nonempty α\nr : ℕ\nι : Type\n_inst✝ : Fintype ι\nι' : Type\n_inst : Fintype ι'\nC : (ι ⊕ ι' → Option α) → κ\nl' : Line α ι'\nC' : (ι → Option α) → κ\nhl' : ∀ (x : α), (fun v' v => C (Sum.elim v (some ∘ v'))) ((fun x i => Option.getD (idxFun l' i) x) x) = C'\nmono_of_mono : (∃ l, IsMono C' l) → ∃ l, IsMono C l\ns : ColorFocused C'\nsr : ↑Multiset.card s.lines = r\nh : ¬∃ p, p ∈ s.lines ∧ p.color = C' s.focus\n⊢ ∀ (p : AlmostMono C),\n (p =\n { line := vertical s.focus (map some l'), color := C' s.focus,\n has_color :=\n (_ :\n ∀ (x : α),\n C ((fun x i => Option.getD (idxFun (vertical s.focus (map some l')) i) x) (some x)) = C' s.focus) } ∨\n ∃ a,\n a ∈ s.lines ∧\n { line := prod a.line (map some l'), color := a.color,\n has_color :=\n (_ :\n ∀ (x : α),\n C ((fun x i => Option.getD (idxFun (prod a.line (map some l')) i) x) (some x)) = a.color) } =\n p) →\n (fun i => Option.getD (idxFun p.line i) none) =\n Sum.elim s.focus fun i => Option.getD (idxFun (map some l') i) none\n[PROOFSTEP]\nrintro _ (rfl | ⟨q, hq, rfl⟩)\n[GOAL]\ncase neg.refine'_3.inl\nα : Type u\ninst✝¹ : Fintype α\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh✝ : Nonempty α\nr : ℕ\nι : Type\n_inst✝ : Fintype ι\nι' : Type\n_inst : Fintype ι'\nC : (ι ⊕ ι' → Option α) → κ\nl' : Line α ι'\nC' : (ι → Option α) → κ\nhl' : ∀ (x : α), (fun v' v => C (Sum.elim v (some ∘ v'))) ((fun x i => Option.getD (idxFun l' i) x) x) = C'\nmono_of_mono : (∃ l, IsMono C' l) → ∃ l, IsMono C l\ns : ColorFocused C'\nsr : ↑Multiset.card s.lines = r\nh : ¬∃ p, p ∈ s.lines ∧ p.color = C' s.focus\n⊢ (fun i =>\n Option.getD\n (idxFun\n { line := vertical s.focus (map some l'), color := C' s.focus,\n has_color :=\n (_ :\n ∀ (x : α),\n C ((fun x i => Option.getD (idxFun (vertical s.focus (map some l')) i) x) (some x)) =\n C' s.focus) }.line\n i)\n none) =\n Sum.elim s.focus fun i => Option.getD (idxFun (map some l') i) none\n[PROOFSTEP]\nsimp only [vertical_apply]\n[GOAL]\ncase neg.refine'_3.inr.intro.intro\nα : Type u\ninst✝¹ : Fintype α\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh✝ : Nonempty α\nr : ℕ\nι : Type\n_inst✝ : Fintype ι\nι' : Type\n_inst : Fintype ι'\nC : (ι ⊕ ι' → Option α) → κ\nl' : Line α ι'\nC' : (ι → Option α) → κ\nhl' : ∀ (x : α), (fun v' v => C (Sum.elim v (some ∘ v'))) ((fun x i => Option.getD (idxFun l' i) x) x) = C'\nmono_of_mono : (∃ l, IsMono C' l) → ∃ l, IsMono C l\ns : ColorFocused C'\nsr : ↑Multiset.card s.lines = r\nh : ¬∃ p, p ∈ s.lines ∧ p.color = C' s.focus\nq : AlmostMono C'\nhq : q ∈ s.lines\n⊢ (fun i =>\n Option.getD\n (idxFun\n { line := prod q.line (map some l'), color := q.color,\n has_color :=\n (_ :\n ∀ (x : α),\n C ((fun x i => Option.getD (idxFun (prod q.line (map some l')) i) x) (some x)) = q.color) }.line\n i)\n none) =\n Sum.elim s.focus fun i => Option.getD (idxFun (map some l') i) none\n[PROOFSTEP]\nsimp only [prod_apply, s.is_focused q hq]\n -- Our `r+1` lines have distinct colors (this is why we needed to split into cases above).\n[GOAL]\ncase neg.refine'_4\nα : Type u\ninst✝¹ : Fintype α\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh✝ : Nonempty α\nr : ℕ\nι : Type\n_inst✝ : Fintype ι\nι' : Type\n_inst : Fintype ι'\nC : (ι ⊕ ι' → Option α) → κ\nl' : Line α ι'\nC' : (ι → Option α) → κ\nhl' : ∀ (x : α), (fun v' v => C (Sum.elim v (some ∘ v'))) ((fun x i => Option.getD (idxFun l' i) x) x) = C'\nmono_of_mono : (∃ l, IsMono C' l) → ∃ l, IsMono C l\ns : ColorFocused C'\nsr : ↑Multiset.card s.lines = r\nh : ¬∃ p, p ∈ s.lines ∧ p.color = C' s.focus\n⊢ Multiset.Nodup\n (Multiset.map AlmostMono.color\n ({ line := vertical s.focus (map some l'), color := C' s.focus,\n has_color :=\n (_ :\n ∀ (x : α),\n C ((fun x i => Option.getD (idxFun (vertical s.focus (map some l')) i) x) (some x)) = C' s.focus) } ::ₘ\n Multiset.map\n (fun p =>\n { line := prod p.line (map some l'), color := p.color,\n has_color :=\n (_ :\n ∀ (x : α),\n C ((fun x i => Option.getD (idxFun (prod p.line (map some l')) i) x) (some x)) = p.color) })\n s.lines))\n[PROOFSTEP]\nrw [Multiset.map_cons, Multiset.map_map, Multiset.nodup_cons, Multiset.mem_map]\n[GOAL]\ncase neg.refine'_4\nα : Type u\ninst✝¹ : Fintype α\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh✝ : Nonempty α\nr : ℕ\nι : Type\n_inst✝ : Fintype ι\nι' : Type\n_inst : Fintype ι'\nC : (ι ⊕ ι' → Option α) → κ\nl' : Line α ι'\nC' : (ι → Option α) → κ\nhl' : ∀ (x : α), (fun v' v => C (Sum.elim v (some ∘ v'))) ((fun x i => Option.getD (idxFun l' i) x) x) = C'\nmono_of_mono : (∃ l, IsMono C' l) → ∃ l, IsMono C l\ns : ColorFocused C'\nsr : ↑Multiset.card s.lines = r\nh : ¬∃ p, p ∈ s.lines ∧ p.color = C' s.focus\n⊢ (¬∃ a,\n a ∈ s.lines ∧\n (AlmostMono.color ∘ fun p =>\n { line := prod p.line (map some l'), color := p.color,\n has_color :=\n (_ :\n ∀ (x : α),\n C ((fun x i => Option.getD (idxFun (prod p.line (map some l')) i) x) (some x)) = p.color) })\n a =\n { line := vertical s.focus (map some l'), color := C' s.focus,\n has_color :=\n (_ :\n ∀ (x : α),\n C ((fun x i => Option.getD (idxFun (vertical s.focus (map some l')) i) x) (some x)) =\n C' s.focus) }.color) ∧\n Multiset.Nodup\n (Multiset.map\n (AlmostMono.color ∘ fun p =>\n { line := prod p.line (map some l'), color := p.color,\n has_color :=\n (_ :\n ∀ (x : α), C ((fun x i => Option.getD (idxFun (prod p.line (map some l')) i) x) (some x)) = p.color) })\n s.lines)\n[PROOFSTEP]\nexact\n ⟨fun ⟨q, hq, he⟩ => h ⟨q, hq, he⟩, s.distinct_colors⟩\n -- Finally, we really do have `r+1` lines!\n[GOAL]\ncase neg.refine'_5\nα : Type u\ninst✝¹ : Fintype α\nκ : Type (max v u)\ninst✝ : Finite κ\nval✝ : Fintype κ\nh✝ : Nonempty α\nr : ℕ\nι : Type\n_inst✝ : Fintype ι\nι' : Type\n_inst : Fintype ι'\nC : (ι ⊕ ι' → Option α) → κ\nl' : Line α ι'\nC' : (ι → Option α) → κ\nhl' : ∀ (x : α), (fun v' v => C (Sum.elim v (some ∘ v'))) ((fun x i => Option.getD (idxFun l' i) x) x) = C'\nmono_of_mono : (∃ l, IsMono C' l) → ∃ l, IsMono C l\ns : ColorFocused C'\nsr : ↑Multiset.card s.lines = r\nh : ¬∃ p, p ∈ s.lines ∧ p.color = C' s.focus\n⊢ ↑Multiset.card\n {\n lines :=\n { line := vertical s.focus (map some l'), color := C' s.focus,\n has_color :=\n (_ :\n ∀ (x : α),\n C ((fun x i => Option.getD (idxFun (vertical s.focus (map some l')) i) x) (some x)) =\n C' s.focus) } ::ₘ\n Multiset.map\n (fun p =>\n { line := prod p.line (map some l'), color := p.color,\n has_color :=\n (_ :\n ∀ (x : α),\n C ((fun x i => Option.getD (idxFun (prod p.line (map some l')) i) x) (some x)) = p.color) })\n s.lines,\n focus := Sum.elim s.focus ((fun x i => Option.getD (idxFun (map some l') i) x) none),\n is_focused :=\n (_ :\n ∀ (p : AlmostMono C),\n p ∈\n { line := vertical s.focus (map some l'), color := C' s.focus,\n has_color :=\n (_ :\n ∀ (x : α),\n C ((fun x i => Option.getD (idxFun (vertical s.focus (map some l')) i) x) (some x)) =\n C' s.focus) } ::ₘ\n Multiset.map\n (fun p =>\n { line := prod p.line (map some l'), color := p.color,\n has_color :=\n (_ :\n ∀ (x : α),\n C ((fun x i => Option.getD (idxFun (prod p.line (map some l')) i) x) (some x)) =\n p.color) })\n s.lines →\n (fun x i => Option.getD (idxFun p.line i) x) none =\n Sum.elim s.focus ((fun x i => Option.getD (idxFun (map some l') i) x) none)),\n distinct_colors :=\n (_ :\n Multiset.Nodup\n (Multiset.map AlmostMono.color\n ({ line := vertical s.focus (map some l'), color := C' s.focus,\n has_color :=\n (_ :\n ∀ (x : α),\n C ((fun x i => Option.getD (idxFun (vertical s.focus (map some l')) i) x) (some x)) =\n C' s.focus) } ::ₘ\n Multiset.map\n (fun p =>\n { line := prod p.line (map some l'), color := p.color,\n has_color :=\n (_ :\n ∀ (x : α),\n C ((fun x i => Option.getD (idxFun (prod p.line (map some l')) i) x) (some x)) =\n p.color) })\n s.lines))) }.lines =\n Nat.succ r\n[PROOFSTEP]\nrw [Multiset.card_cons, Multiset.card_map, sr]\n[GOAL]\nα : Type u\ninst✝¹ : Finite α\nκ : Type v\ninst✝ : Finite κ\nι : Type\nιfin : Fintype ι\nhι : ∀ (C : (ι → α) → ULift κ), ∃ l, IsMono C l\nC : (ι → α) → κ\nl : Line α ι\nc : ULift κ\nhc : ∀ (x : α), (ULift.up ∘ C) ((fun x i => Option.getD (idxFun l i) x) x) = c\nx : α\n⊢ C ((fun x i => Option.getD (idxFun l i) x) x) = c.down\n[PROOFSTEP]\nrw [← hc x, Function.comp_apply]\n[GOAL]\nM : Type u_1\nκ : Type u_2\ninst✝¹ : AddCommMonoid M\nS : Finset M\ninst✝ : Finite κ\nC : M → κ\n⊢ ∃ a, a > 0 ∧ ∃ b c, ∀ (s : M), s ∈ S → C (a • s + b) = c\n[PROOFSTEP]\nobtain ⟨ι, _inst, hι⟩ := Line.exists_mono_in_high_dimension S κ\n[GOAL]\ncase intro.intro\nM : Type u_1\nκ : Type u_2\ninst✝¹ : AddCommMonoid M\nS : Finset M\ninst✝ : Finite κ\nC : M → κ\nι : Type\n_inst : Fintype ι\nhι : ∀ (C : (ι → { x // x ∈ S }) → κ), ∃ l, Line.IsMono C l\n⊢ ∃ a, a > 0 ∧ ∃ b c, ∀ (s : M), s ∈ S → C (a • s + b) = c\n[PROOFSTEP]\nspecialize hι fun v => C <| ∑ i, v i\n[GOAL]\ncase intro.intro\nM : Type u_1\nκ : Type u_2\ninst✝¹ : AddCommMonoid M\nS : Finset M\ninst✝ : Finite κ\nC : M → κ\nι : Type\n_inst : Fintype ι\nhι : ∃ l, Line.IsMono (fun v => C (∑ i : ι, ↑(v i))) l\n⊢ ∃ a, a > 0 ∧ ∃ b c, ∀ (s : M), s ∈ S → C (a • s + b) = c\n[PROOFSTEP]\nobtain ⟨l, c, hl⟩ := hι\n[GOAL]\ncase intro.intro.intro.intro\nM : Type u_1\nκ : Type u_2\ninst✝¹ : AddCommMonoid M\nS : Finset M\ninst✝ : Finite κ\nC : M → κ\nι : Type\n_inst : Fintype ι\nl : Line { x // x ∈ S } ι\nc : κ\nhl : ∀ (x : { x // x ∈ S }), (fun v => C (∑ i : ι, ↑(v i))) ((fun x i => Option.getD (Line.idxFun l i) x) x) = c\n⊢ ∃ a, a > 0 ∧ ∃ b c, ∀ (s : M), s ∈ S → C (a • s + b) = c\n[PROOFSTEP]\nset s : Finset ι := Finset.univ.filter (fun i => l.idxFun i = none) with hs\n[GOAL]\ncase intro.intro.intro.intro\nM : Type u_1\nκ : Type u_2\ninst✝¹ : AddCommMonoid M\nS : Finset M\ninst✝ : Finite κ\nC : M → κ\nι : Type\n_inst : Fintype ι\nl : Line { x // x ∈ S } ι\nc : κ\nhl : ∀ (x : { x // x ∈ S }), (fun v => C (∑ i : ι, ↑(v i))) ((fun x i => Option.getD (Line.idxFun l i) x) x) = c\ns : Finset ι := Finset.filter (fun i => Line.idxFun l i = none) Finset.univ\nhs : s = Finset.filter (fun i => Line.idxFun l i = none) Finset.univ\n⊢ ∃ a, a > 0 ∧ ∃ b c, ∀ (s : M), s ∈ S → C (a • s + b) = c\n[PROOFSTEP]\nrefine' ⟨s.card, Finset.card_pos.mpr ⟨l.proper.choose, _⟩, ∑ i in sᶜ, ((l.idxFun i).map _).getD 0, c, _⟩\n[GOAL]\ncase intro.intro.intro.intro.refine'_1\nM : Type u_1\nκ : Type u_2\ninst✝¹ : AddCommMonoid M\nS : Finset M\ninst✝ : Finite κ\nC : M → κ\nι : Type\n_inst : Fintype ι\nl : Line { x // x ∈ S } ι\nc : κ\nhl : ∀ (x : { x // x ∈ S }), (fun v => C (∑ i : ι, ↑(v i))) ((fun x i => Option.getD (Line.idxFun l i) x) x) = c\ns : Finset ι := Finset.filter (fun i => Line.idxFun l i = none) Finset.univ\nhs : s = Finset.filter (fun i => Line.idxFun l i = none) Finset.univ\n⊢ Exists.choose (_ : ∃ i, Line.idxFun l i = none) ∈ s\n[PROOFSTEP]\nrw [hs, Finset.mem_filter]\n[GOAL]\ncase intro.intro.intro.intro.refine'_1\nM : Type u_1\nκ : Type u_2\ninst✝¹ : AddCommMonoid M\nS : Finset M\ninst✝ : Finite κ\nC : M → κ\nι : Type\n_inst : Fintype ι\nl : Line { x // x ∈ S } ι\nc : κ\nhl : ∀ (x : { x // x ∈ S }), (fun v => C (∑ i : ι, ↑(v i))) ((fun x i => Option.getD (Line.idxFun l i) x) x) = c\ns : Finset ι := Finset.filter (fun i => Line.idxFun l i = none) Finset.univ\nhs : s = Finset.filter (fun i => Line.idxFun l i = none) Finset.univ\n⊢ Exists.choose (_ : ∃ i, Line.idxFun l i = none) ∈ Finset.univ ∧\n Line.idxFun l (Exists.choose (_ : ∃ i, Line.idxFun l i = none)) = none\n[PROOFSTEP]\nexact ⟨Finset.mem_univ _, l.proper.choose_spec⟩\n[GOAL]\ncase intro.intro.intro.intro.refine'_2\nM : Type u_1\nκ : Type u_2\ninst✝¹ : AddCommMonoid M\nS : Finset M\ninst✝ : Finite κ\nC : M → κ\nι : Type\n_inst : Fintype ι\nl : Line { x // x ∈ S } ι\nc : κ\nhl : ∀ (x : { x // x ∈ S }), (fun v => C (∑ i : ι, ↑(v i))) ((fun x i => Option.getD (Line.idxFun l i) x) x) = c\ns : Finset ι := Finset.filter (fun i => Line.idxFun l i = none) Finset.univ\nhs : s = Finset.filter (fun i => Line.idxFun l i = none) Finset.univ\ni : ι\n⊢ { x // x ∈ S } → M\n[PROOFSTEP]\nexact fun m => m\n[GOAL]\ncase intro.intro.intro.intro.refine'_3\nM : Type u_1\nκ : Type u_2\ninst✝¹ : AddCommMonoid M\nS : Finset M\ninst✝ : Finite κ\nC : M → κ\nι : Type\n_inst : Fintype ι\nl : Line { x // x ∈ S } ι\nc : κ\nhl : ∀ (x : { x // x ∈ S }), (fun v => C (∑ i : ι, ↑(v i))) ((fun x i => Option.getD (Line.idxFun l i) x) x) = c\ns : Finset ι := Finset.filter (fun i => Line.idxFun l i = none) Finset.univ\nhs : s = Finset.filter (fun i => Line.idxFun l i = none) Finset.univ\n⊢ ∀ (s_1 : M),\n s_1 ∈ S → C (Finset.card s • s_1 + ∑ i in sᶜ, Option.getD (Option.map (fun m => ↑m) (Line.idxFun l i)) 0) = c\n[PROOFSTEP]\nintro x xs\n[GOAL]\ncase intro.intro.intro.intro.refine'_3\nM : Type u_1\nκ : Type u_2\ninst✝¹ : AddCommMonoid M\nS : Finset M\ninst✝ : Finite κ\nC : M → κ\nι : Type\n_inst : Fintype ι\nl : Line { x // x ∈ S } ι\nc : κ\nhl : ∀ (x : { x // x ∈ S }), (fun v => C (∑ i : ι, ↑(v i))) ((fun x i => Option.getD (Line.idxFun l i) x) x) = c\ns : Finset ι := Finset.filter (fun i => Line.idxFun l i = none) Finset.univ\nhs : s = Finset.filter (fun i => Line.idxFun l i = none) Finset.univ\nx : M\nxs : x ∈ S\n⊢ C (Finset.card s • x + ∑ i in sᶜ, Option.getD (Option.map (fun m => ↑m) (Line.idxFun l i)) 0) = c\n[PROOFSTEP]\nrw [← hl ⟨x, xs⟩]\n[GOAL]\ncase intro.intro.intro.intro.refine'_3\nM : Type u_1\nκ : Type u_2\ninst✝¹ : AddCommMonoid M\nS : Finset M\ninst✝ : Finite κ\nC : M → κ\nι : Type\n_inst : Fintype ι\nl : Line { x // x ∈ S } ι\nc : κ\nhl : ∀ (x : { x // x ∈ S }), (fun v => C (∑ i : ι, ↑(v i))) ((fun x i => Option.getD (Line.idxFun l i) x) x) = c\ns : Finset ι := Finset.filter (fun i => Line.idxFun l i = none) Finset.univ\nhs : s = Finset.filter (fun i => Line.idxFun l i = none) Finset.univ\nx : M\nxs : x ∈ S\n⊢ C (Finset.card s • x + ∑ i in sᶜ, Option.getD (Option.map (fun m => ↑m) (Line.idxFun l i)) 0) =\n (fun v => C (∑ i : ι, ↑(v i))) ((fun x i => Option.getD (Line.idxFun l i) x) { val := x, property := xs })\n[PROOFSTEP]\nclear hl\n[GOAL]\ncase intro.intro.intro.intro.refine'_3\nM : Type u_1\nκ : Type u_2\ninst✝¹ : AddCommMonoid M\nS : Finset M\ninst✝ : Finite κ\nC : M → κ\nι : Type\n_inst : Fintype ι\nl : Line { x // x ∈ S } ι\nc : κ\ns : Finset ι := Finset.filter (fun i => Line.idxFun l i = none) Finset.univ\nhs : s = Finset.filter (fun i => Line.idxFun l i = none) Finset.univ\nx : M\nxs : x ∈ S\n⊢ C (Finset.card s • x + ∑ i in sᶜ, Option.getD (Option.map (fun m => ↑m) (Line.idxFun l i)) 0) =\n (fun v => C (∑ i : ι, ↑(v i))) ((fun x i => Option.getD (Line.idxFun l i) x) { val := x, property := xs })\n[PROOFSTEP]\ncongr\n[GOAL]\ncase intro.intro.intro.intro.refine'_3.e_a\nM : Type u_1\nκ : Type u_2\ninst✝¹ : AddCommMonoid M\nS : Finset M\ninst✝ : Finite κ\nC : M → κ\nι : Type\n_inst : Fintype ι\nl : Line { x // x ∈ S } ι\nc : κ\ns : Finset ι := Finset.filter (fun i => Line.idxFun l i = none) Finset.univ\nhs : s = Finset.filter (fun i => Line.idxFun l i = none) Finset.univ\nx : M\nxs : x ∈ S\n⊢ Finset.card s • x + ∑ i in sᶜ, Option.getD (Option.map (fun m => ↑m) (Line.idxFun l i)) 0 =\n ∑ i : ι, ↑((fun x i => Option.getD (Line.idxFun l i) x) { val := x, property := xs } i)\n[PROOFSTEP]\nrw [← Finset.sum_add_sum_compl s]\n[GOAL]\ncase intro.intro.intro.intro.refine'_3.e_a\nM : Type u_1\nκ : Type u_2\ninst✝¹ : AddCommMonoid M\nS : Finset M\ninst✝ : Finite κ\nC : M → κ\nι : Type\n_inst : Fintype ι\nl : Line { x // x ∈ S } ι\nc : κ\ns : Finset ι := Finset.filter (fun i => Line.idxFun l i = none) Finset.univ\nhs : s = Finset.filter (fun i => Line.idxFun l i = none) Finset.univ\nx : M\nxs : x ∈ S\n⊢ Finset.card s • x + ∑ i in sᶜ, Option.getD (Option.map (fun m => ↑m) (Line.idxFun l i)) 0 =\n ∑ i in s, ↑((fun x i => Option.getD (Line.idxFun l i) x) { val := x, property := xs } i) +\n ∑ i in sᶜ, ↑((fun x i => Option.getD (Line.idxFun l i) x) { val := x, property := xs } i)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase intro.intro.intro.intro.refine'_3.e_a.e_a\nM : Type u_1\nκ : Type u_2\ninst✝¹ : AddCommMonoid M\nS : Finset M\ninst✝ : Finite κ\nC : M → κ\nι : Type\n_inst : Fintype ι\nl : Line { x // x ∈ S } ι\nc : κ\ns : Finset ι := Finset.filter (fun i => Line.idxFun l i = none) Finset.univ\nhs : s = Finset.filter (fun i => Line.idxFun l i = none) Finset.univ\nx : M\nxs : x ∈ S\n⊢ Finset.card s • x = ∑ i in s, ↑((fun x i => Option.getD (Line.idxFun l i) x) { val := x, property := xs } i)\n[PROOFSTEP]\nrw [← Finset.sum_const]\n[GOAL]\ncase intro.intro.intro.intro.refine'_3.e_a.e_a\nM : Type u_1\nκ : Type u_2\ninst✝¹ : AddCommMonoid M\nS : Finset M\ninst✝ : Finite κ\nC : M → κ\nι : Type\n_inst : Fintype ι\nl : Line { x // x ∈ S } ι\nc : κ\ns : Finset ι := Finset.filter (fun i => Line.idxFun l i = none) Finset.univ\nhs : s = Finset.filter (fun i => Line.idxFun l i = none) Finset.univ\nx : M\nxs : x ∈ S\n⊢ ∑ _x in s, x = ∑ i in s, ↑((fun x i => Option.getD (Line.idxFun l i) x) { val := x, property := xs } i)\n[PROOFSTEP]\napply Finset.sum_congr rfl\n[GOAL]\ncase intro.intro.intro.intro.refine'_3.e_a.e_a\nM : Type u_1\nκ : Type u_2\ninst✝¹ : AddCommMonoid M\nS : Finset M\ninst✝ : Finite κ\nC : M → κ\nι : Type\n_inst : Fintype ι\nl : Line { x // x ∈ S } ι\nc : κ\ns : Finset ι := Finset.filter (fun i => Line.idxFun l i = none) Finset.univ\nhs : s = Finset.filter (fun i => Line.idxFun l i = none) Finset.univ\nx : M\nxs : x ∈ S\n⊢ ∀ (x_1 : ι), x_1 ∈ s → x = ↑((fun x i => Option.getD (Line.idxFun l i) x) { val := x, property := xs } x_1)\n[PROOFSTEP]\nintro i hi\n[GOAL]\ncase intro.intro.intro.intro.refine'_3.e_a.e_a\nM : Type u_1\nκ : Type u_2\ninst✝¹ : AddCommMonoid M\nS : Finset M\ninst✝ : Finite κ\nC : M → κ\nι : Type\n_inst : Fintype ι\nl : Line { x // x ∈ S } ι\nc : κ\ns : Finset ι := Finset.filter (fun i => Line.idxFun l i = none) Finset.univ\nhs : s = Finset.filter (fun i => Line.idxFun l i = none) Finset.univ\nx : M\nxs : x ∈ S\ni : ι\nhi : i ∈ s\n⊢ x = ↑((fun x i => Option.getD (Line.idxFun l i) x) { val := x, property := xs } i)\n[PROOFSTEP]\nrw [hs, Finset.mem_filter] at hi \n[GOAL]\ncase intro.intro.intro.intro.refine'_3.e_a.e_a\nM : Type u_1\nκ : Type u_2\ninst✝¹ : AddCommMonoid M\nS : Finset M\ninst✝ : Finite κ\nC : M → κ\nι : Type\n_inst : Fintype ι\nl : Line { x // x ∈ S } ι\nc : κ\ns : Finset ι := Finset.filter (fun i => Line.idxFun l i = none) Finset.univ\nhs : s = Finset.filter (fun i => Line.idxFun l i = none) Finset.univ\nx : M\nxs : x ∈ S\ni : ι\nhi : i ∈ Finset.univ ∧ Line.idxFun l i = none\n⊢ x = ↑((fun x i => Option.getD (Line.idxFun l i) x) { val := x, property := xs } i)\n[PROOFSTEP]\nrw [l.apply_none _ _ hi.right, Subtype.coe_mk]\n[GOAL]\ncase intro.intro.intro.intro.refine'_3.e_a.e_a\nM : Type u_1\nκ : Type u_2\ninst✝¹ : AddCommMonoid M\nS : Finset M\ninst✝ : Finite κ\nC : M → κ\nι : Type\n_inst : Fintype ι\nl : Line { x // x ∈ S } ι\nc : κ\ns : Finset ι := Finset.filter (fun i => Line.idxFun l i = none) Finset.univ\nhs : s = Finset.filter (fun i => Line.idxFun l i = none) Finset.univ\nx : M\nxs : x ∈ S\n⊢ ∑ i in sᶜ, Option.getD (Option.map (fun m => ↑m) (Line.idxFun l i)) 0 =\n ∑ i in sᶜ, ↑((fun x i => Option.getD (Line.idxFun l i) x) { val := x, property := xs } i)\n[PROOFSTEP]\napply Finset.sum_congr rfl\n[GOAL]\ncase intro.intro.intro.intro.refine'_3.e_a.e_a\nM : Type u_1\nκ : Type u_2\ninst✝¹ : AddCommMonoid M\nS : Finset M\ninst✝ : Finite κ\nC : M → κ\nι : Type\n_inst : Fintype ι\nl : Line { x // x ∈ S } ι\nc : κ\ns : Finset ι := Finset.filter (fun i => Line.idxFun l i = none) Finset.univ\nhs : s = Finset.filter (fun i => Line.idxFun l i = none) Finset.univ\nx : M\nxs : x ∈ S\n⊢ ∀ (x_1 : ι),\n x_1 ∈ sᶜ →\n Option.getD (Option.map (fun m => ↑m) (Line.idxFun l x_1)) 0 =\n ↑((fun x i => Option.getD (Line.idxFun l i) x) { val := x, property := xs } x_1)\n[PROOFSTEP]\nintro i hi\n[GOAL]\ncase intro.intro.intro.intro.refine'_3.e_a.e_a\nM : Type u_1\nκ : Type u_2\ninst✝¹ : AddCommMonoid M\nS : Finset M\ninst✝ : Finite κ\nC : M → κ\nι : Type\n_inst : Fintype ι\nl : Line { x // x ∈ S } ι\nc : κ\ns : Finset ι := Finset.filter (fun i => Line.idxFun l i = none) Finset.univ\nhs : s = Finset.filter (fun i => Line.idxFun l i = none) Finset.univ\nx : M\nxs : x ∈ S\ni : ι\nhi : i ∈ sᶜ\n⊢ Option.getD (Option.map (fun m => ↑m) (Line.idxFun l i)) 0 =\n ↑((fun x i => Option.getD (Line.idxFun l i) x) { val := x, property := xs } i)\n[PROOFSTEP]\nrw [hs, Finset.compl_filter, Finset.mem_filter] at hi \n[GOAL]\ncase intro.intro.intro.intro.refine'_3.e_a.e_a\nM : Type u_1\nκ : Type u_2\ninst✝¹ : AddCommMonoid M\nS : Finset M\ninst✝ : Finite κ\nC : M → κ\nι : Type\n_inst : Fintype ι\nl : Line { x // x ∈ S } ι\nc : κ\ns : Finset ι := Finset.filter (fun i => Line.idxFun l i = none) Finset.univ\nhs : s = Finset.filter (fun i => Line.idxFun l i = none) Finset.univ\nx : M\nxs : x ∈ S\ni : ι\nhi : i ∈ Finset.univ ∧ ¬Line.idxFun l i = none\n⊢ Option.getD (Option.map (fun m => ↑m) (Line.idxFun l i)) 0 =\n ↑((fun x i => Option.getD (Line.idxFun l i) x) { val := x, property := xs } i)\n[PROOFSTEP]\nobtain ⟨y, hy⟩ := Option.ne_none_iff_exists.mp hi.right\n[GOAL]\ncase intro.intro.intro.intro.refine'_3.e_a.e_a.intro\nM : Type u_1\nκ : Type u_2\ninst✝¹ : AddCommMonoid M\nS : Finset M\ninst✝ : Finite κ\nC : M → κ\nι : Type\n_inst : Fintype ι\nl : Line { x // x ∈ S } ι\nc : κ\ns : Finset ι := Finset.filter (fun i => Line.idxFun l i = none) Finset.univ\nhs : s = Finset.filter (fun i => Line.idxFun l i = none) Finset.univ\nx : M\nxs : x ∈ S\ni : ι\nhi : i ∈ Finset.univ ∧ ¬Line.idxFun l i = none\ny : { x // x ∈ S }\nhy : some y = Line.idxFun l i\n⊢ Option.getD (Option.map (fun m => ↑m) (Line.idxFun l i)) 0 =\n ↑((fun x i => Option.getD (Line.idxFun l i) x) { val := x, property := xs } i)\n[PROOFSTEP]\nsimp_rw [← hy, Option.map_some', Option.getD]\n", "meta": {"mathlib_filename": "Mathlib.Combinatorics.HalesJewett", "llama_tokens": 28971, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO", "lm_q1_score": 0.4687906266262438, "lm_q2_score": 0.02161533500795898, "lm_q1q2_score": 0.010133066443117275}} {"text": "[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : MonoidalCategory C\nX Y : C\nhX : Closed X\nhY : Closed Y\n⊢ IsLeftAdjoint (tensorLeft (X ⊗ Y))\n[PROOFSTEP]\nhaveI := hX.isAdj\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : MonoidalCategory C\nX Y : C\nhX : Closed X\nhY : Closed Y\nthis : IsLeftAdjoint (tensorLeft X)\n⊢ IsLeftAdjoint (tensorLeft (X ⊗ Y))\n[PROOFSTEP]\nhaveI := hY.isAdj\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : MonoidalCategory C\nX Y : C\nhX : Closed X\nhY : Closed Y\nthis✝ : IsLeftAdjoint (tensorLeft X)\nthis : IsLeftAdjoint (tensorLeft Y)\n⊢ IsLeftAdjoint (tensorLeft (X ⊗ Y))\n[PROOFSTEP]\nexact Adjunction.leftAdjointOfNatIso (MonoidalCategory.tensorLeftTensor _ _).symm\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : MonoidalCategory C\nX x✝ : C\n⊢ Function.LeftInverse (fun a => (λ_ X).hom ≫ a) fun a => (λ_ X).inv ≫ a\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : MonoidalCategory C\nX x✝ : C\n⊢ Function.RightInverse (fun a => (λ_ X).hom ≫ a) fun a => (λ_ X).inv ≫ a\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : MonoidalCategory C\nX'✝ X✝ Y✝ : C\nf : X'✝ ⟶ X✝\ng : X✝ ⟶ (𝟭 C).obj Y✝\n⊢ ↑((fun X x =>\n { toFun := fun a => (λ_ X).inv ≫ a, invFun := fun a => (λ_ X).hom ≫ a,\n left_inv := (_ : ∀ (x_1 : (tensorLeft (𝟙_ C)).obj X ⟶ x), (λ_ X).hom ≫ (λ_ X).inv ≫ x_1 = x_1),\n right_inv := (_ : ∀ (x_1 : X ⟶ (𝟭 C).obj x), (λ_ X).inv ≫ (λ_ X).hom ≫ x_1 = x_1) })\n X'✝ Y✝).symm\n (f ≫ g) =\n (tensorLeft (𝟙_ C)).map f ≫\n ↑((fun X x =>\n { toFun := fun a => (λ_ X).inv ≫ a, invFun := fun a => (λ_ X).hom ≫ a,\n left_inv := (_ : ∀ (x_1 : (tensorLeft (𝟙_ C)).obj X ⟶ x), (λ_ X).hom ≫ (λ_ X).inv ≫ x_1 = x_1),\n right_inv := (_ : ∀ (x_1 : X ⟶ (𝟭 C).obj x), (λ_ X).inv ≫ (λ_ X).hom ≫ x_1 = x_1) })\n X✝ Y✝).symm\n g\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : MonoidalCategory C\nX'✝ X✝ Y✝ : C\nf : X'✝ ⟶ X✝\ng : X✝ ⟶ (𝟭 C).obj Y✝\n⊢ (λ_ X'✝).hom ≫ f ≫ g = (𝟙 (𝟙_ C) ⊗ f) ≫ (λ_ X✝).hom ≫ g\n[PROOFSTEP]\nrw [leftUnitor_naturality_assoc]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : MonoidalCategory C\nA B X X' Y Y' Z : C\ninst✝ : Closed A\n⊢ uncurry (𝟙 ((ihom A).obj X)) = NatTrans.app (ihom.ev A) X\n[PROOFSTEP]\nrw [uncurry_eq, tensor_id, id_comp]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : MonoidalCategory C\nA B X X' Y Y' Z : C\ninst✝ : Closed A\n⊢ curry (𝟙 (A ⊗ (𝟭 C).obj X)) = NatTrans.app (ihom.coev A) X\n[PROOFSTEP]\nrw [curry_eq, (ihom A).map_id (A ⊗ _)]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : MonoidalCategory C\nA B X X' Y Y' Z : C\ninst✝ : Closed A\n⊢ NatTrans.app (ihom.coev A) ((𝟭 C).obj X) ≫ 𝟙 ((ihom A).obj (A ⊗ (𝟭 C).obj X)) = NatTrans.app (ihom.coev A) X\n[PROOFSTEP]\napply comp_id\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : MonoidalCategory C\nA B X✝ X' Y Y' Z : C\ninst✝¹ : Closed A\ninst✝ : Closed B\nf : B ⟶ A\nX : C\n⊢ uncurry (NatTrans.app (pre f) X) = (f ⊗ 𝟙 ((ihom A).obj X)) ≫ NatTrans.app (ihom.ev A) X\n[PROOFSTEP]\nrw [uncurry_eq, id_tensor_pre_app_comp_ev]\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : MonoidalCategory C\nA✝ B X X' Y Y' Z : C\ninst✝² : Closed A✝\ninst✝¹ : Closed B\nA : C\ninst✝ : Closed A\n⊢ pre (𝟙 A) = 𝟙 (ihom A)\n[PROOFSTEP]\nsimp only [pre, Functor.map_id]\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : MonoidalCategory C\nA✝ B X X' Y Y' Z : C\ninst✝² : Closed A✝\ninst✝¹ : Closed B\nA : C\ninst✝ : Closed A\n⊢ ↑(transferNatTransSelf (ihom.adjunction A) (ihom.adjunction A)) (𝟙 ((tensoringLeft C).obj A)) = 𝟙 (ihom A)\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : MonoidalCategory C\nA✝ B X X' Y Y' Z : C\ninst✝² : Closed A✝\ninst✝¹ : Closed B\nA : C\ninst✝ : Closed A\n⊢ ↑(transferNatTransSelf (ihom.adjunction A) (ihom.adjunction A)) (𝟙 (tensorLeft A)) = 𝟙 (ihom A)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{v, u} C\ninst✝⁵ : MonoidalCategory C\nA B X X' Y Y' Z : C\ninst✝⁴ : Closed A\ninst✝³ : Closed B\nA₁ A₂ A₃ : C\ninst✝² : Closed A₁\ninst✝¹ : Closed A₂\ninst✝ : Closed A₃\nf : A₁ ⟶ A₂\ng : A₂ ⟶ A₃\n⊢ pre (f ≫ g) = pre g ≫ pre f\n[PROOFSTEP]\nrw [pre, pre, pre, transferNatTransSelf_comp, (tensoringLeft C).map_comp]\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{v, u} C\ninst✝⁴ : MonoidalCategory C\nA B X✝ X' Y✝ Y' Z✝ : C\ninst✝³ : Closed A\ninst✝² : Closed B\nW X Y Z : C\ninst✝¹ : Closed W\ninst✝ : Closed X\nf : W ⟶ X\ng : Y ⟶ Z\n⊢ NatTrans.app (pre f) Y ≫ (ihom W).map g = (ihom X).map g ≫ NatTrans.app (pre f) Z\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{v, u} C\ninst✝⁴ : MonoidalCategory C\nA B X✝ X' Y Y' Z : C\ninst✝³ : Closed A\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\nh : MonoidalClosed D\nX : C\n⊢ IsLeftAdjoint (tensorLeft X)\n[PROOFSTEP]\nhaveI q : Closed (F.obj X) := inferInstance\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{v, u} C\ninst✝⁴ : MonoidalCategory C\nA B X✝ X' Y Y' Z : C\ninst✝³ : Closed A\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\nh : MonoidalClosed D\nX : C\nq : Closed (F.obj X)\n⊢ IsLeftAdjoint (tensorLeft X)\n[PROOFSTEP]\nhaveI : IsLeftAdjoint (tensorLeft (F.obj X)) := q.isAdj\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{v, u} C\ninst✝⁴ : MonoidalCategory C\nA B X✝ X' Y Y' Z : C\ninst✝³ : Closed A\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\nh : MonoidalClosed D\nX : C\nq : Closed (F.obj X)\nthis : IsLeftAdjoint (tensorLeft (F.obj X))\n⊢ IsLeftAdjoint (tensorLeft X)\n[PROOFSTEP]\nhave i := compInvIso (MonoidalFunctor.commTensorLeft F X)\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{v, u} C\ninst✝⁴ : MonoidalCategory C\nA B X✝ X' Y Y' Z : C\ninst✝³ : Closed A\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\nh : MonoidalClosed D\nX : C\nq : Closed (F.obj X)\nthis : IsLeftAdjoint (tensorLeft (F.obj X))\ni : (F.toFunctor ⋙ tensorLeft (F.obj X)) ⋙ Functor.inv F.toFunctor ≅ tensorLeft X\n⊢ IsLeftAdjoint (tensorLeft X)\n[PROOFSTEP]\nexact Adjunction.leftAdjointOfNatIso i\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Closed.Monoidal", "llama_tokens": 3209, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO", "lm_q1_score": 0.44552954976388515, "lm_q2_score": 0.02262920172208746, "lm_q1q2_score": 0.010081978054757761}} {"text": "[GOAL]\nX✝ : LocallyRingedSpace\nX : LocallyRingedSpace\nx : ↑↑X.toPresheafedSpace\n⊢ IsLocalRingHom (PresheafedSpace.stalkMap (𝟙 X.toSheafedSpace) x)\n[PROOFSTEP]\nerw [PresheafedSpace.stalkMap.id]\n[GOAL]\nX✝ : LocallyRingedSpace\nX : LocallyRingedSpace\nx : ↑↑X.toPresheafedSpace\n⊢ IsLocalRingHom (𝟙 (PresheafedSpace.stalk X.toPresheafedSpace x))\n[PROOFSTEP]\napply isLocalRingHom_id\n[GOAL]\nX✝ : LocallyRingedSpace\nX Y Z : LocallyRingedSpace\nf : Hom X Y\ng : Hom Y Z\nx : ↑↑X.toPresheafedSpace\n⊢ IsLocalRingHom (PresheafedSpace.stalkMap (f.val ≫ g.val) x)\n[PROOFSTEP]\nerw [PresheafedSpace.stalkMap.comp]\n[GOAL]\nX✝ : LocallyRingedSpace\nX Y Z : LocallyRingedSpace\nf : Hom X Y\ng : Hom Y Z\nx : ↑↑X.toPresheafedSpace\n⊢ IsLocalRingHom (PresheafedSpace.stalkMap g.val (↑f.val.base x) ≫ PresheafedSpace.stalkMap f.val x)\n[PROOFSTEP]\nexact @isLocalRingHom_comp _ _ _ _ _ _ _ _ (f.2 _) (g.2 _)\n[GOAL]\nX✝ : LocallyRingedSpace\nX Y : LocallyRingedSpace\nf : X ⟶ Y\n⊢ (𝟙 X ≫ f).val = f.val\n[PROOFSTEP]\nsimp [comp]\n[GOAL]\nX✝ : LocallyRingedSpace\nX Y : LocallyRingedSpace\nf : X ⟶ Y\n⊢ (f ≫ 𝟙 Y).val = f.val\n[PROOFSTEP]\nsimp [comp]\n[GOAL]\nX : LocallyRingedSpace\nx✝³ x✝² x✝¹ x✝ : LocallyRingedSpace\nf : x✝³ ⟶ x✝²\ng : x✝² ⟶ x✝¹\nh : x✝¹ ⟶ x✝\n⊢ ((f ≫ g) ≫ h).val = (f ≫ g ≫ h).val\n[PROOFSTEP]\nsimp [comp]\n[GOAL]\nX✝ : LocallyRingedSpace\nX Y : LocallyRingedSpace\nf : X.toSheafedSpace ⟶ Y.toSheafedSpace\ninst✝ : IsIso f\nx : ↑↑X.toPresheafedSpace\n⊢ IsLocalRingHom (PresheafedSpace.stalkMap (SheafedSpace.forgetToPresheafedSpace.map f) x)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nX✝ : LocallyRingedSpace\nU : TopCat\nX : LocallyRingedSpace\nf : U ⟶ toTopCat X\nh : OpenEmbedding ↑f\n⊢ ∀ (x : ↑↑(SheafedSpace.restrict X.toSheafedSpace h).toPresheafedSpace),\n LocalRing ↑(Presheaf.stalk (SheafedSpace.restrict X.toSheafedSpace h).toPresheafedSpace.presheaf x)\n[PROOFSTEP]\nintro x\n[GOAL]\nX✝ : LocallyRingedSpace\nU : TopCat\nX : LocallyRingedSpace\nf : U ⟶ toTopCat X\nh : OpenEmbedding ↑f\nx : ↑↑(SheafedSpace.restrict X.toSheafedSpace h).toPresheafedSpace\n⊢ LocalRing ↑(Presheaf.stalk (SheafedSpace.restrict X.toSheafedSpace h).toPresheafedSpace.presheaf x)\n[PROOFSTEP]\napply @RingEquiv.localRing _ _ _ (X.localRing (f x))\n[GOAL]\ncase e\nX✝ : LocallyRingedSpace\nU : TopCat\nX : LocallyRingedSpace\nf : U ⟶ toTopCat X\nh : OpenEmbedding ↑f\nx : ↑↑(SheafedSpace.restrict X.toSheafedSpace h).toPresheafedSpace\n⊢ ↑(Presheaf.stalk X.presheaf (↑f x)) ≃+*\n ↑(Presheaf.stalk (SheafedSpace.restrict X.toSheafedSpace h).toPresheafedSpace.presheaf x)\n[PROOFSTEP]\nexact (X.restrictStalkIso h x).symm.commRingCatIsoToRingEquiv\n[GOAL]\nX✝ : LocallyRingedSpace\nX Y : LocallyRingedSpace\nf : X ⟶ Y\nU : Opens ↑(toTopCat Y)\ns : ↑(Y.presheaf.obj (op U))\n⊢ (Opens.map f.val.base).obj (RingedSpace.basicOpen (toRingedSpace Y) s) =\n RingedSpace.basicOpen (toRingedSpace X) (↑(NatTrans.app f.val.c (op U)) s)\n[PROOFSTEP]\next x\n[GOAL]\ncase h.h\nX✝ : LocallyRingedSpace\nX Y : LocallyRingedSpace\nf : X ⟶ Y\nU : Opens ↑(toTopCat Y)\ns : ↑(Y.presheaf.obj (op U))\nx : ↑↑X.toPresheafedSpace\n⊢ x ∈ ↑((Opens.map f.val.base).obj (RingedSpace.basicOpen (toRingedSpace Y) s)) ↔\n x ∈ ↑(RingedSpace.basicOpen (toRingedSpace X) (↑(NatTrans.app f.val.c (op U)) s))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.h.mp\nX✝ : LocallyRingedSpace\nX Y : LocallyRingedSpace\nf : X ⟶ Y\nU : Opens ↑(toTopCat Y)\ns : ↑(Y.presheaf.obj (op U))\nx : ↑↑X.toPresheafedSpace\n⊢ x ∈ ↑((Opens.map f.val.base).obj (RingedSpace.basicOpen (toRingedSpace Y) s)) →\n x ∈ ↑(RingedSpace.basicOpen (toRingedSpace X) (↑(NatTrans.app f.val.c (op U)) s))\n[PROOFSTEP]\nrintro ⟨⟨y, hyU⟩, hy : IsUnit _, rfl : y = _⟩\n[GOAL]\ncase h.h.mp.intro.mk.intro\nX✝ : LocallyRingedSpace\nX Y : LocallyRingedSpace\nf : X ⟶ Y\nU : Opens ↑(toTopCat Y)\ns : ↑(Y.presheaf.obj (op U))\nx : ↑↑X.toPresheafedSpace\nhyU : ↑f.val.base x ∈ U\nhy : IsUnit (↑(Presheaf.germ (toRingedSpace Y).toPresheafedSpace.presheaf { val := ↑f.val.base x, property := hyU }) s)\n⊢ x ∈ ↑(RingedSpace.basicOpen (toRingedSpace X) (↑(NatTrans.app f.val.c (op U)) s))\n[PROOFSTEP]\nerw [RingedSpace.mem_basicOpen _ _ ⟨x, show x ∈ (Opens.map f.1.base).obj U from hyU⟩, ←\n PresheafedSpace.stalkMap_germ_apply]\n[GOAL]\ncase h.h.mp.intro.mk.intro\nX✝ : LocallyRingedSpace\nX Y : LocallyRingedSpace\nf : X ⟶ Y\nU : Opens ↑(toTopCat Y)\ns : ↑(Y.presheaf.obj (op U))\nx : ↑↑X.toPresheafedSpace\nhyU : ↑f.val.base x ∈ U\nhy : IsUnit (↑(Presheaf.germ (toRingedSpace Y).toPresheafedSpace.presheaf { val := ↑f.val.base x, property := hyU }) s)\n⊢ IsUnit\n (↑(PresheafedSpace.stalkMap f.val ↑{ val := x, property := (_ : x ∈ (Opens.map f.val.base).obj U) })\n (↑(Presheaf.germ Y.presheaf\n { val := ↑f.val.base ↑{ val := x, property := (_ : x ∈ (Opens.map f.val.base).obj U) },\n property :=\n (_ :\n ↑{ val := x, property := (_ : x ∈ (Opens.map f.val.base).obj U) } ∈ (Opens.map f.val.base).obj U) })\n s))\n[PROOFSTEP]\nexact (PresheafedSpace.stalkMap f.1 _).isUnit_map hy\n[GOAL]\ncase h.h.mpr\nX✝ : LocallyRingedSpace\nX Y : LocallyRingedSpace\nf : X ⟶ Y\nU : Opens ↑(toTopCat Y)\ns : ↑(Y.presheaf.obj (op U))\nx : ↑↑X.toPresheafedSpace\n⊢ x ∈ ↑(RingedSpace.basicOpen (toRingedSpace X) (↑(NatTrans.app f.val.c (op U)) s)) →\n x ∈ ↑((Opens.map f.val.base).obj (RingedSpace.basicOpen (toRingedSpace Y) s))\n[PROOFSTEP]\nrintro ⟨y, hy : IsUnit _, rfl⟩\n[GOAL]\ncase h.h.mpr.intro.intro\nX✝ : LocallyRingedSpace\nX Y : LocallyRingedSpace\nf : X ⟶ Y\nU : Opens ↑(toTopCat Y)\ns : ↑(Y.presheaf.obj (op U))\ny : { x // x ∈ (Opens.map f.val.base).obj U }\nhy : IsUnit (↑(Presheaf.germ (toRingedSpace X).toPresheafedSpace.presheaf y) (↑(NatTrans.app f.val.c (op U)) s))\n⊢ ↑y ∈ ↑((Opens.map f.val.base).obj (RingedSpace.basicOpen (toRingedSpace Y) s))\n[PROOFSTEP]\nerw [RingedSpace.mem_basicOpen _ _ ⟨f.1.base y.1, y.2⟩]\n[GOAL]\ncase h.h.mpr.intro.intro\nX✝ : LocallyRingedSpace\nX Y : LocallyRingedSpace\nf : X ⟶ Y\nU : Opens ↑(toTopCat Y)\ns : ↑(Y.presheaf.obj (op U))\ny : { x // x ∈ (Opens.map f.val.base).obj U }\nhy : IsUnit (↑(Presheaf.germ (toRingedSpace X).toPresheafedSpace.presheaf y) (↑(NatTrans.app f.val.c (op U)) s))\n⊢ IsUnit (↑(Presheaf.germ Y.presheaf { val := ↑f.val.base ↑y, property := (_ : ↑y ∈ (Opens.map f.val.base).obj U) }) s)\n[PROOFSTEP]\nerw [← PresheafedSpace.stalkMap_germ_apply] at hy \n[GOAL]\ncase h.h.mpr.intro.intro\nX✝ : LocallyRingedSpace\nX Y : LocallyRingedSpace\nf : X ⟶ Y\nU : Opens ↑(toTopCat Y)\ns : ↑(Y.presheaf.obj (op U))\ny : { x // x ∈ (Opens.map f.val.base).obj U }\nhy :\n IsUnit\n (↑(PresheafedSpace.stalkMap f.val ↑y)\n (↑(Presheaf.germ Y.presheaf { val := ↑f.val.base ↑y, property := (_ : ↑y ∈ (Opens.map f.val.base).obj U) }) s))\n⊢ IsUnit (↑(Presheaf.germ Y.presheaf { val := ↑f.val.base ↑y, property := (_ : ↑y ∈ (Opens.map f.val.base).obj U) }) s)\n[PROOFSTEP]\nexact (isUnit_map_iff (PresheafedSpace.stalkMap f.1 _) _).mp hy\n[GOAL]\nX✝ : LocallyRingedSpace\nX : LocallyRingedSpace\nU : Opens ↑↑X.toPresheafedSpace\n⊢ RingedSpace.basicOpen (toRingedSpace X) 0 = ⊥\n[PROOFSTEP]\next x\n[GOAL]\ncase h.h\nX✝ : LocallyRingedSpace\nX : LocallyRingedSpace\nU : Opens ↑↑X.toPresheafedSpace\nx : ↑↑(toRingedSpace X).toPresheafedSpace\n⊢ x ∈ ↑(RingedSpace.basicOpen (toRingedSpace X) 0) ↔ x ∈ ↑⊥\n[PROOFSTEP]\nsimp only [RingedSpace.basicOpen, Opens.coe_mk, Set.mem_image, Set.mem_setOf_eq, Subtype.exists, exists_and_right,\n exists_eq_right, Opens.coe_bot, Set.mem_empty_iff_false, iff_false, not_exists]\n[GOAL]\ncase h.h\nX✝ : LocallyRingedSpace\nX : LocallyRingedSpace\nU : Opens ↑↑X.toPresheafedSpace\nx : ↑↑(toRingedSpace X).toPresheafedSpace\n⊢ ∀ (x_1 : x ∈ U),\n ¬IsUnit (↑(Presheaf.germ (toRingedSpace X).toPresheafedSpace.presheaf { val := x, property := (_ : x ∈ U) }) 0)\n[PROOFSTEP]\nintros hx\n[GOAL]\ncase h.h\nX✝ : LocallyRingedSpace\nX : LocallyRingedSpace\nU : Opens ↑↑X.toPresheafedSpace\nx : ↑↑(toRingedSpace X).toPresheafedSpace\nhx : x ∈ U\n⊢ ¬IsUnit (↑(Presheaf.germ (toRingedSpace X).toPresheafedSpace.presheaf { val := x, property := (_ : x ∈ U) }) 0)\n[PROOFSTEP]\nrw [map_zero, isUnit_zero_iff]\n[GOAL]\ncase h.h\nX✝ : LocallyRingedSpace\nX : LocallyRingedSpace\nU : Opens ↑↑X.toPresheafedSpace\nx : ↑↑(toRingedSpace X).toPresheafedSpace\nhx : x ∈ U\n⊢ ¬0 = 1\n[PROOFSTEP]\nchange (0 : X.stalk x) ≠ (1 : X.stalk x)\n[GOAL]\ncase h.h\nX✝ : LocallyRingedSpace\nX : LocallyRingedSpace\nU : Opens ↑↑X.toPresheafedSpace\nx : ↑↑(toRingedSpace X).toPresheafedSpace\nhx : x ∈ U\n⊢ 0 ≠ 1\n[PROOFSTEP]\nexact zero_ne_one\n", "meta": {"mathlib_filename": "Mathlib.AlgebraicGeometry.LocallyRingedSpace", "llama_tokens": 4091, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO", "lm_q1_score": 0.4765796510636759, "lm_q2_score": 0.020023441654952852, "lm_q1q2_score": 0.009542764837011303}} {"text": "[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nJ : GrothendieckTopology C\nP : Cᵒᵖ ⥤ A\nX✝ : C\nS : Sieve X✝\nR : Presieve X✝\nE : Aᵒᵖ\nπ : (Functor.cones ((diagram S.arrows).op ⋙ P)).obj E\nX Y : C\nf : X ⟶ X✝\ng : Y ⟶ X\nhf : S.arrows f\n⊢ (fun Y f h => NatTrans.app π (op { obj := Over.mk f, property := h })) Y (g ≫ f) (_ : S.arrows (g ≫ f)) =\n (P ⋙ coyoneda.obj E).map g.op ((fun Y f h => NatTrans.app π (op { obj := Over.mk f, property := h })) X f hf)\n[PROOFSTEP]\napply (id_comp _).symm.trans\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nJ : GrothendieckTopology C\nP : Cᵒᵖ ⥤ A\nX✝ : C\nS : Sieve X✝\nR : Presieve X✝\nE : Aᵒᵖ\nπ : (Functor.cones ((diagram S.arrows).op ⋙ P)).obj E\nX Y : C\nf : X ⟶ X✝\ng : Y ⟶ X\nhf : S.arrows f\n⊢ 𝟙\n (((Functor.const (FullSubcategory fun f => S.arrows f.hom)ᵒᵖ).op.obj E).unop.obj\n (op { obj := Over.mk (g ≫ f), property := (_ : S.arrows (g ≫ f)) })) ≫\n (fun Y f h => NatTrans.app π (op { obj := Over.mk f, property := h })) Y (g ≫ f) (_ : S.arrows (g ≫ f)) =\n (P ⋙ coyoneda.obj E).map g.op ((fun Y f h => NatTrans.app π (op { obj := Over.mk f, property := h })) X f hf)\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nJ : GrothendieckTopology C\nP : Cᵒᵖ ⥤ A\nX✝ : C\nS : Sieve X✝\nR : Presieve X✝\nE : Aᵒᵖ\nπ : (Functor.cones ((diagram S.arrows).op ⋙ P)).obj E\nX Y : C\nf : X ⟶ X✝\ng : Y ⟶ X\nhf : S.arrows f\n⊢ 𝟙 E.unop ≫ NatTrans.app π (op { obj := Over.mk (g ≫ f), property := (_ : S.arrows (g ≫ f)) }) =\n NatTrans.app π (op { obj := Over.mk f, property := hf }) ≫ P.map g.op\n[PROOFSTEP]\nexact π.naturality (Quiver.Hom.op (Over.homMk _ (by rfl)))\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nJ : GrothendieckTopology C\nP : Cᵒᵖ ⥤ A\nX✝ : C\nS : Sieve X✝\nR : Presieve X✝\nE : Aᵒᵖ\nπ : (Functor.cones ((diagram S.arrows).op ⋙ P)).obj E\nX Y : C\nf : X ⟶ X✝\ng : Y ⟶ X\nhf : S.arrows f\n⊢ g ≫ { obj := Over.mk f, property := hf }.obj.hom =\n { obj := Over.mk (g ≫ f), property := (_ : S.arrows (g ≫ f)) }.obj.hom\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nJ : GrothendieckTopology C\nP : Cᵒᵖ ⥤ A\nX : C\nS : Sieve X\nR : Presieve X\nE : Aᵒᵖ\nx : { x // SieveCompatible x }\nf f' : (FullSubcategory fun f => S.arrows f.hom)ᵒᵖ\ng : f ⟶ f'\n⊢ ((Functor.const (FullSubcategory fun f => S.arrows f.hom)ᵒᵖ).op.obj E).unop.map g ≫\n (fun f => ↑x f.unop.obj.hom (_ : S.arrows f.unop.obj.hom)) f' =\n (fun f => ↑x f.unop.obj.hom (_ : S.arrows f.unop.obj.hom)) f ≫ ((diagram S.arrows).op ⋙ P).map g\n[PROOFSTEP]\nrefine' Eq.trans _ (x.2 f.unop.1.hom g.unop.left f.unop.2)\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nJ : GrothendieckTopology C\nP : Cᵒᵖ ⥤ A\nX : C\nS : Sieve X\nR : Presieve X\nE : Aᵒᵖ\nx : { x // SieveCompatible x }\nf f' : (FullSubcategory fun f => S.arrows f.hom)ᵒᵖ\ng : f ⟶ f'\n⊢ ((Functor.const (FullSubcategory fun f => S.arrows f.hom)ᵒᵖ).op.obj E).unop.map g ≫\n (fun f => ↑x f.unop.obj.hom (_ : S.arrows f.unop.obj.hom)) f' =\n ↑x (g.unop.left ≫ f.unop.obj.hom) (_ : S.arrows (g.unop.left ≫ f.unop.obj.hom))\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nJ : GrothendieckTopology C\nP : Cᵒᵖ ⥤ A\nX : C\nS : Sieve X\nR : Presieve X\nE : Aᵒᵖ\nx : { x // SieveCompatible x }\nf f' : (FullSubcategory fun f => S.arrows f.hom)ᵒᵖ\ng : f ⟶ f'\n⊢ 𝟙 E.unop ≫ ↑x f'.unop.obj.hom (_ : S.arrows f'.unop.obj.hom) =\n ↑x (g.unop.left ≫ f.unop.obj.hom) (_ : S.arrows (g.unop.left ≫ f.unop.obj.hom))\n[PROOFSTEP]\nrw [id_comp]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nJ : GrothendieckTopology C\nP : Cᵒᵖ ⥤ A\nX : C\nS : Sieve X\nR : Presieve X\nE : Aᵒᵖ\nx : { x // SieveCompatible x }\nf f' : (FullSubcategory fun f => S.arrows f.hom)ᵒᵖ\ng : f ⟶ f'\n⊢ ↑x f'.unop.obj.hom (_ : S.arrows f'.unop.obj.hom) =\n ↑x (g.unop.left ≫ f.unop.obj.hom) (_ : S.arrows (g.unop.left ≫ f.unop.obj.hom))\n[PROOFSTEP]\nconvert rfl\n[GOAL]\ncase h.e'_3.h.e'_4\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nJ : GrothendieckTopology C\nP : Cᵒᵖ ⥤ A\nX : C\nS : Sieve X\nR : Presieve X\nE : Aᵒᵖ\nx : { x // SieveCompatible x }\nf f' : (FullSubcategory fun f => S.arrows f.hom)ᵒᵖ\ng : f ⟶ f'\n⊢ g.unop.left ≫ f.unop.obj.hom = f'.unop.obj.hom\n[PROOFSTEP]\nrw [Over.w]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nJ : GrothendieckTopology C\nP : Cᵒᵖ ⥤ A\nX : C\nS : Sieve X\nR : Presieve X\nE : Aᵒᵖ\nx : FamilyOfElements (P ⋙ coyoneda.obj E) S.arrows\nhx : SieveCompatible x\n⊢ Nonempty (IsLimit (P.mapCone (Cocone.op (cocone S.arrows)))) ↔ ∀ (E : Aᵒᵖ), IsSheafFor (P ⋙ coyoneda.obj E) S.arrows\n[PROOFSTEP]\ndsimp [IsSheafFor]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nJ : GrothendieckTopology C\nP : Cᵒᵖ ⥤ A\nX : C\nS : Sieve X\nR : Presieve X\nE : Aᵒᵖ\nx : FamilyOfElements (P ⋙ coyoneda.obj E) S.arrows\nhx : SieveCompatible x\n⊢ Nonempty (IsLimit (P.mapCone (Cocone.op (cocone S.arrows)))) ↔\n ∀ (E : Aᵒᵖ) (x : FamilyOfElements (P ⋙ coyoneda.obj E) S.arrows), Compatible x → ∃! t, IsAmalgamation x t\n[PROOFSTEP]\nsimp_rw [compatible_iff_sieveCompatible]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nJ : GrothendieckTopology C\nP : Cᵒᵖ ⥤ A\nX : C\nS : Sieve X\nR : Presieve X\nE : Aᵒᵖ\nx : FamilyOfElements (P ⋙ coyoneda.obj E) S.arrows\nhx : SieveCompatible x\n⊢ Nonempty (IsLimit (P.mapCone (Cocone.op (cocone S.arrows)))) ↔\n ∀ (E : Aᵒᵖ) (x : FamilyOfElements (P ⋙ coyoneda.obj E) S.arrows), SieveCompatible x → ∃! t, IsAmalgamation x t\n[PROOFSTEP]\nrw [((Cone.isLimitEquivIsTerminal _).trans (isTerminalEquivUnique _ _)).nonempty_congr]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nJ : GrothendieckTopology C\nP : Cᵒᵖ ⥤ A\nX : C\nS : Sieve X\nR : Presieve X\nE : Aᵒᵖ\nx : FamilyOfElements (P ⋙ coyoneda.obj E) S.arrows\nhx : SieveCompatible x\n⊢ Nonempty ((X_1 : Cone ((diagram S.arrows).op ⋙ P)) → Unique (X_1 ⟶ P.mapCone (Cocone.op (cocone S.arrows)))) ↔\n ∀ (E : Aᵒᵖ) (x : FamilyOfElements (P ⋙ coyoneda.obj E) S.arrows), SieveCompatible x → ∃! t, IsAmalgamation x t\n[PROOFSTEP]\nrw [Classical.nonempty_pi]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nJ : GrothendieckTopology C\nP : Cᵒᵖ ⥤ A\nX : C\nS : Sieve X\nR : Presieve X\nE : Aᵒᵖ\nx : FamilyOfElements (P ⋙ coyoneda.obj E) S.arrows\nhx : SieveCompatible x\n⊢ (∀ (i : Cone ((diagram S.arrows).op ⋙ P)), Nonempty (Unique (i ⟶ P.mapCone (Cocone.op (cocone S.arrows))))) ↔\n ∀ (E : Aᵒᵖ) (x : FamilyOfElements (P ⋙ coyoneda.obj E) S.arrows), SieveCompatible x → ∃! t, IsAmalgamation x t\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nJ : GrothendieckTopology C\nP : Cᵒᵖ ⥤ A\nX : C\nS : Sieve X\nR : Presieve X\nE : Aᵒᵖ\nx : FamilyOfElements (P ⋙ coyoneda.obj E) S.arrows\nhx : SieveCompatible x\n⊢ (∀ (i : Cone ((diagram S.arrows).op ⋙ P)), Nonempty (Unique (i ⟶ P.mapCone (Cocone.op (cocone S.arrows))))) →\n ∀ (E : Aᵒᵖ) (x : FamilyOfElements (P ⋙ coyoneda.obj E) S.arrows), SieveCompatible x → ∃! t, IsAmalgamation x t\n[PROOFSTEP]\nintro hu E x hx\n[GOAL]\ncase mp\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nJ : GrothendieckTopology C\nP : Cᵒᵖ ⥤ A\nX : C\nS : Sieve X\nR : Presieve X\nE✝ : Aᵒᵖ\nx✝ : FamilyOfElements (P ⋙ coyoneda.obj E✝) S.arrows\nhx✝ : SieveCompatible x✝\nhu : ∀ (i : Cone ((diagram S.arrows).op ⋙ P)), Nonempty (Unique (i ⟶ P.mapCone (Cocone.op (cocone S.arrows))))\nE : Aᵒᵖ\nx : FamilyOfElements (P ⋙ coyoneda.obj E) S.arrows\nhx : SieveCompatible x\n⊢ ∃! t, IsAmalgamation x t\n[PROOFSTEP]\nspecialize hu hx.cone\n[GOAL]\ncase mp\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nJ : GrothendieckTopology C\nP : Cᵒᵖ ⥤ A\nX : C\nS : Sieve X\nR : Presieve X\nE✝ : Aᵒᵖ\nx✝ : FamilyOfElements (P ⋙ coyoneda.obj E✝) S.arrows\nhx✝ : SieveCompatible x✝\nE : Aᵒᵖ\nx : FamilyOfElements (P ⋙ coyoneda.obj E) S.arrows\nhx : SieveCompatible x\nhu : Nonempty (Unique (SieveCompatible.cone hx ⟶ P.mapCone (Cocone.op (cocone S.arrows))))\n⊢ ∃! t, IsAmalgamation x t\n[PROOFSTEP]\nerw [(homEquivAmalgamation hx).uniqueCongr.nonempty_congr] at hu \n[GOAL]\ncase mp\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nJ : GrothendieckTopology C\nP : Cᵒᵖ ⥤ A\nX : C\nS : Sieve X\nR : Presieve X\nE✝ : Aᵒᵖ\nx✝ : FamilyOfElements (P ⋙ coyoneda.obj E✝) S.arrows\nhx✝ : SieveCompatible x✝\nE : Aᵒᵖ\nx : FamilyOfElements (P ⋙ coyoneda.obj E) S.arrows\nhx : SieveCompatible x\nhu : Nonempty (Unique { t // IsAmalgamation x t })\n⊢ ∃! t, IsAmalgamation x t\n[PROOFSTEP]\nexact (unique_subtype_iff_exists_unique _).1 hu\n[GOAL]\ncase mpr\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nJ : GrothendieckTopology C\nP : Cᵒᵖ ⥤ A\nX : C\nS : Sieve X\nR : Presieve X\nE : Aᵒᵖ\nx : FamilyOfElements (P ⋙ coyoneda.obj E) S.arrows\nhx : SieveCompatible x\n⊢ (∀ (E : Aᵒᵖ) (x : FamilyOfElements (P ⋙ coyoneda.obj E) S.arrows), SieveCompatible x → ∃! t, IsAmalgamation x t) →\n ∀ (i : Cone ((diagram S.arrows).op ⋙ P)), Nonempty (Unique (i ⟶ P.mapCone (Cocone.op (cocone S.arrows))))\n[PROOFSTEP]\nrintro h ⟨E, π⟩\n[GOAL]\ncase mpr.mk\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nJ : GrothendieckTopology C\nP : Cᵒᵖ ⥤ A\nX : C\nS : Sieve X\nR : Presieve X\nE✝ : Aᵒᵖ\nx : FamilyOfElements (P ⋙ coyoneda.obj E✝) S.arrows\nhx : SieveCompatible x\nh : ∀ (E : Aᵒᵖ) (x : FamilyOfElements (P ⋙ coyoneda.obj E) S.arrows), SieveCompatible x → ∃! t, IsAmalgamation x t\nE : A\nπ : (Functor.const (FullSubcategory fun f => S.arrows f.hom)ᵒᵖ).obj E ⟶ (diagram S.arrows).op ⋙ P\n⊢ Nonempty (Unique ({ pt := E, π := π } ⟶ P.mapCone (Cocone.op (cocone S.arrows))))\n[PROOFSTEP]\nlet eqv := conesEquivSieveCompatibleFamily P S (op E)\n[GOAL]\ncase mpr.mk\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nJ : GrothendieckTopology C\nP : Cᵒᵖ ⥤ A\nX : C\nS : Sieve X\nR : Presieve X\nE✝ : Aᵒᵖ\nx : FamilyOfElements (P ⋙ coyoneda.obj E✝) S.arrows\nhx : SieveCompatible x\nh : ∀ (E : Aᵒᵖ) (x : FamilyOfElements (P ⋙ coyoneda.obj E) S.arrows), SieveCompatible x → ∃! t, IsAmalgamation x t\nE : A\nπ : (Functor.const (FullSubcategory fun f => S.arrows f.hom)ᵒᵖ).obj E ⟶ (diagram S.arrows).op ⋙ P\neqv : (Functor.cones ((diagram S.arrows).op ⋙ P)).obj (op E) ≃ { x // SieveCompatible x } :=\n conesEquivSieveCompatibleFamily P S (op E)\n⊢ Nonempty (Unique ({ pt := E, π := π } ⟶ P.mapCone (Cocone.op (cocone S.arrows))))\n[PROOFSTEP]\nrw [← eqv.left_inv π]\n[GOAL]\ncase mpr.mk\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nJ : GrothendieckTopology C\nP : Cᵒᵖ ⥤ A\nX : C\nS : Sieve X\nR : Presieve X\nE✝ : Aᵒᵖ\nx : FamilyOfElements (P ⋙ coyoneda.obj E✝) S.arrows\nhx : SieveCompatible x\nh : ∀ (E : Aᵒᵖ) (x : FamilyOfElements (P ⋙ coyoneda.obj E) S.arrows), SieveCompatible x → ∃! t, IsAmalgamation x t\nE : A\nπ : (Functor.const (FullSubcategory fun f => S.arrows f.hom)ᵒᵖ).obj E ⟶ (diagram S.arrows).op ⋙ P\neqv : (Functor.cones ((diagram S.arrows).op ⋙ P)).obj (op E) ≃ { x // SieveCompatible x } :=\n conesEquivSieveCompatibleFamily P S (op E)\n⊢ Nonempty (Unique ({ pt := E, π := Equiv.invFun eqv (Equiv.toFun eqv π) } ⟶ P.mapCone (Cocone.op (cocone S.arrows))))\n[PROOFSTEP]\nerw [(homEquivAmalgamation (eqv π).2).uniqueCongr.nonempty_congr]\n[GOAL]\ncase mpr.mk\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nJ : GrothendieckTopology C\nP : Cᵒᵖ ⥤ A\nX : C\nS : Sieve X\nR : Presieve X\nE✝ : Aᵒᵖ\nx : FamilyOfElements (P ⋙ coyoneda.obj E✝) S.arrows\nhx : SieveCompatible x\nh : ∀ (E : Aᵒᵖ) (x : FamilyOfElements (P ⋙ coyoneda.obj E) S.arrows), SieveCompatible x → ∃! t, IsAmalgamation x t\nE : A\nπ : (Functor.const (FullSubcategory fun f => S.arrows f.hom)ᵒᵖ).obj E ⟶ (diagram S.arrows).op ⋙ P\neqv : (Functor.cones ((diagram S.arrows).op ⋙ P)).obj (op E) ≃ { x // SieveCompatible x } :=\n conesEquivSieveCompatibleFamily P S (op E)\n⊢ Nonempty (Unique { t // IsAmalgamation (↑(↑eqv π)) t })\n[PROOFSTEP]\nrw [unique_subtype_iff_exists_unique]\n[GOAL]\ncase mpr.mk\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nJ : GrothendieckTopology C\nP : Cᵒᵖ ⥤ A\nX : C\nS : Sieve X\nR : Presieve X\nE✝ : Aᵒᵖ\nx : FamilyOfElements (P ⋙ coyoneda.obj E✝) S.arrows\nhx : SieveCompatible x\nh : ∀ (E : Aᵒᵖ) (x : FamilyOfElements (P ⋙ coyoneda.obj E) S.arrows), SieveCompatible x → ∃! t, IsAmalgamation x t\nE : A\nπ : (Functor.const (FullSubcategory fun f => S.arrows f.hom)ᵒᵖ).obj E ⟶ (diagram S.arrows).op ⋙ P\neqv : (Functor.cones ((diagram S.arrows).op ⋙ P)).obj (op E) ≃ { x // SieveCompatible x } :=\n conesEquivSieveCompatibleFamily P S (op E)\n⊢ ∃! a, IsAmalgamation (↑(↑eqv π)) a\n[PROOFSTEP]\nexact h _ _ (eqv π).2\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nJ : GrothendieckTopology C\nP : Cᵒᵖ ⥤ A\nX : C\nS : Sieve X\nR : Presieve X\nE : Aᵒᵖ\nx : FamilyOfElements (P ⋙ coyoneda.obj E) S.arrows\nhx : SieveCompatible x\n⊢ (∀ (c : Cone ((diagram S.arrows).op ⋙ P)), Subsingleton (c ⟶ P.mapCone (Cocone.op (cocone S.arrows)))) ↔\n ∀ (E : Aᵒᵖ), IsSeparatedFor (P ⋙ coyoneda.obj E) S.arrows\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nJ : GrothendieckTopology C\nP : Cᵒᵖ ⥤ A\nX : C\nS : Sieve X\nR : Presieve X\nE : Aᵒᵖ\nx : FamilyOfElements (P ⋙ coyoneda.obj E) S.arrows\nhx : SieveCompatible x\n⊢ (∀ (c : Cone ((diagram S.arrows).op ⋙ P)), Subsingleton (c ⟶ P.mapCone (Cocone.op (cocone S.arrows)))) →\n ∀ (E : Aᵒᵖ), IsSeparatedFor (P ⋙ coyoneda.obj E) S.arrows\n[PROOFSTEP]\nintro hs E x t₁ t₂ h₁ h₂\n[GOAL]\ncase mp\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nJ : GrothendieckTopology C\nP : Cᵒᵖ ⥤ A\nX : C\nS : Sieve X\nR : Presieve X\nE✝ : Aᵒᵖ\nx✝ : FamilyOfElements (P ⋙ coyoneda.obj E✝) S.arrows\nhx : SieveCompatible x✝\nhs : ∀ (c : Cone ((diagram S.arrows).op ⋙ P)), Subsingleton (c ⟶ P.mapCone (Cocone.op (cocone S.arrows)))\nE : Aᵒᵖ\nx : FamilyOfElements (P ⋙ coyoneda.obj E) S.arrows\nt₁ t₂ : (P ⋙ coyoneda.obj E).obj (op X)\nh₁ : IsAmalgamation x t₁\nh₂ : IsAmalgamation x t₂\n⊢ t₁ = t₂\n[PROOFSTEP]\nhave hx := is_compatible_of_exists_amalgamation x ⟨t₁, h₁⟩\n[GOAL]\ncase mp\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nJ : GrothendieckTopology C\nP : Cᵒᵖ ⥤ A\nX : C\nS : Sieve X\nR : Presieve X\nE✝ : Aᵒᵖ\nx✝ : FamilyOfElements (P ⋙ coyoneda.obj E✝) S.arrows\nhx✝ : SieveCompatible x✝\nhs : ∀ (c : Cone ((diagram S.arrows).op ⋙ P)), Subsingleton (c ⟶ P.mapCone (Cocone.op (cocone S.arrows)))\nE : Aᵒᵖ\nx : FamilyOfElements (P ⋙ coyoneda.obj E) S.arrows\nt₁ t₂ : (P ⋙ coyoneda.obj E).obj (op X)\nh₁ : IsAmalgamation x t₁\nh₂ : IsAmalgamation x t₂\nhx : Compatible x\n⊢ t₁ = t₂\n[PROOFSTEP]\nrw [compatible_iff_sieveCompatible] at hx \n[GOAL]\ncase mp\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nJ : GrothendieckTopology C\nP : Cᵒᵖ ⥤ A\nX : C\nS : Sieve X\nR : Presieve X\nE✝ : Aᵒᵖ\nx✝ : FamilyOfElements (P ⋙ coyoneda.obj E✝) S.arrows\nhx✝ : SieveCompatible x✝\nhs : ∀ (c : Cone ((diagram S.arrows).op ⋙ P)), Subsingleton (c ⟶ P.mapCone (Cocone.op (cocone S.arrows)))\nE : Aᵒᵖ\nx : FamilyOfElements (P ⋙ coyoneda.obj E) S.arrows\nt₁ t₂ : (P ⋙ coyoneda.obj E).obj (op X)\nh₁ : IsAmalgamation x t₁\nh₂ : IsAmalgamation x t₂\nhx : SieveCompatible x\n⊢ t₁ = t₂\n[PROOFSTEP]\nspecialize hs hx.cone\n[GOAL]\ncase mp\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nJ : GrothendieckTopology C\nP : Cᵒᵖ ⥤ A\nX : C\nS : Sieve X\nR : Presieve X\nE✝ : Aᵒᵖ\nx✝ : FamilyOfElements (P ⋙ coyoneda.obj E✝) S.arrows\nhx✝ : SieveCompatible x✝\nE : Aᵒᵖ\nx : FamilyOfElements (P ⋙ coyoneda.obj E) S.arrows\nt₁ t₂ : (P ⋙ coyoneda.obj E).obj (op X)\nh₁ : IsAmalgamation x t₁\nh₂ : IsAmalgamation x t₂\nhx : SieveCompatible x\nhs : Subsingleton (SieveCompatible.cone hx ⟶ P.mapCone (Cocone.op (cocone S.arrows)))\n⊢ t₁ = t₂\n[PROOFSTEP]\nrcases hs with ⟨hs⟩\n[GOAL]\ncase mp.intro\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nJ : GrothendieckTopology C\nP : Cᵒᵖ ⥤ A\nX : C\nS : Sieve X\nR : Presieve X\nE✝ : Aᵒᵖ\nx✝ : FamilyOfElements (P ⋙ coyoneda.obj E✝) S.arrows\nhx✝ : SieveCompatible x✝\nE : Aᵒᵖ\nx : FamilyOfElements (P ⋙ coyoneda.obj E) S.arrows\nt₁ t₂ : (P ⋙ coyoneda.obj E).obj (op X)\nh₁ : IsAmalgamation x t₁\nh₂ : IsAmalgamation x t₂\nhx : SieveCompatible x\nhs : ∀ (a b : SieveCompatible.cone hx ⟶ P.mapCone (Cocone.op (cocone S.arrows))), a = b\n⊢ t₁ = t₂\n[PROOFSTEP]\nsimpa only [Subtype.mk.injEq] using\n (show Subtype.mk t₁ h₁ = ⟨t₂, h₂⟩ from (homEquivAmalgamation hx).symm.injective (hs _ _))\n[GOAL]\ncase mpr\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nJ : GrothendieckTopology C\nP : Cᵒᵖ ⥤ A\nX : C\nS : Sieve X\nR : Presieve X\nE : Aᵒᵖ\nx : FamilyOfElements (P ⋙ coyoneda.obj E) S.arrows\nhx : SieveCompatible x\n⊢ (∀ (E : Aᵒᵖ), IsSeparatedFor (P ⋙ coyoneda.obj E) S.arrows) →\n ∀ (c : Cone ((diagram S.arrows).op ⋙ P)), Subsingleton (c ⟶ P.mapCone (Cocone.op (cocone S.arrows)))\n[PROOFSTEP]\nrintro h ⟨E, π⟩\n[GOAL]\ncase mpr.mk\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nJ : GrothendieckTopology C\nP : Cᵒᵖ ⥤ A\nX : C\nS : Sieve X\nR : Presieve X\nE✝ : Aᵒᵖ\nx : FamilyOfElements (P ⋙ coyoneda.obj E✝) S.arrows\nhx : SieveCompatible x\nh : ∀ (E : Aᵒᵖ), IsSeparatedFor (P ⋙ coyoneda.obj E) S.arrows\nE : A\nπ : (Functor.const (FullSubcategory fun f => S.arrows f.hom)ᵒᵖ).obj E ⟶ (diagram S.arrows).op ⋙ P\n⊢ Subsingleton ({ pt := E, π := π } ⟶ P.mapCone (Cocone.op (cocone S.arrows)))\n[PROOFSTEP]\nlet eqv := conesEquivSieveCompatibleFamily P S (op E)\n[GOAL]\ncase mpr.mk\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nJ : GrothendieckTopology C\nP : Cᵒᵖ ⥤ A\nX : C\nS : Sieve X\nR : Presieve X\nE✝ : Aᵒᵖ\nx : FamilyOfElements (P ⋙ coyoneda.obj E✝) S.arrows\nhx : SieveCompatible x\nh : ∀ (E : Aᵒᵖ), IsSeparatedFor (P ⋙ coyoneda.obj E) S.arrows\nE : A\nπ : (Functor.const (FullSubcategory fun f => S.arrows f.hom)ᵒᵖ).obj E ⟶ (diagram S.arrows).op ⋙ P\neqv : (Functor.cones ((diagram S.arrows).op ⋙ P)).obj (op E) ≃ { x // SieveCompatible x } :=\n conesEquivSieveCompatibleFamily P S (op E)\n⊢ Subsingleton ({ pt := E, π := π } ⟶ P.mapCone (Cocone.op (cocone S.arrows)))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mpr.mk.allEq\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nJ : GrothendieckTopology C\nP : Cᵒᵖ ⥤ A\nX : C\nS : Sieve X\nR : Presieve X\nE✝ : Aᵒᵖ\nx : FamilyOfElements (P ⋙ coyoneda.obj E✝) S.arrows\nhx : SieveCompatible x\nh : ∀ (E : Aᵒᵖ), IsSeparatedFor (P ⋙ coyoneda.obj E) S.arrows\nE : A\nπ : (Functor.const (FullSubcategory fun f => S.arrows f.hom)ᵒᵖ).obj E ⟶ (diagram S.arrows).op ⋙ P\neqv : (Functor.cones ((diagram S.arrows).op ⋙ P)).obj (op E) ≃ { x // SieveCompatible x } :=\n conesEquivSieveCompatibleFamily P S (op E)\n⊢ ∀ (a b : { pt := E, π := π } ⟶ P.mapCone (Cocone.op (cocone S.arrows))), a = b\n[PROOFSTEP]\nrw [← eqv.left_inv π]\n[GOAL]\ncase mpr.mk.allEq\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nJ : GrothendieckTopology C\nP : Cᵒᵖ ⥤ A\nX : C\nS : Sieve X\nR : Presieve X\nE✝ : Aᵒᵖ\nx : FamilyOfElements (P ⋙ coyoneda.obj E✝) S.arrows\nhx : SieveCompatible x\nh : ∀ (E : Aᵒᵖ), IsSeparatedFor (P ⋙ coyoneda.obj E) S.arrows\nE : A\nπ : (Functor.const (FullSubcategory fun f => S.arrows f.hom)ᵒᵖ).obj E ⟶ (diagram S.arrows).op ⋙ P\neqv : (Functor.cones ((diagram S.arrows).op ⋙ P)).obj (op E) ≃ { x // SieveCompatible x } :=\n conesEquivSieveCompatibleFamily P S (op E)\n⊢ ∀ (a b : { pt := E, π := Equiv.invFun eqv (Equiv.toFun eqv π) } ⟶ P.mapCone (Cocone.op (cocone S.arrows))), a = b\n[PROOFSTEP]\nintro f₁ f₂\n[GOAL]\ncase mpr.mk.allEq\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nJ : GrothendieckTopology C\nP : Cᵒᵖ ⥤ A\nX : C\nS : Sieve X\nR : Presieve X\nE✝ : Aᵒᵖ\nx : FamilyOfElements (P ⋙ coyoneda.obj E✝) S.arrows\nhx : SieveCompatible x\nh : ∀ (E : Aᵒᵖ), IsSeparatedFor (P ⋙ coyoneda.obj E) S.arrows\nE : A\nπ : (Functor.const (FullSubcategory fun f => S.arrows f.hom)ᵒᵖ).obj E ⟶ (diagram S.arrows).op ⋙ P\neqv : (Functor.cones ((diagram S.arrows).op ⋙ P)).obj (op E) ≃ { x // SieveCompatible x } :=\n conesEquivSieveCompatibleFamily P S (op E)\nf₁ f₂ : { pt := E, π := Equiv.invFun eqv (Equiv.toFun eqv π) } ⟶ P.mapCone (Cocone.op (cocone S.arrows))\n⊢ f₁ = f₂\n[PROOFSTEP]\nlet eqv' := homEquivAmalgamation (eqv π).2\n[GOAL]\ncase mpr.mk.allEq\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nJ : GrothendieckTopology C\nP : Cᵒᵖ ⥤ A\nX : C\nS : Sieve X\nR : Presieve X\nE✝ : Aᵒᵖ\nx : FamilyOfElements (P ⋙ coyoneda.obj E✝) S.arrows\nhx : SieveCompatible x\nh : ∀ (E : Aᵒᵖ), IsSeparatedFor (P ⋙ coyoneda.obj E) S.arrows\nE : A\nπ : (Functor.const (FullSubcategory fun f => S.arrows f.hom)ᵒᵖ).obj E ⟶ (diagram S.arrows).op ⋙ P\neqv : (Functor.cones ((diagram S.arrows).op ⋙ P)).obj (op E) ≃ { x // SieveCompatible x } :=\n conesEquivSieveCompatibleFamily P S (op E)\nf₁ f₂ : { pt := E, π := Equiv.invFun eqv (Equiv.toFun eqv π) } ⟶ P.mapCone (Cocone.op (cocone S.arrows))\neqv' : (SieveCompatible.cone (_ : SieveCompatible ↑(↑eqv π)) ⟶ P.mapCone (Cocone.op (cocone S.arrows))) ≃\n { t // IsAmalgamation (↑(↑eqv π)) t } :=\n homEquivAmalgamation (_ : SieveCompatible ↑(↑eqv π))\n⊢ f₁ = f₂\n[PROOFSTEP]\napply eqv'.injective\n[GOAL]\ncase mpr.mk.allEq.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nJ : GrothendieckTopology C\nP : Cᵒᵖ ⥤ A\nX : C\nS : Sieve X\nR : Presieve X\nE✝ : Aᵒᵖ\nx : FamilyOfElements (P ⋙ coyoneda.obj E✝) S.arrows\nhx : SieveCompatible x\nh : ∀ (E : Aᵒᵖ), IsSeparatedFor (P ⋙ coyoneda.obj E) S.arrows\nE : A\nπ : (Functor.const (FullSubcategory fun f => S.arrows f.hom)ᵒᵖ).obj E ⟶ (diagram S.arrows).op ⋙ P\neqv : (Functor.cones ((diagram S.arrows).op ⋙ P)).obj (op E) ≃ { x // SieveCompatible x } :=\n conesEquivSieveCompatibleFamily P S (op E)\nf₁ f₂ : { pt := E, π := Equiv.invFun eqv (Equiv.toFun eqv π) } ⟶ P.mapCone (Cocone.op (cocone S.arrows))\neqv' : (SieveCompatible.cone (_ : SieveCompatible ↑(↑eqv π)) ⟶ P.mapCone (Cocone.op (cocone S.arrows))) ≃\n { t // IsAmalgamation (↑(↑eqv π)) t } :=\n homEquivAmalgamation (_ : SieveCompatible ↑(↑eqv π))\n⊢ ↑eqv' f₁ = ↑eqv' f₂\n[PROOFSTEP]\next\n[GOAL]\ncase mpr.mk.allEq.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nJ : GrothendieckTopology C\nP : Cᵒᵖ ⥤ A\nX : C\nS : Sieve X\nR : Presieve X\nE✝ : Aᵒᵖ\nx : FamilyOfElements (P ⋙ coyoneda.obj E✝) S.arrows\nhx : SieveCompatible x\nh : ∀ (E : Aᵒᵖ), IsSeparatedFor (P ⋙ coyoneda.obj E) S.arrows\nE : A\nπ : (Functor.const (FullSubcategory fun f => S.arrows f.hom)ᵒᵖ).obj E ⟶ (diagram S.arrows).op ⋙ P\neqv : (Functor.cones ((diagram S.arrows).op ⋙ P)).obj (op E) ≃ { x // SieveCompatible x } :=\n conesEquivSieveCompatibleFamily P S (op E)\nf₁ f₂ : { pt := E, π := Equiv.invFun eqv (Equiv.toFun eqv π) } ⟶ P.mapCone (Cocone.op (cocone S.arrows))\neqv' : (SieveCompatible.cone (_ : SieveCompatible ↑(↑eqv π)) ⟶ P.mapCone (Cocone.op (cocone S.arrows))) ≃\n { t // IsAmalgamation (↑(↑eqv π)) t } :=\n homEquivAmalgamation (_ : SieveCompatible ↑(↑eqv π))\n⊢ ↑(↑eqv' f₁) = ↑(↑eqv' f₂)\n[PROOFSTEP]\napply h _ (eqv π).1\n[GOAL]\ncase mpr.mk.allEq.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nJ : GrothendieckTopology C\nP : Cᵒᵖ ⥤ A\nX : C\nS : Sieve X\nR : Presieve X\nE✝ : Aᵒᵖ\nx : FamilyOfElements (P ⋙ coyoneda.obj E✝) S.arrows\nhx : SieveCompatible x\nh : ∀ (E : Aᵒᵖ), IsSeparatedFor (P ⋙ coyoneda.obj E) S.arrows\nE : A\nπ : (Functor.const (FullSubcategory fun f => S.arrows f.hom)ᵒᵖ).obj E ⟶ (diagram S.arrows).op ⋙ P\neqv : (Functor.cones ((diagram S.arrows).op ⋙ P)).obj (op E) ≃ { x // SieveCompatible x } :=\n conesEquivSieveCompatibleFamily P S (op E)\nf₁ f₂ : { pt := E, π := Equiv.invFun eqv (Equiv.toFun eqv π) } ⟶ P.mapCone (Cocone.op (cocone S.arrows))\neqv' : (SieveCompatible.cone (_ : SieveCompatible ↑(↑eqv π)) ⟶ P.mapCone (Cocone.op (cocone S.arrows))) ≃\n { t // IsAmalgamation (↑(↑eqv π)) t } :=\n homEquivAmalgamation (_ : SieveCompatible ↑(↑eqv π))\n⊢ IsAmalgamation ↑(↑eqv π) ↑(↑eqv' f₁)\n[PROOFSTEP]\nexact (eqv' _).2\n[GOAL]\ncase mpr.mk.allEq.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nJ : GrothendieckTopology C\nP : Cᵒᵖ ⥤ A\nX : C\nS : Sieve X\nR : Presieve X\nE✝ : Aᵒᵖ\nx : FamilyOfElements (P ⋙ coyoneda.obj E✝) S.arrows\nhx : SieveCompatible x\nh : ∀ (E : Aᵒᵖ), IsSeparatedFor (P ⋙ coyoneda.obj E) S.arrows\nE : A\nπ : (Functor.const (FullSubcategory fun f => S.arrows f.hom)ᵒᵖ).obj E ⟶ (diagram S.arrows).op ⋙ P\neqv : (Functor.cones ((diagram S.arrows).op ⋙ P)).obj (op E) ≃ { x // SieveCompatible x } :=\n conesEquivSieveCompatibleFamily P S (op E)\nf₁ f₂ : { pt := E, π := Equiv.invFun eqv (Equiv.toFun eqv π) } ⟶ P.mapCone (Cocone.op (cocone S.arrows))\neqv' : (SieveCompatible.cone (_ : SieveCompatible ↑(↑eqv π)) ⟶ P.mapCone (Cocone.op (cocone S.arrows))) ≃\n { t // IsAmalgamation (↑(↑eqv π)) t } :=\n homEquivAmalgamation (_ : SieveCompatible ↑(↑eqv π))\n⊢ IsAmalgamation ↑(↑eqv π) ↑(↑eqv' f₂)\n[PROOFSTEP]\nexact (eqv' _).2\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nA : Type u₂\ninst✝¹ : Category.{v₂, u₂} A\nJ : GrothendieckTopology C\nP : Cᵒᵖ ⥤ A\nX : C\nS : Sieve X\nR : Presieve X\nE : Aᵒᵖ\nx : FamilyOfElements (P ⋙ coyoneda.obj E) S.arrows\nhx : SieveCompatible x\ninst✝ : HasPullbacks C\nK : Pretopology C\n⊢ IsSheaf (Pretopology.toGrothendieck C K) P ↔\n ∀ ⦃X : C⦄ (R : Presieve X),\n R ∈ Pretopology.coverings K X → Nonempty (IsLimit (P.mapCone (Cocone.op (cocone (generate R).arrows))))\n[PROOFSTEP]\ndsimp [IsSheaf]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nA : Type u₂\ninst✝¹ : Category.{v₂, u₂} A\nJ : GrothendieckTopology C\nP : Cᵒᵖ ⥤ A\nX : C\nS : Sieve X\nR : Presieve X\nE : Aᵒᵖ\nx : FamilyOfElements (P ⋙ coyoneda.obj E) S.arrows\nhx : SieveCompatible x\ninst✝ : HasPullbacks C\nK : Pretopology C\n⊢ (∀ (E : A), Presieve.IsSheaf (Pretopology.toGrothendieck C K) (P ⋙ coyoneda.obj (op E))) ↔\n ∀ ⦃X : C⦄ (R : Presieve X),\n R ∈ Pretopology.coverings K X → Nonempty (IsLimit (P.mapCone (Cocone.op (cocone (generate R).arrows))))\n[PROOFSTEP]\nsimp_rw [isSheaf_pretopology]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nA : Type u₂\ninst✝¹ : Category.{v₂, u₂} A\nJ : GrothendieckTopology C\nP : Cᵒᵖ ⥤ A\nX : C\nS : Sieve X\nR : Presieve X\nE : Aᵒᵖ\nx : FamilyOfElements (P ⋙ coyoneda.obj E) S.arrows\nhx : SieveCompatible x\ninst✝ : HasPullbacks C\nK : Pretopology C\n⊢ (∀ (E : A) {X : C} (R : Presieve X), R ∈ Pretopology.coverings K X → IsSheafFor (P ⋙ coyoneda.obj (op E)) R) ↔\n ∀ ⦃X : C⦄ (R : Presieve X),\n R ∈ Pretopology.coverings K X → Nonempty (IsLimit (P.mapCone (Cocone.op (cocone (generate R).arrows))))\n[PROOFSTEP]\nexact\n ⟨fun h X R hR => (isLimit_iff_isSheafFor_presieve P R).2 fun E => h E.unop R hR, fun h E X R hR =>\n (isLimit_iff_isSheafFor_presieve P R).1 (h R hR) (op E)⟩\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nA✝ : Type u₂\ninst✝¹ : Category.{v₂, u₂} A✝\nJ : GrothendieckTopology C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nE : A\nX : C\nP : Cᵒᵖ ⥤ A\nhP : IsSheaf J P\nS : GrothendieckTopology.Cover J X\nx : (I : GrothendieckTopology.Cover.Arrow S) → E ⟶ P.obj (op I.Y)\nhx :\n ∀ (I : GrothendieckTopology.Cover.Relation S),\n x (GrothendieckTopology.Cover.Relation.fst I) ≫ P.map I.g₁.op =\n x (GrothendieckTopology.Cover.Relation.snd I) ≫ P.map I.g₂.op\nI : GrothendieckTopology.Cover.Arrow S\n⊢ amalgamate hP S x hx ≫ P.map I.f.op = x I\n[PROOFSTEP]\nrcases I with ⟨Y, f, hf⟩\n[GOAL]\ncase mk\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nA✝ : Type u₂\ninst✝¹ : Category.{v₂, u₂} A✝\nJ : GrothendieckTopology C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nE : A\nX : C\nP : Cᵒᵖ ⥤ A\nhP : IsSheaf J P\nS : GrothendieckTopology.Cover J X\nx : (I : GrothendieckTopology.Cover.Arrow S) → E ⟶ P.obj (op I.Y)\nhx :\n ∀ (I : GrothendieckTopology.Cover.Relation S),\n x (GrothendieckTopology.Cover.Relation.fst I) ≫ P.map I.g₁.op =\n x (GrothendieckTopology.Cover.Relation.snd I) ≫ P.map I.g₂.op\nY : C\nf : Y ⟶ X\nhf : (GrothendieckTopology.Cover.sieve S).arrows f\n⊢ amalgamate hP S x hx ≫ P.map { Y := Y, f := f, hf := hf }.f.op = x { Y := Y, f := f, hf := hf }\n[PROOFSTEP]\napply\n @Presieve.IsSheafFor.valid_glue _ _ _ _ _ _ (hP _ _ S.condition) (fun Y f hf => x ⟨Y, f, hf⟩)\n (fun Y₁ Y₂ Z g₁ g₂ f₁ f₂ h₁ h₂ w => hx ⟨Y₁, Y₂, Z, g₁, g₂, f₁, f₂, h₁, h₂, w⟩) f hf\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nJ : GrothendieckTopology C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nP : Cᵒᵖ ⥤ Type w\n⊢ Presheaf.IsSheaf J P ↔ Presieve.IsSheaf J P\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nJ : GrothendieckTopology C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nP : Cᵒᵖ ⥤ Type w\n⊢ Presheaf.IsSheaf J P → Presieve.IsSheaf J P\n[PROOFSTEP]\nintro hP\n[GOAL]\ncase mp\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nJ : GrothendieckTopology C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nP : Cᵒᵖ ⥤ Type w\nhP : Presheaf.IsSheaf J P\n⊢ Presieve.IsSheaf J P\n[PROOFSTEP]\nrefine' Presieve.isSheaf_iso J _ (hP PUnit)\n[GOAL]\ncase mp\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nJ : GrothendieckTopology C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nP : Cᵒᵖ ⥤ Type w\nhP : Presheaf.IsSheaf J P\n⊢ P ⋙ coyoneda.obj (op PUnit) ≅ P\n[PROOFSTEP]\nrefine' isoWhiskerLeft _ Coyoneda.punitIso ≪≫ P.rightUnitor\n[GOAL]\ncase mpr\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nJ : GrothendieckTopology C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nP : Cᵒᵖ ⥤ Type w\n⊢ Presieve.IsSheaf J P → Presheaf.IsSheaf J P\n[PROOFSTEP]\nintro hP X Y S hS z hz\n[GOAL]\ncase mpr\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nJ : GrothendieckTopology C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nP : Cᵒᵖ ⥤ Type w\nhP : Presieve.IsSheaf J P\nX : Type w\nY : C\nS : Sieve Y\nhS : S ∈ GrothendieckTopology.sieves J Y\nz : Presieve.FamilyOfElements (P ⋙ coyoneda.obj (op X)) S.arrows\nhz : Presieve.FamilyOfElements.Compatible z\n⊢ ∃! t, Presieve.FamilyOfElements.IsAmalgamation z t\n[PROOFSTEP]\nrefine' ⟨fun x => (hP S hS).amalgamate (fun Z f hf => z f hf x) _, _, _⟩\n[GOAL]\ncase mpr.refine'_1\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nJ : GrothendieckTopology C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nP : Cᵒᵖ ⥤ Type w\nhP : Presieve.IsSheaf J P\nX : Type w\nY : C\nS : Sieve Y\nhS : S ∈ GrothendieckTopology.sieves J Y\nz : Presieve.FamilyOfElements (P ⋙ coyoneda.obj (op X)) S.arrows\nhz : Presieve.FamilyOfElements.Compatible z\nx : (op X).unop\n⊢ Presieve.FamilyOfElements.Compatible fun Z f hf => z f hf x\n[PROOFSTEP]\nintro Y₁ Y₂ Z g₁ g₂ f₁ f₂ hf₁ hf₂ h\n[GOAL]\ncase mpr.refine'_1\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nJ : GrothendieckTopology C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nP : Cᵒᵖ ⥤ Type w\nhP : Presieve.IsSheaf J P\nX : Type w\nY : C\nS : Sieve Y\nhS : S ∈ GrothendieckTopology.sieves J Y\nz : Presieve.FamilyOfElements (P ⋙ coyoneda.obj (op X)) S.arrows\nhz : Presieve.FamilyOfElements.Compatible z\nx : (op X).unop\nY₁ Y₂ Z : C\ng₁ : Z ⟶ Y₁\ng₂ : Z ⟶ Y₂\nf₁ : Y₁ ⟶ Y\nf₂ : Y₂ ⟶ Y\nhf₁ : S.arrows f₁\nhf₂ : S.arrows f₂\nh : g₁ ≫ f₁ = g₂ ≫ f₂\n⊢ P.map g₁.op ((fun Z f hf => z f hf x) Y₁ f₁ hf₁) = P.map g₂.op ((fun Z f hf => z f hf x) Y₂ f₂ hf₂)\n[PROOFSTEP]\nexact congr_fun (hz g₁ g₂ hf₁ hf₂ h) x\n[GOAL]\ncase mpr.refine'_2\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nJ : GrothendieckTopology C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nP : Cᵒᵖ ⥤ Type w\nhP : Presieve.IsSheaf J P\nX : Type w\nY : C\nS : Sieve Y\nhS : S ∈ GrothendieckTopology.sieves J Y\nz : Presieve.FamilyOfElements (P ⋙ coyoneda.obj (op X)) S.arrows\nhz : Presieve.FamilyOfElements.Compatible z\n⊢ (fun t => Presieve.FamilyOfElements.IsAmalgamation z t) fun x =>\n Presieve.IsSheafFor.amalgamate (_ : Presieve.IsSheafFor P S.arrows) (fun Z f hf => z f hf x)\n (_ :\n ∀ ⦃Y₁ Y₂ Z : C⦄ (g₁ : Z ⟶ Y₁) (g₂ : Z ⟶ Y₂) ⦃f₁ : Y₁ ⟶ Y⦄ ⦃f₂ : Y₂ ⟶ Y⦄ (hf₁ : S.arrows f₁) (hf₂ : S.arrows f₂),\n g₁ ≫ f₁ = g₂ ≫ f₂ →\n (P ⋙ coyoneda.obj (op X)).map g₁.op (z f₁ hf₁) x = (P ⋙ coyoneda.obj (op X)).map g₂.op (z f₂ hf₂) x)\n[PROOFSTEP]\nintro Z f hf\n[GOAL]\ncase mpr.refine'_2\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nJ : GrothendieckTopology C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nP : Cᵒᵖ ⥤ Type w\nhP : Presieve.IsSheaf J P\nX : Type w\nY : C\nS : Sieve Y\nhS : S ∈ GrothendieckTopology.sieves J Y\nz : Presieve.FamilyOfElements (P ⋙ coyoneda.obj (op X)) S.arrows\nhz : Presieve.FamilyOfElements.Compatible z\nZ : C\nf : Z ⟶ Y\nhf : S.arrows f\n⊢ ((P ⋙ coyoneda.obj (op X)).map f.op fun x =>\n Presieve.IsSheafFor.amalgamate (_ : Presieve.IsSheafFor P S.arrows) (fun Z f hf => z f hf x)\n (_ :\n ∀ ⦃Y₁ Y₂ Z : C⦄ (g₁ : Z ⟶ Y₁) (g₂ : Z ⟶ Y₂) ⦃f₁ : Y₁ ⟶ Y⦄ ⦃f₂ : Y₂ ⟶ Y⦄ (hf₁ : S.arrows f₁)\n (hf₂ : S.arrows f₂),\n g₁ ≫ f₁ = g₂ ≫ f₂ →\n (P ⋙ coyoneda.obj (op X)).map g₁.op (z f₁ hf₁) x = (P ⋙ coyoneda.obj (op X)).map g₂.op (z f₂ hf₂) x)) =\n z f hf\n[PROOFSTEP]\nfunext x\n[GOAL]\ncase mpr.refine'_2.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nJ : GrothendieckTopology C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nP : Cᵒᵖ ⥤ Type w\nhP : Presieve.IsSheaf J P\nX : Type w\nY : C\nS : Sieve Y\nhS : S ∈ GrothendieckTopology.sieves J Y\nz : Presieve.FamilyOfElements (P ⋙ coyoneda.obj (op X)) S.arrows\nhz : Presieve.FamilyOfElements.Compatible z\nZ : C\nf : Z ⟶ Y\nhf : S.arrows f\nx : (op X).unop\n⊢ (P ⋙ coyoneda.obj (op X)).map f.op\n (fun x =>\n Presieve.IsSheafFor.amalgamate (_ : Presieve.IsSheafFor P S.arrows) (fun Z f hf => z f hf x)\n (_ :\n ∀ ⦃Y₁ Y₂ Z : C⦄ (g₁ : Z ⟶ Y₁) (g₂ : Z ⟶ Y₂) ⦃f₁ : Y₁ ⟶ Y⦄ ⦃f₂ : Y₂ ⟶ Y⦄ (hf₁ : S.arrows f₁)\n (hf₂ : S.arrows f₂),\n g₁ ≫ f₁ = g₂ ≫ f₂ →\n (P ⋙ coyoneda.obj (op X)).map g₁.op (z f₁ hf₁) x = (P ⋙ coyoneda.obj (op X)).map g₂.op (z f₂ hf₂) x))\n x =\n z f hf x\n[PROOFSTEP]\napply Presieve.IsSheafFor.valid_glue\n[GOAL]\ncase mpr.refine'_3\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nJ : GrothendieckTopology C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nP : Cᵒᵖ ⥤ Type w\nhP : Presieve.IsSheaf J P\nX : Type w\nY : C\nS : Sieve Y\nhS : S ∈ GrothendieckTopology.sieves J Y\nz : Presieve.FamilyOfElements (P ⋙ coyoneda.obj (op X)) S.arrows\nhz : Presieve.FamilyOfElements.Compatible z\n⊢ ∀ (y : (P ⋙ coyoneda.obj (op X)).obj (op Y)),\n (fun t => Presieve.FamilyOfElements.IsAmalgamation z t) y →\n y = fun x =>\n Presieve.IsSheafFor.amalgamate (_ : Presieve.IsSheafFor P S.arrows) (fun Z f hf => z f hf x)\n (_ :\n ∀ ⦃Y₁ Y₂ Z : C⦄ (g₁ : Z ⟶ Y₁) (g₂ : Z ⟶ Y₂) ⦃f₁ : Y₁ ⟶ Y⦄ ⦃f₂ : Y₂ ⟶ Y⦄ (hf₁ : S.arrows f₁)\n (hf₂ : S.arrows f₂),\n g₁ ≫ f₁ = g₂ ≫ f₂ →\n (P ⋙ coyoneda.obj (op X)).map g₁.op (z f₁ hf₁) x = (P ⋙ coyoneda.obj (op X)).map g₂.op (z f₂ hf₂) x)\n[PROOFSTEP]\nintro y hy\n[GOAL]\ncase mpr.refine'_3\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nJ : GrothendieckTopology C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nP : Cᵒᵖ ⥤ Type w\nhP : Presieve.IsSheaf J P\nX : Type w\nY : C\nS : Sieve Y\nhS : S ∈ GrothendieckTopology.sieves J Y\nz : Presieve.FamilyOfElements (P ⋙ coyoneda.obj (op X)) S.arrows\nhz : Presieve.FamilyOfElements.Compatible z\ny : (P ⋙ coyoneda.obj (op X)).obj (op Y)\nhy : Presieve.FamilyOfElements.IsAmalgamation z y\n⊢ y = fun x =>\n Presieve.IsSheafFor.amalgamate (_ : Presieve.IsSheafFor P S.arrows) (fun Z f hf => z f hf x)\n (_ :\n ∀ ⦃Y₁ Y₂ Z : C⦄ (g₁ : Z ⟶ Y₁) (g₂ : Z ⟶ Y₂) ⦃f₁ : Y₁ ⟶ Y⦄ ⦃f₂ : Y₂ ⟶ Y⦄ (hf₁ : S.arrows f₁) (hf₂ : S.arrows f₂),\n g₁ ≫ f₁ = g₂ ≫ f₂ →\n (P ⋙ coyoneda.obj (op X)).map g₁.op (z f₁ hf₁) x = (P ⋙ coyoneda.obj (op X)).map g₂.op (z f₂ hf₂) x)\n[PROOFSTEP]\nfunext x\n[GOAL]\ncase mpr.refine'_3.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nJ : GrothendieckTopology C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nP : Cᵒᵖ ⥤ Type w\nhP : Presieve.IsSheaf J P\nX : Type w\nY : C\nS : Sieve Y\nhS : S ∈ GrothendieckTopology.sieves J Y\nz : Presieve.FamilyOfElements (P ⋙ coyoneda.obj (op X)) S.arrows\nhz : Presieve.FamilyOfElements.Compatible z\ny : (P ⋙ coyoneda.obj (op X)).obj (op Y)\nhy : Presieve.FamilyOfElements.IsAmalgamation z y\nx : (op X).unop\n⊢ y x =\n Presieve.IsSheafFor.amalgamate (_ : Presieve.IsSheafFor P S.arrows) (fun Z f hf => z f hf x)\n (_ :\n ∀ ⦃Y₁ Y₂ Z : C⦄ (g₁ : Z ⟶ Y₁) (g₂ : Z ⟶ Y₂) ⦃f₁ : Y₁ ⟶ Y⦄ ⦃f₂ : Y₂ ⟶ Y⦄ (hf₁ : S.arrows f₁) (hf₂ : S.arrows f₂),\n g₁ ≫ f₁ = g₂ ≫ f₂ →\n (P ⋙ coyoneda.obj (op X)).map g₁.op (z f₁ hf₁) x = (P ⋙ coyoneda.obj (op X)).map g₂.op (z f₂ hf₂) x)\n[PROOFSTEP]\napply (hP S hS).isSeparatedFor.ext\n[GOAL]\ncase mpr.refine'_3.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nJ : GrothendieckTopology C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nP : Cᵒᵖ ⥤ Type w\nhP : Presieve.IsSheaf J P\nX : Type w\nY : C\nS : Sieve Y\nhS : S ∈ GrothendieckTopology.sieves J Y\nz : Presieve.FamilyOfElements (P ⋙ coyoneda.obj (op X)) S.arrows\nhz : Presieve.FamilyOfElements.Compatible z\ny : (P ⋙ coyoneda.obj (op X)).obj (op Y)\nhy : Presieve.FamilyOfElements.IsAmalgamation z y\nx : (op X).unop\n⊢ ∀ ⦃Y_1 : C⦄ ⦃f : Y_1 ⟶ Y⦄,\n S.arrows f →\n P.map f.op (y x) =\n P.map f.op\n (Presieve.IsSheafFor.amalgamate (_ : Presieve.IsSheafFor P S.arrows) (fun Z f hf => z f hf x)\n (_ :\n ∀ ⦃Y₁ Y₂ Z : C⦄ (g₁ : Z ⟶ Y₁) (g₂ : Z ⟶ Y₂) ⦃f₁ : Y₁ ⟶ Y⦄ ⦃f₂ : Y₂ ⟶ Y⦄ (hf₁ : S.arrows f₁)\n (hf₂ : S.arrows f₂),\n g₁ ≫ f₁ = g₂ ≫ f₂ →\n (P ⋙ coyoneda.obj (op X)).map g₁.op (z f₁ hf₁) x = (P ⋙ coyoneda.obj (op X)).map g₂.op (z f₂ hf₂) x))\n[PROOFSTEP]\nintro Y' f hf\n[GOAL]\ncase mpr.refine'_3.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nJ : GrothendieckTopology C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nP : Cᵒᵖ ⥤ Type w\nhP : Presieve.IsSheaf J P\nX : Type w\nY : C\nS : Sieve Y\nhS : S ∈ GrothendieckTopology.sieves J Y\nz : Presieve.FamilyOfElements (P ⋙ coyoneda.obj (op X)) S.arrows\nhz : Presieve.FamilyOfElements.Compatible z\ny : (P ⋙ coyoneda.obj (op X)).obj (op Y)\nhy : Presieve.FamilyOfElements.IsAmalgamation z y\nx : (op X).unop\nY' : C\nf : Y' ⟶ Y\nhf : S.arrows f\n⊢ P.map f.op (y x) =\n P.map f.op\n (Presieve.IsSheafFor.amalgamate (_ : Presieve.IsSheafFor P S.arrows) (fun Z f hf => z f hf x)\n (_ :\n ∀ ⦃Y₁ Y₂ Z : C⦄ (g₁ : Z ⟶ Y₁) (g₂ : Z ⟶ Y₂) ⦃f₁ : Y₁ ⟶ Y⦄ ⦃f₂ : Y₂ ⟶ Y⦄ (hf₁ : S.arrows f₁)\n (hf₂ : S.arrows f₂),\n g₁ ≫ f₁ = g₂ ≫ f₂ →\n (P ⋙ coyoneda.obj (op X)).map g₁.op (z f₁ hf₁) x = (P ⋙ coyoneda.obj (op X)).map g₂.op (z f₂ hf₂) x))\n[PROOFSTEP]\nrw [Presieve.IsSheafFor.valid_glue _ _ _ hf, ← hy _ hf]\n[GOAL]\ncase mpr.refine'_3.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nJ : GrothendieckTopology C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nP : Cᵒᵖ ⥤ Type w\nhP : Presieve.IsSheaf J P\nX : Type w\nY : C\nS : Sieve Y\nhS : S ∈ GrothendieckTopology.sieves J Y\nz : Presieve.FamilyOfElements (P ⋙ coyoneda.obj (op X)) S.arrows\nhz : Presieve.FamilyOfElements.Compatible z\ny : (P ⋙ coyoneda.obj (op X)).obj (op Y)\nhy : Presieve.FamilyOfElements.IsAmalgamation z y\nx : (op X).unop\nY' : C\nf : Y' ⟶ Y\nhf : S.arrows f\n⊢ P.map f.op (y x) = (P ⋙ coyoneda.obj (op X)).map f.op y x\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nJ : GrothendieckTopology C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nF : Sheaf J A\nX : C\nH : ⊥ ∈ GrothendieckTopology.sieves J X\n⊢ IsTerminal (F.val.obj (op X))\n[PROOFSTEP]\nrefine' @IsTerminal.ofUnique _ _ _ ?_\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nJ : GrothendieckTopology C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nF : Sheaf J A\nX : C\nH : ⊥ ∈ GrothendieckTopology.sieves J X\n⊢ (X_1 : A) → Unique (X_1 ⟶ F.val.obj (op X))\n[PROOFSTEP]\nintro Y\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nJ : GrothendieckTopology C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nF : Sheaf J A\nX : C\nH : ⊥ ∈ GrothendieckTopology.sieves J X\nY : A\n⊢ Unique (Y ⟶ F.val.obj (op X))\n[PROOFSTEP]\nchoose t h using F.2 Y _ H (by tauto) (by tauto)\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nJ : GrothendieckTopology C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nF : Sheaf J A\nX : C\nH : ⊥ ∈ GrothendieckTopology.sieves J X\nY : A\n⊢ Presieve.FamilyOfElements (F.val ⋙ coyoneda.obj (op Y)) ⊥.arrows\n[PROOFSTEP]\ntauto\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nJ : GrothendieckTopology C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nF : Sheaf J A\nX : C\nH : ⊥ ∈ GrothendieckTopology.sieves J X\nY : A\n⊢ Presieve.FamilyOfElements.Compatible\n (let_fun em := Classical.propDecidable;\n fun ⦃Y_1⦄ f a => False.elim (_ : False))\n[PROOFSTEP]\ntauto\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nJ : GrothendieckTopology C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nF : Sheaf J A\nX : C\nH : ⊥ ∈ GrothendieckTopology.sieves J X\nY : A\nt : (F.val ⋙ coyoneda.obj (op Y)).obj (op X)\nh :\n (fun t =>\n Presieve.FamilyOfElements.IsAmalgamation\n (let_fun em := Classical.propDecidable;\n fun ⦃Y_1⦄ f a => False.elim (_ : False))\n t)\n t ∧\n ∀ (y : (F.val ⋙ coyoneda.obj (op Y)).obj (op X)),\n (fun t =>\n Presieve.FamilyOfElements.IsAmalgamation\n (let_fun em := Classical.propDecidable;\n fun ⦃Y_1⦄ f a => False.elim (_ : False))\n t)\n y →\n y = t\n⊢ Unique (Y ⟶ F.val.obj (op X))\n[PROOFSTEP]\nexact ⟨⟨t⟩, fun a => h.2 a (by tauto)⟩\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nJ : GrothendieckTopology C\nA : Type u₂\ninst✝ : Category.{v₂, u₂} A\nF : Sheaf J A\nX : C\nH : ⊥ ∈ GrothendieckTopology.sieves J X\nY : A\nt : (F.val ⋙ coyoneda.obj (op Y)).obj (op X)\nh :\n (fun t =>\n Presieve.FamilyOfElements.IsAmalgamation\n (let_fun em := Classical.propDecidable;\n fun ⦃Y_1⦄ f a => False.elim (_ : False))\n t)\n t ∧\n ∀ (y : (F.val ⋙ coyoneda.obj (op Y)).obj (op X)),\n (fun t =>\n Presieve.FamilyOfElements.IsAmalgamation\n (let_fun em := Classical.propDecidable;\n fun ⦃Y_1⦄ f a => False.elim (_ : False))\n t)\n y →\n y = t\na : Y ⟶ F.val.obj (op X)\n⊢ (fun t =>\n Presieve.FamilyOfElements.IsAmalgamation\n (let_fun em := Classical.propDecidable;\n fun ⦃Y_1⦄ f a => False.elim (_ : False))\n t)\n a\n[PROOFSTEP]\ntauto\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nJ : GrothendieckTopology C\nA : Type u₂\ninst✝¹ : Category.{v₂, u₂} A\ninst✝ : Preadditive A\nP Q : Sheaf J A\nn : ℤ\nf : P ⟶ Q\nU V : Cᵒᵖ\ni : U ⟶ V\n⊢ P.val.map i ≫ (fun U => n • NatTrans.app f.val U) V = (fun U => n • NatTrans.app f.val U) U ≫ Q.val.map i\n[PROOFSTEP]\ninduction' n using Int.induction_on with n ih n ih\n[GOAL]\ncase hz\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nJ : GrothendieckTopology C\nA : Type u₂\ninst✝¹ : Category.{v₂, u₂} A\ninst✝ : Preadditive A\nP Q : Sheaf J A\nf : P ⟶ Q\nU V : Cᵒᵖ\ni : U ⟶ V\n⊢ P.val.map i ≫ (fun U => 0 • NatTrans.app f.val U) V = (fun U => 0 • NatTrans.app f.val U) U ≫ Q.val.map i\n[PROOFSTEP]\nsimp only [zero_smul, comp_zero, zero_comp]\n[GOAL]\ncase hp\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nJ : GrothendieckTopology C\nA : Type u₂\ninst✝¹ : Category.{v₂, u₂} A\ninst✝ : Preadditive A\nP Q : Sheaf J A\nf : P ⟶ Q\nU V : Cᵒᵖ\ni : U ⟶ V\nn : ℕ\nih : P.val.map i ≫ (fun U => ↑n • NatTrans.app f.val U) V = (fun U => ↑n • NatTrans.app f.val U) U ≫ Q.val.map i\n⊢ P.val.map i ≫ (fun U => (↑n + 1) • NatTrans.app f.val U) V =\n (fun U => (↑n + 1) • NatTrans.app f.val U) U ≫ Q.val.map i\n[PROOFSTEP]\nsimpa only [add_zsmul, one_zsmul, comp_add, NatTrans.naturality, add_comp, add_left_inj]\n[GOAL]\ncase hn\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nJ : GrothendieckTopology C\nA : Type u₂\ninst✝¹ : Category.{v₂, u₂} A\ninst✝ : Preadditive A\nP Q : Sheaf J A\nf : P ⟶ Q\nU V : Cᵒᵖ\ni : U ⟶ V\nn : ℕ\nih : P.val.map i ≫ (fun U => -↑n • NatTrans.app f.val U) V = (fun U => -↑n • NatTrans.app f.val U) U ≫ Q.val.map i\n⊢ P.val.map i ≫ (fun U => (-↑n - 1) • NatTrans.app f.val U) V =\n (fun U => (-↑n - 1) • NatTrans.app f.val U) U ≫ Q.val.map i\n[PROOFSTEP]\nsimpa only [sub_smul, one_zsmul, comp_sub, NatTrans.naturality, sub_comp, sub_left_inj] using ih\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nJ : GrothendieckTopology C\nA : Type u₂\ninst✝¹ : Category.{v₂, u₂} A\ninst✝ : Preadditive A\nP Q : Sheaf J A\nn : ℕ\nf : P ⟶ Q\nU V : Cᵒᵖ\ni : U ⟶ V\n⊢ P.val.map i ≫ (fun U => n • NatTrans.app f.val U) V = (fun U => n • NatTrans.app f.val U) U ≫ Q.val.map i\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nJ : GrothendieckTopology C\nA : Type u₂\ninst✝¹ : Category.{v₂, u₂} A\ninst✝ : Preadditive A\nP Q : Sheaf J A\nf : P ⟶ Q\nU V : Cᵒᵖ\ni : U ⟶ V\n⊢ P.val.map i ≫ (fun U => Nat.zero • NatTrans.app f.val U) V =\n (fun U => Nat.zero • NatTrans.app f.val U) U ≫ Q.val.map i\n[PROOFSTEP]\nsimp only [zero_smul, comp_zero, zero_comp, Nat.zero_eq]\n[GOAL]\ncase succ\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nJ : GrothendieckTopology C\nA : Type u₂\ninst✝¹ : Category.{v₂, u₂} A\ninst✝ : Preadditive A\nP Q : Sheaf J A\nf : P ⟶ Q\nU V : Cᵒᵖ\ni : U ⟶ V\nn : ℕ\nih : P.val.map i ≫ (fun U => n • NatTrans.app f.val U) V = (fun U => n • NatTrans.app f.val U) U ≫ Q.val.map i\n⊢ P.val.map i ≫ (fun U => Nat.succ n • NatTrans.app f.val U) V =\n (fun U => Nat.succ n • NatTrans.app f.val U) U ≫ Q.val.map i\n[PROOFSTEP]\nsimp only [Nat.succ_eq_add_one, add_smul, ih, one_nsmul, comp_add, NatTrans.naturality, add_comp]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nJ : GrothendieckTopology C\nA : Type u₂\ninst✝¹ : Category.{v₂, u₂} A\ninst✝ : Preadditive A\nP Q : Sheaf J A\nx✝¹ : P ⟶ Q\nx✝ : ℕ\n⊢ (fun f => f.val) (x✝ • x✝¹) = x✝ • (fun f => f.val) x✝¹\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nJ : GrothendieckTopology C\nA : Type u₂\ninst✝¹ : Category.{v₂, u₂} A\ninst✝ : Preadditive A\nP Q : Sheaf J A\nx✝¹ : P ⟶ Q\nx✝ : ℤ\n⊢ (fun f => f.val) (x✝ • x✝¹) = x✝ • (fun f => f.val) x✝¹\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nA : Type u₂\ninst✝¹ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU : C\nR : Presieve U\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\nX : C\nS : GrothendieckTopology.Cover J X\nhP : IsSheaf J P\n⊢ ∀ (s : Cone (MulticospanIndex.multicospan (GrothendieckTopology.Cover.index S P)))\n (j : WalkingMulticospan (GrothendieckTopology.Cover.index S P).fstTo (GrothendieckTopology.Cover.index S P).sndTo),\n (fun E =>\n IsSheaf.amalgamate hP S (fun I => Multifork.ι E I)\n (_ :\n ∀ (I : GrothendieckTopology.Cover.Relation S),\n Multifork.ι E (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index S P) I) ≫\n MulticospanIndex.fst (GrothendieckTopology.Cover.index S P) I =\n Multifork.ι E (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index S P) I) ≫\n MulticospanIndex.snd (GrothendieckTopology.Cover.index S P) I))\n s ≫\n NatTrans.app (GrothendieckTopology.Cover.multifork S P).π j =\n NatTrans.app s.π j\n[PROOFSTEP]\nrintro (E : Multifork _) (a | b)\n[GOAL]\ncase left\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nA : Type u₂\ninst✝¹ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU : C\nR : Presieve U\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\nX : C\nS : GrothendieckTopology.Cover J X\nhP : IsSheaf J P\nE : Multifork (GrothendieckTopology.Cover.index S P)\na : (GrothendieckTopology.Cover.index S P).L\n⊢ (fun E =>\n IsSheaf.amalgamate hP S (fun I => Multifork.ι E I)\n (_ :\n ∀ (I : GrothendieckTopology.Cover.Relation S),\n Multifork.ι E (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index S P) I) ≫\n MulticospanIndex.fst (GrothendieckTopology.Cover.index S P) I =\n Multifork.ι E (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index S P) I) ≫\n MulticospanIndex.snd (GrothendieckTopology.Cover.index S P) I))\n E ≫\n NatTrans.app (GrothendieckTopology.Cover.multifork S P).π (WalkingMulticospan.left a) =\n NatTrans.app E.π (WalkingMulticospan.left a)\n[PROOFSTEP]\napply hP.amalgamate_map\n[GOAL]\ncase right\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nA : Type u₂\ninst✝¹ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU : C\nR : Presieve U\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\nX : C\nS : GrothendieckTopology.Cover J X\nhP : IsSheaf J P\nE : Multifork (GrothendieckTopology.Cover.index S P)\nb : (GrothendieckTopology.Cover.index S P).R\n⊢ (fun E =>\n IsSheaf.amalgamate hP S (fun I => Multifork.ι E I)\n (_ :\n ∀ (I : GrothendieckTopology.Cover.Relation S),\n Multifork.ι E (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index S P) I) ≫\n MulticospanIndex.fst (GrothendieckTopology.Cover.index S P) I =\n Multifork.ι E (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index S P) I) ≫\n MulticospanIndex.snd (GrothendieckTopology.Cover.index S P) I))\n E ≫\n NatTrans.app (GrothendieckTopology.Cover.multifork S P).π (WalkingMulticospan.right b) =\n NatTrans.app E.π (WalkingMulticospan.right b)\n[PROOFSTEP]\nrw [← E.w (WalkingMulticospan.Hom.fst b), ← (S.multifork P).w (WalkingMulticospan.Hom.fst b), ← assoc]\n[GOAL]\ncase right\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nA : Type u₂\ninst✝¹ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU : C\nR : Presieve U\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\nX : C\nS : GrothendieckTopology.Cover J X\nhP : IsSheaf J P\nE : Multifork (GrothendieckTopology.Cover.index S P)\nb : (GrothendieckTopology.Cover.index S P).R\n⊢ ((fun E =>\n IsSheaf.amalgamate hP S (fun I => Multifork.ι E I)\n (_ :\n ∀ (I : GrothendieckTopology.Cover.Relation S),\n Multifork.ι E (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index S P) I) ≫\n MulticospanIndex.fst (GrothendieckTopology.Cover.index S P) I =\n Multifork.ι E (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index S P) I) ≫\n MulticospanIndex.snd (GrothendieckTopology.Cover.index S P) I))\n E ≫\n NatTrans.app (GrothendieckTopology.Cover.multifork S P).π\n (WalkingMulticospan.left (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index S P) b))) ≫\n (MulticospanIndex.multicospan (GrothendieckTopology.Cover.index S P)).map (WalkingMulticospan.Hom.fst b) =\n NatTrans.app E.π (WalkingMulticospan.left (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index S P) b)) ≫\n (MulticospanIndex.multicospan (GrothendieckTopology.Cover.index S P)).map (WalkingMulticospan.Hom.fst b)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase right.e_a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nA : Type u₂\ninst✝¹ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU : C\nR : Presieve U\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\nX : C\nS : GrothendieckTopology.Cover J X\nhP : IsSheaf J P\nE : Multifork (GrothendieckTopology.Cover.index S P)\nb : (GrothendieckTopology.Cover.index S P).R\n⊢ (fun E =>\n IsSheaf.amalgamate hP S (fun I => Multifork.ι E I)\n (_ :\n ∀ (I : GrothendieckTopology.Cover.Relation S),\n Multifork.ι E (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index S P) I) ≫\n MulticospanIndex.fst (GrothendieckTopology.Cover.index S P) I =\n Multifork.ι E (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index S P) I) ≫\n MulticospanIndex.snd (GrothendieckTopology.Cover.index S P) I))\n E ≫\n NatTrans.app (GrothendieckTopology.Cover.multifork S P).π\n (WalkingMulticospan.left (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index S P) b)) =\n NatTrans.app E.π (WalkingMulticospan.left (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index S P) b))\n[PROOFSTEP]\napply hP.amalgamate_map\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nA : Type u₂\ninst✝¹ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU : C\nR : Presieve U\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\nX : C\nS : GrothendieckTopology.Cover J X\nhP : IsSheaf J P\n⊢ ∀ (s : Cone (MulticospanIndex.multicospan (GrothendieckTopology.Cover.index S P)))\n (m : s.pt ⟶ (GrothendieckTopology.Cover.multifork S P).pt),\n (∀\n (j :\n WalkingMulticospan (GrothendieckTopology.Cover.index S P).fstTo (GrothendieckTopology.Cover.index S P).sndTo),\n m ≫ NatTrans.app (GrothendieckTopology.Cover.multifork S P).π j = NatTrans.app s.π j) →\n m =\n (fun E =>\n IsSheaf.amalgamate hP S (fun I => Multifork.ι E I)\n (_ :\n ∀ (I : GrothendieckTopology.Cover.Relation S),\n Multifork.ι E (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index S P) I) ≫\n MulticospanIndex.fst (GrothendieckTopology.Cover.index S P) I =\n Multifork.ι E (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index S P) I) ≫\n MulticospanIndex.snd (GrothendieckTopology.Cover.index S P) I))\n s\n[PROOFSTEP]\nrintro (E : Multifork _) m hm\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nA : Type u₂\ninst✝¹ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU : C\nR : Presieve U\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\nX : C\nS : GrothendieckTopology.Cover J X\nhP : IsSheaf J P\nE : Multifork (GrothendieckTopology.Cover.index S P)\nm : E.pt ⟶ (GrothendieckTopology.Cover.multifork S P).pt\nhm :\n ∀ (j : WalkingMulticospan (GrothendieckTopology.Cover.index S P).fstTo (GrothendieckTopology.Cover.index S P).sndTo),\n m ≫ NatTrans.app (GrothendieckTopology.Cover.multifork S P).π j = NatTrans.app E.π j\n⊢ m =\n (fun E =>\n IsSheaf.amalgamate hP S (fun I => Multifork.ι E I)\n (_ :\n ∀ (I : GrothendieckTopology.Cover.Relation S),\n Multifork.ι E (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index S P) I) ≫\n MulticospanIndex.fst (GrothendieckTopology.Cover.index S P) I =\n Multifork.ι E (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index S P) I) ≫\n MulticospanIndex.snd (GrothendieckTopology.Cover.index S P) I))\n E\n[PROOFSTEP]\napply hP.hom_ext S\n[GOAL]\ncase h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nA : Type u₂\ninst✝¹ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU : C\nR : Presieve U\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\nX : C\nS : GrothendieckTopology.Cover J X\nhP : IsSheaf J P\nE : Multifork (GrothendieckTopology.Cover.index S P)\nm : E.pt ⟶ (GrothendieckTopology.Cover.multifork S P).pt\nhm :\n ∀ (j : WalkingMulticospan (GrothendieckTopology.Cover.index S P).fstTo (GrothendieckTopology.Cover.index S P).sndTo),\n m ≫ NatTrans.app (GrothendieckTopology.Cover.multifork S P).π j = NatTrans.app E.π j\n⊢ ∀ (I : GrothendieckTopology.Cover.Arrow S),\n m ≫ P.map I.f.op =\n (fun E =>\n IsSheaf.amalgamate hP S (fun I => Multifork.ι E I)\n (_ :\n ∀ (I : GrothendieckTopology.Cover.Relation S),\n Multifork.ι E (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index S P) I) ≫\n MulticospanIndex.fst (GrothendieckTopology.Cover.index S P) I =\n Multifork.ι E (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index S P) I) ≫\n MulticospanIndex.snd (GrothendieckTopology.Cover.index S P) I))\n E ≫\n P.map I.f.op\n[PROOFSTEP]\nintro I\n[GOAL]\ncase h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nA : Type u₂\ninst✝¹ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU : C\nR : Presieve U\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\nX : C\nS : GrothendieckTopology.Cover J X\nhP : IsSheaf J P\nE : Multifork (GrothendieckTopology.Cover.index S P)\nm : E.pt ⟶ (GrothendieckTopology.Cover.multifork S P).pt\nhm :\n ∀ (j : WalkingMulticospan (GrothendieckTopology.Cover.index S P).fstTo (GrothendieckTopology.Cover.index S P).sndTo),\n m ≫ NatTrans.app (GrothendieckTopology.Cover.multifork S P).π j = NatTrans.app E.π j\nI : GrothendieckTopology.Cover.Arrow S\n⊢ m ≫ P.map I.f.op =\n (fun E =>\n IsSheaf.amalgamate hP S (fun I => Multifork.ι E I)\n (_ :\n ∀ (I : GrothendieckTopology.Cover.Relation S),\n Multifork.ι E (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index S P) I) ≫\n MulticospanIndex.fst (GrothendieckTopology.Cover.index S P) I =\n Multifork.ι E (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index S P) I) ≫\n MulticospanIndex.snd (GrothendieckTopology.Cover.index S P) I))\n E ≫\n P.map I.f.op\n[PROOFSTEP]\nerw [hm (WalkingMulticospan.left I)]\n[GOAL]\ncase h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nA : Type u₂\ninst✝¹ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU : C\nR : Presieve U\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\nX : C\nS : GrothendieckTopology.Cover J X\nhP : IsSheaf J P\nE : Multifork (GrothendieckTopology.Cover.index S P)\nm : E.pt ⟶ (GrothendieckTopology.Cover.multifork S P).pt\nhm :\n ∀ (j : WalkingMulticospan (GrothendieckTopology.Cover.index S P).fstTo (GrothendieckTopology.Cover.index S P).sndTo),\n m ≫ NatTrans.app (GrothendieckTopology.Cover.multifork S P).π j = NatTrans.app E.π j\nI : GrothendieckTopology.Cover.Arrow S\n⊢ NatTrans.app E.π (WalkingMulticospan.left I) =\n (fun E =>\n IsSheaf.amalgamate hP S (fun I => Multifork.ι E I)\n (_ :\n ∀ (I : GrothendieckTopology.Cover.Relation S),\n Multifork.ι E (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index S P) I) ≫\n MulticospanIndex.fst (GrothendieckTopology.Cover.index S P) I =\n Multifork.ι E (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index S P) I) ≫\n MulticospanIndex.snd (GrothendieckTopology.Cover.index S P) I))\n E ≫\n P.map I.f.op\n[PROOFSTEP]\nsymm\n[GOAL]\ncase h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nA : Type u₂\ninst✝¹ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU : C\nR : Presieve U\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\nX : C\nS : GrothendieckTopology.Cover J X\nhP : IsSheaf J P\nE : Multifork (GrothendieckTopology.Cover.index S P)\nm : E.pt ⟶ (GrothendieckTopology.Cover.multifork S P).pt\nhm :\n ∀ (j : WalkingMulticospan (GrothendieckTopology.Cover.index S P).fstTo (GrothendieckTopology.Cover.index S P).sndTo),\n m ≫ NatTrans.app (GrothendieckTopology.Cover.multifork S P).π j = NatTrans.app E.π j\nI : GrothendieckTopology.Cover.Arrow S\n⊢ (fun E =>\n IsSheaf.amalgamate hP S (fun I => Multifork.ι E I)\n (_ :\n ∀ (I : GrothendieckTopology.Cover.Relation S),\n Multifork.ι E (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index S P) I) ≫\n MulticospanIndex.fst (GrothendieckTopology.Cover.index S P) I =\n Multifork.ι E (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index S P) I) ≫\n MulticospanIndex.snd (GrothendieckTopology.Cover.index S P) I))\n E ≫\n P.map I.f.op =\n NatTrans.app E.π (WalkingMulticospan.left I)\n[PROOFSTEP]\napply hP.amalgamate_map\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nA : Type u₂\ninst✝¹ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU : C\nR : Presieve U\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\n⊢ IsSheaf J P ↔\n ∀ (X : C) (S : GrothendieckTopology.Cover J X), Nonempty (IsLimit (GrothendieckTopology.Cover.multifork S P))\n[PROOFSTEP]\nrefine' ⟨fun hP X S => ⟨isLimitOfIsSheaf _ _ _ hP⟩, _⟩\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nA : Type u₂\ninst✝¹ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU : C\nR : Presieve U\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\n⊢ (∀ (X : C) (S : GrothendieckTopology.Cover J X), Nonempty (IsLimit (GrothendieckTopology.Cover.multifork S P))) →\n IsSheaf J P\n[PROOFSTEP]\nintro h E X S hS x hx\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nA : Type u₂\ninst✝¹ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU : C\nR : Presieve U\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\nh : ∀ (X : C) (S : GrothendieckTopology.Cover J X), Nonempty (IsLimit (GrothendieckTopology.Cover.multifork S P))\nE : A\nX : C\nS : Sieve X\nhS : S ∈ GrothendieckTopology.sieves J X\nx : Presieve.FamilyOfElements (P ⋙ coyoneda.obj (op E)) S.arrows\nhx : Presieve.FamilyOfElements.Compatible x\n⊢ ∃! t, Presieve.FamilyOfElements.IsAmalgamation x t\n[PROOFSTEP]\nlet T : J.Cover X := ⟨S, hS⟩\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nA : Type u₂\ninst✝¹ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU : C\nR : Presieve U\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\nh : ∀ (X : C) (S : GrothendieckTopology.Cover J X), Nonempty (IsLimit (GrothendieckTopology.Cover.multifork S P))\nE : A\nX : C\nS : Sieve X\nhS : S ∈ GrothendieckTopology.sieves J X\nx : Presieve.FamilyOfElements (P ⋙ coyoneda.obj (op E)) S.arrows\nhx : Presieve.FamilyOfElements.Compatible x\nT : GrothendieckTopology.Cover J X := { val := S, property := hS }\n⊢ ∃! t, Presieve.FamilyOfElements.IsAmalgamation x t\n[PROOFSTEP]\nobtain ⟨hh⟩ := h _ T\n[GOAL]\ncase intro\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nA : Type u₂\ninst✝¹ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU : C\nR : Presieve U\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\nh : ∀ (X : C) (S : GrothendieckTopology.Cover J X), Nonempty (IsLimit (GrothendieckTopology.Cover.multifork S P))\nE : A\nX : C\nS : Sieve X\nhS : S ∈ GrothendieckTopology.sieves J X\nx : Presieve.FamilyOfElements (P ⋙ coyoneda.obj (op E)) S.arrows\nhx : Presieve.FamilyOfElements.Compatible x\nT : GrothendieckTopology.Cover J X := { val := S, property := hS }\nhh : IsLimit (GrothendieckTopology.Cover.multifork T P)\n⊢ ∃! t, Presieve.FamilyOfElements.IsAmalgamation x t\n[PROOFSTEP]\nlet K : Multifork (T.index P) := Multifork.ofι _ E (fun I => x I.f I.hf) fun I => hx _ _ _ _ I.w\n[GOAL]\ncase intro\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nA : Type u₂\ninst✝¹ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU : C\nR : Presieve U\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\nh : ∀ (X : C) (S : GrothendieckTopology.Cover J X), Nonempty (IsLimit (GrothendieckTopology.Cover.multifork S P))\nE : A\nX : C\nS : Sieve X\nhS : S ∈ GrothendieckTopology.sieves J X\nx : Presieve.FamilyOfElements (P ⋙ coyoneda.obj (op E)) S.arrows\nhx : Presieve.FamilyOfElements.Compatible x\nT : GrothendieckTopology.Cover J X := { val := S, property := hS }\nhh : IsLimit (GrothendieckTopology.Cover.multifork T P)\nK : Multifork (GrothendieckTopology.Cover.index T P) :=\n Multifork.ofι (GrothendieckTopology.Cover.index T P) E\n (fun I => x I.f (_ : (GrothendieckTopology.Cover.sieve T).arrows I.f))\n (_ :\n ∀ (I : (GrothendieckTopology.Cover.index T P).R),\n (P ⋙ coyoneda.obj (op E)).map I.g₁.op\n (x (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index T P) I).f\n (_ :\n (GrothendieckTopology.Cover.sieve T).arrows\n (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index T P) I).f)) =\n (P ⋙ coyoneda.obj (op E)).map I.g₂.op\n (x (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index T P) I).f\n (_ :\n (GrothendieckTopology.Cover.sieve T).arrows\n (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index T P) I).f)))\n⊢ ∃! t, Presieve.FamilyOfElements.IsAmalgamation x t\n[PROOFSTEP]\nuse hh.lift K\n[GOAL]\ncase h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nA : Type u₂\ninst✝¹ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU : C\nR : Presieve U\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\nh : ∀ (X : C) (S : GrothendieckTopology.Cover J X), Nonempty (IsLimit (GrothendieckTopology.Cover.multifork S P))\nE : A\nX : C\nS : Sieve X\nhS : S ∈ GrothendieckTopology.sieves J X\nx : Presieve.FamilyOfElements (P ⋙ coyoneda.obj (op E)) S.arrows\nhx : Presieve.FamilyOfElements.Compatible x\nT : GrothendieckTopology.Cover J X := { val := S, property := hS }\nhh : IsLimit (GrothendieckTopology.Cover.multifork T P)\nK : Multifork (GrothendieckTopology.Cover.index T P) :=\n Multifork.ofι (GrothendieckTopology.Cover.index T P) E\n (fun I => x I.f (_ : (GrothendieckTopology.Cover.sieve T).arrows I.f))\n (_ :\n ∀ (I : (GrothendieckTopology.Cover.index T P).R),\n (P ⋙ coyoneda.obj (op E)).map I.g₁.op\n (x (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index T P) I).f\n (_ :\n (GrothendieckTopology.Cover.sieve T).arrows\n (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index T P) I).f)) =\n (P ⋙ coyoneda.obj (op E)).map I.g₂.op\n (x (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index T P) I).f\n (_ :\n (GrothendieckTopology.Cover.sieve T).arrows\n (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index T P) I).f)))\n⊢ (fun t => Presieve.FamilyOfElements.IsAmalgamation x t) (IsLimit.lift hh K) ∧\n ∀ (y : (P ⋙ coyoneda.obj (op E)).obj (op X)),\n (fun t => Presieve.FamilyOfElements.IsAmalgamation x t) y → y = IsLimit.lift hh K\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nA : Type u₂\ninst✝¹ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU : C\nR : Presieve U\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\nh : ∀ (X : C) (S : GrothendieckTopology.Cover J X), Nonempty (IsLimit (GrothendieckTopology.Cover.multifork S P))\nE : A\nX : C\nS : Sieve X\nhS : S ∈ GrothendieckTopology.sieves J X\nx : Presieve.FamilyOfElements (P ⋙ coyoneda.obj (op E)) S.arrows\nhx : Presieve.FamilyOfElements.Compatible x\nT : GrothendieckTopology.Cover J X := { val := S, property := hS }\nhh : IsLimit (GrothendieckTopology.Cover.multifork T P)\nK : Multifork (GrothendieckTopology.Cover.index T P) :=\n Multifork.ofι (GrothendieckTopology.Cover.index T P) E\n (fun I => x I.f (_ : (GrothendieckTopology.Cover.sieve T).arrows I.f))\n (_ :\n ∀ (I : (GrothendieckTopology.Cover.index T P).R),\n (P ⋙ coyoneda.obj (op E)).map I.g₁.op\n (x (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index T P) I).f\n (_ :\n (GrothendieckTopology.Cover.sieve T).arrows\n (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index T P) I).f)) =\n (P ⋙ coyoneda.obj (op E)).map I.g₂.op\n (x (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index T P) I).f\n (_ :\n (GrothendieckTopology.Cover.sieve T).arrows\n (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index T P) I).f)))\n⊢ Presieve.FamilyOfElements.IsAmalgamation x\n (IsLimit.lift hh\n (Multifork.ofι (GrothendieckTopology.Cover.index { val := S, property := hS } P) E\n (fun I => x I.f (_ : (GrothendieckTopology.Cover.sieve { val := S, property := hS }).arrows I.f))\n (_ :\n ∀ (I : (GrothendieckTopology.Cover.index { val := S, property := hS } P).R),\n (P ⋙ coyoneda.obj (op E)).map I.g₁.op\n (x (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index { val := S, property := hS } P) I).f\n (_ :\n (GrothendieckTopology.Cover.sieve { val := S, property := hS }).arrows\n (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index { val := S, property := hS } P)\n I).f)) =\n (P ⋙ coyoneda.obj (op E)).map I.g₂.op\n (x (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index { val := S, property := hS } P) I).f\n (_ :\n (GrothendieckTopology.Cover.sieve { val := S, property := hS }).arrows\n (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index { val := S, property := hS } P)\n I).f))))) ∧\n ∀ (y : E ⟶ P.obj (op X)),\n Presieve.FamilyOfElements.IsAmalgamation x y →\n y =\n IsLimit.lift hh\n (Multifork.ofι (GrothendieckTopology.Cover.index { val := S, property := hS } P) E\n (fun I => x I.f (_ : (GrothendieckTopology.Cover.sieve { val := S, property := hS }).arrows I.f))\n (_ :\n ∀ (I : (GrothendieckTopology.Cover.index { val := S, property := hS } P).R),\n (P ⋙ coyoneda.obj (op E)).map I.g₁.op\n (x (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index { val := S, property := hS } P) I).f\n (_ :\n (GrothendieckTopology.Cover.sieve { val := S, property := hS }).arrows\n (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index { val := S, property := hS } P)\n I).f)) =\n (P ⋙ coyoneda.obj (op E)).map I.g₂.op\n (x (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index { val := S, property := hS } P) I).f\n (_ :\n (GrothendieckTopology.Cover.sieve { val := S, property := hS }).arrows\n (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index { val := S, property := hS } P)\n I).f))))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.left\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nA : Type u₂\ninst✝¹ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU : C\nR : Presieve U\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\nh : ∀ (X : C) (S : GrothendieckTopology.Cover J X), Nonempty (IsLimit (GrothendieckTopology.Cover.multifork S P))\nE : A\nX : C\nS : Sieve X\nhS : S ∈ GrothendieckTopology.sieves J X\nx : Presieve.FamilyOfElements (P ⋙ coyoneda.obj (op E)) S.arrows\nhx : Presieve.FamilyOfElements.Compatible x\nT : GrothendieckTopology.Cover J X := { val := S, property := hS }\nhh : IsLimit (GrothendieckTopology.Cover.multifork T P)\nK : Multifork (GrothendieckTopology.Cover.index T P) :=\n Multifork.ofι (GrothendieckTopology.Cover.index T P) E\n (fun I => x I.f (_ : (GrothendieckTopology.Cover.sieve T).arrows I.f))\n (_ :\n ∀ (I : (GrothendieckTopology.Cover.index T P).R),\n (P ⋙ coyoneda.obj (op E)).map I.g₁.op\n (x (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index T P) I).f\n (_ :\n (GrothendieckTopology.Cover.sieve T).arrows\n (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index T P) I).f)) =\n (P ⋙ coyoneda.obj (op E)).map I.g₂.op\n (x (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index T P) I).f\n (_ :\n (GrothendieckTopology.Cover.sieve T).arrows\n (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index T P) I).f)))\n⊢ Presieve.FamilyOfElements.IsAmalgamation x\n (IsLimit.lift hh\n (Multifork.ofι (GrothendieckTopology.Cover.index { val := S, property := hS } P) E\n (fun I => x I.f (_ : (GrothendieckTopology.Cover.sieve { val := S, property := hS }).arrows I.f))\n (_ :\n ∀ (I : (GrothendieckTopology.Cover.index { val := S, property := hS } P).R),\n (P ⋙ coyoneda.obj (op E)).map I.g₁.op\n (x (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index { val := S, property := hS } P) I).f\n (_ :\n (GrothendieckTopology.Cover.sieve { val := S, property := hS }).arrows\n (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index { val := S, property := hS } P) I).f)) =\n (P ⋙ coyoneda.obj (op E)).map I.g₂.op\n (x (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index { val := S, property := hS } P) I).f\n (_ :\n (GrothendieckTopology.Cover.sieve { val := S, property := hS }).arrows\n (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index { val := S, property := hS } P)\n I).f)))))\n[PROOFSTEP]\nintro Y f hf\n[GOAL]\ncase h.left\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nA : Type u₂\ninst✝¹ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU : C\nR : Presieve U\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\nh : ∀ (X : C) (S : GrothendieckTopology.Cover J X), Nonempty (IsLimit (GrothendieckTopology.Cover.multifork S P))\nE : A\nX : C\nS : Sieve X\nhS : S ∈ GrothendieckTopology.sieves J X\nx : Presieve.FamilyOfElements (P ⋙ coyoneda.obj (op E)) S.arrows\nhx : Presieve.FamilyOfElements.Compatible x\nT : GrothendieckTopology.Cover J X := { val := S, property := hS }\nhh : IsLimit (GrothendieckTopology.Cover.multifork T P)\nK : Multifork (GrothendieckTopology.Cover.index T P) :=\n Multifork.ofι (GrothendieckTopology.Cover.index T P) E\n (fun I => x I.f (_ : (GrothendieckTopology.Cover.sieve T).arrows I.f))\n (_ :\n ∀ (I : (GrothendieckTopology.Cover.index T P).R),\n (P ⋙ coyoneda.obj (op E)).map I.g₁.op\n (x (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index T P) I).f\n (_ :\n (GrothendieckTopology.Cover.sieve T).arrows\n (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index T P) I).f)) =\n (P ⋙ coyoneda.obj (op E)).map I.g₂.op\n (x (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index T P) I).f\n (_ :\n (GrothendieckTopology.Cover.sieve T).arrows\n (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index T P) I).f)))\nY : C\nf : Y ⟶ X\nhf : S.arrows f\n⊢ (P ⋙ coyoneda.obj (op E)).map f.op\n (IsLimit.lift hh\n (Multifork.ofι (GrothendieckTopology.Cover.index { val := S, property := hS } P) E\n (fun I => x I.f (_ : (GrothendieckTopology.Cover.sieve { val := S, property := hS }).arrows I.f))\n (_ :\n ∀ (I : (GrothendieckTopology.Cover.index { val := S, property := hS } P).R),\n (P ⋙ coyoneda.obj (op E)).map I.g₁.op\n (x (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index { val := S, property := hS } P) I).f\n (_ :\n (GrothendieckTopology.Cover.sieve { val := S, property := hS }).arrows\n (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index { val := S, property := hS } P)\n I).f)) =\n (P ⋙ coyoneda.obj (op E)).map I.g₂.op\n (x (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index { val := S, property := hS } P) I).f\n (_ :\n (GrothendieckTopology.Cover.sieve { val := S, property := hS }).arrows\n (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index { val := S, property := hS } P)\n I).f))))) =\n x f hf\n[PROOFSTEP]\napply hh.fac K (WalkingMulticospan.left ⟨Y, f, hf⟩)\n[GOAL]\ncase h.right\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nA : Type u₂\ninst✝¹ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU : C\nR : Presieve U\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\nh : ∀ (X : C) (S : GrothendieckTopology.Cover J X), Nonempty (IsLimit (GrothendieckTopology.Cover.multifork S P))\nE : A\nX : C\nS : Sieve X\nhS : S ∈ GrothendieckTopology.sieves J X\nx : Presieve.FamilyOfElements (P ⋙ coyoneda.obj (op E)) S.arrows\nhx : Presieve.FamilyOfElements.Compatible x\nT : GrothendieckTopology.Cover J X := { val := S, property := hS }\nhh : IsLimit (GrothendieckTopology.Cover.multifork T P)\nK : Multifork (GrothendieckTopology.Cover.index T P) :=\n Multifork.ofι (GrothendieckTopology.Cover.index T P) E\n (fun I => x I.f (_ : (GrothendieckTopology.Cover.sieve T).arrows I.f))\n (_ :\n ∀ (I : (GrothendieckTopology.Cover.index T P).R),\n (P ⋙ coyoneda.obj (op E)).map I.g₁.op\n (x (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index T P) I).f\n (_ :\n (GrothendieckTopology.Cover.sieve T).arrows\n (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index T P) I).f)) =\n (P ⋙ coyoneda.obj (op E)).map I.g₂.op\n (x (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index T P) I).f\n (_ :\n (GrothendieckTopology.Cover.sieve T).arrows\n (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index T P) I).f)))\n⊢ ∀ (y : E ⟶ P.obj (op X)),\n Presieve.FamilyOfElements.IsAmalgamation x y →\n y =\n IsLimit.lift hh\n (Multifork.ofι (GrothendieckTopology.Cover.index { val := S, property := hS } P) E\n (fun I => x I.f (_ : (GrothendieckTopology.Cover.sieve { val := S, property := hS }).arrows I.f))\n (_ :\n ∀ (I : (GrothendieckTopology.Cover.index { val := S, property := hS } P).R),\n (P ⋙ coyoneda.obj (op E)).map I.g₁.op\n (x (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index { val := S, property := hS } P) I).f\n (_ :\n (GrothendieckTopology.Cover.sieve { val := S, property := hS }).arrows\n (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index { val := S, property := hS } P)\n I).f)) =\n (P ⋙ coyoneda.obj (op E)).map I.g₂.op\n (x (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index { val := S, property := hS } P) I).f\n (_ :\n (GrothendieckTopology.Cover.sieve { val := S, property := hS }).arrows\n (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index { val := S, property := hS } P)\n I).f))))\n[PROOFSTEP]\nintro e he\n[GOAL]\ncase h.right\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nA : Type u₂\ninst✝¹ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU : C\nR : Presieve U\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\nh : ∀ (X : C) (S : GrothendieckTopology.Cover J X), Nonempty (IsLimit (GrothendieckTopology.Cover.multifork S P))\nE : A\nX : C\nS : Sieve X\nhS : S ∈ GrothendieckTopology.sieves J X\nx : Presieve.FamilyOfElements (P ⋙ coyoneda.obj (op E)) S.arrows\nhx : Presieve.FamilyOfElements.Compatible x\nT : GrothendieckTopology.Cover J X := { val := S, property := hS }\nhh : IsLimit (GrothendieckTopology.Cover.multifork T P)\nK : Multifork (GrothendieckTopology.Cover.index T P) :=\n Multifork.ofι (GrothendieckTopology.Cover.index T P) E\n (fun I => x I.f (_ : (GrothendieckTopology.Cover.sieve T).arrows I.f))\n (_ :\n ∀ (I : (GrothendieckTopology.Cover.index T P).R),\n (P ⋙ coyoneda.obj (op E)).map I.g₁.op\n (x (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index T P) I).f\n (_ :\n (GrothendieckTopology.Cover.sieve T).arrows\n (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index T P) I).f)) =\n (P ⋙ coyoneda.obj (op E)).map I.g₂.op\n (x (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index T P) I).f\n (_ :\n (GrothendieckTopology.Cover.sieve T).arrows\n (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index T P) I).f)))\ne : E ⟶ P.obj (op X)\nhe : Presieve.FamilyOfElements.IsAmalgamation x e\n⊢ e =\n IsLimit.lift hh\n (Multifork.ofι (GrothendieckTopology.Cover.index { val := S, property := hS } P) E\n (fun I => x I.f (_ : (GrothendieckTopology.Cover.sieve { val := S, property := hS }).arrows I.f))\n (_ :\n ∀ (I : (GrothendieckTopology.Cover.index { val := S, property := hS } P).R),\n (P ⋙ coyoneda.obj (op E)).map I.g₁.op\n (x (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index { val := S, property := hS } P) I).f\n (_ :\n (GrothendieckTopology.Cover.sieve { val := S, property := hS }).arrows\n (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index { val := S, property := hS } P) I).f)) =\n (P ⋙ coyoneda.obj (op E)).map I.g₂.op\n (x (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index { val := S, property := hS } P) I).f\n (_ :\n (GrothendieckTopology.Cover.sieve { val := S, property := hS }).arrows\n (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index { val := S, property := hS } P) I).f))))\n[PROOFSTEP]\napply hh.uniq K\n[GOAL]\ncase h.right.x\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nA : Type u₂\ninst✝¹ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU : C\nR : Presieve U\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\nh : ∀ (X : C) (S : GrothendieckTopology.Cover J X), Nonempty (IsLimit (GrothendieckTopology.Cover.multifork S P))\nE : A\nX : C\nS : Sieve X\nhS : S ∈ GrothendieckTopology.sieves J X\nx : Presieve.FamilyOfElements (P ⋙ coyoneda.obj (op E)) S.arrows\nhx : Presieve.FamilyOfElements.Compatible x\nT : GrothendieckTopology.Cover J X := { val := S, property := hS }\nhh : IsLimit (GrothendieckTopology.Cover.multifork T P)\nK : Multifork (GrothendieckTopology.Cover.index T P) :=\n Multifork.ofι (GrothendieckTopology.Cover.index T P) E\n (fun I => x I.f (_ : (GrothendieckTopology.Cover.sieve T).arrows I.f))\n (_ :\n ∀ (I : (GrothendieckTopology.Cover.index T P).R),\n (P ⋙ coyoneda.obj (op E)).map I.g₁.op\n (x (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index T P) I).f\n (_ :\n (GrothendieckTopology.Cover.sieve T).arrows\n (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index T P) I).f)) =\n (P ⋙ coyoneda.obj (op E)).map I.g₂.op\n (x (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index T P) I).f\n (_ :\n (GrothendieckTopology.Cover.sieve T).arrows\n (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index T P) I).f)))\ne : E ⟶ P.obj (op X)\nhe : Presieve.FamilyOfElements.IsAmalgamation x e\n⊢ ∀ (j : WalkingMulticospan (GrothendieckTopology.Cover.index T P).fstTo (GrothendieckTopology.Cover.index T P).sndTo),\n e ≫ NatTrans.app (GrothendieckTopology.Cover.multifork T P).π j = NatTrans.app K.π j\n[PROOFSTEP]\nrintro (a | b)\n[GOAL]\ncase h.right.x.left\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nA : Type u₂\ninst✝¹ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU : C\nR : Presieve U\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\nh : ∀ (X : C) (S : GrothendieckTopology.Cover J X), Nonempty (IsLimit (GrothendieckTopology.Cover.multifork S P))\nE : A\nX : C\nS : Sieve X\nhS : S ∈ GrothendieckTopology.sieves J X\nx : Presieve.FamilyOfElements (P ⋙ coyoneda.obj (op E)) S.arrows\nhx : Presieve.FamilyOfElements.Compatible x\nT : GrothendieckTopology.Cover J X := { val := S, property := hS }\nhh : IsLimit (GrothendieckTopology.Cover.multifork T P)\nK : Multifork (GrothendieckTopology.Cover.index T P) :=\n Multifork.ofι (GrothendieckTopology.Cover.index T P) E\n (fun I => x I.f (_ : (GrothendieckTopology.Cover.sieve T).arrows I.f))\n (_ :\n ∀ (I : (GrothendieckTopology.Cover.index T P).R),\n (P ⋙ coyoneda.obj (op E)).map I.g₁.op\n (x (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index T P) I).f\n (_ :\n (GrothendieckTopology.Cover.sieve T).arrows\n (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index T P) I).f)) =\n (P ⋙ coyoneda.obj (op E)).map I.g₂.op\n (x (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index T P) I).f\n (_ :\n (GrothendieckTopology.Cover.sieve T).arrows\n (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index T P) I).f)))\ne : E ⟶ P.obj (op X)\nhe : Presieve.FamilyOfElements.IsAmalgamation x e\na : (GrothendieckTopology.Cover.index T P).L\n⊢ e ≫ NatTrans.app (GrothendieckTopology.Cover.multifork T P).π (WalkingMulticospan.left a) =\n NatTrans.app K.π (WalkingMulticospan.left a)\n[PROOFSTEP]\napply he\n[GOAL]\ncase h.right.x.right\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nA : Type u₂\ninst✝¹ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU : C\nR : Presieve U\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\nh : ∀ (X : C) (S : GrothendieckTopology.Cover J X), Nonempty (IsLimit (GrothendieckTopology.Cover.multifork S P))\nE : A\nX : C\nS : Sieve X\nhS : S ∈ GrothendieckTopology.sieves J X\nx : Presieve.FamilyOfElements (P ⋙ coyoneda.obj (op E)) S.arrows\nhx : Presieve.FamilyOfElements.Compatible x\nT : GrothendieckTopology.Cover J X := { val := S, property := hS }\nhh : IsLimit (GrothendieckTopology.Cover.multifork T P)\nK : Multifork (GrothendieckTopology.Cover.index T P) :=\n Multifork.ofι (GrothendieckTopology.Cover.index T P) E\n (fun I => x I.f (_ : (GrothendieckTopology.Cover.sieve T).arrows I.f))\n (_ :\n ∀ (I : (GrothendieckTopology.Cover.index T P).R),\n (P ⋙ coyoneda.obj (op E)).map I.g₁.op\n (x (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index T P) I).f\n (_ :\n (GrothendieckTopology.Cover.sieve T).arrows\n (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index T P) I).f)) =\n (P ⋙ coyoneda.obj (op E)).map I.g₂.op\n (x (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index T P) I).f\n (_ :\n (GrothendieckTopology.Cover.sieve T).arrows\n (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index T P) I).f)))\ne : E ⟶ P.obj (op X)\nhe : Presieve.FamilyOfElements.IsAmalgamation x e\nb : (GrothendieckTopology.Cover.index T P).R\n⊢ e ≫ NatTrans.app (GrothendieckTopology.Cover.multifork T P).π (WalkingMulticospan.right b) =\n NatTrans.app K.π (WalkingMulticospan.right b)\n[PROOFSTEP]\nrw [← K.w (WalkingMulticospan.Hom.fst b), ← (T.multifork P).w (WalkingMulticospan.Hom.fst b), ← assoc]\n[GOAL]\ncase h.right.x.right\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nA : Type u₂\ninst✝¹ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU : C\nR : Presieve U\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\nh : ∀ (X : C) (S : GrothendieckTopology.Cover J X), Nonempty (IsLimit (GrothendieckTopology.Cover.multifork S P))\nE : A\nX : C\nS : Sieve X\nhS : S ∈ GrothendieckTopology.sieves J X\nx : Presieve.FamilyOfElements (P ⋙ coyoneda.obj (op E)) S.arrows\nhx : Presieve.FamilyOfElements.Compatible x\nT : GrothendieckTopology.Cover J X := { val := S, property := hS }\nhh : IsLimit (GrothendieckTopology.Cover.multifork T P)\nK : Multifork (GrothendieckTopology.Cover.index T P) :=\n Multifork.ofι (GrothendieckTopology.Cover.index T P) E\n (fun I => x I.f (_ : (GrothendieckTopology.Cover.sieve T).arrows I.f))\n (_ :\n ∀ (I : (GrothendieckTopology.Cover.index T P).R),\n (P ⋙ coyoneda.obj (op E)).map I.g₁.op\n (x (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index T P) I).f\n (_ :\n (GrothendieckTopology.Cover.sieve T).arrows\n (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index T P) I).f)) =\n (P ⋙ coyoneda.obj (op E)).map I.g₂.op\n (x (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index T P) I).f\n (_ :\n (GrothendieckTopology.Cover.sieve T).arrows\n (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index T P) I).f)))\ne : E ⟶ P.obj (op X)\nhe : Presieve.FamilyOfElements.IsAmalgamation x e\nb : (GrothendieckTopology.Cover.index T P).R\n⊢ (e ≫\n NatTrans.app (GrothendieckTopology.Cover.multifork T P).π\n (WalkingMulticospan.left (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index T P) b))) ≫\n (MulticospanIndex.multicospan (GrothendieckTopology.Cover.index T P)).map (WalkingMulticospan.Hom.fst b) =\n NatTrans.app K.π (WalkingMulticospan.left (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index T P) b)) ≫\n (MulticospanIndex.multicospan (GrothendieckTopology.Cover.index T P)).map (WalkingMulticospan.Hom.fst b)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase h.right.x.right.e_a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nA : Type u₂\ninst✝¹ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU : C\nR : Presieve U\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\nh : ∀ (X : C) (S : GrothendieckTopology.Cover J X), Nonempty (IsLimit (GrothendieckTopology.Cover.multifork S P))\nE : A\nX : C\nS : Sieve X\nhS : S ∈ GrothendieckTopology.sieves J X\nx : Presieve.FamilyOfElements (P ⋙ coyoneda.obj (op E)) S.arrows\nhx : Presieve.FamilyOfElements.Compatible x\nT : GrothendieckTopology.Cover J X := { val := S, property := hS }\nhh : IsLimit (GrothendieckTopology.Cover.multifork T P)\nK : Multifork (GrothendieckTopology.Cover.index T P) :=\n Multifork.ofι (GrothendieckTopology.Cover.index T P) E\n (fun I => x I.f (_ : (GrothendieckTopology.Cover.sieve T).arrows I.f))\n (_ :\n ∀ (I : (GrothendieckTopology.Cover.index T P).R),\n (P ⋙ coyoneda.obj (op E)).map I.g₁.op\n (x (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index T P) I).f\n (_ :\n (GrothendieckTopology.Cover.sieve T).arrows\n (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index T P) I).f)) =\n (P ⋙ coyoneda.obj (op E)).map I.g₂.op\n (x (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index T P) I).f\n (_ :\n (GrothendieckTopology.Cover.sieve T).arrows\n (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index T P) I).f)))\ne : E ⟶ P.obj (op X)\nhe : Presieve.FamilyOfElements.IsAmalgamation x e\nb : (GrothendieckTopology.Cover.index T P).R\n⊢ e ≫\n NatTrans.app (GrothendieckTopology.Cover.multifork T P).π\n (WalkingMulticospan.left (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index T P) b)) =\n NatTrans.app K.π (WalkingMulticospan.left (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index T P) b))\n[PROOFSTEP]\napply he\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝² : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝¹ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU : C\nR : Presieve U\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝ : ∀ (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\n⊢ IsSheaf J P ↔ ∀ (X : C) (S : GrothendieckTopology.Cover J X), IsIso (GrothendieckTopology.Cover.toMultiequalizer S P)\n[PROOFSTEP]\nrw [isSheaf_iff_multifork]\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝² : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝¹ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU : C\nR : Presieve U\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝ : ∀ (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\n⊢ (∀ (X : C) (S : GrothendieckTopology.Cover J X), Nonempty (IsLimit (GrothendieckTopology.Cover.multifork S P))) ↔\n ∀ (X : C) (S : GrothendieckTopology.Cover J X), IsIso (GrothendieckTopology.Cover.toMultiequalizer S P)\n[PROOFSTEP]\nrefine' forall₂_congr fun X S => ⟨_, _⟩\n[GOAL]\ncase refine'_1\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝² : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝¹ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU : C\nR : Presieve U\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝ : ∀ (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\nX : C\nS : GrothendieckTopology.Cover J X\n⊢ Nonempty (IsLimit (GrothendieckTopology.Cover.multifork S P)) →\n IsIso (GrothendieckTopology.Cover.toMultiequalizer S P)\n[PROOFSTEP]\nrintro ⟨h⟩\n[GOAL]\ncase refine'_1.intro\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝² : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝¹ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU : C\nR : Presieve U\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝ : ∀ (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\nX : C\nS : GrothendieckTopology.Cover J X\nh : IsLimit (GrothendieckTopology.Cover.multifork S P)\n⊢ IsIso (GrothendieckTopology.Cover.toMultiequalizer S P)\n[PROOFSTEP]\nlet e : P.obj (op X) ≅ multiequalizer (S.index P) := h.conePointUniqueUpToIso (limit.isLimit _)\n[GOAL]\ncase refine'_1.intro\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝² : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝¹ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU : C\nR : Presieve U\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝ : ∀ (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\nX : C\nS : GrothendieckTopology.Cover J X\nh : IsLimit (GrothendieckTopology.Cover.multifork S P)\ne : P.obj (op X) ≅ multiequalizer (GrothendieckTopology.Cover.index S P) :=\n IsLimit.conePointUniqueUpToIso h (limit.isLimit (MulticospanIndex.multicospan (GrothendieckTopology.Cover.index S P)))\n⊢ IsIso (GrothendieckTopology.Cover.toMultiequalizer S P)\n[PROOFSTEP]\nexact (inferInstance : IsIso e.hom)\n[GOAL]\ncase refine'_2\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝² : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝¹ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU : C\nR : Presieve U\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝ : ∀ (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\nX : C\nS : GrothendieckTopology.Cover J X\n⊢ IsIso (GrothendieckTopology.Cover.toMultiequalizer S P) →\n Nonempty (IsLimit (GrothendieckTopology.Cover.multifork S P))\n[PROOFSTEP]\nintro h\n[GOAL]\ncase refine'_2\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝² : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝¹ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU : C\nR : Presieve U\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝ : ∀ (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\nX : C\nS : GrothendieckTopology.Cover J X\nh : IsIso (GrothendieckTopology.Cover.toMultiequalizer S P)\n⊢ Nonempty (IsLimit (GrothendieckTopology.Cover.multifork S P))\n[PROOFSTEP]\nrefine' ⟨IsLimit.ofIsoLimit (limit.isLimit _) (Cones.ext _ _)⟩\n[GOAL]\ncase refine'_2.refine'_1\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝² : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝¹ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU : C\nR : Presieve U\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝ : ∀ (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\nX : C\nS : GrothendieckTopology.Cover J X\nh : IsIso (GrothendieckTopology.Cover.toMultiequalizer S P)\n⊢ (limit.cone (MulticospanIndex.multicospan (GrothendieckTopology.Cover.index S P))).pt ≅\n (GrothendieckTopology.Cover.multifork S P).pt\n[PROOFSTEP]\napply (@asIso _ _ _ _ _ h).symm\n[GOAL]\ncase refine'_2.refine'_2\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝² : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝¹ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU : C\nR : Presieve U\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝ : ∀ (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\nX : C\nS : GrothendieckTopology.Cover J X\nh : IsIso (GrothendieckTopology.Cover.toMultiequalizer S P)\n⊢ ∀ (j : WalkingMulticospan (GrothendieckTopology.Cover.index S P).fstTo (GrothendieckTopology.Cover.index S P).sndTo),\n NatTrans.app (limit.cone (MulticospanIndex.multicospan (GrothendieckTopology.Cover.index S P))).π j =\n (asIso (GrothendieckTopology.Cover.toMultiequalizer S P)).symm.hom ≫\n NatTrans.app (GrothendieckTopology.Cover.multifork S P).π j\n[PROOFSTEP]\nintro a\n[GOAL]\ncase refine'_2.refine'_2\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝² : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝¹ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU : C\nR : Presieve U\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝ : ∀ (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\nX : C\nS : GrothendieckTopology.Cover J X\nh : IsIso (GrothendieckTopology.Cover.toMultiequalizer S P)\na : WalkingMulticospan (GrothendieckTopology.Cover.index S P).fstTo (GrothendieckTopology.Cover.index S P).sndTo\n⊢ NatTrans.app (limit.cone (MulticospanIndex.multicospan (GrothendieckTopology.Cover.index S P))).π a =\n (asIso (GrothendieckTopology.Cover.toMultiequalizer S P)).symm.hom ≫\n NatTrans.app (GrothendieckTopology.Cover.multifork S P).π a\n[PROOFSTEP]\nsymm\n[GOAL]\ncase refine'_2.refine'_2\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝² : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝¹ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU : C\nR : Presieve U\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝ : ∀ (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\nX : C\nS : GrothendieckTopology.Cover J X\nh : IsIso (GrothendieckTopology.Cover.toMultiequalizer S P)\na : WalkingMulticospan (GrothendieckTopology.Cover.index S P).fstTo (GrothendieckTopology.Cover.index S P).sndTo\n⊢ (asIso (GrothendieckTopology.Cover.toMultiequalizer S P)).symm.hom ≫\n NatTrans.app (GrothendieckTopology.Cover.multifork S P).π a =\n NatTrans.app (limit.cone (MulticospanIndex.multicospan (GrothendieckTopology.Cover.index S P))).π a\n[PROOFSTEP]\nerw [IsIso.inv_comp_eq]\n[GOAL]\ncase refine'_2.refine'_2\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝² : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝¹ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU : C\nR : Presieve U\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝ : ∀ (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\nX : C\nS : GrothendieckTopology.Cover J X\nh : IsIso (GrothendieckTopology.Cover.toMultiequalizer S P)\na : WalkingMulticospan (GrothendieckTopology.Cover.index S P).fstTo (GrothendieckTopology.Cover.index S P).sndTo\n⊢ NatTrans.app (GrothendieckTopology.Cover.multifork S P).π a =\n GrothendieckTopology.Cover.toMultiequalizer S P ≫\n NatTrans.app (limit.cone (MulticospanIndex.multicospan (GrothendieckTopology.Cover.index S P))).π a\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase refine'_2.refine'_2\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝² : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝¹ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU : C\nR : Presieve U\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝ : ∀ (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\nX : C\nS : GrothendieckTopology.Cover J X\nh : IsIso (GrothendieckTopology.Cover.toMultiequalizer S P)\na : WalkingMulticospan (GrothendieckTopology.Cover.index S P).fstTo (GrothendieckTopology.Cover.index S P).sndTo\n⊢ (match a with\n | WalkingMulticospan.left a => P.map a.f.op\n | WalkingMulticospan.right b =>\n P.map (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index S P) b).f.op ≫\n MulticospanIndex.fst (GrothendieckTopology.Cover.index S P) b) =\n GrothendieckTopology.Cover.toMultiequalizer S P ≫\n limit.π (MulticospanIndex.multicospan (GrothendieckTopology.Cover.index S P)) a\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝⁴ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝³ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU : C\nR : Presieve U\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝² : HasProducts A\ninst✝¹ : HasProducts A'\ninst✝ : HasPullbacks C\n⊢ forkMap R P ≫ firstMap R P = forkMap R P ≫ secondMap R P\n[PROOFSTEP]\napply limit.hom_ext\n[GOAL]\ncase w\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝⁴ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝³ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU : C\nR : Presieve U\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝² : HasProducts A\ninst✝¹ : HasProducts A'\ninst✝ : HasPullbacks C\n⊢ ∀ (j : Discrete (((V : C) × { f // R f }) × (W : C) × { g // R g })),\n (forkMap R P ≫ firstMap R P) ≫\n limit.π (Discrete.functor fun fg => P.obj (op (Limits.pullback ↑fg.fst.snd ↑fg.snd.snd))) j =\n (forkMap R P ≫ secondMap R P) ≫\n limit.π (Discrete.functor fun fg => P.obj (op (Limits.pullback ↑fg.fst.snd ↑fg.snd.snd))) j\n[PROOFSTEP]\nrintro ⟨⟨Y, f, hf⟩, ⟨Z, g, hg⟩⟩\n[GOAL]\ncase w.mk.mk.mk.mk.mk.mk\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝⁴ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝³ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU : C\nR : Presieve U\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝² : HasProducts A\ninst✝¹ : HasProducts A'\ninst✝ : HasPullbacks C\nY : C\nf : Y ⟶ U\nhf : R f\nZ : C\ng : Z ⟶ U\nhg : R g\n⊢ (forkMap R P ≫ firstMap R P) ≫\n limit.π (Discrete.functor fun fg => P.obj (op (Limits.pullback ↑fg.fst.snd ↑fg.snd.snd)))\n {\n as :=\n ({ fst := Y, snd := { val := f, property := hf } }, { fst := Z, snd := { val := g, property := hg } }) } =\n (forkMap R P ≫ secondMap R P) ≫\n limit.π (Discrete.functor fun fg => P.obj (op (Limits.pullback ↑fg.fst.snd ↑fg.snd.snd)))\n { as := ({ fst := Y, snd := { val := f, property := hf } }, { fst := Z, snd := { val := g, property := hg } }) }\n[PROOFSTEP]\nsimp only [firstMap, secondMap, forkMap, limit.lift_π, limit.lift_π_assoc, assoc, Fan.mk_π_app, Subtype.coe_mk]\n[GOAL]\ncase w.mk.mk.mk.mk.mk.mk\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝⁴ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝³ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU : C\nR : Presieve U\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝² : HasProducts A\ninst✝¹ : HasProducts A'\ninst✝ : HasPullbacks C\nY : C\nf : Y ⟶ U\nhf : R f\nZ : C\ng : Z ⟶ U\nhg : R g\n⊢ P.map f.op ≫ P.map pullback.fst.op = P.map g.op ≫ P.map pullback.snd.op\n[PROOFSTEP]\nrw [← P.map_comp, ← op_comp, pullback.condition]\n[GOAL]\ncase w.mk.mk.mk.mk.mk.mk\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝⁴ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝³ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU : C\nR : Presieve U\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝² : HasProducts A\ninst✝¹ : HasProducts A'\ninst✝ : HasPullbacks C\nY : C\nf : Y ⟶ U\nhf : R f\nZ : C\ng : Z ⟶ U\nhg : R g\n⊢ P.map (pullback.snd ≫ g).op = P.map g.op ≫ P.map pullback.snd.op\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝⁵ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝⁴ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU✝ : C\nR✝ : Presieve U✝\nP✝ : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝³ : HasProducts A\ninst✝² : HasProducts A'\ninst✝¹ : HasPullbacks C\nP : Cᵒᵖ ⥤ A\ns : A ⥤ Type (max v₁ u₁)\ninst✝ : (J : Type (max v₁ u₁)) → PreservesLimitsOfShape (Discrete J) s\nU : C\nR : Presieve U\n⊢ IsLimit (s.mapCone (Fork.ofι (forkMap R P) (_ : forkMap R P ≫ firstMap R P = forkMap R P ≫ secondMap R P))) ≃\n IsLimit\n (Fork.ofι (Equalizer.forkMap (P ⋙ s) R)\n (_ :\n Equalizer.forkMap (P ⋙ s) R ≫ Equalizer.Presieve.firstMap (P ⋙ s) R =\n Equalizer.forkMap (P ⋙ s) R ≫ Equalizer.Presieve.secondMap (P ⋙ s) R))\n[PROOFSTEP]\napply Equiv.trans (isLimitMapConeForkEquiv _ _) _\n[GOAL]\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝⁵ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝⁴ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU✝ : C\nR✝ : Presieve U✝\nP✝ : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝³ : HasProducts A\ninst✝² : HasProducts A'\ninst✝¹ : HasPullbacks C\nP : Cᵒᵖ ⥤ A\ns : A ⥤ Type (max v₁ u₁)\ninst✝ : (J : Type (max v₁ u₁)) → PreservesLimitsOfShape (Discrete J) s\nU : C\nR : Presieve U\n⊢ IsLimit\n (Fork.ofι (s.map (forkMap R P))\n (_ : s.map (forkMap R P) ≫ s.map (firstMap R P) = s.map (forkMap R P) ≫ s.map (secondMap R P))) ≃\n IsLimit\n (Fork.ofι (Equalizer.forkMap (P ⋙ s) R)\n (_ :\n Equalizer.forkMap (P ⋙ s) R ≫ Equalizer.Presieve.firstMap (P ⋙ s) R =\n Equalizer.forkMap (P ⋙ s) R ≫ Equalizer.Presieve.secondMap (P ⋙ s) R))\n[PROOFSTEP]\napply (IsLimit.postcomposeHomEquiv _ _).symm.trans (IsLimit.equivIsoLimit _)\n[GOAL]\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝⁵ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝⁴ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU✝ : C\nR✝ : Presieve U✝\nP✝ : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝³ : HasProducts A\ninst✝² : HasProducts A'\ninst✝¹ : HasPullbacks C\nP : Cᵒᵖ ⥤ A\ns : A ⥤ Type (max v₁ u₁)\ninst✝ : (J : Type (max v₁ u₁)) → PreservesLimitsOfShape (Discrete J) s\nU : C\nR : Presieve U\n⊢ parallelPair (s.map (firstMap R P)) (s.map (secondMap R P)) ≅\n parallelPair (Equalizer.Presieve.firstMap (P ⋙ s) R) (Equalizer.Presieve.secondMap (P ⋙ s) R)\n[PROOFSTEP]\napply NatIso.ofComponents _ _\n[GOAL]\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝⁵ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝⁴ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU✝ : C\nR✝ : Presieve U✝\nP✝ : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝³ : HasProducts A\ninst✝² : HasProducts A'\ninst✝¹ : HasPullbacks C\nP : Cᵒᵖ ⥤ A\ns : A ⥤ Type (max v₁ u₁)\ninst✝ : (J : Type (max v₁ u₁)) → PreservesLimitsOfShape (Discrete J) s\nU : C\nR : Presieve U\n⊢ (X : WalkingParallelPair) →\n (parallelPair (s.map (firstMap R P)) (s.map (secondMap R P))).obj X ≅\n (parallelPair (Equalizer.Presieve.firstMap (P ⋙ s) R) (Equalizer.Presieve.secondMap (P ⋙ s) R)).obj X\n[PROOFSTEP]\nrintro (_ | _)\n[GOAL]\ncase zero\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝⁵ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝⁴ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU✝ : C\nR✝ : Presieve U✝\nP✝ : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝³ : HasProducts A\ninst✝² : HasProducts A'\ninst✝¹ : HasPullbacks C\nP : Cᵒᵖ ⥤ A\ns : A ⥤ Type (max v₁ u₁)\ninst✝ : (J : Type (max v₁ u₁)) → PreservesLimitsOfShape (Discrete J) s\nU : C\nR : Presieve U\n⊢ (parallelPair (s.map (firstMap R P)) (s.map (secondMap R P))).obj WalkingParallelPair.zero ≅\n (parallelPair (Equalizer.Presieve.firstMap (P ⋙ s) R) (Equalizer.Presieve.secondMap (P ⋙ s) R)).obj\n WalkingParallelPair.zero\n[PROOFSTEP]\napply PreservesProduct.iso s\n[GOAL]\ncase one\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝⁵ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝⁴ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU✝ : C\nR✝ : Presieve U✝\nP✝ : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝³ : HasProducts A\ninst✝² : HasProducts A'\ninst✝¹ : HasPullbacks C\nP : Cᵒᵖ ⥤ A\ns : A ⥤ Type (max v₁ u₁)\ninst✝ : (J : Type (max v₁ u₁)) → PreservesLimitsOfShape (Discrete J) s\nU : C\nR : Presieve U\n⊢ (parallelPair (s.map (firstMap R P)) (s.map (secondMap R P))).obj WalkingParallelPair.one ≅\n (parallelPair (Equalizer.Presieve.firstMap (P ⋙ s) R) (Equalizer.Presieve.secondMap (P ⋙ s) R)).obj\n WalkingParallelPair.one\n[PROOFSTEP]\napply PreservesProduct.iso s\n[GOAL]\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝⁵ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝⁴ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU✝ : C\nR✝ : Presieve U✝\nP✝ : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝³ : HasProducts A\ninst✝² : HasProducts A'\ninst✝¹ : HasPullbacks C\nP : Cᵒᵖ ⥤ A\ns : A ⥤ Type (max v₁ u₁)\ninst✝ : (J : Type (max v₁ u₁)) → PreservesLimitsOfShape (Discrete J) s\nU : C\nR : Presieve U\n⊢ ∀ {X Y : WalkingParallelPair} (f : X ⟶ Y),\n (parallelPair (s.map (firstMap R P)) (s.map (secondMap R P))).map f ≫\n (WalkingParallelPair.casesOn Y (PreservesProduct.iso s fun f => P.obj (op f.fst))\n (PreservesProduct.iso s fun fg => P.obj (op (Limits.pullback ↑fg.fst.snd ↑fg.snd.snd)))).hom =\n (WalkingParallelPair.casesOn X (PreservesProduct.iso s fun f => P.obj (op f.fst))\n (PreservesProduct.iso s fun fg => P.obj (op (Limits.pullback ↑fg.fst.snd ↑fg.snd.snd)))).hom ≫\n (parallelPair (Equalizer.Presieve.firstMap (P ⋙ s) R) (Equalizer.Presieve.secondMap (P ⋙ s) R)).map f\n[PROOFSTEP]\nrintro _ _ (_ | _)\n[GOAL]\ncase left\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝⁵ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝⁴ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU✝ : C\nR✝ : Presieve U✝\nP✝ : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝³ : HasProducts A\ninst✝² : HasProducts A'\ninst✝¹ : HasPullbacks C\nP : Cᵒᵖ ⥤ A\ns : A ⥤ Type (max v₁ u₁)\ninst✝ : (J : Type (max v₁ u₁)) → PreservesLimitsOfShape (Discrete J) s\nU : C\nR : Presieve U\n⊢ (parallelPair (s.map (firstMap R P)) (s.map (secondMap R P))).map WalkingParallelPairHom.left ≫\n (WalkingParallelPair.casesOn WalkingParallelPair.one (PreservesProduct.iso s fun f => P.obj (op f.fst))\n (PreservesProduct.iso s fun fg => P.obj (op (Limits.pullback ↑fg.fst.snd ↑fg.snd.snd)))).hom =\n (WalkingParallelPair.casesOn WalkingParallelPair.zero (PreservesProduct.iso s fun f => P.obj (op f.fst))\n (PreservesProduct.iso s fun fg => P.obj (op (Limits.pullback ↑fg.fst.snd ↑fg.snd.snd)))).hom ≫\n (parallelPair (Equalizer.Presieve.firstMap (P ⋙ s) R) (Equalizer.Presieve.secondMap (P ⋙ s) R)).map\n WalkingParallelPairHom.left\n[PROOFSTEP]\nrefine' limit.hom_ext (fun j => _)\n[GOAL]\ncase left\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝⁵ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝⁴ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU✝ : C\nR✝ : Presieve U✝\nP✝ : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝³ : HasProducts A\ninst✝² : HasProducts A'\ninst✝¹ : HasPullbacks C\nP : Cᵒᵖ ⥤ A\ns : A ⥤ Type (max v₁ u₁)\ninst✝ : (J : Type (max v₁ u₁)) → PreservesLimitsOfShape (Discrete J) s\nU : C\nR : Presieve U\nj : Discrete (((Y : C) × { f // R f }) × (Z : C) × { g // R g })\n⊢ ((parallelPair (s.map (firstMap R P)) (s.map (secondMap R P))).map WalkingParallelPairHom.left ≫\n (WalkingParallelPair.casesOn WalkingParallelPair.one (PreservesProduct.iso s fun f => P.obj (op f.fst))\n (PreservesProduct.iso s fun fg => P.obj (op (Limits.pullback ↑fg.fst.snd ↑fg.snd.snd)))).hom) ≫\n limit.π (Discrete.functor fun fg => (P ⋙ s).obj (op (Limits.pullback ↑fg.fst.snd ↑fg.snd.snd))) j =\n ((WalkingParallelPair.casesOn WalkingParallelPair.zero (PreservesProduct.iso s fun f => P.obj (op f.fst))\n (PreservesProduct.iso s fun fg => P.obj (op (Limits.pullback ↑fg.fst.snd ↑fg.snd.snd)))).hom ≫\n (parallelPair (Equalizer.Presieve.firstMap (P ⋙ s) R) (Equalizer.Presieve.secondMap (P ⋙ s) R)).map\n WalkingParallelPairHom.left) ≫\n limit.π (Discrete.functor fun fg => (P ⋙ s).obj (op (Limits.pullback ↑fg.fst.snd ↑fg.snd.snd))) j\n[PROOFSTEP]\ndsimp [Equalizer.Presieve.firstMap, firstMap]\n[GOAL]\ncase left\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝⁵ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝⁴ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU✝ : C\nR✝ : Presieve U✝\nP✝ : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝³ : HasProducts A\ninst✝² : HasProducts A'\ninst✝¹ : HasPullbacks C\nP : Cᵒᵖ ⥤ A\ns : A ⥤ Type (max v₁ u₁)\ninst✝ : (J : Type (max v₁ u₁)) → PreservesLimitsOfShape (Discrete J) s\nU : C\nR : Presieve U\nj : Discrete (((Y : C) × { f // R f }) × (Z : C) × { g // R g })\n⊢ (s.map (Pi.lift fun x => Pi.π (fun f => P.obj (op f.fst)) x.fst ≫ P.map pullback.fst.op) ≫\n piComparison s fun fg => P.obj (op (Limits.pullback ↑fg.fst.snd ↑fg.snd.snd))) ≫\n limit.π (Discrete.functor fun fg => s.obj (P.obj (op (Limits.pullback ↑fg.fst.snd ↑fg.snd.snd)))) j =\n ((piComparison s fun f => P.obj (op f.fst)) ≫\n Pi.lift fun x => Pi.π (fun f => s.obj (P.obj (op f.fst))) x.fst ≫ s.map (P.map pullback.fst.op)) ≫\n limit.π (Discrete.functor fun fg => s.obj (P.obj (op (Limits.pullback ↑fg.fst.snd ↑fg.snd.snd)))) j\n[PROOFSTEP]\nsimp only [limit.lift_π, map_lift_piComparison, assoc, Fan.mk_π_app, Functor.map_comp]\n[GOAL]\ncase left\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝⁵ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝⁴ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU✝ : C\nR✝ : Presieve U✝\nP✝ : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝³ : HasProducts A\ninst✝² : HasProducts A'\ninst✝¹ : HasPullbacks C\nP : Cᵒᵖ ⥤ A\ns : A ⥤ Type (max v₁ u₁)\ninst✝ : (J : Type (max v₁ u₁)) → PreservesLimitsOfShape (Discrete J) s\nU : C\nR : Presieve U\nj : Discrete (((Y : C) × { f // R f }) × (Z : C) × { g // R g })\n⊢ s.map (Pi.π (fun f => P.obj (op f.fst)) j.as.fst) ≫ s.map (P.map pullback.fst.op) =\n (piComparison s fun f => P.obj (op f.fst)) ≫\n Pi.π (fun f => s.obj (P.obj (op f.fst))) j.as.fst ≫ s.map (P.map pullback.fst.op)\n[PROOFSTEP]\nrw [piComparison_comp_π_assoc]\n[GOAL]\ncase right\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝⁵ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝⁴ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU✝ : C\nR✝ : Presieve U✝\nP✝ : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝³ : HasProducts A\ninst✝² : HasProducts A'\ninst✝¹ : HasPullbacks C\nP : Cᵒᵖ ⥤ A\ns : A ⥤ Type (max v₁ u₁)\ninst✝ : (J : Type (max v₁ u₁)) → PreservesLimitsOfShape (Discrete J) s\nU : C\nR : Presieve U\n⊢ (parallelPair (s.map (firstMap R P)) (s.map (secondMap R P))).map WalkingParallelPairHom.right ≫\n (WalkingParallelPair.casesOn WalkingParallelPair.one (PreservesProduct.iso s fun f => P.obj (op f.fst))\n (PreservesProduct.iso s fun fg => P.obj (op (Limits.pullback ↑fg.fst.snd ↑fg.snd.snd)))).hom =\n (WalkingParallelPair.casesOn WalkingParallelPair.zero (PreservesProduct.iso s fun f => P.obj (op f.fst))\n (PreservesProduct.iso s fun fg => P.obj (op (Limits.pullback ↑fg.fst.snd ↑fg.snd.snd)))).hom ≫\n (parallelPair (Equalizer.Presieve.firstMap (P ⋙ s) R) (Equalizer.Presieve.secondMap (P ⋙ s) R)).map\n WalkingParallelPairHom.right\n[PROOFSTEP]\nrefine' limit.hom_ext (fun j => _)\n[GOAL]\ncase right\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝⁵ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝⁴ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU✝ : C\nR✝ : Presieve U✝\nP✝ : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝³ : HasProducts A\ninst✝² : HasProducts A'\ninst✝¹ : HasPullbacks C\nP : Cᵒᵖ ⥤ A\ns : A ⥤ Type (max v₁ u₁)\ninst✝ : (J : Type (max v₁ u₁)) → PreservesLimitsOfShape (Discrete J) s\nU : C\nR : Presieve U\nj : Discrete (((Y : C) × { f // R f }) × (Z : C) × { g // R g })\n⊢ ((parallelPair (s.map (firstMap R P)) (s.map (secondMap R P))).map WalkingParallelPairHom.right ≫\n (WalkingParallelPair.casesOn WalkingParallelPair.one (PreservesProduct.iso s fun f => P.obj (op f.fst))\n (PreservesProduct.iso s fun fg => P.obj (op (Limits.pullback ↑fg.fst.snd ↑fg.snd.snd)))).hom) ≫\n limit.π (Discrete.functor fun fg => (P ⋙ s).obj (op (Limits.pullback ↑fg.fst.snd ↑fg.snd.snd))) j =\n ((WalkingParallelPair.casesOn WalkingParallelPair.zero (PreservesProduct.iso s fun f => P.obj (op f.fst))\n (PreservesProduct.iso s fun fg => P.obj (op (Limits.pullback ↑fg.fst.snd ↑fg.snd.snd)))).hom ≫\n (parallelPair (Equalizer.Presieve.firstMap (P ⋙ s) R) (Equalizer.Presieve.secondMap (P ⋙ s) R)).map\n WalkingParallelPairHom.right) ≫\n limit.π (Discrete.functor fun fg => (P ⋙ s).obj (op (Limits.pullback ↑fg.fst.snd ↑fg.snd.snd))) j\n[PROOFSTEP]\ndsimp [Equalizer.Presieve.secondMap, secondMap]\n[GOAL]\ncase right\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝⁵ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝⁴ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU✝ : C\nR✝ : Presieve U✝\nP✝ : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝³ : HasProducts A\ninst✝² : HasProducts A'\ninst✝¹ : HasPullbacks C\nP : Cᵒᵖ ⥤ A\ns : A ⥤ Type (max v₁ u₁)\ninst✝ : (J : Type (max v₁ u₁)) → PreservesLimitsOfShape (Discrete J) s\nU : C\nR : Presieve U\nj : Discrete (((Y : C) × { f // R f }) × (Z : C) × { g // R g })\n⊢ (s.map (Pi.lift fun x => Pi.π (fun f => P.obj (op f.fst)) x.snd ≫ P.map pullback.snd.op) ≫\n piComparison s fun fg => P.obj (op (Limits.pullback ↑fg.fst.snd ↑fg.snd.snd))) ≫\n limit.π (Discrete.functor fun fg => s.obj (P.obj (op (Limits.pullback ↑fg.fst.snd ↑fg.snd.snd)))) j =\n ((piComparison s fun f => P.obj (op f.fst)) ≫\n Pi.lift fun x => Pi.π (fun f => s.obj (P.obj (op f.fst))) x.snd ≫ s.map (P.map pullback.snd.op)) ≫\n limit.π (Discrete.functor fun fg => s.obj (P.obj (op (Limits.pullback ↑fg.fst.snd ↑fg.snd.snd)))) j\n[PROOFSTEP]\nsimp only [limit.lift_π, map_lift_piComparison, assoc, Fan.mk_π_app, Functor.map_comp]\n[GOAL]\ncase right\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝⁵ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝⁴ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU✝ : C\nR✝ : Presieve U✝\nP✝ : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝³ : HasProducts A\ninst✝² : HasProducts A'\ninst✝¹ : HasPullbacks C\nP : Cᵒᵖ ⥤ A\ns : A ⥤ Type (max v₁ u₁)\ninst✝ : (J : Type (max v₁ u₁)) → PreservesLimitsOfShape (Discrete J) s\nU : C\nR : Presieve U\nj : Discrete (((Y : C) × { f // R f }) × (Z : C) × { g // R g })\n⊢ s.map (Pi.π (fun f => P.obj (op f.fst)) j.as.snd) ≫ s.map (P.map pullback.snd.op) =\n (piComparison s fun f => P.obj (op f.fst)) ≫\n Pi.π (fun f => s.obj (P.obj (op f.fst))) j.as.snd ≫ s.map (P.map pullback.snd.op)\n[PROOFSTEP]\nrw [piComparison_comp_π_assoc]\n[GOAL]\ncase id\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝⁵ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝⁴ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU✝ : C\nR✝ : Presieve U✝\nP✝ : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝³ : HasProducts A\ninst✝² : HasProducts A'\ninst✝¹ : HasPullbacks C\nP : Cᵒᵖ ⥤ A\ns : A ⥤ Type (max v₁ u₁)\ninst✝ : (J : Type (max v₁ u₁)) → PreservesLimitsOfShape (Discrete J) s\nU : C\nR : Presieve U\nX✝ : WalkingParallelPair\n⊢ (parallelPair (s.map (firstMap R P)) (s.map (secondMap R P))).map (WalkingParallelPairHom.id X✝) ≫\n (WalkingParallelPair.casesOn X✝ (PreservesProduct.iso s fun f => P.obj (op f.fst))\n (PreservesProduct.iso s fun fg => P.obj (op (Limits.pullback ↑fg.fst.snd ↑fg.snd.snd)))).hom =\n (WalkingParallelPair.casesOn X✝ (PreservesProduct.iso s fun f => P.obj (op f.fst))\n (PreservesProduct.iso s fun fg => P.obj (op (Limits.pullback ↑fg.fst.snd ↑fg.snd.snd)))).hom ≫\n (parallelPair (Equalizer.Presieve.firstMap (P ⋙ s) R) (Equalizer.Presieve.secondMap (P ⋙ s) R)).map\n (WalkingParallelPairHom.id X✝)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase id\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝⁵ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝⁴ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU✝ : C\nR✝ : Presieve U✝\nP✝ : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝³ : HasProducts A\ninst✝² : HasProducts A'\ninst✝¹ : HasPullbacks C\nP : Cᵒᵖ ⥤ A\ns : A ⥤ Type (max v₁ u₁)\ninst✝ : (J : Type (max v₁ u₁)) → PreservesLimitsOfShape (Discrete J) s\nU : C\nR : Presieve U\nX✝ : WalkingParallelPair\n⊢ (parallelPair (s.map (firstMap R P)) (s.map (secondMap R P))).map (𝟙 X✝) ≫\n (WalkingParallelPair.rec (PreservesProduct.iso s fun f => P.obj (op f.fst))\n (PreservesProduct.iso s fun fg => P.obj (op (Limits.pullback ↑fg.fst.snd ↑fg.snd.snd))) X✝).hom =\n (WalkingParallelPair.rec (PreservesProduct.iso s fun f => P.obj (op f.fst))\n (PreservesProduct.iso s fun fg => P.obj (op (Limits.pullback ↑fg.fst.snd ↑fg.snd.snd))) X✝).hom ≫\n (parallelPair (Equalizer.Presieve.firstMap (P ⋙ s) R) (Equalizer.Presieve.secondMap (P ⋙ s) R)).map (𝟙 X✝)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝⁵ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝⁴ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU✝ : C\nR✝ : Presieve U✝\nP✝ : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝³ : HasProducts A\ninst✝² : HasProducts A'\ninst✝¹ : HasPullbacks C\nP : Cᵒᵖ ⥤ A\ns : A ⥤ Type (max v₁ u₁)\ninst✝ : (J : Type (max v₁ u₁)) → PreservesLimitsOfShape (Discrete J) s\nU : C\nR : Presieve U\n⊢ (Cones.postcompose\n (NatIso.ofComponents fun X =>\n WalkingParallelPair.casesOn X (PreservesProduct.iso s fun f => P.obj (op f.fst))\n (PreservesProduct.iso s fun fg => P.obj (op (Limits.pullback ↑fg.fst.snd ↑fg.snd.snd)))).hom).obj\n (Fork.ofι (s.map (forkMap R P))\n (_ : s.map (forkMap R P) ≫ s.map (firstMap R P) = s.map (forkMap R P) ≫ s.map (secondMap R P))) ≅\n Fork.ofι (Equalizer.forkMap (P ⋙ s) R)\n (_ :\n Equalizer.forkMap (P ⋙ s) R ≫ Equalizer.Presieve.firstMap (P ⋙ s) R =\n Equalizer.forkMap (P ⋙ s) R ≫ Equalizer.Presieve.secondMap (P ⋙ s) R)\n[PROOFSTEP]\nrefine' Fork.ext (Iso.refl _) _\n[GOAL]\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝⁵ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝⁴ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU✝ : C\nR✝ : Presieve U✝\nP✝ : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝³ : HasProducts A\ninst✝² : HasProducts A'\ninst✝¹ : HasPullbacks C\nP : Cᵒᵖ ⥤ A\ns : A ⥤ Type (max v₁ u₁)\ninst✝ : (J : Type (max v₁ u₁)) → PreservesLimitsOfShape (Discrete J) s\nU : C\nR : Presieve U\n⊢ (Iso.refl\n ((Cones.postcompose\n (NatIso.ofComponents fun X =>\n WalkingParallelPair.casesOn X (PreservesProduct.iso s fun f => P.obj (op f.fst))\n (PreservesProduct.iso s fun fg =>\n P.obj (op (Limits.pullback ↑fg.fst.snd ↑fg.snd.snd)))).hom).obj\n (Fork.ofι (s.map (forkMap R P))\n (_ :\n s.map (forkMap R P) ≫ s.map (firstMap R P) = s.map (forkMap R P) ≫ s.map (secondMap R P)))).pt).hom ≫\n Fork.ι\n (Fork.ofι (Equalizer.forkMap (P ⋙ s) R)\n (_ :\n Equalizer.forkMap (P ⋙ s) R ≫ Equalizer.Presieve.firstMap (P ⋙ s) R =\n Equalizer.forkMap (P ⋙ s) R ≫ Equalizer.Presieve.secondMap (P ⋙ s) R)) =\n Fork.ι\n ((Cones.postcompose\n (NatIso.ofComponents fun X =>\n WalkingParallelPair.casesOn X (PreservesProduct.iso s fun f => P.obj (op f.fst))\n (PreservesProduct.iso s fun fg => P.obj (op (Limits.pullback ↑fg.fst.snd ↑fg.snd.snd)))).hom).obj\n (Fork.ofι (s.map (forkMap R P))\n (_ : s.map (forkMap R P) ≫ s.map (firstMap R P) = s.map (forkMap R P) ≫ s.map (secondMap R P))))\n[PROOFSTEP]\ndsimp [Equalizer.forkMap, forkMap]\n[GOAL]\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝⁵ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝⁴ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU✝ : C\nR✝ : Presieve U✝\nP✝ : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝³ : HasProducts A\ninst✝² : HasProducts A'\ninst✝¹ : HasPullbacks C\nP : Cᵒᵖ ⥤ A\ns : A ⥤ Type (max v₁ u₁)\ninst✝ : (J : Type (max v₁ u₁)) → PreservesLimitsOfShape (Discrete J) s\nU : C\nR : Presieve U\n⊢ (𝟙 (s.obj (P.obj (op U))) ≫ Pi.lift fun f => s.map (P.map (↑f.snd).op)) =\n Fork.ι\n ((Cones.postcompose\n (NatIso.ofComponents fun X =>\n WalkingParallelPair.rec (PreservesProduct.iso s fun f => P.obj (op f.fst))\n (PreservesProduct.iso s fun fg => P.obj (op (Limits.pullback ↑fg.fst.snd ↑fg.snd.snd))) X).hom).obj\n (Fork.ofι (s.map (Pi.lift fun f => P.map (↑f.snd).op))\n (_ :\n s.map (Pi.lift fun f => P.map (↑f.snd).op) ≫ s.map (firstMap R P) =\n s.map (Pi.lift fun f => P.map (↑f.snd).op) ≫ s.map (secondMap R P))))\n[PROOFSTEP]\nsimp [Fork.ι]\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝⁴ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝³ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU : C\nR : Presieve U\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝² : HasProducts A\ninst✝¹ : HasProducts A'\ninst✝ : HasPullbacks C\n⊢ IsSheaf J P' ↔ IsSheaf' J P'\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝⁴ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝³ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU : C\nR : Presieve U\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝² : HasProducts A\ninst✝¹ : HasProducts A'\ninst✝ : HasPullbacks C\n⊢ IsSheaf J P' → IsSheaf' J P'\n[PROOFSTEP]\nintro h U R hR\n[GOAL]\ncase mp\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝⁴ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝³ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU✝ : C\nR✝ : Presieve U✝\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝² : HasProducts A\ninst✝¹ : HasProducts A'\ninst✝ : HasPullbacks C\nh : IsSheaf J P'\nU : C\nR : Presieve U\nhR : generate R ∈ GrothendieckTopology.sieves J U\n⊢ Nonempty (IsLimit (Fork.ofι (forkMap R P') (_ : forkMap R P' ≫ firstMap R P' = forkMap R P' ≫ secondMap R P')))\n[PROOFSTEP]\nrefine' ⟨_⟩\n[GOAL]\ncase mp\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝⁴ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝³ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU✝ : C\nR✝ : Presieve U✝\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝² : HasProducts A\ninst✝¹ : HasProducts A'\ninst✝ : HasPullbacks C\nh : IsSheaf J P'\nU : C\nR : Presieve U\nhR : generate R ∈ GrothendieckTopology.sieves J U\n⊢ IsLimit (Fork.ofι (forkMap R P') (_ : forkMap R P' ≫ firstMap R P' = forkMap R P' ≫ secondMap R P'))\n[PROOFSTEP]\napply coyonedaJointlyReflectsLimits\n[GOAL]\ncase mp.t\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝⁴ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝³ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU✝ : C\nR✝ : Presieve U✝\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝² : HasProducts A\ninst✝¹ : HasProducts A'\ninst✝ : HasPullbacks C\nh : IsSheaf J P'\nU : C\nR : Presieve U\nhR : generate R ∈ GrothendieckTopology.sieves J U\n⊢ (X : A'ᵒᵖ) →\n IsLimit\n ((coyoneda.obj X).mapCone\n (Fork.ofι (forkMap R P') (_ : forkMap R P' ≫ firstMap R P' = forkMap R P' ≫ secondMap R P')))\n[PROOFSTEP]\nintro X\n[GOAL]\ncase mp.t\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝⁴ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝³ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU✝ : C\nR✝ : Presieve U✝\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝² : HasProducts A\ninst✝¹ : HasProducts A'\ninst✝ : HasPullbacks C\nh : IsSheaf J P'\nU : C\nR : Presieve U\nhR : generate R ∈ GrothendieckTopology.sieves J U\nX : A'ᵒᵖ\n⊢ IsLimit\n ((coyoneda.obj X).mapCone\n (Fork.ofι (forkMap R P') (_ : forkMap R P' ≫ firstMap R P' = forkMap R P' ≫ secondMap R P')))\n[PROOFSTEP]\nhave q : Presieve.IsSheafFor (P' ⋙ coyoneda.obj X) _ := h X.unop _ hR\n[GOAL]\ncase mp.t\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝⁴ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝³ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU✝ : C\nR✝ : Presieve U✝\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝² : HasProducts A\ninst✝¹ : HasProducts A'\ninst✝ : HasPullbacks C\nh : IsSheaf J P'\nU : C\nR : Presieve U\nhR : generate R ∈ GrothendieckTopology.sieves J U\nX : A'ᵒᵖ\nq : Presieve.IsSheafFor (P' ⋙ coyoneda.obj X) (generate R).arrows\n⊢ IsLimit\n ((coyoneda.obj X).mapCone\n (Fork.ofι (forkMap R P') (_ : forkMap R P' ≫ firstMap R P' = forkMap R P' ≫ secondMap R P')))\n[PROOFSTEP]\nrw [← Presieve.isSheafFor_iff_generate] at q \n[GOAL]\ncase mp.t\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝⁴ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝³ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU✝ : C\nR✝ : Presieve U✝\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝² : HasProducts A\ninst✝¹ : HasProducts A'\ninst✝ : HasPullbacks C\nh : IsSheaf J P'\nU : C\nR : Presieve U\nhR : generate R ∈ GrothendieckTopology.sieves J U\nX : A'ᵒᵖ\nq : Presieve.IsSheafFor (P' ⋙ coyoneda.obj X) R\n⊢ IsLimit\n ((coyoneda.obj X).mapCone\n (Fork.ofι (forkMap R P') (_ : forkMap R P' ≫ firstMap R P' = forkMap R P' ≫ secondMap R P')))\n[PROOFSTEP]\nrw [Equalizer.Presieve.sheaf_condition] at q \n[GOAL]\ncase mp.t\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝⁴ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝³ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU✝ : C\nR✝ : Presieve U✝\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝² : HasProducts A\ninst✝¹ : HasProducts A'\ninst✝ : HasPullbacks C\nh : IsSheaf J P'\nU : C\nR : Presieve U\nhR : generate R ∈ GrothendieckTopology.sieves J U\nX : A'ᵒᵖ\nq :\n Nonempty\n (IsLimit\n (Fork.ofι (Equalizer.forkMap (P' ⋙ coyoneda.obj X) R)\n (_ :\n Equalizer.forkMap (P' ⋙ coyoneda.obj X) R ≫ Equalizer.Presieve.firstMap (P' ⋙ coyoneda.obj X) R =\n Equalizer.forkMap (P' ⋙ coyoneda.obj X) R ≫ Equalizer.Presieve.secondMap (P' ⋙ coyoneda.obj X) R)))\n⊢ IsLimit\n ((coyoneda.obj X).mapCone\n (Fork.ofι (forkMap R P') (_ : forkMap R P' ≫ firstMap R P' = forkMap R P' ≫ secondMap R P')))\n[PROOFSTEP]\nreplace q := Classical.choice q\n[GOAL]\ncase mp.t\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝⁴ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝³ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU✝ : C\nR✝ : Presieve U✝\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝² : HasProducts A\ninst✝¹ : HasProducts A'\ninst✝ : HasPullbacks C\nh : IsSheaf J P'\nU : C\nR : Presieve U\nhR : generate R ∈ GrothendieckTopology.sieves J U\nX : A'ᵒᵖ\nq :\n IsLimit\n (Fork.ofι (Equalizer.forkMap (P' ⋙ coyoneda.obj X) R)\n (_ :\n Equalizer.forkMap (P' ⋙ coyoneda.obj X) R ≫ Equalizer.Presieve.firstMap (P' ⋙ coyoneda.obj X) R =\n Equalizer.forkMap (P' ⋙ coyoneda.obj X) R ≫ Equalizer.Presieve.secondMap (P' ⋙ coyoneda.obj X) R))\n⊢ IsLimit\n ((coyoneda.obj X).mapCone\n (Fork.ofι (forkMap R P') (_ : forkMap R P' ≫ firstMap R P' = forkMap R P' ≫ secondMap R P')))\n[PROOFSTEP]\napply (isSheafForIsSheafFor' _ _ _ _).symm q\n[GOAL]\ncase mpr\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝⁴ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝³ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU : C\nR : Presieve U\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝² : HasProducts A\ninst✝¹ : HasProducts A'\ninst✝ : HasPullbacks C\n⊢ IsSheaf' J P' → IsSheaf J P'\n[PROOFSTEP]\nintro h U X S hS\n[GOAL]\ncase mpr\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝⁴ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝³ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU✝ : C\nR : Presieve U✝\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝² : HasProducts A\ninst✝¹ : HasProducts A'\ninst✝ : HasPullbacks C\nh : IsSheaf' J P'\nU : A'\nX : C\nS : Sieve X\nhS : S ∈ GrothendieckTopology.sieves J X\n⊢ Presieve.IsSheafFor (P' ⋙ coyoneda.obj (op U)) S.arrows\n[PROOFSTEP]\nrw [Equalizer.Presieve.sheaf_condition]\n[GOAL]\ncase mpr\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝⁴ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝³ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU✝ : C\nR : Presieve U✝\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝² : HasProducts A\ninst✝¹ : HasProducts A'\ninst✝ : HasPullbacks C\nh : IsSheaf' J P'\nU : A'\nX : C\nS : Sieve X\nhS : S ∈ GrothendieckTopology.sieves J X\n⊢ Nonempty\n (IsLimit\n (Fork.ofι (Equalizer.forkMap (P' ⋙ coyoneda.obj (op U)) S.arrows)\n (_ :\n Equalizer.forkMap (P' ⋙ coyoneda.obj (op U)) S.arrows ≫\n Equalizer.Presieve.firstMap (P' ⋙ coyoneda.obj (op U)) S.arrows =\n Equalizer.forkMap (P' ⋙ coyoneda.obj (op U)) S.arrows ≫\n Equalizer.Presieve.secondMap (P' ⋙ coyoneda.obj (op U)) S.arrows)))\n[PROOFSTEP]\nrefine' ⟨_⟩\n[GOAL]\ncase mpr\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝⁴ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝³ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU✝ : C\nR : Presieve U✝\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝² : HasProducts A\ninst✝¹ : HasProducts A'\ninst✝ : HasPullbacks C\nh : IsSheaf' J P'\nU : A'\nX : C\nS : Sieve X\nhS : S ∈ GrothendieckTopology.sieves J X\n⊢ IsLimit\n (Fork.ofι (Equalizer.forkMap (P' ⋙ coyoneda.obj (op U)) S.arrows)\n (_ :\n Equalizer.forkMap (P' ⋙ coyoneda.obj (op U)) S.arrows ≫\n Equalizer.Presieve.firstMap (P' ⋙ coyoneda.obj (op U)) S.arrows =\n Equalizer.forkMap (P' ⋙ coyoneda.obj (op U)) S.arrows ≫\n Equalizer.Presieve.secondMap (P' ⋙ coyoneda.obj (op U)) S.arrows))\n[PROOFSTEP]\nrefine' isSheafForIsSheafFor' _ _ _ _ _\n[GOAL]\ncase mpr\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝⁴ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝³ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU✝ : C\nR : Presieve U✝\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝² : HasProducts A\ninst✝¹ : HasProducts A'\ninst✝ : HasPullbacks C\nh : IsSheaf' J P'\nU : A'\nX : C\nS : Sieve X\nhS : S ∈ GrothendieckTopology.sieves J X\n⊢ IsLimit\n ((coyoneda.obj (op U)).mapCone\n (Fork.ofι (forkMap S.arrows P')\n (_ : forkMap S.arrows P' ≫ firstMap S.arrows P' = forkMap S.arrows P' ≫ secondMap S.arrows P')))\n[PROOFSTEP]\nletI := preservesSmallestLimitsOfPreservesLimits (coyoneda.obj (op U))\n[GOAL]\ncase mpr\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝⁴ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝³ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU✝ : C\nR : Presieve U✝\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝² : HasProducts A\ninst✝¹ : HasProducts A'\ninst✝ : HasPullbacks C\nh : IsSheaf' J P'\nU : A'\nX : C\nS : Sieve X\nhS : S ∈ GrothendieckTopology.sieves J X\nthis : PreservesLimitsOfSize.{0, 0, max u₁ v₁, max u₁ v₁, u₂, (max u₁ v₁) + 1} (coyoneda.obj (op U)) :=\n preservesSmallestLimitsOfPreservesLimits (coyoneda.obj (op U))\n⊢ IsLimit\n ((coyoneda.obj (op U)).mapCone\n (Fork.ofι (forkMap S.arrows P')\n (_ : forkMap S.arrows P' ≫ firstMap S.arrows P' = forkMap S.arrows P' ≫ secondMap S.arrows P')))\n[PROOFSTEP]\napply isLimitOfPreserves\n[GOAL]\ncase mpr.t\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝⁴ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝³ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU✝ : C\nR : Presieve U✝\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝² : HasProducts A\ninst✝¹ : HasProducts A'\ninst✝ : HasPullbacks C\nh : IsSheaf' J P'\nU : A'\nX : C\nS : Sieve X\nhS : S ∈ GrothendieckTopology.sieves J X\nthis : PreservesLimitsOfSize.{0, 0, max u₁ v₁, max u₁ v₁, u₂, (max u₁ v₁) + 1} (coyoneda.obj (op U)) :=\n preservesSmallestLimitsOfPreservesLimits (coyoneda.obj (op U))\n⊢ IsLimit\n (Fork.ofι (forkMap S.arrows P')\n (_ : forkMap S.arrows P' ≫ firstMap S.arrows P' = forkMap S.arrows P' ≫ secondMap S.arrows P'))\n[PROOFSTEP]\napply Classical.choice (h _ S.arrows _)\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝⁴ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝³ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU✝ : C\nR : Presieve U✝\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝² : HasProducts A\ninst✝¹ : HasProducts A'\ninst✝ : HasPullbacks C\nh : IsSheaf' J P'\nU : A'\nX : C\nS : Sieve X\nhS : S ∈ GrothendieckTopology.sieves J X\nthis : PreservesLimitsOfSize.{0, 0, max u₁ v₁, max u₁ v₁, u₂, (max u₁ v₁) + 1} (coyoneda.obj (op U)) :=\n preservesSmallestLimitsOfPreservesLimits (coyoneda.obj (op U))\n⊢ generate S.arrows ∈ GrothendieckTopology.sieves J X\n[PROOFSTEP]\nsimpa\n[GOAL]\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝⁵ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝⁴ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU : C\nR : Presieve U\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝³ : HasPullbacks C\ns : A' ⥤ Type (max v₁ u₁)\ninst✝² : HasLimits A'\ninst✝¹ : PreservesLimits s\ninst✝ : ReflectsIsomorphisms s\n⊢ IsSheaf J P' ↔ IsSheaf J (P' ⋙ s)\n[PROOFSTEP]\nrw [isSheaf_iff_isSheaf', isSheaf_iff_isSheaf']\n[GOAL]\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝⁵ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝⁴ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU : C\nR : Presieve U\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝³ : HasPullbacks C\ns : A' ⥤ Type (max v₁ u₁)\ninst✝² : HasLimits A'\ninst✝¹ : PreservesLimits s\ninst✝ : ReflectsIsomorphisms s\n⊢ IsSheaf' J P' ↔ IsSheaf' J (P' ⋙ s)\n[PROOFSTEP]\nrefine' forall_congr' (fun U => ball_congr (fun R _ => _))\n[GOAL]\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝⁵ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝⁴ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU✝ : C\nR✝ : Presieve U✝\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝³ : HasPullbacks C\ns : A' ⥤ Type (max v₁ u₁)\ninst✝² : HasLimits A'\ninst✝¹ : PreservesLimits s\ninst✝ : ReflectsIsomorphisms s\nU : C\nR : Presieve U\nx✝ : generate R ∈ GrothendieckTopology.sieves J U\n⊢ Nonempty (IsLimit (Fork.ofι (forkMap R P') (_ : forkMap R P' ≫ firstMap R P' = forkMap R P' ≫ secondMap R P'))) ↔\n Nonempty\n (IsLimit\n (Fork.ofι (forkMap R (P' ⋙ s))\n (_ : forkMap R (P' ⋙ s) ≫ firstMap R (P' ⋙ s) = forkMap R (P' ⋙ s) ≫ secondMap R (P' ⋙ s))))\n[PROOFSTEP]\nletI : ReflectsLimits s := reflectsLimitsOfReflectsIsomorphisms\n[GOAL]\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝⁵ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝⁴ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU✝ : C\nR✝ : Presieve U✝\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝³ : HasPullbacks C\ns : A' ⥤ Type (max v₁ u₁)\ninst✝² : HasLimits A'\ninst✝¹ : PreservesLimits s\ninst✝ : ReflectsIsomorphisms s\nU : C\nR : Presieve U\nx✝ : generate R ∈ GrothendieckTopology.sieves J U\nthis : ReflectsLimits s := reflectsLimitsOfReflectsIsomorphisms\n⊢ Nonempty (IsLimit (Fork.ofι (forkMap R P') (_ : forkMap R P' ≫ firstMap R P' = forkMap R P' ≫ secondMap R P'))) ↔\n Nonempty\n (IsLimit\n (Fork.ofι (forkMap R (P' ⋙ s))\n (_ : forkMap R (P' ⋙ s) ≫ firstMap R (P' ⋙ s) = forkMap R (P' ⋙ s) ≫ secondMap R (P' ⋙ s))))\n[PROOFSTEP]\nhave : IsLimit (s.mapCone (Fork.ofι _ (w R P'))) ≃ IsLimit (Fork.ofι _ (w R (P' ⋙ s))) := isSheafForIsSheafFor' P' s U R\n[GOAL]\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝⁵ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝⁴ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU✝ : C\nR✝ : Presieve U✝\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝³ : HasPullbacks C\ns : A' ⥤ Type (max v₁ u₁)\ninst✝² : HasLimits A'\ninst✝¹ : PreservesLimits s\ninst✝ : ReflectsIsomorphisms s\nU : C\nR : Presieve U\nx✝ : generate R ∈ GrothendieckTopology.sieves J U\nthis✝ : ReflectsLimits s := reflectsLimitsOfReflectsIsomorphisms\nthis :\n IsLimit (s.mapCone (Fork.ofι (forkMap R P') (_ : forkMap R P' ≫ firstMap R P' = forkMap R P' ≫ secondMap R P'))) ≃\n IsLimit\n (Fork.ofι (forkMap R (P' ⋙ s))\n (_ : forkMap R (P' ⋙ s) ≫ firstMap R (P' ⋙ s) = forkMap R (P' ⋙ s) ≫ secondMap R (P' ⋙ s)))\n⊢ Nonempty (IsLimit (Fork.ofι (forkMap R P') (_ : forkMap R P' ≫ firstMap R P' = forkMap R P' ≫ secondMap R P'))) ↔\n Nonempty\n (IsLimit\n (Fork.ofι (forkMap R (P' ⋙ s))\n (_ : forkMap R (P' ⋙ s) ≫ firstMap R (P' ⋙ s) = forkMap R (P' ⋙ s) ≫ secondMap R (P' ⋙ s))))\n[PROOFSTEP]\nrw [← Equiv.nonempty_congr this]\n[GOAL]\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝⁵ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝⁴ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU✝ : C\nR✝ : Presieve U✝\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝³ : HasPullbacks C\ns : A' ⥤ Type (max v₁ u₁)\ninst✝² : HasLimits A'\ninst✝¹ : PreservesLimits s\ninst✝ : ReflectsIsomorphisms s\nU : C\nR : Presieve U\nx✝ : generate R ∈ GrothendieckTopology.sieves J U\nthis✝ : ReflectsLimits s := reflectsLimitsOfReflectsIsomorphisms\nthis :\n IsLimit (s.mapCone (Fork.ofι (forkMap R P') (_ : forkMap R P' ≫ firstMap R P' = forkMap R P' ≫ secondMap R P'))) ≃\n IsLimit\n (Fork.ofι (forkMap R (P' ⋙ s))\n (_ : forkMap R (P' ⋙ s) ≫ firstMap R (P' ⋙ s) = forkMap R (P' ⋙ s) ≫ secondMap R (P' ⋙ s)))\n⊢ Nonempty (IsLimit (Fork.ofι (forkMap R P') (_ : forkMap R P' ≫ firstMap R P' = forkMap R P' ≫ secondMap R P'))) ↔\n Nonempty\n (IsLimit (s.mapCone (Fork.ofι (forkMap R P') (_ : forkMap R P' ≫ firstMap R P' = forkMap R P' ≫ secondMap R P'))))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝⁵ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝⁴ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU✝ : C\nR✝ : Presieve U✝\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝³ : HasPullbacks C\ns : A' ⥤ Type (max v₁ u₁)\ninst✝² : HasLimits A'\ninst✝¹ : PreservesLimits s\ninst✝ : ReflectsIsomorphisms s\nU : C\nR : Presieve U\nx✝ : generate R ∈ GrothendieckTopology.sieves J U\nthis✝ : ReflectsLimits s := reflectsLimitsOfReflectsIsomorphisms\nthis :\n IsLimit (s.mapCone (Fork.ofι (forkMap R P') (_ : forkMap R P' ≫ firstMap R P' = forkMap R P' ≫ secondMap R P'))) ≃\n IsLimit\n (Fork.ofι (forkMap R (P' ⋙ s))\n (_ : forkMap R (P' ⋙ s) ≫ firstMap R (P' ⋙ s) = forkMap R (P' ⋙ s) ≫ secondMap R (P' ⋙ s)))\n⊢ Nonempty (IsLimit (Fork.ofι (forkMap R P') (_ : forkMap R P' ≫ firstMap R P' = forkMap R P' ≫ secondMap R P'))) →\n Nonempty\n (IsLimit (s.mapCone (Fork.ofι (forkMap R P') (_ : forkMap R P' ≫ firstMap R P' = forkMap R P' ≫ secondMap R P'))))\n[PROOFSTEP]\nhaveI := preservesSmallestLimitsOfPreservesLimits s\n[GOAL]\ncase mp\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝⁵ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝⁴ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU✝ : C\nR✝ : Presieve U✝\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝³ : HasPullbacks C\ns : A' ⥤ Type (max v₁ u₁)\ninst✝² : HasLimits A'\ninst✝¹ : PreservesLimits s\ninst✝ : ReflectsIsomorphisms s\nU : C\nR : Presieve U\nx✝ : generate R ∈ GrothendieckTopology.sieves J U\nthis✝¹ : ReflectsLimits s := reflectsLimitsOfReflectsIsomorphisms\nthis✝ :\n IsLimit (s.mapCone (Fork.ofι (forkMap R P') (_ : forkMap R P' ≫ firstMap R P' = forkMap R P' ≫ secondMap R P'))) ≃\n IsLimit\n (Fork.ofι (forkMap R (P' ⋙ s))\n (_ : forkMap R (P' ⋙ s) ≫ firstMap R (P' ⋙ s) = forkMap R (P' ⋙ s) ≫ secondMap R (P' ⋙ s)))\nthis : PreservesLimitsOfSize.{0, 0, max u₁ v₁, max u₁ v₁, u₂, max (u₁ + 1) (v₁ + 1)} s\n⊢ Nonempty (IsLimit (Fork.ofι (forkMap R P') (_ : forkMap R P' ≫ firstMap R P' = forkMap R P' ≫ secondMap R P'))) →\n Nonempty\n (IsLimit (s.mapCone (Fork.ofι (forkMap R P') (_ : forkMap R P' ≫ firstMap R P' = forkMap R P' ≫ secondMap R P'))))\n[PROOFSTEP]\nexact Nonempty.map fun t => isLimitOfPreserves s t\n[GOAL]\ncase mpr\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝⁵ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝⁴ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU✝ : C\nR✝ : Presieve U✝\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝³ : HasPullbacks C\ns : A' ⥤ Type (max v₁ u₁)\ninst✝² : HasLimits A'\ninst✝¹ : PreservesLimits s\ninst✝ : ReflectsIsomorphisms s\nU : C\nR : Presieve U\nx✝ : generate R ∈ GrothendieckTopology.sieves J U\nthis✝ : ReflectsLimits s := reflectsLimitsOfReflectsIsomorphisms\nthis :\n IsLimit (s.mapCone (Fork.ofι (forkMap R P') (_ : forkMap R P' ≫ firstMap R P' = forkMap R P' ≫ secondMap R P'))) ≃\n IsLimit\n (Fork.ofι (forkMap R (P' ⋙ s))\n (_ : forkMap R (P' ⋙ s) ≫ firstMap R (P' ⋙ s) = forkMap R (P' ⋙ s) ≫ secondMap R (P' ⋙ s)))\n⊢ Nonempty\n (IsLimit\n (s.mapCone (Fork.ofι (forkMap R P') (_ : forkMap R P' ≫ firstMap R P' = forkMap R P' ≫ secondMap R P')))) →\n Nonempty (IsLimit (Fork.ofι (forkMap R P') (_ : forkMap R P' ≫ firstMap R P' = forkMap R P' ≫ secondMap R P')))\n[PROOFSTEP]\nhaveI := reflectsSmallestLimitsOfReflectsLimits s\n[GOAL]\ncase mpr\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nA : Type u₂\ninst✝⁵ : Category.{v₂, u₂} A\nA' : Type u₂\ninst✝⁴ : Category.{max v₁ u₁, u₂} A'\nJ : GrothendieckTopology C\nU✝ : C\nR✝ : Presieve U✝\nP : Cᵒᵖ ⥤ A\nP' : Cᵒᵖ ⥤ A'\ninst✝³ : HasPullbacks C\ns : A' ⥤ Type (max v₁ u₁)\ninst✝² : HasLimits A'\ninst✝¹ : PreservesLimits s\ninst✝ : ReflectsIsomorphisms s\nU : C\nR : Presieve U\nx✝ : generate R ∈ GrothendieckTopology.sieves J U\nthis✝¹ : ReflectsLimits s := reflectsLimitsOfReflectsIsomorphisms\nthis✝ :\n IsLimit (s.mapCone (Fork.ofι (forkMap R P') (_ : forkMap R P' ≫ firstMap R P' = forkMap R P' ≫ secondMap R P'))) ≃\n IsLimit\n (Fork.ofι (forkMap R (P' ⋙ s))\n (_ : forkMap R (P' ⋙ s) ≫ firstMap R (P' ⋙ s) = forkMap R (P' ⋙ s) ≫ secondMap R (P' ⋙ s)))\nthis : ReflectsLimitsOfSize.{0, 0, max u₁ v₁, max u₁ v₁, u₂, max (u₁ + 1) (v₁ + 1)} s\n⊢ Nonempty\n (IsLimit\n (s.mapCone (Fork.ofι (forkMap R P') (_ : forkMap R P' ≫ firstMap R P' = forkMap R P' ≫ secondMap R P')))) →\n Nonempty (IsLimit (Fork.ofι (forkMap R P') (_ : forkMap R P' ≫ firstMap R P' = forkMap R P' ≫ secondMap R P')))\n[PROOFSTEP]\nexact Nonempty.map fun t => isLimitOfReflects s t\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Sites.Sheaf", "llama_tokens": 69130, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO", "lm_q1_score": 0.45713671682749474, "lm_q2_score": 0.02064593051324596, "lm_q1q2_score": 0.009438012890673851}} {"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\no : Part α\ninst✝ : Decidable o.Dom\nx : α\n⊢ x ∈ toFinset o ↔ x ∈ o\n[PROOFSTEP]\nsimp [toFinset]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : Decidable none.Dom\n⊢ toFinset none = ∅\n[PROOFSTEP]\nsimp [toFinset]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na : α\ninst✝ : Decidable (some a).Dom\n⊢ toFinset (some a) = {a}\n[PROOFSTEP]\nsimp [toFinset]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : DecidableEq β\nf g : α →. β\ninst✝¹ : (x : α) → Decidable (f x).Dom\ninst✝ : (x : α) → Decidable (g x).Dom\ns t : Finset α\nb : β\n⊢ b ∈ pimage f s ↔ ∃ a, a ∈ s ∧ b ∈ f a\n[PROOFSTEP]\nsimp [pimage]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : DecidableEq β\nf✝ g : α →. β\ninst✝² : (x : α) → Decidable (f✝ x).Dom\ninst✝¹ : (x : α) → Decidable (g x).Dom\ns✝ t : Finset α\nb : β\ns : Finset α\nf : α → β\ninst✝ : (x : α) → Decidable (Part.some (f x)).Dom\n⊢ pimage (fun x => Part.some (f x)) s = image f s\n[PROOFSTEP]\next\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\ninst✝³ : DecidableEq β\nf✝ g : α →. β\ninst✝² : (x : α) → Decidable (f✝ x).Dom\ninst✝¹ : (x : α) → Decidable (g x).Dom\ns✝ t : Finset α\nb : β\ns : Finset α\nf : α → β\ninst✝ : (x : α) → Decidable (Part.some (f x)).Dom\na✝ : β\n⊢ a✝ ∈ pimage (fun x => Part.some (f x)) s ↔ a✝ ∈ image f s\n[PROOFSTEP]\nsimp [eq_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : DecidableEq β\nf g : α →. β\ninst✝¹ : (x : α) → Decidable (f x).Dom\ninst✝ : (x : α) → Decidable (g x).Dom\ns t : Finset α\nb : β\nh₁ : s = t\nh₂ : ∀ (x : α), x ∈ t → f x = g x\n⊢ pimage f s = pimage g t\n[PROOFSTEP]\nsubst s\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : DecidableEq β\nf g : α →. β\ninst✝¹ : (x : α) → Decidable (f x).Dom\ninst✝ : (x : α) → Decidable (g x).Dom\nt : Finset α\nb : β\nh₂ : ∀ (x : α), x ∈ t → f x = g x\n⊢ pimage f t = pimage g t\n[PROOFSTEP]\next y\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\ninst✝² : DecidableEq β\nf g : α →. β\ninst✝¹ : (x : α) → Decidable (f x).Dom\ninst✝ : (x : α) → Decidable (g x).Dom\nt : Finset α\nb : β\nh₂ : ∀ (x : α), x ∈ t → f x = g x\ny : β\n⊢ y ∈ pimage f t ↔ y ∈ pimage g t\n[PROOFSTEP]\nsimp (config := { contextual := true }) only [mem_pimage, ← exists_prop, h₂]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : DecidableEq β\nf g : α →. β\ninst✝¹ : (x : α) → Decidable (f x).Dom\ninst✝ : (x : α) → Decidable (g x).Dom\ns t : Finset α\nb : β\n⊢ pimage f s = image (fun x => Part.get (f ↑x) (_ : (f ↑x).Dom)) (attach (filter (fun x => (f x).Dom) s))\n[PROOFSTEP]\next x\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\ninst✝² : DecidableEq β\nf g : α →. β\ninst✝¹ : (x : α) → Decidable (f x).Dom\ninst✝ : (x : α) → Decidable (g x).Dom\ns t : Finset α\nb x : β\n⊢ x ∈ pimage f s ↔ x ∈ image (fun x => Part.get (f ↑x) (_ : (f ↑x).Dom)) (attach (filter (fun x => (f x).Dom) s))\n[PROOFSTEP]\nsimp [Part.mem_eq, And.exists]\n -- Porting note: `←exists_prop` required because `∃ x ∈ s, p x` is defined differently\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\ninst✝² : DecidableEq β\nf g : α →. β\ninst✝¹ : (x : α) → Decidable (f x).Dom\ninst✝ : (x : α) → Decidable (g x).Dom\ns t : Finset α\nb x : β\n⊢ (∃ a, a ∈ s ∧ ∃ h, Part.get (f a) h = x) ↔\n ∃ a hp hq, Part.get (f a) (_ : (f ↑{ val := a, property := (_ : a ∈ filter (fun x => (f x).Dom) s) }).Dom) = x\n[PROOFSTEP]\nsimp only [← exists_prop]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : DecidableEq β\nf g : α →. β\ninst✝² : (x : α) → Decidable (f x).Dom\ninst✝¹ : (x : α) → Decidable (g x).Dom\ns t : Finset α\nb : β\ninst✝ : DecidableEq α\n⊢ ↑(pimage f (s ∪ t)) = ↑(pimage f s ∪ pimage f t)\n[PROOFSTEP]\nsimp only [coe_pimage, coe_union, ← PFun.image_union]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : DecidableEq β\nf g : α →. β\ninst✝¹ : (x : α) → Decidable (f x).Dom\ninst✝ : (x : α) → Decidable (g x).Dom\ns t : Finset α\nb : β\n⊢ pimage f ∅ = ∅\n[PROOFSTEP]\next\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\ninst✝² : DecidableEq β\nf g : α →. β\ninst✝¹ : (x : α) → Decidable (f x).Dom\ninst✝ : (x : α) → Decidable (g x).Dom\ns t : Finset α\nb a✝ : β\n⊢ a✝ ∈ pimage f ∅ ↔ a✝ ∈ ∅\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : DecidableEq β\nf g : α →. β\ninst✝¹ : (x : α) → Decidable (f x).Dom\ninst✝ : (x : α) → Decidable (g x).Dom\ns t✝ : Finset α\nb : β\nt : Finset β\n⊢ pimage f s ⊆ t ↔ ∀ (x : α), x ∈ s → ∀ (y : β), y ∈ f x → y ∈ t\n[PROOFSTEP]\nsimp [subset_iff, @forall_swap _ β]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : DecidableEq β\nf g : α →. β\ninst✝² : (x : α) → Decidable (f x).Dom\ninst✝¹ : (x : α) → Decidable (g x).Dom\ns t : Finset α\nb : β\ninst✝ : DecidableEq α\n⊢ pimage f (s ∩ t) ⊆ pimage f s ∩ pimage f t\n[PROOFSTEP]\nsimp only [← coe_subset, coe_pimage, coe_inter, PFun.image_inter]\n", "meta": {"mathlib_filename": "Mathlib.Data.Finset.PImage", "llama_tokens": 2430, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO", "lm_q1_score": 0.43014733397551624, "lm_q2_score": 0.021615334614044697, "lm_q1q2_score": 0.009297778557220021}} {"text": "[GOAL]\nR : Type u\nM : Type v\ninst✝² : Ring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\n⊢ ⊥ = span R {0}\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nM : Type v\ninst✝³ : Ring R\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\nK : Type u\ninst✝ : DivisionRing K\nS : Ideal K\n⊢ IsPrincipal S\n[PROOFSTEP]\nrcases Ideal.eq_bot_or_top S with (rfl | rfl)\n[GOAL]\ncase inl\nR : Type u\nM : Type v\ninst✝³ : Ring R\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\nK : Type u\ninst✝ : DivisionRing K\n⊢ IsPrincipal ⊥\ncase inr\nR : Type u\nM : Type v\ninst✝³ : Ring R\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\nK : Type u\ninst✝ : DivisionRing K\n⊢ IsPrincipal ⊤\n[PROOFSTEP]\napply bot_isPrincipal\n[GOAL]\ncase inr\nR : Type u\nM : Type v\ninst✝³ : Ring R\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\nK : Type u\ninst✝ : DivisionRing K\n⊢ IsPrincipal ⊤\n[PROOFSTEP]\napply top_isPrincipal\n[GOAL]\nR : Type u\nM : Type v\ninst✝³ : AddCommGroup M\ninst✝² : Ring R\ninst✝¹ : Module R M\nS : Submodule R M\ninst✝ : IsPrincipal S\n⊢ generator S ∈ S\n[PROOFSTEP]\nconv_rhs => rw [← span_singleton_generator S]\n[GOAL]\nR : Type u\nM : Type v\ninst✝³ : AddCommGroup M\ninst✝² : Ring R\ninst✝¹ : Module R M\nS : Submodule R M\ninst✝ : IsPrincipal S\n| S\n[PROOFSTEP]\nrw [← span_singleton_generator S]\n[GOAL]\nR : Type u\nM : Type v\ninst✝³ : AddCommGroup M\ninst✝² : Ring R\ninst✝¹ : Module R M\nS : Submodule R M\ninst✝ : IsPrincipal S\n| S\n[PROOFSTEP]\nrw [← span_singleton_generator S]\n[GOAL]\nR : Type u\nM : Type v\ninst✝³ : AddCommGroup M\ninst✝² : Ring R\ninst✝¹ : Module R M\nS : Submodule R M\ninst✝ : IsPrincipal S\n| S\n[PROOFSTEP]\nrw [← span_singleton_generator S]\n[GOAL]\nR : Type u\nM : Type v\ninst✝³ : AddCommGroup M\ninst✝² : Ring R\ninst✝¹ : Module R M\nS : Submodule R M\ninst✝ : IsPrincipal S\n⊢ generator S ∈ span R {generator S}\n[PROOFSTEP]\nexact subset_span (mem_singleton _)\n[GOAL]\nR : Type u\nM : Type v\ninst✝³ : AddCommGroup M\ninst✝² : Ring R\ninst✝¹ : Module R M\nS : Submodule R M\ninst✝ : IsPrincipal S\nx : M\n⊢ x ∈ S ↔ ∃ s, x = s • generator S\n[PROOFSTEP]\nsimp_rw [@eq_comm _ x, ← mem_span_singleton, span_singleton_generator]\n[GOAL]\nR : Type u\nM : Type v\ninst✝³ : AddCommGroup M\ninst✝² : Ring R\ninst✝¹ : Module R M\nS : Submodule R M\ninst✝ : IsPrincipal S\n⊢ S = ⊥ ↔ generator S = 0\n[PROOFSTEP]\nrw [← @span_singleton_eq_bot R M, span_singleton_generator]\n[GOAL]\nR : Type u\nM : Type v\ninst✝³ : AddCommGroup M\ninst✝² : CommRing R\ninst✝¹ : Module R M\nS : Ideal R\ninst✝ : IsPrincipal S\nx a : R\n⊢ x = a • generator S ↔ x = generator S * a\n[PROOFSTEP]\nsimp only [mul_comm, smul_eq_mul]\n[GOAL]\nR : Type u\nM : Type v\ninst✝³ : AddCommGroup M\ninst✝² : CommRing R\ninst✝¹ : Module R M\nS : Ideal R\ninst✝ : IsPrincipal S\nis_prime : Ideal.IsPrime S\nne_bot : S ≠ ⊥\nx✝¹ x✝ : R\n⊢ generator S ∣ x✝¹ * x✝ → generator S ∣ x✝¹ ∨ generator S ∣ x✝\n[PROOFSTEP]\nsimpa only [← mem_iff_generator_dvd S] using is_prime.2\n[GOAL]\nR : Type u\nM : Type v\ninst✝³ : AddCommGroup M\ninst✝² : CommRing R\ninst✝¹ : Module R M\nN : Submodule R M\nϕ : M →ₗ[R] R\ninst✝ : IsPrincipal (map ϕ N)\nx : M\nhx : x ∈ N\n⊢ generator (map ϕ N) ∣ ↑ϕ x\n[PROOFSTEP]\nrw [← mem_iff_generator_dvd, Submodule.mem_map]\n[GOAL]\nR : Type u\nM : Type v\ninst✝³ : AddCommGroup M\ninst✝² : CommRing R\ninst✝¹ : Module R M\nN : Submodule R M\nϕ : M →ₗ[R] R\ninst✝ : IsPrincipal (map ϕ N)\nx : M\nhx : x ∈ N\n⊢ ∃ y, y ∈ N ∧ ↑ϕ y = ↑ϕ x\n[PROOFSTEP]\nexact ⟨x, hx, rfl⟩\n[GOAL]\nR : Type u\nM : Type v\ninst✝³ : AddCommGroup M\ninst✝² : CommRing R\ninst✝¹ : Module R M\nN O : Submodule R M\nhNO : N ≤ O\nϕ : { x // x ∈ O } →ₗ[R] R\ninst✝ : IsPrincipal (LinearMap.submoduleImage ϕ N)\nx : M\nhx : x ∈ N\n⊢ generator (LinearMap.submoduleImage ϕ N) ∣ ↑ϕ { val := x, property := (_ : x ∈ O) }\n[PROOFSTEP]\nrw [← mem_iff_generator_dvd, LinearMap.mem_submoduleImage_of_le hNO]\n[GOAL]\nR : Type u\nM : Type v\ninst✝³ : AddCommGroup M\ninst✝² : CommRing R\ninst✝¹ : Module R M\nN O : Submodule R M\nhNO : N ≤ O\nϕ : { x // x ∈ O } →ₗ[R] R\ninst✝ : IsPrincipal (LinearMap.submoduleImage ϕ N)\nx : M\nhx : x ∈ N\n⊢ ∃ y yN, ↑ϕ { val := y, property := (_ : y ∈ O) } = ↑ϕ { val := x, property := (_ : x ∈ O) }\n[PROOFSTEP]\nexact ⟨x, hx, rfl⟩\n[GOAL]\nR : Type u\nM : Type v\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : IsPrincipalIdealRing R\nS : Ideal R\nhpi : IsPrime S\nhS : S ≠ ⊥\n⊢ ∀ (J : Ideal R) (x : R), S ≤ J → ¬x ∈ S → x ∈ J → 1 ∈ J\n[PROOFSTEP]\nintro T x hST hxS hxT\n[GOAL]\nR : Type u\nM : Type v\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : IsPrincipalIdealRing R\nS : Ideal R\nhpi : IsPrime S\nhS : S ≠ ⊥\nT : Ideal R\nx : R\nhST : S ≤ T\nhxS : ¬x ∈ S\nhxT : x ∈ T\n⊢ 1 ∈ T\n[PROOFSTEP]\ncases' (mem_iff_generator_dvd _).1 (hST <| generator_mem S) with z hz\n[GOAL]\ncase intro\nR : Type u\nM : Type v\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : IsPrincipalIdealRing R\nS : Ideal R\nhpi : IsPrime S\nhS : S ≠ ⊥\nT : Ideal R\nx : R\nhST : S ≤ T\nhxS : ¬x ∈ S\nhxT : x ∈ T\nz : R\nhz : generator S = generator T * z\n⊢ 1 ∈ T\n[PROOFSTEP]\ncases hpi.mem_or_mem (show generator T * z ∈ S from hz ▸ generator_mem S)\n[GOAL]\ncase intro.inl\nR : Type u\nM : Type v\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : IsPrincipalIdealRing R\nS : Ideal R\nhpi : IsPrime S\nhS : S ≠ ⊥\nT : Ideal R\nx : R\nhST : S ≤ T\nhxS : ¬x ∈ S\nhxT : x ∈ T\nz : R\nhz : generator S = generator T * z\nh✝ : generator T ∈ S\n⊢ 1 ∈ T\ncase intro.inr\nR : Type u\nM : Type v\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : IsPrincipalIdealRing R\nS : Ideal R\nhpi : IsPrime S\nhS : S ≠ ⊥\nT : Ideal R\nx : R\nhST : S ≤ T\nhxS : ¬x ∈ S\nhxT : x ∈ T\nz : R\nhz : generator S = generator T * z\nh✝ : z ∈ S\n⊢ 1 ∈ T\n[PROOFSTEP]\ncase inl h =>\n have hTS : T ≤ S\n rwa [← T.span_singleton_generator, Ideal.span_le, singleton_subset_iff]\n exact (hxS <| hTS hxT).elim\n[GOAL]\nR : Type u\nM : Type v\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : IsPrincipalIdealRing R\nS : Ideal R\nhpi : IsPrime S\nhS : S ≠ ⊥\nT : Ideal R\nx : R\nhST : S ≤ T\nhxS : ¬x ∈ S\nhxT : x ∈ T\nz : R\nhz : generator S = generator T * z\nh : generator T ∈ S\n⊢ 1 ∈ T\n[PROOFSTEP]\ncase inl h =>\n have hTS : T ≤ S\n rwa [← T.span_singleton_generator, Ideal.span_le, singleton_subset_iff]\n exact (hxS <| hTS hxT).elim\n[GOAL]\nR : Type u\nM : Type v\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : IsPrincipalIdealRing R\nS : Ideal R\nhpi : IsPrime S\nhS : S ≠ ⊥\nT : Ideal R\nx : R\nhST : S ≤ T\nhxS : ¬x ∈ S\nhxT : x ∈ T\nz : R\nhz : generator S = generator T * z\nh : generator T ∈ S\n⊢ 1 ∈ T\n[PROOFSTEP]\nhave hTS : T ≤ S\n[GOAL]\ncase hTS\nR : Type u\nM : Type v\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : IsPrincipalIdealRing R\nS : Ideal R\nhpi : IsPrime S\nhS : S ≠ ⊥\nT : Ideal R\nx : R\nhST : S ≤ T\nhxS : ¬x ∈ S\nhxT : x ∈ T\nz : R\nhz : generator S = generator T * z\nh : generator T ∈ S\n⊢ T ≤ S\nR : Type u\nM : Type v\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : IsPrincipalIdealRing R\nS : Ideal R\nhpi : IsPrime S\nhS : S ≠ ⊥\nT : Ideal R\nx : R\nhST : S ≤ T\nhxS : ¬x ∈ S\nhxT : x ∈ T\nz : R\nhz : generator S = generator T * z\nh : generator T ∈ S\nhTS : T ≤ S\n⊢ 1 ∈ T\n[PROOFSTEP]\nrwa [← T.span_singleton_generator, Ideal.span_le, singleton_subset_iff]\n[GOAL]\nR : Type u\nM : Type v\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : IsPrincipalIdealRing R\nS : Ideal R\nhpi : IsPrime S\nhS : S ≠ ⊥\nT : Ideal R\nx : R\nhST : S ≤ T\nhxS : ¬x ∈ S\nhxT : x ∈ T\nz : R\nhz : generator S = generator T * z\nh : generator T ∈ S\nhTS : T ≤ S\n⊢ 1 ∈ T\n[PROOFSTEP]\nexact (hxS <| hTS hxT).elim\n[GOAL]\ncase intro.inr\nR : Type u\nM : Type v\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : IsPrincipalIdealRing R\nS : Ideal R\nhpi : IsPrime S\nhS : S ≠ ⊥\nT : Ideal R\nx : R\nhST : S ≤ T\nhxS : ¬x ∈ S\nhxT : x ∈ T\nz : R\nhz : generator S = generator T * z\nh✝ : z ∈ S\n⊢ 1 ∈ T\n[PROOFSTEP]\ncase inr h =>\n cases' (mem_iff_generator_dvd _).1 h with y hy\n have : generator S ≠ 0 := mt (eq_bot_iff_generator_eq_zero _).2 hS\n rw [← mul_one (generator S), hy, mul_left_comm, mul_right_inj' this] at hz \n exact hz.symm ▸ T.mul_mem_right _ (generator_mem T)\n[GOAL]\nR : Type u\nM : Type v\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : IsPrincipalIdealRing R\nS : Ideal R\nhpi : IsPrime S\nhS : S ≠ ⊥\nT : Ideal R\nx : R\nhST : S ≤ T\nhxS : ¬x ∈ S\nhxT : x ∈ T\nz : R\nhz : generator S = generator T * z\nh : z ∈ S\n⊢ 1 ∈ T\n[PROOFSTEP]\ncase inr h =>\n cases' (mem_iff_generator_dvd _).1 h with y hy\n have : generator S ≠ 0 := mt (eq_bot_iff_generator_eq_zero _).2 hS\n rw [← mul_one (generator S), hy, mul_left_comm, mul_right_inj' this] at hz \n exact hz.symm ▸ T.mul_mem_right _ (generator_mem T)\n[GOAL]\nR : Type u\nM : Type v\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : IsPrincipalIdealRing R\nS : Ideal R\nhpi : IsPrime S\nhS : S ≠ ⊥\nT : Ideal R\nx : R\nhST : S ≤ T\nhxS : ¬x ∈ S\nhxT : x ∈ T\nz : R\nhz : generator S = generator T * z\nh : z ∈ S\n⊢ 1 ∈ T\n[PROOFSTEP]\ncases' (mem_iff_generator_dvd _).1 h with y hy\n[GOAL]\ncase intro\nR : Type u\nM : Type v\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : IsPrincipalIdealRing R\nS : Ideal R\nhpi : IsPrime S\nhS : S ≠ ⊥\nT : Ideal R\nx : R\nhST : S ≤ T\nhxS : ¬x ∈ S\nhxT : x ∈ T\nz : R\nhz : generator S = generator T * z\nh : z ∈ S\ny : R\nhy : z = generator S * y\n⊢ 1 ∈ T\n[PROOFSTEP]\nhave : generator S ≠ 0 := mt (eq_bot_iff_generator_eq_zero _).2 hS\n[GOAL]\ncase intro\nR : Type u\nM : Type v\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : IsPrincipalIdealRing R\nS : Ideal R\nhpi : IsPrime S\nhS : S ≠ ⊥\nT : Ideal R\nx : R\nhST : S ≤ T\nhxS : ¬x ∈ S\nhxT : x ∈ T\nz : R\nhz : generator S = generator T * z\nh : z ∈ S\ny : R\nhy : z = generator S * y\nthis : generator S ≠ 0\n⊢ 1 ∈ T\n[PROOFSTEP]\nrw [← mul_one (generator S), hy, mul_left_comm, mul_right_inj' this] at hz \n[GOAL]\ncase intro\nR : Type u\nM : Type v\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : IsPrincipalIdealRing R\nS : Ideal R\nhpi : IsPrime S\nhS : S ≠ ⊥\nT : Ideal R\nx : R\nhST : S ≤ T\nhxS : ¬x ∈ S\nhxT : x ∈ T\nz : R\nh : z ∈ S\ny : R\nhz : 1 = generator T * y\nhy : z = generator S * y\nthis : generator S ≠ 0\n⊢ 1 ∈ T\n[PROOFSTEP]\nexact hz.symm ▸ T.mul_mem_right _ (generator_mem T)\n[GOAL]\nR : Type u\nM : Type v\ninst✝ : EuclideanDomain R\nS : Ideal R\nh : Set.Nonempty {x | x ∈ S ∧ x ≠ 0}\nwf : WellFounded EuclideanDomain.r\nhmin : WellFounded.min wf {x | x ∈ S ∧ x ≠ 0} h ∈ S ∧ WellFounded.min wf {x | x ∈ S ∧ x ≠ 0} h ≠ 0\nx : R\nhx : x ∈ S\n⊢ WellFounded.min wf {x | x ∈ S ∧ x ≠ 0} h ∣ x % WellFounded.min wf {x | x ∈ S ∧ x ≠ 0} h\n[PROOFSTEP]\nhave : x % WellFounded.min wf {x : R | x ∈ S ∧ x ≠ 0} h ∉ {x : R | x ∈ S ∧ x ≠ 0} := fun h₁ =>\n WellFounded.not_lt_min wf _ h h₁ (mod_lt x hmin.2)\n[GOAL]\nR : Type u\nM : Type v\ninst✝ : EuclideanDomain R\nS : Ideal R\nh : Set.Nonempty {x | x ∈ S ∧ x ≠ 0}\nwf : WellFounded EuclideanDomain.r\nhmin : WellFounded.min wf {x | x ∈ S ∧ x ≠ 0} h ∈ S ∧ WellFounded.min wf {x | x ∈ S ∧ x ≠ 0} h ≠ 0\nx : R\nhx : x ∈ S\nthis : ¬x % WellFounded.min wf {x | x ∈ S ∧ x ≠ 0} h ∈ {x | x ∈ S ∧ x ≠ 0}\n⊢ WellFounded.min wf {x | x ∈ S ∧ x ≠ 0} h ∣ x % WellFounded.min wf {x | x ∈ S ∧ x ≠ 0} h\n[PROOFSTEP]\nhave : x % WellFounded.min wf {x : R | x ∈ S ∧ x ≠ 0} h = 0 :=\n by\n simp only [not_and_or, Set.mem_setOf_eq, not_ne_iff] at this \n exact this.neg_resolve_left <| (mod_mem_iff hmin.1).2 hx\n[GOAL]\nR : Type u\nM : Type v\ninst✝ : EuclideanDomain R\nS : Ideal R\nh : Set.Nonempty {x | x ∈ S ∧ x ≠ 0}\nwf : WellFounded EuclideanDomain.r\nhmin : WellFounded.min wf {x | x ∈ S ∧ x ≠ 0} h ∈ S ∧ WellFounded.min wf {x | x ∈ S ∧ x ≠ 0} h ≠ 0\nx : R\nhx : x ∈ S\nthis : ¬x % WellFounded.min wf {x | x ∈ S ∧ x ≠ 0} h ∈ {x | x ∈ S ∧ x ≠ 0}\n⊢ x % WellFounded.min wf {x | x ∈ S ∧ x ≠ 0} h = 0\n[PROOFSTEP]\nsimp only [not_and_or, Set.mem_setOf_eq, not_ne_iff] at this \n[GOAL]\nR : Type u\nM : Type v\ninst✝ : EuclideanDomain R\nS : Ideal R\nh : Set.Nonempty {x | x ∈ S ∧ x ≠ 0}\nwf : WellFounded EuclideanDomain.r\nhmin : WellFounded.min wf {x | x ∈ S ∧ x ≠ 0} h ∈ S ∧ WellFounded.min wf {x | x ∈ S ∧ x ≠ 0} h ≠ 0\nx : R\nhx : x ∈ S\nthis : ¬x % WellFounded.min wf {x | x ∈ S ∧ x ≠ 0} h ∈ S ∨ x % WellFounded.min wf {x | x ∈ S ∧ x ≠ 0} h = 0\n⊢ x % WellFounded.min wf {x | x ∈ S ∧ x ≠ 0} h = 0\n[PROOFSTEP]\nexact this.neg_resolve_left <| (mod_mem_iff hmin.1).2 hx\n[GOAL]\nR : Type u\nM : Type v\ninst✝ : EuclideanDomain R\nS : Ideal R\nh : Set.Nonempty {x | x ∈ S ∧ x ≠ 0}\nwf : WellFounded EuclideanDomain.r\nhmin : WellFounded.min wf {x | x ∈ S ∧ x ≠ 0} h ∈ S ∧ WellFounded.min wf {x | x ∈ S ∧ x ≠ 0} h ≠ 0\nx : R\nhx : x ∈ S\nthis✝ : ¬x % WellFounded.min wf {x | x ∈ S ∧ x ≠ 0} h ∈ {x | x ∈ S ∧ x ≠ 0}\nthis : x % WellFounded.min wf {x | x ∈ S ∧ x ≠ 0} h = 0\n⊢ WellFounded.min wf {x | x ∈ S ∧ x ≠ 0} h ∣ x % WellFounded.min wf {x | x ∈ S ∧ x ≠ 0} h\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nR : Type u\nM : Type v\ninst✝ : EuclideanDomain R\nS : Ideal R\nh : ¬Set.Nonempty {x | x ∈ S ∧ x ≠ 0}\na : R\n⊢ a ∈ S ↔ a ∈ span R {0}\n[PROOFSTEP]\nrw [← @Submodule.bot_coe R R _ _ _, span_eq, Submodule.mem_bot]\n[GOAL]\nR : Type u\nM : Type v\ninst✝ : EuclideanDomain R\nS : Ideal R\nh : ¬Set.Nonempty {x | x ∈ S ∧ x ≠ 0}\na : R\n⊢ a ∈ S ↔ a = 0\n[PROOFSTEP]\nexact ⟨fun haS => by_contra fun ha0 => h ⟨a, ⟨haS, ha0⟩⟩, fun h₁ => h₁.symm ▸ S.zero_mem⟩\n[GOAL]\nR : Type u\nM : Type v\ninst✝¹ : Ring R\ninst✝ : IsPrincipalIdealRing R\ns : Ideal R\n⊢ FG s\n[PROOFSTEP]\nrcases(IsPrincipalIdealRing.principal s).principal with ⟨a, rfl⟩\n[GOAL]\ncase intro\nR : Type u\nM : Type v\ninst✝¹ : Ring R\ninst✝ : IsPrincipalIdealRing R\na : R\n⊢ FG (span R {a})\n[PROOFSTEP]\nrw [← Finset.coe_singleton]\n[GOAL]\ncase intro\nR : Type u\nM : Type v\ninst✝¹ : Ring R\ninst✝ : IsPrincipalIdealRing R\na : R\n⊢ FG (span R ↑{a})\n[PROOFSTEP]\nexact ⟨{ a }, SetLike.coe_injective rfl⟩\n[GOAL]\nR : Type u\nM : Type v\ninst✝¹ : CommRing R\ninst✝ : IsPrincipalIdealRing R\np : R\nhp : Irreducible p\nI : Ideal R\nhI : span R {p} < I\n⊢ I = ⊤\n[PROOFSTEP]\nrcases principal I with ⟨a, rfl⟩\n[GOAL]\ncase mk.intro\nR : Type u\nM : Type v\ninst✝¹ : CommRing R\ninst✝ : IsPrincipalIdealRing R\np : R\nhp : Irreducible p\na : R\nhI : span R {p} < span R {a}\n⊢ span R {a} = ⊤\n[PROOFSTEP]\nerw [Ideal.span_singleton_eq_top]\n[GOAL]\ncase mk.intro\nR : Type u\nM : Type v\ninst✝¹ : CommRing R\ninst✝ : IsPrincipalIdealRing R\np : R\nhp : Irreducible p\na : R\nhI : span R {p} < span R {a}\n⊢ IsUnit a\n[PROOFSTEP]\nrcases Ideal.span_singleton_le_span_singleton.1 (le_of_lt hI) with ⟨b, rfl⟩\n[GOAL]\ncase mk.intro.intro\nR : Type u\nM : Type v\ninst✝¹ : CommRing R\ninst✝ : IsPrincipalIdealRing R\na b : R\nhp : Irreducible (a * b)\nhI : span R {a * b} < span R {a}\n⊢ IsUnit a\n[PROOFSTEP]\nrefine' (of_irreducible_mul hp).resolve_right (mt (fun hb => _) (not_le_of_lt hI))\n[GOAL]\ncase mk.intro.intro\nR : Type u\nM : Type v\ninst✝¹ : CommRing R\ninst✝ : IsPrincipalIdealRing R\na b : R\nhp : Irreducible (a * b)\nhI : span R {a * b} < span R {a}\nhb : IsUnit b\n⊢ span R {a} ≤ span R {a * b}\n[PROOFSTEP]\nerw [Ideal.span_singleton_le_span_singleton, IsUnit.mul_right_dvd hb]\n[GOAL]\nR : Type u\nM : Type v\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : IsPrincipalIdealRing R\na : R\nh : a ≠ 0\n⊢ (∀ (b : R), b ∈ factors a → Irreducible b) ∧ Associated (Multiset.prod (factors a)) a\n[PROOFSTEP]\nunfold factors\n[GOAL]\nR : Type u\nM : Type v\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : IsPrincipalIdealRing R\na : R\nh : a ≠ 0\n⊢ (∀ (b : R),\n (b ∈\n if h : a = 0 then ∅\n else choose (_ : ∃ f, (∀ (b : R), b ∈ f → Irreducible b) ∧ Associated (Multiset.prod f) a)) →\n Irreducible b) ∧\n Associated\n (Multiset.prod\n (if h : a = 0 then ∅\n else choose (_ : ∃ f, (∀ (b : R), b ∈ f → Irreducible b) ∧ Associated (Multiset.prod f) a)))\n a\n[PROOFSTEP]\nrw [dif_neg h]\n[GOAL]\nR : Type u\nM : Type v\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : IsPrincipalIdealRing R\na : R\nh : a ≠ 0\n⊢ (∀ (b : R),\n b ∈ choose (_ : ∃ f, (∀ (b : R), b ∈ f → Irreducible b) ∧ Associated (Multiset.prod f) a) → Irreducible b) ∧\n Associated (Multiset.prod (choose (_ : ∃ f, (∀ (b : R), b ∈ f → Irreducible b) ∧ Associated (Multiset.prod f) a))) a\n[PROOFSTEP]\nexact Classical.choose_spec (WfDvdMonoid.exists_factors a h)\n[GOAL]\nR : Type u\nM : Type v\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : IsPrincipalIdealRing R\ns : Submonoid R\na : R\nha : a ≠ 0\nhfac : ∀ (b : R), b ∈ factors a → b ∈ s\nhunit : ∀ (c : Rˣ), ↑c ∈ s\n⊢ a ∈ s\n[PROOFSTEP]\nrcases(factors_spec a ha).2 with ⟨c, hc⟩\n[GOAL]\ncase intro\nR : Type u\nM : Type v\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : IsPrincipalIdealRing R\ns : Submonoid R\na : R\nha : a ≠ 0\nhfac : ∀ (b : R), b ∈ factors a → b ∈ s\nhunit : ∀ (c : Rˣ), ↑c ∈ s\nc : Rˣ\nhc : Multiset.prod (factors a) * ↑c = a\n⊢ a ∈ s\n[PROOFSTEP]\nrw [← hc]\n[GOAL]\ncase intro\nR : Type u\nM : Type v\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : IsPrincipalIdealRing R\ns : Submonoid R\na : R\nha : a ≠ 0\nhfac : ∀ (b : R), b ∈ factors a → b ∈ s\nhunit : ∀ (c : Rˣ), ↑c ∈ s\nc : Rˣ\nhc : Multiset.prod (factors a) * ↑c = a\n⊢ Multiset.prod (factors a) * ↑c ∈ s\n[PROOFSTEP]\nexact mul_mem (multiset_prod_mem _ hfac) (hunit _)\n[GOAL]\nR : Type u\nM : Type v\nS✝ : Type u_1\nN : Type u_2\ninst✝⁵ : Ring R\ninst✝⁴ : AddCommGroup M\ninst✝³ : AddCommGroup N\ninst✝² : Ring S✝\ninst✝¹ : Module R M\ninst✝ : Module R N\nf : M →ₗ[R] N\nhf : Surjective ↑f\nS : Submodule R N\nhI : IsPrincipal (comap f S)\n⊢ S = span R {↑f (generator (comap f S))}\n[PROOFSTEP]\nrw [← Set.image_singleton, ← Submodule.map_span, IsPrincipal.span_singleton_generator,\n Submodule.map_comap_eq_of_surjective hf]\n[GOAL]\nR : Type u\nM : Type v\nS : Type u_1\nN : Type u_2\ninst✝⁵ : Ring R\ninst✝⁴ : AddCommGroup M\ninst✝³ : AddCommGroup N\ninst✝² : Ring S\ninst✝¹ : Module R M\ninst✝ : Module R N\nf : R →+* S\nhf : Surjective ↑f\nI : Ideal S\nhI : IsPrincipal (comap f I)\n⊢ I = Submodule.span S {↑f (IsPrincipal.generator (comap f I))}\n[PROOFSTEP]\nrw [Ideal.submodule_span_eq, ← Set.image_singleton, ← Ideal.map_span, Ideal.span_singleton_generator,\n Ideal.map_comap_of_surjective f hf]\n[GOAL]\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\nx y : R\n⊢ Ideal.span {gcd x y} = Ideal.span {x, y}\n[PROOFSTEP]\nobtain ⟨d, hd⟩ := IsPrincipalIdealRing.principal (span ({ x, y } : Set R))\n[GOAL]\ncase mk.intro\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\nx y d : R\nhd : Ideal.span {x, y} = Submodule.span R {d}\n⊢ Ideal.span {gcd x y} = Ideal.span {x, y}\n[PROOFSTEP]\nrw [submodule_span_eq] at hd \n[GOAL]\ncase mk.intro\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\nx y d : R\nhd : Ideal.span {x, y} = Ideal.span {d}\n⊢ Ideal.span {gcd x y} = Ideal.span {x, y}\n[PROOFSTEP]\nrw [hd]\n[GOAL]\ncase mk.intro\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\nx y d : R\nhd : Ideal.span {x, y} = Ideal.span {d}\n⊢ Ideal.span {gcd x y} = Ideal.span {d}\n[PROOFSTEP]\nsuffices Associated d (gcd x y) by\n obtain ⟨D, HD⟩ := this\n rw [← HD]\n exact span_singleton_mul_right_unit D.isUnit _\n[GOAL]\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\nx y d : R\nhd : Ideal.span {x, y} = Ideal.span {d}\nthis : Associated d (gcd x y)\n⊢ Ideal.span {gcd x y} = Ideal.span {d}\n[PROOFSTEP]\nobtain ⟨D, HD⟩ := this\n[GOAL]\ncase intro\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\nx y d : R\nhd : Ideal.span {x, y} = Ideal.span {d}\nD : Rˣ\nHD : d * ↑D = gcd x y\n⊢ Ideal.span {gcd x y} = Ideal.span {d}\n[PROOFSTEP]\nrw [← HD]\n[GOAL]\ncase intro\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\nx y d : R\nhd : Ideal.span {x, y} = Ideal.span {d}\nD : Rˣ\nHD : d * ↑D = gcd x y\n⊢ Ideal.span {d * ↑D} = Ideal.span {d}\n[PROOFSTEP]\nexact span_singleton_mul_right_unit D.isUnit _\n[GOAL]\ncase mk.intro\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\nx y d : R\nhd : Ideal.span {x, y} = Ideal.span {d}\n⊢ Associated d (gcd x y)\n[PROOFSTEP]\napply associated_of_dvd_dvd\n[GOAL]\ncase mk.intro.hab\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\nx y d : R\nhd : Ideal.span {x, y} = Ideal.span {d}\n⊢ d ∣ gcd x y\n[PROOFSTEP]\nrw [dvd_gcd_iff]\n[GOAL]\ncase mk.intro.hab\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\nx y d : R\nhd : Ideal.span {x, y} = Ideal.span {d}\n⊢ d ∣ x ∧ d ∣ y\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mk.intro.hab.left\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\nx y d : R\nhd : Ideal.span {x, y} = Ideal.span {d}\n⊢ d ∣ x\n[PROOFSTEP]\nrw [← Ideal.mem_span_singleton, ← hd, Ideal.mem_span_pair]\n[GOAL]\ncase mk.intro.hab.right\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\nx y d : R\nhd : Ideal.span {x, y} = Ideal.span {d}\n⊢ d ∣ y\n[PROOFSTEP]\nrw [← Ideal.mem_span_singleton, ← hd, Ideal.mem_span_pair]\n[GOAL]\ncase mk.intro.hab.left\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\nx y d : R\nhd : Ideal.span {x, y} = Ideal.span {d}\n⊢ ∃ a b, a * x + b * y = x\n[PROOFSTEP]\nuse 1, 0\n[GOAL]\ncase h\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\nx y d : R\nhd : Ideal.span {x, y} = Ideal.span {d}\n⊢ 1 * x + 0 * y = x\n[PROOFSTEP]\nrw [one_mul, zero_mul, add_zero]\n[GOAL]\ncase mk.intro.hab.right\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\nx y d : R\nhd : Ideal.span {x, y} = Ideal.span {d}\n⊢ ∃ a b, a * x + b * y = y\n[PROOFSTEP]\nuse 0, 1\n[GOAL]\ncase h\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\nx y d : R\nhd : Ideal.span {x, y} = Ideal.span {d}\n⊢ 0 * x + 1 * y = y\n[PROOFSTEP]\nrw [one_mul, zero_mul, zero_add]\n[GOAL]\ncase mk.intro.hba\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\nx y d : R\nhd : Ideal.span {x, y} = Ideal.span {d}\n⊢ gcd x y ∣ d\n[PROOFSTEP]\nobtain ⟨r, s, rfl⟩ : ∃ r s, r * x + s * y = d := by rw [← Ideal.mem_span_pair, hd, Ideal.mem_span_singleton]\n[GOAL]\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\nx y d : R\nhd : Ideal.span {x, y} = Ideal.span {d}\n⊢ ∃ r s, r * x + s * y = d\n[PROOFSTEP]\nrw [← Ideal.mem_span_pair, hd, Ideal.mem_span_singleton]\n[GOAL]\ncase mk.intro.hba.intro.intro\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\nx y r s : R\nhd : Ideal.span {x, y} = Ideal.span {r * x + s * y}\n⊢ gcd x y ∣ r * x + s * y\n[PROOFSTEP]\napply dvd_add\n[GOAL]\ncase mk.intro.hba.intro.intro.h₁\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\nx y r s : R\nhd : Ideal.span {x, y} = Ideal.span {r * x + s * y}\n⊢ gcd x y ∣ r * x\n[PROOFSTEP]\napply dvd_mul_of_dvd_right\n[GOAL]\ncase mk.intro.hba.intro.intro.h₂\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\nx y r s : R\nhd : Ideal.span {x, y} = Ideal.span {r * x + s * y}\n⊢ gcd x y ∣ s * y\n[PROOFSTEP]\napply dvd_mul_of_dvd_right\n[GOAL]\ncase mk.intro.hba.intro.intro.h₁.h\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\nx y r s : R\nhd : Ideal.span {x, y} = Ideal.span {r * x + s * y}\n⊢ gcd x y ∣ x\ncase mk.intro.hba.intro.intro.h₂.h\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\nx y r s : R\nhd : Ideal.span {x, y} = Ideal.span {r * x + s * y}\n⊢ gcd x y ∣ y\n[PROOFSTEP]\nexacts [gcd_dvd_left x y, gcd_dvd_right x y]\n[GOAL]\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\na b z : R\n⊢ gcd a b ∣ z ↔ ∃ x y, z = a * x + b * y\n[PROOFSTEP]\nsimp_rw [mul_comm a, mul_comm b, @eq_comm _ z, ← Ideal.mem_span_pair, ← span_gcd, Ideal.mem_span_singleton]\n[GOAL]\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\na b : R\n⊢ ∃ x y, gcd a b = a * x + b * y\n[PROOFSTEP]\nrw [← gcd_dvd_iff_exists]\n[GOAL]\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\nx y : R\n⊢ IsUnit (gcd x y) ↔ IsCoprime x y\n[PROOFSTEP]\nrw [IsCoprime, ← Ideal.mem_span_pair, ← span_gcd, ← span_singleton_eq_top, eq_top_iff_one]\n[GOAL]\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\nx y : R\nnonzero : ¬(x = 0 ∧ y = 0)\nH : ∀ (z : R), z ∈ nonunits R → z ≠ 0 → z ∣ x → ¬z ∣ y\n⊢ IsCoprime x y\n[PROOFSTEP]\nrw [← gcd_isUnit_iff]\n[GOAL]\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\nx y : R\nnonzero : ¬(x = 0 ∧ y = 0)\nH : ∀ (z : R), z ∈ nonunits R → z ≠ 0 → z ∣ x → ¬z ∣ y\n⊢ IsUnit (gcd x y)\n[PROOFSTEP]\nby_contra h\n[GOAL]\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\nx y : R\nnonzero : ¬(x = 0 ∧ y = 0)\nH : ∀ (z : R), z ∈ nonunits R → z ≠ 0 → z ∣ x → ¬z ∣ y\nh : ¬IsUnit (gcd x y)\n⊢ False\n[PROOFSTEP]\nrefine' H _ h _ (gcd_dvd_left _ _) (gcd_dvd_right _ _)\n[GOAL]\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\nx y : R\nnonzero : ¬(x = 0 ∧ y = 0)\nH : ∀ (z : R), z ∈ nonunits R → z ≠ 0 → z ∣ x → ¬z ∣ y\nh : ¬IsUnit (gcd x y)\n⊢ gcd x y ≠ 0\n[PROOFSTEP]\nrwa [Ne, gcd_eq_zero_iff]\n[GOAL]\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\nx y : R\nh : Irreducible x\n⊢ x ∣ y ∨ IsCoprime x y\n[PROOFSTEP]\nrefine' or_iff_not_imp_left.2 fun h' => _\n[GOAL]\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\nx y : R\nh : Irreducible x\nh' : ¬x ∣ y\n⊢ IsCoprime x y\n[PROOFSTEP]\napply isCoprime_of_dvd\n[GOAL]\ncase nonzero\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\nx y : R\nh : Irreducible x\nh' : ¬x ∣ y\n⊢ ¬(x = 0 ∧ y = 0)\n[PROOFSTEP]\nrintro ⟨rfl, rfl⟩\n[GOAL]\ncase nonzero.intro\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\nh : Irreducible 0\nh' : ¬0 ∣ 0\n⊢ False\n[PROOFSTEP]\nsimp at h \n[GOAL]\ncase H\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\nx y : R\nh : Irreducible x\nh' : ¬x ∣ y\n⊢ ∀ (z : R), z ∈ nonunits R → z ≠ 0 → z ∣ x → ¬z ∣ y\n[PROOFSTEP]\nrintro z nu - ⟨w, rfl⟩ dy\n[GOAL]\ncase H.intro\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\ny z : R\nnu : z ∈ nonunits R\nw : R\nh : Irreducible (z * w)\nh' : ¬z * w ∣ y\ndy : z ∣ y\n⊢ False\n[PROOFSTEP]\nrefine' h' (dvd_trans _ dy)\n[GOAL]\ncase H.intro\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\ny z : R\nnu : z ∈ nonunits R\nw : R\nh : Irreducible (z * w)\nh' : ¬z * w ∣ y\ndy : z ∣ y\n⊢ z * w ∣ z\n[PROOFSTEP]\nsimpa using mul_dvd_mul_left z (isUnit_iff_dvd_one.1 <| (of_irreducible_mul h).resolve_left nu)\n[GOAL]\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\nx y : R\nnonzero : ¬(x = 0 ∧ y = 0)\nH : ∀ (z : R), Irreducible z → z ∣ x → ¬z ∣ y\n⊢ IsCoprime x y\n[PROOFSTEP]\napply isCoprime_of_dvd x y nonzero\n[GOAL]\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\nx y : R\nnonzero : ¬(x = 0 ∧ y = 0)\nH : ∀ (z : R), Irreducible z → z ∣ x → ¬z ∣ y\n⊢ ∀ (z : R), z ∈ nonunits R → z ≠ 0 → z ∣ x → ¬z ∣ y\n[PROOFSTEP]\nintro z znu znz zx zy\n[GOAL]\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\nx y : R\nnonzero : ¬(x = 0 ∧ y = 0)\nH : ∀ (z : R), Irreducible z → z ∣ x → ¬z ∣ y\nz : R\nznu : z ∈ nonunits R\nznz : z ≠ 0\nzx : z ∣ x\nzy : z ∣ y\n⊢ False\n[PROOFSTEP]\nobtain ⟨i, h1, h2⟩ := WfDvdMonoid.exists_irreducible_factor znu znz\n[GOAL]\ncase intro.intro\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\nx y : R\nnonzero : ¬(x = 0 ∧ y = 0)\nH : ∀ (z : R), Irreducible z → z ∣ x → ¬z ∣ y\nz : R\nznu : z ∈ nonunits R\nznz : z ≠ 0\nzx : z ∣ x\nzy : z ∣ y\ni : R\nh1 : Irreducible i\nh2 : i ∣ z\n⊢ False\n[PROOFSTEP]\napply H i h1\n[GOAL]\ncase intro.intro.a\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\nx y : R\nnonzero : ¬(x = 0 ∧ y = 0)\nH : ∀ (z : R), Irreducible z → z ∣ x → ¬z ∣ y\nz : R\nznu : z ∈ nonunits R\nznz : z ≠ 0\nzx : z ∣ x\nzy : z ∣ y\ni : R\nh1 : Irreducible i\nh2 : i ∣ z\n⊢ i ∣ x\n[PROOFSTEP]\napply dvd_trans h2\n[GOAL]\ncase intro.intro.a\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\nx y : R\nnonzero : ¬(x = 0 ∧ y = 0)\nH : ∀ (z : R), Irreducible z → z ∣ x → ¬z ∣ y\nz : R\nznu : z ∈ nonunits R\nznz : z ≠ 0\nzx : z ∣ x\nzy : z ∣ y\ni : R\nh1 : Irreducible i\nh2 : i ∣ z\n⊢ z ∣ x\n[PROOFSTEP]\nassumption\n[GOAL]\ncase intro.intro.a\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\nx y : R\nnonzero : ¬(x = 0 ∧ y = 0)\nH : ∀ (z : R), Irreducible z → z ∣ x → ¬z ∣ y\nz : R\nznu : z ∈ nonunits R\nznz : z ≠ 0\nzx : z ∣ x\nzy : z ∣ y\ni : R\nh1 : Irreducible i\nh2 : i ∣ z\n⊢ i ∣ y\n[PROOFSTEP]\napply dvd_trans h2\n[GOAL]\ncase intro.intro.a\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\nx y : R\nnonzero : ¬(x = 0 ∧ y = 0)\nH : ∀ (z : R), Irreducible z → z ∣ x → ¬z ∣ y\nz : R\nznu : z ∈ nonunits R\nznz : z ≠ 0\nzx : z ∣ x\nzy : z ∣ y\ni : R\nh1 : Irreducible i\nh2 : i ∣ z\n⊢ z ∣ y\n[PROOFSTEP]\nassumption\n[GOAL]\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\np n : R\npp : Irreducible p\n⊢ IsCoprime p n ↔ ¬p ∣ n\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\np n : R\npp : Irreducible p\n⊢ IsCoprime p n → ¬p ∣ n\n[PROOFSTEP]\nintro co H\n[GOAL]\ncase mp\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\np n : R\npp : Irreducible p\nco : IsCoprime p n\nH : p ∣ n\n⊢ False\n[PROOFSTEP]\napply pp.not_unit\n[GOAL]\ncase mp\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\np n : R\npp : Irreducible p\nco : IsCoprime p n\nH : p ∣ n\n⊢ IsUnit p\n[PROOFSTEP]\nrw [isUnit_iff_dvd_one]\n[GOAL]\ncase mp\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\np n : R\npp : Irreducible p\nco : IsCoprime p n\nH : p ∣ n\n⊢ p ∣ 1\n[PROOFSTEP]\napply IsCoprime.dvd_of_dvd_mul_left co\n[GOAL]\ncase mp\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\np n : R\npp : Irreducible p\nco : IsCoprime p n\nH : p ∣ n\n⊢ p ∣ n * 1\n[PROOFSTEP]\nrw [mul_one n]\n[GOAL]\ncase mp\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\np n : R\npp : Irreducible p\nco : IsCoprime p n\nH : p ∣ n\n⊢ p ∣ n\n[PROOFSTEP]\nexact H\n[GOAL]\ncase mpr\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\np n : R\npp : Irreducible p\n⊢ ¬p ∣ n → IsCoprime p n\n[PROOFSTEP]\nintro nd\n[GOAL]\ncase mpr\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\np n : R\npp : Irreducible p\nnd : ¬p ∣ n\n⊢ IsCoprime p n\n[PROOFSTEP]\napply isCoprime_of_irreducible_dvd\n[GOAL]\ncase mpr.nonzero\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\np n : R\npp : Irreducible p\nnd : ¬p ∣ n\n⊢ ¬(p = 0 ∧ n = 0)\n[PROOFSTEP]\nrintro ⟨hp, -⟩\n[GOAL]\ncase mpr.nonzero.intro\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\np n : R\npp : Irreducible p\nnd : ¬p ∣ n\nhp : p = 0\n⊢ False\n[PROOFSTEP]\nexact pp.ne_zero hp\n[GOAL]\ncase mpr.H\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\np n : R\npp : Irreducible p\nnd : ¬p ∣ n\n⊢ ∀ (z : R), Irreducible z → z ∣ p → ¬z ∣ n\n[PROOFSTEP]\nrintro z zi zp zn\n[GOAL]\ncase mpr.H\nR : Type u\nM : Type v\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : IsPrincipalIdealRing R\ninst✝ : GCDMonoid R\np n : R\npp : Irreducible p\nnd : ¬p ∣ n\nz : R\nzi : Irreducible z\nzp : z ∣ p\nzn : z ∣ n\n⊢ False\n[PROOFSTEP]\nexact nd ((zi.associated_of_dvd pp zp).symm.dvd.trans zn)\n[GOAL]\nR : Type u\nM : Type v\ninst✝ : CommRing R\n⊢ nonPrincipals R = ∅ ↔ IsPrincipalIdealRing R\n[PROOFSTEP]\nsimp [Set.eq_empty_iff_forall_not_mem, isPrincipalIdealRing_iff, nonPrincipals_def]\n[GOAL]\nR : Type u\nM : Type v\ninst✝ : CommRing R\nc : Set (Ideal R)\nhs : c ⊆ nonPrincipals R\nhchain : IsChain (fun x x_1 => x ≤ x_1) c\nK : Ideal R\nhKmem : K ∈ c\n⊢ ∃ I, I ∈ nonPrincipals R ∧ ∀ (J : Ideal R), J ∈ c → J ≤ I\n[PROOFSTEP]\nrefine' ⟨sSup c, _, fun J hJ => le_sSup hJ⟩\n[GOAL]\nR : Type u\nM : Type v\ninst✝ : CommRing R\nc : Set (Ideal R)\nhs : c ⊆ nonPrincipals R\nhchain : IsChain (fun x x_1 => x ≤ x_1) c\nK : Ideal R\nhKmem : K ∈ c\n⊢ sSup c ∈ nonPrincipals R\n[PROOFSTEP]\nrintro ⟨x, hx⟩\n[GOAL]\ncase mk.intro\nR : Type u\nM : Type v\ninst✝ : CommRing R\nc : Set (Ideal R)\nhs : c ⊆ nonPrincipals R\nhchain : IsChain (fun x x_1 => x ≤ x_1) c\nK : Ideal R\nhKmem : K ∈ c\nx : R\nhx : sSup c = Submodule.span R {x}\n⊢ False\n[PROOFSTEP]\nhave hxmem : x ∈ sSup c := hx.symm ▸ Submodule.mem_span_singleton_self x\n[GOAL]\ncase mk.intro\nR : Type u\nM : Type v\ninst✝ : CommRing R\nc : Set (Ideal R)\nhs : c ⊆ nonPrincipals R\nhchain : IsChain (fun x x_1 => x ≤ x_1) c\nK : Ideal R\nhKmem : K ∈ c\nx : R\nhx : sSup c = Submodule.span R {x}\nhxmem : x ∈ sSup c\n⊢ False\n[PROOFSTEP]\nobtain ⟨J, hJc, hxJ⟩ := (Submodule.mem_sSup_of_directed ⟨K, hKmem⟩ hchain.directedOn).1 hxmem\n[GOAL]\ncase mk.intro.intro.intro\nR : Type u\nM : Type v\ninst✝ : CommRing R\nc : Set (Ideal R)\nhs : c ⊆ nonPrincipals R\nhchain : IsChain (fun x x_1 => x ≤ x_1) c\nK : Ideal R\nhKmem : K ∈ c\nx : R\nhx : sSup c = Submodule.span R {x}\nhxmem : x ∈ sSup c\nJ : Submodule R R\nhJc : J ∈ c\nhxJ : x ∈ J\n⊢ False\n[PROOFSTEP]\nhave hsSupJ : sSup c = J := le_antisymm (by simp [hx, Ideal.span_le, hxJ]) (le_sSup hJc)\n[GOAL]\nR : Type u\nM : Type v\ninst✝ : CommRing R\nc : Set (Ideal R)\nhs : c ⊆ nonPrincipals R\nhchain : IsChain (fun x x_1 => x ≤ x_1) c\nK : Ideal R\nhKmem : K ∈ c\nx : R\nhx : sSup c = Submodule.span R {x}\nhxmem : x ∈ sSup c\nJ : Submodule R R\nhJc : J ∈ c\nhxJ : x ∈ J\n⊢ sSup c ≤ J\n[PROOFSTEP]\nsimp [hx, Ideal.span_le, hxJ]\n[GOAL]\ncase mk.intro.intro.intro\nR : Type u\nM : Type v\ninst✝ : CommRing R\nc : Set (Ideal R)\nhs : c ⊆ nonPrincipals R\nhchain : IsChain (fun x x_1 => x ≤ x_1) c\nK : Ideal R\nhKmem : K ∈ c\nx : R\nhx : sSup c = Submodule.span R {x}\nhxmem : x ∈ sSup c\nJ : Submodule R R\nhJc : J ∈ c\nhxJ : x ∈ J\nhsSupJ : sSup c = J\n⊢ False\n[PROOFSTEP]\nspecialize hs hJc\n[GOAL]\ncase mk.intro.intro.intro\nR : Type u\nM : Type v\ninst✝ : CommRing R\nc : Set (Ideal R)\nhchain : IsChain (fun x x_1 => x ≤ x_1) c\nK : Ideal R\nhKmem : K ∈ c\nx : R\nhx : sSup c = Submodule.span R {x}\nhxmem : x ∈ sSup c\nJ : Submodule R R\nhJc : J ∈ c\nhxJ : x ∈ J\nhsSupJ : sSup c = J\nhs : J ∈ nonPrincipals R\n⊢ False\n[PROOFSTEP]\nrw [← hsSupJ, hx, nonPrincipals_def] at hs \n[GOAL]\ncase mk.intro.intro.intro\nR : Type u\nM : Type v\ninst✝ : CommRing R\nc : Set (Ideal R)\nhchain : IsChain (fun x x_1 => x ≤ x_1) c\nK : Ideal R\nhKmem : K ∈ c\nx : R\nhx : sSup c = Submodule.span R {x}\nhxmem : x ∈ sSup c\nJ : Submodule R R\nhJc : J ∈ c\nhxJ : x ∈ J\nhsSupJ : sSup c = J\nhs : ¬IsPrincipal (Submodule.span R {x})\n⊢ False\n[PROOFSTEP]\nexact hs ⟨⟨x, rfl⟩⟩\n[GOAL]\nR : Type u\nM : Type v\ninst✝ : CommRing R\nH : ∀ (P : Ideal R), IsPrime P → IsPrincipal P\n⊢ IsPrincipalIdealRing R\n[PROOFSTEP]\nrw [← nonPrincipals_eq_empty_iff, Set.eq_empty_iff_forall_not_mem]\n[GOAL]\nR : Type u\nM : Type v\ninst✝ : CommRing R\nH : ∀ (P : Ideal R), IsPrime P → IsPrincipal P\n⊢ ∀ (x : Ideal R), ¬x ∈ nonPrincipals R\n[PROOFSTEP]\nintro J hJ\n[GOAL]\nR : Type u\nM : Type v\ninst✝ : CommRing R\nH : ∀ (P : Ideal R), IsPrime P → IsPrincipal P\nJ : Ideal R\nhJ : J ∈ nonPrincipals R\n⊢ False\n[PROOFSTEP]\nobtain ⟨I, Ibad, -, Imax⟩ := zorn_nonempty_partialOrder₀ (nonPrincipals R) nonPrincipals_zorn _ hJ\n[GOAL]\ncase intro.intro.intro\nR : Type u\nM : Type v\ninst✝ : CommRing R\nH : ∀ (P : Ideal R), IsPrime P → IsPrincipal P\nJ : Ideal R\nhJ : J ∈ nonPrincipals R\nI : Ideal R\nIbad : I ∈ nonPrincipals R\nImax : ∀ (z : Ideal R), z ∈ nonPrincipals R → I ≤ z → z = I\n⊢ False\n[PROOFSTEP]\nhave Imax' : ∀ {J}, I < J → J.IsPrincipal := by\n intro J hJ\n by_contra He\n exact hJ.ne (Imax _ ((nonPrincipals_def R).2 He) hJ.le).symm\n[GOAL]\nR : Type u\nM : Type v\ninst✝ : CommRing R\nH : ∀ (P : Ideal R), IsPrime P → IsPrincipal P\nJ : Ideal R\nhJ : J ∈ nonPrincipals R\nI : Ideal R\nIbad : I ∈ nonPrincipals R\nImax : ∀ (z : Ideal R), z ∈ nonPrincipals R → I ≤ z → z = I\n⊢ ∀ {J : Ideal R}, I < J → IsPrincipal J\n[PROOFSTEP]\nintro J hJ\n[GOAL]\nR : Type u\nM : Type v\ninst✝ : CommRing R\nH : ∀ (P : Ideal R), IsPrime P → IsPrincipal P\nJ✝ : Ideal R\nhJ✝ : J✝ ∈ nonPrincipals R\nI : Ideal R\nIbad : I ∈ nonPrincipals R\nImax : ∀ (z : Ideal R), z ∈ nonPrincipals R → I ≤ z → z = I\nJ : Ideal R\nhJ : I < J\n⊢ IsPrincipal J\n[PROOFSTEP]\nby_contra He\n[GOAL]\nR : Type u\nM : Type v\ninst✝ : CommRing R\nH : ∀ (P : Ideal R), IsPrime P → IsPrincipal P\nJ✝ : Ideal R\nhJ✝ : J✝ ∈ nonPrincipals R\nI : Ideal R\nIbad : I ∈ nonPrincipals R\nImax : ∀ (z : Ideal R), z ∈ nonPrincipals R → I ≤ z → z = I\nJ : Ideal R\nhJ : I < J\nHe : ¬IsPrincipal J\n⊢ False\n[PROOFSTEP]\nexact hJ.ne (Imax _ ((nonPrincipals_def R).2 He) hJ.le).symm\n[GOAL]\ncase intro.intro.intro\nR : Type u\nM : Type v\ninst✝ : CommRing R\nH : ∀ (P : Ideal R), IsPrime P → IsPrincipal P\nJ : Ideal R\nhJ : J ∈ nonPrincipals R\nI : Ideal R\nIbad : I ∈ nonPrincipals R\nImax : ∀ (z : Ideal R), z ∈ nonPrincipals R → I ≤ z → z = I\nImax' : ∀ {J : Ideal R}, I < J → IsPrincipal J\n⊢ False\n[PROOFSTEP]\nby_cases hI1 : I = ⊤\n[GOAL]\ncase pos\nR : Type u\nM : Type v\ninst✝ : CommRing R\nH : ∀ (P : Ideal R), IsPrime P → IsPrincipal P\nJ : Ideal R\nhJ : J ∈ nonPrincipals R\nI : Ideal R\nIbad : I ∈ nonPrincipals R\nImax : ∀ (z : Ideal R), z ∈ nonPrincipals R → I ≤ z → z = I\nImax' : ∀ {J : Ideal R}, I < J → IsPrincipal J\nhI1 : I = ⊤\n⊢ False\n[PROOFSTEP]\nsubst hI1\n[GOAL]\ncase pos\nR : Type u\nM : Type v\ninst✝ : CommRing R\nH : ∀ (P : Ideal R), IsPrime P → IsPrincipal P\nJ : Ideal R\nhJ : J ∈ nonPrincipals R\nIbad : ⊤ ∈ nonPrincipals R\nImax : ∀ (z : Ideal R), z ∈ nonPrincipals R → ⊤ ≤ z → z = ⊤\nImax' : ∀ {J : Ideal R}, ⊤ < J → IsPrincipal J\n⊢ False\n[PROOFSTEP]\nexact Ibad top_isPrincipal\n[GOAL]\ncase neg\nR : Type u\nM : Type v\ninst✝ : CommRing R\nH : ∀ (P : Ideal R), IsPrime P → IsPrincipal P\nJ : Ideal R\nhJ : J ∈ nonPrincipals R\nI : Ideal R\nIbad : I ∈ nonPrincipals R\nImax : ∀ (z : Ideal R), z ∈ nonPrincipals R → I ≤ z → z = I\nImax' : ∀ {J : Ideal R}, I < J → IsPrincipal J\nhI1 : ¬I = ⊤\n⊢ False\n[PROOFSTEP]\nrefine' Ibad (H I ⟨hI1, fun {x y} hxy => or_iff_not_imp_right.mpr fun hy => _⟩)\n[GOAL]\ncase neg\nR : Type u\nM : Type v\ninst✝ : CommRing R\nH : ∀ (P : Ideal R), IsPrime P → IsPrincipal P\nJ : Ideal R\nhJ : J ∈ nonPrincipals R\nI : Ideal R\nIbad : I ∈ nonPrincipals R\nImax : ∀ (z : Ideal R), z ∈ nonPrincipals R → I ≤ z → z = I\nImax' : ∀ {J : Ideal R}, I < J → IsPrincipal J\nhI1 : ¬I = ⊤\nx y : R\nhxy : x * y ∈ I\nhy : ¬y ∈ I\n⊢ x ∈ I\n[PROOFSTEP]\nobtain ⟨a, ha⟩ : (I ⊔ span { y }).IsPrincipal :=\n Imax'\n (left_lt_sup.mpr (mt I.span_singleton_le_iff_mem.mp hy))\n -- Then `x ∈ I.colon (span {y})`, which is equal to `I` if it's not principal.\n[GOAL]\ncase neg.mk.intro\nR : Type u\nM : Type v\ninst✝ : CommRing R\nH : ∀ (P : Ideal R), IsPrime P → IsPrincipal P\nJ : Ideal R\nhJ : J ∈ nonPrincipals R\nI : Ideal R\nIbad : I ∈ nonPrincipals R\nImax : ∀ (z : Ideal R), z ∈ nonPrincipals R → I ≤ z → z = I\nImax' : ∀ {J : Ideal R}, I < J → IsPrincipal J\nhI1 : ¬I = ⊤\nx y : R\nhxy : x * y ∈ I\nhy : ¬y ∈ I\na : R\nha : I ⊔ Ideal.span {y} = Submodule.span R {a}\n⊢ x ∈ I\n[PROOFSTEP]\nsuffices He : ¬(I.colon (span { y })).IsPrincipal\n[GOAL]\ncase neg.mk.intro\nR : Type u\nM : Type v\ninst✝ : CommRing R\nH : ∀ (P : Ideal R), IsPrime P → IsPrincipal P\nJ : Ideal R\nhJ : J ∈ nonPrincipals R\nI : Ideal R\nIbad : I ∈ nonPrincipals R\nImax : ∀ (z : Ideal R), z ∈ nonPrincipals R → I ≤ z → z = I\nImax' : ∀ {J : Ideal R}, I < J → IsPrincipal J\nhI1 : ¬I = ⊤\nx y : R\nhxy : x * y ∈ I\nhy : ¬y ∈ I\na : R\nha : I ⊔ Ideal.span {y} = Submodule.span R {a}\nHe : ¬IsPrincipal (colon I (Ideal.span {y}))\n⊢ x ∈ I\n[PROOFSTEP]\nrw [← Imax _ ((nonPrincipals_def R).2 He) fun a ha => Ideal.mem_colon_singleton.2 (mul_mem_right _ _ ha)]\n[GOAL]\ncase neg.mk.intro\nR : Type u\nM : Type v\ninst✝ : CommRing R\nH : ∀ (P : Ideal R), IsPrime P → IsPrincipal P\nJ : Ideal R\nhJ : J ∈ nonPrincipals R\nI : Ideal R\nIbad : I ∈ nonPrincipals R\nImax : ∀ (z : Ideal R), z ∈ nonPrincipals R → I ≤ z → z = I\nImax' : ∀ {J : Ideal R}, I < J → IsPrincipal J\nhI1 : ¬I = ⊤\nx y : R\nhxy : x * y ∈ I\nhy : ¬y ∈ I\na : R\nha : I ⊔ Ideal.span {y} = Submodule.span R {a}\nHe : ¬IsPrincipal (colon I (Ideal.span {y}))\n⊢ x ∈ colon I (Ideal.span {y})\n[PROOFSTEP]\nexact Ideal.mem_colon_singleton.2 hxy\n[GOAL]\ncase He\nR : Type u\nM : Type v\ninst✝ : CommRing R\nH : ∀ (P : Ideal R), IsPrime P → IsPrincipal P\nJ : Ideal R\nhJ : J ∈ nonPrincipals R\nI : Ideal R\nIbad : I ∈ nonPrincipals R\nImax : ∀ (z : Ideal R), z ∈ nonPrincipals R → I ≤ z → z = I\nImax' : ∀ {J : Ideal R}, I < J → IsPrincipal J\nhI1 : ¬I = ⊤\nx y : R\nhxy : x * y ∈ I\nhy : ¬y ∈ I\na : R\nha : I ⊔ Ideal.span {y} = Submodule.span R {a}\n⊢ ¬IsPrincipal (colon I (Ideal.span {y}))\n[PROOFSTEP]\nrintro\n ⟨b, hb⟩\n -- We will show `I` is generated by `a * b`.\n[GOAL]\ncase He.mk.intro\nR : Type u\nM : Type v\ninst✝ : CommRing R\nH : ∀ (P : Ideal R), IsPrime P → IsPrincipal P\nJ : Ideal R\nhJ : J ∈ nonPrincipals R\nI : Ideal R\nIbad : I ∈ nonPrincipals R\nImax : ∀ (z : Ideal R), z ∈ nonPrincipals R → I ≤ z → z = I\nImax' : ∀ {J : Ideal R}, I < J → IsPrincipal J\nhI1 : ¬I = ⊤\nx y : R\nhxy : x * y ∈ I\nhy : ¬y ∈ I\na : R\nha : I ⊔ Ideal.span {y} = Submodule.span R {a}\nb : R\nhb : colon I (Ideal.span {y}) = Submodule.span R {b}\n⊢ False\n[PROOFSTEP]\nrefine (nonPrincipals_def _).1 Ibad ⟨a * b, ?_⟩\n[GOAL]\ncase He.mk.intro\nR : Type u\nM : Type v\ninst✝ : CommRing R\nH : ∀ (P : Ideal R), IsPrime P → IsPrincipal P\nJ : Ideal R\nhJ : J ∈ nonPrincipals R\nI : Ideal R\nIbad : I ∈ nonPrincipals R\nImax : ∀ (z : Ideal R), z ∈ nonPrincipals R → I ≤ z → z = I\nImax' : ∀ {J : Ideal R}, I < J → IsPrincipal J\nhI1 : ¬I = ⊤\nx y : R\nhxy : x * y ∈ I\nhy : ¬y ∈ I\na : R\nha : I ⊔ Ideal.span {y} = Submodule.span R {a}\nb : R\nhb : colon I (Ideal.span {y}) = Submodule.span R {b}\n⊢ I = Submodule.span R {a * b}\n[PROOFSTEP]\nrefine' le_antisymm (α := Ideal R) (fun i hi => _) <| (span_singleton_mul_span_singleton a b).ge.trans _\n[GOAL]\ncase He.mk.intro.refine'_1\nR : Type u\nM : Type v\ninst✝ : CommRing R\nH : ∀ (P : Ideal R), IsPrime P → IsPrincipal P\nJ : Ideal R\nhJ : J ∈ nonPrincipals R\nI : Ideal R\nIbad : I ∈ nonPrincipals R\nImax : ∀ (z : Ideal R), z ∈ nonPrincipals R → I ≤ z → z = I\nImax' : ∀ {J : Ideal R}, I < J → IsPrincipal J\nhI1 : ¬I = ⊤\nx y : R\nhxy : x * y ∈ I\nhy : ¬y ∈ I\na : R\nha : I ⊔ Ideal.span {y} = Submodule.span R {a}\nb : R\nhb : colon I (Ideal.span {y}) = Submodule.span R {b}\ni : R\nhi : i ∈ I\n⊢ i ∈ Submodule.span R {a * b}\n[PROOFSTEP]\nhave hisup : i ∈ I ⊔ span { y } := Ideal.mem_sup_left hi\n[GOAL]\ncase He.mk.intro.refine'_1\nR : Type u\nM : Type v\ninst✝ : CommRing R\nH : ∀ (P : Ideal R), IsPrime P → IsPrincipal P\nJ : Ideal R\nhJ : J ∈ nonPrincipals R\nI : Ideal R\nIbad : I ∈ nonPrincipals R\nImax : ∀ (z : Ideal R), z ∈ nonPrincipals R → I ≤ z → z = I\nImax' : ∀ {J : Ideal R}, I < J → IsPrincipal J\nhI1 : ¬I = ⊤\nx y : R\nhxy : x * y ∈ I\nhy : ¬y ∈ I\na : R\nha : I ⊔ Ideal.span {y} = Submodule.span R {a}\nb : R\nhb : colon I (Ideal.span {y}) = Submodule.span R {b}\ni : R\nhi : i ∈ I\nhisup : i ∈ I ⊔ Ideal.span {y}\n⊢ i ∈ Submodule.span R {a * b}\n[PROOFSTEP]\nhave : y ∈ I ⊔ span { y } := Ideal.mem_sup_right (Ideal.mem_span_singleton_self y)\n[GOAL]\ncase He.mk.intro.refine'_1\nR : Type u\nM : Type v\ninst✝ : CommRing R\nH : ∀ (P : Ideal R), IsPrime P → IsPrincipal P\nJ : Ideal R\nhJ : J ∈ nonPrincipals R\nI : Ideal R\nIbad : I ∈ nonPrincipals R\nImax : ∀ (z : Ideal R), z ∈ nonPrincipals R → I ≤ z → z = I\nImax' : ∀ {J : Ideal R}, I < J → IsPrincipal J\nhI1 : ¬I = ⊤\nx y : R\nhxy : x * y ∈ I\nhy : ¬y ∈ I\na : R\nha : I ⊔ Ideal.span {y} = Submodule.span R {a}\nb : R\nhb : colon I (Ideal.span {y}) = Submodule.span R {b}\ni : R\nhi : i ∈ I\nhisup : i ∈ I ⊔ Ideal.span {y}\nthis : y ∈ I ⊔ Ideal.span {y}\n⊢ i ∈ Submodule.span R {a * b}\n[PROOFSTEP]\nerw [ha, mem_span_singleton'] at hisup this \n[GOAL]\ncase He.mk.intro.refine'_1\nR : Type u\nM : Type v\ninst✝ : CommRing R\nH : ∀ (P : Ideal R), IsPrime P → IsPrincipal P\nJ : Ideal R\nhJ : J ∈ nonPrincipals R\nI : Ideal R\nIbad : I ∈ nonPrincipals R\nImax : ∀ (z : Ideal R), z ∈ nonPrincipals R → I ≤ z → z = I\nImax' : ∀ {J : Ideal R}, I < J → IsPrincipal J\nhI1 : ¬I = ⊤\nx y : R\nhxy : x * y ∈ I\nhy : ¬y ∈ I\na : R\nha : I ⊔ Ideal.span {y} = Submodule.span R {a}\nb : R\nhb : colon I (Ideal.span {y}) = Submodule.span R {b}\ni : R\nhi : i ∈ I\nhisup : ∃ a_1, a_1 * a = i\nthis : ∃ a_1, a_1 * a = y\n⊢ i ∈ Submodule.span R {a * b}\n[PROOFSTEP]\nobtain ⟨v, rfl⟩ := this\n[GOAL]\ncase He.mk.intro.refine'_1.intro\nR : Type u\nM : Type v\ninst✝ : CommRing R\nH : ∀ (P : Ideal R), IsPrime P → IsPrincipal P\nJ : Ideal R\nhJ : J ∈ nonPrincipals R\nI : Ideal R\nIbad : I ∈ nonPrincipals R\nImax : ∀ (z : Ideal R), z ∈ nonPrincipals R → I ≤ z → z = I\nImax' : ∀ {J : Ideal R}, I < J → IsPrincipal J\nhI1 : ¬I = ⊤\nx a b i : R\nhi : i ∈ I\nhisup : ∃ a_1, a_1 * a = i\nv : R\nhxy : x * (v * a) ∈ I\nhy : ¬v * a ∈ I\nha : I ⊔ Ideal.span {v * a} = Submodule.span R {a}\nhb : colon I (Ideal.span {v * a}) = Submodule.span R {b}\n⊢ i ∈ Submodule.span R {a * b}\n[PROOFSTEP]\nobtain ⟨u, rfl⟩ := hisup\n[GOAL]\ncase He.mk.intro.refine'_1.intro.intro\nR : Type u\nM : Type v\ninst✝ : CommRing R\nH : ∀ (P : Ideal R), IsPrime P → IsPrincipal P\nJ : Ideal R\nhJ : J ∈ nonPrincipals R\nI : Ideal R\nIbad : I ∈ nonPrincipals R\nImax : ∀ (z : Ideal R), z ∈ nonPrincipals R → I ≤ z → z = I\nImax' : ∀ {J : Ideal R}, I < J → IsPrincipal J\nhI1 : ¬I = ⊤\nx a b v : R\nhxy : x * (v * a) ∈ I\nhy : ¬v * a ∈ I\nha : I ⊔ Ideal.span {v * a} = Submodule.span R {a}\nhb : colon I (Ideal.span {v * a}) = Submodule.span R {b}\nu : R\nhi : u * a ∈ I\n⊢ u * a ∈ Submodule.span R {a * b}\n[PROOFSTEP]\nhave hucolon : u ∈ I.colon (span {v * a}) :=\n by\n rw [Ideal.mem_colon_singleton, mul_comm v, ← mul_assoc]\n exact mul_mem_right _ _ hi\n[GOAL]\nR : Type u\nM : Type v\ninst✝ : CommRing R\nH : ∀ (P : Ideal R), IsPrime P → IsPrincipal P\nJ : Ideal R\nhJ : J ∈ nonPrincipals R\nI : Ideal R\nIbad : I ∈ nonPrincipals R\nImax : ∀ (z : Ideal R), z ∈ nonPrincipals R → I ≤ z → z = I\nImax' : ∀ {J : Ideal R}, I < J → IsPrincipal J\nhI1 : ¬I = ⊤\nx a b v : R\nhxy : x * (v * a) ∈ I\nhy : ¬v * a ∈ I\nha : I ⊔ Ideal.span {v * a} = Submodule.span R {a}\nhb : colon I (Ideal.span {v * a}) = Submodule.span R {b}\nu : R\nhi : u * a ∈ I\n⊢ u ∈ colon I (Ideal.span {v * a})\n[PROOFSTEP]\nrw [Ideal.mem_colon_singleton, mul_comm v, ← mul_assoc]\n[GOAL]\nR : Type u\nM : Type v\ninst✝ : CommRing R\nH : ∀ (P : Ideal R), IsPrime P → IsPrincipal P\nJ : Ideal R\nhJ : J ∈ nonPrincipals R\nI : Ideal R\nIbad : I ∈ nonPrincipals R\nImax : ∀ (z : Ideal R), z ∈ nonPrincipals R → I ≤ z → z = I\nImax' : ∀ {J : Ideal R}, I < J → IsPrincipal J\nhI1 : ¬I = ⊤\nx a b v : R\nhxy : x * (v * a) ∈ I\nhy : ¬v * a ∈ I\nha : I ⊔ Ideal.span {v * a} = Submodule.span R {a}\nhb : colon I (Ideal.span {v * a}) = Submodule.span R {b}\nu : R\nhi : u * a ∈ I\n⊢ u * a * v ∈ I\n[PROOFSTEP]\nexact mul_mem_right _ _ hi\n[GOAL]\ncase He.mk.intro.refine'_1.intro.intro\nR : Type u\nM : Type v\ninst✝ : CommRing R\nH : ∀ (P : Ideal R), IsPrime P → IsPrincipal P\nJ : Ideal R\nhJ : J ∈ nonPrincipals R\nI : Ideal R\nIbad : I ∈ nonPrincipals R\nImax : ∀ (z : Ideal R), z ∈ nonPrincipals R → I ≤ z → z = I\nImax' : ∀ {J : Ideal R}, I < J → IsPrincipal J\nhI1 : ¬I = ⊤\nx a b v : R\nhxy : x * (v * a) ∈ I\nhy : ¬v * a ∈ I\nha : I ⊔ Ideal.span {v * a} = Submodule.span R {a}\nhb : colon I (Ideal.span {v * a}) = Submodule.span R {b}\nu : R\nhi : u * a ∈ I\nhucolon : u ∈ colon I (Ideal.span {v * a})\n⊢ u * a ∈ Submodule.span R {a * b}\n[PROOFSTEP]\nerw [hb, mem_span_singleton'] at hucolon \n[GOAL]\ncase He.mk.intro.refine'_1.intro.intro\nR : Type u\nM : Type v\ninst✝ : CommRing R\nH : ∀ (P : Ideal R), IsPrime P → IsPrincipal P\nJ : Ideal R\nhJ : J ∈ nonPrincipals R\nI : Ideal R\nIbad : I ∈ nonPrincipals R\nImax : ∀ (z : Ideal R), z ∈ nonPrincipals R → I ≤ z → z = I\nImax' : ∀ {J : Ideal R}, I < J → IsPrincipal J\nhI1 : ¬I = ⊤\nx a b v : R\nhxy : x * (v * a) ∈ I\nhy : ¬v * a ∈ I\nha : I ⊔ Ideal.span {v * a} = Submodule.span R {a}\nhb : colon I (Ideal.span {v * a}) = Submodule.span R {b}\nu : R\nhi : u * a ∈ I\nhucolon : ∃ a, a * b = u\n⊢ u * a ∈ Submodule.span R {a * b}\n[PROOFSTEP]\nobtain ⟨z, rfl⟩ := hucolon\n[GOAL]\ncase He.mk.intro.refine'_1.intro.intro.intro\nR : Type u\nM : Type v\ninst✝ : CommRing R\nH : ∀ (P : Ideal R), IsPrime P → IsPrincipal P\nJ : Ideal R\nhJ : J ∈ nonPrincipals R\nI : Ideal R\nIbad : I ∈ nonPrincipals R\nImax : ∀ (z : Ideal R), z ∈ nonPrincipals R → I ≤ z → z = I\nImax' : ∀ {J : Ideal R}, I < J → IsPrincipal J\nhI1 : ¬I = ⊤\nx a b v : R\nhxy : x * (v * a) ∈ I\nhy : ¬v * a ∈ I\nha : I ⊔ Ideal.span {v * a} = Submodule.span R {a}\nhb : colon I (Ideal.span {v * a}) = Submodule.span R {b}\nz : R\nhi : z * b * a ∈ I\n⊢ z * b * a ∈ Submodule.span R {a * b}\n[PROOFSTEP]\nexact mem_span_singleton'.2 ⟨z, by ring⟩\n[GOAL]\nR : Type u\nM : Type v\ninst✝ : CommRing R\nH : ∀ (P : Ideal R), IsPrime P → IsPrincipal P\nJ : Ideal R\nhJ : J ∈ nonPrincipals R\nI : Ideal R\nIbad : I ∈ nonPrincipals R\nImax : ∀ (z : Ideal R), z ∈ nonPrincipals R → I ≤ z → z = I\nImax' : ∀ {J : Ideal R}, I < J → IsPrincipal J\nhI1 : ¬I = ⊤\nx a b v : R\nhxy : x * (v * a) ∈ I\nhy : ¬v * a ∈ I\nha : I ⊔ Ideal.span {v * a} = Submodule.span R {a}\nhb : colon I (Ideal.span {v * a}) = Submodule.span R {b}\nz : R\nhi : z * b * a ∈ I\n⊢ z * (a * b) = z * b * a\n[PROOFSTEP]\nring\n[GOAL]\ncase He.mk.intro.refine'_2\nR : Type u\nM : Type v\ninst✝ : CommRing R\nH : ∀ (P : Ideal R), IsPrime P → IsPrincipal P\nJ : Ideal R\nhJ : J ∈ nonPrincipals R\nI : Ideal R\nIbad : I ∈ nonPrincipals R\nImax : ∀ (z : Ideal R), z ∈ nonPrincipals R → I ≤ z → z = I\nImax' : ∀ {J : Ideal R}, I < J → IsPrincipal J\nhI1 : ¬I = ⊤\nx y : R\nhxy : x * y ∈ I\nhy : ¬y ∈ I\na : R\nha : I ⊔ Ideal.span {y} = Submodule.span R {a}\nb : R\nhb : colon I (Ideal.span {y}) = Submodule.span R {b}\n⊢ Ideal.span {a} * Ideal.span {b} ≤ I\n[PROOFSTEP]\nrw [← Ideal.submodule_span_eq, ← ha, Ideal.sup_mul, sup_le_iff, span_singleton_mul_span_singleton, mul_comm y,\n Ideal.span_singleton_le_iff_mem]\n[GOAL]\ncase He.mk.intro.refine'_2\nR : Type u\nM : Type v\ninst✝ : CommRing R\nH : ∀ (P : Ideal R), IsPrime P → IsPrincipal P\nJ : Ideal R\nhJ : J ∈ nonPrincipals R\nI : Ideal R\nIbad : I ∈ nonPrincipals R\nImax : ∀ (z : Ideal R), z ∈ nonPrincipals R → I ≤ z → z = I\nImax' : ∀ {J : Ideal R}, I < J → IsPrincipal J\nhI1 : ¬I = ⊤\nx y : R\nhxy : x * y ∈ I\nhy : ¬y ∈ I\na : R\nha : I ⊔ Ideal.span {y} = Submodule.span R {a}\nb : R\nhb : colon I (Ideal.span {y}) = Submodule.span R {b}\n⊢ I * Ideal.span {b} ≤ I ∧ b * y ∈ I\n[PROOFSTEP]\nexact ⟨mul_le_right, Ideal.mem_colon_singleton.1 <| hb.symm ▸ Ideal.mem_span_singleton_self b⟩\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.PrincipalIdealDomain", "llama_tokens": 26572, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO", "lm_q1_score": 0.43014734858584286, "lm_q2_score": 0.02096424207972777, "lm_q1q2_score": 0.009017713145706657}} {"text": "[GOAL]\nB : Type u\ninst✝ : Quiver B\na b : B\nf g : Discrete (Path a b)\nη : f ⟶ g\n⊢ PrelaxFunctor.map₂ (preinclusion B) η = eqToHom (_ : (↑(preinclusion B)).map f = (↑(preinclusion B)).map g)\n[PROOFSTEP]\nrcases η with ⟨⟨⟩⟩\n[GOAL]\ncase up.up\nB : Type u\ninst✝ : Quiver B\na b : B\nf g : Discrete (Path a b)\ndown✝ : f.as = g.as\n⊢ PrelaxFunctor.map₂ (preinclusion B) { down := { down := down✝ } } =\n eqToHom (_ : (↑(preinclusion B)).map f = (↑(preinclusion B)).map g)\n[PROOFSTEP]\ncases Discrete.ext _ _ (by assumption)\n[GOAL]\nB : Type u\ninst✝ : Quiver B\na b : B\nf g : Discrete (Path a b)\ndown✝ : f.as = g.as\n⊢ ?m.4748.as = ?m.4749.as\n[PROOFSTEP]\nassumption\n[GOAL]\ncase up.up.refl\nB : Type u\ninst✝ : Quiver B\na b : B\nf : Discrete (Path a b)\ndown✝ : f.as = f.as\n⊢ PrelaxFunctor.map₂ (preinclusion B) { down := { down := down✝ } } =\n eqToHom (_ : (↑(preinclusion B)).map f = (↑(preinclusion B)).map f)\n[PROOFSTEP]\nconvert (inclusionPath a b).map_id _\n[GOAL]\nB : Type u\ninst✝ : Quiver B\na b c : B\np : Path a b\nf g : Hom b c\nη : f ⟶ g\n⊢ normalizeAux p f = normalizeAux p g\n[PROOFSTEP]\nrcases η with ⟨η'⟩\n[GOAL]\ncase mk\nB : Type u\ninst✝ : Quiver B\na b c : B\np : Path a b\nf g : Hom b c\nη : f ⟶ g\nη' : Hom₂ f g\n⊢ normalizeAux p f = normalizeAux p g\n[PROOFSTEP]\napply @congr_fun _ _ fun p => normalizeAux p f\n[GOAL]\ncase mk.h\nB : Type u\ninst✝ : Quiver B\na b c : B\np : Path a b\nf g : Hom b c\nη : f ⟶ g\nη' : Hom₂ f g\n⊢ (fun p => normalizeAux p f) = fun p => normalizeAux p g\n[PROOFSTEP]\nclear p η\n[GOAL]\ncase mk.h\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\nη' : Hom₂ f g\n⊢ (fun p => normalizeAux p f) = fun p => normalizeAux p g\n[PROOFSTEP]\ninduction η' with\n| vcomp _ _ _ _ => apply Eq.trans <;> assumption\n| whisker_left _ _ ih => funext; apply congr_fun ih\n| whisker_right _ _ ih => funext; apply congr_arg₂ _ (congr_fun ih _) rfl\n| _ => funext; rfl\n[GOAL]\ncase mk.h\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\nη' : Hom₂ f g\n⊢ (fun p => normalizeAux p f) = fun p => normalizeAux p g\n[PROOFSTEP]\ninduction η' with\n| vcomp _ _ _ _ => apply Eq.trans <;> assumption\n| whisker_left _ _ ih => funext; apply congr_fun ih\n| whisker_right _ _ ih => funext; apply congr_arg₂ _ (congr_fun ih _) rfl\n| _ => funext; rfl\n[GOAL]\ncase mk.h.vcomp\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ : FreeBicategory B\nf✝ g✝ h✝ : a✝ ⟶ b✝\nη✝ : Hom₂ f✝ g✝\nθ✝ : Hom₂ g✝ h✝\nη_ih✝ : (fun p => normalizeAux p f✝) = fun p => normalizeAux p g✝\nθ_ih✝ : (fun p => normalizeAux p g✝) = fun p => normalizeAux p h✝\n⊢ (fun p => normalizeAux p f✝) = fun p => normalizeAux p h✝\n[PROOFSTEP]\n\n| vcomp _ _ _ _ => apply Eq.trans <;> assumption\n[GOAL]\ncase mk.h.vcomp\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ : FreeBicategory B\nf✝ g✝ h✝ : a✝ ⟶ b✝\nη✝ : Hom₂ f✝ g✝\nθ✝ : Hom₂ g✝ h✝\nη_ih✝ : (fun p => normalizeAux p f✝) = fun p => normalizeAux p g✝\nθ_ih✝ : (fun p => normalizeAux p g✝) = fun p => normalizeAux p h✝\n⊢ (fun p => normalizeAux p f✝) = fun p => normalizeAux p h✝\n[PROOFSTEP]\napply Eq.trans\n[GOAL]\ncase mk.h.vcomp.h₁\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ : FreeBicategory B\nf✝ g✝ h✝ : a✝ ⟶ b✝\nη✝ : Hom₂ f✝ g✝\nθ✝ : Hom₂ g✝ h✝\nη_ih✝ : (fun p => normalizeAux p f✝) = fun p => normalizeAux p g✝\nθ_ih✝ : (fun p => normalizeAux p g✝) = fun p => normalizeAux p h✝\n⊢ (fun p => normalizeAux p f✝) = ?mk.h.vcomp.b\n[PROOFSTEP]\nassumption\n[GOAL]\ncase mk.h.vcomp.h₂\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ : FreeBicategory B\nf✝ g✝ h✝ : a✝ ⟶ b✝\nη✝ : Hom₂ f✝ g✝\nθ✝ : Hom₂ g✝ h✝\nη_ih✝ : (fun p => normalizeAux p f✝) = fun p => normalizeAux p g✝\nθ_ih✝ : (fun p => normalizeAux p g✝) = fun p => normalizeAux p h✝\n⊢ (fun p => normalizeAux p g✝) = fun p => normalizeAux p h✝\n[PROOFSTEP]\nassumption\n[GOAL]\ncase mk.h.whisker_left\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ c✝ : FreeBicategory B\nf✝ : a✝ ⟶ b✝\ng✝ h✝ : b✝ ⟶ c✝\nη✝ : Hom₂ g✝ h✝\nih : (fun p => normalizeAux p g✝) = fun p => normalizeAux p h✝\n⊢ (fun p => normalizeAux p (f✝ ≫ g✝)) = fun p => normalizeAux p (f✝ ≫ h✝)\n[PROOFSTEP]\n\n| whisker_left _ _ ih => funext; apply congr_fun ih\n[GOAL]\ncase mk.h.whisker_left\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ c✝ : FreeBicategory B\nf✝ : a✝ ⟶ b✝\ng✝ h✝ : b✝ ⟶ c✝\nη✝ : Hom₂ g✝ h✝\nih : (fun p => normalizeAux p g✝) = fun p => normalizeAux p h✝\n⊢ (fun p => normalizeAux p (f✝ ≫ g✝)) = fun p => normalizeAux p (f✝ ≫ h✝)\n[PROOFSTEP]\nfunext\n[GOAL]\ncase mk.h.whisker_left.h\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ c✝ : FreeBicategory B\nf✝ : a✝ ⟶ b✝\ng✝ h✝ : b✝ ⟶ c✝\nη✝ : Hom₂ g✝ h✝\nih : (fun p => normalizeAux p g✝) = fun p => normalizeAux p h✝\nx✝ : Path a a✝\n⊢ normalizeAux x✝ (f✝ ≫ g✝) = normalizeAux x✝ (f✝ ≫ h✝)\n[PROOFSTEP]\napply congr_fun ih\n[GOAL]\ncase mk.h.whisker_right\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ c✝ : FreeBicategory B\nf✝ g✝ : a✝ ⟶ b✝\nh✝ : b✝ ⟶ c✝\nη✝ : Hom₂ f✝ g✝\nih : (fun p => normalizeAux p f✝) = fun p => normalizeAux p g✝\n⊢ (fun p => normalizeAux p (Hom.comp f✝ h✝)) = fun p => normalizeAux p (Hom.comp g✝ h✝)\n[PROOFSTEP]\n\n| whisker_right _ _ ih => funext; apply congr_arg₂ _ (congr_fun ih _) rfl\n[GOAL]\ncase mk.h.whisker_right\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ c✝ : FreeBicategory B\nf✝ g✝ : a✝ ⟶ b✝\nh✝ : b✝ ⟶ c✝\nη✝ : Hom₂ f✝ g✝\nih : (fun p => normalizeAux p f✝) = fun p => normalizeAux p g✝\n⊢ (fun p => normalizeAux p (Hom.comp f✝ h✝)) = fun p => normalizeAux p (Hom.comp g✝ h✝)\n[PROOFSTEP]\nfunext\n[GOAL]\ncase mk.h.whisker_right.h\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ c✝ : FreeBicategory B\nf✝ g✝ : a✝ ⟶ b✝\nh✝ : b✝ ⟶ c✝\nη✝ : Hom₂ f✝ g✝\nih : (fun p => normalizeAux p f✝) = fun p => normalizeAux p g✝\nx✝ : Path a a✝\n⊢ normalizeAux x✝ (Hom.comp f✝ h✝) = normalizeAux x✝ (Hom.comp g✝ h✝)\n[PROOFSTEP]\napply congr_arg₂ _ (congr_fun ih _) rfl\n[GOAL]\ncase mk.h.id\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ : FreeBicategory B\nf✝ : a✝ ⟶ b✝\n⊢ (fun p => normalizeAux p f✝) = fun p => normalizeAux p f✝\n[PROOFSTEP]\n\n| _ => funext; rfl\n[GOAL]\ncase mk.h.id\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ : FreeBicategory B\nf✝ : a✝ ⟶ b✝\n⊢ (fun p => normalizeAux p f✝) = fun p => normalizeAux p f✝\n[PROOFSTEP]\nfunext\n[GOAL]\ncase mk.h.id.h\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ : FreeBicategory B\nf✝ : a✝ ⟶ b✝\nx✝ : Path a a✝\n⊢ normalizeAux x✝ f✝ = normalizeAux x✝ f✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mk.h.associator\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ c✝ d✝ : FreeBicategory B\nf✝ : a✝ ⟶ b✝\ng✝ : b✝ ⟶ c✝\nh✝ : c✝ ⟶ d✝\n⊢ (fun p => normalizeAux p ((f✝ ≫ g✝) ≫ h✝)) = fun p => normalizeAux p (f✝ ≫ g✝ ≫ h✝)\n[PROOFSTEP]\n\n| _ => funext; rfl\n[GOAL]\ncase mk.h.associator\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ c✝ d✝ : FreeBicategory B\nf✝ : a✝ ⟶ b✝\ng✝ : b✝ ⟶ c✝\nh✝ : c✝ ⟶ d✝\n⊢ (fun p => normalizeAux p ((f✝ ≫ g✝) ≫ h✝)) = fun p => normalizeAux p (f✝ ≫ g✝ ≫ h✝)\n[PROOFSTEP]\nfunext\n[GOAL]\ncase mk.h.associator.h\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ c✝ d✝ : FreeBicategory B\nf✝ : a✝ ⟶ b✝\ng✝ : b✝ ⟶ c✝\nh✝ : c✝ ⟶ d✝\nx✝ : Path a a✝\n⊢ normalizeAux x✝ ((f✝ ≫ g✝) ≫ h✝) = normalizeAux x✝ (f✝ ≫ g✝ ≫ h✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mk.h.associator_inv\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ c✝ d✝ : FreeBicategory B\nf✝ : a✝ ⟶ b✝\ng✝ : b✝ ⟶ c✝\nh✝ : c✝ ⟶ d✝\n⊢ (fun p => normalizeAux p (f✝ ≫ g✝ ≫ h✝)) = fun p => normalizeAux p ((f✝ ≫ g✝) ≫ h✝)\n[PROOFSTEP]\n\n| _ => funext; rfl\n[GOAL]\ncase mk.h.associator_inv\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ c✝ d✝ : FreeBicategory B\nf✝ : a✝ ⟶ b✝\ng✝ : b✝ ⟶ c✝\nh✝ : c✝ ⟶ d✝\n⊢ (fun p => normalizeAux p (f✝ ≫ g✝ ≫ h✝)) = fun p => normalizeAux p ((f✝ ≫ g✝) ≫ h✝)\n[PROOFSTEP]\nfunext\n[GOAL]\ncase mk.h.associator_inv.h\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ c✝ d✝ : FreeBicategory B\nf✝ : a✝ ⟶ b✝\ng✝ : b✝ ⟶ c✝\nh✝ : c✝ ⟶ d✝\nx✝ : Path a a✝\n⊢ normalizeAux x✝ (f✝ ≫ g✝ ≫ h✝) = normalizeAux x✝ ((f✝ ≫ g✝) ≫ h✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mk.h.right_unitor\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ : FreeBicategory B\nf✝ : a✝ ⟶ b✝\n⊢ (fun p => normalizeAux p (f✝ ≫ 𝟙 b✝)) = fun p => normalizeAux p f✝\n[PROOFSTEP]\n\n| _ => funext; rfl\n[GOAL]\ncase mk.h.right_unitor\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ : FreeBicategory B\nf✝ : a✝ ⟶ b✝\n⊢ (fun p => normalizeAux p (f✝ ≫ 𝟙 b✝)) = fun p => normalizeAux p f✝\n[PROOFSTEP]\nfunext\n[GOAL]\ncase mk.h.right_unitor.h\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ : FreeBicategory B\nf✝ : a✝ ⟶ b✝\nx✝ : Path a a✝\n⊢ normalizeAux x✝ (f✝ ≫ 𝟙 b✝) = normalizeAux x✝ f✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mk.h.right_unitor_inv\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ : FreeBicategory B\nf✝ : a✝ ⟶ b✝\n⊢ (fun p => normalizeAux p f✝) = fun p => normalizeAux p (f✝ ≫ 𝟙 b✝)\n[PROOFSTEP]\n\n| _ => funext; rfl\n[GOAL]\ncase mk.h.right_unitor_inv\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ : FreeBicategory B\nf✝ : a✝ ⟶ b✝\n⊢ (fun p => normalizeAux p f✝) = fun p => normalizeAux p (f✝ ≫ 𝟙 b✝)\n[PROOFSTEP]\nfunext\n[GOAL]\ncase mk.h.right_unitor_inv.h\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ : FreeBicategory B\nf✝ : a✝ ⟶ b✝\nx✝ : Path a a✝\n⊢ normalizeAux x✝ f✝ = normalizeAux x✝ (f✝ ≫ 𝟙 b✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mk.h.left_unitor\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ : FreeBicategory B\nf✝ : a✝ ⟶ b✝\n⊢ (fun p => normalizeAux p (𝟙 a✝ ≫ f✝)) = fun p => normalizeAux p f✝\n[PROOFSTEP]\n\n| _ => funext; rfl\n[GOAL]\ncase mk.h.left_unitor\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ : FreeBicategory B\nf✝ : a✝ ⟶ b✝\n⊢ (fun p => normalizeAux p (𝟙 a✝ ≫ f✝)) = fun p => normalizeAux p f✝\n[PROOFSTEP]\nfunext\n[GOAL]\ncase mk.h.left_unitor.h\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ : FreeBicategory B\nf✝ : a✝ ⟶ b✝\nx✝ : Path a a✝\n⊢ normalizeAux x✝ (𝟙 a✝ ≫ f✝) = normalizeAux x✝ f✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mk.h.left_unitor_inv\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ : FreeBicategory B\nf✝ : a✝ ⟶ b✝\n⊢ (fun p => normalizeAux p f✝) = fun p => normalizeAux p (𝟙 a✝ ≫ f✝)\n[PROOFSTEP]\n\n| _ => funext; rfl\n[GOAL]\ncase mk.h.left_unitor_inv\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ : FreeBicategory B\nf✝ : a✝ ⟶ b✝\n⊢ (fun p => normalizeAux p f✝) = fun p => normalizeAux p (𝟙 a✝ ≫ f✝)\n[PROOFSTEP]\nfunext\n[GOAL]\ncase mk.h.left_unitor_inv.h\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ : FreeBicategory B\nf✝ : a✝ ⟶ b✝\nx✝ : Path a a✝\n⊢ normalizeAux x✝ f✝ = normalizeAux x✝ (𝟙 a✝ ≫ f✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nB : Type u\ninst✝ : Quiver B\na b c : B\np : Path a b\nf g : Hom b c\nη : f ⟶ g\n⊢ (↑(preinclusion B)).map { as := p } ◁ η ≫ (normalizeIso p g).hom =\n (normalizeIso p f).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p f } = { as := normalizeAux p g }))\n[PROOFSTEP]\nrcases η with ⟨η'⟩\n[GOAL]\ncase mk\nB : Type u\ninst✝ : Quiver B\na b c : B\np : Path a b\nf g : Hom b c\nη : f ⟶ g\nη' : Hom₂ f g\n⊢ (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel η' ≫ (normalizeIso p g).hom =\n (normalizeIso p f).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p f } = { as := normalizeAux p g }))\n[PROOFSTEP]\nclear η\n[GOAL]\ncase mk\nB : Type u\ninst✝ : Quiver B\na b c : B\np : Path a b\nf g : Hom b c\nη' : Hom₂ f g\n⊢ (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel η' ≫ (normalizeIso p g).hom =\n (normalizeIso p f).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p f } = { as := normalizeAux p g }))\n[PROOFSTEP]\ninduction η' with\n| id => simp\n| vcomp η θ ihf ihg =>\n simp only [mk_vcomp, Bicategory.whiskerLeft_comp]\n slice_lhs 2 3 => rw [ihg]\n slice_lhs 1 2 => rw [ihf]\n simp\n -- p ≠ nil required! See the docstring of `normalizeAux`.\n| whisker_left _ _ ih =>\n dsimp\n rw [associator_inv_naturality_right_assoc, whisker_exchange_assoc, ih]\n simp\n| whisker_right h η' ih =>\n dsimp\n rw [associator_inv_naturality_middle_assoc, ← comp_whiskerRight_assoc, ih, comp_whiskerRight]\n have := dcongr_arg (fun x => (normalizeIso x h).hom) (normalizeAux_congr p (Quot.mk _ η'))\n dsimp at this ; simp [this]\n| _ => simp\n[GOAL]\ncase mk\nB : Type u\ninst✝ : Quiver B\na b c : B\np : Path a b\nf g : Hom b c\nη' : Hom₂ f g\n⊢ (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel η' ≫ (normalizeIso p g).hom =\n (normalizeIso p f).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p f } = { as := normalizeAux p g }))\n[PROOFSTEP]\ninduction η' with\n| id => simp\n| vcomp η θ ihf ihg =>\n simp only [mk_vcomp, Bicategory.whiskerLeft_comp]\n slice_lhs 2 3 => rw [ihg]\n slice_lhs 1 2 => rw [ihf]\n simp\n -- p ≠ nil required! See the docstring of `normalizeAux`.\n| whisker_left _ _ ih =>\n dsimp\n rw [associator_inv_naturality_right_assoc, whisker_exchange_assoc, ih]\n simp\n| whisker_right h η' ih =>\n dsimp\n rw [associator_inv_naturality_middle_assoc, ← comp_whiskerRight_assoc, ih, comp_whiskerRight]\n have := dcongr_arg (fun x => (normalizeIso x h).hom) (normalizeAux_congr p (Quot.mk _ η'))\n dsimp at this ; simp [this]\n| _ => simp\n[GOAL]\ncase mk.id\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ : FreeBicategory B\nf✝ : a✝ ⟶ b✝\np : Path a a✝\n⊢ (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel (Hom₂.id f✝) ≫ (normalizeIso p f✝).hom =\n (normalizeIso p f✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p f✝ } = { as := normalizeAux p f✝ }))\n[PROOFSTEP]\n\n| id => simp\n[GOAL]\ncase mk.id\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ : FreeBicategory B\nf✝ : a✝ ⟶ b✝\np : Path a a✝\n⊢ (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel (Hom₂.id f✝) ≫ (normalizeIso p f✝).hom =\n (normalizeIso p f✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p f✝ } = { as := normalizeAux p f✝ }))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.vcomp\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ : FreeBicategory B\nf✝ g✝ h✝ : a✝ ⟶ b✝\nη : Hom₂ f✝ g✝\nθ : Hom₂ g✝ h✝\nihf :\n ∀ (p : Path a a✝),\n (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel η ≫ (normalizeIso p g✝).hom =\n (normalizeIso p f✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p f✝ } = { as := normalizeAux p g✝ }))\nihg :\n ∀ (p : Path a a✝),\n (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel θ ≫ (normalizeIso p h✝).hom =\n (normalizeIso p g✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p g✝ } = { as := normalizeAux p h✝ }))\np : Path a a✝\n⊢ (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel (Hom₂.vcomp η θ) ≫ (normalizeIso p h✝).hom =\n (normalizeIso p f✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p f✝ } = { as := normalizeAux p h✝ }))\n[PROOFSTEP]\n\n| vcomp η θ ihf ihg =>\n simp only [mk_vcomp, Bicategory.whiskerLeft_comp]\n slice_lhs 2 3 => rw [ihg]\n slice_lhs 1 2 => rw [ihf]\n simp\n -- p ≠ nil required! See the docstring of `normalizeAux`.\n[GOAL]\ncase mk.vcomp\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ : FreeBicategory B\nf✝ g✝ h✝ : a✝ ⟶ b✝\nη : Hom₂ f✝ g✝\nθ : Hom₂ g✝ h✝\nihf :\n ∀ (p : Path a a✝),\n (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel η ≫ (normalizeIso p g✝).hom =\n (normalizeIso p f✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p f✝ } = { as := normalizeAux p g✝ }))\nihg :\n ∀ (p : Path a a✝),\n (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel θ ≫ (normalizeIso p h✝).hom =\n (normalizeIso p g✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p g✝ } = { as := normalizeAux p h✝ }))\np : Path a a✝\n⊢ (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel (Hom₂.vcomp η θ) ≫ (normalizeIso p h✝).hom =\n (normalizeIso p f✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p f✝ } = { as := normalizeAux p h✝ }))\n[PROOFSTEP]\nsimp only [mk_vcomp, Bicategory.whiskerLeft_comp]\n[GOAL]\ncase mk.vcomp\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ : FreeBicategory B\nf✝ g✝ h✝ : a✝ ⟶ b✝\nη : Hom₂ f✝ g✝\nθ : Hom₂ g✝ h✝\nihf :\n ∀ (p : Path a a✝),\n (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel η ≫ (normalizeIso p g✝).hom =\n (normalizeIso p f✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p f✝ } = { as := normalizeAux p g✝ }))\nihg :\n ∀ (p : Path a a✝),\n (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel θ ≫ (normalizeIso p h✝).hom =\n (normalizeIso p g✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p g✝ } = { as := normalizeAux p h✝ }))\np : Path a a✝\n⊢ ((↑(preinclusion B)).map { as := p } ◁ Hom₂.mk η ≫ (↑(preinclusion B)).map { as := p } ◁ Hom₂.mk θ) ≫\n (normalizeIso p h✝).hom =\n (normalizeIso p f✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p f✝ } = { as := normalizeAux p h✝ }))\n[PROOFSTEP]\nslice_lhs 2 3 => rw [ihg]\n[GOAL]\ncase a\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ : FreeBicategory B\nf✝ g✝ h✝ : a✝ ⟶ b✝\nη : Hom₂ f✝ g✝\nθ : Hom₂ g✝ h✝\nihf :\n ∀ (p : Path a a✝),\n (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel η ≫ (normalizeIso p g✝).hom =\n (normalizeIso p f✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p f✝ } = { as := normalizeAux p g✝ }))\nihg :\n ∀ (p : Path a a✝),\n (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel θ ≫ (normalizeIso p h✝).hom =\n (normalizeIso p g✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p g✝ } = { as := normalizeAux p h✝ }))\np : Path a a✝\n| (↑(preinclusion B)).map { as := p } ◁ Hom₂.mk θ ≫ (normalizeIso p h✝).hom\ncase a\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ : FreeBicategory B\nf✝ g✝ h✝ : a✝ ⟶ b✝\nη : Hom₂ f✝ g✝\nθ : Hom₂ g✝ h✝\nihf :\n ∀ (p : Path a a✝),\n (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel η ≫ (normalizeIso p g✝).hom =\n (normalizeIso p f✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p f✝ } = { as := normalizeAux p g✝ }))\nihg :\n ∀ (p : Path a a✝),\n (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel θ ≫ (normalizeIso p h✝).hom =\n (normalizeIso p g✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p g✝ } = { as := normalizeAux p h✝ }))\np : Path a a✝\n| (↑(preinclusion B)).map { as := p } ◁ Hom₂.mk η\n[PROOFSTEP]\nrw [ihg]\n[GOAL]\ncase a\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ : FreeBicategory B\nf✝ g✝ h✝ : a✝ ⟶ b✝\nη : Hom₂ f✝ g✝\nθ : Hom₂ g✝ h✝\nihf :\n ∀ (p : Path a a✝),\n (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel η ≫ (normalizeIso p g✝).hom =\n (normalizeIso p f✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p f✝ } = { as := normalizeAux p g✝ }))\nihg :\n ∀ (p : Path a a✝),\n (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel θ ≫ (normalizeIso p h✝).hom =\n (normalizeIso p g✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p g✝ } = { as := normalizeAux p h✝ }))\np : Path a a✝\n| (↑(preinclusion B)).map { as := p } ◁ Hom₂.mk θ ≫ (normalizeIso p h✝).hom\ncase a\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ : FreeBicategory B\nf✝ g✝ h✝ : a✝ ⟶ b✝\nη : Hom₂ f✝ g✝\nθ : Hom₂ g✝ h✝\nihf :\n ∀ (p : Path a a✝),\n (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel η ≫ (normalizeIso p g✝).hom =\n (normalizeIso p f✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p f✝ } = { as := normalizeAux p g✝ }))\nihg :\n ∀ (p : Path a a✝),\n (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel θ ≫ (normalizeIso p h✝).hom =\n (normalizeIso p g✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p g✝ } = { as := normalizeAux p h✝ }))\np : Path a a✝\n| (↑(preinclusion B)).map { as := p } ◁ Hom₂.mk η\n[PROOFSTEP]\nrw [ihg]\n[GOAL]\ncase a\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ : FreeBicategory B\nf✝ g✝ h✝ : a✝ ⟶ b✝\nη : Hom₂ f✝ g✝\nθ : Hom₂ g✝ h✝\nihf :\n ∀ (p : Path a a✝),\n (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel η ≫ (normalizeIso p g✝).hom =\n (normalizeIso p f✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p f✝ } = { as := normalizeAux p g✝ }))\nihg :\n ∀ (p : Path a a✝),\n (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel θ ≫ (normalizeIso p h✝).hom =\n (normalizeIso p g✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p g✝ } = { as := normalizeAux p h✝ }))\np : Path a a✝\n| (↑(preinclusion B)).map { as := p } ◁ Hom₂.mk θ ≫ (normalizeIso p h✝).hom\ncase a\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ : FreeBicategory B\nf✝ g✝ h✝ : a✝ ⟶ b✝\nη : Hom₂ f✝ g✝\nθ : Hom₂ g✝ h✝\nihf :\n ∀ (p : Path a a✝),\n (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel η ≫ (normalizeIso p g✝).hom =\n (normalizeIso p f✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p f✝ } = { as := normalizeAux p g✝ }))\nihg :\n ∀ (p : Path a a✝),\n (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel θ ≫ (normalizeIso p h✝).hom =\n (normalizeIso p g✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p g✝ } = { as := normalizeAux p h✝ }))\np : Path a a✝\n| (↑(preinclusion B)).map { as := p } ◁ Hom₂.mk η\n[PROOFSTEP]\nrw [ihg]\n[GOAL]\ncase mk.vcomp\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ : FreeBicategory B\nf✝ g✝ h✝ : a✝ ⟶ b✝\nη : Hom₂ f✝ g✝\nθ : Hom₂ g✝ h✝\nihf :\n ∀ (p : Path a a✝),\n (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel η ≫ (normalizeIso p g✝).hom =\n (normalizeIso p f✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p f✝ } = { as := normalizeAux p g✝ }))\nihg :\n ∀ (p : Path a a✝),\n (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel θ ≫ (normalizeIso p h✝).hom =\n (normalizeIso p g✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p g✝ } = { as := normalizeAux p h✝ }))\np : Path a a✝\n⊢ (↑(preinclusion B)).map { as := p } ◁ Hom₂.mk η ≫\n (normalizeIso p g✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p g✝ } = { as := normalizeAux p h✝ })) =\n (normalizeIso p f✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p f✝ } = { as := normalizeAux p h✝ }))\n[PROOFSTEP]\nslice_lhs 1 2 => rw [ihf]\n[GOAL]\ncase a\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ : FreeBicategory B\nf✝ g✝ h✝ : a✝ ⟶ b✝\nη : Hom₂ f✝ g✝\nθ : Hom₂ g✝ h✝\nihf :\n ∀ (p : Path a a✝),\n (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel η ≫ (normalizeIso p g✝).hom =\n (normalizeIso p f✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p f✝ } = { as := normalizeAux p g✝ }))\nihg :\n ∀ (p : Path a a✝),\n (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel θ ≫ (normalizeIso p h✝).hom =\n (normalizeIso p g✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p g✝ } = { as := normalizeAux p h✝ }))\np : Path a a✝\n| (↑(preinclusion B)).map { as := p } ◁ Hom₂.mk η ≫ (normalizeIso p g✝).hom\ncase a\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ : FreeBicategory B\nf✝ g✝ h✝ : a✝ ⟶ b✝\nη : Hom₂ f✝ g✝\nθ : Hom₂ g✝ h✝\nihf :\n ∀ (p : Path a a✝),\n (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel η ≫ (normalizeIso p g✝).hom =\n (normalizeIso p f✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p f✝ } = { as := normalizeAux p g✝ }))\nihg :\n ∀ (p : Path a a✝),\n (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel θ ≫ (normalizeIso p h✝).hom =\n (normalizeIso p g✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p g✝ } = { as := normalizeAux p h✝ }))\np : Path a a✝\n| PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p g✝ } = { as := normalizeAux p h✝ }))\n[PROOFSTEP]\nrw [ihf]\n[GOAL]\ncase a\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ : FreeBicategory B\nf✝ g✝ h✝ : a✝ ⟶ b✝\nη : Hom₂ f✝ g✝\nθ : Hom₂ g✝ h✝\nihf :\n ∀ (p : Path a a✝),\n (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel η ≫ (normalizeIso p g✝).hom =\n (normalizeIso p f✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p f✝ } = { as := normalizeAux p g✝ }))\nihg :\n ∀ (p : Path a a✝),\n (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel θ ≫ (normalizeIso p h✝).hom =\n (normalizeIso p g✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p g✝ } = { as := normalizeAux p h✝ }))\np : Path a a✝\n| (↑(preinclusion B)).map { as := p } ◁ Hom₂.mk η ≫ (normalizeIso p g✝).hom\ncase a\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ : FreeBicategory B\nf✝ g✝ h✝ : a✝ ⟶ b✝\nη : Hom₂ f✝ g✝\nθ : Hom₂ g✝ h✝\nihf :\n ∀ (p : Path a a✝),\n (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel η ≫ (normalizeIso p g✝).hom =\n (normalizeIso p f✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p f✝ } = { as := normalizeAux p g✝ }))\nihg :\n ∀ (p : Path a a✝),\n (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel θ ≫ (normalizeIso p h✝).hom =\n (normalizeIso p g✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p g✝ } = { as := normalizeAux p h✝ }))\np : Path a a✝\n| PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p g✝ } = { as := normalizeAux p h✝ }))\n[PROOFSTEP]\nrw [ihf]\n[GOAL]\ncase a\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ : FreeBicategory B\nf✝ g✝ h✝ : a✝ ⟶ b✝\nη : Hom₂ f✝ g✝\nθ : Hom₂ g✝ h✝\nihf :\n ∀ (p : Path a a✝),\n (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel η ≫ (normalizeIso p g✝).hom =\n (normalizeIso p f✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p f✝ } = { as := normalizeAux p g✝ }))\nihg :\n ∀ (p : Path a a✝),\n (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel θ ≫ (normalizeIso p h✝).hom =\n (normalizeIso p g✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p g✝ } = { as := normalizeAux p h✝ }))\np : Path a a✝\n| (↑(preinclusion B)).map { as := p } ◁ Hom₂.mk η ≫ (normalizeIso p g✝).hom\ncase a\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ : FreeBicategory B\nf✝ g✝ h✝ : a✝ ⟶ b✝\nη : Hom₂ f✝ g✝\nθ : Hom₂ g✝ h✝\nihf :\n ∀ (p : Path a a✝),\n (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel η ≫ (normalizeIso p g✝).hom =\n (normalizeIso p f✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p f✝ } = { as := normalizeAux p g✝ }))\nihg :\n ∀ (p : Path a a✝),\n (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel θ ≫ (normalizeIso p h✝).hom =\n (normalizeIso p g✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p g✝ } = { as := normalizeAux p h✝ }))\np : Path a a✝\n| PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p g✝ } = { as := normalizeAux p h✝ }))\n[PROOFSTEP]\nrw [ihf]\n[GOAL]\ncase mk.vcomp\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ : FreeBicategory B\nf✝ g✝ h✝ : a✝ ⟶ b✝\nη : Hom₂ f✝ g✝\nθ : Hom₂ g✝ h✝\nihf :\n ∀ (p : Path a a✝),\n (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel η ≫ (normalizeIso p g✝).hom =\n (normalizeIso p f✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p f✝ } = { as := normalizeAux p g✝ }))\nihg :\n ∀ (p : Path a a✝),\n (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel θ ≫ (normalizeIso p h✝).hom =\n (normalizeIso p g✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p g✝ } = { as := normalizeAux p h✝ }))\np : Path a a✝\n⊢ ((normalizeIso p f✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p f✝ } = { as := normalizeAux p g✝ }))) ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p g✝ } = { as := normalizeAux p h✝ })) =\n (normalizeIso p f✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p f✝ } = { as := normalizeAux p h✝ }))\n[PROOFSTEP]\nsimp\n -- p ≠ nil required! See the docstring of `normalizeAux`.\n[GOAL]\ncase mk.whisker_left\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ c✝ : FreeBicategory B\nf✝ : a✝ ⟶ b✝\ng✝ h✝ : b✝ ⟶ c✝\nη✝ : Hom₂ g✝ h✝\nih :\n ∀ (p : Path a b✝),\n (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel η✝ ≫ (normalizeIso p h✝).hom =\n (normalizeIso p g✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p g✝ } = { as := normalizeAux p h✝ }))\np : Path a a✝\n⊢ (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel (Hom₂.whisker_left f✝ η✝) ≫ (normalizeIso p (f✝ ≫ h✝)).hom =\n (normalizeIso p (f✝ ≫ g✝)).hom ≫\n PrelaxFunctor.map₂ (preinclusion B)\n (eqToHom (_ : { as := normalizeAux p (f✝ ≫ g✝) } = { as := normalizeAux p (f✝ ≫ h✝) }))\n[PROOFSTEP]\n\n| whisker_left _ _ ih =>\n dsimp\n rw [associator_inv_naturality_right_assoc, whisker_exchange_assoc, ih]\n simp\n[GOAL]\ncase mk.whisker_left\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ c✝ : FreeBicategory B\nf✝ : a✝ ⟶ b✝\ng✝ h✝ : b✝ ⟶ c✝\nη✝ : Hom₂ g✝ h✝\nih :\n ∀ (p : Path a b✝),\n (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel η✝ ≫ (normalizeIso p h✝).hom =\n (normalizeIso p g✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p g✝ } = { as := normalizeAux p h✝ }))\np : Path a a✝\n⊢ (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel (Hom₂.whisker_left f✝ η✝) ≫ (normalizeIso p (f✝ ≫ h✝)).hom =\n (normalizeIso p (f✝ ≫ g✝)).hom ≫\n PrelaxFunctor.map₂ (preinclusion B)\n (eqToHom (_ : { as := normalizeAux p (f✝ ≫ g✝) } = { as := normalizeAux p (f✝ ≫ h✝) }))\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase mk.whisker_left\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ c✝ : FreeBicategory B\nf✝ : a✝ ⟶ b✝\ng✝ h✝ : b✝ ⟶ c✝\nη✝ : Hom₂ g✝ h✝\nih :\n ∀ (p : Path a b✝),\n (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel η✝ ≫ (normalizeIso p h✝).hom =\n (normalizeIso p g✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p g✝ } = { as := normalizeAux p h✝ }))\np : Path a a✝\n⊢ (↑(preinclusion B)).map { as := p } ◁ f✝ ◁ Hom₂.mk η✝ ≫\n (α_ ((↑(preinclusion B)).map { as := p }) f✝ h✝).inv ≫\n (normalizeIso p f✝).hom ▷ h✝ ≫ (normalizeIso (normalizeAux p f✝) h✝).hom =\n ((α_ ((↑(preinclusion B)).map { as := p }) f✝ g✝).inv ≫\n (normalizeIso p f✝).hom ▷ g✝ ≫ (normalizeIso (normalizeAux p f✝) g✝).hom) ≫\n PrelaxFunctor.map₂ (preinclusion B)\n (eqToHom (_ : { as := normalizeAux (normalizeAux p f✝) g✝ } = { as := normalizeAux (normalizeAux p f✝) h✝ }))\n[PROOFSTEP]\nrw [associator_inv_naturality_right_assoc, whisker_exchange_assoc, ih]\n[GOAL]\ncase mk.whisker_left\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ c✝ : FreeBicategory B\nf✝ : a✝ ⟶ b✝\ng✝ h✝ : b✝ ⟶ c✝\nη✝ : Hom₂ g✝ h✝\nih :\n ∀ (p : Path a b✝),\n (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel η✝ ≫ (normalizeIso p h✝).hom =\n (normalizeIso p g✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p g✝ } = { as := normalizeAux p h✝ }))\np : Path a a✝\n⊢ (α_ ((↑(preinclusion B)).map { as := p }) f✝ g✝).inv ≫\n (normalizeIso p f✝).hom ▷ g✝ ≫\n (normalizeIso (normalizeAux p f✝) g✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B)\n (eqToHom\n (_ : { as := normalizeAux (normalizeAux p f✝) g✝ } = { as := normalizeAux (normalizeAux p f✝) h✝ })) =\n ((α_ ((↑(preinclusion B)).map { as := p }) f✝ g✝).inv ≫\n (normalizeIso p f✝).hom ▷ g✝ ≫ (normalizeIso (normalizeAux p f✝) g✝).hom) ≫\n PrelaxFunctor.map₂ (preinclusion B)\n (eqToHom (_ : { as := normalizeAux (normalizeAux p f✝) g✝ } = { as := normalizeAux (normalizeAux p f✝) h✝ }))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.whisker_right\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ c✝ : FreeBicategory B\nf✝ g✝ : a✝ ⟶ b✝\nh : b✝ ⟶ c✝\nη' : Hom₂ f✝ g✝\nih :\n ∀ (p : Path a a✝),\n (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel η' ≫ (normalizeIso p g✝).hom =\n (normalizeIso p f✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p f✝ } = { as := normalizeAux p g✝ }))\np : Path a a✝\n⊢ (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel (Hom₂.whisker_right h η') ≫ (normalizeIso p (Hom.comp g✝ h)).hom =\n (normalizeIso p (Hom.comp f✝ h)).hom ≫\n PrelaxFunctor.map₂ (preinclusion B)\n (eqToHom (_ : { as := normalizeAux p (Hom.comp f✝ h) } = { as := normalizeAux p (Hom.comp g✝ h) }))\n[PROOFSTEP]\n\n| whisker_right h η' ih =>\n dsimp\n rw [associator_inv_naturality_middle_assoc, ← comp_whiskerRight_assoc, ih, comp_whiskerRight]\n have := dcongr_arg (fun x => (normalizeIso x h).hom) (normalizeAux_congr p (Quot.mk _ η'))\n dsimp at this ; simp [this]\n[GOAL]\ncase mk.whisker_right\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ c✝ : FreeBicategory B\nf✝ g✝ : a✝ ⟶ b✝\nh : b✝ ⟶ c✝\nη' : Hom₂ f✝ g✝\nih :\n ∀ (p : Path a a✝),\n (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel η' ≫ (normalizeIso p g✝).hom =\n (normalizeIso p f✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p f✝ } = { as := normalizeAux p g✝ }))\np : Path a a✝\n⊢ (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel (Hom₂.whisker_right h η') ≫ (normalizeIso p (Hom.comp g✝ h)).hom =\n (normalizeIso p (Hom.comp f✝ h)).hom ≫\n PrelaxFunctor.map₂ (preinclusion B)\n (eqToHom (_ : { as := normalizeAux p (Hom.comp f✝ h) } = { as := normalizeAux p (Hom.comp g✝ h) }))\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase mk.whisker_right\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ c✝ : FreeBicategory B\nf✝ g✝ : a✝ ⟶ b✝\nh : b✝ ⟶ c✝\nη' : Hom₂ f✝ g✝\nih :\n ∀ (p : Path a a✝),\n (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel η' ≫ (normalizeIso p g✝).hom =\n (normalizeIso p f✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p f✝ } = { as := normalizeAux p g✝ }))\np : Path a a✝\n⊢ (↑(preinclusion B)).map { as := p } ◁ Hom₂.mk η' ▷ h ≫\n (α_ ((↑(preinclusion B)).map { as := p }) g✝ h).inv ≫\n (normalizeIso p g✝).hom ▷ h ≫ (normalizeIso (normalizeAux p g✝) h).hom =\n ((α_ ((↑(preinclusion B)).map { as := p }) f✝ h).inv ≫\n (normalizeIso p f✝).hom ▷ h ≫ (normalizeIso (normalizeAux p f✝) h).hom) ≫\n PrelaxFunctor.map₂ (preinclusion B)\n (eqToHom (_ : { as := normalizeAux (normalizeAux p f✝) h } = { as := normalizeAux (normalizeAux p g✝) h }))\n[PROOFSTEP]\nrw [associator_inv_naturality_middle_assoc, ← comp_whiskerRight_assoc, ih, comp_whiskerRight]\n[GOAL]\ncase mk.whisker_right\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ c✝ : FreeBicategory B\nf✝ g✝ : a✝ ⟶ b✝\nh : b✝ ⟶ c✝\nη' : Hom₂ f✝ g✝\nih :\n ∀ (p : Path a a✝),\n (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel η' ≫ (normalizeIso p g✝).hom =\n (normalizeIso p f✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p f✝ } = { as := normalizeAux p g✝ }))\np : Path a a✝\n⊢ (α_ ((↑(preinclusion B)).map { as := p }) f✝ h).inv ≫\n ((normalizeIso p f✝).hom ▷ h ≫\n PrelaxFunctor.map₂ (preinclusion B)\n (eqToHom (_ : { as := normalizeAux p f✝ } = { as := normalizeAux p g✝ })) ▷\n h) ≫\n (normalizeIso (normalizeAux p g✝) h).hom =\n ((α_ ((↑(preinclusion B)).map { as := p }) f✝ h).inv ≫\n (normalizeIso p f✝).hom ▷ h ≫ (normalizeIso (normalizeAux p f✝) h).hom) ≫\n PrelaxFunctor.map₂ (preinclusion B)\n (eqToHom (_ : { as := normalizeAux (normalizeAux p f✝) h } = { as := normalizeAux (normalizeAux p g✝) h }))\n[PROOFSTEP]\nhave := dcongr_arg (fun x => (normalizeIso x h).hom) (normalizeAux_congr p (Quot.mk _ η'))\n[GOAL]\ncase mk.whisker_right\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ c✝ : FreeBicategory B\nf✝ g✝ : a✝ ⟶ b✝\nh : b✝ ⟶ c✝\nη' : Hom₂ f✝ g✝\nih :\n ∀ (p : Path a a✝),\n (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel η' ≫ (normalizeIso p g✝).hom =\n (normalizeIso p f✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p f✝ } = { as := normalizeAux p g✝ }))\np : Path a a✝\nthis :\n (normalizeIso (normalizeAux p f✝) h).hom =\n eqToHom\n (_ :\n (↑(preinclusion B)).map { as := normalizeAux p f✝ } ≫ h =\n (↑(preinclusion B)).map { as := normalizeAux p g✝ } ≫ h) ≫\n (normalizeIso (normalizeAux p g✝) h).hom ≫\n eqToHom\n (_ :\n (↑(preinclusion B)).map { as := normalizeAux (normalizeAux p g✝) h } =\n (↑(preinclusion B)).map { as := normalizeAux (normalizeAux p f✝) h })\n⊢ (α_ ((↑(preinclusion B)).map { as := p }) f✝ h).inv ≫\n ((normalizeIso p f✝).hom ▷ h ≫\n PrelaxFunctor.map₂ (preinclusion B)\n (eqToHom (_ : { as := normalizeAux p f✝ } = { as := normalizeAux p g✝ })) ▷\n h) ≫\n (normalizeIso (normalizeAux p g✝) h).hom =\n ((α_ ((↑(preinclusion B)).map { as := p }) f✝ h).inv ≫\n (normalizeIso p f✝).hom ▷ h ≫ (normalizeIso (normalizeAux p f✝) h).hom) ≫\n PrelaxFunctor.map₂ (preinclusion B)\n (eqToHom (_ : { as := normalizeAux (normalizeAux p f✝) h } = { as := normalizeAux (normalizeAux p g✝) h }))\n[PROOFSTEP]\ndsimp at this \n[GOAL]\ncase mk.whisker_right\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ c✝ : FreeBicategory B\nf✝ g✝ : a✝ ⟶ b✝\nh : b✝ ⟶ c✝\nη' : Hom₂ f✝ g✝\nih :\n ∀ (p : Path a a✝),\n (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel η' ≫ (normalizeIso p g✝).hom =\n (normalizeIso p f✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B) (eqToHom (_ : { as := normalizeAux p f✝ } = { as := normalizeAux p g✝ }))\np : Path a a✝\nthis :\n (normalizeIso (normalizeAux p f✝) h).hom =\n eqToHom\n (_ :\n (↑(preinclusion B)).map { as := normalizeAux p f✝ } ≫ h =\n (↑(preinclusion B)).map { as := normalizeAux p g✝ } ≫ h) ≫\n (normalizeIso (normalizeAux p g✝) h).hom ≫\n eqToHom\n (_ :\n (↑(preinclusion B)).map { as := normalizeAux (normalizeAux p g✝) h } =\n (↑(preinclusion B)).map { as := normalizeAux (normalizeAux p f✝) h })\n⊢ (α_ ((↑(preinclusion B)).map { as := p }) f✝ h).inv ≫\n ((normalizeIso p f✝).hom ▷ h ≫\n PrelaxFunctor.map₂ (preinclusion B)\n (eqToHom (_ : { as := normalizeAux p f✝ } = { as := normalizeAux p g✝ })) ▷\n h) ≫\n (normalizeIso (normalizeAux p g✝) h).hom =\n ((α_ ((↑(preinclusion B)).map { as := p }) f✝ h).inv ≫\n (normalizeIso p f✝).hom ▷ h ≫ (normalizeIso (normalizeAux p f✝) h).hom) ≫\n PrelaxFunctor.map₂ (preinclusion B)\n (eqToHom (_ : { as := normalizeAux (normalizeAux p f✝) h } = { as := normalizeAux (normalizeAux p g✝) h }))\n[PROOFSTEP]\nsimp [this]\n[GOAL]\ncase mk.associator\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ c✝ d✝ : FreeBicategory B\nf✝ : a✝ ⟶ b✝\ng✝ : b✝ ⟶ c✝\nh✝ : c✝ ⟶ d✝\np : Path a a✝\n⊢ (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel (Hom₂.associator f✝ g✝ h✝) ≫ (normalizeIso p (f✝ ≫ g✝ ≫ h✝)).hom =\n (normalizeIso p ((f✝ ≫ g✝) ≫ h✝)).hom ≫\n PrelaxFunctor.map₂ (preinclusion B)\n (eqToHom (_ : { as := normalizeAux p ((f✝ ≫ g✝) ≫ h✝) } = { as := normalizeAux p (f✝ ≫ g✝ ≫ h✝) }))\n[PROOFSTEP]\n\n| _ => simp\n[GOAL]\ncase mk.associator\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ c✝ d✝ : FreeBicategory B\nf✝ : a✝ ⟶ b✝\ng✝ : b✝ ⟶ c✝\nh✝ : c✝ ⟶ d✝\np : Path a a✝\n⊢ (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel (Hom₂.associator f✝ g✝ h✝) ≫ (normalizeIso p (f✝ ≫ g✝ ≫ h✝)).hom =\n (normalizeIso p ((f✝ ≫ g✝) ≫ h✝)).hom ≫\n PrelaxFunctor.map₂ (preinclusion B)\n (eqToHom (_ : { as := normalizeAux p ((f✝ ≫ g✝) ≫ h✝) } = { as := normalizeAux p (f✝ ≫ g✝ ≫ h✝) }))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.associator_inv\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ c✝ d✝ : FreeBicategory B\nf✝ : a✝ ⟶ b✝\ng✝ : b✝ ⟶ c✝\nh✝ : c✝ ⟶ d✝\np : Path a a✝\n⊢ (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel (Hom₂.associator_inv f✝ g✝ h✝) ≫\n (normalizeIso p ((f✝ ≫ g✝) ≫ h✝)).hom =\n (normalizeIso p (f✝ ≫ g✝ ≫ h✝)).hom ≫\n PrelaxFunctor.map₂ (preinclusion B)\n (eqToHom (_ : { as := normalizeAux p (f✝ ≫ g✝ ≫ h✝) } = { as := normalizeAux p ((f✝ ≫ g✝) ≫ h✝) }))\n[PROOFSTEP]\n\n| _ => simp\n[GOAL]\ncase mk.associator_inv\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ c✝ d✝ : FreeBicategory B\nf✝ : a✝ ⟶ b✝\ng✝ : b✝ ⟶ c✝\nh✝ : c✝ ⟶ d✝\np : Path a a✝\n⊢ (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel (Hom₂.associator_inv f✝ g✝ h✝) ≫\n (normalizeIso p ((f✝ ≫ g✝) ≫ h✝)).hom =\n (normalizeIso p (f✝ ≫ g✝ ≫ h✝)).hom ≫\n PrelaxFunctor.map₂ (preinclusion B)\n (eqToHom (_ : { as := normalizeAux p (f✝ ≫ g✝ ≫ h✝) } = { as := normalizeAux p ((f✝ ≫ g✝) ≫ h✝) }))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.right_unitor\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ : FreeBicategory B\nf✝ : a✝ ⟶ b✝\np : Path a a✝\n⊢ (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel (Hom₂.right_unitor f✝) ≫ (normalizeIso p f✝).hom =\n (normalizeIso p (f✝ ≫ 𝟙 b✝)).hom ≫\n PrelaxFunctor.map₂ (preinclusion B)\n (eqToHom (_ : { as := normalizeAux p (f✝ ≫ 𝟙 b✝) } = { as := normalizeAux p f✝ }))\n[PROOFSTEP]\n\n| _ => simp\n[GOAL]\ncase mk.right_unitor\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ : FreeBicategory B\nf✝ : a✝ ⟶ b✝\np : Path a a✝\n⊢ (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel (Hom₂.right_unitor f✝) ≫ (normalizeIso p f✝).hom =\n (normalizeIso p (f✝ ≫ 𝟙 b✝)).hom ≫\n PrelaxFunctor.map₂ (preinclusion B)\n (eqToHom (_ : { as := normalizeAux p (f✝ ≫ 𝟙 b✝) } = { as := normalizeAux p f✝ }))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.right_unitor_inv\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ : FreeBicategory B\nf✝ : a✝ ⟶ b✝\np : Path a a✝\n⊢ (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel (Hom₂.right_unitor_inv f✝) ≫ (normalizeIso p (f✝ ≫ 𝟙 b✝)).hom =\n (normalizeIso p f✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B)\n (eqToHom (_ : { as := normalizeAux p f✝ } = { as := normalizeAux p (f✝ ≫ 𝟙 b✝) }))\n[PROOFSTEP]\n\n| _ => simp\n[GOAL]\ncase mk.right_unitor_inv\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ : FreeBicategory B\nf✝ : a✝ ⟶ b✝\np : Path a a✝\n⊢ (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel (Hom₂.right_unitor_inv f✝) ≫ (normalizeIso p (f✝ ≫ 𝟙 b✝)).hom =\n (normalizeIso p f✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B)\n (eqToHom (_ : { as := normalizeAux p f✝ } = { as := normalizeAux p (f✝ ≫ 𝟙 b✝) }))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.left_unitor\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ : FreeBicategory B\nf✝ : a✝ ⟶ b✝\np : Path a a✝\n⊢ (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel (Hom₂.left_unitor f✝) ≫ (normalizeIso p f✝).hom =\n (normalizeIso p (𝟙 a✝ ≫ f✝)).hom ≫\n PrelaxFunctor.map₂ (preinclusion B)\n (eqToHom (_ : { as := normalizeAux p (𝟙 a✝ ≫ f✝) } = { as := normalizeAux p f✝ }))\n[PROOFSTEP]\n\n| _ => simp\n[GOAL]\ncase mk.left_unitor\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ : FreeBicategory B\nf✝ : a✝ ⟶ b✝\np : Path a a✝\n⊢ (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel (Hom₂.left_unitor f✝) ≫ (normalizeIso p f✝).hom =\n (normalizeIso p (𝟙 a✝ ≫ f✝)).hom ≫\n PrelaxFunctor.map₂ (preinclusion B)\n (eqToHom (_ : { as := normalizeAux p (𝟙 a✝ ≫ f✝) } = { as := normalizeAux p f✝ }))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.left_unitor_inv\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ : FreeBicategory B\nf✝ : a✝ ⟶ b✝\np : Path a a✝\n⊢ (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel (Hom₂.left_unitor_inv f✝) ≫ (normalizeIso p (𝟙 a✝ ≫ f✝)).hom =\n (normalizeIso p f✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B)\n (eqToHom (_ : { as := normalizeAux p f✝ } = { as := normalizeAux p (𝟙 a✝ ≫ f✝) }))\n[PROOFSTEP]\n\n| _ => simp\n[GOAL]\ncase mk.left_unitor_inv\nB : Type u\ninst✝ : Quiver B\na b c : B\nf g : Hom b c\na✝ b✝ : FreeBicategory B\nf✝ : a✝ ⟶ b✝\np : Path a a✝\n⊢ (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel (Hom₂.left_unitor_inv f✝) ≫ (normalizeIso p (𝟙 a✝ ≫ f✝)).hom =\n (normalizeIso p f✝).hom ≫\n PrelaxFunctor.map₂ (preinclusion B)\n (eqToHom (_ : { as := normalizeAux p f✝ } = { as := normalizeAux p (𝟙 a✝ ≫ f✝) }))\n[PROOFSTEP]\nsimp\n[GOAL]\nB : Type u\ninst✝ : Quiver B\na b c : B\nf : Hom a b\ng : Hom b c\n⊢ normalizeAux nil (Hom.comp f g) = comp (normalizeAux nil f) (normalizeAux nil g)\n[PROOFSTEP]\ninduction g generalizing a with\n| id => rfl\n| of => rfl\n| comp g _ ihf ihg => erw [ihg (f.comp g), ihf f, ihg g, comp_assoc]\n[GOAL]\nB : Type u\ninst✝ : Quiver B\na b c : B\nf : Hom a b\ng : Hom b c\n⊢ normalizeAux nil (Hom.comp f g) = comp (normalizeAux nil f) (normalizeAux nil g)\n[PROOFSTEP]\ninduction g generalizing a with\n| id => rfl\n| of => rfl\n| comp g _ ihf ihg => erw [ihg (f.comp g), ihf f, ihg g, comp_assoc]\n[GOAL]\ncase id\nB : Type u\ninst✝ : Quiver B\nb c a✝ a : B\nf : Hom a a✝\n⊢ normalizeAux nil (Hom.comp f (Hom.id a✝)) = comp (normalizeAux nil f) (normalizeAux nil (Hom.id a✝))\n[PROOFSTEP]\n\n| id => rfl\n[GOAL]\ncase id\nB : Type u\ninst✝ : Quiver B\nb c a✝ a : B\nf : Hom a a✝\n⊢ normalizeAux nil (Hom.comp f (Hom.id a✝)) = comp (normalizeAux nil f) (normalizeAux nil (Hom.id a✝))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase of\nB : Type u\ninst✝ : Quiver B\nb c a✝ b✝ : B\nf✝ : a✝ ⟶ b✝\na : B\nf : Hom a a✝\n⊢ normalizeAux nil (Hom.comp f (Hom.of f✝)) = comp (normalizeAux nil f) (normalizeAux nil (Hom.of f✝))\n[PROOFSTEP]\n\n| of => rfl\n[GOAL]\ncase of\nB : Type u\ninst✝ : Quiver B\nb c a✝ b✝ : B\nf✝ : a✝ ⟶ b✝\na : B\nf : Hom a a✝\n⊢ normalizeAux nil (Hom.comp f (Hom.of f✝)) = comp (normalizeAux nil f) (normalizeAux nil (Hom.of f✝))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase comp\nB : Type u\ninst✝ : Quiver B\nb c a✝ b✝ c✝ : B\ng : Hom a✝ b✝\ng✝ : Hom b✝ c✝\nihf : ∀ {a : B} (f : Hom a a✝), normalizeAux nil (Hom.comp f g) = comp (normalizeAux nil f) (normalizeAux nil g)\nihg : ∀ {a : B} (f : Hom a b✝), normalizeAux nil (Hom.comp f g✝) = comp (normalizeAux nil f) (normalizeAux nil g✝)\na : B\nf : Hom a a✝\n⊢ normalizeAux nil (Hom.comp f (Hom.comp g g✝)) = comp (normalizeAux nil f) (normalizeAux nil (Hom.comp g g✝))\n[PROOFSTEP]\n\n| comp g _ ihf ihg => erw [ihg (f.comp g), ihf f, ihg g, comp_assoc]\n[GOAL]\ncase comp\nB : Type u\ninst✝ : Quiver B\nb c a✝ b✝ c✝ : B\ng : Hom a✝ b✝\ng✝ : Hom b✝ c✝\nihf : ∀ {a : B} (f : Hom a a✝), normalizeAux nil (Hom.comp f g) = comp (normalizeAux nil f) (normalizeAux nil g)\nihg : ∀ {a : B} (f : Hom a b✝), normalizeAux nil (Hom.comp f g✝) = comp (normalizeAux nil f) (normalizeAux nil g✝)\na : B\nf : Hom a a✝\n⊢ normalizeAux nil (Hom.comp f (Hom.comp g g✝)) = comp (normalizeAux nil f) (normalizeAux nil (Hom.comp g g✝))\n[PROOFSTEP]\nerw [ihg (f.comp g), ihf f, ihg g, comp_assoc]\n[GOAL]\nB : Type u\ninst✝ : Quiver B\na b : FreeBicategory B\n⊢ ∀ {X Y : a ⟶ b} (f : X ⟶ Y),\n (𝟭 (a ⟶ b)).map f ≫ ((fun f => (λ_ f).symm ≪≫ normalizeIso nil f) Y).hom =\n ((fun f => (λ_ f).symm ≪≫ normalizeIso nil f) X).hom ≫\n (Pseudofunctor.mapFunctor (normalize B) a b ⋙ inclusionPath a b).map f\n[PROOFSTEP]\nintro f g η\n[GOAL]\nB : Type u\ninst✝ : Quiver B\na b : FreeBicategory B\nf g : a ⟶ b\nη : f ⟶ g\n⊢ (𝟭 (a ⟶ b)).map η ≫ ((fun f => (λ_ f).symm ≪≫ normalizeIso nil f) g).hom =\n ((fun f => (λ_ f).symm ≪≫ normalizeIso nil f) f).hom ≫\n (Pseudofunctor.mapFunctor (normalize B) a b ⋙ inclusionPath a b).map η\n[PROOFSTEP]\nerw [leftUnitor_inv_naturality_assoc, assoc]\n[GOAL]\nB : Type u\ninst✝ : Quiver B\na b : FreeBicategory B\nf g : a ⟶ b\nη : f ⟶ g\n⊢ (λ_ ((𝟭 (a ⟶ b)).obj f)).inv ≫ 𝟙 a ◁ (𝟭 (a ⟶ b)).map η ≫ (normalizeIso nil g).hom =\n (λ_ f).symm.hom ≫ (normalizeIso nil f).hom ≫ (Pseudofunctor.mapFunctor (normalize B) a b ⋙ inclusionPath a b).map η\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nB : Type u\ninst✝ : Quiver B\na b : FreeBicategory B\nf g : a ⟶ b\nη : f ⟶ g\n⊢ 𝟙 a ◁ (𝟭 (a ⟶ b)).map η ≫ (normalizeIso nil g).hom =\n (normalizeIso nil f).hom ≫ (Pseudofunctor.mapFunctor (normalize B) a b ⋙ inclusionPath a b).map η\n[PROOFSTEP]\nexact normalize_naturality nil η\n[GOAL]\nB : Type u\ninst✝ : Quiver B\na b : B\nf : Discrete (Path a b)\n⊢ (inclusionPath a b ⋙ Pseudofunctor.mapFunctor (normalize B) a b).obj f = (𝟭 (Discrete (Path a b))).obj f\n[PROOFSTEP]\ninduction' f with f\n[GOAL]\ncase mk\nB : Type u\ninst✝ : Quiver B\na b : B\nf : Path a b\n⊢ (inclusionPath a b ⋙ Pseudofunctor.mapFunctor (normalize B) a b).obj { as := f } =\n (𝟭 (Discrete (Path a b))).obj { as := f }\n[PROOFSTEP]\ninduction' f with _ _ _ _ ih\n[GOAL]\ncase mk.nil\nB : Type u\ninst✝ : Quiver B\na b : B\n⊢ (inclusionPath a a ⋙ Pseudofunctor.mapFunctor (normalize B) a a).obj { as := nil } =\n (𝟭 (Discrete (Path a a))).obj { as := nil }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mk.cons\nB : Type u\ninst✝ : Quiver B\na b b✝ c✝ : B\na✝¹ : Path a b✝\na✝ : b✝ ⟶ c✝\nih :\n (inclusionPath a b✝ ⋙ Pseudofunctor.mapFunctor (normalize B) a b✝).obj { as := a✝¹ } =\n (𝟭 (Discrete (Path a b✝))).obj { as := a✝¹ }\n⊢ (inclusionPath a c✝ ⋙ Pseudofunctor.mapFunctor (normalize B) a c✝).obj { as := cons a✝¹ a✝ } =\n (𝟭 (Discrete (Path a c✝))).obj { as := cons a✝¹ a✝ }\n[PROOFSTEP]\next1\n[GOAL]\ncase mk.cons.as\nB : Type u\ninst✝ : Quiver B\na b b✝ c✝ : B\na✝¹ : Path a b✝\na✝ : b✝ ⟶ c✝\nih :\n (inclusionPath a b✝ ⋙ Pseudofunctor.mapFunctor (normalize B) a b✝).obj { as := a✝¹ } =\n (𝟭 (Discrete (Path a b✝))).obj { as := a✝¹ }\n⊢ ((inclusionPath a c✝ ⋙ Pseudofunctor.mapFunctor (normalize B) a c✝).obj { as := cons a✝¹ a✝ }).as =\n ((𝟭 (Discrete (Path a c✝))).obj { as := cons a✝¹ a✝ }).as\n[PROOFSTEP]\ninjection ih with ih\n[GOAL]\ncase mk.cons.as\nB : Type u\ninst✝ : Quiver B\na b b✝ c✝ : B\na✝¹ : Path a b✝\na✝ : b✝ ⟶ c✝\nih : normalizeAux nil ((inclusionPath a b✝).obj { as := a✝¹ }) = a✝¹\n⊢ ((inclusionPath a c✝ ⋙ Pseudofunctor.mapFunctor (normalize B) a c✝).obj { as := cons a✝¹ a✝ }).as =\n ((𝟭 (Discrete (Path a c✝))).obj { as := cons a✝¹ a✝ }).as\n[PROOFSTEP]\nconv =>\n rhs\n rw [← ih]\n[GOAL]\nB : Type u\ninst✝ : Quiver B\na b b✝ c✝ : B\na✝¹ : Path a b✝\na✝ : b✝ ⟶ c✝\nih : normalizeAux nil ((inclusionPath a b✝).obj { as := a✝¹ }) = a✝¹\n| ((inclusionPath a c✝ ⋙ Pseudofunctor.mapFunctor (normalize B) a c✝).obj { as := cons a✝¹ a✝ }).as =\n ((𝟭 (Discrete (Path a c✝))).obj { as := cons a✝¹ a✝ }).as\n[PROOFSTEP]\n rhs\n rw [← ih]\n[GOAL]\nB : Type u\ninst✝ : Quiver B\na b b✝ c✝ : B\na✝¹ : Path a b✝\na✝ : b✝ ⟶ c✝\nih : normalizeAux nil ((inclusionPath a b✝).obj { as := a✝¹ }) = a✝¹\n| ((inclusionPath a c✝ ⋙ Pseudofunctor.mapFunctor (normalize B) a c✝).obj { as := cons a✝¹ a✝ }).as =\n ((𝟭 (Discrete (Path a c✝))).obj { as := cons a✝¹ a✝ }).as\n[PROOFSTEP]\n rhs\n rw [← ih]\n[GOAL]\nB : Type u\ninst✝ : Quiver B\na b b✝ c✝ : B\na✝¹ : Path a b✝\na✝ : b✝ ⟶ c✝\nih : normalizeAux nil ((inclusionPath a b✝).obj { as := a✝¹ }) = a✝¹\n| ((inclusionPath a c✝ ⋙ Pseudofunctor.mapFunctor (normalize B) a c✝).obj { as := cons a✝¹ a✝ }).as =\n ((𝟭 (Discrete (Path a c✝))).obj { as := cons a✝¹ a✝ }).as\n[PROOFSTEP]\nrhs\n[GOAL]\nB : Type u\ninst✝ : Quiver B\na b b✝ c✝ : B\na✝¹ : Path a b✝\na✝ : b✝ ⟶ c✝\nih : normalizeAux nil ((inclusionPath a b✝).obj { as := a✝¹ }) = a✝¹\n| ((𝟭 (Discrete (Path a c✝))).obj { as := cons a✝¹ a✝ }).as\n[PROOFSTEP]\nrw [← ih]\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Bicategory.Coherence", "llama_tokens": 27435, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO", "lm_q1_score": 0.4921881357207956, "lm_q2_score": 0.018264278819436312, "lm_q1q2_score": 0.008989461342423172}} {"text": "[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.105, u_1} D\n⊢ CompleteLattice (MorphismProperty C)\n[PROOFSTEP]\ndsimp only [MorphismProperty]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.105, u_1} D\n⊢ CompleteLattice (⦃X Y : C⦄ → (X ⟶ Y) → Prop)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.6347, u_1} D\nX Y : C\nf : X ⟶ Y\n⊢ ⊤ f\n[PROOFSTEP]\nsimp only [top_eq]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.10321, u_1} D\nP : MorphismProperty C\nX✝ Y✝ Z✝ : C\ne : X✝ ≅ Y✝\nf : Y✝ ⟶ Z✝\nx✝ : isoClosure P f\nw✝¹ w✝ : C\nf' : w✝¹ ⟶ w✝\nhf' : P f'\niso : Arrow.mk f' ≅ Arrow.mk f\n⊢ (asIso iso.hom.left ≪≫ e.symm).hom ≫ (Arrow.mk (e.hom ≫ f)).hom = (Arrow.mk f').hom ≫ (asIso iso.hom.right).hom\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.10321, u_1} D\nP : MorphismProperty C\nX✝ Y✝ Z✝ : C\ne : Y✝ ≅ Z✝\nf : X✝ ⟶ Y✝\nx✝ : isoClosure P f\nw✝¹ w✝ : C\nf' : w✝¹ ⟶ w✝\nhf' : P f'\niso : Arrow.mk f' ≅ Arrow.mk f\n⊢ (asIso iso.hom.left).hom ≫ (Arrow.mk (f ≫ e.hom)).hom = (Arrow.mk f').hom ≫ (asIso iso.hom.right ≪≫ e).hom\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.20276, u_1} D\nP : MorphismProperty C\nhP : RespectsIso P\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝ : IsIso f\nh : P (f ≫ g)\n⊢ P g\n[PROOFSTEP]\nsimpa using hP.1 (asIso f).symm (f ≫ g) h\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.21442, u_1} D\nP : MorphismProperty C\nhP : RespectsIso P\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝ : IsIso g\nh : P (f ≫ g)\n⊢ P f\n[PROOFSTEP]\nsimpa using hP.2 (asIso g).symm (f ≫ g) h\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.22704, u_1} D\nP : MorphismProperty C\nhP : RespectsIso P\nf g : Arrow C\ne : f ≅ g\n⊢ P f.hom ↔ P g.hom\n[PROOFSTEP]\nrw [← Arrow.inv_left_hom_right e.hom, hP.cancel_left_isIso, hP.cancel_right_isIso]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.23989, u_1} D\nP : MorphismProperty C\nhP : ∀ (f g : Arrow C), (f ≅ g) → P f.hom → P g.hom\n⊢ RespectsIso P\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.23989, u_1} D\nP : MorphismProperty C\nhP : ∀ (f g : Arrow C), (f ≅ g) → P f.hom → P g.hom\n⊢ ∀ {X Y Z : C} (e : X ≅ Y) (f : Y ⟶ Z), P f → P (e.hom ≫ f)\n[PROOFSTEP]\nintro X Y Z e f hf\n[GOAL]\ncase left\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.23989, u_1} D\nP : MorphismProperty C\nhP : ∀ (f g : Arrow C), (f ≅ g) → P f.hom → P g.hom\nX Y Z : C\ne : X ≅ Y\nf : Y ⟶ Z\nhf : P f\n⊢ P (e.hom ≫ f)\n[PROOFSTEP]\nrefine' hP (Arrow.mk f) (Arrow.mk (e.hom ≫ f)) (Arrow.isoMk e.symm (Iso.refl _) _) hf\n[GOAL]\ncase left\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.23989, u_1} D\nP : MorphismProperty C\nhP : ∀ (f g : Arrow C), (f ≅ g) → P f.hom → P g.hom\nX Y Z : C\ne : X ≅ Y\nf : Y ⟶ Z\nhf : P f\n⊢ e.symm.hom ≫ (Arrow.mk (e.hom ≫ f)).hom = (Arrow.mk f).hom ≫ (Iso.refl (Arrow.mk f).right).hom\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase left\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.23989, u_1} D\nP : MorphismProperty C\nhP : ∀ (f g : Arrow C), (f ≅ g) → P f.hom → P g.hom\nX Y Z : C\ne : X ≅ Y\nf : Y ⟶ Z\nhf : P f\n⊢ e.inv ≫ e.hom ≫ f = f ≫ 𝟙 Z\n[PROOFSTEP]\nsimp only [Iso.inv_hom_id_assoc, Category.comp_id]\n[GOAL]\ncase right\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.23989, u_1} D\nP : MorphismProperty C\nhP : ∀ (f g : Arrow C), (f ≅ g) → P f.hom → P g.hom\n⊢ ∀ {X Y Z : C} (e : Y ≅ Z) (f : X ⟶ Y), P f → P (f ≫ e.hom)\n[PROOFSTEP]\nintro X Y Z e f hf\n[GOAL]\ncase right\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.23989, u_1} D\nP : MorphismProperty C\nhP : ∀ (f g : Arrow C), (f ≅ g) → P f.hom → P g.hom\nX Y Z : C\ne : Y ≅ Z\nf : X ⟶ Y\nhf : P f\n⊢ P (f ≫ e.hom)\n[PROOFSTEP]\nrefine' hP (Arrow.mk f) (Arrow.mk (f ≫ e.hom)) (Arrow.isoMk (Iso.refl _) e _) hf\n[GOAL]\ncase right\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.23989, u_1} D\nP : MorphismProperty C\nhP : ∀ (f g : Arrow C), (f ≅ g) → P f.hom → P g.hom\nX Y Z : C\ne : Y ≅ Z\nf : X ⟶ Y\nhf : P f\n⊢ (Iso.refl (Arrow.mk f).left).hom ≫ (Arrow.mk (f ≫ e.hom)).hom = (Arrow.mk f).hom ≫ e.hom\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase right\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.23989, u_1} D\nP : MorphismProperty C\nhP : ∀ (f g : Arrow C), (f ≅ g) → P f.hom → P g.hom\nX Y Z : C\ne : Y ≅ Z\nf : X ⟶ Y\nhf : P f\n⊢ 𝟙 X ≫ f ≫ e.hom = f ≫ e.hom\n[PROOFSTEP]\nsimp only [Category.id_comp]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.26090, u_1} D\nP : MorphismProperty C\ninst✝ : HasPullbacks C\nhP₁ : RespectsIso P\nhP₂ : ∀ (X Y S : C) (f : X ⟶ S) (g : Y ⟶ S), P g → P pullback.fst\nX Y Y' S : C\nf : X ⟶ S\ng : Y ⟶ S\nf' : Y' ⟶ Y\ng' : Y' ⟶ X\nsq : IsPullback f' g' g f\nhg : P g\n⊢ P g'\n[PROOFSTEP]\nlet e := sq.flip.isoPullback\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.26090, u_1} D\nP : MorphismProperty C\ninst✝ : HasPullbacks C\nhP₁ : RespectsIso P\nhP₂ : ∀ (X Y S : C) (f : X ⟶ S) (g : Y ⟶ S), P g → P pullback.fst\nX Y Y' S : C\nf : X ⟶ S\ng : Y ⟶ S\nf' : Y' ⟶ Y\ng' : Y' ⟶ X\nsq : IsPullback f' g' g f\nhg : P g\ne : Y' ≅ pullback f g := IsPullback.isoPullback (_ : IsPullback g' f' f g)\n⊢ P g'\n[PROOFSTEP]\nrw [← hP₁.cancel_left_isIso e.inv, sq.flip.isoPullback_inv_fst]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.26090, u_1} D\nP : MorphismProperty C\ninst✝ : HasPullbacks C\nhP₁ : RespectsIso P\nhP₂ : ∀ (X Y S : C) (f : X ⟶ S) (g : Y ⟶ S), P g → P pullback.fst\nX Y Y' S : C\nf : X ⟶ S\ng : Y ⟶ S\nf' : Y' ⟶ Y\ng' : Y' ⟶ X\nsq : IsPullback f' g' g f\nhg : P g\ne : Y' ≅ pullback f g := IsPullback.isoPullback (_ : IsPullback g' f' f g)\n⊢ P pullback.fst\n[PROOFSTEP]\nexact hP₂ _ _ _ f g hg\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.27180, u_1} D\nP : MorphismProperty C\nhP : StableUnderBaseChange P\n⊢ RespectsIso P\n[PROOFSTEP]\napply RespectsIso.of_respects_arrow_iso\n[GOAL]\ncase hP\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.27180, u_1} D\nP : MorphismProperty C\nhP : StableUnderBaseChange P\n⊢ ∀ (f g : Arrow C), (f ≅ g) → P f.hom → P g.hom\n[PROOFSTEP]\nintro f g e\n[GOAL]\ncase hP\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.27180, u_1} D\nP : MorphismProperty C\nhP : StableUnderBaseChange P\nf g : Arrow C\ne : f ≅ g\n⊢ P f.hom → P g.hom\n[PROOFSTEP]\nexact hP (IsPullback.of_horiz_isIso (CommSq.mk e.inv.w))\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.30641, u_1} D\ninst✝ : HasPullbacks C\nP : MorphismProperty C\nhP : StableUnderBaseChange P\nS S' : C\nf : S' ⟶ S\nX Y : Over S\ng : X ⟶ Y\nH : P g.left\n⊢ P ((baseChange f).map g).left\n[PROOFSTEP]\nlet e := pullbackRightPullbackFstIso Y.hom f g.left ≪≫ pullback.congrHom (g.w.trans (Category.comp_id _)) rfl\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.30641, u_1} D\ninst✝ : HasPullbacks C\nP : MorphismProperty C\nhP : StableUnderBaseChange P\nS S' : C\nf : S' ⟶ S\nX Y : Over S\ng : X ⟶ Y\nH : P g.left\ne : pullback g.left pullback.fst ≅ pullback X.hom f :=\n pullbackRightPullbackFstIso Y.hom f g.left ≪≫ pullback.congrHom (_ : (𝟭 C).map g.left ≫ Y.hom = X.hom) (_ : f = f)\n⊢ P ((baseChange f).map g).left\n[PROOFSTEP]\nhave : e.inv ≫ pullback.snd = ((baseChange f).map g).left := by ext <;> dsimp <;> simp\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.30641, u_1} D\ninst✝ : HasPullbacks C\nP : MorphismProperty C\nhP : StableUnderBaseChange P\nS S' : C\nf : S' ⟶ S\nX Y : Over S\ng : X ⟶ Y\nH : P g.left\ne : pullback g.left pullback.fst ≅ pullback X.hom f :=\n pullbackRightPullbackFstIso Y.hom f g.left ≪≫ pullback.congrHom (_ : (𝟭 C).map g.left ≫ Y.hom = X.hom) (_ : f = f)\n⊢ e.inv ≫ pullback.snd = ((baseChange f).map g).left\n[PROOFSTEP]\next\n[GOAL]\ncase h₀\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.30641, u_1} D\ninst✝ : HasPullbacks C\nP : MorphismProperty C\nhP : StableUnderBaseChange P\nS S' : C\nf : S' ⟶ S\nX Y : Over S\ng : X ⟶ Y\nH : P g.left\ne : pullback g.left pullback.fst ≅ pullback X.hom f :=\n pullbackRightPullbackFstIso Y.hom f g.left ≪≫ pullback.congrHom (_ : (𝟭 C).map g.left ≫ Y.hom = X.hom) (_ : f = f)\n⊢ (e.inv ≫ pullback.snd) ≫ pullback.fst = ((baseChange f).map g).left ≫ pullback.fst\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h₁\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.30641, u_1} D\ninst✝ : HasPullbacks C\nP : MorphismProperty C\nhP : StableUnderBaseChange P\nS S' : C\nf : S' ⟶ S\nX Y : Over S\ng : X ⟶ Y\nH : P g.left\ne : pullback g.left pullback.fst ≅ pullback X.hom f :=\n pullbackRightPullbackFstIso Y.hom f g.left ≪≫ pullback.congrHom (_ : (𝟭 C).map g.left ≫ Y.hom = X.hom) (_ : f = f)\n⊢ (e.inv ≫ pullback.snd) ≫ pullback.snd = ((baseChange f).map g).left ≫ pullback.snd\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h₀\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.30641, u_1} D\ninst✝ : HasPullbacks C\nP : MorphismProperty C\nhP : StableUnderBaseChange P\nS S' : C\nf : S' ⟶ S\nX Y : Over S\ng : X ⟶ Y\nH : P g.left\ne : pullback g.left pullback.fst ≅ pullback X.hom f :=\n pullbackRightPullbackFstIso Y.hom f g.left ≪≫ pullback.congrHom (_ : (𝟭 C).map g.left ≫ Y.hom = X.hom) (_ : f = f)\n⊢ (((pullback.congrHom (_ : g.left ≫ Y.hom = X.hom) (_ : f = f)).inv ≫\n (pullbackRightPullbackFstIso Y.hom f g.left).inv) ≫\n pullback.snd) ≫\n pullback.fst =\n pullback.map X.hom f Y.hom f g.left (𝟙 S') (𝟙 S) (_ : X.hom ≫ 𝟙 S = g.left ≫ Y.hom) (_ : f ≫ 𝟙 S = 𝟙 S' ≫ f) ≫\n pullback.fst\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h₁\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.30641, u_1} D\ninst✝ : HasPullbacks C\nP : MorphismProperty C\nhP : StableUnderBaseChange P\nS S' : C\nf : S' ⟶ S\nX Y : Over S\ng : X ⟶ Y\nH : P g.left\ne : pullback g.left pullback.fst ≅ pullback X.hom f :=\n pullbackRightPullbackFstIso Y.hom f g.left ≪≫ pullback.congrHom (_ : (𝟭 C).map g.left ≫ Y.hom = X.hom) (_ : f = f)\n⊢ (((pullback.congrHom (_ : g.left ≫ Y.hom = X.hom) (_ : f = f)).inv ≫\n (pullbackRightPullbackFstIso Y.hom f g.left).inv) ≫\n pullback.snd) ≫\n pullback.snd =\n pullback.map X.hom f Y.hom f g.left (𝟙 S') (𝟙 S) (_ : X.hom ≫ 𝟙 S = g.left ≫ Y.hom) (_ : f ≫ 𝟙 S = 𝟙 S' ≫ f) ≫\n pullback.snd\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.30641, u_1} D\ninst✝ : HasPullbacks C\nP : MorphismProperty C\nhP : StableUnderBaseChange P\nS S' : C\nf : S' ⟶ S\nX Y : Over S\ng : X ⟶ Y\nH : P g.left\ne : pullback g.left pullback.fst ≅ pullback X.hom f :=\n pullbackRightPullbackFstIso Y.hom f g.left ≪≫ pullback.congrHom (_ : (𝟭 C).map g.left ≫ Y.hom = X.hom) (_ : f = f)\nthis : e.inv ≫ pullback.snd = ((baseChange f).map g).left\n⊢ P ((baseChange f).map g).left\n[PROOFSTEP]\nrw [← this, hP.respectsIso.cancel_left_isIso]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.30641, u_1} D\ninst✝ : HasPullbacks C\nP : MorphismProperty C\nhP : StableUnderBaseChange P\nS S' : C\nf : S' ⟶ S\nX Y : Over S\ng : X ⟶ Y\nH : P g.left\ne : pullback g.left pullback.fst ≅ pullback X.hom f :=\n pullbackRightPullbackFstIso Y.hom f g.left ≪≫ pullback.congrHom (_ : (𝟭 C).map g.left ≫ Y.hom = X.hom) (_ : f = f)\nthis : e.inv ≫ pullback.snd = ((baseChange f).map g).left\n⊢ P pullback.snd\n[PROOFSTEP]\nexact hP.snd _ _ H\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.39138, u_1} D\ninst✝ : HasPullbacks C\nP : MorphismProperty C\nhP : StableUnderBaseChange P\nhP' : StableUnderComposition P\nS X X' Y Y' : C\nf : X ⟶ S\ng : Y ⟶ S\nf' : X' ⟶ S\ng' : Y' ⟶ S\ni₁ : X ⟶ X'\ni₂ : Y ⟶ Y'\nh₁ : P i₁\nh₂ : P i₂\ne₁ : f = i₁ ≫ f'\ne₂ : g = i₂ ≫ g'\n⊢ P (pullback.map f g f' g' i₁ i₂ (𝟙 S) (_ : f ≫ 𝟙 S = i₁ ≫ f') (_ : g ≫ 𝟙 S = i₂ ≫ g'))\n[PROOFSTEP]\nhave :\n pullback.map f g f' g' i₁ i₂ (𝟙 _) ((Category.comp_id _).trans e₁) ((Category.comp_id _).trans e₂) =\n ((pullbackSymmetry _ _).hom ≫ ((baseChange _).map (Over.homMk _ e₂.symm : Over.mk g ⟶ Over.mk g')).left) ≫\n (pullbackSymmetry _ _).hom ≫ ((baseChange g').map (Over.homMk _ e₁.symm : Over.mk f ⟶ Over.mk f')).left :=\n by ext <;> dsimp <;> simp\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.39138, u_1} D\ninst✝ : HasPullbacks C\nP : MorphismProperty C\nhP : StableUnderBaseChange P\nhP' : StableUnderComposition P\nS X X' Y Y' : C\nf : X ⟶ S\ng : Y ⟶ S\nf' : X' ⟶ S\ng' : Y' ⟶ S\ni₁ : X ⟶ X'\ni₂ : Y ⟶ Y'\nh₁ : P i₁\nh₂ : P i₂\ne₁ : f = i₁ ≫ f'\ne₂ : g = i₂ ≫ g'\n⊢ pullback.map f g f' g' i₁ i₂ (𝟙 S) (_ : f ≫ 𝟙 S = i₁ ≫ f') (_ : g ≫ 𝟙 S = i₂ ≫ g') =\n ((pullbackSymmetry (Over.mk f).hom (Over.mk g).hom).hom ≫ ((baseChange (Over.mk f).hom).map (Over.homMk i₂)).left) ≫\n (pullbackSymmetry (Over.mk g').hom (Over.mk f).hom).hom ≫ ((baseChange g').map (Over.homMk i₁)).left\n[PROOFSTEP]\next\n[GOAL]\ncase h₀\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.39138, u_1} D\ninst✝ : HasPullbacks C\nP : MorphismProperty C\nhP : StableUnderBaseChange P\nhP' : StableUnderComposition P\nS X X' Y Y' : C\nf : X ⟶ S\ng : Y ⟶ S\nf' : X' ⟶ S\ng' : Y' ⟶ S\ni₁ : X ⟶ X'\ni₂ : Y ⟶ Y'\nh₁ : P i₁\nh₂ : P i₂\ne₁ : f = i₁ ≫ f'\ne₂ : g = i₂ ≫ g'\n⊢ pullback.map f g f' g' i₁ i₂ (𝟙 S) (_ : f ≫ 𝟙 S = i₁ ≫ f') (_ : g ≫ 𝟙 S = i₂ ≫ g') ≫ pullback.fst =\n (((pullbackSymmetry (Over.mk f).hom (Over.mk g).hom).hom ≫\n ((baseChange (Over.mk f).hom).map (Over.homMk i₂)).left) ≫\n (pullbackSymmetry (Over.mk g').hom (Over.mk f).hom).hom ≫ ((baseChange g').map (Over.homMk i₁)).left) ≫\n pullback.fst\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h₁\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.39138, u_1} D\ninst✝ : HasPullbacks C\nP : MorphismProperty C\nhP : StableUnderBaseChange P\nhP' : StableUnderComposition P\nS X X' Y Y' : C\nf : X ⟶ S\ng : Y ⟶ S\nf' : X' ⟶ S\ng' : Y' ⟶ S\ni₁ : X ⟶ X'\ni₂ : Y ⟶ Y'\nh₁ : P i₁\nh₂ : P i₂\ne₁ : f = i₁ ≫ f'\ne₂ : g = i₂ ≫ g'\n⊢ pullback.map f g f' g' i₁ i₂ (𝟙 S) (_ : f ≫ 𝟙 S = i₁ ≫ f') (_ : g ≫ 𝟙 S = i₂ ≫ g') ≫ pullback.snd =\n (((pullbackSymmetry (Over.mk f).hom (Over.mk g).hom).hom ≫\n ((baseChange (Over.mk f).hom).map (Over.homMk i₂)).left) ≫\n (pullbackSymmetry (Over.mk g').hom (Over.mk f).hom).hom ≫ ((baseChange g').map (Over.homMk i₁)).left) ≫\n pullback.snd\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h₀\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.39138, u_1} D\ninst✝ : HasPullbacks C\nP : MorphismProperty C\nhP : StableUnderBaseChange P\nhP' : StableUnderComposition P\nS X X' Y Y' : C\nf : X ⟶ S\ng : Y ⟶ S\nf' : X' ⟶ S\ng' : Y' ⟶ S\ni₁ : X ⟶ X'\ni₂ : Y ⟶ Y'\nh₁ : P i₁\nh₂ : P i₂\ne₁ : f = i₁ ≫ f'\ne₂ : g = i₂ ≫ g'\n⊢ pullback.map f g f' g' i₁ i₂ (𝟙 S) (_ : f ≫ 𝟙 S = i₁ ≫ f') (_ : g ≫ 𝟙 S = i₂ ≫ g') ≫ pullback.fst =\n (((pullbackSymmetry f g).hom ≫\n pullback.map g f g' f i₂ (𝟙 X) (𝟙 S) (_ : (Over.mk g).hom ≫ 𝟙 S = (Over.homMk i₂).left ≫ (Over.mk g').hom)\n (_ : f ≫ 𝟙 S = 𝟙 X ≫ f)) ≫\n (pullbackSymmetry g' f).hom ≫\n pullback.map f g' f' g' i₁ (𝟙 Y') (𝟙 S) (_ : (Over.mk f).hom ≫ 𝟙 S = (Over.homMk i₁).left ≫ (Over.mk f').hom)\n (_ : g' ≫ 𝟙 S = 𝟙 Y' ≫ g')) ≫\n pullback.fst\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h₁\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.39138, u_1} D\ninst✝ : HasPullbacks C\nP : MorphismProperty C\nhP : StableUnderBaseChange P\nhP' : StableUnderComposition P\nS X X' Y Y' : C\nf : X ⟶ S\ng : Y ⟶ S\nf' : X' ⟶ S\ng' : Y' ⟶ S\ni₁ : X ⟶ X'\ni₂ : Y ⟶ Y'\nh₁ : P i₁\nh₂ : P i₂\ne₁ : f = i₁ ≫ f'\ne₂ : g = i₂ ≫ g'\n⊢ pullback.map f g f' g' i₁ i₂ (𝟙 S) (_ : f ≫ 𝟙 S = i₁ ≫ f') (_ : g ≫ 𝟙 S = i₂ ≫ g') ≫ pullback.snd =\n (((pullbackSymmetry f g).hom ≫\n pullback.map g f g' f i₂ (𝟙 X) (𝟙 S) (_ : (Over.mk g).hom ≫ 𝟙 S = (Over.homMk i₂).left ≫ (Over.mk g').hom)\n (_ : f ≫ 𝟙 S = 𝟙 X ≫ f)) ≫\n (pullbackSymmetry g' f).hom ≫\n pullback.map f g' f' g' i₁ (𝟙 Y') (𝟙 S) (_ : (Over.mk f).hom ≫ 𝟙 S = (Over.homMk i₁).left ≫ (Over.mk f').hom)\n (_ : g' ≫ 𝟙 S = 𝟙 Y' ≫ g')) ≫\n pullback.snd\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.39138, u_1} D\ninst✝ : HasPullbacks C\nP : MorphismProperty C\nhP : StableUnderBaseChange P\nhP' : StableUnderComposition P\nS X X' Y Y' : C\nf : X ⟶ S\ng : Y ⟶ S\nf' : X' ⟶ S\ng' : Y' ⟶ S\ni₁ : X ⟶ X'\ni₂ : Y ⟶ Y'\nh₁ : P i₁\nh₂ : P i₂\ne₁ : f = i₁ ≫ f'\ne₂ : g = i₂ ≫ g'\nthis :\n pullback.map f g f' g' i₁ i₂ (𝟙 S) (_ : f ≫ 𝟙 S = i₁ ≫ f') (_ : g ≫ 𝟙 S = i₂ ≫ g') =\n ((pullbackSymmetry (Over.mk f).hom (Over.mk g).hom).hom ≫ ((baseChange (Over.mk f).hom).map (Over.homMk i₂)).left) ≫\n (pullbackSymmetry (Over.mk g').hom (Over.mk f).hom).hom ≫ ((baseChange g').map (Over.homMk i₁)).left\n⊢ P (pullback.map f g f' g' i₁ i₂ (𝟙 S) (_ : f ≫ 𝟙 S = i₁ ≫ f') (_ : g ≫ 𝟙 S = i₂ ≫ g'))\n[PROOFSTEP]\nrw [this]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.39138, u_1} D\ninst✝ : HasPullbacks C\nP : MorphismProperty C\nhP : StableUnderBaseChange P\nhP' : StableUnderComposition P\nS X X' Y Y' : C\nf : X ⟶ S\ng : Y ⟶ S\nf' : X' ⟶ S\ng' : Y' ⟶ S\ni₁ : X ⟶ X'\ni₂ : Y ⟶ Y'\nh₁ : P i₁\nh₂ : P i₂\ne₁ : f = i₁ ≫ f'\ne₂ : g = i₂ ≫ g'\nthis :\n pullback.map f g f' g' i₁ i₂ (𝟙 S) (_ : f ≫ 𝟙 S = i₁ ≫ f') (_ : g ≫ 𝟙 S = i₂ ≫ g') =\n ((pullbackSymmetry (Over.mk f).hom (Over.mk g).hom).hom ≫ ((baseChange (Over.mk f).hom).map (Over.homMk i₂)).left) ≫\n (pullbackSymmetry (Over.mk g').hom (Over.mk f).hom).hom ≫ ((baseChange g').map (Over.homMk i₁)).left\n⊢ P\n (((pullbackSymmetry (Over.mk f).hom (Over.mk g).hom).hom ≫\n ((baseChange (Over.mk f).hom).map (Over.homMk i₂)).left) ≫\n (pullbackSymmetry (Over.mk g').hom (Over.mk f).hom).hom ≫ ((baseChange g').map (Over.homMk i₁)).left)\n[PROOFSTEP]\napply hP'\n[GOAL]\ncase a\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.39138, u_1} D\ninst✝ : HasPullbacks C\nP : MorphismProperty C\nhP : StableUnderBaseChange P\nhP' : StableUnderComposition P\nS X X' Y Y' : C\nf : X ⟶ S\ng : Y ⟶ S\nf' : X' ⟶ S\ng' : Y' ⟶ S\ni₁ : X ⟶ X'\ni₂ : Y ⟶ Y'\nh₁ : P i₁\nh₂ : P i₂\ne₁ : f = i₁ ≫ f'\ne₂ : g = i₂ ≫ g'\nthis :\n pullback.map f g f' g' i₁ i₂ (𝟙 S) (_ : f ≫ 𝟙 S = i₁ ≫ f') (_ : g ≫ 𝟙 S = i₂ ≫ g') =\n ((pullbackSymmetry (Over.mk f).hom (Over.mk g).hom).hom ≫ ((baseChange (Over.mk f).hom).map (Over.homMk i₂)).left) ≫\n (pullbackSymmetry (Over.mk g').hom (Over.mk f).hom).hom ≫ ((baseChange g').map (Over.homMk i₁)).left\n⊢ P ((pullbackSymmetry (Over.mk f).hom (Over.mk g).hom).hom ≫ ((baseChange (Over.mk f).hom).map (Over.homMk i₂)).left)\n[PROOFSTEP]\nrw [hP.respectsIso.cancel_left_isIso]\n[GOAL]\ncase a\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.39138, u_1} D\ninst✝ : HasPullbacks C\nP : MorphismProperty C\nhP : StableUnderBaseChange P\nhP' : StableUnderComposition P\nS X X' Y Y' : C\nf : X ⟶ S\ng : Y ⟶ S\nf' : X' ⟶ S\ng' : Y' ⟶ S\ni₁ : X ⟶ X'\ni₂ : Y ⟶ Y'\nh₁ : P i₁\nh₂ : P i₂\ne₁ : f = i₁ ≫ f'\ne₂ : g = i₂ ≫ g'\nthis :\n pullback.map f g f' g' i₁ i₂ (𝟙 S) (_ : f ≫ 𝟙 S = i₁ ≫ f') (_ : g ≫ 𝟙 S = i₂ ≫ g') =\n ((pullbackSymmetry (Over.mk f).hom (Over.mk g).hom).hom ≫ ((baseChange (Over.mk f).hom).map (Over.homMk i₂)).left) ≫\n (pullbackSymmetry (Over.mk g').hom (Over.mk f).hom).hom ≫ ((baseChange g').map (Over.homMk i₁)).left\n⊢ P ((pullbackSymmetry (Over.mk g').hom (Over.mk f).hom).hom ≫ ((baseChange g').map (Over.homMk i₁)).left)\n[PROOFSTEP]\nrw [hP.respectsIso.cancel_left_isIso]\n[GOAL]\ncase a\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.39138, u_1} D\ninst✝ : HasPullbacks C\nP : MorphismProperty C\nhP : StableUnderBaseChange P\nhP' : StableUnderComposition P\nS X X' Y Y' : C\nf : X ⟶ S\ng : Y ⟶ S\nf' : X' ⟶ S\ng' : Y' ⟶ S\ni₁ : X ⟶ X'\ni₂ : Y ⟶ Y'\nh₁ : P i₁\nh₂ : P i₂\ne₁ : f = i₁ ≫ f'\ne₂ : g = i₂ ≫ g'\nthis :\n pullback.map f g f' g' i₁ i₂ (𝟙 S) (_ : f ≫ 𝟙 S = i₁ ≫ f') (_ : g ≫ 𝟙 S = i₂ ≫ g') =\n ((pullbackSymmetry (Over.mk f).hom (Over.mk g).hom).hom ≫ ((baseChange (Over.mk f).hom).map (Over.homMk i₂)).left) ≫\n (pullbackSymmetry (Over.mk g').hom (Over.mk f).hom).hom ≫ ((baseChange g').map (Over.homMk i₁)).left\n⊢ P ((baseChange (Over.mk f).hom).map (Over.homMk i₂)).left\ncase a\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.39138, u_1} D\ninst✝ : HasPullbacks C\nP : MorphismProperty C\nhP : StableUnderBaseChange P\nhP' : StableUnderComposition P\nS X X' Y Y' : C\nf : X ⟶ S\ng : Y ⟶ S\nf' : X' ⟶ S\ng' : Y' ⟶ S\ni₁ : X ⟶ X'\ni₂ : Y ⟶ Y'\nh₁ : P i₁\nh₂ : P i₂\ne₁ : f = i₁ ≫ f'\ne₂ : g = i₂ ≫ g'\nthis :\n pullback.map f g f' g' i₁ i₂ (𝟙 S) (_ : f ≫ 𝟙 S = i₁ ≫ f') (_ : g ≫ 𝟙 S = i₂ ≫ g') =\n ((pullbackSymmetry (Over.mk f).hom (Over.mk g).hom).hom ≫ ((baseChange (Over.mk f).hom).map (Over.homMk i₂)).left) ≫\n (pullbackSymmetry (Over.mk g').hom (Over.mk f).hom).hom ≫ ((baseChange g').map (Over.homMk i₁)).left\n⊢ P ((baseChange g').map (Over.homMk i₁)).left\n[PROOFSTEP]\nexacts [hP.baseChange_map _ (Over.homMk _ e₂.symm : Over.mk g ⟶ Over.mk g') h₂,\n hP.baseChange_map _ (Over.homMk _ e₁.symm : Over.mk f ⟶ Over.mk f') h₁]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.47372, u_1} D\nP : MorphismProperty C\ninst✝ : HasPushouts C\nhP₁ : RespectsIso P\nhP₂ : ∀ (A B A' : C) (f : A ⟶ A') (g : A ⟶ B), P f → P pushout.inr\nA A' B B' : C\nf : A ⟶ A'\ng : A ⟶ B\nf' : B ⟶ B'\ng' : A' ⟶ B'\nsq : IsPushout g f f' g'\nhf : P f\n⊢ P f'\n[PROOFSTEP]\nlet e := sq.flip.isoPushout\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.47372, u_1} D\nP : MorphismProperty C\ninst✝ : HasPushouts C\nhP₁ : RespectsIso P\nhP₂ : ∀ (A B A' : C) (f : A ⟶ A') (g : A ⟶ B), P f → P pushout.inr\nA A' B B' : C\nf : A ⟶ A'\ng : A ⟶ B\nf' : B ⟶ B'\ng' : A' ⟶ B'\nsq : IsPushout g f f' g'\nhf : P f\ne : B' ≅ pushout f g := IsPushout.isoPushout (_ : IsPushout f g g' f')\n⊢ P f'\n[PROOFSTEP]\nrw [← hP₁.cancel_right_isIso _ e.hom, sq.flip.inr_isoPushout_hom]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.47372, u_1} D\nP : MorphismProperty C\ninst✝ : HasPushouts C\nhP₁ : RespectsIso P\nhP₂ : ∀ (A B A' : C) (f : A ⟶ A') (g : A ⟶ B), P f → P pushout.inr\nA A' B B' : C\nf : A ⟶ A'\ng : A ⟶ B\nf' : B ⟶ B'\ng' : A' ⟶ B'\nsq : IsPushout g f f' g'\nhf : P f\ne : B' ≅ pushout f g := IsPushout.isoPushout (_ : IsPushout f g g' f')\n⊢ P pushout.inr\n[PROOFSTEP]\nexact hP₂ _ _ _ f g hf\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nD : Type u_1\ninst✝³ : Category.{?u.53343, u_1} D\nC₁ : Type u_2\nC₂ : Type u_3\nC₃ : Type u_4\ninst✝² : Category.{u_5, u_2} C₁\ninst✝¹ : Category.{u_6, u_3} C₂\ninst✝ : Category.{u_7, u_4} C₃\nW : MorphismProperty C₁\nF : C₁ ⥤ C₂\nhF : IsInvertedBy W F\nG : C₂ ⥤ C₃\nX Y : C₁\nf : X ⟶ Y\nhf : W f\n⊢ IsIso ((F ⋙ G).map f)\n[PROOFSTEP]\nhaveI := hF f hf\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nD : Type u_1\ninst✝³ : Category.{?u.53343, u_1} D\nC₁ : Type u_2\nC₂ : Type u_3\nC₃ : Type u_4\ninst✝² : Category.{u_5, u_2} C₁\ninst✝¹ : Category.{u_6, u_3} C₂\ninst✝ : Category.{u_7, u_4} C₃\nW : MorphismProperty C₁\nF : C₁ ⥤ C₂\nhF : IsInvertedBy W F\nG : C₂ ⥤ C₃\nX Y : C₁\nf : X ⟶ Y\nhf : W f\nthis : IsIso (F.map f)\n⊢ IsIso ((F ⋙ G).map f)\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nD : Type u_1\ninst✝³ : Category.{?u.53343, u_1} D\nC₁ : Type u_2\nC₂ : Type u_3\nC₃ : Type u_4\ninst✝² : Category.{u_5, u_2} C₁\ninst✝¹ : Category.{u_6, u_3} C₂\ninst✝ : Category.{u_7, u_4} C₃\nW : MorphismProperty C₁\nF : C₁ ⥤ C₂\nhF : IsInvertedBy W F\nG : C₂ ⥤ C₃\nX Y : C₁\nf : X ⟶ Y\nhf : W f\nthis : IsIso (F.map f)\n⊢ IsIso (G.map (F.map f))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nW : MorphismProperty C\nL : C ⥤ D\nh : IsInvertedBy W L\nX Y : Cᵒᵖ\nf : X ⟶ Y\nhf : MorphismProperty.op W f\n⊢ IsIso (L.op.map f)\n[PROOFSTEP]\nhaveI := h f.unop hf\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nW : MorphismProperty C\nL : C ⥤ D\nh : IsInvertedBy W L\nX Y : Cᵒᵖ\nf : X ⟶ Y\nhf : MorphismProperty.op W f\nthis : IsIso (L.map f.unop)\n⊢ IsIso (L.op.map f)\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nW : MorphismProperty C\nL : C ⥤ D\nh : IsInvertedBy W L\nX Y : Cᵒᵖ\nf : X ⟶ Y\nhf : MorphismProperty.op W f\nthis : IsIso (L.map f.unop)\n⊢ IsIso (L.map f.unop).op\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nW : MorphismProperty C\nL : Cᵒᵖ ⥤ D\nh : IsInvertedBy (MorphismProperty.op W) L\nX Y : C\nf : X ⟶ Y\nhf : W f\n⊢ IsIso (L.rightOp.map f)\n[PROOFSTEP]\nhaveI := h f.op hf\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nW : MorphismProperty C\nL : Cᵒᵖ ⥤ D\nh : IsInvertedBy (MorphismProperty.op W) L\nX Y : C\nf : X ⟶ Y\nhf : W f\nthis : IsIso (L.map f.op)\n⊢ IsIso (L.rightOp.map f)\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nW : MorphismProperty C\nL : Cᵒᵖ ⥤ D\nh : IsInvertedBy (MorphismProperty.op W) L\nX Y : C\nf : X ⟶ Y\nhf : W f\nthis : IsIso (L.map f.op)\n⊢ IsIso (L.map f.op).op\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nW : MorphismProperty C\nL : C ⥤ Dᵒᵖ\nh : IsInvertedBy W L\nX Y : Cᵒᵖ\nf : X ⟶ Y\nhf : MorphismProperty.op W f\n⊢ IsIso (L.leftOp.map f)\n[PROOFSTEP]\nhaveI := h f.unop hf\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nW : MorphismProperty C\nL : C ⥤ Dᵒᵖ\nh : IsInvertedBy W L\nX Y : Cᵒᵖ\nf : X ⟶ Y\nhf : MorphismProperty.op W f\nthis : IsIso (L.map f.unop)\n⊢ IsIso (L.leftOp.map f)\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nW : MorphismProperty C\nL : C ⥤ Dᵒᵖ\nh : IsInvertedBy W L\nX Y : Cᵒᵖ\nf : X ⟶ Y\nhf : MorphismProperty.op W f\nthis : IsIso (L.map f.unop)\n⊢ IsIso (L.map f.unop).unop\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nW : MorphismProperty C\nL : Cᵒᵖ ⥤ Dᵒᵖ\nh : IsInvertedBy (MorphismProperty.op W) L\nX Y : C\nf : X ⟶ Y\nhf : W f\n⊢ IsIso ((Functor.unop L).map f)\n[PROOFSTEP]\nhaveI := h f.op hf\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nW : MorphismProperty C\nL : Cᵒᵖ ⥤ Dᵒᵖ\nh : IsInvertedBy (MorphismProperty.op W) L\nX Y : C\nf : X ⟶ Y\nhf : W f\nthis : IsIso (L.map f.op)\n⊢ IsIso ((Functor.unop L).map f)\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nW : MorphismProperty C\nL : Cᵒᵖ ⥤ Dᵒᵖ\nh : IsInvertedBy (MorphismProperty.op W) L\nX Y : C\nf : X ⟶ Y\nhf : W f\nthis : IsIso (L.map f.op)\n⊢ IsIso (L.map f.op).unop\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nF₁ F₂ : C ⥤ D\napp : (X : C) → F₁.obj X ⟶ F₂.obj X\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nhf : naturalityProperty app f\nhg : naturalityProperty app g\n⊢ naturalityProperty app (f ≫ g)\n[PROOFSTEP]\nsimp only [naturalityProperty] at hf hg ⊢\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nF₁ F₂ : C ⥤ D\napp : (X : C) → F₁.obj X ⟶ F₂.obj X\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nhf : F₁.map f ≫ app Y = app X ≫ F₂.map f\nhg : F₁.map g ≫ app Z = app Y ≫ F₂.map g\n⊢ F₁.map (f ≫ g) ≫ app Z = app X ≫ F₂.map (f ≫ g)\n[PROOFSTEP]\nsimp only [Functor.map_comp, Category.assoc, hg]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nF₁ F₂ : C ⥤ D\napp : (X : C) → F₁.obj X ⟶ F₂.obj X\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nhf : F₁.map f ≫ app Y = app X ≫ F₂.map f\nhg : F₁.map g ≫ app Z = app Y ≫ F₂.map g\n⊢ F₁.map f ≫ app Y ≫ F₂.map g = app X ≫ F₂.map f ≫ F₂.map g\n[PROOFSTEP]\nslice_lhs 1 2 => rw [hf]\n[GOAL]\ncase a\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nF₁ F₂ : C ⥤ D\napp : (X : C) → F₁.obj X ⟶ F₂.obj X\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nhf : F₁.map f ≫ app Y = app X ≫ F₂.map f\nhg : F₁.map g ≫ app Z = app Y ≫ F₂.map g\n| F₁.map f ≫ app Y\ncase a\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nF₁ F₂ : C ⥤ D\napp : (X : C) → F₁.obj X ⟶ F₂.obj X\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nhf : F₁.map f ≫ app Y = app X ≫ F₂.map f\nhg : F₁.map g ≫ app Z = app Y ≫ F₂.map g\n| F₂.map g\n[PROOFSTEP]\nrw [hf]\n[GOAL]\ncase a\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nF₁ F₂ : C ⥤ D\napp : (X : C) → F₁.obj X ⟶ F₂.obj X\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nhf : F₁.map f ≫ app Y = app X ≫ F₂.map f\nhg : F₁.map g ≫ app Z = app Y ≫ F₂.map g\n| F₁.map f ≫ app Y\ncase a\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nF₁ F₂ : C ⥤ D\napp : (X : C) → F₁.obj X ⟶ F₂.obj X\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nhf : F₁.map f ≫ app Y = app X ≫ F₂.map f\nhg : F₁.map g ≫ app Z = app Y ≫ F₂.map g\n| F₂.map g\n[PROOFSTEP]\nrw [hf]\n[GOAL]\ncase a\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nF₁ F₂ : C ⥤ D\napp : (X : C) → F₁.obj X ⟶ F₂.obj X\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nhf : F₁.map f ≫ app Y = app X ≫ F₂.map f\nhg : F₁.map g ≫ app Z = app Y ≫ F₂.map g\n| F₁.map f ≫ app Y\ncase a\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nF₁ F₂ : C ⥤ D\napp : (X : C) → F₁.obj X ⟶ F₂.obj X\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nhf : F₁.map f ≫ app Y = app X ≫ F₂.map f\nhg : F₁.map g ≫ app Z = app Y ≫ F₂.map g\n| F₂.map g\n[PROOFSTEP]\nrw [hf]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nF₁ F₂ : C ⥤ D\napp : (X : C) → F₁.obj X ⟶ F₂.obj X\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nhf : F₁.map f ≫ app Y = app X ≫ F₂.map f\nhg : F₁.map g ≫ app Z = app Y ≫ F₂.map g\n⊢ (app X ≫ F₂.map f) ≫ F₂.map g = app X ≫ F₂.map f ≫ F₂.map g\n[PROOFSTEP]\nrw [Category.assoc]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nF₁ F₂ : C ⥤ D\napp : (X : C) → F₁.obj X ⟶ F₂.obj X\nX Y : C\ne : X ≅ Y\nhe : naturalityProperty app e.hom\n⊢ naturalityProperty app e.inv\n[PROOFSTEP]\nsimp only [naturalityProperty] at he ⊢\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nF₁ F₂ : C ⥤ D\napp : (X : C) → F₁.obj X ⟶ F₂.obj X\nX Y : C\ne : X ≅ Y\nhe : F₁.map e.hom ≫ app Y = app X ≫ F₂.map e.hom\n⊢ F₁.map e.inv ≫ app X = app Y ≫ F₂.map e.inv\n[PROOFSTEP]\nrw [← cancel_epi (F₁.map e.hom)]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nF₁ F₂ : C ⥤ D\napp : (X : C) → F₁.obj X ⟶ F₂.obj X\nX Y : C\ne : X ≅ Y\nhe : F₁.map e.hom ≫ app Y = app X ≫ F₂.map e.hom\n⊢ F₁.map e.hom ≫ F₁.map e.inv ≫ app X = F₁.map e.hom ≫ app Y ≫ F₂.map e.inv\n[PROOFSTEP]\nslice_rhs 1 2 => rw [he]\n[GOAL]\ncase a\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nF₁ F₂ : C ⥤ D\napp : (X : C) → F₁.obj X ⟶ F₂.obj X\nX Y : C\ne : X ≅ Y\nhe : F₁.map e.hom ≫ app Y = app X ≫ F₂.map e.hom\n| F₁.map e.hom ≫ app Y\ncase a\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nF₁ F₂ : C ⥤ D\napp : (X : C) → F₁.obj X ⟶ F₂.obj X\nX Y : C\ne : X ≅ Y\nhe : F₁.map e.hom ≫ app Y = app X ≫ F₂.map e.hom\n| F₂.map e.inv\n[PROOFSTEP]\nrw [he]\n[GOAL]\ncase a\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nF₁ F₂ : C ⥤ D\napp : (X : C) → F₁.obj X ⟶ F₂.obj X\nX Y : C\ne : X ≅ Y\nhe : F₁.map e.hom ≫ app Y = app X ≫ F₂.map e.hom\n| F₁.map e.hom ≫ app Y\ncase a\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nF₁ F₂ : C ⥤ D\napp : (X : C) → F₁.obj X ⟶ F₂.obj X\nX Y : C\ne : X ≅ Y\nhe : F₁.map e.hom ≫ app Y = app X ≫ F₂.map e.hom\n| F₂.map e.inv\n[PROOFSTEP]\nrw [he]\n[GOAL]\ncase a\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nF₁ F₂ : C ⥤ D\napp : (X : C) → F₁.obj X ⟶ F₂.obj X\nX Y : C\ne : X ≅ Y\nhe : F₁.map e.hom ≫ app Y = app X ≫ F₂.map e.hom\n| F₁.map e.hom ≫ app Y\ncase a\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nF₁ F₂ : C ⥤ D\napp : (X : C) → F₁.obj X ⟶ F₂.obj X\nX Y : C\ne : X ≅ Y\nhe : F₁.map e.hom ≫ app Y = app X ≫ F₂.map e.hom\n| F₂.map e.inv\n[PROOFSTEP]\nrw [he]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nF₁ F₂ : C ⥤ D\napp : (X : C) → F₁.obj X ⟶ F₂.obj X\nX Y : C\ne : X ≅ Y\nhe : F₁.map e.hom ≫ app Y = app X ≫ F₂.map e.hom\n⊢ F₁.map e.hom ≫ F₁.map e.inv ≫ app X = (app X ≫ F₂.map e.hom) ≫ F₂.map e.inv\n[PROOFSTEP]\nsimp only [Category.assoc, ← F₁.map_comp_assoc, ← F₂.map_comp, e.hom_inv_id, Functor.map_id, Category.id_comp,\n Category.comp_id]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nP : MorphismProperty D\nh : RespectsIso P\nF : C ⥤ D\n⊢ RespectsIso (MorphismProperty.inverseImage P F)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nP : MorphismProperty D\nh : RespectsIso P\nF : C ⥤ D\n⊢ ∀ {X Y Z : C} (e : X ≅ Y) (f : Y ⟶ Z),\n MorphismProperty.inverseImage P F f → MorphismProperty.inverseImage P F (e.hom ≫ f)\ncase right\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nP : MorphismProperty D\nh : RespectsIso P\nF : C ⥤ D\n⊢ ∀ {X Y Z : C} (e : Y ≅ Z) (f : X ⟶ Y),\n MorphismProperty.inverseImage P F f → MorphismProperty.inverseImage P F (f ≫ e.hom)\n[PROOFSTEP]\nall_goals\n intro X Y Z e f hf\n dsimp [MorphismProperty.inverseImage]\n rw [F.map_comp]\n[GOAL]\ncase left\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nP : MorphismProperty D\nh : RespectsIso P\nF : C ⥤ D\n⊢ ∀ {X Y Z : C} (e : X ≅ Y) (f : Y ⟶ Z),\n MorphismProperty.inverseImage P F f → MorphismProperty.inverseImage P F (e.hom ≫ f)\n[PROOFSTEP]\nintro X Y Z e f hf\n[GOAL]\ncase left\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nP : MorphismProperty D\nh : RespectsIso P\nF : C ⥤ D\nX Y Z : C\ne : X ≅ Y\nf : Y ⟶ Z\nhf : MorphismProperty.inverseImage P F f\n⊢ MorphismProperty.inverseImage P F (e.hom ≫ f)\n[PROOFSTEP]\ndsimp [MorphismProperty.inverseImage]\n[GOAL]\ncase left\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nP : MorphismProperty D\nh : RespectsIso P\nF : C ⥤ D\nX Y Z : C\ne : X ≅ Y\nf : Y ⟶ Z\nhf : MorphismProperty.inverseImage P F f\n⊢ P (F.map (e.hom ≫ f))\n[PROOFSTEP]\nrw [F.map_comp]\n[GOAL]\ncase right\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nP : MorphismProperty D\nh : RespectsIso P\nF : C ⥤ D\n⊢ ∀ {X Y Z : C} (e : Y ≅ Z) (f : X ⟶ Y),\n MorphismProperty.inverseImage P F f → MorphismProperty.inverseImage P F (f ≫ e.hom)\n[PROOFSTEP]\nintro X Y Z e f hf\n[GOAL]\ncase right\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nP : MorphismProperty D\nh : RespectsIso P\nF : C ⥤ D\nX Y Z : C\ne : Y ≅ Z\nf : X ⟶ Y\nhf : MorphismProperty.inverseImage P F f\n⊢ MorphismProperty.inverseImage P F (f ≫ e.hom)\n[PROOFSTEP]\ndsimp [MorphismProperty.inverseImage]\n[GOAL]\ncase right\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nP : MorphismProperty D\nh : RespectsIso P\nF : C ⥤ D\nX Y Z : C\ne : Y ≅ Z\nf : X ⟶ Y\nhf : MorphismProperty.inverseImage P F f\n⊢ P (F.map (f ≫ e.hom))\n[PROOFSTEP]\nrw [F.map_comp]\n[GOAL]\ncase left\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nP : MorphismProperty D\nh : RespectsIso P\nF : C ⥤ D\nX Y Z : C\ne : X ≅ Y\nf : Y ⟶ Z\nhf : MorphismProperty.inverseImage P F f\n⊢ P (F.map e.hom ≫ F.map f)\ncase right\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nP : MorphismProperty D\nh : RespectsIso P\nF : C ⥤ D\nX Y Z : C\ne : Y ≅ Z\nf : X ⟶ Y\nhf : MorphismProperty.inverseImage P F f\n⊢ P (F.map f ≫ F.map e.hom)\n[PROOFSTEP]\nexacts [h.1 (F.mapIso e) (F.map f) hf, h.2 (F.mapIso e) (F.map f) hf]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nP : MorphismProperty D\nh : StableUnderComposition P\nF : C ⥤ D\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nhf : MorphismProperty.inverseImage P F f\nhg : MorphismProperty.inverseImage P F g\n⊢ MorphismProperty.inverseImage P F (f ≫ g)\n[PROOFSTEP]\nsimpa only [← F.map_comp] using h (F.map f) (F.map g) hf hg\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.65654, u_1} D\nX Y : C\nf : X ⟶ Y\n⊢ isomorphisms C f ↔ IsIso f\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.65803, u_1} D\nX Y : C\nf : X ⟶ Y\n⊢ monomorphisms C f ↔ Mono f\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.65952, u_1} D\nX Y : C\nf : X ⟶ Y\n⊢ epimorphisms C f ↔ Epi f\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.66779, u_1} D\n⊢ RespectsIso (MorphismProperty.monomorphisms C)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.66779, u_1} D\n⊢ ∀ {X Y Z : C} (e : X ≅ Y) (f : Y ⟶ Z),\n MorphismProperty.monomorphisms C f → MorphismProperty.monomorphisms C (e.hom ≫ f)\n[PROOFSTEP]\nintro X Y Z e f\n[GOAL]\ncase left\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.66779, u_1} D\nX Y Z : C\ne : X ≅ Y\nf : Y ⟶ Z\n⊢ MorphismProperty.monomorphisms C f → MorphismProperty.monomorphisms C (e.hom ≫ f)\n[PROOFSTEP]\nsimp only [monomorphisms.iff]\n[GOAL]\ncase left\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.66779, u_1} D\nX Y Z : C\ne : X ≅ Y\nf : Y ⟶ Z\n⊢ Mono f → Mono (e.hom ≫ f)\n[PROOFSTEP]\nintro\n[GOAL]\ncase left\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.66779, u_1} D\nX Y Z : C\ne : X ≅ Y\nf : Y ⟶ Z\na✝ : Mono f\n⊢ Mono (e.hom ≫ f)\n[PROOFSTEP]\napply mono_comp\n[GOAL]\ncase right\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.66779, u_1} D\n⊢ ∀ {X Y Z : C} (e : Y ≅ Z) (f : X ⟶ Y),\n MorphismProperty.monomorphisms C f → MorphismProperty.monomorphisms C (f ≫ e.hom)\n[PROOFSTEP]\nintro X Y Z e f\n[GOAL]\ncase right\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.66779, u_1} D\nX Y Z : C\ne : Y ≅ Z\nf : X ⟶ Y\n⊢ MorphismProperty.monomorphisms C f → MorphismProperty.monomorphisms C (f ≫ e.hom)\n[PROOFSTEP]\nsimp only [monomorphisms.iff]\n[GOAL]\ncase right\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.66779, u_1} D\nX Y Z : C\ne : Y ≅ Z\nf : X ⟶ Y\n⊢ Mono f → Mono (f ≫ e.hom)\n[PROOFSTEP]\nintro\n[GOAL]\ncase right\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.66779, u_1} D\nX Y Z : C\ne : Y ≅ Z\nf : X ⟶ Y\na✝ : Mono f\n⊢ Mono (f ≫ e.hom)\n[PROOFSTEP]\napply mono_comp\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.67468, u_1} D\n⊢ RespectsIso (MorphismProperty.epimorphisms C)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.67468, u_1} D\n⊢ ∀ {X Y Z : C} (e : X ≅ Y) (f : Y ⟶ Z), MorphismProperty.epimorphisms C f → MorphismProperty.epimorphisms C (e.hom ≫ f)\n[PROOFSTEP]\nintro X Y Z e f\n[GOAL]\ncase left\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.67468, u_1} D\nX Y Z : C\ne : X ≅ Y\nf : Y ⟶ Z\n⊢ MorphismProperty.epimorphisms C f → MorphismProperty.epimorphisms C (e.hom ≫ f)\n[PROOFSTEP]\nsimp only [epimorphisms.iff]\n[GOAL]\ncase left\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.67468, u_1} D\nX Y Z : C\ne : X ≅ Y\nf : Y ⟶ Z\n⊢ Epi f → Epi (e.hom ≫ f)\n[PROOFSTEP]\nintro\n[GOAL]\ncase left\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.67468, u_1} D\nX Y Z : C\ne : X ≅ Y\nf : Y ⟶ Z\na✝ : Epi f\n⊢ Epi (e.hom ≫ f)\n[PROOFSTEP]\napply epi_comp\n[GOAL]\ncase right\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.67468, u_1} D\n⊢ ∀ {X Y Z : C} (e : Y ≅ Z) (f : X ⟶ Y), MorphismProperty.epimorphisms C f → MorphismProperty.epimorphisms C (f ≫ e.hom)\n[PROOFSTEP]\nintro X Y Z e f\n[GOAL]\ncase right\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.67468, u_1} D\nX Y Z : C\ne : Y ≅ Z\nf : X ⟶ Y\n⊢ MorphismProperty.epimorphisms C f → MorphismProperty.epimorphisms C (f ≫ e.hom)\n[PROOFSTEP]\nsimp only [epimorphisms.iff]\n[GOAL]\ncase right\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.67468, u_1} D\nX Y Z : C\ne : Y ≅ Z\nf : X ⟶ Y\n⊢ Epi f → Epi (f ≫ e.hom)\n[PROOFSTEP]\nintro\n[GOAL]\ncase right\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.67468, u_1} D\nX Y Z : C\ne : Y ≅ Z\nf : X ⟶ Y\na✝ : Epi f\n⊢ Epi (f ≫ e.hom)\n[PROOFSTEP]\napply epi_comp\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.68149, u_1} D\n⊢ RespectsIso (MorphismProperty.isomorphisms C)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.68149, u_1} D\n⊢ ∀ {X Y Z : C} (e : X ≅ Y) (f : Y ⟶ Z), MorphismProperty.isomorphisms C f → MorphismProperty.isomorphisms C (e.hom ≫ f)\n[PROOFSTEP]\nintro X Y Z e f\n[GOAL]\ncase left\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.68149, u_1} D\nX Y Z : C\ne : X ≅ Y\nf : Y ⟶ Z\n⊢ MorphismProperty.isomorphisms C f → MorphismProperty.isomorphisms C (e.hom ≫ f)\n[PROOFSTEP]\nsimp only [isomorphisms.iff]\n[GOAL]\ncase left\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.68149, u_1} D\nX Y Z : C\ne : X ≅ Y\nf : Y ⟶ Z\n⊢ IsIso f → IsIso (e.hom ≫ f)\n[PROOFSTEP]\nintro\n[GOAL]\ncase left\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.68149, u_1} D\nX Y Z : C\ne : X ≅ Y\nf : Y ⟶ Z\na✝ : IsIso f\n⊢ IsIso (e.hom ≫ f)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase right\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.68149, u_1} D\n⊢ ∀ {X Y Z : C} (e : Y ≅ Z) (f : X ⟶ Y), MorphismProperty.isomorphisms C f → MorphismProperty.isomorphisms C (f ≫ e.hom)\n[PROOFSTEP]\nintro X Y Z e f\n[GOAL]\ncase right\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.68149, u_1} D\nX Y Z : C\ne : Y ≅ Z\nf : X ⟶ Y\n⊢ MorphismProperty.isomorphisms C f → MorphismProperty.isomorphisms C (f ≫ e.hom)\n[PROOFSTEP]\nsimp only [isomorphisms.iff]\n[GOAL]\ncase right\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.68149, u_1} D\nX Y Z : C\ne : Y ≅ Z\nf : X ⟶ Y\n⊢ IsIso f → IsIso (f ≫ e.hom)\n[PROOFSTEP]\nintro\n[GOAL]\ncase right\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.68149, u_1} D\nX Y Z : C\ne : Y ≅ Z\nf : X ⟶ Y\na✝ : IsIso f\n⊢ IsIso (f ≫ e.hom)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.68670, u_1} D\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nhf : MorphismProperty.isomorphisms C f\nhg : MorphismProperty.isomorphisms C g\n⊢ MorphismProperty.isomorphisms C (f ≫ g)\n[PROOFSTEP]\nrw [isomorphisms.iff] at hf hg ⊢\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.68670, u_1} D\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nhf : IsIso f\nhg : IsIso g\n⊢ IsIso (f ≫ g)\n[PROOFSTEP]\nhaveI := hf\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.68670, u_1} D\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nhf : IsIso f\nhg : IsIso g\nthis : IsIso f\n⊢ IsIso (f ≫ g)\n[PROOFSTEP]\nhaveI := hg\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.68670, u_1} D\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nhf : IsIso f\nhg : IsIso g\nthis✝ : IsIso f\nthis : IsIso g\n⊢ IsIso (f ≫ g)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.69618, u_1} D\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nhf : MorphismProperty.monomorphisms C f\nhg : MorphismProperty.monomorphisms C g\n⊢ MorphismProperty.monomorphisms C (f ≫ g)\n[PROOFSTEP]\nrw [monomorphisms.iff] at hf hg ⊢\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.69618, u_1} D\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nhf : Mono f\nhg : Mono g\n⊢ Mono (f ≫ g)\n[PROOFSTEP]\nhaveI := hf\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.69618, u_1} D\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nhf : Mono f\nhg : Mono g\nthis : Mono f\n⊢ Mono (f ≫ g)\n[PROOFSTEP]\nhaveI := hg\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.69618, u_1} D\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nhf : Mono f\nhg : Mono g\nthis✝ : Mono f\nthis : Mono g\n⊢ Mono (f ≫ g)\n[PROOFSTEP]\napply mono_comp\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.70586, u_1} D\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nhf : MorphismProperty.epimorphisms C f\nhg : MorphismProperty.epimorphisms C g\n⊢ MorphismProperty.epimorphisms C (f ≫ g)\n[PROOFSTEP]\nrw [epimorphisms.iff] at hf hg ⊢\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.70586, u_1} D\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nhf : Epi f\nhg : Epi g\n⊢ Epi (f ≫ g)\n[PROOFSTEP]\nhaveI := hf\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.70586, u_1} D\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nhf : Epi f\nhg : Epi g\nthis : Epi f\n⊢ Epi (f ≫ g)\n[PROOFSTEP]\nhaveI := hg\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.70586, u_1} D\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nhf : Epi f\nhg : Epi g\nthis✝ : Epi f\nthis : Epi g\n⊢ Epi (f ≫ g)\n[PROOFSTEP]\napply epi_comp\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nW : MorphismProperty C\nF₁ F₂ : FunctorsInverting W D\nh : F₁.obj = F₂.obj\n⊢ F₁ = F₂\n[PROOFSTEP]\ncases F₁\n[GOAL]\ncase mk\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nW : MorphismProperty C\nF₂ : FunctorsInverting W D\nobj✝ : C ⥤ D\nproperty✝ : IsInvertedBy W obj✝\nh : { obj := obj✝, property := property✝ }.obj = F₂.obj\n⊢ { obj := obj✝, property := property✝ } = F₂\n[PROOFSTEP]\ncases F₂\n[GOAL]\ncase mk.mk\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nW : MorphismProperty C\nobj✝¹ : C ⥤ D\nproperty✝¹ : IsInvertedBy W obj✝¹\nobj✝ : C ⥤ D\nproperty✝ : IsInvertedBy W obj✝\nh : { obj := obj✝¹, property := property✝¹ }.obj = { obj := obj✝, property := property✝ }.obj\n⊢ { obj := obj✝¹, property := property✝¹ } = { obj := obj✝, property := property✝ }\n[PROOFSTEP]\nsubst h\n[GOAL]\ncase mk.mk\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nW : MorphismProperty C\nobj✝ : C ⥤ D\nproperty✝¹ : IsInvertedBy W obj✝\nproperty✝ : IsInvertedBy W { obj := obj✝, property := property✝¹ }.obj\n⊢ { obj := obj✝, property := property✝¹ } =\n { obj := { obj := obj✝, property := property✝¹ }.obj, property := property✝ }\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nW : MorphismProperty C\nF₁ F₂ : C ⥤ D\ne : F₁ ≅ F₂\n⊢ IsInvertedBy W F₁ ↔ IsInvertedBy W F₂\n[PROOFSTEP]\nsuffices ∀ (X Y : C) (f : X ⟶ Y), IsIso (F₁.map f) ↔ IsIso (F₂.map f)\n by\n constructor\n exact fun h X Y f hf => by\n rw [← this]\n exact h f hf\n exact fun h X Y f hf => by\n rw [this]\n exact h f hf\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nW : MorphismProperty C\nF₁ F₂ : C ⥤ D\ne : F₁ ≅ F₂\nthis : ∀ (X Y : C) (f : X ⟶ Y), IsIso (F₁.map f) ↔ IsIso (F₂.map f)\n⊢ IsInvertedBy W F₁ ↔ IsInvertedBy W F₂\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nW : MorphismProperty C\nF₁ F₂ : C ⥤ D\ne : F₁ ≅ F₂\nthis : ∀ (X Y : C) (f : X ⟶ Y), IsIso (F₁.map f) ↔ IsIso (F₂.map f)\n⊢ IsInvertedBy W F₁ → IsInvertedBy W F₂\ncase mpr\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nW : MorphismProperty C\nF₁ F₂ : C ⥤ D\ne : F₁ ≅ F₂\nthis : ∀ (X Y : C) (f : X ⟶ Y), IsIso (F₁.map f) ↔ IsIso (F₂.map f)\n⊢ IsInvertedBy W F₂ → IsInvertedBy W F₁\n[PROOFSTEP]\nexact fun h X Y f hf => by\n rw [← this]\n exact h f hf\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nW : MorphismProperty C\nF₁ F₂ : C ⥤ D\ne : F₁ ≅ F₂\nthis : ∀ (X Y : C) (f : X ⟶ Y), IsIso (F₁.map f) ↔ IsIso (F₂.map f)\nh : IsInvertedBy W F₁\nX Y : C\nf : X ⟶ Y\nhf : W f\n⊢ IsIso (F₂.map f)\n[PROOFSTEP]\nrw [← this]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nW : MorphismProperty C\nF₁ F₂ : C ⥤ D\ne : F₁ ≅ F₂\nthis : ∀ (X Y : C) (f : X ⟶ Y), IsIso (F₁.map f) ↔ IsIso (F₂.map f)\nh : IsInvertedBy W F₁\nX Y : C\nf : X ⟶ Y\nhf : W f\n⊢ IsIso (F₁.map f)\n[PROOFSTEP]\nexact h f hf\n[GOAL]\ncase mpr\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nW : MorphismProperty C\nF₁ F₂ : C ⥤ D\ne : F₁ ≅ F₂\nthis : ∀ (X Y : C) (f : X ⟶ Y), IsIso (F₁.map f) ↔ IsIso (F₂.map f)\n⊢ IsInvertedBy W F₂ → IsInvertedBy W F₁\n[PROOFSTEP]\nexact fun h X Y f hf => by\n rw [this]\n exact h f hf\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nW : MorphismProperty C\nF₁ F₂ : C ⥤ D\ne : F₁ ≅ F₂\nthis : ∀ (X Y : C) (f : X ⟶ Y), IsIso (F₁.map f) ↔ IsIso (F₂.map f)\nh : IsInvertedBy W F₂\nX Y : C\nf : X ⟶ Y\nhf : W f\n⊢ IsIso (F₁.map f)\n[PROOFSTEP]\nrw [this]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nW : MorphismProperty C\nF₁ F₂ : C ⥤ D\ne : F₁ ≅ F₂\nthis : ∀ (X Y : C) (f : X ⟶ Y), IsIso (F₁.map f) ↔ IsIso (F₂.map f)\nh : IsInvertedBy W F₂\nX Y : C\nf : X ⟶ Y\nhf : W f\n⊢ IsIso (F₂.map f)\n[PROOFSTEP]\nexact h f hf\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nW : MorphismProperty C\nF₁ F₂ : C ⥤ D\ne : F₁ ≅ F₂\n⊢ ∀ (X Y : C) (f : X ⟶ Y), IsIso (F₁.map f) ↔ IsIso (F₂.map f)\n[PROOFSTEP]\nintro X Y f\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nW : MorphismProperty C\nF₁ F₂ : C ⥤ D\ne : F₁ ≅ F₂\nX Y : C\nf : X ⟶ Y\n⊢ IsIso (F₁.map f) ↔ IsIso (F₂.map f)\n[PROOFSTEP]\nexact (RespectsIso.isomorphisms D).arrow_mk_iso_iff (Arrow.isoMk (e.app X) (e.app Y) (by simp))\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nW : MorphismProperty C\nF₁ F₂ : C ⥤ D\ne : F₁ ≅ F₂\nX Y : C\nf : X ⟶ Y\n⊢ (e.app X).hom ≫ (Arrow.mk (F₂.map f)).hom = (Arrow.mk (F₁.map f)).hom ≫ (e.app Y).hom\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.75953, u_1} D\ninst✝ : HasPullbacks C\nP : MorphismProperty C\nhP : RespectsIso P\n⊢ RespectsIso (MorphismProperty.diagonal P)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.75953, u_1} D\ninst✝ : HasPullbacks C\nP : MorphismProperty C\nhP : RespectsIso P\n⊢ ∀ {X Y Z : C} (e : X ≅ Y) (f : Y ⟶ Z), MorphismProperty.diagonal P f → MorphismProperty.diagonal P (e.hom ≫ f)\n[PROOFSTEP]\nintrov H\n[GOAL]\ncase left\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.75953, u_1} D\ninst✝ : HasPullbacks C\nP : MorphismProperty C\nhP : RespectsIso P\nX Y Z : C\ne : X ≅ Y\nf : Y ⟶ Z\nH : MorphismProperty.diagonal P f\n⊢ MorphismProperty.diagonal P (e.hom ≫ f)\n[PROOFSTEP]\nrwa [diagonal_iff, pullback.diagonal_comp, hP.cancel_left_isIso, hP.cancel_left_isIso, ←\n hP.cancel_right_isIso _ (pullback.map (e.hom ≫ f) (e.hom ≫ f) f f e.hom e.hom (𝟙 Z) (by simp) (by simp)), ←\n pullback.condition, hP.cancel_left_isIso]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.75953, u_1} D\ninst✝ : HasPullbacks C\nP : MorphismProperty C\nhP : RespectsIso P\nX Y Z : C\ne : X ≅ Y\nf : Y ⟶ Z\nH : MorphismProperty.diagonal P f\n⊢ (e.hom ≫ f) ≫ 𝟙 Z = e.hom ≫ f\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.75953, u_1} D\ninst✝ : HasPullbacks C\nP : MorphismProperty C\nhP : RespectsIso P\nX Y Z : C\ne : X ≅ Y\nf : Y ⟶ Z\nH : MorphismProperty.diagonal P f\n⊢ (e.hom ≫ f) ≫ 𝟙 Z = e.hom ≫ f\n[PROOFSTEP]\nsimp\n[GOAL]\ncase right\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.75953, u_1} D\ninst✝ : HasPullbacks C\nP : MorphismProperty C\nhP : RespectsIso P\n⊢ ∀ {X Y Z : C} (e : Y ≅ Z) (f : X ⟶ Y), MorphismProperty.diagonal P f → MorphismProperty.diagonal P (f ≫ e.hom)\n[PROOFSTEP]\nintrov H\n[GOAL]\ncase right\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.75953, u_1} D\ninst✝ : HasPullbacks C\nP : MorphismProperty C\nhP : RespectsIso P\nX Y Z : C\ne : Y ≅ Z\nf : X ⟶ Y\nH : MorphismProperty.diagonal P f\n⊢ MorphismProperty.diagonal P (f ≫ e.hom)\n[PROOFSTEP]\ndelta diagonal\n[GOAL]\ncase right\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.75953, u_1} D\ninst✝ : HasPullbacks C\nP : MorphismProperty C\nhP : RespectsIso P\nX Y Z : C\ne : Y ≅ Z\nf : X ⟶ Y\nH : MorphismProperty.diagonal P f\n⊢ P (pullback.diagonal (f ≫ e.hom))\n[PROOFSTEP]\nrwa [pullback.diagonal_comp, hP.cancel_right_isIso]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.83850, u_1} D\ninst✝ : HasPullbacks C\nP : MorphismProperty C\nhP : StableUnderComposition P\nhP' : RespectsIso P\nhP'' : StableUnderBaseChange P\n⊢ StableUnderComposition (MorphismProperty.diagonal P)\n[PROOFSTEP]\nintrov X h₁ h₂\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.83850, u_1} D\ninst✝ : HasPullbacks C\nP : MorphismProperty C\nhP : StableUnderComposition P\nhP' : RespectsIso P\nhP'' : StableUnderBaseChange P\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nh₁ : MorphismProperty.diagonal P f\nh₂ : MorphismProperty.diagonal P g\n⊢ MorphismProperty.diagonal P (f ≫ g)\n[PROOFSTEP]\nrw [diagonal_iff, pullback.diagonal_comp]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.83850, u_1} D\ninst✝ : HasPullbacks C\nP : MorphismProperty C\nhP : StableUnderComposition P\nhP' : RespectsIso P\nhP'' : StableUnderBaseChange P\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nh₁ : MorphismProperty.diagonal P f\nh₂ : MorphismProperty.diagonal P g\n⊢ P (pullback.diagonal f ≫ (pullbackDiagonalMapIdIso f f g).inv ≫ pullback.snd)\n[PROOFSTEP]\nexact hP _ _ h₁ (by simpa [hP'.cancel_left_isIso] using hP''.snd _ _ h₂)\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.83850, u_1} D\ninst✝ : HasPullbacks C\nP : MorphismProperty C\nhP : StableUnderComposition P\nhP' : RespectsIso P\nhP'' : StableUnderBaseChange P\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nh₁ : MorphismProperty.diagonal P f\nh₂ : MorphismProperty.diagonal P g\n⊢ P ((pullbackDiagonalMapIdIso f f g).inv ≫ pullback.snd)\n[PROOFSTEP]\nsimpa [hP'.cancel_left_isIso] using hP''.snd _ _ h₂\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.86028, u_1} D\ninst✝ : HasPullbacks C\nP : MorphismProperty C\nhP : StableUnderBaseChange P\nhP' : RespectsIso P\n⊢ ∀ (X Y S : C) (f : X ⟶ S) (g : Y ⟶ S), MorphismProperty.diagonal P g → MorphismProperty.diagonal P pullback.fst\n[PROOFSTEP]\nintrov h\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.86028, u_1} D\ninst✝ : HasPullbacks C\nP : MorphismProperty C\nhP : StableUnderBaseChange P\nhP' : RespectsIso P\nX Y S : C\nf : X ⟶ S\ng : Y ⟶ S\nh : MorphismProperty.diagonal P g\n⊢ MorphismProperty.diagonal P pullback.fst\n[PROOFSTEP]\nrw [diagonal_iff, diagonal_pullback_fst, hP'.cancel_left_isIso, hP'.cancel_right_isIso]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.86028, u_1} D\ninst✝ : HasPullbacks C\nP : MorphismProperty C\nhP : StableUnderBaseChange P\nhP' : RespectsIso P\nX Y S : C\nf : X ⟶ S\ng : Y ⟶ S\nh : MorphismProperty.diagonal P g\n⊢ P ((baseChange f).map (Over.homMk (pullback.diagonal g))).left\n[PROOFSTEP]\nexact hP.baseChange_map f _ (by simpa)\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.86028, u_1} D\ninst✝ : HasPullbacks C\nP : MorphismProperty C\nhP : StableUnderBaseChange P\nhP' : RespectsIso P\nX Y S : C\nf : X ⟶ S\ng : Y ⟶ S\nh : MorphismProperty.diagonal P g\n⊢ P (Over.homMk (pullback.diagonal g)).left\n[PROOFSTEP]\nsimpa\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.88038, u_1} D\nP : MorphismProperty C\n⊢ RespectsIso (universally P)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.88038, u_1} D\nP : MorphismProperty C\n⊢ ∀ {X Y Z : C} (e : X ≅ Y) (f : Y ⟶ Z), universally P f → universally P (e.hom ≫ f)\n[PROOFSTEP]\nintro X Y Z e f hf X' Z' i₁ i₂ f' H\n[GOAL]\ncase left\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.88038, u_1} D\nP : MorphismProperty C\nX Y Z : C\ne : X ≅ Y\nf : Y ⟶ Z\nhf : universally P f\nX' Z' : C\ni₁ : X' ⟶ X\ni₂ : Z' ⟶ Z\nf' : X' ⟶ Z'\nH : IsPullback f' i₁ i₂ (e.hom ≫ f)\n⊢ P f'\n[PROOFSTEP]\nhave : IsPullback (𝟙 _) (i₁ ≫ e.hom) i₁ e.inv :=\n IsPullback.of_horiz_isIso ⟨by rw [Category.id_comp, Category.assoc, e.hom_inv_id, Category.comp_id]⟩\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.88038, u_1} D\nP : MorphismProperty C\nX Y Z : C\ne : X ≅ Y\nf : Y ⟶ Z\nhf : universally P f\nX' Z' : C\ni₁ : X' ⟶ X\ni₂ : Z' ⟶ Z\nf' : X' ⟶ Z'\nH : IsPullback f' i₁ i₂ (e.hom ≫ f)\n⊢ 𝟙 X' ≫ i₁ = (i₁ ≫ e.hom) ≫ e.inv\n[PROOFSTEP]\nrw [Category.id_comp, Category.assoc, e.hom_inv_id, Category.comp_id]\n[GOAL]\ncase left\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.88038, u_1} D\nP : MorphismProperty C\nX Y Z : C\ne : X ≅ Y\nf : Y ⟶ Z\nhf : universally P f\nX' Z' : C\ni₁ : X' ⟶ X\ni₂ : Z' ⟶ Z\nf' : X' ⟶ Z'\nH : IsPullback f' i₁ i₂ (e.hom ≫ f)\nthis : IsPullback (𝟙 X') (i₁ ≫ e.hom) i₁ e.inv\n⊢ P f'\n[PROOFSTEP]\nexact hf _ _ _ (by simpa only [Iso.inv_hom_id_assoc, Category.id_comp] using this.paste_horiz H)\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.88038, u_1} D\nP : MorphismProperty C\nX Y Z : C\ne : X ≅ Y\nf : Y ⟶ Z\nhf : universally P f\nX' Z' : C\ni₁ : X' ⟶ X\ni₂ : Z' ⟶ Z\nf' : X' ⟶ Z'\nH : IsPullback f' i₁ i₂ (e.hom ≫ f)\nthis : IsPullback (𝟙 X') (i₁ ≫ e.hom) i₁ e.inv\n⊢ IsPullback f' ?m.90182 ?m.90183 f\n[PROOFSTEP]\nsimpa only [Iso.inv_hom_id_assoc, Category.id_comp] using this.paste_horiz H\n[GOAL]\ncase right\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.88038, u_1} D\nP : MorphismProperty C\n⊢ ∀ {X Y Z : C} (e : Y ≅ Z) (f : X ⟶ Y), universally P f → universally P (f ≫ e.hom)\n[PROOFSTEP]\nintro X Y Z e f hf X' Z' i₁ i₂ f' H\n[GOAL]\ncase right\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.88038, u_1} D\nP : MorphismProperty C\nX Y Z : C\ne : Y ≅ Z\nf : X ⟶ Y\nhf : universally P f\nX' Z' : C\ni₁ : X' ⟶ X\ni₂ : Z' ⟶ Z\nf' : X' ⟶ Z'\nH : IsPullback f' i₁ i₂ (f ≫ e.hom)\n⊢ P f'\n[PROOFSTEP]\nhave : IsPullback (𝟙 _) i₂ (i₂ ≫ e.inv) e.inv := IsPullback.of_horiz_isIso ⟨Category.id_comp _⟩\n[GOAL]\ncase right\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.88038, u_1} D\nP : MorphismProperty C\nX Y Z : C\ne : Y ≅ Z\nf : X ⟶ Y\nhf : universally P f\nX' Z' : C\ni₁ : X' ⟶ X\ni₂ : Z' ⟶ Z\nf' : X' ⟶ Z'\nH : IsPullback f' i₁ i₂ (f ≫ e.hom)\nthis : IsPullback (𝟙 Z') i₂ (i₂ ≫ e.inv) e.inv\n⊢ P f'\n[PROOFSTEP]\nexact\n hf _ _ _ (by simpa only [Category.assoc, Iso.hom_inv_id, Category.comp_id, Category.comp_id] using H.paste_horiz this)\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.88038, u_1} D\nP : MorphismProperty C\nX Y Z : C\ne : Y ≅ Z\nf : X ⟶ Y\nhf : universally P f\nX' Z' : C\ni₁ : X' ⟶ X\ni₂ : Z' ⟶ Z\nf' : X' ⟶ Z'\nH : IsPullback f' i₁ i₂ (f ≫ e.hom)\nthis : IsPullback (𝟙 Z') i₂ (i₂ ≫ e.inv) e.inv\n⊢ IsPullback f' ?m.91717 ?m.91718 f\n[PROOFSTEP]\nsimpa only [Category.assoc, Iso.hom_inv_id, Category.comp_id, Category.comp_id] using H.paste_horiz this\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.92183, u_1} D\ninst✝ : HasPullbacks C\nP : MorphismProperty C\nhP : StableUnderComposition P\n⊢ StableUnderComposition (MorphismProperty.universally P)\n[PROOFSTEP]\nintro X Y Z f g hf hg X' Z' i₁ i₂ f' H\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.92183, u_1} D\ninst✝ : HasPullbacks C\nP : MorphismProperty C\nhP : StableUnderComposition P\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nhf : MorphismProperty.universally P f\nhg : MorphismProperty.universally P g\nX' Z' : C\ni₁ : X' ⟶ X\ni₂ : Z' ⟶ Z\nf' : X' ⟶ Z'\nH : IsPullback f' i₁ i₂ (f ≫ g)\n⊢ P f'\n[PROOFSTEP]\nhave := pullback.lift_fst _ _ (H.w.trans (Category.assoc _ _ _).symm)\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.92183, u_1} D\ninst✝ : HasPullbacks C\nP : MorphismProperty C\nhP : StableUnderComposition P\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nhf : MorphismProperty.universally P f\nhg : MorphismProperty.universally P g\nX' Z' : C\ni₁ : X' ⟶ X\ni₂ : Z' ⟶ Z\nf' : X' ⟶ Z'\nH : IsPullback f' i₁ i₂ (f ≫ g)\nthis : pullback.lift f' (i₁ ≫ f) (_ : f' ≫ i₂ = (i₁ ≫ f) ≫ g) ≫ pullback.fst = f'\n⊢ P f'\n[PROOFSTEP]\nrw [← this] at H ⊢\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.92183, u_1} D\ninst✝ : HasPullbacks C\nP : MorphismProperty C\nhP : StableUnderComposition P\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nhf : MorphismProperty.universally P f\nhg : MorphismProperty.universally P g\nX' Z' : C\ni₁ : X' ⟶ X\ni₂ : Z' ⟶ Z\nf' : X' ⟶ Z'\nH✝ : IsPullback f' i₁ i₂ (f ≫ g)\nH : IsPullback (pullback.lift f' (i₁ ≫ f) (_ : f' ≫ i₂ = (i₁ ≫ f) ≫ g) ≫ pullback.fst) i₁ i₂ (f ≫ g)\nthis : pullback.lift f' (i₁ ≫ f) (_ : f' ≫ i₂ = (i₁ ≫ f) ≫ g) ≫ pullback.fst = f'\n⊢ P (pullback.lift f' (i₁ ≫ f) (_ : f' ≫ i₂ = (i₁ ≫ f) ≫ g) ≫ pullback.fst)\n[PROOFSTEP]\napply hP _ _ _ (hg _ _ _ <| IsPullback.of_hasPullback _ _)\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.92183, u_1} D\ninst✝ : HasPullbacks C\nP : MorphismProperty C\nhP : StableUnderComposition P\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nhf : MorphismProperty.universally P f\nhg : MorphismProperty.universally P g\nX' Z' : C\ni₁ : X' ⟶ X\ni₂ : Z' ⟶ Z\nf' : X' ⟶ Z'\nH✝ : IsPullback f' i₁ i₂ (f ≫ g)\nH : IsPullback (pullback.lift f' (i₁ ≫ f) (_ : f' ≫ i₂ = (i₁ ≫ f) ≫ g) ≫ pullback.fst) i₁ i₂ (f ≫ g)\nthis : pullback.lift f' (i₁ ≫ f) (_ : f' ≫ i₂ = (i₁ ≫ f) ≫ g) ≫ pullback.fst = f'\n⊢ P (pullback.lift f' (i₁ ≫ f) (_ : f' ≫ i₂ = (i₁ ≫ f) ≫ g))\n[PROOFSTEP]\nexact hf _ _ _ (H.of_right (pullback.lift_snd _ _ _) (IsPullback.of_hasPullback i₂ g))\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.93105, u_1} D\nP : MorphismProperty C\n⊢ universally P ≤ P\n[PROOFSTEP]\nintro X Y f hf\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.93105, u_1} D\nP : MorphismProperty C\nX Y : C\nf : X ⟶ Y\nhf : universally P f\n⊢ P f\n[PROOFSTEP]\nexact hf (𝟙 _) (𝟙 _) _ (IsPullback.of_vert_isIso ⟨by rw [Category.comp_id, Category.id_comp]⟩)\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.93105, u_1} D\nP : MorphismProperty C\nX Y : C\nf : X ⟶ Y\nhf : universally P f\n⊢ f ≫ 𝟙 Y = 𝟙 X ≫ f\n[PROOFSTEP]\nrw [Category.comp_id, Category.id_comp]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.95780, u_1} D\ninst✝ : ConcreteCategory C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nhf : MorphismProperty.injective C f\nhg : MorphismProperty.injective C g\n⊢ MorphismProperty.injective C (f ≫ g)\n[PROOFSTEP]\ndelta MorphismProperty.injective\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.95780, u_1} D\ninst✝ : ConcreteCategory C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nhf : MorphismProperty.injective C f\nhg : MorphismProperty.injective C g\n⊢ Injective ↑(f ≫ g)\n[PROOFSTEP]\nrw [coe_comp]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.95780, u_1} D\ninst✝ : ConcreteCategory C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nhf : MorphismProperty.injective C f\nhg : MorphismProperty.injective C g\n⊢ Injective (↑g ∘ ↑f)\n[PROOFSTEP]\nexact hg.comp hf\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.96246, u_1} D\ninst✝ : ConcreteCategory C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nhf : MorphismProperty.surjective C f\nhg : MorphismProperty.surjective C g\n⊢ MorphismProperty.surjective C (f ≫ g)\n[PROOFSTEP]\ndelta MorphismProperty.surjective\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.96246, u_1} D\ninst✝ : ConcreteCategory C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nhf : MorphismProperty.surjective C f\nhg : MorphismProperty.surjective C g\n⊢ Surjective ↑(f ≫ g)\n[PROOFSTEP]\nrw [coe_comp]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.96246, u_1} D\ninst✝ : ConcreteCategory C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nhf : MorphismProperty.surjective C f\nhg : MorphismProperty.surjective C g\n⊢ Surjective (↑g ∘ ↑f)\n[PROOFSTEP]\nexact hg.comp hf\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.96710, u_1} D\ninst✝ : ConcreteCategory C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nhf : MorphismProperty.bijective C f\nhg : MorphismProperty.bijective C g\n⊢ MorphismProperty.bijective C (f ≫ g)\n[PROOFSTEP]\ndelta MorphismProperty.bijective\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.96710, u_1} D\ninst✝ : ConcreteCategory C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nhf : MorphismProperty.bijective C f\nhg : MorphismProperty.bijective C g\n⊢ Bijective ↑(f ≫ g)\n[PROOFSTEP]\nrw [coe_comp]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{?u.96710, u_1} D\ninst✝ : ConcreteCategory C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nhf : MorphismProperty.bijective C f\nhg : MorphismProperty.bijective C g\n⊢ Bijective (↑g ∘ ↑f)\n[PROOFSTEP]\nexact hg.comp hf\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.MorphismProperty", "llama_tokens": 34957, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO", "lm_q1_score": 0.39981165504266236, "lm_q2_score": 0.02228618614801742, "lm_q1q2_score": 0.0089102769684277}} {"text": "[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX✝ Y Z : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nX : C\n⊢ PartialOrder (Subobject X)\n[PROOFSTEP]\ndsimp only [Subobject]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX✝ Y Z : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nX : C\n⊢ PartialOrder (ThinSkeleton (MonoOver X))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX✝ Y Z : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nX : C\np : Subobject X → Prop\nh : ∀ ⦃A : C⦄ (f : A ⟶ X) [inst : Mono f], p (mk f)\nP : Subobject X\n⊢ p P\n[PROOFSTEP]\napply Quotient.inductionOn'\n[GOAL]\ncase h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX✝ Y Z : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nX : C\np : Subobject X → Prop\nh : ∀ ⦃A : C⦄ (f : A ⟶ X) [inst : Mono f], p (mk f)\nP : Subobject X\n⊢ ∀ (a : MonoOver X), p (Quotient.mk'' a)\n[PROOFSTEP]\nintro a\n[GOAL]\ncase h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX✝ Y Z : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nX : C\np : Subobject X → Prop\nh : ∀ ⦃A : C⦄ (f : A ⟶ X) [inst : Mono f], p (mk f)\nP : Subobject X\na : MonoOver X\n⊢ p (Quotient.mk'' a)\n[PROOFSTEP]\nexact h a.arrow\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX✝ Y Z : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nX : C\np : Subobject X → Subobject X → Prop\nh : ∀ ⦃A B : C⦄ (f : A ⟶ X) (g : B ⟶ X) [inst : Mono f] [inst_1 : Mono g], p (mk f) (mk g)\nP Q : Subobject X\n⊢ p P Q\n[PROOFSTEP]\napply Quotient.inductionOn₂'\n[GOAL]\ncase h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX✝ Y Z : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nX : C\np : Subobject X → Subobject X → Prop\nh : ∀ ⦃A B : C⦄ (f : A ⟶ X) (g : B ⟶ X) [inst : Mono f] [inst_1 : Mono g], p (mk f) (mk g)\nP Q : Subobject X\n⊢ ∀ (a₁ a₂ : MonoOver X), p (Quotient.mk'' a₁) (Quotient.mk'' a₂)\n[PROOFSTEP]\nintro a b\n[GOAL]\ncase h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX✝ Y Z : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nX : C\np : Subobject X → Subobject X → Prop\nh : ∀ ⦃A B : C⦄ (f : A ⟶ X) (g : B ⟶ X) [inst : Mono f] [inst_1 : Mono g], p (mk f) (mk g)\nP Q : Subobject X\na b : MonoOver X\n⊢ p (Quotient.mk'' a) (Quotient.mk'' b)\n[PROOFSTEP]\nexact h a.arrow b.arrow\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX✝ Y✝ Z : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nA : C\nX Y : Subobject A\nh : X = Y\n⊢ eqToHom (_ : underlying.obj X = underlying.obj Y) ≫ arrow Y = arrow X\n[PROOFSTEP]\ninduction h\n[GOAL]\ncase refl\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX✝ Y✝ Z : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nA : C\nX Y : Subobject A\n⊢ eqToHom (_ : underlying.obj X = underlying.obj X) ≫ arrow X = arrow X\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nP : Subobject X\nQ : MonoOver X\n⊢ mk (arrow (Quotient.mk'' Q)) = Quotient.mk'' Q\n[PROOFSTEP]\nobtain ⟨e⟩ := @Quotient.mk_out' _ (isIsomorphicSetoid _) Q\n[GOAL]\ncase intro\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nP : Subobject X\nQ : MonoOver X\ne : Quotient.out' (Quotient.mk'' Q) ≅ Q\n⊢ mk (arrow (Quotient.mk'' Q)) = Quotient.mk'' Q\n[PROOFSTEP]\nexact Quotient.sound' ⟨MonoOver.isoMk (Iso.refl _) ≪≫ e⟩\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX✝ Y✝ Z : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nB : C\nX Y : Subobject B\nf : underlying.obj X ⟶ underlying.obj Y\nw : f ≫ arrow Y = arrow X\n⊢ X ≤ Y\n[PROOFSTEP]\nconvert mk_le_mk_of_comm _ w\n[GOAL]\ncase h.e'_3\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX✝ Y✝ Z : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nB : C\nX Y : Subobject B\nf : underlying.obj X ⟶ underlying.obj Y\nw : f ≫ arrow Y = arrow X\n⊢ X = mk (arrow X)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e'_4\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX✝ Y✝ Z : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nB : C\nX Y : Subobject B\nf : underlying.obj X ⟶ underlying.obj Y\nw : f ≫ arrow Y = arrow X\n⊢ Y = mk (arrow Y)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nX✝ Y Z : C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nB A : C\nX : Subobject B\nf : A ⟶ B\ninst✝ : Mono f\ng : underlying.obj X ⟶ A\nw : g ≫ f = arrow X\n⊢ (g ≫ (underlyingIso f).inv) ≫ arrow (mk f) = arrow X\n[PROOFSTEP]\nsimp [w]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nX✝ Y Z : C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nB A : C\nX : Subobject B\nf : A ⟶ B\ninst✝ : Mono f\ng : A ⟶ underlying.obj X\nw : g ≫ arrow X = f\n⊢ ((underlyingIso f).hom ≫ g) ≫ arrow X = arrow (mk f)\n[PROOFSTEP]\nsimp [w]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nX✝ Y Z : C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nB A : C\nX : Subobject B\nf : A ⟶ B\ninst✝ : Mono f\ni : underlying.obj X ≅ A\nw : i.hom ≫ f = arrow X\n⊢ (i ≪≫ (underlyingIso f).symm).hom ≫ arrow (mk f) = arrow X\n[PROOFSTEP]\nsimp [w]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nX✝ Y Z : C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nB A : C\nX : Subobject B\nf : A ⟶ B\ninst✝ : Mono f\ni : A ≅ underlying.obj X\nw : i.hom ≫ arrow X = f\n⊢ i.symm.hom ≫ f = arrow X\n[PROOFSTEP]\nrw [Iso.symm_hom, Iso.inv_comp_eq, w]\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nB A₁ A₂ : C\nf : A₁ ⟶ B\ng : A₂ ⟶ B\ninst✝¹ : Mono f\ninst✝ : Mono g\ni : A₁ ≅ A₂\nw : i.hom ≫ g = f\n⊢ (underlyingIso f ≪≫ i).hom ≫ g = arrow (mk f)\n[PROOFSTEP]\nsimp [w]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX✝ Y✝ Z : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nB : C\nX Y : Subobject B\nh : X ≤ Y\n⊢ Mono (ofLE X Y h)\n[PROOFSTEP]\nfconstructor\n[GOAL]\ncase right_cancellation\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX✝ Y✝ Z : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nB : C\nX Y : Subobject B\nh : X ≤ Y\n⊢ ∀ {Z : C} (g h_1 : Z ⟶ underlying.obj X), g ≫ ofLE X Y h = h_1 ≫ ofLE X Y h → g = h_1\n[PROOFSTEP]\nintro Z f g w\n[GOAL]\ncase right_cancellation\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX✝ Y✝ Z✝ : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nB : C\nX Y : Subobject B\nh : X ≤ Y\nZ : C\nf g : Z ⟶ underlying.obj X\nw : f ≫ ofLE X Y h = g ≫ ofLE X Y h\n⊢ f = g\n[PROOFSTEP]\nreplace w := w =≫ Y.arrow\n[GOAL]\ncase right_cancellation\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX✝ Y✝ Z✝ : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nB : C\nX Y : Subobject B\nh : X ≤ Y\nZ : C\nf g : Z ⟶ underlying.obj X\nw : (f ≫ ofLE X Y h) ≫ arrow Y = (g ≫ ofLE X Y h) ≫ arrow Y\n⊢ f = g\n[PROOFSTEP]\next\n[GOAL]\ncase right_cancellation.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX✝ Y✝ Z✝ : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nB : C\nX Y : Subobject B\nh : X ≤ Y\nZ : C\nf g : Z ⟶ underlying.obj X\nw : (f ≫ ofLE X Y h) ≫ arrow Y = (g ≫ ofLE X Y h) ≫ arrow Y\n⊢ f ≫ arrow X = g ≫ arrow X\n[PROOFSTEP]\nsimpa using w\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nB A₁ A₂ : C\nf₁ : A₁ ⟶ B\nf₂ : A₂ ⟶ B\ninst✝¹ : Mono f₁\ninst✝ : Mono f₂\ng : A₁ ⟶ A₂\nw : g ≫ f₂ = f₁\n⊢ ofLE (mk f₁) (mk f₂) (_ : mk f₁ ≤ mk f₂) = (underlyingIso f₁).hom ≫ g ≫ (underlyingIso f₂).inv\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nB A₁ A₂ : C\nf₁ : A₁ ⟶ B\nf₂ : A₂ ⟶ B\ninst✝¹ : Mono f₁\ninst✝ : Mono f₂\ng : A₁ ⟶ A₂\nw : g ≫ f₂ = f₁\n⊢ ofLE (mk f₁) (mk f₂) (_ : mk f₁ ≤ mk f₂) ≫ arrow (mk f₂) =\n ((underlyingIso f₁).hom ≫ g ≫ (underlyingIso f₂).inv) ≫ arrow (mk f₂)\n[PROOFSTEP]\nsimp [w]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nX✝ Y Z : C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nB A : C\nX : Subobject B\nf : A ⟶ B\ninst✝ : Mono f\nh : X ≤ mk f\n⊢ Mono (ofLEMk X f h)\n[PROOFSTEP]\ndsimp only [ofLEMk]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nX✝ Y Z : C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nB A : C\nX : Subobject B\nf : A ⟶ B\ninst✝ : Mono f\nh : X ≤ mk f\n⊢ Mono (ofLE X (mk f) h ≫ (underlyingIso f).hom)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nX✝ Y Z : C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nB A : C\nX : Subobject B\nf : A ⟶ B\ninst✝ : Mono f\nh : X ≤ mk f\n⊢ ofLEMk X f h ≫ f = arrow X\n[PROOFSTEP]\nsimp [ofLEMk]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nX✝ Y Z : C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nB A : C\nf : A ⟶ B\ninst✝ : Mono f\nX : Subobject B\nh : mk f ≤ X\n⊢ Mono (ofMkLE f X h)\n[PROOFSTEP]\ndsimp only [ofMkLE]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nX✝ Y Z : C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nB A : C\nf : A ⟶ B\ninst✝ : Mono f\nX : Subobject B\nh : mk f ≤ X\n⊢ Mono ((underlyingIso f).inv ≫ ofLE (mk f) X h)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nX✝ Y Z : C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nB A : C\nf : A ⟶ B\ninst✝ : Mono f\nX : Subobject B\nh : mk f ≤ X\n⊢ ofMkLE f X h ≫ arrow X = f\n[PROOFSTEP]\nsimp [ofMkLE]\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nB A₁ A₂ : C\nf : A₁ ⟶ B\ng : A₂ ⟶ B\ninst✝¹ : Mono f\ninst✝ : Mono g\nh : mk f ≤ mk g\n⊢ Mono (ofMkLEMk f g h)\n[PROOFSTEP]\ndsimp only [ofMkLEMk]\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nB A₁ A₂ : C\nf : A₁ ⟶ B\ng : A₂ ⟶ B\ninst✝¹ : Mono f\ninst✝ : Mono g\nh : mk f ≤ mk g\n⊢ Mono ((underlyingIso f).inv ≫ ofLE (mk f) (mk g) h ≫ (underlyingIso g).hom)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nB A₁ A₂ : C\nf : A₁ ⟶ B\ng : A₂ ⟶ B\ninst✝¹ : Mono f\ninst✝ : Mono g\nh : mk f ≤ mk g\n⊢ ofMkLEMk f g h ≫ g = f\n[PROOFSTEP]\nsimp [ofMkLEMk]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX✝ Y✝ Z✝ : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nB : C\nX Y Z : Subobject B\nh₁ : X ≤ Y\nh₂ : Y ≤ Z\n⊢ ofLE X Y h₁ ≫ ofLE Y Z h₂ = ofLE X Z (_ : X ≤ Z)\n[PROOFSTEP]\nsimp only [ofLE, ← Functor.map_comp underlying]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX✝ Y✝ Z✝ : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nB : C\nX Y Z : Subobject B\nh₁ : X ≤ Y\nh₂ : Y ≤ Z\n⊢ underlying.map (LE.le.hom h₁ ≫ LE.le.hom h₂) = underlying.map (LE.le.hom (_ : X ≤ Z))\n[PROOFSTEP]\ncongr 1\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nX✝ Y✝ Z : C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nB A : C\nX Y : Subobject B\nf : A ⟶ B\ninst✝ : Mono f\nh₁ : X ≤ Y\nh₂ : Y ≤ mk f\n⊢ ofLE X Y h₁ ≫ ofLEMk Y f h₂ = ofLEMk X f (_ : X ≤ mk f)\n[PROOFSTEP]\nsimp only [ofMkLE, ofLEMk, ofLE, ← Functor.map_comp_assoc underlying]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nX✝ Y✝ Z : C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nB A : C\nX Y : Subobject B\nf : A ⟶ B\ninst✝ : Mono f\nh₁ : X ≤ Y\nh₂ : Y ≤ mk f\n⊢ underlying.map (LE.le.hom h₁ ≫ LE.le.hom h₂) ≫ (underlyingIso f).hom =\n underlying.map (LE.le.hom (_ : X ≤ mk f)) ≫ (underlyingIso f).hom\n[PROOFSTEP]\ncongr 1\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nX✝ Y✝ Z : C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nB A : C\nX : Subobject B\nf : A ⟶ B\ninst✝ : Mono f\nY : Subobject B\nh₁ : X ≤ mk f\nh₂ : mk f ≤ Y\n⊢ ofLEMk X f h₁ ≫ ofMkLE f Y h₂ = ofLE X Y (_ : X ≤ Y)\n[PROOFSTEP]\nsimp only [ofMkLE, ofLEMk, ofLE, ← Functor.map_comp underlying, assoc, Iso.hom_inv_id_assoc]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nX✝ Y✝ Z : C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nB A : C\nX : Subobject B\nf : A ⟶ B\ninst✝ : Mono f\nY : Subobject B\nh₁ : X ≤ mk f\nh₂ : mk f ≤ Y\n⊢ underlying.map (LE.le.hom h₁ ≫ LE.le.hom h₂) = underlying.map (LE.le.hom (_ : X ≤ Y))\n[PROOFSTEP]\ncongr 1\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nX✝ Y Z : C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nB A₁ A₂ : C\nX : Subobject B\nf : A₁ ⟶ B\ninst✝¹ : Mono f\ng : A₂ ⟶ B\ninst✝ : Mono g\nh₁ : X ≤ mk f\nh₂ : mk f ≤ mk g\n⊢ ofLEMk X f h₁ ≫ ofMkLEMk f g h₂ = ofLEMk X g (_ : X ≤ mk g)\n[PROOFSTEP]\nsimp only [ofMkLE, ofLEMk, ofLE, ofMkLEMk, ← Functor.map_comp_assoc underlying, assoc, Iso.hom_inv_id_assoc]\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nX✝ Y Z : C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nB A₁ A₂ : C\nX : Subobject B\nf : A₁ ⟶ B\ninst✝¹ : Mono f\ng : A₂ ⟶ B\ninst✝ : Mono g\nh₁ : X ≤ mk f\nh₂ : mk f ≤ mk g\n⊢ underlying.map (LE.le.hom h₁ ≫ LE.le.hom h₂) ≫ (underlyingIso g).hom =\n underlying.map (LE.le.hom (_ : X ≤ mk g)) ≫ (underlyingIso g).hom\n[PROOFSTEP]\ncongr 1\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nX✝ Y✝ Z : C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nB A₁ : C\nf : A₁ ⟶ B\ninst✝ : Mono f\nX Y : Subobject B\nh₁ : mk f ≤ X\nh₂ : X ≤ Y\n⊢ ofMkLE f X h₁ ≫ ofLE X Y h₂ = ofMkLE f Y (_ : mk f ≤ Y)\n[PROOFSTEP]\nsimp only [ofMkLE, ofLEMk, ofLE, ofMkLEMk, ← Functor.map_comp underlying, assoc]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nX✝ Y✝ Z : C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nB A₁ : C\nf : A₁ ⟶ B\ninst✝ : Mono f\nX Y : Subobject B\nh₁ : mk f ≤ X\nh₂ : X ≤ Y\n⊢ (underlyingIso f).inv ≫ underlying.map (LE.le.hom h₁ ≫ LE.le.hom h₂) =\n (underlyingIso f).inv ≫ underlying.map (LE.le.hom (_ : mk f ≤ Y))\n[PROOFSTEP]\ncongr 1\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nX✝ Y Z : C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nB A₁ A₂ : C\nf : A₁ ⟶ B\ninst✝¹ : Mono f\nX : Subobject B\ng : A₂ ⟶ B\ninst✝ : Mono g\nh₁ : mk f ≤ X\nh₂ : X ≤ mk g\n⊢ ofMkLE f X h₁ ≫ ofLEMk X g h₂ = ofMkLEMk f g (_ : mk f ≤ mk g)\n[PROOFSTEP]\nsimp only [ofMkLE, ofLEMk, ofLE, ofMkLEMk, ← Functor.map_comp_assoc underlying, assoc]\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nX✝ Y Z : C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nB A₁ A₂ : C\nf : A₁ ⟶ B\ninst✝¹ : Mono f\nX : Subobject B\ng : A₂ ⟶ B\ninst✝ : Mono g\nh₁ : mk f ≤ X\nh₂ : X ≤ mk g\n⊢ (underlyingIso f).inv ≫ underlying.map (LE.le.hom h₁ ≫ LE.le.hom h₂) ≫ (underlyingIso g).hom =\n (underlyingIso f).inv ≫ underlying.map (LE.le.hom (_ : mk f ≤ mk g)) ≫ (underlyingIso g).hom\n[PROOFSTEP]\ncongr 1\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nX✝ Y Z : C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nB A₁ A₂ : C\nf : A₁ ⟶ B\ninst✝¹ : Mono f\ng : A₂ ⟶ B\ninst✝ : Mono g\nX : Subobject B\nh₁ : mk f ≤ mk g\nh₂ : mk g ≤ X\n⊢ ofMkLEMk f g h₁ ≫ ofMkLE g X h₂ = ofMkLE f X (_ : mk f ≤ X)\n[PROOFSTEP]\nsimp only [ofMkLE, ofLEMk, ofLE, ofMkLEMk, ← Functor.map_comp underlying, assoc, Iso.hom_inv_id_assoc]\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nX✝ Y Z : C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nB A₁ A₂ : C\nf : A₁ ⟶ B\ninst✝¹ : Mono f\ng : A₂ ⟶ B\ninst✝ : Mono g\nX : Subobject B\nh₁ : mk f ≤ mk g\nh₂ : mk g ≤ X\n⊢ (underlyingIso f).inv ≫ underlying.map (LE.le.hom h₁ ≫ LE.le.hom h₂) =\n (underlyingIso f).inv ≫ underlying.map (LE.le.hom (_ : mk f ≤ X))\n[PROOFSTEP]\ncongr 1\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nB A₁ A₂ A₃ : C\nf : A₁ ⟶ B\ninst✝² : Mono f\ng : A₂ ⟶ B\ninst✝¹ : Mono g\nh : A₃ ⟶ B\ninst✝ : Mono h\nh₁ : mk f ≤ mk g\nh₂ : mk g ≤ mk h\n⊢ ofMkLEMk f g h₁ ≫ ofMkLEMk g h h₂ = ofMkLEMk f h (_ : mk f ≤ mk h)\n[PROOFSTEP]\nsimp only [ofMkLE, ofLEMk, ofLE, ofMkLEMk, ← Functor.map_comp_assoc underlying, assoc, Iso.hom_inv_id_assoc]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nB A₁ A₂ A₃ : C\nf : A₁ ⟶ B\ninst✝² : Mono f\ng : A₂ ⟶ B\ninst✝¹ : Mono g\nh : A₃ ⟶ B\ninst✝ : Mono h\nh₁ : mk f ≤ mk g\nh₂ : mk g ≤ mk h\n⊢ (underlyingIso f).inv ≫ underlying.map (LE.le.hom h₁ ≫ LE.le.hom h₂) ≫ (underlyingIso h).hom =\n (underlyingIso f).inv ≫ underlying.map (LE.le.hom (_ : mk f ≤ mk h)) ≫ (underlyingIso h).hom\n[PROOFSTEP]\ncongr 1\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX✝ Y Z : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nB : C\nX : Subobject B\n⊢ ofLE X X (_ : X ≤ X) = 𝟙 (underlying.obj X)\n[PROOFSTEP]\napply (cancel_mono X.arrow).mp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX✝ Y Z : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nB : C\nX : Subobject B\n⊢ ofLE X X (_ : X ≤ X) ≫ arrow X = 𝟙 (underlying.obj X) ≫ arrow X\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nB A₁ : C\nf : A₁ ⟶ B\ninst✝ : Mono f\n⊢ ofMkLEMk f f (_ : mk f ≤ mk f) = 𝟙 A₁\n[PROOFSTEP]\napply (cancel_mono f).mp\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nB A₁ : C\nf : A₁ ⟶ B\ninst✝ : Mono f\n⊢ ofMkLEMk f f (_ : mk f ≤ mk f) ≫ f = 𝟙 A₁ ≫ f\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nA : C\nB : D\ne : MonoOver A ≌ MonoOver B\n⊢ 𝟭 (Subobject A) ≅ lower e.functor ⋙ lower e.inverse\n[PROOFSTEP]\napply eqToIso\n[GOAL]\ncase p\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nA : C\nB : D\ne : MonoOver A ≌ MonoOver B\n⊢ 𝟭 (Subobject A) = lower e.functor ⋙ lower e.inverse\n[PROOFSTEP]\nconvert ThinSkeleton.map_iso_eq e.unitIso\n[GOAL]\ncase h.e'_2\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nA : C\nB : D\ne : MonoOver A ≌ MonoOver B\n⊢ 𝟭 (Subobject A) = ThinSkeleton.map (𝟭 (MonoOver A))\n[PROOFSTEP]\nexact ThinSkeleton.map_id_eq.symm\n[GOAL]\ncase h.e'_3\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nA : C\nB : D\ne : MonoOver A ≌ MonoOver B\n⊢ lower e.functor ⋙ lower e.inverse = ThinSkeleton.map (e.functor ⋙ e.inverse)\n[PROOFSTEP]\nexact (ThinSkeleton.map_comp_eq _ _).symm\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nA : C\nB : D\ne : MonoOver A ≌ MonoOver B\n⊢ lower e.inverse ⋙ lower e.functor ≅ 𝟭 (Subobject B)\n[PROOFSTEP]\napply eqToIso\n[GOAL]\ncase p\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nA : C\nB : D\ne : MonoOver A ≌ MonoOver B\n⊢ lower e.inverse ⋙ lower e.functor = 𝟭 (Subobject B)\n[PROOFSTEP]\nconvert ThinSkeleton.map_iso_eq e.counitIso\n[GOAL]\ncase h.e'_2\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nA : C\nB : D\ne : MonoOver A ≌ MonoOver B\n⊢ lower e.inverse ⋙ lower e.functor = ThinSkeleton.map (e.inverse ⋙ e.functor)\n[PROOFSTEP]\nexact (ThinSkeleton.map_comp_eq _ _).symm\n[GOAL]\ncase h.e'_3\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nA : C\nB : D\ne : MonoOver A ≌ MonoOver B\n⊢ 𝟭 (Subobject B) = ThinSkeleton.map (𝟭 (MonoOver B))\n[PROOFSTEP]\nexact ThinSkeleton.map_id_eq.symm\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : HasPullbacks C\nx : Subobject X\n⊢ (pullback (𝟙 X)).obj x = x\n[PROOFSTEP]\ninduction' x using Quotient.inductionOn' with f\n[GOAL]\ncase h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : HasPullbacks C\nf : MonoOver X\n⊢ (pullback (𝟙 X)).obj (Quotient.mk'' f) = Quotient.mk'' f\n[PROOFSTEP]\nexact Quotient.sound ⟨MonoOver.pullbackId.app f⟩\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : HasPullbacks C\nf : X ⟶ Y\ng : Y ⟶ Z\nx : Subobject Z\n⊢ (pullback (f ≫ g)).obj x = (pullback f).obj ((pullback g).obj x)\n[PROOFSTEP]\ninduction' x using Quotient.inductionOn' with t\n[GOAL]\ncase h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : HasPullbacks C\nf : X ⟶ Y\ng : Y ⟶ Z\nt : MonoOver Z\n⊢ (pullback (f ≫ g)).obj (Quotient.mk'' t) = (pullback f).obj ((pullback g).obj (Quotient.mk'' t))\n[PROOFSTEP]\nexact Quotient.sound ⟨(MonoOver.pullbackComp _ _).app t⟩\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nx : Subobject X\n⊢ (map (𝟙 X)).obj x = x\n[PROOFSTEP]\ninduction' x using Quotient.inductionOn' with f\n[GOAL]\ncase h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nf : MonoOver X\n⊢ (map (𝟙 X)).obj (Quotient.mk'' f) = Quotient.mk'' f\n[PROOFSTEP]\nexact Quotient.sound ⟨MonoOver.mapId.app f⟩\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝¹ : Mono f\ninst✝ : Mono g\nx : Subobject X\n⊢ (map (f ≫ g)).obj x = (map g).obj ((map f).obj x)\n[PROOFSTEP]\ninduction' x using Quotient.inductionOn' with t\n[GOAL]\ncase h\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝¹ : Mono f\ninst✝ : Mono g\nt : MonoOver X\n⊢ (map (f ≫ g)).obj (Quotient.mk'' t) = (map g).obj ((map f).obj (Quotient.mk'' t))\n[PROOFSTEP]\nexact Quotient.sound ⟨(MonoOver.mapComp _ _).app t⟩\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : X ≅ Y\ng : Subobject X\n⊢ (map e.inv).obj ((map e.hom).obj g) = g\n[PROOFSTEP]\nsimp_rw [← map_comp, e.hom_inv_id, map_id]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : X ≅ Y\ng : Subobject Y\n⊢ (map e.hom).obj ((map e.inv).obj g) = g\n[PROOFSTEP]\nsimp_rw [← map_comp, e.inv_hom_id, map_id]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : X ≅ Y\nA B : Subobject X\n⊢ ↑{ toFun := (map e.hom).toPrefunctor.obj, invFun := (map e.inv).toPrefunctor.obj,\n left_inv := (_ : ∀ (g : Subobject X), (map e.inv).obj ((map e.hom).obj g) = g),\n right_inv := (_ : ∀ (g : Subobject Y), (map e.hom).obj ((map e.inv).obj g) = g) }\n A ≤\n ↑{ toFun := (map e.hom).toPrefunctor.obj, invFun := (map e.inv).toPrefunctor.obj,\n left_inv := (_ : ∀ (g : Subobject X), (map e.inv).obj ((map e.hom).obj g) = g),\n right_inv := (_ : ∀ (g : Subobject Y), (map e.hom).obj ((map e.inv).obj g) = g) }\n B ↔\n A ≤ B\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : X ≅ Y\nA B : Subobject X\n⊢ (map e.hom).obj A ≤ (map e.hom).obj B ↔ A ≤ B\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : X ≅ Y\nA B : Subobject X\n⊢ (map e.hom).obj A ≤ (map e.hom).obj B → A ≤ B\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : X ≅ Y\nA B : Subobject X\nh : (map e.hom).obj A ≤ (map e.hom).obj B\n⊢ A ≤ B\n[PROOFSTEP]\napply_fun (map e.inv).obj at h \n[GOAL]\ncase mp\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : X ≅ Y\nA B : Subobject X\nh : (map e.inv).obj ((map e.hom).obj A) ≤ (map e.inv).obj ((map e.hom).obj B)\n⊢ A ≤ B\n[PROOFSTEP]\nsimpa only [← map_comp, e.hom_inv_id, map_id] using h\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : X ≅ Y\nA B : Subobject X\nh : (map e.hom).obj A ≤ (map e.hom).obj B\n⊢ Monotone (map e.inv).toPrefunctor.obj\n[PROOFSTEP]\napply Functor.monotone\n[GOAL]\ncase mpr\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : X ≅ Y\nA B : Subobject X\n⊢ A ≤ B → (map e.hom).obj A ≤ (map e.hom).obj B\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : X ≅ Y\nA B : Subobject X\nh : A ≤ B\n⊢ (map e.hom).obj A ≤ (map e.hom).obj B\n[PROOFSTEP]\napply_fun (map e.hom).obj at h \n[GOAL]\ncase mpr\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : X ≅ Y\nA B : Subobject X\nh : (map e.hom).obj A ≤ (map e.hom).obj B\n⊢ (map e.hom).obj A ≤ (map e.hom).obj B\n[PROOFSTEP]\nexact h\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : X ≅ Y\nA B : Subobject X\nh : A ≤ B\n⊢ Monotone (map e.hom).toPrefunctor.obj\n[PROOFSTEP]\napply Functor.monotone\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : HasPullbacks C\nf : X ⟶ Y\ninst✝ : Mono f\ng : Subobject X\n⊢ (pullback f).obj ((map f).obj g) = g\n[PROOFSTEP]\nrevert g\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nX Y Z : C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : HasPullbacks C\nf : X ⟶ Y\ninst✝ : Mono f\n⊢ ∀ (g : Subobject X), (pullback f).obj ((map f).obj g) = g\n[PROOFSTEP]\nexact Quotient.ind (fun g' => Quotient.sound ⟨(MonoOver.pullbackMapSelf f).app _⟩)\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nX✝ Y✝ Z✝ : C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : HasPullbacks C\nX Y Z W : C\nf : X ⟶ Y\ng : X ⟶ Z\nh : Y ⟶ W\nk : Z ⟶ W\ninst✝¹ : Mono h\ninst✝ : Mono g\ncomm : f ≫ h = g ≫ k\nt : IsLimit (PullbackCone.mk f g comm)\np : Subobject Y\n⊢ (map g).obj ((pullback f).obj p) = (pullback k).obj ((map h).obj p)\n[PROOFSTEP]\nrevert p\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nX✝ Y✝ Z✝ : C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : HasPullbacks C\nX Y Z W : C\nf : X ⟶ Y\ng : X ⟶ Z\nh : Y ⟶ W\nk : Z ⟶ W\ninst✝¹ : Mono h\ninst✝ : Mono g\ncomm : f ≫ h = g ≫ k\nt : IsLimit (PullbackCone.mk f g comm)\n⊢ ∀ (p : Subobject Y), (map g).obj ((pullback f).obj p) = (pullback k).obj ((map h).obj p)\n[PROOFSTEP]\napply Quotient.ind'\n[GOAL]\ncase h\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nX✝ Y✝ Z✝ : C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : HasPullbacks C\nX Y Z W : C\nf : X ⟶ Y\ng : X ⟶ Z\nh : Y ⟶ W\nk : Z ⟶ W\ninst✝¹ : Mono h\ninst✝ : Mono g\ncomm : f ≫ h = g ≫ k\nt : IsLimit (PullbackCone.mk f g comm)\n⊢ ∀ (a : MonoOver Y),\n (map g).obj ((pullback f).obj (Quotient.mk'' a)) = (pullback k).obj ((map h).obj (Quotient.mk'' a))\n[PROOFSTEP]\nintro a\n[GOAL]\ncase h\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nX✝ Y✝ Z✝ : C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : HasPullbacks C\nX Y Z W : C\nf : X ⟶ Y\ng : X ⟶ Z\nh : Y ⟶ W\nk : Z ⟶ W\ninst✝¹ : Mono h\ninst✝ : Mono g\ncomm : f ≫ h = g ≫ k\nt : IsLimit (PullbackCone.mk f g comm)\na : MonoOver Y\n⊢ (map g).obj ((pullback f).obj (Quotient.mk'' a)) = (pullback k).obj ((map h).obj (Quotient.mk'' a))\n[PROOFSTEP]\napply Quotient.sound\n[GOAL]\ncase h.a\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nX✝ Y✝ Z✝ : C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : HasPullbacks C\nX Y Z W : C\nf : X ⟶ Y\ng : X ⟶ Z\nh : Y ⟶ W\nk : Z ⟶ W\ninst✝¹ : Mono h\ninst✝ : Mono g\ncomm : f ≫ h = g ≫ k\nt : IsLimit (PullbackCone.mk f g comm)\na : MonoOver Y\n⊢ (MonoOver.map g).obj ((MonoOver.pullback f).obj a) ≈ (MonoOver.pullback k).obj ((MonoOver.map h).obj a)\n[PROOFSTEP]\napply ThinSkeleton.equiv_of_both_ways\n[GOAL]\ncase h.a.f\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nX✝ Y✝ Z✝ : C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : HasPullbacks C\nX Y Z W : C\nf : X ⟶ Y\ng : X ⟶ Z\nh : Y ⟶ W\nk : Z ⟶ W\ninst✝¹ : Mono h\ninst✝ : Mono g\ncomm : f ≫ h = g ≫ k\nt : IsLimit (PullbackCone.mk f g comm)\na : MonoOver Y\n⊢ (MonoOver.map g).obj ((MonoOver.pullback f).obj a) ⟶ (MonoOver.pullback k).obj ((MonoOver.map h).obj a)\n[PROOFSTEP]\nrefine' MonoOver.homMk (pullback.lift pullback.fst _ _) (pullback.lift_snd _ _ _)\n[GOAL]\ncase h.a.f\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nX✝ Y✝ Z✝ : C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : HasPullbacks C\nX Y Z W : C\nf : X ⟶ Y\ng : X ⟶ Z\nh : Y ⟶ W\nk : Z ⟶ W\ninst✝¹ : Mono h\ninst✝ : Mono g\ncomm : f ≫ h = g ≫ k\nt : IsLimit (PullbackCone.mk f g comm)\na : MonoOver Y\n⊢ pullback.fst ≫ ((MonoOver.forget W).obj ((MonoOver.map h).obj a)).hom =\n MonoOver.arrow ((MonoOver.map g).obj ((MonoOver.pullback f).obj a)) ≫ k\n[PROOFSTEP]\nchange _ ≫ a.arrow ≫ h = (pullback.snd ≫ g) ≫ _\n[GOAL]\ncase h.a.f\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nX✝ Y✝ Z✝ : C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : HasPullbacks C\nX Y Z W : C\nf : X ⟶ Y\ng : X ⟶ Z\nh : Y ⟶ W\nk : Z ⟶ W\ninst✝¹ : Mono h\ninst✝ : Mono g\ncomm : f ≫ h = g ≫ k\nt : IsLimit (PullbackCone.mk f g comm)\na : MonoOver Y\n⊢ pullback.fst ≫ MonoOver.arrow a ≫ h = (pullback.snd ≫ g) ≫ k\n[PROOFSTEP]\nrw [assoc, ← comm, pullback.condition_assoc]\n[GOAL]\ncase h.a.g\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nX✝ Y✝ Z✝ : C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : HasPullbacks C\nX Y Z W : C\nf : X ⟶ Y\ng : X ⟶ Z\nh : Y ⟶ W\nk : Z ⟶ W\ninst✝¹ : Mono h\ninst✝ : Mono g\ncomm : f ≫ h = g ≫ k\nt : IsLimit (PullbackCone.mk f g comm)\na : MonoOver Y\n⊢ (MonoOver.pullback k).obj ((MonoOver.map h).obj a) ⟶ (MonoOver.map g).obj ((MonoOver.pullback f).obj a)\n[PROOFSTEP]\nrefine'\n MonoOver.homMk\n (pullback.lift pullback.fst (PullbackCone.IsLimit.lift t (pullback.fst ≫ a.arrow) pullback.snd _)\n (PullbackCone.IsLimit.lift_fst _ _ _ _).symm)\n _\n[GOAL]\ncase h.a.g.refine'_1\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nX✝ Y✝ Z✝ : C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : HasPullbacks C\nX Y Z W : C\nf : X ⟶ Y\ng : X ⟶ Z\nh : Y ⟶ W\nk : Z ⟶ W\ninst✝¹ : Mono h\ninst✝ : Mono g\ncomm : f ≫ h = g ≫ k\nt : IsLimit (PullbackCone.mk f g comm)\na : MonoOver Y\n⊢ (pullback.fst ≫ ((MonoOver.forget Y).obj a).hom) ≫ h = pullback.snd ≫ k\n[PROOFSTEP]\nrw [← pullback.condition, assoc]\n[GOAL]\ncase h.a.g.refine'_1\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nX✝ Y✝ Z✝ : C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : HasPullbacks C\nX Y Z W : C\nf : X ⟶ Y\ng : X ⟶ Z\nh : Y ⟶ W\nk : Z ⟶ W\ninst✝¹ : Mono h\ninst✝ : Mono g\ncomm : f ≫ h = g ≫ k\nt : IsLimit (PullbackCone.mk f g comm)\na : MonoOver Y\n⊢ pullback.fst ≫ ((MonoOver.forget Y).obj a).hom ≫ h =\n pullback.fst ≫ ((MonoOver.forget W).obj ((MonoOver.map h).obj a)).hom\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.a.g.refine'_2\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nX✝ Y✝ Z✝ : C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : HasPullbacks C\nX Y Z W : C\nf : X ⟶ Y\ng : X ⟶ Z\nh : Y ⟶ W\nk : Z ⟶ W\ninst✝¹ : Mono h\ninst✝ : Mono g\ncomm : f ≫ h = g ≫ k\nt : IsLimit (PullbackCone.mk f g comm)\na : MonoOver Y\n⊢ pullback.lift pullback.fst\n (PullbackCone.IsLimit.lift t (pullback.fst ≫ MonoOver.arrow a) pullback.snd\n (_ : (pullback.fst ≫ ((MonoOver.forget Y).obj a).hom) ≫ h = pullback.snd ≫ k))\n (_ :\n pullback.fst ≫ ((MonoOver.forget Y).obj a).hom =\n PullbackCone.IsLimit.lift t (pullback.fst ≫ ((MonoOver.forget Y).obj a).hom) pullback.snd\n (_ : (pullback.fst ≫ ((MonoOver.forget Y).obj a).hom) ≫ h = pullback.snd ≫ k) ≫\n PullbackCone.fst (PullbackCone.mk f g comm)) ≫\n MonoOver.arrow ((MonoOver.map g).obj ((MonoOver.pullback f).obj a)) =\n MonoOver.arrow ((MonoOver.pullback k).obj ((MonoOver.map h).obj a))\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h.a.g.refine'_2\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nX✝ Y✝ Z✝ : C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : HasPullbacks C\nX Y Z W : C\nf : X ⟶ Y\ng : X ⟶ Z\nh : Y ⟶ W\nk : Z ⟶ W\ninst✝¹ : Mono h\ninst✝ : Mono g\ncomm : f ≫ h = g ≫ k\nt : IsLimit (PullbackCone.mk f g comm)\na : MonoOver Y\n⊢ pullback.lift pullback.fst\n (PullbackCone.IsLimit.lift t (pullback.fst ≫ MonoOver.arrow a) pullback.snd\n (_ : (pullback.fst ≫ MonoOver.arrow a) ≫ h = pullback.snd ≫ k))\n (_ :\n pullback.fst ≫ MonoOver.arrow a =\n PullbackCone.IsLimit.lift t (pullback.fst ≫ MonoOver.arrow a) pullback.snd\n (_ : (pullback.fst ≫ MonoOver.arrow a) ≫ h = pullback.snd ≫ k) ≫\n f) ≫\n pullback.snd ≫ g =\n pullback.snd\n[PROOFSTEP]\nrw [pullback.lift_snd_assoc]\n[GOAL]\ncase h.a.g.refine'_2\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nX✝ Y✝ Z✝ : C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : HasPullbacks C\nX Y Z W : C\nf : X ⟶ Y\ng : X ⟶ Z\nh : Y ⟶ W\nk : Z ⟶ W\ninst✝¹ : Mono h\ninst✝ : Mono g\ncomm : f ≫ h = g ≫ k\nt : IsLimit (PullbackCone.mk f g comm)\na : MonoOver Y\n⊢ PullbackCone.IsLimit.lift t (pullback.fst ≫ MonoOver.arrow a) pullback.snd\n (_ : (pullback.fst ≫ MonoOver.arrow a) ≫ h = pullback.snd ≫ k) ≫\n g =\n pullback.snd\n[PROOFSTEP]\napply PullbackCone.IsLimit.lift_snd\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Subobject.Basic", "llama_tokens": 16630, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO", "lm_q1_score": 0.40733340004593016, "lm_q2_score": 0.02002344242249784, "lm_q1q2_score": 0.008156216882579961}} {"text": "[GOAL]\nF : Type u → Type v\ninst✝¹ : Applicative F\ninst✝ : LawfulApplicative F\nα β γ σ : Type u\nf : α → β → γ\ng : σ → β\nx : F α\ny : F σ\n⊢ (Seq.seq (f <$> x) fun x => g <$> y) = Seq.seq ((flip (fun x x_1 => x ∘ x_1) g ∘ f) <$> x) fun x => y\n[PROOFSTEP]\nsimp [flip, functor_norm]\n[GOAL]\nF : Type u → Type v\ninst✝¹ : Applicative F\ninst✝ : LawfulApplicative F\nα β γ σ : Type u\nf : α → β\n⊢ (fun x x_1 => Seq.seq x fun x => x_1) (pure f) = (fun x x_1 => x <$> x_1) f\n[PROOFSTEP]\next\n[GOAL]\ncase h\nF : Type u → Type v\ninst✝¹ : Applicative F\ninst✝ : LawfulApplicative F\nα β γ σ : Type u\nf : α → β\nx✝ : F α\n⊢ (fun x x_1 => Seq.seq x fun x => x_1) (pure f) x✝ = (fun x x_1 => x <$> x_1) f x✝\n[PROOFSTEP]\nsimp [functor_norm]\n[GOAL]\nF✝ : Type u → Type v\ninst✝¹ : Applicative F✝\ninst✝ : LawfulApplicative F✝\nα β γ σ : Type u\nF : Type u → Type u_1\nF1 : Functor F\np1 : {α : Type u} → α → F α\ns1 : {α β : Type u} → F (α → β) → (Unit → F α) → F β\nsl1 : {α β : Type u} → F α → (Unit → F β) → F α\nsr1 : {α β : Type u} → F α → (Unit → F β) → F β\nF2 : Functor F\np2 : {α : Type u} → α → F α\ns2 : {α β : Type u} → F (α → β) → (Unit → F α) → F β\nsl2 : {α β : Type u} → F α → (Unit → F β) → F α\nsr2 : {α β : Type u} → F α → (Unit → F β) → F β\nL1 : LawfulApplicative F\nL2 : LawfulApplicative F\nH1 : ∀ {α : Type u} (x : α), pure x = pure x\nH2 : ∀ {α β : Type u} (f : F (α → β)) (x : F α), (Seq.seq f fun x_1 => x) = Seq.seq f fun x_1 => x\n⊢ mk = mk\n[PROOFSTEP]\nobtain rfl : @p1 = @p2 := by\n funext α x\n apply H1\n[GOAL]\nF✝ : Type u → Type v\ninst✝¹ : Applicative F✝\ninst✝ : LawfulApplicative F✝\nα β γ σ : Type u\nF : Type u → Type u_1\nF1 : Functor F\np1 : {α : Type u} → α → F α\ns1 : {α β : Type u} → F (α → β) → (Unit → F α) → F β\nsl1 : {α β : Type u} → F α → (Unit → F β) → F α\nsr1 : {α β : Type u} → F α → (Unit → F β) → F β\nF2 : Functor F\np2 : {α : Type u} → α → F α\ns2 : {α β : Type u} → F (α → β) → (Unit → F α) → F β\nsl2 : {α β : Type u} → F α → (Unit → F β) → F α\nsr2 : {α β : Type u} → F α → (Unit → F β) → F β\nL1 : LawfulApplicative F\nL2 : LawfulApplicative F\nH1 : ∀ {α : Type u} (x : α), pure x = pure x\nH2 : ∀ {α β : Type u} (f : F (α → β)) (x : F α), (Seq.seq f fun x_1 => x) = Seq.seq f fun x_1 => x\n⊢ p1 = p2\n[PROOFSTEP]\nfunext α x\n[GOAL]\ncase h.h\nF✝ : Type u → Type v\ninst✝¹ : Applicative F✝\ninst✝ : LawfulApplicative F✝\nα✝ β γ σ : Type u\nF : Type u → Type u_1\nF1 : Functor F\np1 : {α : Type u} → α → F α\ns1 : {α β : Type u} → F (α → β) → (Unit → F α) → F β\nsl1 : {α β : Type u} → F α → (Unit → F β) → F α\nsr1 : {α β : Type u} → F α → (Unit → F β) → F β\nF2 : Functor F\np2 : {α : Type u} → α → F α\ns2 : {α β : Type u} → F (α → β) → (Unit → F α) → F β\nsl2 : {α β : Type u} → F α → (Unit → F β) → F α\nsr2 : {α β : Type u} → F α → (Unit → F β) → F β\nL1 : LawfulApplicative F\nL2 : LawfulApplicative F\nH1 : ∀ {α : Type u} (x : α), pure x = pure x\nH2 : ∀ {α β : Type u} (f : F (α → β)) (x : F α), (Seq.seq f fun x_1 => x) = Seq.seq f fun x_1 => x\nα : Type u\nx : α\n⊢ p1 x = p2 x\n[PROOFSTEP]\napply H1\n[GOAL]\nF✝ : Type u → Type v\ninst✝¹ : Applicative F✝\ninst✝ : LawfulApplicative F✝\nα β γ σ : Type u\nF : Type u → Type u_1\nF1 : Functor F\np1 : {α : Type u} → α → F α\ns1 : {α β : Type u} → F (α → β) → (Unit → F α) → F β\nsl1 : {α β : Type u} → F α → (Unit → F β) → F α\nsr1 : {α β : Type u} → F α → (Unit → F β) → F β\nF2 : Functor F\ns2 : {α β : Type u} → F (α → β) → (Unit → F α) → F β\nsl2 : {α β : Type u} → F α → (Unit → F β) → F α\nsr2 : {α β : Type u} → F α → (Unit → F β) → F β\nL1 : LawfulApplicative F\nL2 : LawfulApplicative F\nH1 : ∀ {α : Type u} (x : α), pure x = pure x\nH2 : ∀ {α β : Type u} (f : F (α → β)) (x : F α), (Seq.seq f fun x_1 => x) = Seq.seq f fun x_1 => x\n⊢ mk = mk\n[PROOFSTEP]\nobtain rfl : @s1 = @s2 := by\n funext α β f x\n exact H2 f (x Unit.unit)\n[GOAL]\nF✝ : Type u → Type v\ninst✝¹ : Applicative F✝\ninst✝ : LawfulApplicative F✝\nα β γ σ : Type u\nF : Type u → Type u_1\nF1 : Functor F\np1 : {α : Type u} → α → F α\ns1 : {α β : Type u} → F (α → β) → (Unit → F α) → F β\nsl1 : {α β : Type u} → F α → (Unit → F β) → F α\nsr1 : {α β : Type u} → F α → (Unit → F β) → F β\nF2 : Functor F\ns2 : {α β : Type u} → F (α → β) → (Unit → F α) → F β\nsl2 : {α β : Type u} → F α → (Unit → F β) → F α\nsr2 : {α β : Type u} → F α → (Unit → F β) → F β\nL1 : LawfulApplicative F\nL2 : LawfulApplicative F\nH1 : ∀ {α : Type u} (x : α), pure x = pure x\nH2 : ∀ {α β : Type u} (f : F (α → β)) (x : F α), (Seq.seq f fun x_1 => x) = Seq.seq f fun x_1 => x\n⊢ s1 = s2\n[PROOFSTEP]\nfunext α β f x\n[GOAL]\ncase h.h.h.h\nF✝ : Type u → Type v\ninst✝¹ : Applicative F✝\ninst✝ : LawfulApplicative F✝\nα✝ β✝ γ σ : Type u\nF : Type u → Type u_1\nF1 : Functor F\np1 : {α : Type u} → α → F α\ns1 : {α β : Type u} → F (α → β) → (Unit → F α) → F β\nsl1 : {α β : Type u} → F α → (Unit → F β) → F α\nsr1 : {α β : Type u} → F α → (Unit → F β) → F β\nF2 : Functor F\ns2 : {α β : Type u} → F (α → β) → (Unit → F α) → F β\nsl2 : {α β : Type u} → F α → (Unit → F β) → F α\nsr2 : {α β : Type u} → F α → (Unit → F β) → F β\nL1 : LawfulApplicative F\nL2 : LawfulApplicative F\nH1 : ∀ {α : Type u} (x : α), pure x = pure x\nH2 : ∀ {α β : Type u} (f : F (α → β)) (x : F α), (Seq.seq f fun x_1 => x) = Seq.seq f fun x_1 => x\nα β : Type u\nf : F (α → β)\nx : Unit → F α\n⊢ s1 f x = s2 f x\n[PROOFSTEP]\nexact H2 f (x Unit.unit)\n[GOAL]\nF✝ : Type u → Type v\ninst✝¹ : Applicative F✝\ninst✝ : LawfulApplicative F✝\nα β γ σ : Type u\nF : Type u → Type u_1\nF1 : Functor F\np1 : {α : Type u} → α → F α\ns1 : {α β : Type u} → F (α → β) → (Unit → F α) → F β\nsl1 : {α β : Type u} → F α → (Unit → F β) → F α\nsr1 : {α β : Type u} → F α → (Unit → F β) → F β\nF2 : Functor F\nsl2 : {α β : Type u} → F α → (Unit → F β) → F α\nsr2 : {α β : Type u} → F α → (Unit → F β) → F β\nL1 : LawfulApplicative F\nL2 : LawfulApplicative F\nH1 : ∀ {α : Type u} (x : α), pure x = pure x\nH2 : ∀ {α β : Type u} (f : F (α → β)) (x : F α), (Seq.seq f fun x_1 => x) = Seq.seq f fun x_1 => x\n⊢ mk = mk\n[PROOFSTEP]\nobtain ⟨seqLeft_eq1, seqRight_eq1, pure_seq1, -⟩ := L1\n[GOAL]\ncase mk\nF✝ : Type u → Type v\ninst✝¹ : Applicative F✝\ninst✝ : LawfulApplicative F✝\nα β γ σ : Type u\nF : Type u → Type u_1\nF1 : Functor F\np1 : {α : Type u} → α → F α\ns1 : {α β : Type u} → F (α → β) → (Unit → F α) → F β\nsl1 : {α β : Type u} → F α → (Unit → F β) → F α\nsr1 : {α β : Type u} → F α → (Unit → F β) → F β\nF2 : Functor F\nsl2 : {α β : Type u} → F α → (Unit → F β) → F α\nsr2 : {α β : Type u} → F α → (Unit → F β) → F β\nL2 : LawfulApplicative F\nH1 : ∀ {α : Type u} (x : α), pure x = pure x\nH2 : ∀ {α β : Type u} (f : F (α → β)) (x : F α), (Seq.seq f fun x_1 => x) = Seq.seq f fun x_1 => x\ntoLawfulFunctor✝ : LawfulFunctor F\nseqLeft_eq1 : ∀ {α β : Type u} (x : F α) (y : F β), (SeqLeft.seqLeft x fun x => y) = Seq.seq (const β <$> x) fun x => y\nseqRight_eq1 :\n ∀ {α β : Type u} (x : F α) (y : F β), (SeqRight.seqRight x fun x => y) = Seq.seq (const α id <$> x) fun x => y\npure_seq1 : ∀ {α β : Type u} (g : α → β) (x : F α), (Seq.seq (pure g) fun x_1 => x) = g <$> x\nseq_pure✝ : ∀ {α β : Type u} (g : F (α → β)) (x : α), (Seq.seq g fun x_1 => pure x) = (fun h => h x) <$> g\nseq_assoc✝ :\n ∀ {α β γ : Type u} (x : F α) (g : F (α → β)) (h : F (β → γ)),\n (Seq.seq h fun x_1 => Seq.seq g fun x_2 => x) = Seq.seq (Seq.seq (comp <$> h) fun x => g) fun x_1 => x\n⊢ mk = mk\n[PROOFSTEP]\nobtain ⟨seqLeft_eq2, seqRight_eq2, pure_seq2, -⟩ := L2\n[GOAL]\ncase mk.mk\nF✝ : Type u → Type v\ninst✝¹ : Applicative F✝\ninst✝ : LawfulApplicative F✝\nα β γ σ : Type u\nF : Type u → Type u_1\nF1 : Functor F\np1 : {α : Type u} → α → F α\ns1 : {α β : Type u} → F (α → β) → (Unit → F α) → F β\nsl1 : {α β : Type u} → F α → (Unit → F β) → F α\nsr1 : {α β : Type u} → F α → (Unit → F β) → F β\nF2 : Functor F\nsl2 : {α β : Type u} → F α → (Unit → F β) → F α\nsr2 : {α β : Type u} → F α → (Unit → F β) → F β\nH1 : ∀ {α : Type u} (x : α), pure x = pure x\nH2 : ∀ {α β : Type u} (f : F (α → β)) (x : F α), (Seq.seq f fun x_1 => x) = Seq.seq f fun x_1 => x\ntoLawfulFunctor✝¹ : LawfulFunctor F\nseqLeft_eq1 : ∀ {α β : Type u} (x : F α) (y : F β), (SeqLeft.seqLeft x fun x => y) = Seq.seq (const β <$> x) fun x => y\nseqRight_eq1 :\n ∀ {α β : Type u} (x : F α) (y : F β), (SeqRight.seqRight x fun x => y) = Seq.seq (const α id <$> x) fun x => y\npure_seq1 : ∀ {α β : Type u} (g : α → β) (x : F α), (Seq.seq (pure g) fun x_1 => x) = g <$> x\nseq_pure✝¹ : ∀ {α β : Type u} (g : F (α → β)) (x : α), (Seq.seq g fun x_1 => pure x) = (fun h => h x) <$> g\nseq_assoc✝¹ :\n ∀ {α β γ : Type u} (x : F α) (g : F (α → β)) (h : F (β → γ)),\n (Seq.seq h fun x_1 => Seq.seq g fun x_2 => x) = Seq.seq (Seq.seq (comp <$> h) fun x => g) fun x_1 => x\ntoLawfulFunctor✝ : LawfulFunctor F\nseqLeft_eq2 : ∀ {α β : Type u} (x : F α) (y : F β), (SeqLeft.seqLeft x fun x => y) = Seq.seq (const β <$> x) fun x => y\nseqRight_eq2 :\n ∀ {α β : Type u} (x : F α) (y : F β), (SeqRight.seqRight x fun x => y) = Seq.seq (const α id <$> x) fun x => y\npure_seq2 : ∀ {α β : Type u} (g : α → β) (x : F α), (Seq.seq (pure g) fun x_1 => x) = g <$> x\nseq_pure✝ : ∀ {α β : Type u} (g : F (α → β)) (x : α), (Seq.seq g fun x_1 => pure x) = (fun h => h x) <$> g\nseq_assoc✝ :\n ∀ {α β γ : Type u} (x : F α) (g : F (α → β)) (h : F (β → γ)),\n (Seq.seq h fun x_1 => Seq.seq g fun x_2 => x) = Seq.seq (Seq.seq (comp <$> h) fun x => g) fun x_1 => x\n⊢ mk = mk\n[PROOFSTEP]\nobtain rfl : F1 = F2 := by\n apply Functor.ext\n intros\n exact (pure_seq1 _ _).symm.trans (pure_seq2 _ _)\n[GOAL]\nF✝ : Type u → Type v\ninst✝¹ : Applicative F✝\ninst✝ : LawfulApplicative F✝\nα β γ σ : Type u\nF : Type u → Type u_1\nF1 : Functor F\np1 : {α : Type u} → α → F α\ns1 : {α β : Type u} → F (α → β) → (Unit → F α) → F β\nsl1 : {α β : Type u} → F α → (Unit → F β) → F α\nsr1 : {α β : Type u} → F α → (Unit → F β) → F β\nF2 : Functor F\nsl2 : {α β : Type u} → F α → (Unit → F β) → F α\nsr2 : {α β : Type u} → F α → (Unit → F β) → F β\nH1 : ∀ {α : Type u} (x : α), pure x = pure x\nH2 : ∀ {α β : Type u} (f : F (α → β)) (x : F α), (Seq.seq f fun x_1 => x) = Seq.seq f fun x_1 => x\ntoLawfulFunctor✝¹ : LawfulFunctor F\nseqLeft_eq1 : ∀ {α β : Type u} (x : F α) (y : F β), (SeqLeft.seqLeft x fun x => y) = Seq.seq (const β <$> x) fun x => y\nseqRight_eq1 :\n ∀ {α β : Type u} (x : F α) (y : F β), (SeqRight.seqRight x fun x => y) = Seq.seq (const α id <$> x) fun x => y\npure_seq1 : ∀ {α β : Type u} (g : α → β) (x : F α), (Seq.seq (pure g) fun x_1 => x) = g <$> x\nseq_pure✝¹ : ∀ {α β : Type u} (g : F (α → β)) (x : α), (Seq.seq g fun x_1 => pure x) = (fun h => h x) <$> g\nseq_assoc✝¹ :\n ∀ {α β γ : Type u} (x : F α) (g : F (α → β)) (h : F (β → γ)),\n (Seq.seq h fun x_1 => Seq.seq g fun x_2 => x) = Seq.seq (Seq.seq (comp <$> h) fun x => g) fun x_1 => x\ntoLawfulFunctor✝ : LawfulFunctor F\nseqLeft_eq2 : ∀ {α β : Type u} (x : F α) (y : F β), (SeqLeft.seqLeft x fun x => y) = Seq.seq (const β <$> x) fun x => y\nseqRight_eq2 :\n ∀ {α β : Type u} (x : F α) (y : F β), (SeqRight.seqRight x fun x => y) = Seq.seq (const α id <$> x) fun x => y\npure_seq2 : ∀ {α β : Type u} (g : α → β) (x : F α), (Seq.seq (pure g) fun x_1 => x) = g <$> x\nseq_pure✝ : ∀ {α β : Type u} (g : F (α → β)) (x : α), (Seq.seq g fun x_1 => pure x) = (fun h => h x) <$> g\nseq_assoc✝ :\n ∀ {α β γ : Type u} (x : F α) (g : F (α → β)) (h : F (β → γ)),\n (Seq.seq h fun x_1 => Seq.seq g fun x_2 => x) = Seq.seq (Seq.seq (comp <$> h) fun x => g) fun x_1 => x\n⊢ F1 = F2\n[PROOFSTEP]\napply Functor.ext\n[GOAL]\ncase a\nF✝ : Type u → Type v\ninst✝¹ : Applicative F✝\ninst✝ : LawfulApplicative F✝\nα β γ σ : Type u\nF : Type u → Type u_1\nF1 : Functor F\np1 : {α : Type u} → α → F α\ns1 : {α β : Type u} → F (α → β) → (Unit → F α) → F β\nsl1 : {α β : Type u} → F α → (Unit → F β) → F α\nsr1 : {α β : Type u} → F α → (Unit → F β) → F β\nF2 : Functor F\nsl2 : {α β : Type u} → F α → (Unit → F β) → F α\nsr2 : {α β : Type u} → F α → (Unit → F β) → F β\nH1 : ∀ {α : Type u} (x : α), pure x = pure x\nH2 : ∀ {α β : Type u} (f : F (α → β)) (x : F α), (Seq.seq f fun x_1 => x) = Seq.seq f fun x_1 => x\ntoLawfulFunctor✝¹ : LawfulFunctor F\nseqLeft_eq1 : ∀ {α β : Type u} (x : F α) (y : F β), (SeqLeft.seqLeft x fun x => y) = Seq.seq (const β <$> x) fun x => y\nseqRight_eq1 :\n ∀ {α β : Type u} (x : F α) (y : F β), (SeqRight.seqRight x fun x => y) = Seq.seq (const α id <$> x) fun x => y\npure_seq1 : ∀ {α β : Type u} (g : α → β) (x : F α), (Seq.seq (pure g) fun x_1 => x) = g <$> x\nseq_pure✝¹ : ∀ {α β : Type u} (g : F (α → β)) (x : α), (Seq.seq g fun x_1 => pure x) = (fun h => h x) <$> g\nseq_assoc✝¹ :\n ∀ {α β γ : Type u} (x : F α) (g : F (α → β)) (h : F (β → γ)),\n (Seq.seq h fun x_1 => Seq.seq g fun x_2 => x) = Seq.seq (Seq.seq (comp <$> h) fun x => g) fun x_1 => x\ntoLawfulFunctor✝ : LawfulFunctor F\nseqLeft_eq2 : ∀ {α β : Type u} (x : F α) (y : F β), (SeqLeft.seqLeft x fun x => y) = Seq.seq (const β <$> x) fun x => y\nseqRight_eq2 :\n ∀ {α β : Type u} (x : F α) (y : F β), (SeqRight.seqRight x fun x => y) = Seq.seq (const α id <$> x) fun x => y\npure_seq2 : ∀ {α β : Type u} (g : α → β) (x : F α), (Seq.seq (pure g) fun x_1 => x) = g <$> x\nseq_pure✝ : ∀ {α β : Type u} (g : F (α → β)) (x : α), (Seq.seq g fun x_1 => pure x) = (fun h => h x) <$> g\nseq_assoc✝ :\n ∀ {α β γ : Type u} (x : F α) (g : F (α → β)) (h : F (β → γ)),\n (Seq.seq h fun x_1 => Seq.seq g fun x_2 => x) = Seq.seq (Seq.seq (comp <$> h) fun x => g) fun x_1 => x\n⊢ ∀ (α β : Type u) (f : α → β) (x : F α), f <$> x = f <$> x\n[PROOFSTEP]\nintros\n[GOAL]\ncase a\nF✝ : Type u → Type v\ninst✝¹ : Applicative F✝\ninst✝ : LawfulApplicative F✝\nα β γ σ : Type u\nF : Type u → Type u_1\nF1 : Functor F\np1 : {α : Type u} → α → F α\ns1 : {α β : Type u} → F (α → β) → (Unit → F α) → F β\nsl1 : {α β : Type u} → F α → (Unit → F β) → F α\nsr1 : {α β : Type u} → F α → (Unit → F β) → F β\nF2 : Functor F\nsl2 : {α β : Type u} → F α → (Unit → F β) → F α\nsr2 : {α β : Type u} → F α → (Unit → F β) → F β\nH1 : ∀ {α : Type u} (x : α), pure x = pure x\nH2 : ∀ {α β : Type u} (f : F (α → β)) (x : F α), (Seq.seq f fun x_1 => x) = Seq.seq f fun x_1 => x\ntoLawfulFunctor✝¹ : LawfulFunctor F\nseqLeft_eq1 : ∀ {α β : Type u} (x : F α) (y : F β), (SeqLeft.seqLeft x fun x => y) = Seq.seq (const β <$> x) fun x => y\nseqRight_eq1 :\n ∀ {α β : Type u} (x : F α) (y : F β), (SeqRight.seqRight x fun x => y) = Seq.seq (const α id <$> x) fun x => y\npure_seq1 : ∀ {α β : Type u} (g : α → β) (x : F α), (Seq.seq (pure g) fun x_1 => x) = g <$> x\nseq_pure✝¹ : ∀ {α β : Type u} (g : F (α → β)) (x : α), (Seq.seq g fun x_1 => pure x) = (fun h => h x) <$> g\nseq_assoc✝¹ :\n ∀ {α β γ : Type u} (x : F α) (g : F (α → β)) (h : F (β → γ)),\n (Seq.seq h fun x_1 => Seq.seq g fun x_2 => x) = Seq.seq (Seq.seq (comp <$> h) fun x => g) fun x_1 => x\ntoLawfulFunctor✝ : LawfulFunctor F\nseqLeft_eq2 : ∀ {α β : Type u} (x : F α) (y : F β), (SeqLeft.seqLeft x fun x => y) = Seq.seq (const β <$> x) fun x => y\nseqRight_eq2 :\n ∀ {α β : Type u} (x : F α) (y : F β), (SeqRight.seqRight x fun x => y) = Seq.seq (const α id <$> x) fun x => y\npure_seq2 : ∀ {α β : Type u} (g : α → β) (x : F α), (Seq.seq (pure g) fun x_1 => x) = g <$> x\nseq_pure✝ : ∀ {α β : Type u} (g : F (α → β)) (x : α), (Seq.seq g fun x_1 => pure x) = (fun h => h x) <$> g\nseq_assoc✝ :\n ∀ {α β γ : Type u} (x : F α) (g : F (α → β)) (h : F (β → γ)),\n (Seq.seq h fun x_1 => Seq.seq g fun x_2 => x) = Seq.seq (Seq.seq (comp <$> h) fun x => g) fun x_1 => x\nα✝ β✝ : Type u\nf✝ : α✝ → β✝\nx✝ : F α✝\n⊢ f✝ <$> x✝ = f✝ <$> x✝\n[PROOFSTEP]\nexact (pure_seq1 _ _).symm.trans (pure_seq2 _ _)\n[GOAL]\ncase mk.mk\nF✝ : Type u → Type v\ninst✝¹ : Applicative F✝\ninst✝ : LawfulApplicative F✝\nα β γ σ : Type u\nF : Type u → Type u_1\nF1 : Functor F\np1 : {α : Type u} → α → F α\ns1 : {α β : Type u} → F (α → β) → (Unit → F α) → F β\nsl1 : {α β : Type u} → F α → (Unit → F β) → F α\nsr1 : {α β : Type u} → F α → (Unit → F β) → F β\nsl2 : {α β : Type u} → F α → (Unit → F β) → F α\nsr2 : {α β : Type u} → F α → (Unit → F β) → F β\ntoLawfulFunctor✝¹ : LawfulFunctor F\nseqLeft_eq1 : ∀ {α β : Type u} (x : F α) (y : F β), (SeqLeft.seqLeft x fun x => y) = Seq.seq (const β <$> x) fun x => y\nseqRight_eq1 :\n ∀ {α β : Type u} (x : F α) (y : F β), (SeqRight.seqRight x fun x => y) = Seq.seq (const α id <$> x) fun x => y\npure_seq1 : ∀ {α β : Type u} (g : α → β) (x : F α), (Seq.seq (pure g) fun x_1 => x) = g <$> x\nseq_pure✝¹ : ∀ {α β : Type u} (g : F (α → β)) (x : α), (Seq.seq g fun x_1 => pure x) = (fun h => h x) <$> g\nseq_assoc✝¹ :\n ∀ {α β γ : Type u} (x : F α) (g : F (α → β)) (h : F (β → γ)),\n (Seq.seq h fun x_1 => Seq.seq g fun x_2 => x) = Seq.seq (Seq.seq (comp <$> h) fun x => g) fun x_1 => x\nH1 : ∀ {α : Type u} (x : α), pure x = pure x\nH2 : ∀ {α β : Type u} (f : F (α → β)) (x : F α), (Seq.seq f fun x_1 => x) = Seq.seq f fun x_1 => x\ntoLawfulFunctor✝ : LawfulFunctor F\nseqLeft_eq2 : ∀ {α β : Type u} (x : F α) (y : F β), (SeqLeft.seqLeft x fun x => y) = Seq.seq (const β <$> x) fun x => y\nseqRight_eq2 :\n ∀ {α β : Type u} (x : F α) (y : F β), (SeqRight.seqRight x fun x => y) = Seq.seq (const α id <$> x) fun x => y\npure_seq2 : ∀ {α β : Type u} (g : α → β) (x : F α), (Seq.seq (pure g) fun x_1 => x) = g <$> x\nseq_pure✝ : ∀ {α β : Type u} (g : F (α → β)) (x : α), (Seq.seq g fun x_1 => pure x) = (fun h => h x) <$> g\nseq_assoc✝ :\n ∀ {α β γ : Type u} (x : F α) (g : F (α → β)) (h : F (β → γ)),\n (Seq.seq h fun x_1 => Seq.seq g fun x_2 => x) = Seq.seq (Seq.seq (comp <$> h) fun x => g) fun x_1 => x\n⊢ mk = mk\n[PROOFSTEP]\ncongr\n[GOAL]\ncase mk.mk.e_toSeqLeft.e_seqLeft\nF✝ : Type u → Type v\ninst✝¹ : Applicative F✝\ninst✝ : LawfulApplicative F✝\nα β γ σ : Type u\nF : Type u → Type u_1\nF1 : Functor F\np1 : {α : Type u} → α → F α\ns1 : {α β : Type u} → F (α → β) → (Unit → F α) → F β\nsl1 : {α β : Type u} → F α → (Unit → F β) → F α\nsr1 : {α β : Type u} → F α → (Unit → F β) → F β\nsl2 : {α β : Type u} → F α → (Unit → F β) → F α\nsr2 : {α β : Type u} → F α → (Unit → F β) → F β\ntoLawfulFunctor✝¹ : LawfulFunctor F\nseqLeft_eq1 : ∀ {α β : Type u} (x : F α) (y : F β), (SeqLeft.seqLeft x fun x => y) = Seq.seq (const β <$> x) fun x => y\nseqRight_eq1 :\n ∀ {α β : Type u} (x : F α) (y : F β), (SeqRight.seqRight x fun x => y) = Seq.seq (const α id <$> x) fun x => y\npure_seq1 : ∀ {α β : Type u} (g : α → β) (x : F α), (Seq.seq (pure g) fun x_1 => x) = g <$> x\nseq_pure✝¹ : ∀ {α β : Type u} (g : F (α → β)) (x : α), (Seq.seq g fun x_1 => pure x) = (fun h => h x) <$> g\nseq_assoc✝¹ :\n ∀ {α β γ : Type u} (x : F α) (g : F (α → β)) (h : F (β → γ)),\n (Seq.seq h fun x_1 => Seq.seq g fun x_2 => x) = Seq.seq (Seq.seq (comp <$> h) fun x => g) fun x_1 => x\nH1 : ∀ {α : Type u} (x : α), pure x = pure x\nH2 : ∀ {α β : Type u} (f : F (α → β)) (x : F α), (Seq.seq f fun x_1 => x) = Seq.seq f fun x_1 => x\ntoLawfulFunctor✝ : LawfulFunctor F\nseqLeft_eq2 : ∀ {α β : Type u} (x : F α) (y : F β), (SeqLeft.seqLeft x fun x => y) = Seq.seq (const β <$> x) fun x => y\nseqRight_eq2 :\n ∀ {α β : Type u} (x : F α) (y : F β), (SeqRight.seqRight x fun x => y) = Seq.seq (const α id <$> x) fun x => y\npure_seq2 : ∀ {α β : Type u} (g : α → β) (x : F α), (Seq.seq (pure g) fun x_1 => x) = g <$> x\nseq_pure✝ : ∀ {α β : Type u} (g : F (α → β)) (x : α), (Seq.seq g fun x_1 => pure x) = (fun h => h x) <$> g\nseq_assoc✝ :\n ∀ {α β γ : Type u} (x : F α) (g : F (α → β)) (h : F (β → γ)),\n (Seq.seq h fun x_1 => Seq.seq g fun x_2 => x) = Seq.seq (Seq.seq (comp <$> h) fun x => g) fun x_1 => x\n⊢ sl1 = sl2\n[PROOFSTEP]\nfunext α β x y\n[GOAL]\ncase mk.mk.e_toSeqRight.e_seqRight\nF✝ : Type u → Type v\ninst✝¹ : Applicative F✝\ninst✝ : LawfulApplicative F✝\nα β γ σ : Type u\nF : Type u → Type u_1\nF1 : Functor F\np1 : {α : Type u} → α → F α\ns1 : {α β : Type u} → F (α → β) → (Unit → F α) → F β\nsl1 : {α β : Type u} → F α → (Unit → F β) → F α\nsr1 : {α β : Type u} → F α → (Unit → F β) → F β\nsl2 : {α β : Type u} → F α → (Unit → F β) → F α\nsr2 : {α β : Type u} → F α → (Unit → F β) → F β\ntoLawfulFunctor✝¹ : LawfulFunctor F\nseqLeft_eq1 : ∀ {α β : Type u} (x : F α) (y : F β), (SeqLeft.seqLeft x fun x => y) = Seq.seq (const β <$> x) fun x => y\nseqRight_eq1 :\n ∀ {α β : Type u} (x : F α) (y : F β), (SeqRight.seqRight x fun x => y) = Seq.seq (const α id <$> x) fun x => y\npure_seq1 : ∀ {α β : Type u} (g : α → β) (x : F α), (Seq.seq (pure g) fun x_1 => x) = g <$> x\nseq_pure✝¹ : ∀ {α β : Type u} (g : F (α → β)) (x : α), (Seq.seq g fun x_1 => pure x) = (fun h => h x) <$> g\nseq_assoc✝¹ :\n ∀ {α β γ : Type u} (x : F α) (g : F (α → β)) (h : F (β → γ)),\n (Seq.seq h fun x_1 => Seq.seq g fun x_2 => x) = Seq.seq (Seq.seq (comp <$> h) fun x => g) fun x_1 => x\nH1 : ∀ {α : Type u} (x : α), pure x = pure x\nH2 : ∀ {α β : Type u} (f : F (α → β)) (x : F α), (Seq.seq f fun x_1 => x) = Seq.seq f fun x_1 => x\ntoLawfulFunctor✝ : LawfulFunctor F\nseqLeft_eq2 : ∀ {α β : Type u} (x : F α) (y : F β), (SeqLeft.seqLeft x fun x => y) = Seq.seq (const β <$> x) fun x => y\nseqRight_eq2 :\n ∀ {α β : Type u} (x : F α) (y : F β), (SeqRight.seqRight x fun x => y) = Seq.seq (const α id <$> x) fun x => y\npure_seq2 : ∀ {α β : Type u} (g : α → β) (x : F α), (Seq.seq (pure g) fun x_1 => x) = g <$> x\nseq_pure✝ : ∀ {α β : Type u} (g : F (α → β)) (x : α), (Seq.seq g fun x_1 => pure x) = (fun h => h x) <$> g\nseq_assoc✝ :\n ∀ {α β γ : Type u} (x : F α) (g : F (α → β)) (h : F (β → γ)),\n (Seq.seq h fun x_1 => Seq.seq g fun x_2 => x) = Seq.seq (Seq.seq (comp <$> h) fun x => g) fun x_1 => x\n⊢ sr1 = sr2\n[PROOFSTEP]\nfunext α β x y\n[GOAL]\ncase mk.mk.e_toSeqLeft.e_seqLeft.h.h.h.h\nF✝ : Type u → Type v\ninst✝¹ : Applicative F✝\ninst✝ : LawfulApplicative F✝\nα✝ β✝ γ σ : Type u\nF : Type u → Type u_1\nF1 : Functor F\np1 : {α : Type u} → α → F α\ns1 : {α β : Type u} → F (α → β) → (Unit → F α) → F β\nsl1 : {α β : Type u} → F α → (Unit → F β) → F α\nsr1 : {α β : Type u} → F α → (Unit → F β) → F β\nsl2 : {α β : Type u} → F α → (Unit → F β) → F α\nsr2 : {α β : Type u} → F α → (Unit → F β) → F β\ntoLawfulFunctor✝¹ : LawfulFunctor F\nseqLeft_eq1 : ∀ {α β : Type u} (x : F α) (y : F β), (SeqLeft.seqLeft x fun x => y) = Seq.seq (const β <$> x) fun x => y\nseqRight_eq1 :\n ∀ {α β : Type u} (x : F α) (y : F β), (SeqRight.seqRight x fun x => y) = Seq.seq (const α id <$> x) fun x => y\npure_seq1 : ∀ {α β : Type u} (g : α → β) (x : F α), (Seq.seq (pure g) fun x_1 => x) = g <$> x\nseq_pure✝¹ : ∀ {α β : Type u} (g : F (α → β)) (x : α), (Seq.seq g fun x_1 => pure x) = (fun h => h x) <$> g\nseq_assoc✝¹ :\n ∀ {α β γ : Type u} (x : F α) (g : F (α → β)) (h : F (β → γ)),\n (Seq.seq h fun x_1 => Seq.seq g fun x_2 => x) = Seq.seq (Seq.seq (comp <$> h) fun x => g) fun x_1 => x\nH1 : ∀ {α : Type u} (x : α), pure x = pure x\nH2 : ∀ {α β : Type u} (f : F (α → β)) (x : F α), (Seq.seq f fun x_1 => x) = Seq.seq f fun x_1 => x\ntoLawfulFunctor✝ : LawfulFunctor F\nseqLeft_eq2 : ∀ {α β : Type u} (x : F α) (y : F β), (SeqLeft.seqLeft x fun x => y) = Seq.seq (const β <$> x) fun x => y\nseqRight_eq2 :\n ∀ {α β : Type u} (x : F α) (y : F β), (SeqRight.seqRight x fun x => y) = Seq.seq (const α id <$> x) fun x => y\npure_seq2 : ∀ {α β : Type u} (g : α → β) (x : F α), (Seq.seq (pure g) fun x_1 => x) = g <$> x\nseq_pure✝ : ∀ {α β : Type u} (g : F (α → β)) (x : α), (Seq.seq g fun x_1 => pure x) = (fun h => h x) <$> g\nseq_assoc✝ :\n ∀ {α β γ : Type u} (x : F α) (g : F (α → β)) (h : F (β → γ)),\n (Seq.seq h fun x_1 => Seq.seq g fun x_2 => x) = Seq.seq (Seq.seq (comp <$> h) fun x => g) fun x_1 => x\nα β : Type u\nx : F α\ny : Unit → F β\n⊢ sl1 x y = sl2 x y\n[PROOFSTEP]\nexact (seqLeft_eq1 _ (y Unit.unit)).trans (seqLeft_eq2 _ _).symm\n[GOAL]\ncase mk.mk.e_toSeqRight.e_seqRight.h.h.h.h\nF✝ : Type u → Type v\ninst✝¹ : Applicative F✝\ninst✝ : LawfulApplicative F✝\nα✝ β✝ γ σ : Type u\nF : Type u → Type u_1\nF1 : Functor F\np1 : {α : Type u} → α → F α\ns1 : {α β : Type u} → F (α → β) → (Unit → F α) → F β\nsl1 : {α β : Type u} → F α → (Unit → F β) → F α\nsr1 : {α β : Type u} → F α → (Unit → F β) → F β\nsl2 : {α β : Type u} → F α → (Unit → F β) → F α\nsr2 : {α β : Type u} → F α → (Unit → F β) → F β\ntoLawfulFunctor✝¹ : LawfulFunctor F\nseqLeft_eq1 : ∀ {α β : Type u} (x : F α) (y : F β), (SeqLeft.seqLeft x fun x => y) = Seq.seq (const β <$> x) fun x => y\nseqRight_eq1 :\n ∀ {α β : Type u} (x : F α) (y : F β), (SeqRight.seqRight x fun x => y) = Seq.seq (const α id <$> x) fun x => y\npure_seq1 : ∀ {α β : Type u} (g : α → β) (x : F α), (Seq.seq (pure g) fun x_1 => x) = g <$> x\nseq_pure✝¹ : ∀ {α β : Type u} (g : F (α → β)) (x : α), (Seq.seq g fun x_1 => pure x) = (fun h => h x) <$> g\nseq_assoc✝¹ :\n ∀ {α β γ : Type u} (x : F α) (g : F (α → β)) (h : F (β → γ)),\n (Seq.seq h fun x_1 => Seq.seq g fun x_2 => x) = Seq.seq (Seq.seq (comp <$> h) fun x => g) fun x_1 => x\nH1 : ∀ {α : Type u} (x : α), pure x = pure x\nH2 : ∀ {α β : Type u} (f : F (α → β)) (x : F α), (Seq.seq f fun x_1 => x) = Seq.seq f fun x_1 => x\ntoLawfulFunctor✝ : LawfulFunctor F\nseqLeft_eq2 : ∀ {α β : Type u} (x : F α) (y : F β), (SeqLeft.seqLeft x fun x => y) = Seq.seq (const β <$> x) fun x => y\nseqRight_eq2 :\n ∀ {α β : Type u} (x : F α) (y : F β), (SeqRight.seqRight x fun x => y) = Seq.seq (const α id <$> x) fun x => y\npure_seq2 : ∀ {α β : Type u} (g : α → β) (x : F α), (Seq.seq (pure g) fun x_1 => x) = g <$> x\nseq_pure✝ : ∀ {α β : Type u} (g : F (α → β)) (x : α), (Seq.seq g fun x_1 => pure x) = (fun h => h x) <$> g\nseq_assoc✝ :\n ∀ {α β γ : Type u} (x : F α) (g : F (α → β)) (h : F (β → γ)),\n (Seq.seq h fun x_1 => Seq.seq g fun x_2 => x) = Seq.seq (Seq.seq (comp <$> h) fun x => g) fun x_1 => x\nα β : Type u\nx : F α\ny : Unit → F β\n⊢ sr1 x y = sr2 x y\n[PROOFSTEP]\nexact (seqRight_eq1 _ (y Unit.unit)).trans (seqRight_eq2 _ (y Unit.unit)).symm\n[GOAL]\n⊢ CommApplicative Id\n[PROOFSTEP]\nrefine' { .. }\n[GOAL]\ncase refine'_1\n⊢ ∀ {α β : Type ?u.6279}, Functor.mapConst = Functor.map ∘ Function.const β\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_2\n⊢ ∀ {α : Type ?u.6279} (x : Id α), id <$> x = x\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_3\n⊢ ∀ {α β γ : Type ?u.6279} (g : α → β) (h : β → γ) (x : Id α), (h ∘ g) <$> x = h <$> g <$> x\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_4\n⊢ ∀ {α β : Type ?u.6279} (x : Id α) (y : Id β),\n (SeqLeft.seqLeft x fun x => y) = Seq.seq (Function.const β <$> x) fun x => y\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_5\n⊢ ∀ {α β : Type ?u.6279} (x : Id α) (y : Id β),\n (SeqRight.seqRight x fun x => y) = Seq.seq (Function.const α id <$> x) fun x => y\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_6\n⊢ ∀ {α β : Type ?u.6279} (g : α → β) (x : Id α), (Seq.seq (pure g) fun x_1 => x) = g <$> x\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_7\n⊢ ∀ {α β : Type ?u.6279} (g : α → β) (x : α), g <$> pure x = pure (g x)\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_8\n⊢ ∀ {α β : Type ?u.6279} (g : Id (α → β)) (x : α), (Seq.seq g fun x_1 => pure x) = (fun h => h x) <$> g\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_9\n⊢ ∀ {α β γ : Type ?u.6279} (x : Id α) (g : Id (α → β)) (h : Id (β → γ)),\n (Seq.seq h fun x_1 => Seq.seq g fun x_2 => x) = Seq.seq (Seq.seq (Function.comp <$> h) fun x => g) fun x_1 => x\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_10\n⊢ ∀ {α β : Type ?u.6279} (a : Id α) (b : Id β),\n (Seq.seq (Prod.mk <$> a) fun x => b) = Seq.seq ((fun b a => (a, b)) <$> b) fun x => a\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_1\nα✝ β✝ : Type ?u.6279\n⊢ Functor.mapConst = Functor.map ∘ Function.const β✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_2\nα✝ : Type ?u.6279\nx✝ : Id α✝\n⊢ id <$> x✝ = x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_3\nα✝ β✝ γ✝ : Type ?u.6279\ng✝ : α✝ → β✝\nh✝ : β✝ → γ✝\nx✝ : Id α✝\n⊢ (h✝ ∘ g✝) <$> x✝ = h✝ <$> g✝ <$> x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_4\nα✝ β✝ : Type ?u.6279\nx✝ : Id α✝\ny✝ : Id β✝\n⊢ (SeqLeft.seqLeft x✝ fun x => y✝) = Seq.seq (Function.const β✝ <$> x✝) fun x => y✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_5\nα✝ β✝ : Type ?u.6279\nx✝ : Id α✝\ny✝ : Id β✝\n⊢ (SeqRight.seqRight x✝ fun x => y✝) = Seq.seq (Function.const α✝ id <$> x✝) fun x => y✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_6\nα✝ β✝ : Type ?u.6279\ng✝ : α✝ → β✝\nx✝ : Id α✝\n⊢ (Seq.seq (pure g✝) fun x => x✝) = g✝ <$> x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_7\nα✝ β✝ : Type ?u.6279\ng✝ : α✝ → β✝\nx✝ : α✝\n⊢ g✝ <$> pure x✝ = pure (g✝ x✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_8\nα✝ β✝ : Type ?u.6279\ng✝ : Id (α✝ → β✝)\nx✝ : α✝\n⊢ (Seq.seq g✝ fun x => pure x✝) = (fun h => h x✝) <$> g✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_9\nα✝ β✝ γ✝ : Type ?u.6279\nx✝ : Id α✝\ng✝ : Id (α✝ → β✝)\nh✝ : Id (β✝ → γ✝)\n⊢ (Seq.seq h✝ fun x => Seq.seq g✝ fun x => x✝) = Seq.seq (Seq.seq (Function.comp <$> h✝) fun x => g✝) fun x => x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_10\nα✝ β✝ : Type ?u.6279\na✝ : Id α✝\nb✝ : Id β✝\n⊢ (Seq.seq (Prod.mk <$> a✝) fun x => b✝) = Seq.seq ((fun b a => (a, b)) <$> b✝) fun x => a✝\n[PROOFSTEP]\nrfl\n[GOAL]\nF : Type u → Type w\nG : Type v → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nα β γ : Type v\nf : α → β\nx : α\n⊢ run (f <$> pure x) = run (pure (f x))\n[PROOFSTEP]\nsimp\n[GOAL]\nF : Type u → Type w\nG : Type v → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nα β γ : Type v\nf : Comp F G (α → β)\nx : α\n⊢ run (Seq.seq f fun x_1 => pure x) = run ((fun g => g x) <$> f)\n[PROOFSTEP]\nsimp [(· ∘ ·), functor_norm]\n[GOAL]\nF : Type u → Type w\nG : Type v → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nα β γ : Type v\nx : Comp F G α\nf : Comp F G (α → β)\ng : Comp F G (β → γ)\n⊢ run (Seq.seq g fun x_1 => Seq.seq f fun x_2 => x) =\n run (Seq.seq (Seq.seq (Function.comp <$> g) fun x => f) fun x_1 => x)\n[PROOFSTEP]\nsimp [(· ∘ ·), functor_norm]\n[GOAL]\nF : Type u → Type w\nG : Type v → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nα β γ : Type v\nf : α → β\nx : Comp F G α\n⊢ run (Seq.seq (pure f) fun x_1 => x) = run (f <$> x)\n[PROOFSTEP]\nsimp [Applicative.pure_seq_eq_map', functor_norm]\n[GOAL]\nF : Type u → Type w\nG : Type v → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nα β γ : Type v\n⊢ ∀ {α β : Type v} (x : Comp F G α) (y : Comp F G β),\n (SeqLeft.seqLeft x fun x => y) = Seq.seq (const β <$> x) fun x => y\n[PROOFSTEP]\nintros\n[GOAL]\nF : Type u → Type w\nG : Type v → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nα β γ α✝ β✝ : Type v\nx✝ : Comp F G α✝\ny✝ : Comp F G β✝\n⊢ (SeqLeft.seqLeft x✝ fun x => y✝) = Seq.seq (const β✝ <$> x✝) fun x => y✝\n[PROOFSTEP]\nrfl\n[GOAL]\nF : Type u → Type w\nG : Type v → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nα β γ : Type v\n⊢ ∀ {α β : Type v} (x : Comp F G α) (y : Comp F G β),\n (SeqRight.seqRight x fun x => y) = Seq.seq (const α id <$> x) fun x => y\n[PROOFSTEP]\nintros\n[GOAL]\nF : Type u → Type w\nG : Type v → Type u\ninst✝³ : Applicative F\ninst✝² : Applicative G\ninst✝¹ : LawfulApplicative F\ninst✝ : LawfulApplicative G\nα β γ α✝ β✝ : Type v\nx✝ : Comp F G α✝\ny✝ : Comp F G β✝\n⊢ (SeqRight.seqRight x✝ fun x => y✝) = Seq.seq (const α✝ id <$> x✝) fun x => y✝\n[PROOFSTEP]\nrfl\n[GOAL]\nF✝ : Type u → Type w\nG : Type v → Type u\ninst✝⁴ : Applicative F✝\ninst✝³ : Applicative G\ninst✝² : LawfulApplicative F✝\ninst✝¹ : LawfulApplicative G\nα β γ : Type v\nF : Type u_1 → Type u_2\nAF : Applicative F\ninst✝ : LawfulApplicative F\nα✝ β✝ : Type u_1\nf : F (α✝ → β✝)\nx : F α✝\n⊢ (Seq.seq (id <$> f) fun x_1 => x) = Seq.seq f fun x_1 => x\n[PROOFSTEP]\nrw [id_map]\n[GOAL]\nF : Type u → Type w\nG : Type v → Type u\ninst✝⁷ : Applicative F\ninst✝⁶ : Applicative G\ninst✝⁵ : LawfulApplicative F\ninst✝⁴ : LawfulApplicative G\nα β γ : Type v\nf : Type u → Type w\ng : Type v → Type u\ninst✝³ : Applicative f\ninst✝² : Applicative g\ninst✝¹ : CommApplicative f\ninst✝ : CommApplicative g\n⊢ CommApplicative (Comp f g)\n[PROOFSTEP]\nrefine' { @instLawfulApplicativeComp f g _ _ _ _ with .. }\n[GOAL]\nF : Type u → Type w\nG : Type v → Type u\ninst✝⁷ : Applicative F\ninst✝⁶ : Applicative G\ninst✝⁵ : LawfulApplicative F\ninst✝⁴ : LawfulApplicative G\nα β γ : Type v\nf : Type u → Type w\ng : Type v → Type u\ninst✝³ : Applicative f\ninst✝² : Applicative g\ninst✝¹ : CommApplicative f\ninst✝ : CommApplicative g\nsrc✝ : LawfulApplicative (Comp f g) := instLawfulApplicativeComp\n⊢ ∀ {α β : Type v} (a : Comp f g α) (b : Comp f g β),\n (Seq.seq (Prod.mk <$> a) fun x => b) = Seq.seq ((fun b a => (a, b)) <$> b) fun x => a\n[PROOFSTEP]\nintros\n[GOAL]\nF : Type u → Type w\nG : Type v → Type u\ninst✝⁷ : Applicative F\ninst✝⁶ : Applicative G\ninst✝⁵ : LawfulApplicative F\ninst✝⁴ : LawfulApplicative G\nα β γ : Type v\nf : Type u → Type w\ng : Type v → Type u\ninst✝³ : Applicative f\ninst✝² : Applicative g\ninst✝¹ : CommApplicative f\ninst✝ : CommApplicative g\nsrc✝ : LawfulApplicative (Comp f g) := instLawfulApplicativeComp\nα✝ β✝ : Type v\na✝ : Comp f g α✝\nb✝ : Comp f g β✝\n⊢ (Seq.seq (Prod.mk <$> a✝) fun x => b✝) = Seq.seq ((fun b a => (a, b)) <$> b✝) fun x => a✝\n[PROOFSTEP]\nsimp! [map, Seq.seq, functor_norm]\n[GOAL]\nF : Type u → Type w\nG : Type v → Type u\ninst✝⁷ : Applicative F\ninst✝⁶ : Applicative G\ninst✝⁵ : LawfulApplicative F\ninst✝⁴ : LawfulApplicative G\nα β γ : Type v\nf : Type u → Type w\ng : Type v → Type u\ninst✝³ : Applicative f\ninst✝² : Applicative g\ninst✝¹ : CommApplicative f\ninst✝ : CommApplicative g\nsrc✝ : LawfulApplicative (Comp f g) := instLawfulApplicativeComp\nα✝ β✝ : Type v\na✝ : Comp f g α✝\nb✝ : Comp f g β✝\n⊢ mk (Seq.seq ((fun x x_1 => Seq.seq x fun x => x_1) <$> mk ((fun x => Prod.mk <$> x) <$> a✝)) fun x => b✝) =\n mk\n (Seq.seq ((fun x x_1 => Seq.seq x fun x => x_1) <$> mk ((fun x => (fun b a => (a, b)) <$> x) <$> b✝)) fun x => a✝)\n[PROOFSTEP]\nrw [commutative_map]\n[GOAL]\nF : Type u → Type w\nG : Type v → Type u\ninst✝⁷ : Applicative F\ninst✝⁶ : Applicative G\ninst✝⁵ : LawfulApplicative F\ninst✝⁴ : LawfulApplicative G\nα β γ : Type v\nf : Type u → Type w\ng : Type v → Type u\ninst✝³ : Applicative f\ninst✝² : Applicative g\ninst✝¹ : CommApplicative f\ninst✝ : CommApplicative g\nsrc✝ : LawfulApplicative (Comp f g) := instLawfulApplicativeComp\nα✝ β✝ : Type v\na✝ : Comp f g α✝\nb✝ : Comp f g β✝\n⊢ mk (Seq.seq ((flip fun x x_1 => Seq.seq x fun x => x_1) <$> b✝) fun x => mk ((fun x => Prod.mk <$> x) <$> a✝)) =\n mk\n (Seq.seq ((fun x x_1 => Seq.seq x fun x => x_1) <$> mk ((fun x => (fun b a => (a, b)) <$> x) <$> b✝)) fun x => a✝)\n[PROOFSTEP]\nsimp [Comp.mk, flip, (· ∘ ·), functor_norm]\n[GOAL]\nF : Type u → Type w\nG : Type v → Type u\ninst✝⁷ : Applicative F\ninst✝⁶ : Applicative G\ninst✝⁵ : LawfulApplicative F\ninst✝⁴ : LawfulApplicative G\nα β γ : Type v\nf : Type u → Type w\ng : Type v → Type u\ninst✝³ : Applicative f\ninst✝² : Applicative g\ninst✝¹ : CommApplicative f\ninst✝ : CommApplicative g\nsrc✝ : LawfulApplicative (Comp f g) := instLawfulApplicativeComp\nα✝ β✝ : Type v\na✝ : Comp f g α✝\nb✝ : Comp f g β✝\n⊢ (Seq.seq ((fun x x_1 => Seq.seq (Prod.mk <$> x_1) fun x_2 => x) <$> b✝) fun x => a✝) =\n Seq.seq ((fun x x_1 => Seq.seq ((fun b a => (a, b)) <$> x) fun x => x_1) <$> b✝) fun x => a✝\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a.e_a\nF : Type u → Type w\nG : Type v → Type u\ninst✝⁷ : Applicative F\ninst✝⁶ : Applicative G\ninst✝⁵ : LawfulApplicative F\ninst✝⁴ : LawfulApplicative G\nα β γ : Type v\nf : Type u → Type w\ng : Type v → Type u\ninst✝³ : Applicative f\ninst✝² : Applicative g\ninst✝¹ : CommApplicative f\ninst✝ : CommApplicative g\nsrc✝ : LawfulApplicative (Comp f g) := instLawfulApplicativeComp\nα✝ β✝ : Type v\na✝ : Comp f g α✝\nb✝ : Comp f g β✝\n⊢ (fun x x_1 => Seq.seq (Prod.mk <$> x_1) fun x_2 => x) = fun x x_1 => Seq.seq ((fun b a => (a, b)) <$> x) fun x => x_1\n[PROOFSTEP]\nfunext x y\n[GOAL]\ncase e_a.e_a.h.h\nF : Type u → Type w\nG : Type v → Type u\ninst✝⁷ : Applicative F\ninst✝⁶ : Applicative G\ninst✝⁵ : LawfulApplicative F\ninst✝⁴ : LawfulApplicative G\nα β γ : Type v\nf : Type u → Type w\ng : Type v → Type u\ninst✝³ : Applicative f\ninst✝² : Applicative g\ninst✝¹ : CommApplicative f\ninst✝ : CommApplicative g\nsrc✝ : LawfulApplicative (Comp f g) := instLawfulApplicativeComp\nα✝ β✝ : Type v\na✝ : Comp f g α✝\nb✝ : Comp f g β✝\nx : g β✝\ny : g α✝\n⊢ (Seq.seq (Prod.mk <$> y) fun x_1 => x) = Seq.seq ((fun b a => (a, b)) <$> x) fun x => y\n[PROOFSTEP]\nrw [commutative_map]\n[GOAL]\ncase e_a.e_a.h.h\nF : Type u → Type w\nG : Type v → Type u\ninst✝⁷ : Applicative F\ninst✝⁶ : Applicative G\ninst✝⁵ : LawfulApplicative F\ninst✝⁴ : LawfulApplicative G\nα β γ : Type v\nf : Type u → Type w\ng : Type v → Type u\ninst✝³ : Applicative f\ninst✝² : Applicative g\ninst✝¹ : CommApplicative f\ninst✝ : CommApplicative g\nsrc✝ : LawfulApplicative (Comp f g) := instLawfulApplicativeComp\nα✝ β✝ : Type v\na✝ : Comp f g α✝\nb✝ : Comp f g β✝\nx : g β✝\ny : g α✝\n⊢ (Seq.seq (flip Prod.mk <$> x) fun x => y) = Seq.seq ((fun b a => (a, b)) <$> x) fun x => y\n[PROOFSTEP]\ncongr\n[GOAL]\nα : Type ?u.61704\ninst✝ : Monoid α\n⊢ LawfulApplicative (Const α)\n[PROOFSTEP]\nrefine' { .. }\n[GOAL]\ncase refine'_1\nα : Type ?u.61704\ninst✝ : Monoid α\n⊢ ∀ {α_1 β : Type ?u.61710}, mapConst = map ∘ Function.const β\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_2\nα : Type ?u.61704\ninst✝ : Monoid α\n⊢ ∀ {α_1 : Type ?u.61710} (x : Const α α_1), id <$> x = x\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_3\nα : Type ?u.61704\ninst✝ : Monoid α\n⊢ ∀ {α_1 β γ : Type ?u.61710} (g : α_1 → β) (h : β → γ) (x : Const α α_1), (h ∘ g) <$> x = h <$> g <$> x\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_4\nα : Type ?u.61704\ninst✝ : Monoid α\n⊢ ∀ {α_1 β : Type ?u.61710} (x : Const α α_1) (y : Const α β),\n (SeqLeft.seqLeft x fun x => y) = Seq.seq (Function.const β <$> x) fun x => y\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_5\nα : Type ?u.61704\ninst✝ : Monoid α\n⊢ ∀ {α_1 β : Type ?u.61710} (x : Const α α_1) (y : Const α β),\n (SeqRight.seqRight x fun x => y) = Seq.seq (Function.const α_1 id <$> x) fun x => y\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_6\nα : Type ?u.61704\ninst✝ : Monoid α\n⊢ ∀ {α_1 β : Type ?u.61710} (g : α_1 → β) (x : Const α α_1), (Seq.seq (pure g) fun x_1 => x) = g <$> x\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_7\nα : Type ?u.61704\ninst✝ : Monoid α\n⊢ ∀ {α_1 β : Type ?u.61710} (g : α_1 → β) (x : α_1), g <$> pure x = pure (g x)\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_8\nα : Type ?u.61704\ninst✝ : Monoid α\n⊢ ∀ {α_1 β : Type ?u.61710} (g : Const α (α_1 → β)) (x : α_1), (Seq.seq g fun x_1 => pure x) = (fun h => h x) <$> g\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_9\nα : Type ?u.61704\ninst✝ : Monoid α\n⊢ ∀ {α_1 β γ : Type ?u.61710} (x : Const α α_1) (g : Const α (α_1 → β)) (h : Const α (β → γ)),\n (Seq.seq h fun x_1 => Seq.seq g fun x_2 => x) = Seq.seq (Seq.seq (Function.comp <$> h) fun x => g) fun x_1 => x\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_1\nα : Type ?u.61704\ninst✝ : Monoid α\nα✝ β✝ : Type ?u.61710\n⊢ mapConst = map ∘ Function.const β✝\n[PROOFSTEP]\nsimp [mul_assoc, (· <$> ·), Seq.seq, pure]\n[GOAL]\ncase refine'_2\nα : Type ?u.61704\ninst✝ : Monoid α\nα✝ : Type ?u.61710\nx✝ : Const α α✝\n⊢ id <$> x✝ = x✝\n[PROOFSTEP]\nsimp [mul_assoc, (· <$> ·), Seq.seq, pure]\n[GOAL]\ncase refine'_3\nα : Type ?u.61704\ninst✝ : Monoid α\nα✝ β✝ γ✝ : Type ?u.61710\ng✝ : α✝ → β✝\nh✝ : β✝ → γ✝\nx✝ : Const α α✝\n⊢ (h✝ ∘ g✝) <$> x✝ = h✝ <$> g✝ <$> x✝\n[PROOFSTEP]\nsimp [mul_assoc, (· <$> ·), Seq.seq, pure]\n[GOAL]\ncase refine'_4\nα : Type ?u.61704\ninst✝ : Monoid α\nα✝ β✝ : Type ?u.61710\nx✝ : Const α α✝\ny✝ : Const α β✝\n⊢ (SeqLeft.seqLeft x✝ fun x => y✝) = Seq.seq (Function.const β✝ <$> x✝) fun x => y✝\n[PROOFSTEP]\nsimp [mul_assoc, (· <$> ·), Seq.seq, pure]\n[GOAL]\ncase refine'_5\nα : Type ?u.61704\ninst✝ : Monoid α\nα✝ β✝ : Type ?u.61710\nx✝ : Const α α✝\ny✝ : Const α β✝\n⊢ (SeqRight.seqRight x✝ fun x => y✝) = Seq.seq (Function.const α✝ id <$> x✝) fun x => y✝\n[PROOFSTEP]\nsimp [mul_assoc, (· <$> ·), Seq.seq, pure]\n[GOAL]\ncase refine'_6\nα : Type ?u.61704\ninst✝ : Monoid α\nα✝ β✝ : Type ?u.61710\ng✝ : α✝ → β✝\nx✝ : Const α α✝\n⊢ (Seq.seq (pure g✝) fun x => x✝) = g✝ <$> x✝\n[PROOFSTEP]\nsimp [mul_assoc, (· <$> ·), Seq.seq, pure]\n[GOAL]\ncase refine'_7\nα : Type ?u.61704\ninst✝ : Monoid α\nα✝ β✝ : Type ?u.61710\ng✝ : α✝ → β✝\nx✝ : α✝\n⊢ g✝ <$> pure x✝ = pure (g✝ x✝)\n[PROOFSTEP]\nsimp [mul_assoc, (· <$> ·), Seq.seq, pure]\n[GOAL]\ncase refine'_8\nα : Type ?u.61704\ninst✝ : Monoid α\nα✝ β✝ : Type ?u.61710\ng✝ : Const α (α✝ → β✝)\nx✝ : α✝\n⊢ (Seq.seq g✝ fun x => pure x✝) = (fun h => h x✝) <$> g✝\n[PROOFSTEP]\nsimp [mul_assoc, (· <$> ·), Seq.seq, pure]\n[GOAL]\ncase refine'_9\nα : Type ?u.61704\ninst✝ : Monoid α\nα✝ β✝ γ✝ : Type ?u.61710\nx✝ : Const α α✝\ng✝ : Const α (α✝ → β✝)\nh✝ : Const α (β✝ → γ✝)\n⊢ (Seq.seq h✝ fun x => Seq.seq g✝ fun x => x✝) = Seq.seq (Seq.seq (Function.comp <$> h✝) fun x => g✝) fun x => x✝\n[PROOFSTEP]\nsimp [mul_assoc, (· <$> ·), Seq.seq, pure]\n[GOAL]\ncase refine'_1\nα : Type ?u.61704\ninst✝ : Monoid α\nα✝ β✝ : Type ?u.61710\n⊢ mapConst = Const.map ∘ Function.const β✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_2\nα : Type ?u.61704\ninst✝ : Monoid α\nα✝ : Type ?u.61710\nx✝ : Const α α✝\n⊢ Const.map id x✝ = x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_3\nα : Type ?u.61704\ninst✝ : Monoid α\nα✝ β✝ γ✝ : Type ?u.61710\ng✝ : α✝ → β✝\nh✝ : β✝ → γ✝\nx✝ : Const α α✝\n⊢ Const.map (h✝ ∘ g✝) x✝ = Const.map h✝ (Const.map g✝ x✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_4\nα : Type ?u.61704\ninst✝ : Monoid α\nα✝ β✝ : Type ?u.61710\nx✝ : Const α α✝\ny✝ : Const α β✝\n⊢ (SeqLeft.seqLeft x✝ fun x => y✝) = Const.map (Function.const β✝) x✝ * y✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_5\nα : Type ?u.61704\ninst✝ : Monoid α\nα✝ β✝ : Type ?u.61710\nx✝ : Const α α✝\ny✝ : Const α β✝\n⊢ (SeqRight.seqRight x✝ fun x => y✝) = Const.map (Function.const α✝ id) x✝ * y✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_6\nα : Type ?u.61704\ninst✝ : Monoid α\nα✝ β✝ : Type ?u.61710\ng✝ : α✝ → β✝\nx✝ : Const α α✝\n⊢ x✝ = Const.map g✝ x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_7\nα : Type ?u.61704\ninst✝ : Monoid α\nα✝ β✝ : Type ?u.61710\ng✝ : α✝ → β✝\nx✝ : α✝\n⊢ Const.map g✝ 1 = 1\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_8\nα : Type ?u.61704\ninst✝ : Monoid α\nα✝ β✝ : Type ?u.61710\ng✝ : Const α (α✝ → β✝)\nx✝ : α✝\n⊢ g✝ = Const.map (fun h => h x✝) g✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_9\nα : Type ?u.61704\ninst✝ : Monoid α\nα✝ β✝ γ✝ : Type ?u.61710\nx✝ : Const α α✝\ng✝ : Const α (α✝ → β✝)\nh✝ : Const α (β✝ → γ✝)\n⊢ h✝ * (g✝ * x✝) = Const.map Function.comp h✝ * (g✝ * x✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type ?u.64148\ninst✝ : AddMonoid α\n⊢ LawfulApplicative (AddConst α)\n[PROOFSTEP]\nrefine' { .. }\n[GOAL]\ncase refine'_1\nα : Type ?u.64148\ninst✝ : AddMonoid α\n⊢ ∀ {α_1 β : Type ?u.64153}, mapConst = map ∘ Function.const β\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_2\nα : Type ?u.64148\ninst✝ : AddMonoid α\n⊢ ∀ {α_1 : Type ?u.64153} (x : AddConst α α_1), id <$> x = x\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_3\nα : Type ?u.64148\ninst✝ : AddMonoid α\n⊢ ∀ {α_1 β γ : Type ?u.64153} (g : α_1 → β) (h : β → γ) (x : AddConst α α_1), (h ∘ g) <$> x = h <$> g <$> x\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_4\nα : Type ?u.64148\ninst✝ : AddMonoid α\n⊢ ∀ {α_1 β : Type ?u.64153} (x : AddConst α α_1) (y : AddConst α β),\n (SeqLeft.seqLeft x fun x => y) = Seq.seq (Function.const β <$> x) fun x => y\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_5\nα : Type ?u.64148\ninst✝ : AddMonoid α\n⊢ ∀ {α_1 β : Type ?u.64153} (x : AddConst α α_1) (y : AddConst α β),\n (SeqRight.seqRight x fun x => y) = Seq.seq (Function.const α_1 id <$> x) fun x => y\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_6\nα : Type ?u.64148\ninst✝ : AddMonoid α\n⊢ ∀ {α_1 β : Type ?u.64153} (g : α_1 → β) (x : AddConst α α_1), (Seq.seq (pure g) fun x_1 => x) = g <$> x\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_7\nα : Type ?u.64148\ninst✝ : AddMonoid α\n⊢ ∀ {α_1 β : Type ?u.64153} (g : α_1 → β) (x : α_1), g <$> pure x = pure (g x)\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_8\nα : Type ?u.64148\ninst✝ : AddMonoid α\n⊢ ∀ {α_1 β : Type ?u.64153} (g : AddConst α (α_1 → β)) (x : α_1), (Seq.seq g fun x_1 => pure x) = (fun h => h x) <$> g\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_9\nα : Type ?u.64148\ninst✝ : AddMonoid α\n⊢ ∀ {α_1 β γ : Type ?u.64153} (x : AddConst α α_1) (g : AddConst α (α_1 → β)) (h : AddConst α (β → γ)),\n (Seq.seq h fun x_1 => Seq.seq g fun x_2 => x) = Seq.seq (Seq.seq (Function.comp <$> h) fun x => g) fun x_1 => x\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_1\nα : Type ?u.64148\ninst✝ : AddMonoid α\nα✝ β✝ : Type ?u.64153\n⊢ mapConst = map ∘ Function.const β✝\n[PROOFSTEP]\nsimp [add_assoc, (· <$> ·), Seq.seq, pure]\n[GOAL]\ncase refine'_2\nα : Type ?u.64148\ninst✝ : AddMonoid α\nα✝ : Type ?u.64153\nx✝ : AddConst α α✝\n⊢ id <$> x✝ = x✝\n[PROOFSTEP]\nsimp [add_assoc, (· <$> ·), Seq.seq, pure]\n[GOAL]\ncase refine'_3\nα : Type ?u.64148\ninst✝ : AddMonoid α\nα✝ β✝ γ✝ : Type ?u.64153\ng✝ : α✝ → β✝\nh✝ : β✝ → γ✝\nx✝ : AddConst α α✝\n⊢ (h✝ ∘ g✝) <$> x✝ = h✝ <$> g✝ <$> x✝\n[PROOFSTEP]\nsimp [add_assoc, (· <$> ·), Seq.seq, pure]\n[GOAL]\ncase refine'_4\nα : Type ?u.64148\ninst✝ : AddMonoid α\nα✝ β✝ : Type ?u.64153\nx✝ : AddConst α α✝\ny✝ : AddConst α β✝\n⊢ (SeqLeft.seqLeft x✝ fun x => y✝) = Seq.seq (Function.const β✝ <$> x✝) fun x => y✝\n[PROOFSTEP]\nsimp [add_assoc, (· <$> ·), Seq.seq, pure]\n[GOAL]\ncase refine'_5\nα : Type ?u.64148\ninst✝ : AddMonoid α\nα✝ β✝ : Type ?u.64153\nx✝ : AddConst α α✝\ny✝ : AddConst α β✝\n⊢ (SeqRight.seqRight x✝ fun x => y✝) = Seq.seq (Function.const α✝ id <$> x✝) fun x => y✝\n[PROOFSTEP]\nsimp [add_assoc, (· <$> ·), Seq.seq, pure]\n[GOAL]\ncase refine'_6\nα : Type ?u.64148\ninst✝ : AddMonoid α\nα✝ β✝ : Type ?u.64153\ng✝ : α✝ → β✝\nx✝ : AddConst α α✝\n⊢ (Seq.seq (pure g✝) fun x => x✝) = g✝ <$> x✝\n[PROOFSTEP]\nsimp [add_assoc, (· <$> ·), Seq.seq, pure]\n[GOAL]\ncase refine'_7\nα : Type ?u.64148\ninst✝ : AddMonoid α\nα✝ β✝ : Type ?u.64153\ng✝ : α✝ → β✝\nx✝ : α✝\n⊢ g✝ <$> pure x✝ = pure (g✝ x✝)\n[PROOFSTEP]\nsimp [add_assoc, (· <$> ·), Seq.seq, pure]\n[GOAL]\ncase refine'_8\nα : Type ?u.64148\ninst✝ : AddMonoid α\nα✝ β✝ : Type ?u.64153\ng✝ : AddConst α (α✝ → β✝)\nx✝ : α✝\n⊢ (Seq.seq g✝ fun x => pure x✝) = (fun h => h x✝) <$> g✝\n[PROOFSTEP]\nsimp [add_assoc, (· <$> ·), Seq.seq, pure]\n[GOAL]\ncase refine'_9\nα : Type ?u.64148\ninst✝ : AddMonoid α\nα✝ β✝ γ✝ : Type ?u.64153\nx✝ : AddConst α α✝\ng✝ : AddConst α (α✝ → β✝)\nh✝ : AddConst α (β✝ → γ✝)\n⊢ (Seq.seq h✝ fun x => Seq.seq g✝ fun x => x✝) = Seq.seq (Seq.seq (Function.comp <$> h✝) fun x => g✝) fun x => x✝\n[PROOFSTEP]\nsimp [add_assoc, (· <$> ·), Seq.seq, pure]\n[GOAL]\ncase refine'_1\nα : Type ?u.64148\ninst✝ : AddMonoid α\nα✝ β✝ : Type ?u.64153\n⊢ mapConst = Const.map ∘ Function.const β✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_2\nα : Type ?u.64148\ninst✝ : AddMonoid α\nα✝ : Type ?u.64153\nx✝ : AddConst α α✝\n⊢ Const.map id x✝ = x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_3\nα : Type ?u.64148\ninst✝ : AddMonoid α\nα✝ β✝ γ✝ : Type ?u.64153\ng✝ : α✝ → β✝\nh✝ : β✝ → γ✝\nx✝ : AddConst α α✝\n⊢ Const.map (h✝ ∘ g✝) x✝ = Const.map h✝ (Const.map g✝ x✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_4\nα : Type ?u.64148\ninst✝ : AddMonoid α\nα✝ β✝ : Type ?u.64153\nx✝ : AddConst α α✝\ny✝ : AddConst α β✝\n⊢ (SeqLeft.seqLeft x✝ fun x => y✝) = Const.map (Function.const β✝) x✝ + y✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_5\nα : Type ?u.64148\ninst✝ : AddMonoid α\nα✝ β✝ : Type ?u.64153\nx✝ : AddConst α α✝\ny✝ : AddConst α β✝\n⊢ (SeqRight.seqRight x✝ fun x => y✝) = Const.map (Function.const α✝ id) x✝ + y✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_6\nα : Type ?u.64148\ninst✝ : AddMonoid α\nα✝ β✝ : Type ?u.64153\ng✝ : α✝ → β✝\nx✝ : AddConst α α✝\n⊢ x✝ = Const.map g✝ x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_7\nα : Type ?u.64148\ninst✝ : AddMonoid α\nα✝ β✝ : Type ?u.64153\ng✝ : α✝ → β✝\nx✝ : α✝\n⊢ Const.map g✝ 0 = 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_8\nα : Type ?u.64148\ninst✝ : AddMonoid α\nα✝ β✝ : Type ?u.64153\ng✝ : AddConst α (α✝ → β✝)\nx✝ : α✝\n⊢ g✝ = Const.map (fun h => h x✝) g✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_9\nα : Type ?u.64148\ninst✝ : AddMonoid α\nα✝ β✝ γ✝ : Type ?u.64153\nx✝ : AddConst α α✝\ng✝ : AddConst α (α✝ → β✝)\nh✝ : AddConst α (β✝ → γ✝)\n⊢ h✝ + (g✝ + x✝) = Const.map Function.comp h✝ + (g✝ + x✝)\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.Control.Applicative", "llama_tokens": 26015, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO", "lm_q1_score": 0.4035668537353745, "lm_q2_score": 0.019419347508538933, "lm_q1q2_score": 0.007837004975614941}} {"text": "[GOAL]\nM : Type u_1\ninst✝¹ : Monoid M\nX : Type u\ninst✝ : MulAction M X\n⊢ Category.{?u.1482, u} (ActionCategory M X)\n[PROOFSTEP]\ndsimp only [ActionCategory]\n[GOAL]\nM : Type u_1\ninst✝¹ : Monoid M\nX : Type u\ninst✝ : MulAction M X\n⊢ Category.{?u.1482, u} (Functor.Elements (actionAsFunctor M X))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nM : Type u_1\ninst✝¹ : Monoid M\nX : Type u\ninst✝ : MulAction M X\nx : ActionCategory M X\n⊢ { fst := (), snd := ActionCategory.back x } = x\n[PROOFSTEP]\ncases x\n[GOAL]\ncase mk\nM : Type u_1\ninst✝¹ : Monoid M\nX : Type u\ninst✝ : MulAction M X\nfst✝ : SingleObj M\nsnd✝ : (actionAsFunctor M X).obj fst✝\n⊢ { fst := (), snd := ActionCategory.back { fst := fst✝, snd := snd✝ } } = { fst := fst✝, snd := snd✝ }\n[PROOFSTEP]\nrfl\n[GOAL]\nM : Type u_1\ninst✝³ : Monoid M\nX : Type u\ninst✝² : MulAction M X\nx : X\nG : Type u_2\ninst✝¹ : Group G\ninst✝ : MulAction G X\nP : ⦃a b : ActionCategory G X⦄ → (a ⟶ b) → Sort u_3\nhyp : (t : X) → (g : G) → P (homOfPair t g)\na b : ActionCategory G X\nf : a ⟶ b\n⊢ P f\n[PROOFSTEP]\nrefine' cast _ (hyp b.back f.val)\n[GOAL]\nM : Type u_1\ninst✝³ : Monoid M\nX : Type u\ninst✝² : MulAction M X\nx : X\nG : Type u_2\ninst✝¹ : Group G\ninst✝ : MulAction G X\nP : ⦃a b : ActionCategory G X⦄ → (a ⟶ b) → Sort u_3\nhyp : (t : X) → (g : G) → P (homOfPair t g)\na b : ActionCategory G X\nf : a ⟶ b\n⊢ P (homOfPair (ActionCategory.back b) ↑f) = P f\n[PROOFSTEP]\nrcases a with ⟨⟨⟩, a : X⟩\n[GOAL]\ncase mk.unit\nM : Type u_1\ninst✝³ : Monoid M\nX : Type u\ninst✝² : MulAction M X\nx : X\nG : Type u_2\ninst✝¹ : Group G\ninst✝ : MulAction G X\nP : ⦃a b : ActionCategory G X⦄ → (a ⟶ b) → Sort u_3\nhyp : (t : X) → (g : G) → P (homOfPair t g)\nb : ActionCategory G X\na : X\nf : { fst := PUnit.unit, snd := a } ⟶ b\n⊢ P (homOfPair (ActionCategory.back b) ↑f) = P f\n[PROOFSTEP]\nrcases b with ⟨⟨⟩, b : X⟩\n[GOAL]\ncase mk.unit.mk.unit\nM : Type u_1\ninst✝³ : Monoid M\nX : Type u\ninst✝² : MulAction M X\nx : X\nG : Type u_2\ninst✝¹ : Group G\ninst✝ : MulAction G X\nP : ⦃a b : ActionCategory G X⦄ → (a ⟶ b) → Sort u_3\nhyp : (t : X) → (g : G) → P (homOfPair t g)\na b : X\nf : { fst := PUnit.unit, snd := a } ⟶ { fst := PUnit.unit, snd := b }\n⊢ P (homOfPair (ActionCategory.back { fst := PUnit.unit, snd := b }) ↑f) = P f\n[PROOFSTEP]\nrcases f with ⟨g : G, h : g • a = b⟩\n[GOAL]\ncase mk.unit.mk.unit.mk\nM : Type u_1\ninst✝³ : Monoid M\nX : Type u\ninst✝² : MulAction M X\nx : X\nG : Type u_2\ninst✝¹ : Group G\ninst✝ : MulAction G X\nP : ⦃a b : ActionCategory G X⦄ → (a ⟶ b) → Sort u_3\nhyp : (t : X) → (g : G) → P (homOfPair t g)\na b : X\ng : G\nh : g • a = b\n⊢ P (homOfPair (ActionCategory.back { fst := PUnit.unit, snd := b }) ↑{ val := g, property := h }) =\n P { val := g, property := h }\n[PROOFSTEP]\ncases inv_smul_eq_iff.mpr h.symm\n[GOAL]\ncase mk.unit.mk.unit.mk.refl\nM : Type u_1\ninst✝³ : Monoid M\nX : Type u\ninst✝² : MulAction M X\nx : X\nG : Type u_2\ninst✝¹ : Group G\ninst✝ : MulAction G X\nP : ⦃a b : ActionCategory G X⦄ → (a ⟶ b) → Sort u_3\nhyp : (t : X) → (g : G) → P (homOfPair t g)\nb : X\ng : G\nh : g • g⁻¹ • b = b\n⊢ P (homOfPair (ActionCategory.back { fst := PUnit.unit, snd := b }) ↑{ val := g, property := h }) =\n P { val := g, property := h }\n[PROOFSTEP]\nrfl\n[GOAL]\nM : Type u_1\ninst✝³ : Monoid M\nX : Type u\ninst✝² : MulAction M X\nx : X\nG : Type u_2\ninst✝¹ : Group G\ninst✝ : MulAction G X\na' b' : ActionCategory G X\nf : a' ⟶ b'\na b : X\ng : G\nha : a' = { fst := (), snd := a }\nhb : b' = { fst := (), snd := b }\nhg : a = g⁻¹ • b\n⊢ a' = { fst := (), snd := g⁻¹ • b }\n[PROOFSTEP]\nrw [ha, hg]\n[GOAL]\nM : Type u_1\ninst✝³ : Monoid M\nX : Type u\ninst✝² : MulAction M X\nx : X\nG : Type u_2\ninst✝¹ : Group G\ninst✝ : MulAction G X\na' b' : ActionCategory G X\nf : a' ⟶ b'\na b : X\ng : G\nha : a' = { fst := (), snd := a }\nhb : b' = { fst := (), snd := b }\nhg : a = g⁻¹ • b\n⊢ { fst := (), snd := b } = b'\n[PROOFSTEP]\nrw [hb]\n[GOAL]\nM : Type u_1\ninst✝³ : Monoid M\nX : Type u\ninst✝² : MulAction M X\nx : X\nG : Type u_2\ninst✝¹ : Group G\ninst✝ : MulAction G X\na' b' : ActionCategory G X\nf : a' ⟶ b'\n⊢ ∃ a b g ha hb hg,\n f = eqToHom (_ : a' = { fst := (), snd := g⁻¹ • b }) ≫ homOfPair b g ≫ eqToHom (_ : { fst := (), snd := b } = b')\n[PROOFSTEP]\nrevert a' b' f\n[GOAL]\nM : Type u_1\ninst✝³ : Monoid M\nX : Type u\ninst✝² : MulAction M X\nx : X\nG : Type u_2\ninst✝¹ : Group G\ninst✝ : MulAction G X\n⊢ ∀ ⦃a' b' : ActionCategory G X⦄ (f : a' ⟶ b'),\n ∃ a b g ha hb hg,\n f = eqToHom (_ : a' = { fst := (), snd := g⁻¹ • b }) ≫ homOfPair b g ≫ eqToHom (_ : { fst := (), snd := b } = b')\n[PROOFSTEP]\nexact ActionCategory.cases (fun t g => ⟨g⁻¹ • t, t, g, rfl, rfl, rfl, by simp⟩)\n[GOAL]\nM : Type u_1\ninst✝³ : Monoid M\nX : Type u\ninst✝² : MulAction M X\nx : X\nG : Type u_2\ninst✝¹ : Group G\ninst✝ : MulAction G X\nt : X\ng : G\n⊢ homOfPair t g =\n eqToHom (_ : { fst := (), snd := g⁻¹ • t } = { fst := (), snd := g⁻¹ • t }) ≫\n homOfPair t g ≫ eqToHom (_ : { fst := (), snd := t } = { fst := (), snd := t })\n[PROOFSTEP]\nsimp\n[GOAL]\nM : Type u_1\ninst✝⁴ : Monoid M\nX : Type u\ninst✝³ : MulAction M X\nx : X\nG : Type u_2\ninst✝² : Group G\ninst✝¹ : MulAction G X\nH : Type u_3\ninst✝ : Group H\nF : ActionCategory G X ⥤ SingleObj H\n⊢ ∀ {a b : ActionCategory G X} {f : a ⟶ b}, F.map f = F.map (homOfPair (ActionCategory.back b) ↑f)\n[PROOFSTEP]\napply ActionCategory.cases\n[GOAL]\ncase hyp\nM : Type u_1\ninst✝⁴ : Monoid M\nX : Type u\ninst✝³ : MulAction M X\nx : X\nG : Type u_2\ninst✝² : Group G\ninst✝¹ : MulAction G X\nH : Type u_3\ninst✝ : Group H\nF : ActionCategory G X ⥤ SingleObj H\n⊢ ∀ (t : X) (g : G),\n F.map (homOfPair t g) = F.map (homOfPair (ActionCategory.back { fst := (), snd := t }) ↑(homOfPair t g))\n[PROOFSTEP]\nintros\n[GOAL]\ncase hyp\nM : Type u_1\ninst✝⁴ : Monoid M\nX : Type u\ninst✝³ : MulAction M X\nx : X\nG : Type u_2\ninst✝² : Group G\ninst✝¹ : MulAction G X\nH : Type u_3\ninst✝ : Group H\nF : ActionCategory G X ⥤ SingleObj H\nt✝ : X\ng✝ : G\n⊢ F.map (homOfPair t✝ g✝) = F.map (homOfPair (ActionCategory.back { fst := (), snd := t✝ }) ↑(homOfPair t✝ g✝))\n[PROOFSTEP]\nrfl\n[GOAL]\nM : Type u_1\ninst✝⁴ : Monoid M\nX : Type u\ninst✝³ : MulAction M X\nx : X\nG : Type u_2\ninst✝² : Group G\ninst✝¹ : MulAction G X\nH : Type u_3\ninst✝ : Group H\nF : ActionCategory G X ⥤ SingleObj H\nF_map_eq : ∀ {a b : ActionCategory G X} {f : a ⟶ b}, F.map f = F.map (homOfPair (ActionCategory.back b) ↑f)\n⊢ (fun g => { left := fun b => F.map (homOfPair b g), right := g }) 1 = 1\n[PROOFSTEP]\ncongr\n[GOAL]\nM : Type u_1\ninst✝⁴ : Monoid M\nX : Type u\ninst✝³ : MulAction M X\nx : X\nG : Type u_2\ninst✝² : Group G\ninst✝¹ : MulAction G X\nH : Type u_3\ninst✝ : Group H\nF : ActionCategory G X ⥤ SingleObj H\nF_map_eq : ∀ {a b : ActionCategory G X} {f : a ⟶ b}, F.map f = F.map (homOfPair (ActionCategory.back b) ↑f)\n⊢ (fun g => { left := fun b => F.map (homOfPair b g), right := g }) 1 = 1\n[PROOFSTEP]\ndsimp\n[GOAL]\nM : Type u_1\ninst✝⁴ : Monoid M\nX : Type u\ninst✝³ : MulAction M X\nx : X\nG : Type u_2\ninst✝² : Group G\ninst✝¹ : MulAction G X\nH : Type u_3\ninst✝ : Group H\nF : ActionCategory G X ⥤ SingleObj H\nF_map_eq : ∀ {a b : ActionCategory G X} {f : a ⟶ b}, F.map f = F.map (homOfPair (ActionCategory.back b) ↑f)\n⊢ { left := fun b => F.map (homOfPair b 1), right := 1 } = 1\n[PROOFSTEP]\next1\n[GOAL]\ncase left\nM : Type u_1\ninst✝⁴ : Monoid M\nX : Type u\ninst✝³ : MulAction M X\nx : X\nG : Type u_2\ninst✝² : Group G\ninst✝¹ : MulAction G X\nH : Type u_3\ninst✝ : Group H\nF : ActionCategory G X ⥤ SingleObj H\nF_map_eq : ∀ {a b : ActionCategory G X} {f : a ⟶ b}, F.map f = F.map (homOfPair (ActionCategory.back b) ↑f)\n⊢ { left := fun b => F.map (homOfPair b 1), right := 1 }.left = 1.left\ncase right\nM : Type u_1\ninst✝⁴ : Monoid M\nX : Type u\ninst✝³ : MulAction M X\nx : X\nG : Type u_2\ninst✝² : Group G\ninst✝¹ : MulAction G X\nH : Type u_3\ninst✝ : Group H\nF : ActionCategory G X ⥤ SingleObj H\nF_map_eq : ∀ {a b : ActionCategory G X} {f : a ⟶ b}, F.map f = F.map (homOfPair (ActionCategory.back b) ↑f)\n⊢ { left := fun b => F.map (homOfPair b 1), right := 1 }.right = 1.right\n[PROOFSTEP]\next b\n[GOAL]\ncase left.h\nM : Type u_1\ninst✝⁴ : Monoid M\nX : Type u\ninst✝³ : MulAction M X\nx : X\nG : Type u_2\ninst✝² : Group G\ninst✝¹ : MulAction G X\nH : Type u_3\ninst✝ : Group H\nF : ActionCategory G X ⥤ SingleObj H\nF_map_eq : ∀ {a b : ActionCategory G X} {f : a ⟶ b}, F.map f = F.map (homOfPair (ActionCategory.back b) ↑f)\nb : X\n⊢ left { left := fun b => F.map (homOfPair b 1), right := 1 } b = left 1 b\ncase right\nM : Type u_1\ninst✝⁴ : Monoid M\nX : Type u\ninst✝³ : MulAction M X\nx : X\nG : Type u_2\ninst✝² : Group G\ninst✝¹ : MulAction G X\nH : Type u_3\ninst✝ : Group H\nF : ActionCategory G X ⥤ SingleObj H\nF_map_eq : ∀ {a b : ActionCategory G X} {f : a ⟶ b}, F.map f = F.map (homOfPair (ActionCategory.back b) ↑f)\n⊢ { left := fun b => F.map (homOfPair b 1), right := 1 }.right = 1.right\n[PROOFSTEP]\nexact F_map_eq.symm.trans (F.map_id b)\n[GOAL]\ncase right\nM : Type u_1\ninst✝⁴ : Monoid M\nX : Type u\ninst✝³ : MulAction M X\nx : X\nG : Type u_2\ninst✝² : Group G\ninst✝¹ : MulAction G X\nH : Type u_3\ninst✝ : Group H\nF : ActionCategory G X ⥤ SingleObj H\nF_map_eq : ∀ {a b : ActionCategory G X} {f : a ⟶ b}, F.map f = F.map (homOfPair (ActionCategory.back b) ↑f)\n⊢ { left := fun b => F.map (homOfPair b 1), right := 1 }.right = 1.right\n[PROOFSTEP]\nrfl\n[GOAL]\nM : Type u_1\ninst✝⁴ : Monoid M\nX : Type u\ninst✝³ : MulAction M X\nx : X\nG : Type u_2\ninst✝² : Group G\ninst✝¹ : MulAction G X\nH : Type u_3\ninst✝ : Group H\nF : ActionCategory G X ⥤ SingleObj H\nF_map_eq : ∀ {a b : ActionCategory G X} {f : a ⟶ b}, F.map f = F.map (homOfPair (ActionCategory.back b) ↑f)\n⊢ ∀ (x y : G),\n OneHom.toFun\n { toFun := fun g => { left := fun b => F.map (homOfPair b g), right := g },\n map_one' := (_ : (fun g => { left := fun b => F.map (homOfPair b g), right := g }) 1 = 1) }\n (x * y) =\n OneHom.toFun\n { toFun := fun g => { left := fun b => F.map (homOfPair b g), right := g },\n map_one' := (_ : (fun g => { left := fun b => F.map (homOfPair b g), right := g }) 1 = 1) }\n x *\n OneHom.toFun\n { toFun := fun g => { left := fun b => F.map (homOfPair b g), right := g },\n map_one' := (_ : (fun g => { left := fun b => F.map (homOfPair b g), right := g }) 1 = 1) }\n y\n[PROOFSTEP]\nintro g h\n[GOAL]\nM : Type u_1\ninst✝⁴ : Monoid M\nX : Type u\ninst✝³ : MulAction M X\nx : X\nG : Type u_2\ninst✝² : Group G\ninst✝¹ : MulAction G X\nH : Type u_3\ninst✝ : Group H\nF : ActionCategory G X ⥤ SingleObj H\nF_map_eq : ∀ {a b : ActionCategory G X} {f : a ⟶ b}, F.map f = F.map (homOfPair (ActionCategory.back b) ↑f)\ng h : G\n⊢ OneHom.toFun\n { toFun := fun g => { left := fun b => F.map (homOfPair b g), right := g },\n map_one' := (_ : (fun g => { left := fun b => F.map (homOfPair b g), right := g }) 1 = 1) }\n (g * h) =\n OneHom.toFun\n { toFun := fun g => { left := fun b => F.map (homOfPair b g), right := g },\n map_one' := (_ : (fun g => { left := fun b => F.map (homOfPair b g), right := g }) 1 = 1) }\n g *\n OneHom.toFun\n { toFun := fun g => { left := fun b => F.map (homOfPair b g), right := g },\n map_one' := (_ : (fun g => { left := fun b => F.map (homOfPair b g), right := g }) 1 = 1) }\n h\n[PROOFSTEP]\ncongr\n[GOAL]\nM : Type u_1\ninst✝⁴ : Monoid M\nX : Type u\ninst✝³ : MulAction M X\nx : X\nG : Type u_2\ninst✝² : Group G\ninst✝¹ : MulAction G X\nH : Type u_3\ninst✝ : Group H\nF : ActionCategory G X ⥤ SingleObj H\nF_map_eq : ∀ {a b : ActionCategory G X} {f : a ⟶ b}, F.map f = F.map (homOfPair (ActionCategory.back b) ↑f)\ng h : G\n⊢ OneHom.toFun\n { toFun := fun g => { left := fun b => F.map (homOfPair b g), right := g },\n map_one' := (_ : (fun g => { left := fun b => F.map (homOfPair b g), right := g }) 1 = 1) }\n (g * h) =\n OneHom.toFun\n { toFun := fun g => { left := fun b => F.map (homOfPair b g), right := g },\n map_one' := (_ : (fun g => { left := fun b => F.map (homOfPair b g), right := g }) 1 = 1) }\n g *\n OneHom.toFun\n { toFun := fun g => { left := fun b => F.map (homOfPair b g), right := g },\n map_one' := (_ : (fun g => { left := fun b => F.map (homOfPair b g), right := g }) 1 = 1) }\n h\n[PROOFSTEP]\next b\n[GOAL]\ncase left.h\nM : Type u_1\ninst✝⁴ : Monoid M\nX : Type u\ninst✝³ : MulAction M X\nx : X\nG : Type u_2\ninst✝² : Group G\ninst✝¹ : MulAction G X\nH : Type u_3\ninst✝ : Group H\nF : ActionCategory G X ⥤ SingleObj H\nF_map_eq : ∀ {a b : ActionCategory G X} {f : a ⟶ b}, F.map f = F.map (homOfPair (ActionCategory.back b) ↑f)\ng h : G\nb : X\n⊢ left\n (OneHom.toFun\n { toFun := fun g => { left := fun b => F.map (homOfPair b g), right := g },\n map_one' := (_ : (fun g => { left := fun b => F.map (homOfPair b g), right := g }) 1 = 1) }\n (g * h))\n b =\n left\n (OneHom.toFun\n { toFun := fun g => { left := fun b => F.map (homOfPair b g), right := g },\n map_one' := (_ : (fun g => { left := fun b => F.map (homOfPair b g), right := g }) 1 = 1) }\n g *\n OneHom.toFun\n { toFun := fun g => { left := fun b => F.map (homOfPair b g), right := g },\n map_one' := (_ : (fun g => { left := fun b => F.map (homOfPair b g), right := g }) 1 = 1) }\n h)\n b\ncase right\nM : Type u_1\ninst✝⁴ : Monoid M\nX : Type u\ninst✝³ : MulAction M X\nx : X\nG : Type u_2\ninst✝² : Group G\ninst✝¹ : MulAction G X\nH : Type u_3\ninst✝ : Group H\nF : ActionCategory G X ⥤ SingleObj H\nF_map_eq : ∀ {a b : ActionCategory G X} {f : a ⟶ b}, F.map f = F.map (homOfPair (ActionCategory.back b) ↑f)\ng h : G\n⊢ (OneHom.toFun\n { toFun := fun g => { left := fun b => F.map (homOfPair b g), right := g },\n map_one' := (_ : (fun g => { left := fun b => F.map (homOfPair b g), right := g }) 1 = 1) }\n (g * h)).right =\n (OneHom.toFun\n { toFun := fun g => { left := fun b => F.map (homOfPair b g), right := g },\n map_one' := (_ : (fun g => { left := fun b => F.map (homOfPair b g), right := g }) 1 = 1) }\n g *\n OneHom.toFun\n { toFun := fun g => { left := fun b => F.map (homOfPair b g), right := g },\n map_one' := (_ : (fun g => { left := fun b => F.map (homOfPair b g), right := g }) 1 = 1) }\n h).right\n[PROOFSTEP]\nexact F_map_eq.symm.trans (F.map_comp (homOfPair (g⁻¹ • b) h) (homOfPair b g))\n[GOAL]\ncase right\nM : Type u_1\ninst✝⁴ : Monoid M\nX : Type u\ninst✝³ : MulAction M X\nx : X\nG : Type u_2\ninst✝² : Group G\ninst✝¹ : MulAction G X\nH : Type u_3\ninst✝ : Group H\nF : ActionCategory G X ⥤ SingleObj H\nF_map_eq : ∀ {a b : ActionCategory G X} {f : a ⟶ b}, F.map f = F.map (homOfPair (ActionCategory.back b) ↑f)\ng h : G\n⊢ (OneHom.toFun\n { toFun := fun g => { left := fun b => F.map (homOfPair b g), right := g },\n map_one' := (_ : (fun g => { left := fun b => F.map (homOfPair b g), right := g }) 1 = 1) }\n (g * h)).right =\n (OneHom.toFun\n { toFun := fun g => { left := fun b => F.map (homOfPair b g), right := g },\n map_one' := (_ : (fun g => { left := fun b => F.map (homOfPair b g), right := g }) 1 = 1) }\n g *\n OneHom.toFun\n { toFun := fun g => { left := fun b => F.map (homOfPair b g), right := g },\n map_one' := (_ : (fun g => { left := fun b => F.map (homOfPair b g), right := g }) 1 = 1) }\n h).right\n[PROOFSTEP]\nrfl\n[GOAL]\nM : Type u_1\ninst✝⁴ : Monoid M\nX : Type u\ninst✝³ : MulAction M X\nx✝ : X\nG : Type u_2\ninst✝² : Group G\ninst✝¹ : MulAction G X\nH : Type u_3\ninst✝ : Group H\nF : G →* (X → H) ⋊[mulAutArrow] G\nsane : ∀ (g : G), (↑F g).right = g\nx : ActionCategory G X\n⊢ { obj := fun x => (), map := fun {x b} f => left (↑F ↑f) (ActionCategory.back b) }.map (𝟙 x) =\n 𝟙 ({ obj := fun x => (), map := fun {x b} f => left (↑F ↑f) (ActionCategory.back b) }.obj x)\n[PROOFSTEP]\ndsimp\n[GOAL]\nM : Type u_1\ninst✝⁴ : Monoid M\nX : Type u\ninst✝³ : MulAction M X\nx✝ : X\nG : Type u_2\ninst✝² : Group G\ninst✝¹ : MulAction G X\nH : Type u_3\ninst✝ : Group H\nF : G →* (X → H) ⋊[mulAutArrow] G\nsane : ∀ (g : G), (↑F g).right = g\nx : ActionCategory G X\n⊢ left (↑F 1) (ActionCategory.back x) = 𝟙 ()\n[PROOFSTEP]\nrw [F.map_one]\n[GOAL]\nM : Type u_1\ninst✝⁴ : Monoid M\nX : Type u\ninst✝³ : MulAction M X\nx✝ : X\nG : Type u_2\ninst✝² : Group G\ninst✝¹ : MulAction G X\nH : Type u_3\ninst✝ : Group H\nF : G →* (X → H) ⋊[mulAutArrow] G\nsane : ∀ (g : G), (↑F g).right = g\nx : ActionCategory G X\n⊢ left 1 (ActionCategory.back x) = 𝟙 ()\n[PROOFSTEP]\nrfl\n[GOAL]\nM : Type u_1\ninst✝⁴ : Monoid M\nX : Type u\ninst✝³ : MulAction M X\nx : X\nG : Type u_2\ninst✝² : Group G\ninst✝¹ : MulAction G X\nH : Type u_3\ninst✝ : Group H\nF : G →* (X → H) ⋊[mulAutArrow] G\nsane : ∀ (g : G), (↑F g).right = g\nX✝ Y✝ Z✝ : ActionCategory G X\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\n⊢ { obj := fun x => (), map := fun {x b} f => left (↑F ↑f) (ActionCategory.back b) }.map (f ≫ g) =\n { obj := fun x => (), map := fun {x b} f => left (↑F ↑f) (ActionCategory.back b) }.map f ≫\n { obj := fun x => (), map := fun {x b} f => left (↑F ↑f) (ActionCategory.back b) }.map g\n[PROOFSTEP]\nobtain ⟨_, z, γ₁, rfl, rfl, rfl, rfl⟩ := ActionCategory.cases' g\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nM : Type u_1\ninst✝⁴ : Monoid M\nX : Type u\ninst✝³ : MulAction M X\nx : X\nG : Type u_2\ninst✝² : Group G\ninst✝¹ : MulAction G X\nH : Type u_3\ninst✝ : Group H\nF : G →* (X → H) ⋊[mulAutArrow] G\nsane : ∀ (g : G), (↑F g).right = g\nX✝ : ActionCategory G X\nz : X\nγ₁ : G\nf : X✝ ⟶ { fst := (), snd := γ₁⁻¹ • z }\n⊢ { obj := fun x => (), map := fun {x b} f => left (↑F ↑f) (ActionCategory.back b) }.map\n (f ≫\n eqToHom (_ : { fst := (), snd := γ₁⁻¹ • z } = { fst := (), snd := γ₁⁻¹ • z }) ≫\n homOfPair z γ₁ ≫ eqToHom (_ : { fst := (), snd := z } = { fst := (), snd := z })) =\n { obj := fun x => (), map := fun {x b} f => left (↑F ↑f) (ActionCategory.back b) }.map f ≫\n { obj := fun x => (), map := fun {x b} f => left (↑F ↑f) (ActionCategory.back b) }.map\n (eqToHom (_ : { fst := (), snd := γ₁⁻¹ • z } = { fst := (), snd := γ₁⁻¹ • z }) ≫\n homOfPair z γ₁ ≫ eqToHom (_ : { fst := (), snd := z } = { fst := (), snd := z }))\n[PROOFSTEP]\nobtain ⟨_, y, γ₂, rfl, hy, rfl, rfl⟩ := ActionCategory.cases' f\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nM : Type u_1\ninst✝⁴ : Monoid M\nX : Type u\ninst✝³ : MulAction M X\nx : X\nG : Type u_2\ninst✝² : Group G\ninst✝¹ : MulAction G X\nH : Type u_3\ninst✝ : Group H\nF : G →* (X → H) ⋊[mulAutArrow] G\nsane : ∀ (g : G), (↑F g).right = g\nz : X\nγ₁ : G\ny : X\nγ₂ : G\nhy : { fst := (), snd := γ₁⁻¹ • z } = { fst := (), snd := y }\n⊢ { obj := fun x => (), map := fun {x b} f => left (↑F ↑f) (ActionCategory.back b) }.map\n ((eqToHom (_ : { fst := (), snd := γ₂⁻¹ • y } = { fst := (), snd := γ₂⁻¹ • y }) ≫\n homOfPair y γ₂ ≫ eqToHom (_ : { fst := (), snd := y } = { fst := (), snd := γ₁⁻¹ • z })) ≫\n eqToHom (_ : { fst := (), snd := γ₁⁻¹ • z } = { fst := (), snd := γ₁⁻¹ • z }) ≫\n homOfPair z γ₁ ≫ eqToHom (_ : { fst := (), snd := z } = { fst := (), snd := z })) =\n { obj := fun x => (), map := fun {x b} f => left (↑F ↑f) (ActionCategory.back b) }.map\n (eqToHom (_ : { fst := (), snd := γ₂⁻¹ • y } = { fst := (), snd := γ₂⁻¹ • y }) ≫\n homOfPair y γ₂ ≫ eqToHom (_ : { fst := (), snd := y } = { fst := (), snd := γ₁⁻¹ • z })) ≫\n { obj := fun x => (), map := fun {x b} f => left (↑F ↑f) (ActionCategory.back b) }.map\n (eqToHom (_ : { fst := (), snd := γ₁⁻¹ • z } = { fst := (), snd := γ₁⁻¹ • z }) ≫\n homOfPair z γ₁ ≫ eqToHom (_ : { fst := (), snd := z } = { fst := (), snd := z }))\n[PROOFSTEP]\nobtain rfl : y = γ₁⁻¹ • z := congr_arg Sigma.snd hy.symm\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nM : Type u_1\ninst✝⁴ : Monoid M\nX : Type u\ninst✝³ : MulAction M X\nx : X\nG : Type u_2\ninst✝² : Group G\ninst✝¹ : MulAction G X\nH : Type u_3\ninst✝ : Group H\nF : G →* (X → H) ⋊[mulAutArrow] G\nsane : ∀ (g : G), (↑F g).right = g\nz : X\nγ₁ γ₂ : G\nhy : { fst := (), snd := γ₁⁻¹ • z } = { fst := (), snd := γ₁⁻¹ • z }\n⊢ { obj := fun x => (), map := fun {x b} f => left (↑F ↑f) (ActionCategory.back b) }.map\n ((eqToHom (_ : { fst := (), snd := γ₂⁻¹ • γ₁⁻¹ • z } = { fst := (), snd := γ₂⁻¹ • γ₁⁻¹ • z }) ≫\n homOfPair (γ₁⁻¹ • z) γ₂ ≫ eqToHom (_ : { fst := (), snd := γ₁⁻¹ • z } = { fst := (), snd := γ₁⁻¹ • z })) ≫\n eqToHom (_ : { fst := (), snd := γ₁⁻¹ • z } = { fst := (), snd := γ₁⁻¹ • z }) ≫\n homOfPair z γ₁ ≫ eqToHom (_ : { fst := (), snd := z } = { fst := (), snd := z })) =\n { obj := fun x => (), map := fun {x b} f => left (↑F ↑f) (ActionCategory.back b) }.map\n (eqToHom (_ : { fst := (), snd := γ₂⁻¹ • γ₁⁻¹ • z } = { fst := (), snd := γ₂⁻¹ • γ₁⁻¹ • z }) ≫\n homOfPair (γ₁⁻¹ • z) γ₂ ≫ eqToHom (_ : { fst := (), snd := γ₁⁻¹ • z } = { fst := (), snd := γ₁⁻¹ • z })) ≫\n { obj := fun x => (), map := fun {x b} f => left (↑F ↑f) (ActionCategory.back b) }.map\n (eqToHom (_ : { fst := (), snd := γ₁⁻¹ • z } = { fst := (), snd := γ₁⁻¹ • z }) ≫\n homOfPair z γ₁ ≫ eqToHom (_ : { fst := (), snd := z } = { fst := (), snd := z }))\n[PROOFSTEP]\nsimp [sane]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nM : Type u_1\ninst✝⁴ : Monoid M\nX : Type u\ninst✝³ : MulAction M X\nx : X\nG : Type u_2\ninst✝² : Group G\ninst✝¹ : MulAction G X\nH : Type u_3\ninst✝ : Group H\nF : G →* (X → H) ⋊[mulAutArrow] G\nsane : ∀ (g : G), (↑F g).right = g\nz : X\nγ₁ γ₂ : G\nhy : { fst := (), snd := γ₁⁻¹ • z } = { fst := (), snd := γ₁⁻¹ • z }\n⊢ left (↑F γ₁) z * (γ₁ • (↑F γ₂).left) z = left (↑F γ₂) (γ₁⁻¹ • z) ≫ left (↑F γ₁) z\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Action", "llama_tokens": 10049, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO", "lm_q1_score": 0.40356685373537454, "lm_q2_score": 0.018833128238333205, "lm_q1q2_score": 0.007600426309138968}} {"text": "[GOAL]\nX : Compactum\nx : X.A\n⊢ str X (incl X x) = x\n[PROOFSTEP]\nchange ((β).η.app _ ≫ X.a) _ = _\n[GOAL]\nX : Compactum\nx : X.A\n⊢ (NatTrans.app (Monad.η β) X.A ≫ X.a) x = x\n[PROOFSTEP]\nrw [Monad.Algebra.unit]\n[GOAL]\nX : Compactum\nx : X.A\n⊢ 𝟙 X.A x = x\n[PROOFSTEP]\nrfl\n[GOAL]\nX Y : Compactum\nf : X ⟶ Y\nxs : Ultrafilter X.A\n⊢ Monad.Algebra.Hom.f f (str X xs) = str Y (Ultrafilter.map f.f xs)\n[PROOFSTEP]\nchange (X.a ≫ f.f) _ = _\n[GOAL]\nX Y : Compactum\nf : X ⟶ Y\nxs : Ultrafilter X.A\n⊢ (X.a ≫ f.f) xs = str Y (Ultrafilter.map f.f xs)\n[PROOFSTEP]\nrw [← f.h]\n[GOAL]\nX Y : Compactum\nf : X ⟶ Y\nxs : Ultrafilter X.A\n⊢ (β.toFunctor.map f.f ≫ Y.a) xs = str Y (Ultrafilter.map f.f xs)\n[PROOFSTEP]\nrfl\n[GOAL]\nX : Compactum\nuux : Ultrafilter (Ultrafilter X.A)\n⊢ str X (join X uux) = str X (Ultrafilter.map (str X) uux)\n[PROOFSTEP]\nchange ((β).μ.app _ ≫ X.a) _ = _\n[GOAL]\nX : Compactum\nuux : Ultrafilter (Ultrafilter X.A)\n⊢ (NatTrans.app (Monad.μ β) X.A ≫ X.a) uux = str X (Ultrafilter.map (str X) uux)\n[PROOFSTEP]\nrw [Monad.Algebra.assoc]\n[GOAL]\nX : Compactum\nuux : Ultrafilter (Ultrafilter X.A)\n⊢ (β.toFunctor.map X.a ≫ X.a) uux = str X (Ultrafilter.map (str X) uux)\n[PROOFSTEP]\nrfl\n[GOAL]\nX : Compactum\nS : Set X.A\n⊢ IsClosed S ↔ ∀ (F : Ultrafilter X.A), S ∈ F → str X F ∈ S\n[PROOFSTEP]\nrw [← isOpen_compl_iff]\n[GOAL]\nX : Compactum\nS : Set X.A\n⊢ IsOpen Sᶜ ↔ ∀ (F : Ultrafilter X.A), S ∈ F → str X F ∈ S\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nX : Compactum\nS : Set X.A\n⊢ IsOpen Sᶜ → ∀ (F : Ultrafilter X.A), S ∈ F → str X F ∈ S\n[PROOFSTEP]\nintro cond F h\n[GOAL]\ncase mp\nX : Compactum\nS : Set X.A\ncond : IsOpen Sᶜ\nF : Ultrafilter X.A\nh : S ∈ F\n⊢ str X F ∈ S\n[PROOFSTEP]\nby_contra c\n[GOAL]\ncase mp\nX : Compactum\nS : Set X.A\ncond : IsOpen Sᶜ\nF : Ultrafilter X.A\nh : S ∈ F\nc : ¬str X F ∈ S\n⊢ False\n[PROOFSTEP]\nspecialize cond F c\n[GOAL]\ncase mp\nX : Compactum\nS : Set X.A\nF : Ultrafilter X.A\nh : S ∈ F\nc : ¬str X F ∈ S\ncond : Sᶜ ∈ F\n⊢ False\n[PROOFSTEP]\nrw [compl_mem_iff_not_mem] at cond \n[GOAL]\ncase mp\nX : Compactum\nS : Set X.A\nF : Ultrafilter X.A\nh : S ∈ F\nc : ¬str X F ∈ S\ncond : ¬S ∈ F\n⊢ False\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase mpr\nX : Compactum\nS : Set X.A\n⊢ (∀ (F : Ultrafilter X.A), S ∈ F → str X F ∈ S) → IsOpen Sᶜ\n[PROOFSTEP]\nintro h1 F h2\n[GOAL]\ncase mpr\nX : Compactum\nS : Set X.A\nh1 : ∀ (F : Ultrafilter X.A), S ∈ F → str X F ∈ S\nF : Ultrafilter X.A\nh2 : str X F ∈ Sᶜ\n⊢ Sᶜ ∈ F\n[PROOFSTEP]\nspecialize h1 F\n[GOAL]\ncase mpr\nX : Compactum\nS : Set X.A\nF : Ultrafilter X.A\nh2 : str X F ∈ Sᶜ\nh1 : S ∈ F → str X F ∈ S\n⊢ Sᶜ ∈ F\n[PROOFSTEP]\ncases' F.mem_or_compl_mem S with h h\n[GOAL]\ncase mpr.inl\nX : Compactum\nS : Set X.A\nF : Ultrafilter X.A\nh2 : str X F ∈ Sᶜ\nh1 : S ∈ F → str X F ∈ S\nh : S ∈ F\n⊢ Sᶜ ∈ F\ncase mpr.inr\nX : Compactum\nS : Set X.A\nF : Ultrafilter X.A\nh2 : str X F ∈ Sᶜ\nh1 : S ∈ F → str X F ∈ S\nh : Sᶜ ∈ F\n⊢ Sᶜ ∈ F\n[PROOFSTEP]\nexacts [absurd (h1 h) h2, h]\n[GOAL]\nX : Compactum\n⊢ CompactSpace X.A\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase isCompact_univ\nX : Compactum\n⊢ IsCompact Set.univ\n[PROOFSTEP]\nrw [isCompact_iff_ultrafilter_le_nhds]\n[GOAL]\ncase isCompact_univ\nX : Compactum\n⊢ ∀ (f : Ultrafilter X.A), ↑f ≤ 𝓟 Set.univ → ∃ a, a ∈ Set.univ ∧ ↑f ≤ 𝓝 a\n[PROOFSTEP]\nintro F _\n[GOAL]\ncase isCompact_univ\nX : Compactum\nF : Ultrafilter X.A\na✝ : ↑F ≤ 𝓟 Set.univ\n⊢ ∃ a, a ∈ Set.univ ∧ ↑F ≤ 𝓝 a\n[PROOFSTEP]\nrefine' ⟨X.str F, by tauto, _⟩\n[GOAL]\nX : Compactum\nF : Ultrafilter X.A\na✝ : ↑F ≤ 𝓟 Set.univ\n⊢ str X F ∈ Set.univ\n[PROOFSTEP]\ntauto\n[GOAL]\ncase isCompact_univ\nX : Compactum\nF : Ultrafilter X.A\na✝ : ↑F ≤ 𝓟 Set.univ\n⊢ ↑F ≤ 𝓝 (str X F)\n[PROOFSTEP]\nrw [le_nhds_iff]\n[GOAL]\ncase isCompact_univ\nX : Compactum\nF : Ultrafilter X.A\na✝ : ↑F ≤ 𝓟 Set.univ\n⊢ ∀ (s : Set X.A), str X F ∈ s → IsOpen s → s ∈ ↑F\n[PROOFSTEP]\nintro S h1 h2\n[GOAL]\ncase isCompact_univ\nX : Compactum\nF : Ultrafilter X.A\na✝ : ↑F ≤ 𝓟 Set.univ\nS : Set X.A\nh1 : str X F ∈ S\nh2 : IsOpen S\n⊢ S ∈ ↑F\n[PROOFSTEP]\nexact h2 F h1\n[GOAL]\nX : Compactum\nA B : Set X.A\n⊢ Compactum.basic (A ∩ B) = Compactum.basic A ∩ Compactum.basic B\n[PROOFSTEP]\next G\n[GOAL]\ncase h\nX : Compactum\nA B : Set X.A\nG : Ultrafilter X.A\n⊢ G ∈ Compactum.basic (A ∩ B) ↔ G ∈ Compactum.basic A ∩ Compactum.basic B\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nX : Compactum\nA B : Set X.A\nG : Ultrafilter X.A\n⊢ G ∈ Compactum.basic (A ∩ B) → G ∈ Compactum.basic A ∩ Compactum.basic B\n[PROOFSTEP]\nintro hG\n[GOAL]\ncase h.mp\nX : Compactum\nA B : Set X.A\nG : Ultrafilter X.A\nhG : G ∈ Compactum.basic (A ∩ B)\n⊢ G ∈ Compactum.basic A ∩ Compactum.basic B\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp.left\nX : Compactum\nA B : Set X.A\nG : Ultrafilter X.A\nhG : G ∈ Compactum.basic (A ∩ B)\n⊢ G ∈ Compactum.basic A\n[PROOFSTEP]\nfilter_upwards [hG] with _\n[GOAL]\ncase h.mp.right\nX : Compactum\nA B : Set X.A\nG : Ultrafilter X.A\nhG : G ∈ Compactum.basic (A ∩ B)\n⊢ G ∈ Compactum.basic B\n[PROOFSTEP]\nfilter_upwards [hG] with _\n[GOAL]\ncase h\nX : Compactum\nA B : Set X.A\nG : Ultrafilter X.A\nhG : G ∈ Compactum.basic (A ∩ B)\na✝ : X.A\n⊢ a✝ ∈ A ∩ B → a✝ ∈ A\ncase h X : Compactum A B : Set X.A G : Ultrafilter X.A hG : G ∈ Compactum.basic (A ∩ B) a✝ : X.A ⊢ a✝ ∈ A ∩ B → a✝ ∈ B\n[PROOFSTEP]\nexacts [And.left, And.right]\n[GOAL]\ncase h.mpr\nX : Compactum\nA B : Set X.A\nG : Ultrafilter X.A\n⊢ G ∈ Compactum.basic A ∩ Compactum.basic B → G ∈ Compactum.basic (A ∩ B)\n[PROOFSTEP]\nrintro ⟨h1, h2⟩\n[GOAL]\ncase h.mpr.intro\nX : Compactum\nA B : Set X.A\nG : Ultrafilter X.A\nh1 : G ∈ Compactum.basic A\nh2 : G ∈ Compactum.basic B\n⊢ G ∈ Compactum.basic (A ∩ B)\n[PROOFSTEP]\nexact inter_mem h1 h2\n[GOAL]\nX : Compactum\nA : Set X.A\na : X.A\nha : a ∈ A\n⊢ str X (incl X a) = a\n[PROOFSTEP]\nsimp\n[GOAL]\nX : Compactum\nA : Set X.A\n⊢ Compactum.cl (Compactum.cl A) ⊆ Compactum.cl A\n[PROOFSTEP]\nrintro _\n ⟨F, hF, rfl⟩\n -- Notation to be used in this proof.\n[GOAL]\ncase intro.intro\nX : Compactum\nA : Set X.A\nF : Ultrafilter X.A\nhF : F ∈ Compactum.basic (Compactum.cl A)\n⊢ str X F ∈ Compactum.cl A\n[PROOFSTEP]\nlet fsu := Finset (Set (Ultrafilter X))\n[GOAL]\ncase intro.intro\nX : Compactum\nA : Set X.A\nF : Ultrafilter X.A\nhF : F ∈ Compactum.basic (Compactum.cl A)\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\n⊢ str X F ∈ Compactum.cl A\n[PROOFSTEP]\nlet ssu := Set (Set (Ultrafilter X))\n[GOAL]\ncase intro.intro\nX : Compactum\nA : Set X.A\nF : Ultrafilter X.A\nhF : F ∈ Compactum.basic (Compactum.cl A)\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\n⊢ str X F ∈ Compactum.cl A\n[PROOFSTEP]\nlet ι : fsu → ssu := fun x ↦ ↑x\n[GOAL]\ncase intro.intro\nX : Compactum\nA : Set X.A\nF : Ultrafilter X.A\nhF : F ∈ Compactum.basic (Compactum.cl A)\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\n⊢ str X F ∈ Compactum.cl A\n[PROOFSTEP]\nlet C0 : ssu := {Z | ∃ B ∈ F, X.str ⁻¹' B = Z}\n[GOAL]\ncase intro.intro\nX : Compactum\nA : Set X.A\nF : Ultrafilter X.A\nhF : F ∈ Compactum.basic (Compactum.cl A)\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nC0 : ssu := {Z | ∃ B, B ∈ F ∧ str X ⁻¹' B = Z}\n⊢ str X F ∈ Compactum.cl A\n[PROOFSTEP]\nlet AA := {G : Ultrafilter X | A ∈ G}\n[GOAL]\ncase intro.intro\nX : Compactum\nA : Set X.A\nF : Ultrafilter X.A\nhF : F ∈ Compactum.basic (Compactum.cl A)\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nC0 : ssu := {Z | ∃ B, B ∈ F ∧ str X ⁻¹' B = Z}\nAA : Set (Ultrafilter X.A) := {G | A ∈ G}\n⊢ str X F ∈ Compactum.cl A\n[PROOFSTEP]\nlet C1 := insert AA C0\n[GOAL]\ncase intro.intro\nX : Compactum\nA : Set X.A\nF : Ultrafilter X.A\nhF : F ∈ Compactum.basic (Compactum.cl A)\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nC0 : ssu := {Z | ∃ B, B ∈ F ∧ str X ⁻¹' B = Z}\nAA : Set (Ultrafilter X.A) := {G | A ∈ G}\nC1 : ssu := insert AA C0\n⊢ str X F ∈ Compactum.cl A\n[PROOFSTEP]\nlet C2 := finiteInterClosure C1\n[GOAL]\ncase intro.intro\nX : Compactum\nA : Set X.A\nF : Ultrafilter X.A\nhF : F ∈ Compactum.basic (Compactum.cl A)\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nC0 : ssu := {Z | ∃ B, B ∈ F ∧ str X ⁻¹' B = Z}\nAA : Set (Ultrafilter X.A) := {G | A ∈ G}\nC1 : ssu := insert AA C0\nC2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure C1\n⊢ str X F ∈ Compactum.cl A\n[PROOFSTEP]\nhave claim1 : ∀ (B) (_ : B ∈ C0) (C) (_ : C ∈ C0), B ∩ C ∈ C0 :=\n by\n rintro B ⟨Q, hQ, rfl⟩ C ⟨R, hR, rfl⟩\n use Q ∩ R\n simp only [and_true_iff, eq_self_iff_true, Set.preimage_inter]\n exact inter_sets _ hQ hR\n[GOAL]\nX : Compactum\nA : Set X.A\nF : Ultrafilter X.A\nhF : F ∈ Compactum.basic (Compactum.cl A)\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nC0 : ssu := {Z | ∃ B, B ∈ F ∧ str X ⁻¹' B = Z}\nAA : Set (Ultrafilter X.A) := {G | A ∈ G}\nC1 : ssu := insert AA C0\nC2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure C1\n⊢ ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → ∀ (C : Set (Ultrafilter X.A)), C ∈ C0 → B ∩ C ∈ C0\n[PROOFSTEP]\nrintro B ⟨Q, hQ, rfl⟩ C ⟨R, hR, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro\nX : Compactum\nA : Set X.A\nF : Ultrafilter X.A\nhF : F ∈ Compactum.basic (Compactum.cl A)\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nC0 : ssu := {Z | ∃ B, B ∈ F ∧ str X ⁻¹' B = Z}\nAA : Set (Ultrafilter X.A) := {G | A ∈ G}\nC1 : ssu := insert AA C0\nC2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure C1\nQ : Set X.A\nhQ : Q ∈ F\nR : Set X.A\nhR : R ∈ F\n⊢ str X ⁻¹' Q ∩ str X ⁻¹' R ∈ C0\n[PROOFSTEP]\nuse Q ∩ R\n[GOAL]\ncase h\nX : Compactum\nA : Set X.A\nF : Ultrafilter X.A\nhF : F ∈ Compactum.basic (Compactum.cl A)\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nC0 : ssu := {Z | ∃ B, B ∈ F ∧ str X ⁻¹' B = Z}\nAA : Set (Ultrafilter X.A) := {G | A ∈ G}\nC1 : ssu := insert AA C0\nC2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure C1\nQ : Set X.A\nhQ : Q ∈ F\nR : Set X.A\nhR : R ∈ F\n⊢ Q ∩ R ∈ F ∧ str X ⁻¹' (Q ∩ R) = str X ⁻¹' Q ∩ str X ⁻¹' R\n[PROOFSTEP]\nsimp only [and_true_iff, eq_self_iff_true, Set.preimage_inter]\n[GOAL]\ncase h\nX : Compactum\nA : Set X.A\nF : Ultrafilter X.A\nhF : F ∈ Compactum.basic (Compactum.cl A)\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nC0 : ssu := {Z | ∃ B, B ∈ F ∧ str X ⁻¹' B = Z}\nAA : Set (Ultrafilter X.A) := {G | A ∈ G}\nC1 : ssu := insert AA C0\nC2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure C1\nQ : Set X.A\nhQ : Q ∈ F\nR : Set X.A\nhR : R ∈ F\n⊢ Q ∩ R ∈ F\n[PROOFSTEP]\nexact inter_sets _ hQ hR\n[GOAL]\ncase intro.intro\nX : Compactum\nA : Set X.A\nF : Ultrafilter X.A\nhF : F ∈ Compactum.basic (Compactum.cl A)\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nC0 : ssu := {Z | ∃ B, B ∈ F ∧ str X ⁻¹' B = Z}\nAA : Set (Ultrafilter X.A) := {G | A ∈ G}\nC1 : ssu := insert AA C0\nC2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure C1\nclaim1 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → ∀ (C : Set (Ultrafilter X.A)), C ∈ C0 → B ∩ C ∈ C0\n⊢ str X F ∈ Compactum.cl A\n[PROOFSTEP]\nhave claim2 : ∀ B ∈ C0, Set.Nonempty B := by\n rintro B ⟨Q, hQ, rfl⟩\n obtain ⟨q⟩ := Filter.nonempty_of_mem hQ\n use X.incl q\n simpa\n -- The intersection of AA with every set in C0 is nonempty.\n[GOAL]\nX : Compactum\nA : Set X.A\nF : Ultrafilter X.A\nhF : F ∈ Compactum.basic (Compactum.cl A)\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nC0 : ssu := {Z | ∃ B, B ∈ F ∧ str X ⁻¹' B = Z}\nAA : Set (Ultrafilter X.A) := {G | A ∈ G}\nC1 : ssu := insert AA C0\nC2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure C1\nclaim1 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → ∀ (C : Set (Ultrafilter X.A)), C ∈ C0 → B ∩ C ∈ C0\n⊢ ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty B\n[PROOFSTEP]\nrintro B ⟨Q, hQ, rfl⟩\n[GOAL]\ncase intro.intro\nX : Compactum\nA : Set X.A\nF : Ultrafilter X.A\nhF : F ∈ Compactum.basic (Compactum.cl A)\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nC0 : ssu := {Z | ∃ B, B ∈ F ∧ str X ⁻¹' B = Z}\nAA : Set (Ultrafilter X.A) := {G | A ∈ G}\nC1 : ssu := insert AA C0\nC2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure C1\nclaim1 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → ∀ (C : Set (Ultrafilter X.A)), C ∈ C0 → B ∩ C ∈ C0\nQ : Set X.A\nhQ : Q ∈ F\n⊢ Set.Nonempty (str X ⁻¹' Q)\n[PROOFSTEP]\nobtain ⟨q⟩ := Filter.nonempty_of_mem hQ\n[GOAL]\ncase intro.intro.intro\nX : Compactum\nA : Set X.A\nF : Ultrafilter X.A\nhF : F ∈ Compactum.basic (Compactum.cl A)\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nC0 : ssu := {Z | ∃ B, B ∈ F ∧ str X ⁻¹' B = Z}\nAA : Set (Ultrafilter X.A) := {G | A ∈ G}\nC1 : ssu := insert AA C0\nC2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure C1\nclaim1 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → ∀ (C : Set (Ultrafilter X.A)), C ∈ C0 → B ∩ C ∈ C0\nQ : Set X.A\nhQ : Q ∈ F\nq : X.A\nh✝ : q ∈ Q\n⊢ Set.Nonempty (str X ⁻¹' Q)\n[PROOFSTEP]\nuse X.incl q\n[GOAL]\ncase h\nX : Compactum\nA : Set X.A\nF : Ultrafilter X.A\nhF : F ∈ Compactum.basic (Compactum.cl A)\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nC0 : ssu := {Z | ∃ B, B ∈ F ∧ str X ⁻¹' B = Z}\nAA : Set (Ultrafilter X.A) := {G | A ∈ G}\nC1 : ssu := insert AA C0\nC2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure C1\nclaim1 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → ∀ (C : Set (Ultrafilter X.A)), C ∈ C0 → B ∩ C ∈ C0\nQ : Set X.A\nhQ : Q ∈ F\nq : X.A\nh✝ : q ∈ Q\n⊢ incl X q ∈ str X ⁻¹' Q\n[PROOFSTEP]\nsimpa\n -- The intersection of AA with every set in C0 is nonempty.\n[GOAL]\ncase intro.intro\nX : Compactum\nA : Set X.A\nF : Ultrafilter X.A\nhF : F ∈ Compactum.basic (Compactum.cl A)\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nC0 : ssu := {Z | ∃ B, B ∈ F ∧ str X ⁻¹' B = Z}\nAA : Set (Ultrafilter X.A) := {G | A ∈ G}\nC1 : ssu := insert AA C0\nC2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure C1\nclaim1 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → ∀ (C : Set (Ultrafilter X.A)), C ∈ C0 → B ∩ C ∈ C0\nclaim2 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty B\n⊢ str X F ∈ Compactum.cl A\n[PROOFSTEP]\nhave claim3 : ∀ B ∈ C0, (AA ∩ B).Nonempty := by\n rintro B ⟨Q, hQ, rfl⟩\n have : (Q ∩ cl A).Nonempty := Filter.nonempty_of_mem (inter_mem hQ hF)\n rcases this with ⟨q, hq1, P, hq2, hq3⟩\n refine' ⟨P, hq2, _⟩\n rw [← hq3] at hq1 \n simpa\n -- Suffices to show that the intersection of any finite subcollection of C1 is nonempty.\n[GOAL]\nX : Compactum\nA : Set X.A\nF : Ultrafilter X.A\nhF : F ∈ Compactum.basic (Compactum.cl A)\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nC0 : ssu := {Z | ∃ B, B ∈ F ∧ str X ⁻¹' B = Z}\nAA : Set (Ultrafilter X.A) := {G | A ∈ G}\nC1 : ssu := insert AA C0\nC2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure C1\nclaim1 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → ∀ (C : Set (Ultrafilter X.A)), C ∈ C0 → B ∩ C ∈ C0\nclaim2 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty B\n⊢ ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty (AA ∩ B)\n[PROOFSTEP]\nrintro B ⟨Q, hQ, rfl⟩\n[GOAL]\ncase intro.intro\nX : Compactum\nA : Set X.A\nF : Ultrafilter X.A\nhF : F ∈ Compactum.basic (Compactum.cl A)\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nC0 : ssu := {Z | ∃ B, B ∈ F ∧ str X ⁻¹' B = Z}\nAA : Set (Ultrafilter X.A) := {G | A ∈ G}\nC1 : ssu := insert AA C0\nC2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure C1\nclaim1 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → ∀ (C : Set (Ultrafilter X.A)), C ∈ C0 → B ∩ C ∈ C0\nclaim2 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty B\nQ : Set X.A\nhQ : Q ∈ F\n⊢ Set.Nonempty (AA ∩ str X ⁻¹' Q)\n[PROOFSTEP]\nhave : (Q ∩ cl A).Nonempty := Filter.nonempty_of_mem (inter_mem hQ hF)\n[GOAL]\ncase intro.intro\nX : Compactum\nA : Set X.A\nF : Ultrafilter X.A\nhF : F ∈ Compactum.basic (Compactum.cl A)\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nC0 : ssu := {Z | ∃ B, B ∈ F ∧ str X ⁻¹' B = Z}\nAA : Set (Ultrafilter X.A) := {G | A ∈ G}\nC1 : ssu := insert AA C0\nC2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure C1\nclaim1 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → ∀ (C : Set (Ultrafilter X.A)), C ∈ C0 → B ∩ C ∈ C0\nclaim2 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty B\nQ : Set X.A\nhQ : Q ∈ F\nthis : Set.Nonempty (Q ∩ Compactum.cl A)\n⊢ Set.Nonempty (AA ∩ str X ⁻¹' Q)\n[PROOFSTEP]\nrcases this with ⟨q, hq1, P, hq2, hq3⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nX : Compactum\nA : Set X.A\nF : Ultrafilter X.A\nhF : F ∈ Compactum.basic (Compactum.cl A)\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nC0 : ssu := {Z | ∃ B, B ∈ F ∧ str X ⁻¹' B = Z}\nAA : Set (Ultrafilter X.A) := {G | A ∈ G}\nC1 : ssu := insert AA C0\nC2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure C1\nclaim1 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → ∀ (C : Set (Ultrafilter X.A)), C ∈ C0 → B ∩ C ∈ C0\nclaim2 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty B\nQ : Set X.A\nhQ : Q ∈ F\nq : X.A\nhq1 : q ∈ Q\nP : Ultrafilter X.A\nhq2 : P ∈ Compactum.basic A\nhq3 : str X P = q\n⊢ Set.Nonempty (AA ∩ str X ⁻¹' Q)\n[PROOFSTEP]\nrefine' ⟨P, hq2, _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nX : Compactum\nA : Set X.A\nF : Ultrafilter X.A\nhF : F ∈ Compactum.basic (Compactum.cl A)\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nC0 : ssu := {Z | ∃ B, B ∈ F ∧ str X ⁻¹' B = Z}\nAA : Set (Ultrafilter X.A) := {G | A ∈ G}\nC1 : ssu := insert AA C0\nC2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure C1\nclaim1 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → ∀ (C : Set (Ultrafilter X.A)), C ∈ C0 → B ∩ C ∈ C0\nclaim2 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty B\nQ : Set X.A\nhQ : Q ∈ F\nq : X.A\nhq1 : q ∈ Q\nP : Ultrafilter X.A\nhq2 : P ∈ Compactum.basic A\nhq3 : str X P = q\n⊢ P ∈ str X ⁻¹' Q\n[PROOFSTEP]\nrw [← hq3] at hq1 \n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nX : Compactum\nA : Set X.A\nF : Ultrafilter X.A\nhF : F ∈ Compactum.basic (Compactum.cl A)\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nC0 : ssu := {Z | ∃ B, B ∈ F ∧ str X ⁻¹' B = Z}\nAA : Set (Ultrafilter X.A) := {G | A ∈ G}\nC1 : ssu := insert AA C0\nC2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure C1\nclaim1 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → ∀ (C : Set (Ultrafilter X.A)), C ∈ C0 → B ∩ C ∈ C0\nclaim2 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty B\nQ : Set X.A\nhQ : Q ∈ F\nq : X.A\nP : Ultrafilter X.A\nhq1 : str X P ∈ Q\nhq2 : P ∈ Compactum.basic A\nhq3 : str X P = q\n⊢ P ∈ str X ⁻¹' Q\n[PROOFSTEP]\nsimpa\n -- Suffices to show that the intersection of any finite subcollection of C1 is nonempty.\n[GOAL]\ncase intro.intro\nX : Compactum\nA : Set X.A\nF : Ultrafilter X.A\nhF : F ∈ Compactum.basic (Compactum.cl A)\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nC0 : ssu := {Z | ∃ B, B ∈ F ∧ str X ⁻¹' B = Z}\nAA : Set (Ultrafilter X.A) := {G | A ∈ G}\nC1 : ssu := insert AA C0\nC2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure C1\nclaim1 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → ∀ (C : Set (Ultrafilter X.A)), C ∈ C0 → B ∩ C ∈ C0\nclaim2 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty B\nclaim3 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty (AA ∩ B)\n⊢ str X F ∈ Compactum.cl A\n[PROOFSTEP]\nsuffices ∀ T : fsu, ι T ⊆ C1 → (⋂₀ ι T).Nonempty\n by\n obtain ⟨G, h1⟩ := exists_ultrafilter_of_finite_inter_nonempty _ this\n use X.join G\n have : G.map X.str = F := Ultrafilter.coe_le_coe.1 fun S hS => h1 (Or.inr ⟨S, hS, rfl⟩)\n rw [join_distrib, this]\n exact\n ⟨h1 (Or.inl rfl), rfl⟩\n -- C2 is closed under finite intersections (by construction!).\n[GOAL]\nX : Compactum\nA : Set X.A\nF : Ultrafilter X.A\nhF : F ∈ Compactum.basic (Compactum.cl A)\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nC0 : ssu := {Z | ∃ B, B ∈ F ∧ str X ⁻¹' B = Z}\nAA : Set (Ultrafilter X.A) := {G | A ∈ G}\nC1 : ssu := insert AA C0\nC2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure C1\nclaim1 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → ∀ (C : Set (Ultrafilter X.A)), C ∈ C0 → B ∩ C ∈ C0\nclaim2 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty B\nclaim3 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty (AA ∩ B)\nthis : ∀ (T : fsu), ι T ⊆ C1 → Set.Nonempty (⋂₀ ι T)\n⊢ str X F ∈ Compactum.cl A\n[PROOFSTEP]\nobtain ⟨G, h1⟩ := exists_ultrafilter_of_finite_inter_nonempty _ this\n[GOAL]\ncase intro\nX : Compactum\nA : Set X.A\nF : Ultrafilter X.A\nhF : F ∈ Compactum.basic (Compactum.cl A)\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nC0 : ssu := {Z | ∃ B, B ∈ F ∧ str X ⁻¹' B = Z}\nAA : Set (Ultrafilter X.A) := {G | A ∈ G}\nC1 : ssu := insert AA C0\nC2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure C1\nclaim1 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → ∀ (C : Set (Ultrafilter X.A)), C ∈ C0 → B ∩ C ∈ C0\nclaim2 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty B\nclaim3 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty (AA ∩ B)\nthis : ∀ (T : fsu), ι T ⊆ C1 → Set.Nonempty (⋂₀ ι T)\nG : Ultrafilter (Ultrafilter X.A)\nh1 : C1 ⊆ G.sets\n⊢ str X F ∈ Compactum.cl A\n[PROOFSTEP]\nuse X.join G\n[GOAL]\ncase h\nX : Compactum\nA : Set X.A\nF : Ultrafilter X.A\nhF : F ∈ Compactum.basic (Compactum.cl A)\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nC0 : ssu := {Z | ∃ B, B ∈ F ∧ str X ⁻¹' B = Z}\nAA : Set (Ultrafilter X.A) := {G | A ∈ G}\nC1 : ssu := insert AA C0\nC2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure C1\nclaim1 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → ∀ (C : Set (Ultrafilter X.A)), C ∈ C0 → B ∩ C ∈ C0\nclaim2 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty B\nclaim3 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty (AA ∩ B)\nthis : ∀ (T : fsu), ι T ⊆ C1 → Set.Nonempty (⋂₀ ι T)\nG : Ultrafilter (Ultrafilter X.A)\nh1 : C1 ⊆ G.sets\n⊢ join X G ∈ Compactum.basic A ∧ str X (join X G) = str X F\n[PROOFSTEP]\nhave : G.map X.str = F := Ultrafilter.coe_le_coe.1 fun S hS => h1 (Or.inr ⟨S, hS, rfl⟩)\n[GOAL]\ncase h\nX : Compactum\nA : Set X.A\nF : Ultrafilter X.A\nhF : F ∈ Compactum.basic (Compactum.cl A)\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nC0 : ssu := {Z | ∃ B, B ∈ F ∧ str X ⁻¹' B = Z}\nAA : Set (Ultrafilter X.A) := {G | A ∈ G}\nC1 : ssu := insert AA C0\nC2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure C1\nclaim1 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → ∀ (C : Set (Ultrafilter X.A)), C ∈ C0 → B ∩ C ∈ C0\nclaim2 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty B\nclaim3 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty (AA ∩ B)\nthis✝ : ∀ (T : fsu), ι T ⊆ C1 → Set.Nonempty (⋂₀ ι T)\nG : Ultrafilter (Ultrafilter X.A)\nh1 : C1 ⊆ G.sets\nthis : Ultrafilter.map (str X) G = F\n⊢ join X G ∈ Compactum.basic A ∧ str X (join X G) = str X F\n[PROOFSTEP]\nrw [join_distrib, this]\n[GOAL]\ncase h\nX : Compactum\nA : Set X.A\nF : Ultrafilter X.A\nhF : F ∈ Compactum.basic (Compactum.cl A)\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nC0 : ssu := {Z | ∃ B, B ∈ F ∧ str X ⁻¹' B = Z}\nAA : Set (Ultrafilter X.A) := {G | A ∈ G}\nC1 : ssu := insert AA C0\nC2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure C1\nclaim1 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → ∀ (C : Set (Ultrafilter X.A)), C ∈ C0 → B ∩ C ∈ C0\nclaim2 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty B\nclaim3 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty (AA ∩ B)\nthis✝ : ∀ (T : fsu), ι T ⊆ C1 → Set.Nonempty (⋂₀ ι T)\nG : Ultrafilter (Ultrafilter X.A)\nh1 : C1 ⊆ G.sets\nthis : Ultrafilter.map (str X) G = F\n⊢ join X G ∈ Compactum.basic A ∧ str X F = str X F\n[PROOFSTEP]\nexact\n ⟨h1 (Or.inl rfl), rfl⟩\n -- C2 is closed under finite intersections (by construction!).\n[GOAL]\ncase intro.intro\nX : Compactum\nA : Set X.A\nF : Ultrafilter X.A\nhF : F ∈ Compactum.basic (Compactum.cl A)\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nC0 : ssu := {Z | ∃ B, B ∈ F ∧ str X ⁻¹' B = Z}\nAA : Set (Ultrafilter X.A) := {G | A ∈ G}\nC1 : ssu := insert AA C0\nC2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure C1\nclaim1 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → ∀ (C : Set (Ultrafilter X.A)), C ∈ C0 → B ∩ C ∈ C0\nclaim2 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty B\nclaim3 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty (AA ∩ B)\n⊢ ∀ (T : fsu), ι T ⊆ C1 → Set.Nonempty (⋂₀ ι T)\n[PROOFSTEP]\nhave claim4 := finiteInterClosure_finiteInter C1\n[GOAL]\ncase intro.intro\nX : Compactum\nA : Set X.A\nF : Ultrafilter X.A\nhF : F ∈ Compactum.basic (Compactum.cl A)\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nC0 : ssu := {Z | ∃ B, B ∈ F ∧ str X ⁻¹' B = Z}\nAA : Set (Ultrafilter X.A) := {G | A ∈ G}\nC1 : ssu := insert AA C0\nC2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure C1\nclaim1 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → ∀ (C : Set (Ultrafilter X.A)), C ∈ C0 → B ∩ C ∈ C0\nclaim2 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty B\nclaim3 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty (AA ∩ B)\nclaim4 : FiniteInter (finiteInterClosure C1)\n⊢ ∀ (T : fsu), ι T ⊆ C1 → Set.Nonempty (⋂₀ ι T)\n[PROOFSTEP]\nhave claim5 : FiniteInter C0 :=\n ⟨⟨_, univ_mem, Set.preimage_univ⟩, claim1⟩\n -- Every element of C2 is nonempty.\n[GOAL]\ncase intro.intro\nX : Compactum\nA : Set X.A\nF : Ultrafilter X.A\nhF : F ∈ Compactum.basic (Compactum.cl A)\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nC0 : ssu := {Z | ∃ B, B ∈ F ∧ str X ⁻¹' B = Z}\nAA : Set (Ultrafilter X.A) := {G | A ∈ G}\nC1 : ssu := insert AA C0\nC2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure C1\nclaim1 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → ∀ (C : Set (Ultrafilter X.A)), C ∈ C0 → B ∩ C ∈ C0\nclaim2 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty B\nclaim3 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty (AA ∩ B)\nclaim4 : FiniteInter (finiteInterClosure C1)\nclaim5 : FiniteInter C0\n⊢ ∀ (T : fsu), ι T ⊆ C1 → Set.Nonempty (⋂₀ ι T)\n[PROOFSTEP]\nhave claim6 : ∀ P ∈ C2, (P : Set (Ultrafilter X)).Nonempty :=\n by\n suffices ∀ P ∈ C2, P ∈ C0 ∨ ∃ Q ∈ C0, P = AA ∩ Q by\n intro P hP\n cases' this P hP with h h\n · exact claim2 _ h\n · rcases h with ⟨Q, hQ, rfl⟩\n exact claim3 _ hQ\n intro P hP\n exact claim5.finiteInterClosure_insert _ hP\n[GOAL]\nX : Compactum\nA : Set X.A\nF : Ultrafilter X.A\nhF : F ∈ Compactum.basic (Compactum.cl A)\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nC0 : ssu := {Z | ∃ B, B ∈ F ∧ str X ⁻¹' B = Z}\nAA : Set (Ultrafilter X.A) := {G | A ∈ G}\nC1 : ssu := insert AA C0\nC2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure C1\nclaim1 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → ∀ (C : Set (Ultrafilter X.A)), C ∈ C0 → B ∩ C ∈ C0\nclaim2 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty B\nclaim3 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty (AA ∩ B)\nclaim4 : FiniteInter (finiteInterClosure C1)\nclaim5 : FiniteInter C0\n⊢ ∀ (P : Set (Ultrafilter X.A)), P ∈ C2 → Set.Nonempty P\n[PROOFSTEP]\nsuffices ∀ P ∈ C2, P ∈ C0 ∨ ∃ Q ∈ C0, P = AA ∩ Q by\n intro P hP\n cases' this P hP with h h\n · exact claim2 _ h\n · rcases h with ⟨Q, hQ, rfl⟩\n exact claim3 _ hQ\n[GOAL]\nX : Compactum\nA : Set X.A\nF : Ultrafilter X.A\nhF : F ∈ Compactum.basic (Compactum.cl A)\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nC0 : ssu := {Z | ∃ B, B ∈ F ∧ str X ⁻¹' B = Z}\nAA : Set (Ultrafilter X.A) := {G | A ∈ G}\nC1 : ssu := insert AA C0\nC2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure C1\nclaim1 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → ∀ (C : Set (Ultrafilter X.A)), C ∈ C0 → B ∩ C ∈ C0\nclaim2 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty B\nclaim3 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty (AA ∩ B)\nclaim4 : FiniteInter (finiteInterClosure C1)\nclaim5 : FiniteInter C0\nthis : ∀ (P : Set (Ultrafilter X.A)), P ∈ C2 → P ∈ C0 ∨ ∃ Q, Q ∈ C0 ∧ P = AA ∩ Q\n⊢ ∀ (P : Set (Ultrafilter X.A)), P ∈ C2 → Set.Nonempty P\n[PROOFSTEP]\nintro P hP\n[GOAL]\nX : Compactum\nA : Set X.A\nF : Ultrafilter X.A\nhF : F ∈ Compactum.basic (Compactum.cl A)\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nC0 : ssu := {Z | ∃ B, B ∈ F ∧ str X ⁻¹' B = Z}\nAA : Set (Ultrafilter X.A) := {G | A ∈ G}\nC1 : ssu := insert AA C0\nC2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure C1\nclaim1 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → ∀ (C : Set (Ultrafilter X.A)), C ∈ C0 → B ∩ C ∈ C0\nclaim2 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty B\nclaim3 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty (AA ∩ B)\nclaim4 : FiniteInter (finiteInterClosure C1)\nclaim5 : FiniteInter C0\nthis : ∀ (P : Set (Ultrafilter X.A)), P ∈ C2 → P ∈ C0 ∨ ∃ Q, Q ∈ C0 ∧ P = AA ∩ Q\nP : Set (Ultrafilter X.A)\nhP : P ∈ C2\n⊢ Set.Nonempty P\n[PROOFSTEP]\ncases' this P hP with h h\n[GOAL]\ncase inl\nX : Compactum\nA : Set X.A\nF : Ultrafilter X.A\nhF : F ∈ Compactum.basic (Compactum.cl A)\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nC0 : ssu := {Z | ∃ B, B ∈ F ∧ str X ⁻¹' B = Z}\nAA : Set (Ultrafilter X.A) := {G | A ∈ G}\nC1 : ssu := insert AA C0\nC2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure C1\nclaim1 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → ∀ (C : Set (Ultrafilter X.A)), C ∈ C0 → B ∩ C ∈ C0\nclaim2 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty B\nclaim3 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty (AA ∩ B)\nclaim4 : FiniteInter (finiteInterClosure C1)\nclaim5 : FiniteInter C0\nthis : ∀ (P : Set (Ultrafilter X.A)), P ∈ C2 → P ∈ C0 ∨ ∃ Q, Q ∈ C0 ∧ P = AA ∩ Q\nP : Set (Ultrafilter X.A)\nhP : P ∈ C2\nh : P ∈ C0\n⊢ Set.Nonempty P\n[PROOFSTEP]\nexact claim2 _ h\n[GOAL]\ncase inr\nX : Compactum\nA : Set X.A\nF : Ultrafilter X.A\nhF : F ∈ Compactum.basic (Compactum.cl A)\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nC0 : ssu := {Z | ∃ B, B ∈ F ∧ str X ⁻¹' B = Z}\nAA : Set (Ultrafilter X.A) := {G | A ∈ G}\nC1 : ssu := insert AA C0\nC2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure C1\nclaim1 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → ∀ (C : Set (Ultrafilter X.A)), C ∈ C0 → B ∩ C ∈ C0\nclaim2 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty B\nclaim3 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty (AA ∩ B)\nclaim4 : FiniteInter (finiteInterClosure C1)\nclaim5 : FiniteInter C0\nthis : ∀ (P : Set (Ultrafilter X.A)), P ∈ C2 → P ∈ C0 ∨ ∃ Q, Q ∈ C0 ∧ P = AA ∩ Q\nP : Set (Ultrafilter X.A)\nhP : P ∈ C2\nh : ∃ Q, Q ∈ C0 ∧ P = AA ∩ Q\n⊢ Set.Nonempty P\n[PROOFSTEP]\nrcases h with ⟨Q, hQ, rfl⟩\n[GOAL]\ncase inr.intro.intro\nX : Compactum\nA : Set X.A\nF : Ultrafilter X.A\nhF : F ∈ Compactum.basic (Compactum.cl A)\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nC0 : ssu := {Z | ∃ B, B ∈ F ∧ str X ⁻¹' B = Z}\nAA : Set (Ultrafilter X.A) := {G | A ∈ G}\nC1 : ssu := insert AA C0\nC2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure C1\nclaim1 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → ∀ (C : Set (Ultrafilter X.A)), C ∈ C0 → B ∩ C ∈ C0\nclaim2 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty B\nclaim3 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty (AA ∩ B)\nclaim4 : FiniteInter (finiteInterClosure C1)\nclaim5 : FiniteInter C0\nthis : ∀ (P : Set (Ultrafilter X.A)), P ∈ C2 → P ∈ C0 ∨ ∃ Q, Q ∈ C0 ∧ P = AA ∩ Q\nQ : Set (Ultrafilter X.A)\nhQ : Q ∈ C0\nhP : AA ∩ Q ∈ C2\n⊢ Set.Nonempty (AA ∩ Q)\n[PROOFSTEP]\nexact claim3 _ hQ\n[GOAL]\nX : Compactum\nA : Set X.A\nF : Ultrafilter X.A\nhF : F ∈ Compactum.basic (Compactum.cl A)\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nC0 : ssu := {Z | ∃ B, B ∈ F ∧ str X ⁻¹' B = Z}\nAA : Set (Ultrafilter X.A) := {G | A ∈ G}\nC1 : ssu := insert AA C0\nC2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure C1\nclaim1 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → ∀ (C : Set (Ultrafilter X.A)), C ∈ C0 → B ∩ C ∈ C0\nclaim2 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty B\nclaim3 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty (AA ∩ B)\nclaim4 : FiniteInter (finiteInterClosure C1)\nclaim5 : FiniteInter C0\n⊢ ∀ (P : Set (Ultrafilter X.A)), P ∈ C2 → P ∈ C0 ∨ ∃ Q, Q ∈ C0 ∧ P = AA ∩ Q\n[PROOFSTEP]\nintro P hP\n[GOAL]\nX : Compactum\nA : Set X.A\nF : Ultrafilter X.A\nhF : F ∈ Compactum.basic (Compactum.cl A)\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nC0 : ssu := {Z | ∃ B, B ∈ F ∧ str X ⁻¹' B = Z}\nAA : Set (Ultrafilter X.A) := {G | A ∈ G}\nC1 : ssu := insert AA C0\nC2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure C1\nclaim1 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → ∀ (C : Set (Ultrafilter X.A)), C ∈ C0 → B ∩ C ∈ C0\nclaim2 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty B\nclaim3 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty (AA ∩ B)\nclaim4 : FiniteInter (finiteInterClosure C1)\nclaim5 : FiniteInter C0\nP : Set (Ultrafilter X.A)\nhP : P ∈ C2\n⊢ P ∈ C0 ∨ ∃ Q, Q ∈ C0 ∧ P = AA ∩ Q\n[PROOFSTEP]\nexact claim5.finiteInterClosure_insert _ hP\n[GOAL]\ncase intro.intro\nX : Compactum\nA : Set X.A\nF : Ultrafilter X.A\nhF : F ∈ Compactum.basic (Compactum.cl A)\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nC0 : ssu := {Z | ∃ B, B ∈ F ∧ str X ⁻¹' B = Z}\nAA : Set (Ultrafilter X.A) := {G | A ∈ G}\nC1 : ssu := insert AA C0\nC2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure C1\nclaim1 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → ∀ (C : Set (Ultrafilter X.A)), C ∈ C0 → B ∩ C ∈ C0\nclaim2 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty B\nclaim3 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty (AA ∩ B)\nclaim4 : FiniteInter (finiteInterClosure C1)\nclaim5 : FiniteInter C0\nclaim6 : ∀ (P : Set (Ultrafilter X.A)), P ∈ C2 → Set.Nonempty P\n⊢ ∀ (T : fsu), ι T ⊆ C1 → Set.Nonempty (⋂₀ ι T)\n[PROOFSTEP]\nintro T hT\n[GOAL]\ncase intro.intro\nX : Compactum\nA : Set X.A\nF : Ultrafilter X.A\nhF : F ∈ Compactum.basic (Compactum.cl A)\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nC0 : ssu := {Z | ∃ B, B ∈ F ∧ str X ⁻¹' B = Z}\nAA : Set (Ultrafilter X.A) := {G | A ∈ G}\nC1 : ssu := insert AA C0\nC2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure C1\nclaim1 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → ∀ (C : Set (Ultrafilter X.A)), C ∈ C0 → B ∩ C ∈ C0\nclaim2 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty B\nclaim3 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty (AA ∩ B)\nclaim4 : FiniteInter (finiteInterClosure C1)\nclaim5 : FiniteInter C0\nclaim6 : ∀ (P : Set (Ultrafilter X.A)), P ∈ C2 → Set.Nonempty P\nT : fsu\nhT : ι T ⊆ C1\n⊢ Set.Nonempty (⋂₀ ι T)\n[PROOFSTEP]\nsuffices ⋂₀ ι T ∈ C2 by exact claim6 _ this\n[GOAL]\nX : Compactum\nA : Set X.A\nF : Ultrafilter X.A\nhF : F ∈ Compactum.basic (Compactum.cl A)\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nC0 : ssu := {Z | ∃ B, B ∈ F ∧ str X ⁻¹' B = Z}\nAA : Set (Ultrafilter X.A) := {G | A ∈ G}\nC1 : ssu := insert AA C0\nC2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure C1\nclaim1 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → ∀ (C : Set (Ultrafilter X.A)), C ∈ C0 → B ∩ C ∈ C0\nclaim2 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty B\nclaim3 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty (AA ∩ B)\nclaim4 : FiniteInter (finiteInterClosure C1)\nclaim5 : FiniteInter C0\nclaim6 : ∀ (P : Set (Ultrafilter X.A)), P ∈ C2 → Set.Nonempty P\nT : fsu\nhT : ι T ⊆ C1\nthis : ⋂₀ ι T ∈ C2\n⊢ Set.Nonempty (⋂₀ ι T)\n[PROOFSTEP]\nexact claim6 _ this\n[GOAL]\ncase intro.intro\nX : Compactum\nA : Set X.A\nF : Ultrafilter X.A\nhF : F ∈ Compactum.basic (Compactum.cl A)\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nC0 : ssu := {Z | ∃ B, B ∈ F ∧ str X ⁻¹' B = Z}\nAA : Set (Ultrafilter X.A) := {G | A ∈ G}\nC1 : ssu := insert AA C0\nC2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure C1\nclaim1 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → ∀ (C : Set (Ultrafilter X.A)), C ∈ C0 → B ∩ C ∈ C0\nclaim2 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty B\nclaim3 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty (AA ∩ B)\nclaim4 : FiniteInter (finiteInterClosure C1)\nclaim5 : FiniteInter C0\nclaim6 : ∀ (P : Set (Ultrafilter X.A)), P ∈ C2 → Set.Nonempty P\nT : fsu\nhT : ι T ⊆ C1\n⊢ ⋂₀ ι T ∈ C2\n[PROOFSTEP]\napply claim4.finiteInter_mem T\n[GOAL]\ncase intro.intro\nX : Compactum\nA : Set X.A\nF : Ultrafilter X.A\nhF : F ∈ Compactum.basic (Compactum.cl A)\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nC0 : ssu := {Z | ∃ B, B ∈ F ∧ str X ⁻¹' B = Z}\nAA : Set (Ultrafilter X.A) := {G | A ∈ G}\nC1 : ssu := insert AA C0\nC2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure C1\nclaim1 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → ∀ (C : Set (Ultrafilter X.A)), C ∈ C0 → B ∩ C ∈ C0\nclaim2 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty B\nclaim3 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty (AA ∩ B)\nclaim4 : FiniteInter (finiteInterClosure C1)\nclaim5 : FiniteInter C0\nclaim6 : ∀ (P : Set (Ultrafilter X.A)), P ∈ C2 → Set.Nonempty P\nT : fsu\nhT : ι T ⊆ C1\n⊢ ↑T ⊆ finiteInterClosure C1\n[PROOFSTEP]\nintro t ht\n[GOAL]\ncase intro.intro\nX : Compactum\nA : Set X.A\nF : Ultrafilter X.A\nhF : F ∈ Compactum.basic (Compactum.cl A)\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nC0 : ssu := {Z | ∃ B, B ∈ F ∧ str X ⁻¹' B = Z}\nAA : Set (Ultrafilter X.A) := {G | A ∈ G}\nC1 : ssu := insert AA C0\nC2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure C1\nclaim1 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → ∀ (C : Set (Ultrafilter X.A)), C ∈ C0 → B ∩ C ∈ C0\nclaim2 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty B\nclaim3 : ∀ (B : Set (Ultrafilter X.A)), B ∈ C0 → Set.Nonempty (AA ∩ B)\nclaim4 : FiniteInter (finiteInterClosure C1)\nclaim5 : FiniteInter C0\nclaim6 : ∀ (P : Set (Ultrafilter X.A)), P ∈ C2 → Set.Nonempty P\nT : fsu\nhT : ι T ⊆ C1\nt : Set (Ultrafilter X.A)\nht : t ∈ ↑T\n⊢ t ∈ finiteInterClosure C1\n[PROOFSTEP]\nrefine' finiteInterClosure.basic (@hT t ht)\n[GOAL]\nX : Compactum\nA : Set X.A\n⊢ IsClosed (Compactum.cl A)\n[PROOFSTEP]\nrw [isClosed_iff]\n[GOAL]\nX : Compactum\nA : Set X.A\n⊢ ∀ (F : Ultrafilter X.A), Compactum.cl A ∈ F → str X F ∈ Compactum.cl A\n[PROOFSTEP]\nintro F hF\n[GOAL]\nX : Compactum\nA : Set X.A\nF : Ultrafilter X.A\nhF : Compactum.cl A ∈ F\n⊢ str X F ∈ Compactum.cl A\n[PROOFSTEP]\nexact cl_cl _ ⟨F, hF, rfl⟩\n[GOAL]\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\n⊢ ↑F ≤ 𝓝 x → str X F = x\n[PROOFSTEP]\nlet fsu := Finset (Set (Ultrafilter X))\n[GOAL]\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\n⊢ ↑F ≤ 𝓝 x → str X F = x\n[PROOFSTEP]\nlet ssu := Set (Set (Ultrafilter X))\n[GOAL]\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\n⊢ ↑F ≤ 𝓝 x → str X F = x\n[PROOFSTEP]\nlet ι : fsu → ssu := fun x ↦ ↑x\n[GOAL]\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\n⊢ ↑F ≤ 𝓝 x → str X F = x\n[PROOFSTEP]\nlet T0 : ssu := {S | ∃ A ∈ F, S = basic A}\n[GOAL]\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\n⊢ ↑F ≤ 𝓝 x → str X F = x\n[PROOFSTEP]\nlet AA := X.str ⁻¹' { x }\n[GOAL]\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\n⊢ ↑F ≤ 𝓝 x → str X F = x\n[PROOFSTEP]\nlet T1 := insert AA T0\n[GOAL]\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\n⊢ ↑F ≤ 𝓝 x → str X F = x\n[PROOFSTEP]\nlet T2 := finiteInterClosure T1\n[GOAL]\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\n⊢ ↑F ≤ 𝓝 x → str X F = x\n[PROOFSTEP]\nintro cond\n[GOAL]\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\ncond : ↑F ≤ 𝓝 x\n⊢ str X F = x\n[PROOFSTEP]\nhave claim1 : ∀ A : Set X, IsClosed A → A ∈ F → x ∈ A :=\n by\n intro A hA h\n by_contra H\n rw [le_nhds_iff] at cond \n specialize cond Aᶜ H hA.isOpen_compl\n rw [Ultrafilter.mem_coe, Ultrafilter.compl_mem_iff_not_mem] at cond \n contradiction\n -- If A ∈ F, then x ∈ cl A.\n[GOAL]\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\ncond : ↑F ≤ 𝓝 x\n⊢ ∀ (A : Set X.A), IsClosed A → A ∈ F → x ∈ A\n[PROOFSTEP]\nintro A hA h\n[GOAL]\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\ncond : ↑F ≤ 𝓝 x\nA : Set X.A\nhA : IsClosed A\nh : A ∈ F\n⊢ x ∈ A\n[PROOFSTEP]\nby_contra H\n[GOAL]\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\ncond : ↑F ≤ 𝓝 x\nA : Set X.A\nhA : IsClosed A\nh : A ∈ F\nH : ¬x ∈ A\n⊢ False\n[PROOFSTEP]\nrw [le_nhds_iff] at cond \n[GOAL]\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\ncond : ∀ (s : Set X.A), x ∈ s → IsOpen s → s ∈ ↑F\nA : Set X.A\nhA : IsClosed A\nh : A ∈ F\nH : ¬x ∈ A\n⊢ False\n[PROOFSTEP]\nspecialize cond Aᶜ H hA.isOpen_compl\n[GOAL]\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\nA : Set X.A\nhA : IsClosed A\nh : A ∈ F\nH : ¬x ∈ A\ncond : Aᶜ ∈ ↑F\n⊢ False\n[PROOFSTEP]\nrw [Ultrafilter.mem_coe, Ultrafilter.compl_mem_iff_not_mem] at cond \n[GOAL]\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\nA : Set X.A\nhA : IsClosed A\nh : A ∈ F\nH : ¬x ∈ A\ncond : ¬A ∈ F\n⊢ False\n[PROOFSTEP]\ncontradiction\n -- If A ∈ F, then x ∈ cl A.\n[GOAL]\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\ncond : ↑F ≤ 𝓝 x\nclaim1 : ∀ (A : Set X.A), IsClosed A → A ∈ F → x ∈ A\n⊢ str X F = x\n[PROOFSTEP]\nhave claim2 : ∀ A : Set X, A ∈ F → x ∈ cl A := by\n intro A hA\n exact\n claim1 (cl A) (isClosed_cl A)\n (mem_of_superset hA (subset_cl A))\n -- T0 is closed under intersections.\n[GOAL]\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\ncond : ↑F ≤ 𝓝 x\nclaim1 : ∀ (A : Set X.A), IsClosed A → A ∈ F → x ∈ A\n⊢ ∀ (A : Set X.A), A ∈ F → x ∈ Compactum.cl A\n[PROOFSTEP]\nintro A hA\n[GOAL]\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\ncond : ↑F ≤ 𝓝 x\nclaim1 : ∀ (A : Set X.A), IsClosed A → A ∈ F → x ∈ A\nA : Set X.A\nhA : A ∈ F\n⊢ x ∈ Compactum.cl A\n[PROOFSTEP]\nexact\n claim1 (cl A) (isClosed_cl A)\n (mem_of_superset hA (subset_cl A))\n -- T0 is closed under intersections.\n[GOAL]\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\ncond : ↑F ≤ 𝓝 x\nclaim1 : ∀ (A : Set X.A), IsClosed A → A ∈ F → x ∈ A\nclaim2 : ∀ (A : Set X.A), A ∈ F → x ∈ Compactum.cl A\n⊢ str X F = x\n[PROOFSTEP]\nhave claim3 : ∀ (S1) (_ : S1 ∈ T0) (S2) (_ : S2 ∈ T0), S1 ∩ S2 ∈ T0 :=\n by\n rintro S1 ⟨S1, hS1, rfl⟩ S2 ⟨S2, hS2, rfl⟩\n exact\n ⟨S1 ∩ S2, inter_mem hS1 hS2, by simp [basic_inter]⟩\n -- For every S ∈ T0, the intersection AA ∩ S is nonempty.\n[GOAL]\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\ncond : ↑F ≤ 𝓝 x\nclaim1 : ∀ (A : Set X.A), IsClosed A → A ∈ F → x ∈ A\nclaim2 : ∀ (A : Set X.A), A ∈ F → x ∈ Compactum.cl A\n⊢ ∀ (S1 : Set (Ultrafilter X.A)), S1 ∈ T0 → ∀ (S2 : Set (Ultrafilter X.A)), S2 ∈ T0 → S1 ∩ S2 ∈ T0\n[PROOFSTEP]\nrintro S1 ⟨S1, hS1, rfl⟩ S2 ⟨S2, hS2, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\ncond : ↑F ≤ 𝓝 x\nclaim1 : ∀ (A : Set X.A), IsClosed A → A ∈ F → x ∈ A\nclaim2 : ∀ (A : Set X.A), A ∈ F → x ∈ Compactum.cl A\nS1 : Set X.A\nhS1 : S1 ∈ F\nS2 : Set X.A\nhS2 : S2 ∈ F\n⊢ Compactum.basic S1 ∩ Compactum.basic S2 ∈ T0\n[PROOFSTEP]\nexact\n ⟨S1 ∩ S2, inter_mem hS1 hS2, by simp [basic_inter]⟩\n -- For every S ∈ T0, the intersection AA ∩ S is nonempty.\n[GOAL]\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\ncond : ↑F ≤ 𝓝 x\nclaim1 : ∀ (A : Set X.A), IsClosed A → A ∈ F → x ∈ A\nclaim2 : ∀ (A : Set X.A), A ∈ F → x ∈ Compactum.cl A\nS1 : Set X.A\nhS1 : S1 ∈ F\nS2 : Set X.A\nhS2 : S2 ∈ F\n⊢ Compactum.basic S1 ∩ Compactum.basic S2 = Compactum.basic (S1 ∩ S2)\n[PROOFSTEP]\nsimp [basic_inter]\n[GOAL]\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\ncond : ↑F ≤ 𝓝 x\nclaim1 : ∀ (A : Set X.A), IsClosed A → A ∈ F → x ∈ A\nclaim2 : ∀ (A : Set X.A), A ∈ F → x ∈ Compactum.cl A\nclaim3 : ∀ (S1 : Set (Ultrafilter X.A)), S1 ∈ T0 → ∀ (S2 : Set (Ultrafilter X.A)), S2 ∈ T0 → S1 ∩ S2 ∈ T0\n⊢ str X F = x\n[PROOFSTEP]\nhave claim4 : ∀ S ∈ T0, (AA ∩ S).Nonempty := by\n rintro S ⟨S, hS, rfl⟩\n rcases claim2 _ hS with ⟨G, hG, hG2⟩\n exact\n ⟨G, hG2, hG⟩\n -- Every element of T0 is nonempty.\n[GOAL]\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\ncond : ↑F ≤ 𝓝 x\nclaim1 : ∀ (A : Set X.A), IsClosed A → A ∈ F → x ∈ A\nclaim2 : ∀ (A : Set X.A), A ∈ F → x ∈ Compactum.cl A\nclaim3 : ∀ (S1 : Set (Ultrafilter X.A)), S1 ∈ T0 → ∀ (S2 : Set (Ultrafilter X.A)), S2 ∈ T0 → S1 ∩ S2 ∈ T0\n⊢ ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty (AA ∩ S)\n[PROOFSTEP]\nrintro S ⟨S, hS, rfl⟩\n[GOAL]\ncase intro.intro\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\ncond : ↑F ≤ 𝓝 x\nclaim1 : ∀ (A : Set X.A), IsClosed A → A ∈ F → x ∈ A\nclaim2 : ∀ (A : Set X.A), A ∈ F → x ∈ Compactum.cl A\nclaim3 : ∀ (S1 : Set (Ultrafilter X.A)), S1 ∈ T0 → ∀ (S2 : Set (Ultrafilter X.A)), S2 ∈ T0 → S1 ∩ S2 ∈ T0\nS : Set X.A\nhS : S ∈ F\n⊢ Set.Nonempty (AA ∩ Compactum.basic S)\n[PROOFSTEP]\nrcases claim2 _ hS with ⟨G, hG, hG2⟩\n[GOAL]\ncase intro.intro.intro.intro\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\ncond : ↑F ≤ 𝓝 x\nclaim1 : ∀ (A : Set X.A), IsClosed A → A ∈ F → x ∈ A\nclaim2 : ∀ (A : Set X.A), A ∈ F → x ∈ Compactum.cl A\nclaim3 : ∀ (S1 : Set (Ultrafilter X.A)), S1 ∈ T0 → ∀ (S2 : Set (Ultrafilter X.A)), S2 ∈ T0 → S1 ∩ S2 ∈ T0\nS : Set X.A\nhS : S ∈ F\nG : Ultrafilter X.A\nhG : G ∈ Compactum.basic S\nhG2 : str X G = x\n⊢ Set.Nonempty (AA ∩ Compactum.basic S)\n[PROOFSTEP]\nexact\n ⟨G, hG2, hG⟩\n -- Every element of T0 is nonempty.\n[GOAL]\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\ncond : ↑F ≤ 𝓝 x\nclaim1 : ∀ (A : Set X.A), IsClosed A → A ∈ F → x ∈ A\nclaim2 : ∀ (A : Set X.A), A ∈ F → x ∈ Compactum.cl A\nclaim3 : ∀ (S1 : Set (Ultrafilter X.A)), S1 ∈ T0 → ∀ (S2 : Set (Ultrafilter X.A)), S2 ∈ T0 → S1 ∩ S2 ∈ T0\nclaim4 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty (AA ∩ S)\n⊢ str X F = x\n[PROOFSTEP]\nhave claim5 : ∀ S ∈ T0, Set.Nonempty S := by\n rintro S ⟨S, hS, rfl⟩\n exact\n ⟨F, hS⟩\n -- Every element of T2 is nonempty.\n[GOAL]\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\ncond : ↑F ≤ 𝓝 x\nclaim1 : ∀ (A : Set X.A), IsClosed A → A ∈ F → x ∈ A\nclaim2 : ∀ (A : Set X.A), A ∈ F → x ∈ Compactum.cl A\nclaim3 : ∀ (S1 : Set (Ultrafilter X.A)), S1 ∈ T0 → ∀ (S2 : Set (Ultrafilter X.A)), S2 ∈ T0 → S1 ∩ S2 ∈ T0\nclaim4 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty (AA ∩ S)\n⊢ ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty S\n[PROOFSTEP]\nrintro S ⟨S, hS, rfl⟩\n[GOAL]\ncase intro.intro\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\ncond : ↑F ≤ 𝓝 x\nclaim1 : ∀ (A : Set X.A), IsClosed A → A ∈ F → x ∈ A\nclaim2 : ∀ (A : Set X.A), A ∈ F → x ∈ Compactum.cl A\nclaim3 : ∀ (S1 : Set (Ultrafilter X.A)), S1 ∈ T0 → ∀ (S2 : Set (Ultrafilter X.A)), S2 ∈ T0 → S1 ∩ S2 ∈ T0\nclaim4 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty (AA ∩ S)\nS : Set X.A\nhS : S ∈ F\n⊢ Set.Nonempty (Compactum.basic S)\n[PROOFSTEP]\nexact\n ⟨F, hS⟩\n -- Every element of T2 is nonempty.\n[GOAL]\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\ncond : ↑F ≤ 𝓝 x\nclaim1 : ∀ (A : Set X.A), IsClosed A → A ∈ F → x ∈ A\nclaim2 : ∀ (A : Set X.A), A ∈ F → x ∈ Compactum.cl A\nclaim3 : ∀ (S1 : Set (Ultrafilter X.A)), S1 ∈ T0 → ∀ (S2 : Set (Ultrafilter X.A)), S2 ∈ T0 → S1 ∩ S2 ∈ T0\nclaim4 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty (AA ∩ S)\nclaim5 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty S\n⊢ str X F = x\n[PROOFSTEP]\nhave claim6 : ∀ S ∈ T2, Set.Nonempty S :=\n by\n suffices ∀ S ∈ T2, S ∈ T0 ∨ ∃ Q ∈ T0, S = AA ∩ Q by\n intro S hS\n cases' this _ hS with h h\n · exact claim5 S h\n · rcases h with ⟨Q, hQ, rfl⟩\n exact claim4 Q hQ\n intro S hS\n apply finiteInterClosure_insert\n · constructor\n · use Set.univ\n refine' ⟨Filter.univ_sets _, _⟩\n ext\n refine' ⟨_, by tauto⟩\n · intro\n apply Filter.univ_sets\n · exact claim3\n · exact hS\n[GOAL]\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\ncond : ↑F ≤ 𝓝 x\nclaim1 : ∀ (A : Set X.A), IsClosed A → A ∈ F → x ∈ A\nclaim2 : ∀ (A : Set X.A), A ∈ F → x ∈ Compactum.cl A\nclaim3 : ∀ (S1 : Set (Ultrafilter X.A)), S1 ∈ T0 → ∀ (S2 : Set (Ultrafilter X.A)), S2 ∈ T0 → S1 ∩ S2 ∈ T0\nclaim4 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty (AA ∩ S)\nclaim5 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty S\n⊢ ∀ (S : Set (Ultrafilter X.A)), S ∈ T2 → Set.Nonempty S\n[PROOFSTEP]\nsuffices ∀ S ∈ T2, S ∈ T0 ∨ ∃ Q ∈ T0, S = AA ∩ Q by\n intro S hS\n cases' this _ hS with h h\n · exact claim5 S h\n · rcases h with ⟨Q, hQ, rfl⟩\n exact claim4 Q hQ\n[GOAL]\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\ncond : ↑F ≤ 𝓝 x\nclaim1 : ∀ (A : Set X.A), IsClosed A → A ∈ F → x ∈ A\nclaim2 : ∀ (A : Set X.A), A ∈ F → x ∈ Compactum.cl A\nclaim3 : ∀ (S1 : Set (Ultrafilter X.A)), S1 ∈ T0 → ∀ (S2 : Set (Ultrafilter X.A)), S2 ∈ T0 → S1 ∩ S2 ∈ T0\nclaim4 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty (AA ∩ S)\nclaim5 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty S\nthis : ∀ (S : Set (Ultrafilter X.A)), S ∈ T2 → S ∈ T0 ∨ ∃ Q, Q ∈ T0 ∧ S = AA ∩ Q\n⊢ ∀ (S : Set (Ultrafilter X.A)), S ∈ T2 → Set.Nonempty S\n[PROOFSTEP]\nintro S hS\n[GOAL]\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\ncond : ↑F ≤ 𝓝 x\nclaim1 : ∀ (A : Set X.A), IsClosed A → A ∈ F → x ∈ A\nclaim2 : ∀ (A : Set X.A), A ∈ F → x ∈ Compactum.cl A\nclaim3 : ∀ (S1 : Set (Ultrafilter X.A)), S1 ∈ T0 → ∀ (S2 : Set (Ultrafilter X.A)), S2 ∈ T0 → S1 ∩ S2 ∈ T0\nclaim4 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty (AA ∩ S)\nclaim5 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty S\nthis : ∀ (S : Set (Ultrafilter X.A)), S ∈ T2 → S ∈ T0 ∨ ∃ Q, Q ∈ T0 ∧ S = AA ∩ Q\nS : Set (Ultrafilter X.A)\nhS : S ∈ T2\n⊢ Set.Nonempty S\n[PROOFSTEP]\ncases' this _ hS with h h\n[GOAL]\ncase inl\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\ncond : ↑F ≤ 𝓝 x\nclaim1 : ∀ (A : Set X.A), IsClosed A → A ∈ F → x ∈ A\nclaim2 : ∀ (A : Set X.A), A ∈ F → x ∈ Compactum.cl A\nclaim3 : ∀ (S1 : Set (Ultrafilter X.A)), S1 ∈ T0 → ∀ (S2 : Set (Ultrafilter X.A)), S2 ∈ T0 → S1 ∩ S2 ∈ T0\nclaim4 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty (AA ∩ S)\nclaim5 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty S\nthis : ∀ (S : Set (Ultrafilter X.A)), S ∈ T2 → S ∈ T0 ∨ ∃ Q, Q ∈ T0 ∧ S = AA ∩ Q\nS : Set (Ultrafilter X.A)\nhS : S ∈ T2\nh : S ∈ T0\n⊢ Set.Nonempty S\n[PROOFSTEP]\nexact claim5 S h\n[GOAL]\ncase inr\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\ncond : ↑F ≤ 𝓝 x\nclaim1 : ∀ (A : Set X.A), IsClosed A → A ∈ F → x ∈ A\nclaim2 : ∀ (A : Set X.A), A ∈ F → x ∈ Compactum.cl A\nclaim3 : ∀ (S1 : Set (Ultrafilter X.A)), S1 ∈ T0 → ∀ (S2 : Set (Ultrafilter X.A)), S2 ∈ T0 → S1 ∩ S2 ∈ T0\nclaim4 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty (AA ∩ S)\nclaim5 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty S\nthis : ∀ (S : Set (Ultrafilter X.A)), S ∈ T2 → S ∈ T0 ∨ ∃ Q, Q ∈ T0 ∧ S = AA ∩ Q\nS : Set (Ultrafilter X.A)\nhS : S ∈ T2\nh : ∃ Q, Q ∈ T0 ∧ S = AA ∩ Q\n⊢ Set.Nonempty S\n[PROOFSTEP]\nrcases h with ⟨Q, hQ, rfl⟩\n[GOAL]\ncase inr.intro.intro\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\ncond : ↑F ≤ 𝓝 x\nclaim1 : ∀ (A : Set X.A), IsClosed A → A ∈ F → x ∈ A\nclaim2 : ∀ (A : Set X.A), A ∈ F → x ∈ Compactum.cl A\nclaim3 : ∀ (S1 : Set (Ultrafilter X.A)), S1 ∈ T0 → ∀ (S2 : Set (Ultrafilter X.A)), S2 ∈ T0 → S1 ∩ S2 ∈ T0\nclaim4 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty (AA ∩ S)\nclaim5 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty S\nthis : ∀ (S : Set (Ultrafilter X.A)), S ∈ T2 → S ∈ T0 ∨ ∃ Q, Q ∈ T0 ∧ S = AA ∩ Q\nQ : Set (Ultrafilter X.A)\nhQ : Q ∈ T0\nhS : AA ∩ Q ∈ T2\n⊢ Set.Nonempty (AA ∩ Q)\n[PROOFSTEP]\nexact claim4 Q hQ\n[GOAL]\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\ncond : ↑F ≤ 𝓝 x\nclaim1 : ∀ (A : Set X.A), IsClosed A → A ∈ F → x ∈ A\nclaim2 : ∀ (A : Set X.A), A ∈ F → x ∈ Compactum.cl A\nclaim3 : ∀ (S1 : Set (Ultrafilter X.A)), S1 ∈ T0 → ∀ (S2 : Set (Ultrafilter X.A)), S2 ∈ T0 → S1 ∩ S2 ∈ T0\nclaim4 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty (AA ∩ S)\nclaim5 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty S\n⊢ ∀ (S : Set (Ultrafilter X.A)), S ∈ T2 → S ∈ T0 ∨ ∃ Q, Q ∈ T0 ∧ S = AA ∩ Q\n[PROOFSTEP]\nintro S hS\n[GOAL]\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\ncond : ↑F ≤ 𝓝 x\nclaim1 : ∀ (A : Set X.A), IsClosed A → A ∈ F → x ∈ A\nclaim2 : ∀ (A : Set X.A), A ∈ F → x ∈ Compactum.cl A\nclaim3 : ∀ (S1 : Set (Ultrafilter X.A)), S1 ∈ T0 → ∀ (S2 : Set (Ultrafilter X.A)), S2 ∈ T0 → S1 ∩ S2 ∈ T0\nclaim4 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty (AA ∩ S)\nclaim5 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty S\nS : Set (Ultrafilter X.A)\nhS : S ∈ T2\n⊢ S ∈ T0 ∨ ∃ Q, Q ∈ T0 ∧ S = AA ∩ Q\n[PROOFSTEP]\napply finiteInterClosure_insert\n[GOAL]\ncase cond\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\ncond : ↑F ≤ 𝓝 x\nclaim1 : ∀ (A : Set X.A), IsClosed A → A ∈ F → x ∈ A\nclaim2 : ∀ (A : Set X.A), A ∈ F → x ∈ Compactum.cl A\nclaim3 : ∀ (S1 : Set (Ultrafilter X.A)), S1 ∈ T0 → ∀ (S2 : Set (Ultrafilter X.A)), S2 ∈ T0 → S1 ∩ S2 ∈ T0\nclaim4 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty (AA ∩ S)\nclaim5 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty S\nS : Set (Ultrafilter X.A)\nhS : S ∈ T2\n⊢ FiniteInter T0\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase cond.univ_mem\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\ncond : ↑F ≤ 𝓝 x\nclaim1 : ∀ (A : Set X.A), IsClosed A → A ∈ F → x ∈ A\nclaim2 : ∀ (A : Set X.A), A ∈ F → x ∈ Compactum.cl A\nclaim3 : ∀ (S1 : Set (Ultrafilter X.A)), S1 ∈ T0 → ∀ (S2 : Set (Ultrafilter X.A)), S2 ∈ T0 → S1 ∩ S2 ∈ T0\nclaim4 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty (AA ∩ S)\nclaim5 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty S\nS : Set (Ultrafilter X.A)\nhS : S ∈ T2\n⊢ Set.univ ∈ T0\n[PROOFSTEP]\nuse Set.univ\n[GOAL]\ncase h\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\ncond : ↑F ≤ 𝓝 x\nclaim1 : ∀ (A : Set X.A), IsClosed A → A ∈ F → x ∈ A\nclaim2 : ∀ (A : Set X.A), A ∈ F → x ∈ Compactum.cl A\nclaim3 : ∀ (S1 : Set (Ultrafilter X.A)), S1 ∈ T0 → ∀ (S2 : Set (Ultrafilter X.A)), S2 ∈ T0 → S1 ∩ S2 ∈ T0\nclaim4 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty (AA ∩ S)\nclaim5 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty S\nS : Set (Ultrafilter X.A)\nhS : S ∈ T2\n⊢ Set.univ ∈ F ∧ Set.univ = Compactum.basic Set.univ\n[PROOFSTEP]\nrefine' ⟨Filter.univ_sets _, _⟩\n[GOAL]\ncase h\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\ncond : ↑F ≤ 𝓝 x\nclaim1 : ∀ (A : Set X.A), IsClosed A → A ∈ F → x ∈ A\nclaim2 : ∀ (A : Set X.A), A ∈ F → x ∈ Compactum.cl A\nclaim3 : ∀ (S1 : Set (Ultrafilter X.A)), S1 ∈ T0 → ∀ (S2 : Set (Ultrafilter X.A)), S2 ∈ T0 → S1 ∩ S2 ∈ T0\nclaim4 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty (AA ∩ S)\nclaim5 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty S\nS : Set (Ultrafilter X.A)\nhS : S ∈ T2\n⊢ Set.univ = Compactum.basic Set.univ\n[PROOFSTEP]\next\n[GOAL]\ncase h.h\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\ncond : ↑F ≤ 𝓝 x\nclaim1 : ∀ (A : Set X.A), IsClosed A → A ∈ F → x ∈ A\nclaim2 : ∀ (A : Set X.A), A ∈ F → x ∈ Compactum.cl A\nclaim3 : ∀ (S1 : Set (Ultrafilter X.A)), S1 ∈ T0 → ∀ (S2 : Set (Ultrafilter X.A)), S2 ∈ T0 → S1 ∩ S2 ∈ T0\nclaim4 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty (AA ∩ S)\nclaim5 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty S\nS : Set (Ultrafilter X.A)\nhS : S ∈ T2\nx✝ : Ultrafilter X.A\n⊢ x✝ ∈ Set.univ ↔ x✝ ∈ Compactum.basic Set.univ\n[PROOFSTEP]\nrefine' ⟨_, by tauto⟩\n[GOAL]\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\ncond : ↑F ≤ 𝓝 x\nclaim1 : ∀ (A : Set X.A), IsClosed A → A ∈ F → x ∈ A\nclaim2 : ∀ (A : Set X.A), A ∈ F → x ∈ Compactum.cl A\nclaim3 : ∀ (S1 : Set (Ultrafilter X.A)), S1 ∈ T0 → ∀ (S2 : Set (Ultrafilter X.A)), S2 ∈ T0 → S1 ∩ S2 ∈ T0\nclaim4 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty (AA ∩ S)\nclaim5 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty S\nS : Set (Ultrafilter X.A)\nhS : S ∈ T2\nx✝ : Ultrafilter X.A\n⊢ x✝ ∈ Compactum.basic Set.univ → x✝ ∈ Set.univ\n[PROOFSTEP]\ntauto\n[GOAL]\ncase h.h\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\ncond : ↑F ≤ 𝓝 x\nclaim1 : ∀ (A : Set X.A), IsClosed A → A ∈ F → x ∈ A\nclaim2 : ∀ (A : Set X.A), A ∈ F → x ∈ Compactum.cl A\nclaim3 : ∀ (S1 : Set (Ultrafilter X.A)), S1 ∈ T0 → ∀ (S2 : Set (Ultrafilter X.A)), S2 ∈ T0 → S1 ∩ S2 ∈ T0\nclaim4 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty (AA ∩ S)\nclaim5 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty S\nS : Set (Ultrafilter X.A)\nhS : S ∈ T2\nx✝ : Ultrafilter X.A\n⊢ x✝ ∈ Set.univ → x✝ ∈ Compactum.basic Set.univ\n[PROOFSTEP]\nintro\n[GOAL]\ncase h.h\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\ncond : ↑F ≤ 𝓝 x\nclaim1 : ∀ (A : Set X.A), IsClosed A → A ∈ F → x ∈ A\nclaim2 : ∀ (A : Set X.A), A ∈ F → x ∈ Compactum.cl A\nclaim3 : ∀ (S1 : Set (Ultrafilter X.A)), S1 ∈ T0 → ∀ (S2 : Set (Ultrafilter X.A)), S2 ∈ T0 → S1 ∩ S2 ∈ T0\nclaim4 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty (AA ∩ S)\nclaim5 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty S\nS : Set (Ultrafilter X.A)\nhS : S ∈ T2\nx✝ : Ultrafilter X.A\na✝ : x✝ ∈ Set.univ\n⊢ x✝ ∈ Compactum.basic Set.univ\n[PROOFSTEP]\napply Filter.univ_sets\n[GOAL]\ncase cond.inter_mem\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\ncond : ↑F ≤ 𝓝 x\nclaim1 : ∀ (A : Set X.A), IsClosed A → A ∈ F → x ∈ A\nclaim2 : ∀ (A : Set X.A), A ∈ F → x ∈ Compactum.cl A\nclaim3 : ∀ (S1 : Set (Ultrafilter X.A)), S1 ∈ T0 → ∀ (S2 : Set (Ultrafilter X.A)), S2 ∈ T0 → S1 ∩ S2 ∈ T0\nclaim4 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty (AA ∩ S)\nclaim5 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty S\nS : Set (Ultrafilter X.A)\nhS : S ∈ T2\n⊢ ∀ ⦃s : Set (Ultrafilter X.A)⦄, s ∈ T0 → ∀ ⦃t : Set (Ultrafilter X.A)⦄, t ∈ T0 → s ∩ t ∈ T0\n[PROOFSTEP]\nexact claim3\n[GOAL]\ncase H\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\ncond : ↑F ≤ 𝓝 x\nclaim1 : ∀ (A : Set X.A), IsClosed A → A ∈ F → x ∈ A\nclaim2 : ∀ (A : Set X.A), A ∈ F → x ∈ Compactum.cl A\nclaim3 : ∀ (S1 : Set (Ultrafilter X.A)), S1 ∈ T0 → ∀ (S2 : Set (Ultrafilter X.A)), S2 ∈ T0 → S1 ∩ S2 ∈ T0\nclaim4 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty (AA ∩ S)\nclaim5 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty S\nS : Set (Ultrafilter X.A)\nhS : S ∈ T2\n⊢ S ∈ finiteInterClosure (insert AA T0)\n[PROOFSTEP]\nexact hS\n[GOAL]\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\ncond : ↑F ≤ 𝓝 x\nclaim1 : ∀ (A : Set X.A), IsClosed A → A ∈ F → x ∈ A\nclaim2 : ∀ (A : Set X.A), A ∈ F → x ∈ Compactum.cl A\nclaim3 : ∀ (S1 : Set (Ultrafilter X.A)), S1 ∈ T0 → ∀ (S2 : Set (Ultrafilter X.A)), S2 ∈ T0 → S1 ∩ S2 ∈ T0\nclaim4 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty (AA ∩ S)\nclaim5 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty S\nclaim6 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T2 → Set.Nonempty S\n⊢ str X F = x\n[PROOFSTEP]\nsuffices ∀ F : fsu, ↑F ⊆ T1 → (⋂₀ ι F).Nonempty\n by\n obtain ⟨G, h1⟩ := Ultrafilter.exists_ultrafilter_of_finite_inter_nonempty _ this\n have c1 : X.join G = F := Ultrafilter.coe_le_coe.1 fun P hP => h1 (Or.inr ⟨P, hP, rfl⟩)\n have c2 : G.map X.str = X.incl x :=\n by\n refine' Ultrafilter.coe_le_coe.1 fun P hP => _\n apply mem_of_superset (h1 (Or.inl rfl))\n rintro x ⟨rfl⟩\n exact hP\n simp [← c1, c2]\n -- Finish...\n[GOAL]\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\ncond : ↑F ≤ 𝓝 x\nclaim1 : ∀ (A : Set X.A), IsClosed A → A ∈ F → x ∈ A\nclaim2 : ∀ (A : Set X.A), A ∈ F → x ∈ Compactum.cl A\nclaim3 : ∀ (S1 : Set (Ultrafilter X.A)), S1 ∈ T0 → ∀ (S2 : Set (Ultrafilter X.A)), S2 ∈ T0 → S1 ∩ S2 ∈ T0\nclaim4 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty (AA ∩ S)\nclaim5 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty S\nclaim6 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T2 → Set.Nonempty S\nthis : ∀ (F : fsu), ↑F ⊆ T1 → Set.Nonempty (⋂₀ ι F)\n⊢ str X F = x\n[PROOFSTEP]\nobtain ⟨G, h1⟩ := Ultrafilter.exists_ultrafilter_of_finite_inter_nonempty _ this\n[GOAL]\ncase intro\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\ncond : ↑F ≤ 𝓝 x\nclaim1 : ∀ (A : Set X.A), IsClosed A → A ∈ F → x ∈ A\nclaim2 : ∀ (A : Set X.A), A ∈ F → x ∈ Compactum.cl A\nclaim3 : ∀ (S1 : Set (Ultrafilter X.A)), S1 ∈ T0 → ∀ (S2 : Set (Ultrafilter X.A)), S2 ∈ T0 → S1 ∩ S2 ∈ T0\nclaim4 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty (AA ∩ S)\nclaim5 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty S\nclaim6 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T2 → Set.Nonempty S\nthis : ∀ (F : fsu), ↑F ⊆ T1 → Set.Nonempty (⋂₀ ι F)\nG : Ultrafilter (Ultrafilter X.A)\nh1 : T1 ⊆ G.sets\n⊢ str X F = x\n[PROOFSTEP]\nhave c1 : X.join G = F := Ultrafilter.coe_le_coe.1 fun P hP => h1 (Or.inr ⟨P, hP, rfl⟩)\n[GOAL]\ncase intro\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\ncond : ↑F ≤ 𝓝 x\nclaim1 : ∀ (A : Set X.A), IsClosed A → A ∈ F → x ∈ A\nclaim2 : ∀ (A : Set X.A), A ∈ F → x ∈ Compactum.cl A\nclaim3 : ∀ (S1 : Set (Ultrafilter X.A)), S1 ∈ T0 → ∀ (S2 : Set (Ultrafilter X.A)), S2 ∈ T0 → S1 ∩ S2 ∈ T0\nclaim4 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty (AA ∩ S)\nclaim5 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty S\nclaim6 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T2 → Set.Nonempty S\nthis : ∀ (F : fsu), ↑F ⊆ T1 → Set.Nonempty (⋂₀ ι F)\nG : Ultrafilter (Ultrafilter X.A)\nh1 : T1 ⊆ G.sets\nc1 : join X G = F\n⊢ str X F = x\n[PROOFSTEP]\nhave c2 : G.map X.str = X.incl x := by\n refine' Ultrafilter.coe_le_coe.1 fun P hP => _\n apply mem_of_superset (h1 (Or.inl rfl))\n rintro x ⟨rfl⟩\n exact hP\n[GOAL]\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\ncond : ↑F ≤ 𝓝 x\nclaim1 : ∀ (A : Set X.A), IsClosed A → A ∈ F → x ∈ A\nclaim2 : ∀ (A : Set X.A), A ∈ F → x ∈ Compactum.cl A\nclaim3 : ∀ (S1 : Set (Ultrafilter X.A)), S1 ∈ T0 → ∀ (S2 : Set (Ultrafilter X.A)), S2 ∈ T0 → S1 ∩ S2 ∈ T0\nclaim4 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty (AA ∩ S)\nclaim5 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty S\nclaim6 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T2 → Set.Nonempty S\nthis : ∀ (F : fsu), ↑F ⊆ T1 → Set.Nonempty (⋂₀ ι F)\nG : Ultrafilter (Ultrafilter X.A)\nh1 : T1 ⊆ G.sets\nc1 : join X G = F\n⊢ Ultrafilter.map (str X) G = incl X x\n[PROOFSTEP]\nrefine' Ultrafilter.coe_le_coe.1 fun P hP => _\n[GOAL]\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\ncond : ↑F ≤ 𝓝 x\nclaim1 : ∀ (A : Set X.A), IsClosed A → A ∈ F → x ∈ A\nclaim2 : ∀ (A : Set X.A), A ∈ F → x ∈ Compactum.cl A\nclaim3 : ∀ (S1 : Set (Ultrafilter X.A)), S1 ∈ T0 → ∀ (S2 : Set (Ultrafilter X.A)), S2 ∈ T0 → S1 ∩ S2 ∈ T0\nclaim4 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty (AA ∩ S)\nclaim5 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty S\nclaim6 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T2 → Set.Nonempty S\nthis : ∀ (F : fsu), ↑F ⊆ T1 → Set.Nonempty (⋂₀ ι F)\nG : Ultrafilter (Ultrafilter X.A)\nh1 : T1 ⊆ G.sets\nc1 : join X G = F\nP : Set X.A\nhP : P ∈ ↑(incl X x)\n⊢ P ∈ ↑(Ultrafilter.map (str X) G)\n[PROOFSTEP]\napply mem_of_superset (h1 (Or.inl rfl))\n[GOAL]\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\ncond : ↑F ≤ 𝓝 x\nclaim1 : ∀ (A : Set X.A), IsClosed A → A ∈ F → x ∈ A\nclaim2 : ∀ (A : Set X.A), A ∈ F → x ∈ Compactum.cl A\nclaim3 : ∀ (S1 : Set (Ultrafilter X.A)), S1 ∈ T0 → ∀ (S2 : Set (Ultrafilter X.A)), S2 ∈ T0 → S1 ∩ S2 ∈ T0\nclaim4 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty (AA ∩ S)\nclaim5 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty S\nclaim6 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T2 → Set.Nonempty S\nthis : ∀ (F : fsu), ↑F ⊆ T1 → Set.Nonempty (⋂₀ ι F)\nG : Ultrafilter (Ultrafilter X.A)\nh1 : T1 ⊆ G.sets\nc1 : join X G = F\nP : Set X.A\nhP : P ∈ ↑(incl X x)\n⊢ AA ⊆ str X ⁻¹' P\n[PROOFSTEP]\nrintro x ⟨rfl⟩\n[GOAL]\ncase refl\nX : Compactum\nF : Ultrafilter X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nclaim3 : ∀ (S1 : Set (Ultrafilter X.A)), S1 ∈ T0 → ∀ (S2 : Set (Ultrafilter X.A)), S2 ∈ T0 → S1 ∩ S2 ∈ T0\nclaim5 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty S\nG : Ultrafilter (Ultrafilter X.A)\nc1 : join X G = F\nP : Set X.A\nx : Ultrafilter X.A\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {str X x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\ncond : ↑F ≤ 𝓝 (str X x)\nclaim1 : ∀ (A : Set X.A), IsClosed A → A ∈ F → str X x ∈ A\nclaim2 : ∀ (A : Set X.A), A ∈ F → str X x ∈ Compactum.cl A\nclaim4 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty (AA ∩ S)\nclaim6 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T2 → Set.Nonempty S\nthis : ∀ (F : fsu), ↑F ⊆ T1 → Set.Nonempty (⋂₀ ι F)\nh1 : T1 ⊆ G.sets\nhP : P ∈ ↑(incl X (str X x))\n⊢ x ∈ str X ⁻¹' P\n[PROOFSTEP]\nexact hP\n[GOAL]\ncase intro\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\ncond : ↑F ≤ 𝓝 x\nclaim1 : ∀ (A : Set X.A), IsClosed A → A ∈ F → x ∈ A\nclaim2 : ∀ (A : Set X.A), A ∈ F → x ∈ Compactum.cl A\nclaim3 : ∀ (S1 : Set (Ultrafilter X.A)), S1 ∈ T0 → ∀ (S2 : Set (Ultrafilter X.A)), S2 ∈ T0 → S1 ∩ S2 ∈ T0\nclaim4 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty (AA ∩ S)\nclaim5 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty S\nclaim6 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T2 → Set.Nonempty S\nthis : ∀ (F : fsu), ↑F ⊆ T1 → Set.Nonempty (⋂₀ ι F)\nG : Ultrafilter (Ultrafilter X.A)\nh1 : T1 ⊆ G.sets\nc1 : join X G = F\nc2 : Ultrafilter.map (str X) G = incl X x\n⊢ str X F = x\n[PROOFSTEP]\nsimp [← c1, c2]\n -- Finish...\n[GOAL]\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\ncond : ↑F ≤ 𝓝 x\nclaim1 : ∀ (A : Set X.A), IsClosed A → A ∈ F → x ∈ A\nclaim2 : ∀ (A : Set X.A), A ∈ F → x ∈ Compactum.cl A\nclaim3 : ∀ (S1 : Set (Ultrafilter X.A)), S1 ∈ T0 → ∀ (S2 : Set (Ultrafilter X.A)), S2 ∈ T0 → S1 ∩ S2 ∈ T0\nclaim4 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty (AA ∩ S)\nclaim5 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty S\nclaim6 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T2 → Set.Nonempty S\n⊢ ∀ (F : fsu), ↑F ⊆ T1 → Set.Nonempty (⋂₀ ι F)\n[PROOFSTEP]\nintro T hT\n[GOAL]\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\ncond : ↑F ≤ 𝓝 x\nclaim1 : ∀ (A : Set X.A), IsClosed A → A ∈ F → x ∈ A\nclaim2 : ∀ (A : Set X.A), A ∈ F → x ∈ Compactum.cl A\nclaim3 : ∀ (S1 : Set (Ultrafilter X.A)), S1 ∈ T0 → ∀ (S2 : Set (Ultrafilter X.A)), S2 ∈ T0 → S1 ∩ S2 ∈ T0\nclaim4 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty (AA ∩ S)\nclaim5 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty S\nclaim6 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T2 → Set.Nonempty S\nT : fsu\nhT : ↑T ⊆ T1\n⊢ Set.Nonempty (⋂₀ ι T)\n[PROOFSTEP]\nrefine' claim6 _ (finiteInter_mem (.finiteInterClosure_finiteInter _) _ _)\n[GOAL]\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\ncond : ↑F ≤ 𝓝 x\nclaim1 : ∀ (A : Set X.A), IsClosed A → A ∈ F → x ∈ A\nclaim2 : ∀ (A : Set X.A), A ∈ F → x ∈ Compactum.cl A\nclaim3 : ∀ (S1 : Set (Ultrafilter X.A)), S1 ∈ T0 → ∀ (S2 : Set (Ultrafilter X.A)), S2 ∈ T0 → S1 ∩ S2 ∈ T0\nclaim4 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty (AA ∩ S)\nclaim5 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty S\nclaim6 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T2 → Set.Nonempty S\nT : fsu\nhT : ↑T ⊆ T1\n⊢ ↑T ⊆ finiteInterClosure T1\n[PROOFSTEP]\nintro t ht\n[GOAL]\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nfsu : Type u_1 := Finset (Set (Ultrafilter X.A))\nssu : Type u_1 := Set (Set (Ultrafilter X.A))\nι : fsu → ssu := fun x => ↑x\nT0 : ssu := {S | ∃ A, A ∈ F ∧ S = Compactum.basic A}\nAA : Set (Ultrafilter X.A) := str X ⁻¹' {x}\nT1 : ssu := insert AA T0\nT2 : Set (Set (Ultrafilter X.A)) := finiteInterClosure T1\ncond : ↑F ≤ 𝓝 x\nclaim1 : ∀ (A : Set X.A), IsClosed A → A ∈ F → x ∈ A\nclaim2 : ∀ (A : Set X.A), A ∈ F → x ∈ Compactum.cl A\nclaim3 : ∀ (S1 : Set (Ultrafilter X.A)), S1 ∈ T0 → ∀ (S2 : Set (Ultrafilter X.A)), S2 ∈ T0 → S1 ∩ S2 ∈ T0\nclaim4 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty (AA ∩ S)\nclaim5 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T0 → Set.Nonempty S\nclaim6 : ∀ (S : Set (Ultrafilter X.A)), S ∈ T2 → Set.Nonempty S\nT : fsu\nhT : ↑T ⊆ T1\nt : Set (Ultrafilter X.A)\nht : t ∈ ↑T\n⊢ t ∈ finiteInterClosure T1\n[PROOFSTEP]\nexact finiteInterClosure.basic (@hT t ht)\n[GOAL]\nX : Compactum\nF : Ultrafilter X.A\nx : X.A\nh : str X F = x\ns : Set X.A\nhx : x ∈ s\nhs : IsOpen s\n⊢ str X F ∈ s\n[PROOFSTEP]\nrwa [h]\n[GOAL]\nX : Compactum\n⊢ T2Space X.A\n[PROOFSTEP]\nrw [t2_iff_ultrafilter]\n[GOAL]\nX : Compactum\n⊢ ∀ {x y : X.A} (f : Ultrafilter X.A), ↑f ≤ 𝓝 x → ↑f ≤ 𝓝 y → x = y\n[PROOFSTEP]\nintro _ _ F hx hy\n[GOAL]\nX : Compactum\nx✝ y✝ : X.A\nF : Ultrafilter X.A\nhx : ↑F ≤ 𝓝 x✝\nhy : ↑F ≤ 𝓝 y✝\n⊢ x✝ = y✝\n[PROOFSTEP]\nrw [← str_eq_of_le_nhds _ _ hx, ← str_eq_of_le_nhds _ _ hy]\n[GOAL]\nX : Compactum\nF : Ultrafilter X.A\n⊢ Ultrafilter.lim F = str X F\n[PROOFSTEP]\nrw [Ultrafilter.lim_eq_iff_le_nhds, le_nhds_iff]\n[GOAL]\nX : Compactum\nF : Ultrafilter X.A\n⊢ ∀ (s : Set X.A), str X F ∈ s → IsOpen s → s ∈ ↑F\n[PROOFSTEP]\ntauto\n[GOAL]\nX : Compactum\nA : Set X.A\n⊢ Compactum.cl A = closure A\n[PROOFSTEP]\next\n[GOAL]\ncase h\nX : Compactum\nA : Set X.A\nx✝ : X.A\n⊢ x✝ ∈ Compactum.cl A ↔ x✝ ∈ closure A\n[PROOFSTEP]\nrw [mem_closure_iff_ultrafilter]\n[GOAL]\ncase h\nX : Compactum\nA : Set X.A\nx✝ : X.A\n⊢ x✝ ∈ Compactum.cl A ↔ ∃ u, A ∈ u ∧ ↑u ≤ 𝓝 x✝\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nX : Compactum\nA : Set X.A\nx✝ : X.A\n⊢ x✝ ∈ Compactum.cl A → ∃ u, A ∈ u ∧ ↑u ≤ 𝓝 x✝\n[PROOFSTEP]\nrintro ⟨F, h1, h2⟩\n[GOAL]\ncase h.mp.intro.intro\nX : Compactum\nA : Set X.A\nx✝ : X.A\nF : Ultrafilter X.A\nh1 : F ∈ Compactum.basic A\nh2 : str X F = x✝\n⊢ ∃ u, A ∈ u ∧ ↑u ≤ 𝓝 x✝\n[PROOFSTEP]\nexact ⟨F, h1, le_nhds_of_str_eq _ _ h2⟩\n[GOAL]\ncase h.mpr\nX : Compactum\nA : Set X.A\nx✝ : X.A\n⊢ (∃ u, A ∈ u ∧ ↑u ≤ 𝓝 x✝) → x✝ ∈ Compactum.cl A\n[PROOFSTEP]\nrintro ⟨F, h1, h2⟩\n[GOAL]\ncase h.mpr.intro.intro\nX : Compactum\nA : Set X.A\nx✝ : X.A\nF : Ultrafilter X.A\nh1 : A ∈ F\nh2 : ↑F ≤ 𝓝 x✝\n⊢ x✝ ∈ Compactum.cl A\n[PROOFSTEP]\nexact ⟨F, h1, str_eq_of_le_nhds _ _ h2⟩\n[GOAL]\nX Y : Compactum\nf : X ⟶ Y\n⊢ Continuous f.f\n[PROOFSTEP]\nrw [continuous_iff_ultrafilter]\n[GOAL]\nX Y : Compactum\nf : X ⟶ Y\n⊢ ∀ (x : X.A) (g : Ultrafilter X.A), ↑g ≤ 𝓝 x → Tendsto f.f (↑g) (𝓝 (Monad.Algebra.Hom.f f x))\n[PROOFSTEP]\nintro x g h\n[GOAL]\nX Y : Compactum\nf : X ⟶ Y\nx : X.A\ng : Ultrafilter X.A\nh : ↑g ≤ 𝓝 x\n⊢ Tendsto f.f (↑g) (𝓝 (Monad.Algebra.Hom.f f x))\n[PROOFSTEP]\nrw [Tendsto, ← coe_map]\n[GOAL]\nX Y : Compactum\nf : X ⟶ Y\nx : X.A\ng : Ultrafilter X.A\nh : ↑g ≤ 𝓝 x\n⊢ ↑(Ultrafilter.map f.f g) ≤ 𝓝 (Monad.Algebra.Hom.f f x)\n[PROOFSTEP]\napply le_nhds_of_str_eq\n[GOAL]\ncase a\nX Y : Compactum\nf : X ⟶ Y\nx : X.A\ng : Ultrafilter X.A\nh : ↑g ≤ 𝓝 x\n⊢ str Y (Ultrafilter.map f.f g) = Monad.Algebra.Hom.f f x\n[PROOFSTEP]\nrw [← str_hom_commute, str_eq_of_le_nhds _ x _]\n[GOAL]\nX Y : Compactum\nf : X ⟶ Y\nx : X.A\ng : Ultrafilter X.A\nh : ↑g ≤ 𝓝 x\n⊢ ↑g ≤ 𝓝 x\n[PROOFSTEP]\napply h\n[GOAL]\nX : Type u_1\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\n⊢ NatTrans.app (Monad.η β) X ≫ Ultrafilter.lim = 𝟙 X\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nX : Type u_1\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nx : (𝟭 (Type u_1)).obj X\n⊢ (NatTrans.app (Monad.η β) X ≫ Ultrafilter.lim) x = 𝟙 X x\n[PROOFSTEP]\nexact lim_eq (pure_le_nhds _)\n[GOAL]\nX : Type u_1\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\n⊢ NatTrans.app (Monad.μ β) X ≫ Ultrafilter.lim = β.toFunctor.map Ultrafilter.lim ≫ Ultrafilter.lim\n[PROOFSTEP]\next FF\n[GOAL]\ncase h\nX : Type u_1\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nFF : (β.toFunctor ⋙ β.toFunctor).obj X\n⊢ (NatTrans.app (Monad.μ β) X ≫ Ultrafilter.lim) FF = (β.toFunctor.map Ultrafilter.lim ≫ Ultrafilter.lim) FF\n[PROOFSTEP]\nchange Ultrafilter (Ultrafilter X) at FF \n[GOAL]\ncase h\nX : Type u_1\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nFF : Ultrafilter (Ultrafilter X)\n⊢ (NatTrans.app (Monad.μ β) X ≫ Ultrafilter.lim) FF = (β.toFunctor.map Ultrafilter.lim ≫ Ultrafilter.lim) FF\n[PROOFSTEP]\nset x := (Ultrafilter.map Ultrafilter.lim FF).lim with c1\n[GOAL]\ncase h\nX : Type u_1\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nFF : Ultrafilter (Ultrafilter X)\nx : X := Ultrafilter.lim (Ultrafilter.map Ultrafilter.lim FF)\nc1 : x = Ultrafilter.lim (Ultrafilter.map Ultrafilter.lim FF)\n⊢ (NatTrans.app (Monad.μ β) X ≫ Ultrafilter.lim) FF = (β.toFunctor.map Ultrafilter.lim ≫ Ultrafilter.lim) FF\n[PROOFSTEP]\nhave c2 : ∀ (U : Set X) (F : Ultrafilter X), F.lim ∈ U → IsOpen U → U ∈ F :=\n by\n intro U F h1 hU\n exact isOpen_iff_ultrafilter.mp hU _ h1 _ (Ultrafilter.le_nhds_lim _)\n[GOAL]\nX : Type u_1\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nFF : Ultrafilter (Ultrafilter X)\nx : X := Ultrafilter.lim (Ultrafilter.map Ultrafilter.lim FF)\nc1 : x = Ultrafilter.lim (Ultrafilter.map Ultrafilter.lim FF)\n⊢ ∀ (U : Set X) (F : Ultrafilter X), Ultrafilter.lim F ∈ U → IsOpen U → U ∈ F\n[PROOFSTEP]\nintro U F h1 hU\n[GOAL]\nX : Type u_1\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nFF : Ultrafilter (Ultrafilter X)\nx : X := Ultrafilter.lim (Ultrafilter.map Ultrafilter.lim FF)\nc1 : x = Ultrafilter.lim (Ultrafilter.map Ultrafilter.lim FF)\nU : Set X\nF : Ultrafilter X\nh1 : Ultrafilter.lim F ∈ U\nhU : IsOpen U\n⊢ U ∈ F\n[PROOFSTEP]\nexact isOpen_iff_ultrafilter.mp hU _ h1 _ (Ultrafilter.le_nhds_lim _)\n[GOAL]\ncase h\nX : Type u_1\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nFF : Ultrafilter (Ultrafilter X)\nx : X := Ultrafilter.lim (Ultrafilter.map Ultrafilter.lim FF)\nc1 : x = Ultrafilter.lim (Ultrafilter.map Ultrafilter.lim FF)\nc2 : ∀ (U : Set X) (F : Ultrafilter X), Ultrafilter.lim F ∈ U → IsOpen U → U ∈ F\n⊢ (NatTrans.app (Monad.μ β) X ≫ Ultrafilter.lim) FF = (β.toFunctor.map Ultrafilter.lim ≫ Ultrafilter.lim) FF\n[PROOFSTEP]\nhave c3 : ↑(Ultrafilter.map Ultrafilter.lim FF) ≤ 𝓝 x :=\n by\n rw [le_nhds_iff]\n intro U hx hU\n exact mem_coe.2 (c2 _ _ (by rwa [← c1]) hU)\n[GOAL]\nX : Type u_1\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nFF : Ultrafilter (Ultrafilter X)\nx : X := Ultrafilter.lim (Ultrafilter.map Ultrafilter.lim FF)\nc1 : x = Ultrafilter.lim (Ultrafilter.map Ultrafilter.lim FF)\nc2 : ∀ (U : Set X) (F : Ultrafilter X), Ultrafilter.lim F ∈ U → IsOpen U → U ∈ F\n⊢ ↑(Ultrafilter.map Ultrafilter.lim FF) ≤ 𝓝 x\n[PROOFSTEP]\nrw [le_nhds_iff]\n[GOAL]\nX : Type u_1\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nFF : Ultrafilter (Ultrafilter X)\nx : X := Ultrafilter.lim (Ultrafilter.map Ultrafilter.lim FF)\nc1 : x = Ultrafilter.lim (Ultrafilter.map Ultrafilter.lim FF)\nc2 : ∀ (U : Set X) (F : Ultrafilter X), Ultrafilter.lim F ∈ U → IsOpen U → U ∈ F\n⊢ ∀ (s : Set X), x ∈ s → IsOpen s → s ∈ ↑(Ultrafilter.map Ultrafilter.lim FF)\n[PROOFSTEP]\nintro U hx hU\n[GOAL]\nX : Type u_1\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nFF : Ultrafilter (Ultrafilter X)\nx : X := Ultrafilter.lim (Ultrafilter.map Ultrafilter.lim FF)\nc1 : x = Ultrafilter.lim (Ultrafilter.map Ultrafilter.lim FF)\nc2 : ∀ (U : Set X) (F : Ultrafilter X), Ultrafilter.lim F ∈ U → IsOpen U → U ∈ F\nU : Set X\nhx : x ∈ U\nhU : IsOpen U\n⊢ U ∈ ↑(Ultrafilter.map Ultrafilter.lim FF)\n[PROOFSTEP]\nexact mem_coe.2 (c2 _ _ (by rwa [← c1]) hU)\n[GOAL]\nX : Type u_1\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nFF : Ultrafilter (Ultrafilter X)\nx : X := Ultrafilter.lim (Ultrafilter.map Ultrafilter.lim FF)\nc1 : x = Ultrafilter.lim (Ultrafilter.map Ultrafilter.lim FF)\nc2 : ∀ (U : Set X) (F : Ultrafilter X), Ultrafilter.lim F ∈ U → IsOpen U → U ∈ F\nU : Set X\nhx : x ∈ U\nhU : IsOpen U\n⊢ Ultrafilter.lim (Ultrafilter.map Ultrafilter.lim FF) ∈ U\n[PROOFSTEP]\nrwa [← c1]\n[GOAL]\ncase h\nX : Type u_1\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nFF : Ultrafilter (Ultrafilter X)\nx : X := Ultrafilter.lim (Ultrafilter.map Ultrafilter.lim FF)\nc1 : x = Ultrafilter.lim (Ultrafilter.map Ultrafilter.lim FF)\nc2 : ∀ (U : Set X) (F : Ultrafilter X), Ultrafilter.lim F ∈ U → IsOpen U → U ∈ F\nc3 : ↑(Ultrafilter.map Ultrafilter.lim FF) ≤ 𝓝 x\n⊢ (NatTrans.app (Monad.μ β) X ≫ Ultrafilter.lim) FF = (β.toFunctor.map Ultrafilter.lim ≫ Ultrafilter.lim) FF\n[PROOFSTEP]\nhave c4 : ∀ U : Set X, x ∈ U → IsOpen U → {G : Ultrafilter X | U ∈ G} ∈ FF :=\n by\n intro U hx hU\n suffices Ultrafilter.lim ⁻¹' U ∈ FF by\n apply mem_of_superset this\n intro P hP\n exact c2 U P hP hU\n exact @c3 U (IsOpen.mem_nhds hU hx)\n[GOAL]\nX : Type u_1\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nFF : Ultrafilter (Ultrafilter X)\nx : X := Ultrafilter.lim (Ultrafilter.map Ultrafilter.lim FF)\nc1 : x = Ultrafilter.lim (Ultrafilter.map Ultrafilter.lim FF)\nc2 : ∀ (U : Set X) (F : Ultrafilter X), Ultrafilter.lim F ∈ U → IsOpen U → U ∈ F\nc3 : ↑(Ultrafilter.map Ultrafilter.lim FF) ≤ 𝓝 x\n⊢ ∀ (U : Set X), x ∈ U → IsOpen U → {G | U ∈ G} ∈ FF\n[PROOFSTEP]\nintro U hx hU\n[GOAL]\nX : Type u_1\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nFF : Ultrafilter (Ultrafilter X)\nx : X := Ultrafilter.lim (Ultrafilter.map Ultrafilter.lim FF)\nc1 : x = Ultrafilter.lim (Ultrafilter.map Ultrafilter.lim FF)\nc2 : ∀ (U : Set X) (F : Ultrafilter X), Ultrafilter.lim F ∈ U → IsOpen U → U ∈ F\nc3 : ↑(Ultrafilter.map Ultrafilter.lim FF) ≤ 𝓝 x\nU : Set X\nhx : x ∈ U\nhU : IsOpen U\n⊢ {G | U ∈ G} ∈ FF\n[PROOFSTEP]\nsuffices Ultrafilter.lim ⁻¹' U ∈ FF by\n apply mem_of_superset this\n intro P hP\n exact c2 U P hP hU\n[GOAL]\nX : Type u_1\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nFF : Ultrafilter (Ultrafilter X)\nx : X := Ultrafilter.lim (Ultrafilter.map Ultrafilter.lim FF)\nc1 : x = Ultrafilter.lim (Ultrafilter.map Ultrafilter.lim FF)\nc2 : ∀ (U : Set X) (F : Ultrafilter X), Ultrafilter.lim F ∈ U → IsOpen U → U ∈ F\nc3 : ↑(Ultrafilter.map Ultrafilter.lim FF) ≤ 𝓝 x\nU : Set X\nhx : x ∈ U\nhU : IsOpen U\nthis : Ultrafilter.lim ⁻¹' U ∈ FF\n⊢ {G | U ∈ G} ∈ FF\n[PROOFSTEP]\napply mem_of_superset this\n[GOAL]\nX : Type u_1\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nFF : Ultrafilter (Ultrafilter X)\nx : X := Ultrafilter.lim (Ultrafilter.map Ultrafilter.lim FF)\nc1 : x = Ultrafilter.lim (Ultrafilter.map Ultrafilter.lim FF)\nc2 : ∀ (U : Set X) (F : Ultrafilter X), Ultrafilter.lim F ∈ U → IsOpen U → U ∈ F\nc3 : ↑(Ultrafilter.map Ultrafilter.lim FF) ≤ 𝓝 x\nU : Set X\nhx : x ∈ U\nhU : IsOpen U\nthis : Ultrafilter.lim ⁻¹' U ∈ FF\n⊢ Ultrafilter.lim ⁻¹' U ⊆ {G | U ∈ G}\n[PROOFSTEP]\nintro P hP\n[GOAL]\nX : Type u_1\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nFF : Ultrafilter (Ultrafilter X)\nx : X := Ultrafilter.lim (Ultrafilter.map Ultrafilter.lim FF)\nc1 : x = Ultrafilter.lim (Ultrafilter.map Ultrafilter.lim FF)\nc2 : ∀ (U : Set X) (F : Ultrafilter X), Ultrafilter.lim F ∈ U → IsOpen U → U ∈ F\nc3 : ↑(Ultrafilter.map Ultrafilter.lim FF) ≤ 𝓝 x\nU : Set X\nhx : x ∈ U\nhU : IsOpen U\nthis : Ultrafilter.lim ⁻¹' U ∈ FF\nP : Ultrafilter X\nhP : P ∈ Ultrafilter.lim ⁻¹' U\n⊢ P ∈ {G | U ∈ G}\n[PROOFSTEP]\nexact c2 U P hP hU\n[GOAL]\nX : Type u_1\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nFF : Ultrafilter (Ultrafilter X)\nx : X := Ultrafilter.lim (Ultrafilter.map Ultrafilter.lim FF)\nc1 : x = Ultrafilter.lim (Ultrafilter.map Ultrafilter.lim FF)\nc2 : ∀ (U : Set X) (F : Ultrafilter X), Ultrafilter.lim F ∈ U → IsOpen U → U ∈ F\nc3 : ↑(Ultrafilter.map Ultrafilter.lim FF) ≤ 𝓝 x\nU : Set X\nhx : x ∈ U\nhU : IsOpen U\n⊢ Ultrafilter.lim ⁻¹' U ∈ FF\n[PROOFSTEP]\nexact @c3 U (IsOpen.mem_nhds hU hx)\n[GOAL]\ncase h\nX : Type u_1\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nFF : Ultrafilter (Ultrafilter X)\nx : X := Ultrafilter.lim (Ultrafilter.map Ultrafilter.lim FF)\nc1 : x = Ultrafilter.lim (Ultrafilter.map Ultrafilter.lim FF)\nc2 : ∀ (U : Set X) (F : Ultrafilter X), Ultrafilter.lim F ∈ U → IsOpen U → U ∈ F\nc3 : ↑(Ultrafilter.map Ultrafilter.lim FF) ≤ 𝓝 x\nc4 : ∀ (U : Set X), x ∈ U → IsOpen U → {G | U ∈ G} ∈ FF\n⊢ (NatTrans.app (Monad.μ β) X ≫ Ultrafilter.lim) FF = (β.toFunctor.map Ultrafilter.lim ≫ Ultrafilter.lim) FF\n[PROOFSTEP]\napply lim_eq\n[GOAL]\ncase h.h\nX : Type u_1\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nFF : Ultrafilter (Ultrafilter X)\nx : X := Ultrafilter.lim (Ultrafilter.map Ultrafilter.lim FF)\nc1 : x = Ultrafilter.lim (Ultrafilter.map Ultrafilter.lim FF)\nc2 : ∀ (U : Set X) (F : Ultrafilter X), Ultrafilter.lim F ∈ U → IsOpen U → U ∈ F\nc3 : ↑(Ultrafilter.map Ultrafilter.lim FF) ≤ 𝓝 x\nc4 : ∀ (U : Set X), x ∈ U → IsOpen U → {G | U ∈ G} ∈ FF\n⊢ ↑(NatTrans.app (Monad.μ β) X FF) ≤ 𝓝 ((β.toFunctor.map Ultrafilter.lim ≫ Ultrafilter.lim) FF)\n[PROOFSTEP]\nrw [le_nhds_iff]\n[GOAL]\ncase h.h\nX : Type u_1\ninst✝² : TopologicalSpace X\ninst✝¹ : CompactSpace X\ninst✝ : T2Space X\nFF : Ultrafilter (Ultrafilter X)\nx : X := Ultrafilter.lim (Ultrafilter.map Ultrafilter.lim FF)\nc1 : x = Ultrafilter.lim (Ultrafilter.map Ultrafilter.lim FF)\nc2 : ∀ (U : Set X) (F : Ultrafilter X), Ultrafilter.lim F ∈ U → IsOpen U → U ∈ F\nc3 : ↑(Ultrafilter.map Ultrafilter.lim FF) ≤ 𝓝 x\nc4 : ∀ (U : Set X), x ∈ U → IsOpen U → {G | U ∈ G} ∈ FF\n⊢ ∀ (s : Set X),\n (β.toFunctor.map Ultrafilter.lim ≫ Ultrafilter.lim) FF ∈ s → IsOpen s → s ∈ ↑(NatTrans.app (Monad.μ β) X FF)\n[PROOFSTEP]\nexact c4\n[GOAL]\nX Y : Compactum\nf : X.A → Y.A\ncont : Continuous f\n⊢ β.toFunctor.map f ≫ Y.a = X.a ≫ f\n[PROOFSTEP]\nrw [continuous_iff_ultrafilter] at cont \n[GOAL]\nX Y : Compactum\nf : X.A → Y.A\ncont : ∀ (x : X.A) (g : Ultrafilter X.A), ↑g ≤ 𝓝 x → Tendsto f (↑g) (𝓝 (f x))\n⊢ β.toFunctor.map f ≫ Y.a = X.a ≫ f\n[PROOFSTEP]\next (F : Ultrafilter X)\n[GOAL]\ncase h\nX Y : Compactum\nf : X.A → Y.A\ncont : ∀ (x : X.A) (g : Ultrafilter X.A), ↑g ≤ 𝓝 x → Tendsto f (↑g) (𝓝 (f x))\nF : Ultrafilter X.A\n⊢ (β.toFunctor.map f ≫ Y.a) F = (X.a ≫ f) F\n[PROOFSTEP]\nspecialize cont (X.str F) F (le_nhds_of_str_eq F (X.str F) rfl)\n[GOAL]\ncase h\nX Y : Compactum\nf : X.A → Y.A\nF : Ultrafilter X.A\ncont : Tendsto f (↑F) (𝓝 (f (str X F)))\n⊢ (β.toFunctor.map f ≫ Y.a) F = (X.a ≫ f) F\n[PROOFSTEP]\nsimp only [types_comp_apply, ofTypeFunctor_map]\n[GOAL]\ncase h\nX Y : Compactum\nf : X.A → Y.A\nF : Ultrafilter X.A\ncont : Tendsto f (↑F) (𝓝 (f (str X F)))\n⊢ Monad.Algebra.a Y (β.toFunctor.map f F) = f (Monad.Algebra.a X F)\n[PROOFSTEP]\nexact str_eq_of_le_nhds (Ultrafilter.map f F) _ cont\n[GOAL]\n⊢ ∀ {X Y : Compactum}, Function.Injective compactumToCompHaus.map\n[PROOFSTEP]\nintro _ _ _ _ h\n[GOAL]\nX✝ Y✝ : Compactum\na₁✝ a₂✝ : X✝ ⟶ Y✝\nh : compactumToCompHaus.map a₁✝ = compactumToCompHaus.map a₂✝\n⊢ a₁✝ = a₂✝\n[PROOFSTEP]\napply Monad.Algebra.Hom.ext\n[GOAL]\ncase f\nX✝ Y✝ : Compactum\na₁✝ a₂✝ : X✝ ⟶ Y✝\nh : compactumToCompHaus.map a₁✝ = compactumToCompHaus.map a₂✝\n⊢ a₁✝.f = a₂✝.f\n[PROOFSTEP]\napply congrArg (fun f => f.toFun) h\n[GOAL]\nD : CompHaus\nx✝ : Set ↑D.toTop\nh : IsOpen x✝\n⊢ IsOpen (id ⁻¹' x✝)\n[PROOFSTEP]\nrw [isOpen_iff_ultrafilter'] at h \n[GOAL]\nD : CompHaus\nx✝ : Set ↑D.toTop\nh : ∀ (F : Ultrafilter ↑D.toTop), Ultrafilter.lim F ∈ x✝ → x✝ ∈ ↑F\n⊢ IsOpen (id ⁻¹' x✝)\n[PROOFSTEP]\nexact h\n[GOAL]\nD : CompHaus\nx✝ : Set ↑(compactumToCompHaus.obj (Compactum.ofTopologicalSpace ↑D.toTop)).toTop\nh1 : IsOpen x✝\n⊢ IsOpen (id ⁻¹' x✝)\n[PROOFSTEP]\nrw [isOpen_iff_ultrafilter']\n[GOAL]\nD : CompHaus\nx✝ : Set ↑(compactumToCompHaus.obj (Compactum.ofTopologicalSpace ↑D.toTop)).toTop\nh1 : IsOpen x✝\n⊢ ∀ (F : Ultrafilter ↑D.toTop), Ultrafilter.lim F ∈ id ⁻¹' x✝ → id ⁻¹' x✝ ∈ ↑F\n[PROOFSTEP]\nintro _ h2\n[GOAL]\nD : CompHaus\nx✝ : Set ↑(compactumToCompHaus.obj (Compactum.ofTopologicalSpace ↑D.toTop)).toTop\nh1 : IsOpen x✝\nF✝ : Ultrafilter ↑D.toTop\nh2 : Ultrafilter.lim F✝ ∈ id ⁻¹' x✝\n⊢ id ⁻¹' x✝ ∈ ↑F✝\n[PROOFSTEP]\nexact h1 _ h2\n[GOAL]\n⊢ IsEquivalence compactumToCompHaus\n[PROOFSTEP]\nhave := compactumToCompHaus.full\n[GOAL]\nthis : Full compactumToCompHaus\n⊢ IsEquivalence compactumToCompHaus\n[PROOFSTEP]\nhave := compactumToCompHaus.faithful\n[GOAL]\nthis✝ : Full compactumToCompHaus\nthis : Faithful compactumToCompHaus\n⊢ IsEquivalence compactumToCompHaus\n[PROOFSTEP]\nhave := compactumToCompHaus.essSurj\n[GOAL]\nthis✝¹ : Full compactumToCompHaus\nthis✝ : Faithful compactumToCompHaus\nthis : EssSurj compactumToCompHaus\n⊢ IsEquivalence compactumToCompHaus\n[PROOFSTEP]\napply Equivalence.ofFullyFaithfullyEssSurj _\n[GOAL]\n⊢ CreatesLimits (forget CompHaus)\n[PROOFSTEP]\nlet e : forget CompHaus ≅ compactumToCompHaus.inv ⋙ Compactum.forget :=\n (((forget CompHaus).leftUnitor.symm ≪≫\n isoWhiskerRight compactumToCompHaus.asEquivalence.symm.unitIso (forget CompHaus)) ≪≫\n compactumToCompHaus.inv.associator compactumToCompHaus (forget CompHaus)) ≪≫\n isoWhiskerLeft _ compactumToCompHausCompForget\n[GOAL]\ne : forget CompHaus ≅ Functor.inv compactumToCompHaus ⋙ Compactum.forget :=\n (((Functor.leftUnitor (forget CompHaus)).symm ≪≫\n isoWhiskerRight (CategoryTheory.Equivalence.symm (Functor.asEquivalence compactumToCompHaus)).unitIso\n (forget CompHaus)) ≪≫\n Functor.associator (Functor.inv compactumToCompHaus) compactumToCompHaus (forget CompHaus)) ≪≫\n isoWhiskerLeft (Functor.inv compactumToCompHaus) compactumToCompHausCompForget\n⊢ CreatesLimits (forget CompHaus)\n[PROOFSTEP]\nexact createsLimitsOfNatIso e.symm\n[GOAL]\n⊢ CreatesLimits (forget Profinite)\n[PROOFSTEP]\nchange CreatesLimits (profiniteToCompHaus ⋙ forget _)\n[GOAL]\n⊢ CreatesLimits (profiniteToCompHaus ⋙ forget CompHaus)\n[PROOFSTEP]\ninfer_instance\n", "meta": {"mathlib_filename": "Mathlib.Topology.Category.Compactum", "llama_tokens": 51519, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO", "lm_q1_score": 0.43398146480389854, "lm_q2_score": 0.016914911439287056, "lm_q1q2_score": 0.007340758043450016}} {"text": "[GOAL]\nX : TopCat\nT : ↑X → Type v\nU : (Opens ↑X)ᵒᵖ\n⊢ { obj := fun U => (x : { x // x ∈ U.unop }) → T ↑x,\n map := fun {U V} i g x => g ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x) }.map\n (𝟙 U) =\n 𝟙\n ({ obj := fun U => (x : { x // x ∈ U.unop }) → T ↑x,\n map := fun {U V} i g x => g ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x) }.obj\n U)\n[PROOFSTEP]\next g\n[GOAL]\ncase h\nX : TopCat\nT : ↑X → Type v\nU : (Opens ↑X)ᵒᵖ\ng :\n { obj := fun U => (x : { x // x ∈ U.unop }) → T ↑x,\n map := fun {U V} i g x => g ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x) }.obj\n U\n⊢ { obj := fun U => (x : { x // x ∈ U.unop }) → T ↑x,\n map := fun {U V} i g x => g ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x) }.map\n (𝟙 U) g =\n 𝟙\n ({ obj := fun U => (x : { x // x ∈ U.unop }) → T ↑x,\n map := fun {U V} i g x => g ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x) }.obj\n U)\n g\n[PROOFSTEP]\nrfl\n[GOAL]\nX : TopCat\nT : Type v\nU : (Opens ↑X)ᵒᵖ\n⊢ { obj := fun U => { x // x ∈ U.unop } → T,\n map := fun {U V} i g => g ∘ fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) } }.map\n (𝟙 U) =\n 𝟙\n ({ obj := fun U => { x // x ∈ U.unop } → T,\n map := fun {U V} i g => g ∘ fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) } }.obj\n U)\n[PROOFSTEP]\next g\n[GOAL]\ncase h\nX : TopCat\nT : Type v\nU : (Opens ↑X)ᵒᵖ\ng :\n { obj := fun U => { x // x ∈ U.unop } → T,\n map := fun {U V} i g => g ∘ fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) } }.obj\n U\n⊢ { obj := fun U => { x // x ∈ U.unop } → T,\n map := fun {U V} i g => g ∘ fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) } }.map\n (𝟙 U) g =\n 𝟙\n ({ obj := fun U => { x // x ∈ U.unop } → T,\n map := fun {U V} i g => g ∘ fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) } }.obj\n U)\n g\n[PROOFSTEP]\nrfl\n[GOAL]\nX✝ : TopCat\nX : TopCatᵒᵖ\nR : TopCommRingCat\n⊢ CommRing C(↑X.unop, ↑((forget₂ TopCommRingCat TopCat).obj R))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nX✝ : TopCat\nX Y : TopCatᵒᵖ\nf : X ⟶ Y\nR : TopCommRingCat\n⊢ ∀ (x y : ↑(continuousFunctions X R)),\n OneHom.toFun { toFun := fun g => f.unop ≫ g, map_one' := (_ : (fun g => f.unop ≫ g) 1 = (fun g => f.unop ≫ g) 1) }\n (x * y) =\n OneHom.toFun { toFun := fun g => f.unop ≫ g, map_one' := (_ : (fun g => f.unop ≫ g) 1 = (fun g => f.unop ≫ g) 1) }\n x *\n OneHom.toFun\n { toFun := fun g => f.unop ≫ g, map_one' := (_ : (fun g => f.unop ≫ g) 1 = (fun g => f.unop ≫ g) 1) } y\n[PROOFSTEP]\naesop_cat\n[GOAL]\nX✝ : TopCat\nX Y : TopCatᵒᵖ\nf : X ⟶ Y\nR : TopCommRingCat\n⊢ ∀ (x y : ↑(continuousFunctions X R)),\n OneHom.toFun\n (↑{\n toOneHom :=\n { toFun := fun g => f.unop ≫ g, map_one' := (_ : (fun g => f.unop ≫ g) 1 = (fun g => f.unop ≫ g) 1) },\n map_mul' :=\n (_ :\n ∀ (x y : ↑(continuousFunctions X R)),\n OneHom.toFun\n { toFun := fun g => f.unop ≫ g,\n map_one' := (_ : (fun g => f.unop ≫ g) 1 = (fun g => f.unop ≫ g) 1) }\n (x * y) =\n OneHom.toFun\n { toFun := fun g => f.unop ≫ g,\n map_one' := (_ : (fun g => f.unop ≫ g) 1 = (fun g => f.unop ≫ g) 1) }\n x *\n OneHom.toFun\n { toFun := fun g => f.unop ≫ g,\n map_one' := (_ : (fun g => f.unop ≫ g) 1 = (fun g => f.unop ≫ g) 1) }\n y) })\n (x + y) =\n OneHom.toFun\n (↑{\n toOneHom :=\n { toFun := fun g => f.unop ≫ g, map_one' := (_ : (fun g => f.unop ≫ g) 1 = (fun g => f.unop ≫ g) 1) },\n map_mul' :=\n (_ :\n ∀ (x y : ↑(continuousFunctions X R)),\n OneHom.toFun\n { toFun := fun g => f.unop ≫ g,\n map_one' := (_ : (fun g => f.unop ≫ g) 1 = (fun g => f.unop ≫ g) 1) }\n (x * y) =\n OneHom.toFun\n { toFun := fun g => f.unop ≫ g,\n map_one' := (_ : (fun g => f.unop ≫ g) 1 = (fun g => f.unop ≫ g) 1) }\n x *\n OneHom.toFun\n { toFun := fun g => f.unop ≫ g,\n map_one' := (_ : (fun g => f.unop ≫ g) 1 = (fun g => f.unop ≫ g) 1) }\n y) })\n x +\n OneHom.toFun\n (↑{\n toOneHom :=\n { toFun := fun g => f.unop ≫ g, map_one' := (_ : (fun g => f.unop ≫ g) 1 = (fun g => f.unop ≫ g) 1) },\n map_mul' :=\n (_ :\n ∀ (x y : ↑(continuousFunctions X R)),\n OneHom.toFun\n { toFun := fun g => f.unop ≫ g,\n map_one' := (_ : (fun g => f.unop ≫ g) 1 = (fun g => f.unop ≫ g) 1) }\n (x * y) =\n OneHom.toFun\n { toFun := fun g => f.unop ≫ g,\n map_one' := (_ : (fun g => f.unop ≫ g) 1 = (fun g => f.unop ≫ g) 1) }\n x *\n OneHom.toFun\n { toFun := fun g => f.unop ≫ g,\n map_one' := (_ : (fun g => f.unop ≫ g) 1 = (fun g => f.unop ≫ g) 1) }\n y) })\n y\n[PROOFSTEP]\naesop_cat\n[GOAL]\nX✝ : TopCat\nR : TopCommRingCat\nX : TopCatᵒᵖ\n⊢ { obj := fun X => continuousFunctions X R, map := fun {X Y} f => continuousFunctions.pullback f R }.map (𝟙 X) =\n 𝟙 ({ obj := fun X => continuousFunctions X R, map := fun {X Y} f => continuousFunctions.pullback f R }.obj X)\n[PROOFSTEP]\next\n[GOAL]\ncase w\nX✝ : TopCat\nR : TopCommRingCat\nX : TopCatᵒᵖ\nx✝ :\n (forget CommRingCat).obj\n ({ obj := fun X => continuousFunctions X R, map := fun {X Y} f => continuousFunctions.pullback f R }.obj X)\n⊢ ↑({ obj := fun X => continuousFunctions X R, map := fun {X Y} f => continuousFunctions.pullback f R }.map (𝟙 X)) x✝ =\n ↑(𝟙 ({ obj := fun X => continuousFunctions X R, map := fun {X Y} f => continuousFunctions.pullback f R }.obj X)) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nX✝ : TopCat\nX : TopCommRingCat\n⊢ {\n obj := fun R =>\n CategoryTheory.Functor.mk\n { obj := fun X => continuousFunctions X R, map := fun {X Y} f => continuousFunctions.pullback f R },\n map := fun {R S} φ => NatTrans.mk fun X => continuousFunctions.map X φ }.map\n (𝟙 X) =\n 𝟙\n ({\n obj := fun R =>\n CategoryTheory.Functor.mk\n { obj := fun X => continuousFunctions X R, map := fun {X Y} f => continuousFunctions.pullback f R },\n map := fun {R S} φ => NatTrans.mk fun X => continuousFunctions.map X φ }.obj\n X)\n[PROOFSTEP]\next\n[GOAL]\ncase w.h.w\nX✝ : TopCat\nX : TopCommRingCat\nx✝¹ : TopCatᵒᵖ\nx✝ :\n (forget CommRingCat).obj\n (({\n obj := fun R =>\n CategoryTheory.Functor.mk\n { obj := fun X => continuousFunctions X R, map := fun {X Y} f => continuousFunctions.pullback f R },\n map := fun {R S} φ => NatTrans.mk fun X => continuousFunctions.map X φ }.obj\n X).obj\n x✝¹)\n⊢ ↑(NatTrans.app\n ({\n obj := fun R =>\n CategoryTheory.Functor.mk\n { obj := fun X => continuousFunctions X R, map := fun {X Y} f => continuousFunctions.pullback f R },\n map := fun {R S} φ => NatTrans.mk fun X => continuousFunctions.map X φ }.map\n (𝟙 X))\n x✝¹)\n x✝ =\n ↑(NatTrans.app\n (𝟙\n ({\n obj := fun R =>\n CategoryTheory.Functor.mk\n { obj := fun X => continuousFunctions X R,\n map := fun {X Y} f => continuousFunctions.pullback f R },\n map := fun {R S} φ => NatTrans.mk fun X => continuousFunctions.map X φ }.obj\n X))\n x✝¹)\n x✝\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.Topology.Sheaves.PresheafOfFunctions", "llama_tokens": 3317, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO", "lm_q1_score": 0.4687906414693485, "lm_q2_score": 0.014957083739073663, "lm_q1q2_score": 0.007011740880551104}} {"text": "[GOAL]\nR : CommRingCatᵒᵖ\n⊢ { obj := fun R => topObj R.unop, map := fun {R S} f => topMap f.unop }.map (𝟙 R) =\n 𝟙 ({ obj := fun R => topObj R.unop, map := fun {R S} f => topMap f.unop }.obj R)\n[PROOFSTEP]\ndsimp\n[GOAL]\nR : CommRingCatᵒᵖ\n⊢ topMap (𝟙 R.unop) = 𝟙 (topObj R.unop)\n[PROOFSTEP]\nrw [Spec.topMap_id]\n[GOAL]\nR S T : CommRingCatᵒᵖ\nf : R ⟶ S\ng : S ⟶ T\n⊢ { obj := fun R => topObj R.unop, map := fun {R S} f => topMap f.unop }.map (f ≫ g) =\n { obj := fun R => topObj R.unop, map := fun {R S} f => topMap f.unop }.map f ≫\n { obj := fun R => topObj R.unop, map := fun {R S} f => topMap f.unop }.map g\n[PROOFSTEP]\ndsimp\n[GOAL]\nR S T : CommRingCatᵒᵖ\nf : R ⟶ S\ng : S ⟶ T\n⊢ topMap (g.unop ≫ f.unop) = topMap f.unop ≫ topMap g.unop\n[PROOFSTEP]\nrw [Spec.topMap_comp]\n[GOAL]\nR : CommRingCat\n⊢ (sheafedSpaceMap (𝟙 R)).c ≫\n whiskerRight\n (eqToHom\n (_ :\n (TopologicalSpace.Opens.map (sheafedSpaceMap (𝟙 R)).base).op =\n (TopologicalSpace.Opens.map (𝟙 (sheafedSpaceObj R)).base).op))\n (sheafedSpaceObj R).toPresheafedSpace.presheaf =\n (𝟙 (sheafedSpaceObj R)).c\n[PROOFSTEP]\next U\n[GOAL]\ncase w.w\nR : CommRingCat\nU : TopologicalSpace.Opens ↑↑(sheafedSpaceObj R).toPresheafedSpace\nx✝ : (forget CommRingCat).obj ((sheafedSpaceObj R).toPresheafedSpace.presheaf.obj (op U))\n⊢ ↑(NatTrans.app\n ((sheafedSpaceMap (𝟙 R)).c ≫\n whiskerRight\n (eqToHom\n (_ :\n (TopologicalSpace.Opens.map (sheafedSpaceMap (𝟙 R)).base).op =\n (TopologicalSpace.Opens.map (𝟙 (sheafedSpaceObj R)).base).op))\n (sheafedSpaceObj R).toPresheafedSpace.presheaf)\n (op U))\n x✝ =\n ↑(NatTrans.app (𝟙 (sheafedSpaceObj R)).c (op U)) x✝\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase w.w\nR : CommRingCat\nU : TopologicalSpace.Opens ↑↑(sheafedSpaceObj R).toPresheafedSpace\nx✝ : (forget CommRingCat).obj ((sheafedSpaceObj R).toPresheafedSpace.presheaf.obj (op U))\n⊢ ↑(NatTrans.app\n ((sheafedSpaceMap (𝟙 R)).c ≫\n whiskerRight (𝟙 (TopologicalSpace.Opens.map (topMap (𝟙 R))).op) (structureSheaf ↑R).val)\n (op U))\n x✝ =\n ↑(NatTrans.app (𝟙 (sheafedSpaceObj R)).c (op U)) x✝\n[PROOFSTEP]\nerw [NatTrans.comp_app, sheafedSpaceMap_c_app, PresheafedSpace.id_c_app, comap_id]\n[GOAL]\ncase w.w\nR : CommRingCat\nU : TopologicalSpace.Opens ↑↑(sheafedSpaceObj R).toPresheafedSpace\nx✝ : (forget CommRingCat).obj ((sheafedSpaceObj R).toPresheafedSpace.presheaf.obj (op U))\n⊢ ↑(eqToHom\n (_ :\n (structureSheaf ↑R).val.obj (op (op U).unop) =\n (structureSheaf ↑R).val.obj (op ((TopologicalSpace.Opens.map (topMap (𝟙 R))).obj (op U).unop))) ≫\n NatTrans.app (whiskerRight (𝟙 (TopologicalSpace.Opens.map (topMap (𝟙 R))).op) (structureSheaf ↑R).val) (op U))\n x✝ =\n ↑((sheafedSpaceObj R).toPresheafedSpace.presheaf.map (𝟙 (op U))) x✝\ncase w.w.hUV\nR : CommRingCat\nU : TopologicalSpace.Opens ↑↑(sheafedSpaceObj R).toPresheafedSpace\nx✝ : (forget CommRingCat).obj ((sheafedSpaceObj R).toPresheafedSpace.presheaf.obj (op U))\n⊢ (op U).unop = (TopologicalSpace.Opens.map (topMap (𝟙 R))).obj (op U).unop\n[PROOFSTEP]\nswap\n[GOAL]\ncase w.w.hUV\nR : CommRingCat\nU : TopologicalSpace.Opens ↑↑(sheafedSpaceObj R).toPresheafedSpace\nx✝ : (forget CommRingCat).obj ((sheafedSpaceObj R).toPresheafedSpace.presheaf.obj (op U))\n⊢ (op U).unop = (TopologicalSpace.Opens.map (topMap (𝟙 R))).obj (op U).unop\n[PROOFSTEP]\nrw [Spec.topMap_id, TopologicalSpace.Opens.map_id_obj_unop]\n[GOAL]\ncase w.w\nR : CommRingCat\nU : TopologicalSpace.Opens ↑↑(sheafedSpaceObj R).toPresheafedSpace\nx✝ : (forget CommRingCat).obj ((sheafedSpaceObj R).toPresheafedSpace.presheaf.obj (op U))\n⊢ ↑(eqToHom\n (_ :\n (structureSheaf ↑R).val.obj (op (op U).unop) =\n (structureSheaf ↑R).val.obj (op ((TopologicalSpace.Opens.map (topMap (𝟙 R))).obj (op U).unop))) ≫\n NatTrans.app (whiskerRight (𝟙 (TopologicalSpace.Opens.map (topMap (𝟙 R))).op) (structureSheaf ↑R).val) (op U))\n x✝ =\n ↑((sheafedSpaceObj R).toPresheafedSpace.presheaf.map (𝟙 (op U))) x✝\n[PROOFSTEP]\nsimp [eqToHom_map]\n[GOAL]\nR S T : CommRingCat\nf : R ⟶ S\ng : S ⟶ T\n⊢ (sheafedSpaceMap (f ≫ g)).c ≫\n whiskerRight\n (eqToHom\n (_ :\n (TopologicalSpace.Opens.map (sheafedSpaceMap (f ≫ g)).base).op =\n (TopologicalSpace.Opens.map (sheafedSpaceMap g ≫ sheafedSpaceMap f).base).op))\n (sheafedSpaceObj T).toPresheafedSpace.presheaf =\n (sheafedSpaceMap g ≫ sheafedSpaceMap f).c\n[PROOFSTEP]\next\n -- Porting note : was one liner\n -- `dsimp, rw category_theory.functor.map_id, rw category.comp_id, erw comap_comp f g, refl`\n[GOAL]\ncase w.w\nR S T : CommRingCat\nf : R ⟶ S\ng : S ⟶ T\nU✝ : TopologicalSpace.Opens ↑↑(sheafedSpaceObj R).toPresheafedSpace\nx✝ : (forget CommRingCat).obj ((sheafedSpaceObj R).toPresheafedSpace.presheaf.obj (op U✝))\n⊢ ↑(NatTrans.app\n ((sheafedSpaceMap (f ≫ g)).c ≫\n whiskerRight\n (eqToHom\n (_ :\n (TopologicalSpace.Opens.map (sheafedSpaceMap (f ≫ g)).base).op =\n (TopologicalSpace.Opens.map (sheafedSpaceMap g ≫ sheafedSpaceMap f).base).op))\n (sheafedSpaceObj T).toPresheafedSpace.presheaf)\n (op U✝))\n x✝ =\n ↑(NatTrans.app (sheafedSpaceMap g ≫ sheafedSpaceMap f).c (op U✝)) x✝\n[PROOFSTEP]\nrw [NatTrans.comp_app, sheafedSpaceMap_c_app, whiskerRight_app, eqToHom_refl]\n[GOAL]\ncase w.w\nR S T : CommRingCat\nf : R ⟶ S\ng : S ⟶ T\nU✝ : TopologicalSpace.Opens ↑↑(sheafedSpaceObj R).toPresheafedSpace\nx✝ : (forget CommRingCat).obj ((sheafedSpaceObj R).toPresheafedSpace.presheaf.obj (op U✝))\n⊢ ↑(comap (f ≫ g) (op U✝).unop ((TopologicalSpace.Opens.map (topMap (f ≫ g))).obj (op U✝).unop)\n (_ :\n ∀ (x : ↑(PrimeSpectrum.Top ↑T)),\n x ∈ ((TopologicalSpace.Opens.map (topMap (f ≫ g))).obj (op U✝).unop).carrier →\n x ∈ ((TopologicalSpace.Opens.map (topMap (f ≫ g))).obj (op U✝).unop).carrier) ≫\n (sheafedSpaceObj T).toPresheafedSpace.presheaf.map\n (NatTrans.app (𝟙 (TopologicalSpace.Opens.map (sheafedSpaceMap (f ≫ g)).base).op) (op U✝)))\n x✝ =\n ↑(NatTrans.app (sheafedSpaceMap g ≫ sheafedSpaceMap f).c (op U✝)) x✝\n[PROOFSTEP]\nerw [(sheafedSpaceObj T).presheaf.map_id, Category.comp_id, comap_comp]\n[GOAL]\ncase w.w\nR S T : CommRingCat\nf : R ⟶ S\ng : S ⟶ T\nU✝ : TopologicalSpace.Opens ↑↑(sheafedSpaceObj R).toPresheafedSpace\nx✝ : (forget CommRingCat).obj ((sheafedSpaceObj R).toPresheafedSpace.presheaf.obj (op U✝))\n⊢ ↑(RingHom.comp (comap g ?w.w.V ((TopologicalSpace.Opens.map (topMap (f ≫ g))).obj (op U✝).unop) ?w.w.hVW)\n (comap f (op U✝).unop ?w.w.V ?w.w.hUV))\n x✝ =\n ↑(NatTrans.app (sheafedSpaceMap g ≫ sheafedSpaceMap f).c (op U✝)) x✝\ncase w.w.V\nR S T : CommRingCat\nf : R ⟶ S\ng : S ⟶ T\nU✝ : TopologicalSpace.Opens ↑↑(sheafedSpaceObj R).toPresheafedSpace\nx✝ : (forget CommRingCat).obj ((sheafedSpaceObj R).toPresheafedSpace.presheaf.obj (op U✝))\n⊢ TopologicalSpace.Opens ↑(PrimeSpectrum.Top ↑S)\ncase w.w.hUV\nR S T : CommRingCat\nf : R ⟶ S\ng : S ⟶ T\nU✝ : TopologicalSpace.Opens ↑↑(sheafedSpaceObj R).toPresheafedSpace\nx✝ : (forget CommRingCat).obj ((sheafedSpaceObj R).toPresheafedSpace.presheaf.obj (op U✝))\n⊢ ∀ (p : ↑(PrimeSpectrum.Top ↑S)), p ∈ ?w.w.V → ↑(PrimeSpectrum.comap f) p ∈ (op U✝).unop\ncase w.w.hVW\nR S T : CommRingCat\nf : R ⟶ S\ng : S ⟶ T\nU✝ : TopologicalSpace.Opens ↑↑(sheafedSpaceObj R).toPresheafedSpace\nx✝ : (forget CommRingCat).obj ((sheafedSpaceObj R).toPresheafedSpace.presheaf.obj (op U✝))\n⊢ ∀ (p : ↑(PrimeSpectrum.Top ↑T)),\n p ∈ (TopologicalSpace.Opens.map (topMap (f ≫ g))).obj (op U✝).unop → ↑(PrimeSpectrum.comap g) p ∈ ?w.w.V\n[PROOFSTEP]\nrfl\n[GOAL]\nR : CommRingCatᵒᵖ\n⊢ { obj := fun R => sheafedSpaceObj R.unop, map := fun {X Y} f => sheafedSpaceMap f.unop }.map (𝟙 R) =\n 𝟙 ({ obj := fun R => sheafedSpaceObj R.unop, map := fun {X Y} f => sheafedSpaceMap f.unop }.obj R)\n[PROOFSTEP]\ndsimp\n[GOAL]\nR : CommRingCatᵒᵖ\n⊢ sheafedSpaceMap (𝟙 R.unop) = 𝟙 (sheafedSpaceObj R.unop)\n[PROOFSTEP]\nrw [Spec.sheafedSpaceMap_id]\n[GOAL]\nX✝ Y✝ Z✝ : CommRingCatᵒᵖ\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\n⊢ { obj := fun R => sheafedSpaceObj R.unop, map := fun {X Y} f => sheafedSpaceMap f.unop }.map (f ≫ g) =\n { obj := fun R => sheafedSpaceObj R.unop, map := fun {X Y} f => sheafedSpaceMap f.unop }.map f ≫\n { obj := fun R => sheafedSpaceObj R.unop, map := fun {X Y} f => sheafedSpaceMap f.unop }.map g\n[PROOFSTEP]\ndsimp\n[GOAL]\nX✝ Y✝ Z✝ : CommRingCatᵒᵖ\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\n⊢ sheafedSpaceMap (g.unop ≫ f.unop) = sheafedSpaceMap f.unop ≫ sheafedSpaceMap g.unop\n[PROOFSTEP]\nrw [Spec.sheafedSpaceMap_comp]\n[GOAL]\nX : RingedSpace\nR : CommRingCat\nα β : X ⟶ sheafedSpaceObj R\nw : α.base = β.base\nr : ↑R\nU : TopologicalSpace.Opens (PrimeSpectrum ↑R) := PrimeSpectrum.basicOpen r\n⊢ (TopologicalSpace.Opens.map α.base).op.obj (op U) = (TopologicalSpace.Opens.map β.base).op.obj (op U)\n[PROOFSTEP]\nrw [w]\n[GOAL]\nX : RingedSpace\nR : CommRingCat\nα β : X ⟶ sheafedSpaceObj R\nw : α.base = β.base\nh :\n ∀ (r : ↑R),\n let U := PrimeSpectrum.basicOpen r;\n (toOpen (↑R) U ≫ NatTrans.app α.c (op U)) ≫\n X.presheaf.map\n (eqToHom\n (_ :\n (TopologicalSpace.Opens.map α.base).op.obj (op U) = (TopologicalSpace.Opens.map β.base).op.obj (op U))) =\n toOpen (↑R) U ≫ NatTrans.app β.c (op U)\n⊢ α = β\n[PROOFSTEP]\next : 1\n[GOAL]\ncase w\nX : RingedSpace\nR : CommRingCat\nα β : X ⟶ sheafedSpaceObj R\nw : α.base = β.base\nh :\n ∀ (r : ↑R),\n let U := PrimeSpectrum.basicOpen r;\n (toOpen (↑R) U ≫ NatTrans.app α.c (op U)) ≫\n X.presheaf.map\n (eqToHom\n (_ :\n (TopologicalSpace.Opens.map α.base).op.obj (op U) = (TopologicalSpace.Opens.map β.base).op.obj (op U))) =\n toOpen (↑R) U ≫ NatTrans.app β.c (op U)\n⊢ α.base = β.base\n[PROOFSTEP]\nexact w\n[GOAL]\ncase h\nX : RingedSpace\nR : CommRingCat\nα β : X ⟶ sheafedSpaceObj R\nw : α.base = β.base\nh :\n ∀ (r : ↑R),\n let U := PrimeSpectrum.basicOpen r;\n (toOpen (↑R) U ≫ NatTrans.app α.c (op U)) ≫\n X.presheaf.map\n (eqToHom\n (_ :\n (TopologicalSpace.Opens.map α.base).op.obj (op U) = (TopologicalSpace.Opens.map β.base).op.obj (op U))) =\n toOpen (↑R) U ≫ NatTrans.app β.c (op U)\n⊢ α.c ≫\n whiskerRight (eqToHom (_ : (TopologicalSpace.Opens.map α.base).op = (TopologicalSpace.Opens.map β.base).op))\n X.presheaf =\n β.c\n[PROOFSTEP]\napply ((TopCat.Sheaf.pushforward β.base).obj X.sheaf).hom_ext _ PrimeSpectrum.isBasis_basic_opens\n[GOAL]\ncase h\nX : RingedSpace\nR : CommRingCat\nα β : X ⟶ sheafedSpaceObj R\nw : α.base = β.base\nh :\n ∀ (r : ↑R),\n let U := PrimeSpectrum.basicOpen r;\n (toOpen (↑R) U ≫ NatTrans.app α.c (op U)) ≫\n X.presheaf.map\n (eqToHom\n (_ :\n (TopologicalSpace.Opens.map α.base).op.obj (op U) = (TopologicalSpace.Opens.map β.base).op.obj (op U))) =\n toOpen (↑R) U ≫ NatTrans.app β.c (op U)\n⊢ ∀ (i : ↑R),\n NatTrans.app\n (α.c ≫\n whiskerRight (eqToHom (_ : (TopologicalSpace.Opens.map α.base).op = (TopologicalSpace.Opens.map β.base).op))\n X.presheaf)\n (op (PrimeSpectrum.basicOpen i)) =\n NatTrans.app β.c (op (PrimeSpectrum.basicOpen i))\n[PROOFSTEP]\nintro r\n[GOAL]\ncase h\nX : RingedSpace\nR : CommRingCat\nα β : X ⟶ sheafedSpaceObj R\nw : α.base = β.base\nh :\n ∀ (r : ↑R),\n let U := PrimeSpectrum.basicOpen r;\n (toOpen (↑R) U ≫ NatTrans.app α.c (op U)) ≫\n X.presheaf.map\n (eqToHom\n (_ :\n (TopologicalSpace.Opens.map α.base).op.obj (op U) = (TopologicalSpace.Opens.map β.base).op.obj (op U))) =\n toOpen (↑R) U ≫ NatTrans.app β.c (op U)\nr : ↑R\n⊢ NatTrans.app\n (α.c ≫\n whiskerRight (eqToHom (_ : (TopologicalSpace.Opens.map α.base).op = (TopologicalSpace.Opens.map β.base).op))\n X.presheaf)\n (op (PrimeSpectrum.basicOpen r)) =\n NatTrans.app β.c (op (PrimeSpectrum.basicOpen r))\n[PROOFSTEP]\napply\n (StructureSheaf.to_basicOpen_epi R r).1\n -- Porting note : was a one-liner `simpa using h r`\n[GOAL]\ncase h.a\nX : RingedSpace\nR : CommRingCat\nα β : X ⟶ sheafedSpaceObj R\nw : α.base = β.base\nh :\n ∀ (r : ↑R),\n let U := PrimeSpectrum.basicOpen r;\n (toOpen (↑R) U ≫ NatTrans.app α.c (op U)) ≫\n X.presheaf.map\n (eqToHom\n (_ :\n (TopologicalSpace.Opens.map α.base).op.obj (op U) = (TopologicalSpace.Opens.map β.base).op.obj (op U))) =\n toOpen (↑R) U ≫ NatTrans.app β.c (op U)\nr : ↑R\n⊢ toOpen (↑R) (PrimeSpectrum.basicOpen r) ≫\n NatTrans.app\n (α.c ≫\n whiskerRight (eqToHom (_ : (TopologicalSpace.Opens.map α.base).op = (TopologicalSpace.Opens.map β.base).op))\n X.presheaf)\n (op (PrimeSpectrum.basicOpen r)) =\n toOpen (↑R) (PrimeSpectrum.basicOpen r) ≫ NatTrans.app β.c (op (PrimeSpectrum.basicOpen r))\n[PROOFSTEP]\nspecialize h r\n[GOAL]\ncase h.a\nX : RingedSpace\nR : CommRingCat\nα β : X ⟶ sheafedSpaceObj R\nw : α.base = β.base\nr : ↑R\nh :\n let U := PrimeSpectrum.basicOpen r;\n (toOpen (↑R) U ≫ NatTrans.app α.c (op U)) ≫\n X.presheaf.map\n (eqToHom\n (_ : (TopologicalSpace.Opens.map α.base).op.obj (op U) = (TopologicalSpace.Opens.map β.base).op.obj (op U))) =\n toOpen (↑R) U ≫ NatTrans.app β.c (op U)\n⊢ toOpen (↑R) (PrimeSpectrum.basicOpen r) ≫\n NatTrans.app\n (α.c ≫\n whiskerRight (eqToHom (_ : (TopologicalSpace.Opens.map α.base).op = (TopologicalSpace.Opens.map β.base).op))\n X.presheaf)\n (op (PrimeSpectrum.basicOpen r)) =\n toOpen (↑R) (PrimeSpectrum.basicOpen r) ≫ NatTrans.app β.c (op (PrimeSpectrum.basicOpen r))\n[PROOFSTEP]\nsimp only [sheafedSpaceObj_carrier, Functor.op_obj, unop_op, TopCat.Presheaf.pushforwardObj_obj,\n sheafedSpaceObj_presheaf, Category.assoc] at h \n[GOAL]\ncase h.a\nX : RingedSpace\nR : CommRingCat\nα β : X ⟶ sheafedSpaceObj R\nw : α.base = β.base\nr : ↑R\nh :\n toOpen (↑R) (PrimeSpectrum.basicOpen r) ≫\n NatTrans.app α.c (op (PrimeSpectrum.basicOpen r)) ≫\n X.presheaf.map\n (eqToHom\n (_ :\n (TopologicalSpace.Opens.map α.base).op.obj (op (PrimeSpectrum.basicOpen r)) =\n (TopologicalSpace.Opens.map β.base).op.obj (op (PrimeSpectrum.basicOpen r)))) =\n toOpen (↑R) (PrimeSpectrum.basicOpen r) ≫ NatTrans.app β.c (op (PrimeSpectrum.basicOpen r))\n⊢ toOpen (↑R) (PrimeSpectrum.basicOpen r) ≫\n NatTrans.app\n (α.c ≫\n whiskerRight (eqToHom (_ : (TopologicalSpace.Opens.map α.base).op = (TopologicalSpace.Opens.map β.base).op))\n X.presheaf)\n (op (PrimeSpectrum.basicOpen r)) =\n toOpen (↑R) (PrimeSpectrum.basicOpen r) ≫ NatTrans.app β.c (op (PrimeSpectrum.basicOpen r))\n[PROOFSTEP]\nrw [NatTrans.comp_app, ← h]\n[GOAL]\ncase h.a\nX : RingedSpace\nR : CommRingCat\nα β : X ⟶ sheafedSpaceObj R\nw : α.base = β.base\nr : ↑R\nh :\n toOpen (↑R) (PrimeSpectrum.basicOpen r) ≫\n NatTrans.app α.c (op (PrimeSpectrum.basicOpen r)) ≫\n X.presheaf.map\n (eqToHom\n (_ :\n (TopologicalSpace.Opens.map α.base).op.obj (op (PrimeSpectrum.basicOpen r)) =\n (TopologicalSpace.Opens.map β.base).op.obj (op (PrimeSpectrum.basicOpen r)))) =\n toOpen (↑R) (PrimeSpectrum.basicOpen r) ≫ NatTrans.app β.c (op (PrimeSpectrum.basicOpen r))\n⊢ toOpen (↑R) (PrimeSpectrum.basicOpen r) ≫\n NatTrans.app α.c (op (PrimeSpectrum.basicOpen r)) ≫\n NatTrans.app\n (whiskerRight (eqToHom (_ : (TopologicalSpace.Opens.map α.base).op = (TopologicalSpace.Opens.map β.base).op))\n X.presheaf)\n (op (PrimeSpectrum.basicOpen r)) =\n toOpen (↑R) (PrimeSpectrum.basicOpen r) ≫\n NatTrans.app α.c (op (PrimeSpectrum.basicOpen r)) ≫\n X.presheaf.map\n (eqToHom\n (_ :\n (TopologicalSpace.Opens.map α.base).op.obj (op (PrimeSpectrum.basicOpen r)) =\n (TopologicalSpace.Opens.map β.base).op.obj (op (PrimeSpectrum.basicOpen r))))\n[PROOFSTEP]\ncongr\n[GOAL]\ncase h.a.e_a.e_a\nX : RingedSpace\nR : CommRingCat\nα β : X ⟶ sheafedSpaceObj R\nw : α.base = β.base\nr : ↑R\nh :\n toOpen (↑R) (PrimeSpectrum.basicOpen r) ≫\n NatTrans.app α.c (op (PrimeSpectrum.basicOpen r)) ≫\n X.presheaf.map\n (eqToHom\n (_ :\n (TopologicalSpace.Opens.map α.base).op.obj (op (PrimeSpectrum.basicOpen r)) =\n (TopologicalSpace.Opens.map β.base).op.obj (op (PrimeSpectrum.basicOpen r)))) =\n toOpen (↑R) (PrimeSpectrum.basicOpen r) ≫ NatTrans.app β.c (op (PrimeSpectrum.basicOpen r))\n⊢ NatTrans.app\n (whiskerRight (eqToHom (_ : (TopologicalSpace.Opens.map α.base).op = (TopologicalSpace.Opens.map β.base).op))\n X.presheaf)\n (op (PrimeSpectrum.basicOpen r)) =\n X.presheaf.map\n (eqToHom\n (_ :\n (TopologicalSpace.Opens.map α.base).op.obj (op (PrimeSpectrum.basicOpen r)) =\n (TopologicalSpace.Opens.map β.base).op.obj (op (PrimeSpectrum.basicOpen r))))\n[PROOFSTEP]\nsimp\n[GOAL]\nR S : CommRingCat\nf : R ⟶ S\np : PrimeSpectrum ↑S\n⊢ toStalk (↑R) (↑(PrimeSpectrum.comap f) p) ≫ PresheafedSpace.stalkMap (Spec.sheafedSpaceMap f) p = f ≫ toStalk (↑S) p\n[PROOFSTEP]\nerw [← toOpen_germ S ⊤ ⟨p, trivial⟩, ← toOpen_germ R ⊤ ⟨PrimeSpectrum.comap f p, trivial⟩, Category.assoc,\n PresheafedSpace.stalkMap_germ (Spec.sheafedSpaceMap f) ⊤ ⟨p, trivial⟩, Spec.sheafedSpaceMap_c_app,\n toOpen_comp_comap_assoc]\n[GOAL]\nR S : CommRingCat\nf : R ⟶ S\np : PrimeSpectrum ↑S\n⊢ CommRingCat.ofHom f ≫\n toOpen (↑S) (↑(TopologicalSpace.Opens.comap (PrimeSpectrum.comap f)) ⊤) ≫\n TopCat.Presheaf.germ (Spec.sheafedSpaceObj S).toPresheafedSpace.presheaf { val := p, property := trivial } =\n f ≫ toOpen ↑S ⊤ ≫ TopCat.Presheaf.germ (TopCat.Sheaf.presheaf (structureSheaf ↑S)) { val := p, property := trivial }\n[PROOFSTEP]\nrfl\n[GOAL]\nR S : CommRingCat\nf : R ⟶ S\np : PrimeSpectrum ↑S\nx : ↑R\n⊢ ↑(((stalkIso (↑R) (↑(PrimeSpectrum.comap f) p)).inv ≫ PresheafedSpace.stalkMap (Spec.sheafedSpaceMap f) p) ≫\n (stalkIso (↑S) p).hom)\n (↑(algebraMap (↑R) (Localization.AtPrime (↑(PrimeSpectrum.comap f) p).asIdeal)) x) =\n ↑(algebraMap ((fun x => ↑S) x) (Localization.AtPrime p.asIdeal)) (↑f x)\n[PROOFSTEP]\nrw [stalkIso_hom, stalkIso_inv, comp_apply, comp_apply, localizationToStalk_of]\n[GOAL]\nR S : CommRingCat\nf : R ⟶ S\np : PrimeSpectrum ↑S\nx : ↑R\n⊢ ↑(stalkToFiberRingHom (↑S) p)\n (↑(PresheafedSpace.stalkMap (Spec.sheafedSpaceMap f) p) (↑(toStalk (↑R) (↑(PrimeSpectrum.comap f) p)) x)) =\n ↑(algebraMap ((fun x => ↑S) x) (Localization.AtPrime p.asIdeal)) (↑f x)\n[PROOFSTEP]\nerw [stalkMap_toStalk_apply f p x, stalkToFiberRingHom_toStalk]\n[GOAL]\nR S : CommRingCat\nf : R ⟶ S\np : ↑↑(locallyRingedSpaceObj S).toSheafedSpace.toPresheafedSpace\na : ↑(PresheafedSpace.stalk (locallyRingedSpaceObj R).toSheafedSpace.toPresheafedSpace (↑(sheafedSpaceMap f).base p))\nha : IsUnit (↑(PresheafedSpace.stalkMap (sheafedSpaceMap f) p) a)\n⊢ IsUnit a\n[PROOFSTEP]\nerw [← localRingHom_comp_stalkIso_apply] at ha \n[GOAL]\nR S : CommRingCat\nf : R ⟶ S\np : ↑↑(locallyRingedSpaceObj S).toSheafedSpace.toPresheafedSpace\na : ↑(PresheafedSpace.stalk (locallyRingedSpaceObj R).toSheafedSpace.toPresheafedSpace (↑(sheafedSpaceMap f).base p))\nha :\n IsUnit\n (↑(localizationToStalk (↑S) p)\n (↑(Localization.localRingHom (↑(PrimeSpectrum.comap f) p).asIdeal p.asIdeal f\n (_ : (↑(PrimeSpectrum.comap f) p).asIdeal = (↑(PrimeSpectrum.comap f) p).asIdeal))\n (↑(stalkToFiberRingHom (↑R) (↑(PrimeSpectrum.comap f) p)) a)))\n⊢ IsUnit a\n[PROOFSTEP]\nreplace ha := (stalkIso S p).hom.isUnit_map ha\n[GOAL]\nR S : CommRingCat\nf : R ⟶ S\np : ↑↑(locallyRingedSpaceObj S).toSheafedSpace.toPresheafedSpace\na : ↑(PresheafedSpace.stalk (locallyRingedSpaceObj R).toSheafedSpace.toPresheafedSpace (↑(sheafedSpaceMap f).base p))\nha :\n IsUnit\n (↑(stalkIso (↑S) p).hom\n (↑(localizationToStalk (↑S) p)\n (↑(Localization.localRingHom (↑(PrimeSpectrum.comap f) p).asIdeal p.asIdeal f\n (_ : (↑(PrimeSpectrum.comap f) p).asIdeal = (↑(PrimeSpectrum.comap f) p).asIdeal))\n (↑(stalkToFiberRingHom (↑R) (↑(PrimeSpectrum.comap f) p)) a))))\n⊢ IsUnit a\n[PROOFSTEP]\nrw [← comp_apply, show localizationToStalk S p = (stalkIso S p).inv from rfl, Iso.inv_hom_id, id_apply] at ha \n[GOAL]\nR S : CommRingCat\nf : R ⟶ S\np : ↑↑(locallyRingedSpaceObj S).toSheafedSpace.toPresheafedSpace\na : ↑(PresheafedSpace.stalk (locallyRingedSpaceObj R).toSheafedSpace.toPresheafedSpace (↑(sheafedSpaceMap f).base p))\nha :\n IsUnit\n (↑(Localization.localRingHom (↑(PrimeSpectrum.comap f) p).asIdeal p.asIdeal f\n (_ : (↑(PrimeSpectrum.comap f) p).asIdeal = (↑(PrimeSpectrum.comap f) p).asIdeal))\n (↑(stalkToFiberRingHom (↑R) (↑(PrimeSpectrum.comap f) p)) a))\n⊢ IsUnit a\n[PROOFSTEP]\nreplace ha := IsLocalRingHom.map_nonunit (R := Localization.AtPrime (PrimeSpectrum.comap f p).asIdeal) _ ha\n[GOAL]\nR S : CommRingCat\nf : R ⟶ S\np : ↑↑(locallyRingedSpaceObj S).toSheafedSpace.toPresheafedSpace\na : ↑(PresheafedSpace.stalk (locallyRingedSpaceObj R).toSheafedSpace.toPresheafedSpace (↑(sheafedSpaceMap f).base p))\nha : IsUnit (↑(stalkToFiberRingHom (↑R) (↑(PrimeSpectrum.comap f) p)) a)\n⊢ IsUnit a\n[PROOFSTEP]\nconvert RingHom.isUnit_map (stalkIso R (PrimeSpectrum.comap f p)).inv ha\n[GOAL]\ncase h.e'_3.h\nR S : CommRingCat\nf : R ⟶ S\np : ↑↑(locallyRingedSpaceObj S).toSheafedSpace.toPresheafedSpace\na : ↑(PresheafedSpace.stalk (locallyRingedSpaceObj R).toSheafedSpace.toPresheafedSpace (↑(sheafedSpaceMap f).base p))\nha : IsUnit (↑(stalkToFiberRingHom (↑R) (↑(PrimeSpectrum.comap f) p)) a)\ne_1✝ :\n ↑(PresheafedSpace.stalk (locallyRingedSpaceObj R).toSheafedSpace.toPresheafedSpace (↑(sheafedSpaceMap f).base p)) =\n (fun x => ↑(TopCat.Presheaf.stalk (TopCat.Sheaf.presheaf (structureSheaf ↑R)) (↑(PrimeSpectrum.comap f) p)))\n (↑(stalkToFiberRingHom (↑R) (↑(PrimeSpectrum.comap f) p)) a)\n⊢ a = ↑(stalkIso (↑R) (↑(PrimeSpectrum.comap f) p)).inv (↑(stalkToFiberRingHom (↑R) (↑(PrimeSpectrum.comap f) p)) a)\n[PROOFSTEP]\nerw [← comp_apply, show stalkToFiberRingHom R _ = (stalkIso _ _).hom from rfl, Iso.hom_inv_id, id_apply]\n[GOAL]\nR : CommRingCat\n⊢ (locallyRingedSpaceMap (𝟙 R)).val = (𝟙 (locallyRingedSpaceObj R)).val\n[PROOFSTEP]\nrw [Spec.locallyRingedSpaceMap_val, Spec.sheafedSpaceMap_id]\n[GOAL]\nR : CommRingCat\n⊢ 𝟙 (sheafedSpaceObj R) = (𝟙 (locallyRingedSpaceObj R)).val\n[PROOFSTEP]\nrfl\n[GOAL]\nR S T : CommRingCat\nf : R ⟶ S\ng : S ⟶ T\n⊢ (locallyRingedSpaceMap (f ≫ g)).val = (locallyRingedSpaceMap g ≫ locallyRingedSpaceMap f).val\n[PROOFSTEP]\nrw [Spec.locallyRingedSpaceMap_val, Spec.sheafedSpaceMap_comp]\n[GOAL]\nR S T : CommRingCat\nf : R ⟶ S\ng : S ⟶ T\n⊢ sheafedSpaceMap g ≫ sheafedSpaceMap f = (locallyRingedSpaceMap g ≫ locallyRingedSpaceMap f).val\n[PROOFSTEP]\nrfl\n[GOAL]\nR : CommRingCatᵒᵖ\n⊢ { obj := fun R => locallyRingedSpaceObj R.unop, map := fun {X Y} f => locallyRingedSpaceMap f.unop }.map (𝟙 R) =\n 𝟙 ({ obj := fun R => locallyRingedSpaceObj R.unop, map := fun {X Y} f => locallyRingedSpaceMap f.unop }.obj R)\n[PROOFSTEP]\ndsimp\n[GOAL]\nR : CommRingCatᵒᵖ\n⊢ locallyRingedSpaceMap (𝟙 R.unop) = 𝟙 (locallyRingedSpaceObj R.unop)\n[PROOFSTEP]\nrw [Spec.locallyRingedSpaceMap_id]\n[GOAL]\nX✝ Y✝ Z✝ : CommRingCatᵒᵖ\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\n⊢ { obj := fun R => locallyRingedSpaceObj R.unop, map := fun {X Y} f => locallyRingedSpaceMap f.unop }.map (f ≫ g) =\n { obj := fun R => locallyRingedSpaceObj R.unop, map := fun {X Y} f => locallyRingedSpaceMap f.unop }.map f ≫\n { obj := fun R => locallyRingedSpaceObj R.unop, map := fun {X Y} f => locallyRingedSpaceMap f.unop }.map g\n[PROOFSTEP]\ndsimp\n[GOAL]\nX✝ Y✝ Z✝ : CommRingCatᵒᵖ\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\n⊢ locallyRingedSpaceMap (g.unop ≫ f.unop) = locallyRingedSpaceMap f.unop ≫ locallyRingedSpaceMap g.unop\n[PROOFSTEP]\nrw [Spec.locallyRingedSpaceMap_comp]\n[GOAL]\nR : CommRingCat\n⊢ IsIso (toSpecΓ R)\n[PROOFSTEP]\ncases R\n[GOAL]\ncase mk\nα✝ : Type ?u.412830\nstr✝ : CommRing α✝\n⊢ IsIso (toSpecΓ (Bundled.mk α✝))\n[PROOFSTEP]\napply StructureSheaf.isIso_to_global\n[GOAL]\nR S : CommRingCat\nf : R ⟶ S\n⊢ f ≫ toSpecΓ S = toSpecΓ R ≫ Γ.map (Spec.toLocallyRingedSpace.map f.op).op\n[PROOFSTEP]\nrefine RingHom.ext fun x => Subtype.ext <| funext fun x' => ?_\n[GOAL]\nR S : CommRingCat\nf : R ⟶ S\nx : ↑R\nx' : { x // x ∈ (op ⊤).unop }\n⊢ ↑(↑(f ≫ toSpecΓ S) x) x' = ↑(↑(toSpecΓ R ≫ Γ.map (Spec.toLocallyRingedSpace.map f.op).op) x) x'\n[PROOFSTEP]\nsymm\n[GOAL]\nR S : CommRingCat\nf : R ⟶ S\nx : ↑R\nx' : { x // x ∈ (op ⊤).unop }\n⊢ ↑(↑(toSpecΓ R ≫ Γ.map (Spec.toLocallyRingedSpace.map f.op).op) x) x' = ↑(↑(f ≫ toSpecΓ S) x) x'\n[PROOFSTEP]\napply Localization.localRingHom_to_map\n[GOAL]\nX Y : CommRingCat\nf : X ⟶ Y\n⊢ (𝟭 CommRingCat).map f ≫ ((fun R => asIso (toSpecΓ R)) Y).hom =\n ((fun R => asIso (toSpecΓ R)) X).hom ≫ (Spec.toLocallyRingedSpace.rightOp ⋙ Γ).map f\n[PROOFSTEP]\nexact Spec_Γ_naturality (R := X) (S := Y) f\n[GOAL]\nR : CommRingCat\nM : Submonoid ↑R\nx : PrimeSpectrum (Localization M)\n⊢ IsIso\n (PresheafedSpace.stalkMap (Spec.toPresheafedSpace.map (CommRingCat.ofHom (algebraMap (↑R) (Localization M))).op) x)\n[PROOFSTEP]\nerw [← localRingHom_comp_stalkIso]\n -- Porting note: replaced `apply (config := { instances := false })`.\n -- See https://github.com/leanprover/lean4/issues/2273\n[GOAL]\nR : CommRingCat\nM : Submonoid ↑R\nx : PrimeSpectrum (Localization M)\n⊢ IsIso\n ((stalkIso (↑(op (CommRingCat.of ↑R)).unop)\n (↑(PrimeSpectrum.comap (CommRingCat.ofHom (algebraMap (↑R) (Localization M))).op.unop) x)).hom ≫\n Localization.localRingHom\n (↑(PrimeSpectrum.comap (CommRingCat.ofHom (algebraMap (↑R) (Localization M))).op.unop) x).asIdeal x.asIdeal\n (CommRingCat.ofHom (algebraMap (↑R) (Localization M))).op.unop\n (_ :\n (↑(PrimeSpectrum.comap (CommRingCat.ofHom (algebraMap (↑R) (Localization M))).op.unop) x).asIdeal =\n (↑(PrimeSpectrum.comap (CommRingCat.ofHom (algebraMap (↑R) (Localization M))).op.unop) x).asIdeal) ≫\n (stalkIso (↑(op (CommRingCat.of (Localization M))).unop) x).inv)\n[PROOFSTEP]\nrefine @IsIso.comp_isIso _ _ _ _ _ _ _ _ (?_)\n[GOAL]\nR : CommRingCat\nM : Submonoid ↑R\nx : PrimeSpectrum (Localization M)\n⊢ IsIso\n (Localization.localRingHom\n (↑(PrimeSpectrum.comap (CommRingCat.ofHom (algebraMap (↑R) (Localization M))).op.unop) x).asIdeal x.asIdeal\n (CommRingCat.ofHom (algebraMap (↑R) (Localization M))).op.unop\n (_ :\n (↑(PrimeSpectrum.comap (CommRingCat.ofHom (algebraMap (↑R) (Localization M))).op.unop) x).asIdeal =\n (↑(PrimeSpectrum.comap (CommRingCat.ofHom (algebraMap (↑R) (Localization M))).op.unop) x).asIdeal) ≫\n (stalkIso (↑(op (CommRingCat.of (Localization M))).unop) x).inv)\n[PROOFSTEP]\nrefine\n @IsIso.comp_isIso _ _ _ _ _ _ _ (?_)\n _\n /- I do not know why this is defeq to the goal, but I'm happy to accept that it is. -/\n[GOAL]\nR : CommRingCat\nM : Submonoid ↑R\nx : PrimeSpectrum (Localization M)\n⊢ IsIso\n (Localization.localRingHom\n (↑(PrimeSpectrum.comap (CommRingCat.ofHom (algebraMap (↑R) (Localization M))).op.unop) x).asIdeal x.asIdeal\n (CommRingCat.ofHom (algebraMap (↑R) (Localization M))).op.unop\n (_ :\n (↑(PrimeSpectrum.comap (CommRingCat.ofHom (algebraMap (↑R) (Localization M))).op.unop) x).asIdeal =\n (↑(PrimeSpectrum.comap (CommRingCat.ofHom (algebraMap (↑R) (Localization M))).op.unop) x).asIdeal))\n[PROOFSTEP]\nshow IsIso (IsLocalization.localizationLocalizationAtPrimeIsoLocalization M x.asIdeal).toRingEquiv.toCommRingCatIso.hom\n[GOAL]\nR : CommRingCat\nM : Submonoid ↑R\nx : PrimeSpectrum (Localization M)\n⊢ IsIso\n (RingEquiv.toCommRingCatIso\n (AlgEquiv.toRingEquiv (IsLocalization.localizationLocalizationAtPrimeIsoLocalization M x.asIdeal))).hom\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR S : CommRingCat\nf : R ⟶ S\np : PrimeSpectrum ↑R\n⊢ f ≫ toPushforwardStalk f p =\n toStalk (↑R) p ≫ (TopCat.Presheaf.stalkFunctor CommRingCat p).map (Spec.sheafedSpaceMap f).c\n[PROOFSTEP]\nrw [StructureSheaf.toStalk]\n[GOAL]\nR S : CommRingCat\nf : R ⟶ S\np : PrimeSpectrum ↑R\n⊢ f ≫ toPushforwardStalk f p =\n (toOpen ↑R ⊤ ≫\n TopCat.Presheaf.germ (TopCat.Sheaf.presheaf (structureSheaf ↑R)) { val := p, property := True.intro }) ≫\n (TopCat.Presheaf.stalkFunctor CommRingCat p).map (Spec.sheafedSpaceMap f).c\n[PROOFSTEP]\nerw [Category.assoc]\n[GOAL]\nR S : CommRingCat\nf : R ⟶ S\np : PrimeSpectrum ↑R\n⊢ f ≫ toPushforwardStalk f p =\n toOpen ↑R ⊤ ≫\n TopCat.Presheaf.germ (TopCat.Sheaf.presheaf (structureSheaf ↑R)) { val := p, property := True.intro } ≫\n (TopCat.Presheaf.stalkFunctor CommRingCat p).map (Spec.sheafedSpaceMap f).c\n[PROOFSTEP]\nrw [TopCat.Presheaf.stalkFunctor_map_germ]\n[GOAL]\nR S : CommRingCat\nf : R ⟶ S\np : PrimeSpectrum ↑R\n⊢ f ≫ toPushforwardStalk f p =\n toOpen ↑R ⊤ ≫\n NatTrans.app (Spec.sheafedSpaceMap f).c (op ⊤) ≫\n TopCat.Presheaf.germ ((Spec.sheafedSpaceMap f).base _* (Spec.sheafedSpaceObj S).toPresheafedSpace.presheaf)\n { val := p, property := True.intro }\n[PROOFSTEP]\nexact Spec_Γ_naturality_assoc f _\n[GOAL]\nR S : CommRingCat\nf : R ⟶ S\np : PrimeSpectrum ↑R\ninst✝ : Algebra ↑R ↑S\ny : ↑(TopCat.Presheaf.stalk (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) p)\n⊢ ∃ x, x.snd • y = ↑(toPushforwardStalkAlgHom R S p) x.fst\n[PROOFSTEP]\nobtain ⟨U, hp, s, e⟩ := TopCat.Presheaf.germ_exist (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf S).val) _ y\n[GOAL]\ncase intro.intro.intro\nR S : CommRingCat\nf : R ⟶ S\np : PrimeSpectrum ↑R\ninst✝ : Algebra ↑R ↑S\ny : ↑(TopCat.Presheaf.stalk (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) p)\nU : TopologicalSpace.Opens ↑(Spec.topObj R)\nhp : p ∈ U\ns : (forget CommRingCat).obj ((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).obj (op U))\ne :\n ↑(TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) { val := p, property := hp }) s = y\n⊢ ∃ x, x.snd • y = ↑(toPushforwardStalkAlgHom R S p) x.fst\n[PROOFSTEP]\nobtain ⟨_, ⟨r, rfl⟩, hpr : p ∈ PrimeSpectrum.basicOpen r, hrU : PrimeSpectrum.basicOpen r ≤ U⟩ :=\n PrimeSpectrum.isTopologicalBasis_basic_opens.exists_subset_of_mem_open (show p ∈ U from hp) U.2\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nR S : CommRingCat\nf : R ⟶ S\np : PrimeSpectrum ↑R\ninst✝ : Algebra ↑R ↑S\ny : ↑(TopCat.Presheaf.stalk (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) p)\nU : TopologicalSpace.Opens ↑(Spec.topObj R)\nhp : p ∈ U\ns : (forget CommRingCat).obj ((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).obj (op U))\ne :\n ↑(TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) { val := p, property := hp }) s = y\nr : ↑R\nhpr : p ∈ PrimeSpectrum.basicOpen r\nhrU : PrimeSpectrum.basicOpen r ≤ U\n⊢ ∃ x, x.snd • y = ↑(toPushforwardStalkAlgHom R S p) x.fst\n[PROOFSTEP]\nchange PrimeSpectrum.basicOpen r ≤ U at hrU \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nR S : CommRingCat\nf : R ⟶ S\np : PrimeSpectrum ↑R\ninst✝ : Algebra ↑R ↑S\ny : ↑(TopCat.Presheaf.stalk (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) p)\nU : TopologicalSpace.Opens ↑(Spec.topObj R)\nhp : p ∈ U\ns : (forget CommRingCat).obj ((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).obj (op U))\ne :\n ↑(TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) { val := p, property := hp }) s = y\nr : ↑R\nhpr : p ∈ PrimeSpectrum.basicOpen r\nhrU : PrimeSpectrum.basicOpen r ≤ U\n⊢ ∃ x, x.snd • y = ↑(toPushforwardStalkAlgHom R S p) x.fst\n[PROOFSTEP]\nreplace e := ((Spec.topMap (algebraMap R S) _* (structureSheaf S).1).germ_res_apply (homOfLE hrU) ⟨p, hpr⟩ _).trans e\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nR S : CommRingCat\nf : R ⟶ S\np : PrimeSpectrum ↑R\ninst✝ : Algebra ↑R ↑S\ny : ↑(TopCat.Presheaf.stalk (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) p)\nU : TopologicalSpace.Opens ↑(Spec.topObj R)\nhp : p ∈ U\ns : (forget CommRingCat).obj ((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).obj (op U))\nr : ↑R\nhpr : p ∈ PrimeSpectrum.basicOpen r\nhrU : PrimeSpectrum.basicOpen r ≤ U\ne :\n ↑(TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) { val := p, property := hpr })\n (↑((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).map (homOfLE hrU).op) s) =\n y\n⊢ ∃ x, x.snd • y = ↑(toPushforwardStalkAlgHom R S p) x.fst\n[PROOFSTEP]\nset s' := (Spec.topMap (algebraMap R S) _* (structureSheaf S).1).map (homOfLE hrU).op s with h\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nR S : CommRingCat\nf : R ⟶ S\np : PrimeSpectrum ↑R\ninst✝ : Algebra ↑R ↑S\ny : ↑(TopCat.Presheaf.stalk (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) p)\nU : TopologicalSpace.Opens ↑(Spec.topObj R)\nhp : p ∈ U\ns : (forget CommRingCat).obj ((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).obj (op U))\nr : ↑R\nhpr : p ∈ PrimeSpectrum.basicOpen r\nhrU : PrimeSpectrum.basicOpen r ≤ U\ns' : (forget CommRingCat).obj\n ((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).obj (op (PrimeSpectrum.basicOpen r))) :=\n ↑((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).map (homOfLE hrU).op) s\ne :\n ↑(TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) { val := p, property := hpr }) s' =\n y\nh : s' = ↑((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).map (homOfLE hrU).op) s\n⊢ ∃ x, x.snd • y = ↑(toPushforwardStalkAlgHom R S p) x.fst\n[PROOFSTEP]\nreplace e : ((Spec.topMap (algebraMap R S) _* (structureSheaf S).val).germ ⟨p, hpr⟩) s' = y\n[GOAL]\ncase e\nR S : CommRingCat\nf : R ⟶ S\np : PrimeSpectrum ↑R\ninst✝ : Algebra ↑R ↑S\ny : ↑(TopCat.Presheaf.stalk (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) p)\nU : TopologicalSpace.Opens ↑(Spec.topObj R)\nhp : p ∈ U\ns : (forget CommRingCat).obj ((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).obj (op U))\nr : ↑R\nhpr : p ∈ PrimeSpectrum.basicOpen r\nhrU : PrimeSpectrum.basicOpen r ≤ U\ns' : (forget CommRingCat).obj\n ((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).obj (op (PrimeSpectrum.basicOpen r))) :=\n ↑((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).map (homOfLE hrU).op) s\ne :\n ↑(TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) { val := p, property := hpr }) s' =\n y\nh : s' = ↑((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).map (homOfLE hrU).op) s\n⊢ ↑(TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) { val := p, property := hpr }) s' =\n y\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase e\nR S : CommRingCat\nf : R ⟶ S\np : PrimeSpectrum ↑R\ninst✝ : Algebra ↑R ↑S\ny : ↑(TopCat.Presheaf.stalk (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) p)\nU : TopologicalSpace.Opens ↑(Spec.topObj R)\nhp : p ∈ U\ns : (forget CommRingCat).obj ((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).obj (op U))\nr : ↑R\nhpr : p ∈ PrimeSpectrum.basicOpen r\nhrU : PrimeSpectrum.basicOpen r ≤ U\ns' : (forget CommRingCat).obj\n ((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).obj (op (PrimeSpectrum.basicOpen r))) :=\n ↑((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).map (homOfLE hrU).op) s\ne :\n ↑(TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) { val := p, property := hpr }) s' =\n y\nh : s' = ↑((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).map (homOfLE hrU).op) s\n⊢ ↑(TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) { val := p, property := hpr })\n (↑((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).map (homOfLE hrU).op) s) =\n y\n[PROOFSTEP]\nexact e\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nR S : CommRingCat\nf : R ⟶ S\np : PrimeSpectrum ↑R\ninst✝ : Algebra ↑R ↑S\ny : ↑(TopCat.Presheaf.stalk (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) p)\nU : TopologicalSpace.Opens ↑(Spec.topObj R)\nhp : p ∈ U\ns : (forget CommRingCat).obj ((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).obj (op U))\nr : ↑R\nhpr : p ∈ PrimeSpectrum.basicOpen r\nhrU : PrimeSpectrum.basicOpen r ≤ U\ns' : (forget CommRingCat).obj\n ((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).obj (op (PrimeSpectrum.basicOpen r))) :=\n ↑((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).map (homOfLE hrU).op) s\nh : s' = ↑((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).map (homOfLE hrU).op) s\ne :\n ↑(TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) { val := p, property := hpr }) s' =\n y\n⊢ ∃ x, x.snd • y = ↑(toPushforwardStalkAlgHom R S p) x.fst\n[PROOFSTEP]\nclear_value s'\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nR S : CommRingCat\nf : R ⟶ S\np : PrimeSpectrum ↑R\ninst✝ : Algebra ↑R ↑S\ny : ↑(TopCat.Presheaf.stalk (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) p)\nU : TopologicalSpace.Opens ↑(Spec.topObj R)\nhp : p ∈ U\ns : (forget CommRingCat).obj ((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).obj (op U))\nr : ↑R\nhpr : p ∈ PrimeSpectrum.basicOpen r\nhrU : PrimeSpectrum.basicOpen r ≤ U\ns' :\n (forget CommRingCat).obj\n ((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).obj (op (PrimeSpectrum.basicOpen r)))\nh : s' = ↑((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).map (homOfLE hrU).op) s\ne :\n ↑(TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) { val := p, property := hpr }) s' =\n y\n⊢ ∃ x, x.snd • y = ↑(toPushforwardStalkAlgHom R S p) x.fst\n[PROOFSTEP]\nclear! U\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nR S : CommRingCat\nf : R ⟶ S\np : PrimeSpectrum ↑R\ninst✝ : Algebra ↑R ↑S\ny : ↑(TopCat.Presheaf.stalk (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) p)\nr : ↑R\nhpr : p ∈ PrimeSpectrum.basicOpen r\ns' :\n (forget CommRingCat).obj\n ((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).obj (op (PrimeSpectrum.basicOpen r)))\ne :\n ↑(TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) { val := p, property := hpr }) s' =\n y\n⊢ ∃ x, x.snd • y = ↑(toPushforwardStalkAlgHom R S p) x.fst\n[PROOFSTEP]\nobtain ⟨⟨s, ⟨_, n, rfl⟩⟩, hsn⟩ :=\n @IsLocalization.surj _ _ _ _ _ _ (StructureSheaf.IsLocalization.to_basicOpen S <| algebraMap R S r) s'\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.mk.mk.intro\nR S : CommRingCat\nf : R ⟶ S\np : PrimeSpectrum ↑R\ninst✝ : Algebra ↑R ↑S\ny : ↑(TopCat.Presheaf.stalk (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) p)\nr : ↑R\nhpr : p ∈ PrimeSpectrum.basicOpen r\ns' :\n (forget CommRingCat).obj\n ((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).obj (op (PrimeSpectrum.basicOpen r)))\ne :\n ↑(TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) { val := p, property := hpr }) s' =\n y\ns : ↑S\nn : ℕ\nhsn :\n s' *\n ↑(algebraMap ↑S ↑((structureSheaf ↑S).val.obj (op (PrimeSpectrum.basicOpen (↑(algebraMap ↑R ↑S) r)))))\n ↑(s,\n { val := (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) n,\n property :=\n (_ :\n ∃ y,\n (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) y =\n (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) n) }).snd =\n ↑(algebraMap ↑S ↑((structureSheaf ↑S).val.obj (op (PrimeSpectrum.basicOpen (↑(algebraMap ↑R ↑S) r)))))\n (s,\n { val := (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) n,\n property :=\n (_ :\n ∃ y,\n (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) y =\n (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) n) }).fst\n⊢ ∃ x, x.snd • y = ↑(toPushforwardStalkAlgHom R S p) x.fst\n[PROOFSTEP]\nrefine' ⟨⟨s, ⟨r, hpr⟩ ^ n⟩, _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.mk.mk.intro\nR S : CommRingCat\nf : R ⟶ S\np : PrimeSpectrum ↑R\ninst✝ : Algebra ↑R ↑S\ny : ↑(TopCat.Presheaf.stalk (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) p)\nr : ↑R\nhpr : p ∈ PrimeSpectrum.basicOpen r\ns' :\n (forget CommRingCat).obj\n ((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).obj (op (PrimeSpectrum.basicOpen r)))\ne :\n ↑(TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) { val := p, property := hpr }) s' =\n y\ns : ↑S\nn : ℕ\nhsn :\n s' *\n ↑(algebraMap ↑S ↑((structureSheaf ↑S).val.obj (op (PrimeSpectrum.basicOpen (↑(algebraMap ↑R ↑S) r)))))\n ↑(s,\n { val := (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) n,\n property :=\n (_ :\n ∃ y,\n (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) y =\n (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) n) }).snd =\n ↑(algebraMap ↑S ↑((structureSheaf ↑S).val.obj (op (PrimeSpectrum.basicOpen (↑(algebraMap ↑R ↑S) r)))))\n (s,\n { val := (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) n,\n property :=\n (_ :\n ∃ y,\n (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) y =\n (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) n) }).fst\n⊢ (s, { val := r, property := hpr } ^ n).snd • y =\n ↑(toPushforwardStalkAlgHom R S p) (s, { val := r, property := hpr } ^ n).fst\n[PROOFSTEP]\nrw [Submonoid.smul_def, Algebra.smul_def, algebraMap_pushforward_stalk, toPushforwardStalk, comp_apply, comp_apply]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.mk.mk.intro\nR S : CommRingCat\nf : R ⟶ S\np : PrimeSpectrum ↑R\ninst✝ : Algebra ↑R ↑S\ny : ↑(TopCat.Presheaf.stalk (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) p)\nr : ↑R\nhpr : p ∈ PrimeSpectrum.basicOpen r\ns' :\n (forget CommRingCat).obj\n ((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).obj (op (PrimeSpectrum.basicOpen r)))\ne :\n ↑(TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) { val := p, property := hpr }) s' =\n y\ns : ↑S\nn : ℕ\nhsn :\n s' *\n ↑(algebraMap ↑S ↑((structureSheaf ↑S).val.obj (op (PrimeSpectrum.basicOpen (↑(algebraMap ↑R ↑S) r)))))\n ↑(s,\n { val := (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) n,\n property :=\n (_ :\n ∃ y,\n (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) y =\n (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) n) }).snd =\n ↑(algebraMap ↑S ↑((structureSheaf ↑S).val.obj (op (PrimeSpectrum.basicOpen (↑(algebraMap ↑R ↑S) r)))))\n (s,\n { val := (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) n,\n property :=\n (_ :\n ∃ y,\n (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) y =\n (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) n) }).fst\n⊢ ↑(TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) { val := p, property := trivial })\n (↑(toOpen ↑S ⊤) (↑(algebraMap ↑R ↑S) ↑(s, { val := r, property := hpr } ^ n).snd)) *\n y =\n ↑(toPushforwardStalkAlgHom R S p) (s, { val := r, property := hpr } ^ n).fst\n[PROOFSTEP]\niterate 2 erw [← (Spec.topMap (algebraMap R S) _* (structureSheaf S).1).germ_res_apply (homOfLE le_top) ⟨p, hpr⟩]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.mk.mk.intro\nR S : CommRingCat\nf : R ⟶ S\np : PrimeSpectrum ↑R\ninst✝ : Algebra ↑R ↑S\ny : ↑(TopCat.Presheaf.stalk (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) p)\nr : ↑R\nhpr : p ∈ PrimeSpectrum.basicOpen r\ns' :\n (forget CommRingCat).obj\n ((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).obj (op (PrimeSpectrum.basicOpen r)))\ne :\n ↑(TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) { val := p, property := hpr }) s' =\n y\ns : ↑S\nn : ℕ\nhsn :\n s' *\n ↑(algebraMap ↑S ↑((structureSheaf ↑S).val.obj (op (PrimeSpectrum.basicOpen (↑(algebraMap ↑R ↑S) r)))))\n ↑(s,\n { val := (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) n,\n property :=\n (_ :\n ∃ y,\n (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) y =\n (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) n) }).snd =\n ↑(algebraMap ↑S ↑((structureSheaf ↑S).val.obj (op (PrimeSpectrum.basicOpen (↑(algebraMap ↑R ↑S) r)))))\n (s,\n { val := (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) n,\n property :=\n (_ :\n ∃ y,\n (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) y =\n (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) n) }).fst\n⊢ ↑(TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) { val := p, property := trivial })\n (↑(toOpen ↑S ⊤) (↑(algebraMap ↑R ↑S) ↑(s, { val := r, property := hpr } ^ n).snd)) *\n y =\n ↑(toPushforwardStalkAlgHom R S p) (s, { val := r, property := hpr } ^ n).fst\n[PROOFSTEP]\nerw [← (Spec.topMap (algebraMap R S) _* (structureSheaf S).1).germ_res_apply (homOfLE le_top) ⟨p, hpr⟩]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.mk.mk.intro\nR S : CommRingCat\nf : R ⟶ S\np : PrimeSpectrum ↑R\ninst✝ : Algebra ↑R ↑S\ny : ↑(TopCat.Presheaf.stalk (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) p)\nr : ↑R\nhpr : p ∈ PrimeSpectrum.basicOpen r\ns' :\n (forget CommRingCat).obj\n ((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).obj (op (PrimeSpectrum.basicOpen r)))\ne :\n ↑(TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) { val := p, property := hpr }) s' =\n y\ns : ↑S\nn : ℕ\nhsn :\n s' *\n ↑(algebraMap ↑S ↑((structureSheaf ↑S).val.obj (op (PrimeSpectrum.basicOpen (↑(algebraMap ↑R ↑S) r)))))\n ↑(s,\n { val := (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) n,\n property :=\n (_ :\n ∃ y,\n (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) y =\n (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) n) }).snd =\n ↑(algebraMap ↑S ↑((structureSheaf ↑S).val.obj (op (PrimeSpectrum.basicOpen (↑(algebraMap ↑R ↑S) r)))))\n (s,\n { val := (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) n,\n property :=\n (_ :\n ∃ y,\n (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) y =\n (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) n) }).fst\n⊢ ↑(TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) { val := p, property := hpr })\n (↑((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).map\n (homOfLE (_ : PrimeSpectrum.basicOpen r ≤ ⊤)).op)\n (↑(toOpen ↑S ⊤) (↑(algebraMap ↑R ↑S) ↑(s, { val := r, property := hpr } ^ n).snd))) *\n y =\n ↑(toPushforwardStalkAlgHom R S p) (s, { val := r, property := hpr } ^ n).fst\n[PROOFSTEP]\nerw [← (Spec.topMap (algebraMap R S) _* (structureSheaf S).1).germ_res_apply (homOfLE le_top) ⟨p, hpr⟩]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.mk.mk.intro\nR S : CommRingCat\nf : R ⟶ S\np : PrimeSpectrum ↑R\ninst✝ : Algebra ↑R ↑S\ny : ↑(TopCat.Presheaf.stalk (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) p)\nr : ↑R\nhpr : p ∈ PrimeSpectrum.basicOpen r\ns' :\n (forget CommRingCat).obj\n ((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).obj (op (PrimeSpectrum.basicOpen r)))\ne :\n ↑(TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) { val := p, property := hpr }) s' =\n y\ns : ↑S\nn : ℕ\nhsn :\n s' *\n ↑(algebraMap ↑S ↑((structureSheaf ↑S).val.obj (op (PrimeSpectrum.basicOpen (↑(algebraMap ↑R ↑S) r)))))\n ↑(s,\n { val := (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) n,\n property :=\n (_ :\n ∃ y,\n (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) y =\n (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) n) }).snd =\n ↑(algebraMap ↑S ↑((structureSheaf ↑S).val.obj (op (PrimeSpectrum.basicOpen (↑(algebraMap ↑R ↑S) r)))))\n (s,\n { val := (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) n,\n property :=\n (_ :\n ∃ y,\n (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) y =\n (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) n) }).fst\n⊢ ↑(TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) { val := p, property := hpr })\n (↑((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).map\n (homOfLE (_ : PrimeSpectrum.basicOpen r ≤ ⊤)).op)\n (↑(toOpen ↑S ⊤) (↑(algebraMap ↑R ↑S) ↑(s, { val := r, property := hpr } ^ n).snd))) *\n y =\n ↑(TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) { val := p, property := hpr })\n (↑((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).map\n (homOfLE (_ : PrimeSpectrum.basicOpen r ≤ ⊤)).op)\n (↑(toOpen ↑S ⊤) (s, { val := r, property := hpr } ^ n).fst))\n[PROOFSTEP]\nrw [← e]\n -- Porting note : without this `change`, Lean doesn't know how to rewrite `map_mul`\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.mk.mk.intro\nR S : CommRingCat\nf : R ⟶ S\np : PrimeSpectrum ↑R\ninst✝ : Algebra ↑R ↑S\ny : ↑(TopCat.Presheaf.stalk (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) p)\nr : ↑R\nhpr : p ∈ PrimeSpectrum.basicOpen r\ns' :\n (forget CommRingCat).obj\n ((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).obj (op (PrimeSpectrum.basicOpen r)))\ne :\n ↑(TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) { val := p, property := hpr }) s' =\n y\ns : ↑S\nn : ℕ\nhsn :\n s' *\n ↑(algebraMap ↑S ↑((structureSheaf ↑S).val.obj (op (PrimeSpectrum.basicOpen (↑(algebraMap ↑R ↑S) r)))))\n ↑(s,\n { val := (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) n,\n property :=\n (_ :\n ∃ y,\n (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) y =\n (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) n) }).snd =\n ↑(algebraMap ↑S ↑((structureSheaf ↑S).val.obj (op (PrimeSpectrum.basicOpen (↑(algebraMap ↑R ↑S) r)))))\n (s,\n { val := (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) n,\n property :=\n (_ :\n ∃ y,\n (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) y =\n (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) n) }).fst\n⊢ ↑(TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) { val := p, property := hpr })\n (↑((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).map\n (homOfLE (_ : PrimeSpectrum.basicOpen r ≤ ⊤)).op)\n (↑(toOpen ↑S ⊤) (↑(algebraMap ↑R ↑S) ↑(s, { val := r, property := hpr } ^ n).snd))) *\n ↑(TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) { val := p, property := hpr })\n s' =\n ↑(TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) { val := p, property := hpr })\n (↑((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).map\n (homOfLE (_ : PrimeSpectrum.basicOpen r ≤ ⊤)).op)\n (↑(toOpen ↑S ⊤) (s, { val := r, property := hpr } ^ n).fst))\n[PROOFSTEP]\nlet f := TopCat.Presheaf.germ (Spec.topMap (algebraMap R S) _* (structureSheaf S).val) ⟨p, hpr⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.mk.mk.intro\nR S : CommRingCat\nf✝ : R ⟶ S\np : PrimeSpectrum ↑R\ninst✝ : Algebra ↑R ↑S\ny : ↑(TopCat.Presheaf.stalk (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) p)\nr : ↑R\nhpr : p ∈ PrimeSpectrum.basicOpen r\ns' :\n (forget CommRingCat).obj\n ((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).obj (op (PrimeSpectrum.basicOpen r)))\ne :\n ↑(TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) { val := p, property := hpr }) s' =\n y\ns : ↑S\nn : ℕ\nhsn :\n s' *\n ↑(algebraMap ↑S ↑((structureSheaf ↑S).val.obj (op (PrimeSpectrum.basicOpen (↑(algebraMap ↑R ↑S) r)))))\n ↑(s,\n { val := (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) n,\n property :=\n (_ :\n ∃ y,\n (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) y =\n (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) n) }).snd =\n ↑(algebraMap ↑S ↑((structureSheaf ↑S).val.obj (op (PrimeSpectrum.basicOpen (↑(algebraMap ↑R ↑S) r)))))\n (s,\n { val := (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) n,\n property :=\n (_ :\n ∃ y,\n (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) y =\n (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) n) }).fst\nf : (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).obj (op (PrimeSpectrum.basicOpen r)) ⟶\n TopCat.Presheaf.stalk (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) ↑{ val := p, property := hpr } :=\n TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) { val := p, property := hpr }\n⊢ ↑(TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) { val := p, property := hpr })\n (↑((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).map\n (homOfLE (_ : PrimeSpectrum.basicOpen r ≤ ⊤)).op)\n (↑(toOpen ↑S ⊤) (↑(algebraMap ↑R ↑S) ↑(s, { val := r, property := hpr } ^ n).snd))) *\n ↑(TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) { val := p, property := hpr })\n s' =\n ↑(TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) { val := p, property := hpr })\n (↑((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).map\n (homOfLE (_ : PrimeSpectrum.basicOpen r ≤ ⊤)).op)\n (↑(toOpen ↑S ⊤) (s, { val := r, property := hpr } ^ n).fst))\n[PROOFSTEP]\nchange f _ * f _ = f _\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.mk.mk.intro\nR S : CommRingCat\nf✝ : R ⟶ S\np : PrimeSpectrum ↑R\ninst✝ : Algebra ↑R ↑S\ny : ↑(TopCat.Presheaf.stalk (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) p)\nr : ↑R\nhpr : p ∈ PrimeSpectrum.basicOpen r\ns' :\n (forget CommRingCat).obj\n ((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).obj (op (PrimeSpectrum.basicOpen r)))\ne :\n ↑(TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) { val := p, property := hpr }) s' =\n y\ns : ↑S\nn : ℕ\nhsn :\n s' *\n ↑(algebraMap ↑S ↑((structureSheaf ↑S).val.obj (op (PrimeSpectrum.basicOpen (↑(algebraMap ↑R ↑S) r)))))\n ↑(s,\n { val := (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) n,\n property :=\n (_ :\n ∃ y,\n (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) y =\n (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) n) }).snd =\n ↑(algebraMap ↑S ↑((structureSheaf ↑S).val.obj (op (PrimeSpectrum.basicOpen (↑(algebraMap ↑R ↑S) r)))))\n (s,\n { val := (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) n,\n property :=\n (_ :\n ∃ y,\n (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) y =\n (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) n) }).fst\nf : (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).obj (op (PrimeSpectrum.basicOpen r)) ⟶\n TopCat.Presheaf.stalk (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) ↑{ val := p, property := hpr } :=\n TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) { val := p, property := hpr }\n⊢ ↑f\n (↑((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).map\n (homOfLE (_ : PrimeSpectrum.basicOpen r ≤ ⊤)).op)\n (↑(toOpen ↑S ⊤) (↑(algebraMap ↑R ↑S) ↑(s, { val := r, property := hpr } ^ n).snd))) *\n ↑f s' =\n ↑f\n (↑((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).map\n (homOfLE (_ : PrimeSpectrum.basicOpen r ≤ ⊤)).op)\n (↑(toOpen ↑S ⊤) (s, { val := r, property := hpr } ^ n).fst))\n[PROOFSTEP]\nrw [← map_mul, mul_comm]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.mk.mk.intro\nR S : CommRingCat\nf✝ : R ⟶ S\np : PrimeSpectrum ↑R\ninst✝ : Algebra ↑R ↑S\ny : ↑(TopCat.Presheaf.stalk (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) p)\nr : ↑R\nhpr : p ∈ PrimeSpectrum.basicOpen r\ns' :\n (forget CommRingCat).obj\n ((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).obj (op (PrimeSpectrum.basicOpen r)))\ne :\n ↑(TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) { val := p, property := hpr }) s' =\n y\ns : ↑S\nn : ℕ\nhsn :\n s' *\n ↑(algebraMap ↑S ↑((structureSheaf ↑S).val.obj (op (PrimeSpectrum.basicOpen (↑(algebraMap ↑R ↑S) r)))))\n ↑(s,\n { val := (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) n,\n property :=\n (_ :\n ∃ y,\n (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) y =\n (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) n) }).snd =\n ↑(algebraMap ↑S ↑((structureSheaf ↑S).val.obj (op (PrimeSpectrum.basicOpen (↑(algebraMap ↑R ↑S) r)))))\n (s,\n { val := (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) n,\n property :=\n (_ :\n ∃ y,\n (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) y =\n (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) n) }).fst\nf : (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).obj (op (PrimeSpectrum.basicOpen r)) ⟶\n TopCat.Presheaf.stalk (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) ↑{ val := p, property := hpr } :=\n TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) { val := p, property := hpr }\n⊢ ↑f\n (s' *\n ↑((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).map\n (homOfLE (_ : PrimeSpectrum.basicOpen r ≤ ⊤)).op)\n (↑(toOpen ↑S ⊤) (↑(algebraMap ↑R ↑S) ↑(s, { val := r, property := hpr } ^ n).snd))) =\n ↑f\n (↑((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).map\n (homOfLE (_ : PrimeSpectrum.basicOpen r ≤ ⊤)).op)\n (↑(toOpen ↑S ⊤) (s, { val := r, property := hpr } ^ n).fst))\n[PROOFSTEP]\ndsimp only [Subtype.coe_mk] at hsn \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.mk.mk.intro\nR S : CommRingCat\nf✝ : R ⟶ S\np : PrimeSpectrum ↑R\ninst✝ : Algebra ↑R ↑S\ny : ↑(TopCat.Presheaf.stalk (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) p)\nr : ↑R\nhpr : p ∈ PrimeSpectrum.basicOpen r\ns' :\n (forget CommRingCat).obj\n ((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).obj (op (PrimeSpectrum.basicOpen r)))\ne :\n ↑(TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) { val := p, property := hpr }) s' =\n y\ns : ↑S\nn : ℕ\nhsn :\n s' *\n ↑(algebraMap ↑S ↑((structureSheaf ↑S).val.obj (op (PrimeSpectrum.basicOpen (↑(algebraMap ↑R ↑S) r)))))\n (↑(algebraMap ↑R ↑S) r ^ n) =\n ↑(algebraMap ↑S ↑((structureSheaf ↑S).val.obj (op (PrimeSpectrum.basicOpen (↑(algebraMap ↑R ↑S) r))))) s\nf : (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).obj (op (PrimeSpectrum.basicOpen r)) ⟶\n TopCat.Presheaf.stalk (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) ↑{ val := p, property := hpr } :=\n TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) { val := p, property := hpr }\n⊢ ↑f\n (s' *\n ↑((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).map\n (homOfLE (_ : PrimeSpectrum.basicOpen r ≤ ⊤)).op)\n (↑(toOpen ↑S ⊤) (↑(algebraMap ↑R ↑S) ↑(s, { val := r, property := hpr } ^ n).snd))) =\n ↑f\n (↑((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).map\n (homOfLE (_ : PrimeSpectrum.basicOpen r ≤ ⊤)).op)\n (↑(toOpen ↑S ⊤) (s, { val := r, property := hpr } ^ n).fst))\n[PROOFSTEP]\nrw [← map_pow (algebraMap R S)] at hsn \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.mk.mk.intro\nR S : CommRingCat\nf✝ : R ⟶ S\np : PrimeSpectrum ↑R\ninst✝ : Algebra ↑R ↑S\ny : ↑(TopCat.Presheaf.stalk (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) p)\nr : ↑R\nhpr : p ∈ PrimeSpectrum.basicOpen r\ns' :\n (forget CommRingCat).obj\n ((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).obj (op (PrimeSpectrum.basicOpen r)))\ne :\n ↑(TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) { val := p, property := hpr }) s' =\n y\ns : ↑S\nn : ℕ\nhsn :\n s' *\n ↑(algebraMap ↑S ↑((structureSheaf ↑S).val.obj (op (PrimeSpectrum.basicOpen (↑(algebraMap ↑R ↑S) r)))))\n (↑(algebraMap ↑R ↑S) (r ^ n)) =\n ↑(algebraMap ↑S ↑((structureSheaf ↑S).val.obj (op (PrimeSpectrum.basicOpen (↑(algebraMap ↑R ↑S) r))))) s\nf : (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).obj (op (PrimeSpectrum.basicOpen r)) ⟶\n TopCat.Presheaf.stalk (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) ↑{ val := p, property := hpr } :=\n TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) { val := p, property := hpr }\n⊢ ↑f\n (s' *\n ↑((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).map\n (homOfLE (_ : PrimeSpectrum.basicOpen r ≤ ⊤)).op)\n (↑(toOpen ↑S ⊤) (↑(algebraMap ↑R ↑S) ↑(s, { val := r, property := hpr } ^ n).snd))) =\n ↑f\n (↑((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).map\n (homOfLE (_ : PrimeSpectrum.basicOpen r ≤ ⊤)).op)\n (↑(toOpen ↑S ⊤) (s, { val := r, property := hpr } ^ n).fst))\n[PROOFSTEP]\ncongr 1\n[GOAL]\nR S : CommRingCat\nf : R ⟶ S\np : PrimeSpectrum ↑R\ninst✝ : Algebra ↑R ↑S\n⊢ IsLocalizedModule (Ideal.primeCompl p.asIdeal) (AlgHom.toLinearMap (toPushforwardStalkAlgHom R S p))\n[PROOFSTEP]\napply IsLocalizedModule.mkOfAlgebra\n[GOAL]\ncase h₁\nR S : CommRingCat\nf : R ⟶ S\np : PrimeSpectrum ↑R\ninst✝ : Algebra ↑R ↑S\n⊢ ∀ (x : ↑R),\n x ∈ Ideal.primeCompl p.asIdeal →\n IsUnit (↑(algebraMap ↑R ↑(TopCat.Presheaf.stalk (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) p)) x)\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase h₁\nR S : CommRingCat\nf : R ⟶ S\np : PrimeSpectrum ↑R\ninst✝ : Algebra ↑R ↑S\nx : ↑R\nhx : x ∈ Ideal.primeCompl p.asIdeal\n⊢ IsUnit (↑(algebraMap ↑R ↑(TopCat.Presheaf.stalk (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) p)) x)\n[PROOFSTEP]\nrw [algebraMap_pushforward_stalk, toPushforwardStalk_comp]\n[GOAL]\ncase h₁\nR S : CommRingCat\nf : R ⟶ S\np : PrimeSpectrum ↑R\ninst✝ : Algebra ↑R ↑S\nx : ↑R\nhx : x ∈ Ideal.primeCompl p.asIdeal\n⊢ IsUnit\n (↑(toStalk (↑R) p ≫ (TopCat.Presheaf.stalkFunctor CommRingCat p).map (Spec.sheafedSpaceMap (algebraMap ↑R ↑S)).c) x)\n[PROOFSTEP]\nchange IsUnit ((TopCat.Presheaf.stalkFunctor CommRingCat p).map (Spec.sheafedSpaceMap (algebraMap ↑R ↑S)).c _)\n[GOAL]\ncase h₁\nR S : CommRingCat\nf : R ⟶ S\np : PrimeSpectrum ↑R\ninst✝ : Algebra ↑R ↑S\nx : ↑R\nhx : x ∈ Ideal.primeCompl p.asIdeal\n⊢ IsUnit\n (↑((TopCat.Presheaf.stalkFunctor CommRingCat p).map (Spec.sheafedSpaceMap (algebraMap ↑R ↑S)).c)\n (↑(toStalk (↑R) p) x))\n[PROOFSTEP]\nexact (IsLocalization.map_units ((structureSheaf R).presheaf.stalk p) ⟨x, hx⟩).map _\n[GOAL]\ncase h₂\nR S : CommRingCat\nf : R ⟶ S\np : PrimeSpectrum ↑R\ninst✝ : Algebra ↑R ↑S\n⊢ ∀ (y : ↑(TopCat.Presheaf.stalk (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) p)),\n ∃ x, x.snd • y = ↑(toPushforwardStalkAlgHom R S p) x.fst\n[PROOFSTEP]\napply isLocalizedModule_toPushforwardStalkAlgHom_aux\n[GOAL]\ncase h₃\nR S : CommRingCat\nf : R ⟶ S\np : PrimeSpectrum ↑R\ninst✝ : Algebra ↑R ↑S\n⊢ ∀ (x : ↑S), ↑(toPushforwardStalkAlgHom R S p) x = 0 → ∃ m, m • x = 0\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase h₃\nR S : CommRingCat\nf : R ⟶ S\np : PrimeSpectrum ↑R\ninst✝ : Algebra ↑R ↑S\nx : ↑S\nhx : ↑(toPushforwardStalkAlgHom R S p) x = 0\n⊢ ∃ m, m • x = 0\n[PROOFSTEP]\nrw [toPushforwardStalkAlgHom_apply, ← (toPushforwardStalk (algebraMap R S) p).map_zero, toPushforwardStalk] at hx \n[GOAL]\ncase h₃\nR S : CommRingCat\nf : R ⟶ S\np : PrimeSpectrum ↑R\ninst✝ : Algebra ↑R ↑S\nx : ↑S\nhx :\n ↑(TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) { val := p, property := trivial })\n (↑(toOpen ↑S ⊤) x) =\n ↑(toOpen ↑S ⊤ ≫\n TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val)\n { val := p, property := trivial })\n 0\n⊢ ∃ m, m • x = 0\n[PROOFSTEP]\nchange\n _ =\n (TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val)\n (⟨p, trivial⟩ : (⊤ : TopologicalSpace.Opens (PrimeSpectrum R))) (toOpen S ⊤ 0)) at\n hx \n[GOAL]\ncase h₃\nR S : CommRingCat\nf : R ⟶ S\np : PrimeSpectrum ↑R\ninst✝ : Algebra ↑R ↑S\nx : ↑S\nhx :\n ↑(TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) { val := p, property := trivial })\n (↑(toOpen ↑S ⊤) x) =\n ↑(TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val)\n { val := p, property := trivial })\n (↑(toOpen ↑S ⊤) 0)\n⊢ ∃ m, m • x = 0\n[PROOFSTEP]\nrw [map_zero] at hx \n[GOAL]\ncase h₃\nR S : CommRingCat\nf : R ⟶ S\np : PrimeSpectrum ↑R\ninst✝ : Algebra ↑R ↑S\nx : ↑S\nhx :\n ↑(TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val) { val := p, property := trivial })\n (↑(toOpen ↑S ⊤) x) =\n ↑(TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val)\n { val := p, property := trivial })\n 0\n⊢ ∃ m, m • x = 0\n[PROOFSTEP]\nchange (forget CommRingCat).map _ _ = (forget _).map _ _ at hx \n[GOAL]\ncase h₃\nR S : CommRingCat\nf : R ⟶ S\np : PrimeSpectrum ↑R\ninst✝ : Algebra ↑R ↑S\nx : ↑S\nhx :\n (forget CommRingCat).map\n (TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val)\n { val := p, property := trivial })\n (↑(toOpen ↑S ⊤) x) =\n (forget CommRingCat).map\n (TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val)\n { val := p, property := trivial })\n 0\n⊢ ∃ m, m • x = 0\n[PROOFSTEP]\nobtain ⟨U, hpU, i₁, i₂, e⟩ := TopCat.Presheaf.germ_eq _ _ _ _ _ _ hx\n[GOAL]\ncase h₃.intro.intro.intro.intro\nR S : CommRingCat\nf : R ⟶ S\np : PrimeSpectrum ↑R\ninst✝ : Algebra ↑R ↑S\nx : ↑S\nhx :\n (forget CommRingCat).map\n (TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val)\n { val := p, property := trivial })\n (↑(toOpen ↑S ⊤) x) =\n (forget CommRingCat).map\n (TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val)\n { val := p, property := trivial })\n 0\nU : TopologicalSpace.Opens ↑(Spec.topObj R)\nhpU : p ∈ U\ni₁ : U ⟶ ⊤\ni₂ : U ⟶ ⊤\ne :\n ↑((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).map i₁.op) (↑(toOpen ↑S ⊤) x) =\n ↑((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).map i₂.op) 0\n⊢ ∃ m, m • x = 0\n[PROOFSTEP]\nobtain ⟨_, ⟨r, rfl⟩, hpr, hrU⟩ :=\n PrimeSpectrum.isTopologicalBasis_basic_opens.exists_subset_of_mem_open (show p ∈ U.1 from hpU) U.2\n[GOAL]\ncase h₃.intro.intro.intro.intro.intro.intro.intro.intro\nR S : CommRingCat\nf : R ⟶ S\np : PrimeSpectrum ↑R\ninst✝ : Algebra ↑R ↑S\nx : ↑S\nhx :\n (forget CommRingCat).map\n (TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val)\n { val := p, property := trivial })\n (↑(toOpen ↑S ⊤) x) =\n (forget CommRingCat).map\n (TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val)\n { val := p, property := trivial })\n 0\nU : TopologicalSpace.Opens ↑(Spec.topObj R)\nhpU : p ∈ U\ni₁ : U ⟶ ⊤\ni₂ : U ⟶ ⊤\ne :\n ↑((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).map i₁.op) (↑(toOpen ↑S ⊤) x) =\n ↑((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).map i₂.op) 0\nr : ↑R\nhpr : p ∈ (fun r => ↑(PrimeSpectrum.basicOpen r)) r\nhrU : (fun r => ↑(PrimeSpectrum.basicOpen r)) r ⊆ U.carrier\n⊢ ∃ m, m • x = 0\n[PROOFSTEP]\nchange PrimeSpectrum.basicOpen r ≤ U at hrU \n[GOAL]\ncase h₃.intro.intro.intro.intro.intro.intro.intro.intro\nR S : CommRingCat\nf : R ⟶ S\np : PrimeSpectrum ↑R\ninst✝ : Algebra ↑R ↑S\nx : ↑S\nhx :\n (forget CommRingCat).map\n (TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val)\n { val := p, property := trivial })\n (↑(toOpen ↑S ⊤) x) =\n (forget CommRingCat).map\n (TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val)\n { val := p, property := trivial })\n 0\nU : TopologicalSpace.Opens ↑(Spec.topObj R)\nhpU : p ∈ U\ni₁ : U ⟶ ⊤\ni₂ : U ⟶ ⊤\ne :\n ↑((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).map i₁.op) (↑(toOpen ↑S ⊤) x) =\n ↑((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).map i₂.op) 0\nr : ↑R\nhpr : p ∈ (fun r => ↑(PrimeSpectrum.basicOpen r)) r\nhrU : PrimeSpectrum.basicOpen r ≤ U\n⊢ ∃ m, m • x = 0\n[PROOFSTEP]\napply_fun (Spec.topMap (algebraMap R S) _* (structureSheaf S).1).map (homOfLE hrU).op at e \n[GOAL]\ncase h₃.intro.intro.intro.intro.intro.intro.intro.intro\nR S : CommRingCat\nf : R ⟶ S\np : PrimeSpectrum ↑R\ninst✝ : Algebra ↑R ↑S\nx : ↑S\nhx :\n (forget CommRingCat).map\n (TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val)\n { val := p, property := trivial })\n (↑(toOpen ↑S ⊤) x) =\n (forget CommRingCat).map\n (TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val)\n { val := p, property := trivial })\n 0\nU : TopologicalSpace.Opens ↑(Spec.topObj R)\nhpU : p ∈ U\ni₁ : U ⟶ ⊤\ni₂ : U ⟶ ⊤\nr : ↑R\nhpr : p ∈ (fun r => ↑(PrimeSpectrum.basicOpen r)) r\nhrU : PrimeSpectrum.basicOpen r ≤ U\ne :\n ↑((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).map (homOfLE hrU).op)\n (↑((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).map i₁.op) (↑(toOpen ↑S ⊤) x)) =\n ↑((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).map (homOfLE hrU).op)\n (↑((Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val).map i₂.op) 0)\n⊢ ∃ m, m • x = 0\n[PROOFSTEP]\nsimp only [TopCat.Presheaf.pushforwardObj_map, Functor.op_map, map_zero, ← comp_apply, toOpen_res] at e \n[GOAL]\ncase h₃.intro.intro.intro.intro.intro.intro.intro.intro\nR S : CommRingCat\nf : R ⟶ S\np : PrimeSpectrum ↑R\ninst✝ : Algebra ↑R ↑S\nx : ↑S\nhx :\n (forget CommRingCat).map\n (TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val)\n { val := p, property := trivial })\n (↑(toOpen ↑S ⊤) x) =\n (forget CommRingCat).map\n (TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val)\n { val := p, property := trivial })\n 0\nU : TopologicalSpace.Opens ↑(Spec.topObj R)\nhpU : p ∈ U\ni₁ : U ⟶ ⊤\ni₂ : U ⟶ ⊤\nr : ↑R\nhpr : p ∈ (fun r => ↑(PrimeSpectrum.basicOpen r)) r\nhrU : PrimeSpectrum.basicOpen r ≤ U\ne :\n ↑((structureSheaf ↑S).val.map\n ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map (homOfLE hrU).op.unop).op)\n (↑((structureSheaf ↑S).val.map ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map i₁.op.unop).op)\n (↑(toOpen ↑S ⊤) x)) =\n ↑((structureSheaf ↑S).val.map\n ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map (homOfLE hrU).op.unop).op)\n (↑((structureSheaf ↑S).val.map ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map i₂.op.unop).op)\n 0)\n⊢ ∃ m, m • x = 0\n[PROOFSTEP]\nhave : toOpen S (PrimeSpectrum.basicOpen <| algebraMap R S r) x = 0 := by refine' Eq.trans _ e; rfl\n[GOAL]\nR S : CommRingCat\nf : R ⟶ S\np : PrimeSpectrum ↑R\ninst✝ : Algebra ↑R ↑S\nx : ↑S\nhx :\n (forget CommRingCat).map\n (TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val)\n { val := p, property := trivial })\n (↑(toOpen ↑S ⊤) x) =\n (forget CommRingCat).map\n (TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val)\n { val := p, property := trivial })\n 0\nU : TopologicalSpace.Opens ↑(Spec.topObj R)\nhpU : p ∈ U\ni₁ : U ⟶ ⊤\ni₂ : U ⟶ ⊤\nr : ↑R\nhpr : p ∈ (fun r => ↑(PrimeSpectrum.basicOpen r)) r\nhrU : PrimeSpectrum.basicOpen r ≤ U\ne :\n ↑((structureSheaf ↑S).val.map\n ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map (homOfLE hrU).op.unop).op)\n (↑((structureSheaf ↑S).val.map ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map i₁.op.unop).op)\n (↑(toOpen ↑S ⊤) x)) =\n ↑((structureSheaf ↑S).val.map\n ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map (homOfLE hrU).op.unop).op)\n (↑((structureSheaf ↑S).val.map ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map i₂.op.unop).op)\n 0)\n⊢ ↑(toOpen (↑S) (PrimeSpectrum.basicOpen (↑(algebraMap ↑R ↑S) r))) x = 0\n[PROOFSTEP]\nrefine' Eq.trans _ e\n[GOAL]\nR S : CommRingCat\nf : R ⟶ S\np : PrimeSpectrum ↑R\ninst✝ : Algebra ↑R ↑S\nx : ↑S\nhx :\n (forget CommRingCat).map\n (TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val)\n { val := p, property := trivial })\n (↑(toOpen ↑S ⊤) x) =\n (forget CommRingCat).map\n (TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val)\n { val := p, property := trivial })\n 0\nU : TopologicalSpace.Opens ↑(Spec.topObj R)\nhpU : p ∈ U\ni₁ : U ⟶ ⊤\ni₂ : U ⟶ ⊤\nr : ↑R\nhpr : p ∈ (fun r => ↑(PrimeSpectrum.basicOpen r)) r\nhrU : PrimeSpectrum.basicOpen r ≤ U\ne :\n ↑((structureSheaf ↑S).val.map\n ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map (homOfLE hrU).op.unop).op)\n (↑((structureSheaf ↑S).val.map ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map i₁.op.unop).op)\n (↑(toOpen ↑S ⊤) x)) =\n ↑((structureSheaf ↑S).val.map\n ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map (homOfLE hrU).op.unop).op)\n (↑((structureSheaf ↑S).val.map ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map i₂.op.unop).op)\n 0)\n⊢ ↑(toOpen (↑S) (PrimeSpectrum.basicOpen (↑(algebraMap ↑R ↑S) r))) x =\n ↑((structureSheaf ↑S).val.map\n ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map (homOfLE hrU).op.unop).op)\n (↑((structureSheaf ↑S).val.map ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map i₁.op.unop).op)\n (↑(toOpen ↑S ⊤) x))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h₃.intro.intro.intro.intro.intro.intro.intro.intro\nR S : CommRingCat\nf : R ⟶ S\np : PrimeSpectrum ↑R\ninst✝ : Algebra ↑R ↑S\nx : ↑S\nhx :\n (forget CommRingCat).map\n (TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val)\n { val := p, property := trivial })\n (↑(toOpen ↑S ⊤) x) =\n (forget CommRingCat).map\n (TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val)\n { val := p, property := trivial })\n 0\nU : TopologicalSpace.Opens ↑(Spec.topObj R)\nhpU : p ∈ U\ni₁ : U ⟶ ⊤\ni₂ : U ⟶ ⊤\nr : ↑R\nhpr : p ∈ (fun r => ↑(PrimeSpectrum.basicOpen r)) r\nhrU : PrimeSpectrum.basicOpen r ≤ U\ne :\n ↑((structureSheaf ↑S).val.map\n ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map (homOfLE hrU).op.unop).op)\n (↑((structureSheaf ↑S).val.map ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map i₁.op.unop).op)\n (↑(toOpen ↑S ⊤) x)) =\n ↑((structureSheaf ↑S).val.map\n ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map (homOfLE hrU).op.unop).op)\n (↑((structureSheaf ↑S).val.map ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map i₂.op.unop).op)\n 0)\nthis : ↑(toOpen (↑S) (PrimeSpectrum.basicOpen (↑(algebraMap ↑R ↑S) r))) x = 0\n⊢ ∃ m, m • x = 0\n[PROOFSTEP]\nhave :=\n (@IsLocalization.mk'_one _ _ _ _ _ _ (StructureSheaf.IsLocalization.to_basicOpen S <| algebraMap R S r) x).trans this\n[GOAL]\ncase h₃.intro.intro.intro.intro.intro.intro.intro.intro\nR S : CommRingCat\nf : R ⟶ S\np : PrimeSpectrum ↑R\ninst✝ : Algebra ↑R ↑S\nx : ↑S\nhx :\n (forget CommRingCat).map\n (TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val)\n { val := p, property := trivial })\n (↑(toOpen ↑S ⊤) x) =\n (forget CommRingCat).map\n (TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val)\n { val := p, property := trivial })\n 0\nU : TopologicalSpace.Opens ↑(Spec.topObj R)\nhpU : p ∈ U\ni₁ : U ⟶ ⊤\ni₂ : U ⟶ ⊤\nr : ↑R\nhpr : p ∈ (fun r => ↑(PrimeSpectrum.basicOpen r)) r\nhrU : PrimeSpectrum.basicOpen r ≤ U\ne :\n ↑((structureSheaf ↑S).val.map\n ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map (homOfLE hrU).op.unop).op)\n (↑((structureSheaf ↑S).val.map ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map i₁.op.unop).op)\n (↑(toOpen ↑S ⊤) x)) =\n ↑((structureSheaf ↑S).val.map\n ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map (homOfLE hrU).op.unop).op)\n (↑((structureSheaf ↑S).val.map ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map i₂.op.unop).op)\n 0)\nthis✝ : ↑(toOpen (↑S) (PrimeSpectrum.basicOpen (↑(algebraMap ↑R ↑S) r))) x = 0\nthis :\n IsLocalization.mk' (↑((structureSheaf ↑S).val.obj (op (PrimeSpectrum.basicOpen (↑(algebraMap ↑R ↑S) r))))) x 1 = 0\n⊢ ∃ m, m • x = 0\n[PROOFSTEP]\nobtain ⟨⟨_, n, rfl⟩, e⟩ := (IsLocalization.mk'_eq_zero_iff _ _).mp this\n[GOAL]\ncase h₃.intro.intro.intro.intro.intro.intro.intro.intro.intro.mk.intro\nR S : CommRingCat\nf : R ⟶ S\np : PrimeSpectrum ↑R\ninst✝ : Algebra ↑R ↑S\nx : ↑S\nhx :\n (forget CommRingCat).map\n (TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val)\n { val := p, property := trivial })\n (↑(toOpen ↑S ⊤) x) =\n (forget CommRingCat).map\n (TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val)\n { val := p, property := trivial })\n 0\nU : TopologicalSpace.Opens ↑(Spec.topObj R)\nhpU : p ∈ U\ni₁ : U ⟶ ⊤\ni₂ : U ⟶ ⊤\nr : ↑R\nhpr : p ∈ (fun r => ↑(PrimeSpectrum.basicOpen r)) r\nhrU : PrimeSpectrum.basicOpen r ≤ U\ne✝ :\n ↑((structureSheaf ↑S).val.map\n ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map (homOfLE hrU).op.unop).op)\n (↑((structureSheaf ↑S).val.map ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map i₁.op.unop).op)\n (↑(toOpen ↑S ⊤) x)) =\n ↑((structureSheaf ↑S).val.map\n ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map (homOfLE hrU).op.unop).op)\n (↑((structureSheaf ↑S).val.map ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map i₂.op.unop).op)\n 0)\nthis✝ : ↑(toOpen (↑S) (PrimeSpectrum.basicOpen (↑(algebraMap ↑R ↑S) r))) x = 0\nthis :\n IsLocalization.mk' (↑((structureSheaf ↑S).val.obj (op (PrimeSpectrum.basicOpen (↑(algebraMap ↑R ↑S) r))))) x 1 = 0\nn : ℕ\ne :\n ↑{ val := (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) n,\n property :=\n (_ :\n ∃ y,\n (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) y = (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) n) } *\n x =\n 0\n⊢ ∃ m, m • x = 0\n[PROOFSTEP]\nrefine' ⟨⟨r, hpr⟩ ^ n, _⟩\n[GOAL]\ncase h₃.intro.intro.intro.intro.intro.intro.intro.intro.intro.mk.intro\nR S : CommRingCat\nf : R ⟶ S\np : PrimeSpectrum ↑R\ninst✝ : Algebra ↑R ↑S\nx : ↑S\nhx :\n (forget CommRingCat).map\n (TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val)\n { val := p, property := trivial })\n (↑(toOpen ↑S ⊤) x) =\n (forget CommRingCat).map\n (TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val)\n { val := p, property := trivial })\n 0\nU : TopologicalSpace.Opens ↑(Spec.topObj R)\nhpU : p ∈ U\ni₁ : U ⟶ ⊤\ni₂ : U ⟶ ⊤\nr : ↑R\nhpr : p ∈ (fun r => ↑(PrimeSpectrum.basicOpen r)) r\nhrU : PrimeSpectrum.basicOpen r ≤ U\ne✝ :\n ↑((structureSheaf ↑S).val.map\n ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map (homOfLE hrU).op.unop).op)\n (↑((structureSheaf ↑S).val.map ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map i₁.op.unop).op)\n (↑(toOpen ↑S ⊤) x)) =\n ↑((structureSheaf ↑S).val.map\n ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map (homOfLE hrU).op.unop).op)\n (↑((structureSheaf ↑S).val.map ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map i₂.op.unop).op)\n 0)\nthis✝ : ↑(toOpen (↑S) (PrimeSpectrum.basicOpen (↑(algebraMap ↑R ↑S) r))) x = 0\nthis :\n IsLocalization.mk' (↑((structureSheaf ↑S).val.obj (op (PrimeSpectrum.basicOpen (↑(algebraMap ↑R ↑S) r))))) x 1 = 0\nn : ℕ\ne :\n ↑{ val := (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) n,\n property :=\n (_ :\n ∃ y,\n (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) y = (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) n) } *\n x =\n 0\n⊢ { val := r, property := hpr } ^ n • x = 0\n[PROOFSTEP]\nrw [Submonoid.smul_def, Algebra.smul_def]\n -- Porting note : manually rewrite `Submonoid.coe_pow`\n[GOAL]\ncase h₃.intro.intro.intro.intro.intro.intro.intro.intro.intro.mk.intro\nR S : CommRingCat\nf : R ⟶ S\np : PrimeSpectrum ↑R\ninst✝ : Algebra ↑R ↑S\nx : ↑S\nhx :\n (forget CommRingCat).map\n (TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val)\n { val := p, property := trivial })\n (↑(toOpen ↑S ⊤) x) =\n (forget CommRingCat).map\n (TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val)\n { val := p, property := trivial })\n 0\nU : TopologicalSpace.Opens ↑(Spec.topObj R)\nhpU : p ∈ U\ni₁ : U ⟶ ⊤\ni₂ : U ⟶ ⊤\nr : ↑R\nhpr : p ∈ (fun r => ↑(PrimeSpectrum.basicOpen r)) r\nhrU : PrimeSpectrum.basicOpen r ≤ U\ne✝ :\n ↑((structureSheaf ↑S).val.map\n ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map (homOfLE hrU).op.unop).op)\n (↑((structureSheaf ↑S).val.map ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map i₁.op.unop).op)\n (↑(toOpen ↑S ⊤) x)) =\n ↑((structureSheaf ↑S).val.map\n ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map (homOfLE hrU).op.unop).op)\n (↑((structureSheaf ↑S).val.map ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map i₂.op.unop).op)\n 0)\nthis✝ : ↑(toOpen (↑S) (PrimeSpectrum.basicOpen (↑(algebraMap ↑R ↑S) r))) x = 0\nthis :\n IsLocalization.mk' (↑((structureSheaf ↑S).val.obj (op (PrimeSpectrum.basicOpen (↑(algebraMap ↑R ↑S) r))))) x 1 = 0\nn : ℕ\ne :\n ↑{ val := (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) n,\n property :=\n (_ :\n ∃ y,\n (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) y = (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) n) } *\n x =\n 0\n⊢ ↑(algebraMap ↑R ↑S) ↑({ val := r, property := hpr } ^ n) * x = 0\n[PROOFSTEP]\nchange (algebraMap R S) (r ^ n) * x = 0\n[GOAL]\ncase h₃.intro.intro.intro.intro.intro.intro.intro.intro.intro.mk.intro\nR S : CommRingCat\nf : R ⟶ S\np : PrimeSpectrum ↑R\ninst✝ : Algebra ↑R ↑S\nx : ↑S\nhx :\n (forget CommRingCat).map\n (TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val)\n { val := p, property := trivial })\n (↑(toOpen ↑S ⊤) x) =\n (forget CommRingCat).map\n (TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val)\n { val := p, property := trivial })\n 0\nU : TopologicalSpace.Opens ↑(Spec.topObj R)\nhpU : p ∈ U\ni₁ : U ⟶ ⊤\ni₂ : U ⟶ ⊤\nr : ↑R\nhpr : p ∈ (fun r => ↑(PrimeSpectrum.basicOpen r)) r\nhrU : PrimeSpectrum.basicOpen r ≤ U\ne✝ :\n ↑((structureSheaf ↑S).val.map\n ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map (homOfLE hrU).op.unop).op)\n (↑((structureSheaf ↑S).val.map ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map i₁.op.unop).op)\n (↑(toOpen ↑S ⊤) x)) =\n ↑((structureSheaf ↑S).val.map\n ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map (homOfLE hrU).op.unop).op)\n (↑((structureSheaf ↑S).val.map ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map i₂.op.unop).op)\n 0)\nthis✝ : ↑(toOpen (↑S) (PrimeSpectrum.basicOpen (↑(algebraMap ↑R ↑S) r))) x = 0\nthis :\n IsLocalization.mk' (↑((structureSheaf ↑S).val.obj (op (PrimeSpectrum.basicOpen (↑(algebraMap ↑R ↑S) r))))) x 1 = 0\nn : ℕ\ne :\n ↑{ val := (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) n,\n property :=\n (_ :\n ∃ y,\n (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) y = (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) n) } *\n x =\n 0\n⊢ ↑(algebraMap ↑R ↑S) (r ^ n) * x = 0\n[PROOFSTEP]\nrw [map_pow]\n[GOAL]\ncase h₃.intro.intro.intro.intro.intro.intro.intro.intro.intro.mk.intro\nR S : CommRingCat\nf : R ⟶ S\np : PrimeSpectrum ↑R\ninst✝ : Algebra ↑R ↑S\nx : ↑S\nhx :\n (forget CommRingCat).map\n (TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val)\n { val := p, property := trivial })\n (↑(toOpen ↑S ⊤) x) =\n (forget CommRingCat).map\n (TopCat.Presheaf.germ (Spec.topMap (algebraMap ↑R ↑S) _* (structureSheaf ↑S).val)\n { val := p, property := trivial })\n 0\nU : TopologicalSpace.Opens ↑(Spec.topObj R)\nhpU : p ∈ U\ni₁ : U ⟶ ⊤\ni₂ : U ⟶ ⊤\nr : ↑R\nhpr : p ∈ (fun r => ↑(PrimeSpectrum.basicOpen r)) r\nhrU : PrimeSpectrum.basicOpen r ≤ U\ne✝ :\n ↑((structureSheaf ↑S).val.map\n ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map (homOfLE hrU).op.unop).op)\n (↑((structureSheaf ↑S).val.map ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map i₁.op.unop).op)\n (↑(toOpen ↑S ⊤) x)) =\n ↑((structureSheaf ↑S).val.map\n ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map (homOfLE hrU).op.unop).op)\n (↑((structureSheaf ↑S).val.map ((TopologicalSpace.Opens.map (Spec.topMap (algebraMap ↑R ↑S))).map i₂.op.unop).op)\n 0)\nthis✝ : ↑(toOpen (↑S) (PrimeSpectrum.basicOpen (↑(algebraMap ↑R ↑S) r))) x = 0\nthis :\n IsLocalization.mk' (↑((structureSheaf ↑S).val.obj (op (PrimeSpectrum.basicOpen (↑(algebraMap ↑R ↑S) r))))) x 1 = 0\nn : ℕ\ne :\n ↑{ val := (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) n,\n property :=\n (_ :\n ∃ y,\n (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) y = (fun x x_1 => x ^ x_1) (↑(algebraMap ↑R ↑S) r) n) } *\n x =\n 0\n⊢ ↑(algebraMap ↑R ↑S) r ^ n * x = 0\n[PROOFSTEP]\nexact e\n", "meta": {"mathlib_filename": "Mathlib.AlgebraicGeometry.Spec", "llama_tokens": 38961, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO", "lm_q1_score": 0.4882833952958347, "lm_q2_score": 0.014281933925111154, "lm_q1q2_score": 0.006973631188344042}} {"text": "[GOAL]\nn m : WithBot ℕ\n⊢ n + m = 0 ↔ n = 0 ∧ m = 0\n[PROOFSTEP]\nrcases n, m with ⟨_ | _, _ | _⟩\n[GOAL]\ncase none.none\n⊢ none + none = 0 ↔ none = 0 ∧ none = 0\ncase none.some\nval✝ : ℕ\n⊢ none + some val✝ = 0 ↔ none = 0 ∧ some val✝ = 0\ncase some.none\nval✝ : ℕ\n⊢ some val✝ + none = 0 ↔ some val✝ = 0 ∧ none = 0\ncase some.some val✝¹ val✝ : ℕ ⊢ some val✝¹ + some val✝ = 0 ↔ some val✝¹ = 0 ∧ some val✝ = 0\n[PROOFSTEP]\nany_goals (exact ⟨fun h => Option.noConfusion h, fun h => Option.noConfusion h.1⟩)\n[GOAL]\ncase none.none\n⊢ none + none = 0 ↔ none = 0 ∧ none = 0\n[PROOFSTEP]\nexact ⟨fun h => Option.noConfusion h, fun h => Option.noConfusion h.1⟩\n[GOAL]\ncase none.some\nval✝ : ℕ\n⊢ none + some val✝ = 0 ↔ none = 0 ∧ some val✝ = 0\n[PROOFSTEP]\nexact ⟨fun h => Option.noConfusion h, fun h => Option.noConfusion h.1⟩\n[GOAL]\ncase some.none\nval✝ : ℕ\n⊢ some val✝ + none = 0 ↔ some val✝ = 0 ∧ none = 0\n[PROOFSTEP]\nexact ⟨fun h => Option.noConfusion h, fun h => Option.noConfusion h.1⟩\n[GOAL]\ncase some.some\nval✝¹ val✝ : ℕ\n⊢ some val✝¹ + some val✝ = 0 ↔ some val✝¹ = 0 ∧ some val✝ = 0\n[PROOFSTEP]\nexact ⟨fun h => Option.noConfusion h, fun h => Option.noConfusion h.1⟩\n[GOAL]\ncase some.none\nval✝ : ℕ\n⊢ some val✝ + none = 0 ↔ some val✝ = 0 ∧ none = 0\ncase some.some val✝¹ val✝ : ℕ ⊢ some val✝¹ + some val✝ = 0 ↔ some val✝¹ = 0 ∧ some val✝ = 0\n[PROOFSTEP]\nexact ⟨fun h => Option.noConfusion h, fun h => Option.noConfusion h.2⟩\n[GOAL]\ncase some.some\nval✝¹ val✝ : ℕ\n⊢ some val✝¹ + some val✝ = 0 ↔ some val✝¹ = 0 ∧ some val✝ = 0\n[PROOFSTEP]\nrepeat' erw [WithBot.coe_eq_coe]\n[GOAL]\ncase some.some\nval✝¹ val✝ : ℕ\n⊢ some val✝¹ + some val✝ = 0 ↔ some val✝¹ = 0 ∧ some val✝ = 0\n[PROOFSTEP]\nerw [WithBot.coe_eq_coe]\n[GOAL]\ncase some.some\nval✝¹ val✝ : ℕ\n⊢ (fun x x_1 => x + x_1) val✝¹ val✝ = 0 ↔ some val✝¹ = 0 ∧ some val✝ = 0\n[PROOFSTEP]\nerw [WithBot.coe_eq_coe]\n[GOAL]\ncase some.some\nval✝¹ val✝ : ℕ\n⊢ (fun x x_1 => x + x_1) val✝¹ val✝ = 0 ↔ val✝¹ = 0 ∧ some val✝ = 0\n[PROOFSTEP]\nerw [WithBot.coe_eq_coe]\n[GOAL]\ncase some.some\nval✝¹ val✝ : ℕ\n⊢ (fun x x_1 => x + x_1) val✝¹ val✝ = 0 ↔ val✝¹ = 0 ∧ val✝ = 0\n[PROOFSTEP]\nerw [WithBot.coe_eq_coe]\n[GOAL]\ncase some.some\nval✝¹ val✝ : ℕ\n⊢ (fun x x_1 => x + x_1) val✝¹ val✝ = 0 ↔ val✝¹ = 0 ∧ val✝ = 0\n[PROOFSTEP]\nexact add_eq_zero_iff' (zero_le _) (zero_le _)\n[GOAL]\nn m : WithBot ℕ\n⊢ n + m = 1 ↔ n = 0 ∧ m = 1 ∨ n = 1 ∧ m = 0\n[PROOFSTEP]\nrcases n, m with ⟨_ | _, _ | _⟩\n[GOAL]\ncase none.none\n⊢ none + none = 1 ↔ none = 0 ∧ none = 1 ∨ none = 1 ∧ none = 0\ncase none.some\nval✝ : ℕ\n⊢ none + some val✝ = 1 ↔ none = 0 ∧ some val✝ = 1 ∨ none = 1 ∧ some val✝ = 0\ncase some.none\nval✝ : ℕ\n⊢ some val✝ + none = 1 ↔ some val✝ = 0 ∧ none = 1 ∨ some val✝ = 1 ∧ none = 0\ncase some.some\nval✝¹ val✝ : ℕ\n⊢ some val✝¹ + some val✝ = 1 ↔ some val✝¹ = 0 ∧ some val✝ = 1 ∨ some val✝¹ = 1 ∧ some val✝ = 0\n[PROOFSTEP]\nany_goals refine' ⟨fun h => Option.noConfusion h, fun h => _⟩; aesop\n[GOAL]\ncase none.none\n⊢ none + none = 1 ↔ none = 0 ∧ none = 1 ∨ none = 1 ∧ none = 0\n[PROOFSTEP]\nrefine' ⟨fun h => Option.noConfusion h, fun h => _⟩\n[GOAL]\ncase none.none\nh : none = 0 ∧ none = 1 ∨ none = 1 ∧ none = 0\n⊢ none + none = 1\n[PROOFSTEP]\naesop\n[GOAL]\ncase none.some\nval✝ : ℕ\n⊢ none + some val✝ = 1 ↔ none = 0 ∧ some val✝ = 1 ∨ none = 1 ∧ some val✝ = 0\n[PROOFSTEP]\nrefine' ⟨fun h => Option.noConfusion h, fun h => _⟩\n[GOAL]\ncase none.some\nval✝ : ℕ\nh : none = 0 ∧ some val✝ = 1 ∨ none = 1 ∧ some val✝ = 0\n⊢ none + some val✝ = 1\n[PROOFSTEP]\naesop\n[GOAL]\ncase some.none\nval✝ : ℕ\n⊢ some val✝ + none = 1 ↔ some val✝ = 0 ∧ none = 1 ∨ some val✝ = 1 ∧ none = 0\n[PROOFSTEP]\nrefine' ⟨fun h => Option.noConfusion h, fun h => _⟩\n[GOAL]\ncase some.none\nval✝ : ℕ\nh : some val✝ = 0 ∧ none = 1 ∨ some val✝ = 1 ∧ none = 0\n⊢ some val✝ + none = 1\n[PROOFSTEP]\naesop\n[GOAL]\ncase some.some\nval✝¹ val✝ : ℕ\n⊢ some val✝¹ + some val✝ = 1 ↔ some val✝¹ = 0 ∧ some val✝ = 1 ∨ some val✝¹ = 1 ∧ some val✝ = 0\n[PROOFSTEP]\nrefine' ⟨fun h => Option.noConfusion h, fun h => _⟩\n[GOAL]\ncase some.some\nval✝¹ val✝ : ℕ\n⊢ some val✝¹ + some val✝ = 1 ↔ some val✝¹ = 0 ∧ some val✝ = 1 ∨ some val✝¹ = 1 ∧ some val✝ = 0\n[PROOFSTEP]\nrepeat' erw [WithBot.coe_eq_coe]\n[GOAL]\ncase some.some\nval✝¹ val✝ : ℕ\n⊢ some val✝¹ + some val✝ = 1 ↔ some val✝¹ = 0 ∧ some val✝ = 1 ∨ some val✝¹ = 1 ∧ some val✝ = 0\n[PROOFSTEP]\nerw [WithBot.coe_eq_coe]\n[GOAL]\ncase some.some\nval✝¹ val✝ : ℕ\n⊢ (fun x x_1 => x + x_1) val✝¹ val✝ = 1 ↔ some val✝¹ = 0 ∧ some val✝ = 1 ∨ some val✝¹ = 1 ∧ some val✝ = 0\n[PROOFSTEP]\nerw [WithBot.coe_eq_coe]\n[GOAL]\ncase some.some\nval✝¹ val✝ : ℕ\n⊢ (fun x x_1 => x + x_1) val✝¹ val✝ = 1 ↔ val✝¹ = 0 ∧ some val✝ = 1 ∨ some val✝¹ = 1 ∧ some val✝ = 0\n[PROOFSTEP]\nerw [WithBot.coe_eq_coe]\n[GOAL]\ncase some.some\nval✝¹ val✝ : ℕ\n⊢ (fun x x_1 => x + x_1) val✝¹ val✝ = 1 ↔ val✝¹ = 0 ∧ val✝ = 1 ∨ some val✝¹ = 1 ∧ some val✝ = 0\n[PROOFSTEP]\nerw [WithBot.coe_eq_coe]\n[GOAL]\ncase some.some\nval✝¹ val✝ : ℕ\n⊢ (fun x x_1 => x + x_1) val✝¹ val✝ = 1 ↔ val✝¹ = 0 ∧ val✝ = 1 ∨ val✝¹ = 1 ∧ some val✝ = 0\n[PROOFSTEP]\nerw [WithBot.coe_eq_coe]\n[GOAL]\ncase some.some\nval✝¹ val✝ : ℕ\n⊢ (fun x x_1 => x + x_1) val✝¹ val✝ = 1 ↔ val✝¹ = 0 ∧ val✝ = 1 ∨ val✝¹ = 1 ∧ val✝ = 0\n[PROOFSTEP]\nerw [WithBot.coe_eq_coe]\n[GOAL]\ncase some.some\nval✝¹ val✝ : ℕ\n⊢ (fun x x_1 => x + x_1) val✝¹ val✝ = 1 ↔ val✝¹ = 0 ∧ val✝ = 1 ∨ val✝¹ = 1 ∧ val✝ = 0\n[PROOFSTEP]\nexact Nat.add_eq_one_iff\n[GOAL]\nn m : WithBot ℕ\n⊢ n + m = 2 ↔ n = 0 ∧ m = 2 ∨ n = 1 ∧ m = 1 ∨ n = 2 ∧ m = 0\n[PROOFSTEP]\nrcases n, m with ⟨_ | _, _ | _⟩\n[GOAL]\ncase none.none\n⊢ none + none = 2 ↔ none = 0 ∧ none = 2 ∨ none = 1 ∧ none = 1 ∨ none = 2 ∧ none = 0\ncase none.some\nval✝ : ℕ\n⊢ none + some val✝ = 2 ↔ none = 0 ∧ some val✝ = 2 ∨ none = 1 ∧ some val✝ = 1 ∨ none = 2 ∧ some val✝ = 0\ncase some.none\nval✝ : ℕ\n⊢ some val✝ + none = 2 ↔ some val✝ = 0 ∧ none = 2 ∨ some val✝ = 1 ∧ none = 1 ∨ some val✝ = 2 ∧ none = 0\ncase some.some\nval✝¹ val✝ : ℕ\n⊢ some val✝¹ + some val✝ = 2 ↔\n some val✝¹ = 0 ∧ some val✝ = 2 ∨ some val✝¹ = 1 ∧ some val✝ = 1 ∨ some val✝¹ = 2 ∧ some val✝ = 0\n[PROOFSTEP]\nany_goals refine' ⟨fun h => Option.noConfusion h, fun h => _⟩; aesop\n[GOAL]\ncase none.none\n⊢ none + none = 2 ↔ none = 0 ∧ none = 2 ∨ none = 1 ∧ none = 1 ∨ none = 2 ∧ none = 0\n[PROOFSTEP]\nrefine' ⟨fun h => Option.noConfusion h, fun h => _⟩\n[GOAL]\ncase none.none\nh : none = 0 ∧ none = 2 ∨ none = 1 ∧ none = 1 ∨ none = 2 ∧ none = 0\n⊢ none + none = 2\n[PROOFSTEP]\naesop\n[GOAL]\ncase none.some\nval✝ : ℕ\n⊢ none + some val✝ = 2 ↔ none = 0 ∧ some val✝ = 2 ∨ none = 1 ∧ some val✝ = 1 ∨ none = 2 ∧ some val✝ = 0\n[PROOFSTEP]\nrefine' ⟨fun h => Option.noConfusion h, fun h => _⟩\n[GOAL]\ncase none.some\nval✝ : ℕ\nh : none = 0 ∧ some val✝ = 2 ∨ none = 1 ∧ some val✝ = 1 ∨ none = 2 ∧ some val✝ = 0\n⊢ none + some val✝ = 2\n[PROOFSTEP]\naesop\n[GOAL]\ncase some.none\nval✝ : ℕ\n⊢ some val✝ + none = 2 ↔ some val✝ = 0 ∧ none = 2 ∨ some val✝ = 1 ∧ none = 1 ∨ some val✝ = 2 ∧ none = 0\n[PROOFSTEP]\nrefine' ⟨fun h => Option.noConfusion h, fun h => _⟩\n[GOAL]\ncase some.none\nval✝ : ℕ\nh : some val✝ = 0 ∧ none = 2 ∨ some val✝ = 1 ∧ none = 1 ∨ some val✝ = 2 ∧ none = 0\n⊢ some val✝ + none = 2\n[PROOFSTEP]\naesop\n[GOAL]\ncase some.some\nval✝¹ val✝ : ℕ\n⊢ some val✝¹ + some val✝ = 2 ↔\n some val✝¹ = 0 ∧ some val✝ = 2 ∨ some val✝¹ = 1 ∧ some val✝ = 1 ∨ some val✝¹ = 2 ∧ some val✝ = 0\n[PROOFSTEP]\nrefine' ⟨fun h => Option.noConfusion h, fun h => _⟩\n[GOAL]\ncase some.some\nval✝¹ val✝ : ℕ\n⊢ some val✝¹ + some val✝ = 2 ↔\n some val✝¹ = 0 ∧ some val✝ = 2 ∨ some val✝¹ = 1 ∧ some val✝ = 1 ∨ some val✝¹ = 2 ∧ some val✝ = 0\n[PROOFSTEP]\nrepeat' erw [WithBot.coe_eq_coe]\n[GOAL]\ncase some.some\nval✝¹ val✝ : ℕ\n⊢ some val✝¹ + some val✝ = 2 ↔\n some val✝¹ = 0 ∧ some val✝ = 2 ∨ some val✝¹ = 1 ∧ some val✝ = 1 ∨ some val✝¹ = 2 ∧ some val✝ = 0\n[PROOFSTEP]\nerw [WithBot.coe_eq_coe]\n[GOAL]\ncase some.some\nval✝¹ val✝ : ℕ\n⊢ (fun x x_1 => x + x_1) val✝¹ val✝ = ↑2 ↔\n some val✝¹ = 0 ∧ some val✝ = 2 ∨ some val✝¹ = 1 ∧ some val✝ = 1 ∨ some val✝¹ = 2 ∧ some val✝ = 0\n[PROOFSTEP]\nerw [WithBot.coe_eq_coe]\n[GOAL]\ncase some.some\nval✝¹ val✝ : ℕ\n⊢ (fun x x_1 => x + x_1) val✝¹ val✝ = ↑2 ↔\n val✝¹ = 0 ∧ some val✝ = 2 ∨ some val✝¹ = 1 ∧ some val✝ = 1 ∨ some val✝¹ = 2 ∧ some val✝ = 0\n[PROOFSTEP]\nerw [WithBot.coe_eq_coe]\n[GOAL]\ncase some.some\nval✝¹ val✝ : ℕ\n⊢ (fun x x_1 => x + x_1) val✝¹ val✝ = ↑2 ↔\n val✝¹ = 0 ∧ val✝ = ↑2 ∨ some val✝¹ = 1 ∧ some val✝ = 1 ∨ some val✝¹ = 2 ∧ some val✝ = 0\n[PROOFSTEP]\nerw [WithBot.coe_eq_coe]\n[GOAL]\ncase some.some\nval✝¹ val✝ : ℕ\n⊢ (fun x x_1 => x + x_1) val✝¹ val✝ = ↑2 ↔\n val✝¹ = 0 ∧ val✝ = ↑2 ∨ val✝¹ = 1 ∧ some val✝ = 1 ∨ some val✝¹ = 2 ∧ some val✝ = 0\n[PROOFSTEP]\nerw [WithBot.coe_eq_coe]\n[GOAL]\ncase some.some\nval✝¹ val✝ : ℕ\n⊢ (fun x x_1 => x + x_1) val✝¹ val✝ = ↑2 ↔ val✝¹ = 0 ∧ val✝ = ↑2 ∨ val✝¹ = 1 ∧ val✝ = 1 ∨ some val✝¹ = 2 ∧ some val✝ = 0\n[PROOFSTEP]\nerw [WithBot.coe_eq_coe]\n[GOAL]\ncase some.some\nval✝¹ val✝ : ℕ\n⊢ (fun x x_1 => x + x_1) val✝¹ val✝ = ↑2 ↔ val✝¹ = 0 ∧ val✝ = ↑2 ∨ val✝¹ = 1 ∧ val✝ = 1 ∨ val✝¹ = ↑2 ∧ some val✝ = 0\n[PROOFSTEP]\nerw [WithBot.coe_eq_coe]\n[GOAL]\ncase some.some\nval✝¹ val✝ : ℕ\n⊢ (fun x x_1 => x + x_1) val✝¹ val✝ = ↑2 ↔ val✝¹ = 0 ∧ val✝ = ↑2 ∨ val✝¹ = 1 ∧ val✝ = 1 ∨ val✝¹ = ↑2 ∧ val✝ = 0\n[PROOFSTEP]\nerw [WithBot.coe_eq_coe]\n[GOAL]\ncase some.some\nval✝¹ val✝ : ℕ\n⊢ (fun x x_1 => x + x_1) val✝¹ val✝ = ↑2 ↔ val✝¹ = 0 ∧ val✝ = ↑2 ∨ val✝¹ = 1 ∧ val✝ = 1 ∨ val✝¹ = ↑2 ∧ val✝ = 0\n[PROOFSTEP]\nexact Nat.add_eq_two_iff\n[GOAL]\nn m : WithBot ℕ\n⊢ n + m = 3 ↔ n = 0 ∧ m = 3 ∨ n = 1 ∧ m = 2 ∨ n = 2 ∧ m = 1 ∨ n = 3 ∧ m = 0\n[PROOFSTEP]\nrcases n, m with ⟨_ | _, _ | _⟩\n[GOAL]\ncase none.none\n⊢ none + none = 3 ↔ none = 0 ∧ none = 3 ∨ none = 1 ∧ none = 2 ∨ none = 2 ∧ none = 1 ∨ none = 3 ∧ none = 0\ncase none.some\nval✝ : ℕ\n⊢ none + some val✝ = 3 ↔\n none = 0 ∧ some val✝ = 3 ∨ none = 1 ∧ some val✝ = 2 ∨ none = 2 ∧ some val✝ = 1 ∨ none = 3 ∧ some val✝ = 0\ncase some.none\nval✝ : ℕ\n⊢ some val✝ + none = 3 ↔\n some val✝ = 0 ∧ none = 3 ∨ some val✝ = 1 ∧ none = 2 ∨ some val✝ = 2 ∧ none = 1 ∨ some val✝ = 3 ∧ none = 0\ncase some.some\nval✝¹ val✝ : ℕ\n⊢ some val✝¹ + some val✝ = 3 ↔\n some val✝¹ = 0 ∧ some val✝ = 3 ∨\n some val✝¹ = 1 ∧ some val✝ = 2 ∨ some val✝¹ = 2 ∧ some val✝ = 1 ∨ some val✝¹ = 3 ∧ some val✝ = 0\n[PROOFSTEP]\nany_goals refine' ⟨fun h => Option.noConfusion h, fun h => _⟩; aesop\n[GOAL]\ncase none.none\n⊢ none + none = 3 ↔ none = 0 ∧ none = 3 ∨ none = 1 ∧ none = 2 ∨ none = 2 ∧ none = 1 ∨ none = 3 ∧ none = 0\n[PROOFSTEP]\nrefine' ⟨fun h => Option.noConfusion h, fun h => _⟩\n[GOAL]\ncase none.none\nh : none = 0 ∧ none = 3 ∨ none = 1 ∧ none = 2 ∨ none = 2 ∧ none = 1 ∨ none = 3 ∧ none = 0\n⊢ none + none = 3\n[PROOFSTEP]\naesop\n[GOAL]\ncase none.some\nval✝ : ℕ\n⊢ none + some val✝ = 3 ↔\n none = 0 ∧ some val✝ = 3 ∨ none = 1 ∧ some val✝ = 2 ∨ none = 2 ∧ some val✝ = 1 ∨ none = 3 ∧ some val✝ = 0\n[PROOFSTEP]\nrefine' ⟨fun h => Option.noConfusion h, fun h => _⟩\n[GOAL]\ncase none.some\nval✝ : ℕ\nh : none = 0 ∧ some val✝ = 3 ∨ none = 1 ∧ some val✝ = 2 ∨ none = 2 ∧ some val✝ = 1 ∨ none = 3 ∧ some val✝ = 0\n⊢ none + some val✝ = 3\n[PROOFSTEP]\naesop\n[GOAL]\ncase some.none\nval✝ : ℕ\n⊢ some val✝ + none = 3 ↔\n some val✝ = 0 ∧ none = 3 ∨ some val✝ = 1 ∧ none = 2 ∨ some val✝ = 2 ∧ none = 1 ∨ some val✝ = 3 ∧ none = 0\n[PROOFSTEP]\nrefine' ⟨fun h => Option.noConfusion h, fun h => _⟩\n[GOAL]\ncase some.none\nval✝ : ℕ\nh : some val✝ = 0 ∧ none = 3 ∨ some val✝ = 1 ∧ none = 2 ∨ some val✝ = 2 ∧ none = 1 ∨ some val✝ = 3 ∧ none = 0\n⊢ some val✝ + none = 3\n[PROOFSTEP]\naesop\n[GOAL]\ncase some.some\nval✝¹ val✝ : ℕ\n⊢ some val✝¹ + some val✝ = 3 ↔\n some val✝¹ = 0 ∧ some val✝ = 3 ∨\n some val✝¹ = 1 ∧ some val✝ = 2 ∨ some val✝¹ = 2 ∧ some val✝ = 1 ∨ some val✝¹ = 3 ∧ some val✝ = 0\n[PROOFSTEP]\nrefine' ⟨fun h => Option.noConfusion h, fun h => _⟩\n[GOAL]\ncase some.some\nval✝¹ val✝ : ℕ\n⊢ some val✝¹ + some val✝ = 3 ↔\n some val✝¹ = 0 ∧ some val✝ = 3 ∨\n some val✝¹ = 1 ∧ some val✝ = 2 ∨ some val✝¹ = 2 ∧ some val✝ = 1 ∨ some val✝¹ = 3 ∧ some val✝ = 0\n[PROOFSTEP]\nrepeat' erw [WithBot.coe_eq_coe]\n[GOAL]\ncase some.some\nval✝¹ val✝ : ℕ\n⊢ some val✝¹ + some val✝ = 3 ↔\n some val✝¹ = 0 ∧ some val✝ = 3 ∨\n some val✝¹ = 1 ∧ some val✝ = 2 ∨ some val✝¹ = 2 ∧ some val✝ = 1 ∨ some val✝¹ = 3 ∧ some val✝ = 0\n[PROOFSTEP]\nerw [WithBot.coe_eq_coe]\n[GOAL]\ncase some.some\nval✝¹ val✝ : ℕ\n⊢ (fun x x_1 => x + x_1) val✝¹ val✝ = ↑3 ↔\n some val✝¹ = 0 ∧ some val✝ = 3 ∨\n some val✝¹ = 1 ∧ some val✝ = 2 ∨ some val✝¹ = 2 ∧ some val✝ = 1 ∨ some val✝¹ = 3 ∧ some val✝ = 0\n[PROOFSTEP]\nerw [WithBot.coe_eq_coe]\n[GOAL]\ncase some.some\nval✝¹ val✝ : ℕ\n⊢ (fun x x_1 => x + x_1) val✝¹ val✝ = ↑3 ↔\n val✝¹ = 0 ∧ some val✝ = 3 ∨\n some val✝¹ = 1 ∧ some val✝ = 2 ∨ some val✝¹ = 2 ∧ some val✝ = 1 ∨ some val✝¹ = 3 ∧ some val✝ = 0\n[PROOFSTEP]\nerw [WithBot.coe_eq_coe]\n[GOAL]\ncase some.some\nval✝¹ val✝ : ℕ\n⊢ (fun x x_1 => x + x_1) val✝¹ val✝ = ↑3 ↔\n val✝¹ = 0 ∧ val✝ = ↑3 ∨\n some val✝¹ = 1 ∧ some val✝ = 2 ∨ some val✝¹ = 2 ∧ some val✝ = 1 ∨ some val✝¹ = 3 ∧ some val✝ = 0\n[PROOFSTEP]\nerw [WithBot.coe_eq_coe]\n[GOAL]\ncase some.some\nval✝¹ val✝ : ℕ\n⊢ (fun x x_1 => x + x_1) val✝¹ val✝ = ↑3 ↔\n val✝¹ = 0 ∧ val✝ = ↑3 ∨ val✝¹ = 1 ∧ some val✝ = 2 ∨ some val✝¹ = 2 ∧ some val✝ = 1 ∨ some val✝¹ = 3 ∧ some val✝ = 0\n[PROOFSTEP]\nerw [WithBot.coe_eq_coe]\n[GOAL]\ncase some.some\nval✝¹ val✝ : ℕ\n⊢ (fun x x_1 => x + x_1) val✝¹ val✝ = ↑3 ↔\n val✝¹ = 0 ∧ val✝ = ↑3 ∨ val✝¹ = 1 ∧ val✝ = ↑2 ∨ some val✝¹ = 2 ∧ some val✝ = 1 ∨ some val✝¹ = 3 ∧ some val✝ = 0\n[PROOFSTEP]\nerw [WithBot.coe_eq_coe]\n[GOAL]\ncase some.some\nval✝¹ val✝ : ℕ\n⊢ (fun x x_1 => x + x_1) val✝¹ val✝ = ↑3 ↔\n val✝¹ = 0 ∧ val✝ = ↑3 ∨ val✝¹ = 1 ∧ val✝ = ↑2 ∨ val✝¹ = ↑2 ∧ some val✝ = 1 ∨ some val✝¹ = 3 ∧ some val✝ = 0\n[PROOFSTEP]\nerw [WithBot.coe_eq_coe]\n[GOAL]\ncase some.some\nval✝¹ val✝ : ℕ\n⊢ (fun x x_1 => x + x_1) val✝¹ val✝ = ↑3 ↔\n val✝¹ = 0 ∧ val✝ = ↑3 ∨ val✝¹ = 1 ∧ val✝ = ↑2 ∨ val✝¹ = ↑2 ∧ val✝ = 1 ∨ some val✝¹ = 3 ∧ some val✝ = 0\n[PROOFSTEP]\nerw [WithBot.coe_eq_coe]\n[GOAL]\ncase some.some\nval✝¹ val✝ : ℕ\n⊢ (fun x x_1 => x + x_1) val✝¹ val✝ = ↑3 ↔\n val✝¹ = 0 ∧ val✝ = ↑3 ∨ val✝¹ = 1 ∧ val✝ = ↑2 ∨ val✝¹ = ↑2 ∧ val✝ = 1 ∨ val✝¹ = ↑3 ∧ some val✝ = 0\n[PROOFSTEP]\nerw [WithBot.coe_eq_coe]\n[GOAL]\ncase some.some\nval✝¹ val✝ : ℕ\n⊢ (fun x x_1 => x + x_1) val✝¹ val✝ = ↑3 ↔\n val✝¹ = 0 ∧ val✝ = ↑3 ∨ val✝¹ = 1 ∧ val✝ = ↑2 ∨ val✝¹ = ↑2 ∧ val✝ = 1 ∨ val✝¹ = ↑3 ∧ val✝ = 0\n[PROOFSTEP]\nerw [WithBot.coe_eq_coe]\n[GOAL]\ncase some.some\nval✝¹ val✝ : ℕ\n⊢ (fun x x_1 => x + x_1) val✝¹ val✝ = ↑3 ↔\n val✝¹ = 0 ∧ val✝ = ↑3 ∨ val✝¹ = 1 ∧ val✝ = ↑2 ∨ val✝¹ = ↑2 ∧ val✝ = 1 ∨ val✝¹ = ↑3 ∧ val✝ = 0\n[PROOFSTEP]\nexact Nat.add_eq_three_iff\n[GOAL]\nn : ℕ\n⊢ 0 ≤ ↑n\n[PROOFSTEP]\nrw [← WithBot.coe_zero]\n[GOAL]\nn : ℕ\n⊢ ↑0 ≤ ↑n\n[PROOFSTEP]\nexact WithBot.coe_le_coe.mpr (Nat.zero_le n)\n[GOAL]\nn : WithBot ℕ\n⊢ n < 0 ↔ n = ⊥\n[PROOFSTEP]\nrefine' Option.casesOn n _ _\n[GOAL]\ncase refine'_1\nn : WithBot ℕ\n⊢ none < 0 ↔ none = ⊥\ncase refine'_2 n : WithBot ℕ ⊢ ∀ (val : ℕ), some val < 0 ↔ some val = ⊥\n[PROOFSTEP]\nexact of_eq_true (eq_true_of_decide (Eq.refl true))\n[GOAL]\ncase refine'_2\nn : WithBot ℕ\n⊢ ∀ (val : ℕ), some val < 0 ↔ some val = ⊥\n[PROOFSTEP]\nintro n\n[GOAL]\ncase refine'_2\nn✝ : WithBot ℕ\nn : ℕ\n⊢ some n < 0 ↔ some n = ⊥\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun h => _⟩\n[GOAL]\ncase refine'_2.refine'_1\nn✝ : WithBot ℕ\nn : ℕ\nh : some n < 0\n⊢ some n = ⊥\ncase refine'_2.refine'_2 n✝ : WithBot ℕ n : ℕ h : some n = ⊥ ⊢ some n < 0\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase refine'_2.refine'_1.h\nn✝ : WithBot ℕ\nn : ℕ\nh : some n < 0\n⊢ False\n[PROOFSTEP]\nrw [WithBot.some_eq_coe] at h \n[GOAL]\ncase refine'_2.refine'_1.h\nn✝ : WithBot ℕ\nn : ℕ\nh : ↑n < 0\n⊢ False\n[PROOFSTEP]\nexact not_le_of_lt h WithBot.coe_nonneg\n[GOAL]\ncase refine'_2.refine'_2\nn✝ : WithBot ℕ\nn : ℕ\nh : some n = ⊥\n⊢ some n < 0\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase refine'_2.refine'_2\nn✝ : WithBot ℕ\nn : ℕ\nh : some n = ⊥\n⊢ ⊥ < 0\n[PROOFSTEP]\nexact of_eq_true (eq_true_of_decide (Eq.refl true))\n[GOAL]\nx : WithBot ℕ\n⊢ 1 ≤ x ↔ 0 < x\n[PROOFSTEP]\nrefine' ⟨fun h => lt_of_lt_of_le (WithBot.coe_lt_coe.mpr zero_lt_one) h, fun h => _⟩\n[GOAL]\nx : WithBot ℕ\nh : 0 < x\n⊢ 1 ≤ x\n[PROOFSTEP]\ninduction x using WithBot.recBotCoe\n[GOAL]\ncase bot\nh : 0 < ⊥\n⊢ 1 ≤ ⊥\n[PROOFSTEP]\nexact (not_lt_bot h).elim\n[GOAL]\ncase coe\na✝ : ℕ\nh : 0 < ↑a✝\n⊢ 1 ≤ ↑a✝\n[PROOFSTEP]\nexact WithBot.coe_le_coe.mpr (Nat.succ_le_iff.mpr (WithBot.coe_lt_coe.mp h))\n[GOAL]\nx : WithBot ℕ\n⊢ ¬x < 1 ↔ ¬x ≤ 0\n[PROOFSTEP]\nsimpa using one_le_iff_zero_lt\n[GOAL]\nn m : WithBot ℕ\nh : n < m\n⊢ n + 1 ≤ m\n[PROOFSTEP]\ncases n\n[GOAL]\ncase none\nm : WithBot ℕ\nh : none < m\n⊢ none + 1 ≤ m\n[PROOFSTEP]\nexact bot_le\n[GOAL]\ncase some\nm : WithBot ℕ\nval✝ : ℕ\nh : some val✝ < m\n⊢ some val✝ + 1 ≤ m\n[PROOFSTEP]\ncases m\n[GOAL]\ncase some.none\nval✝ : ℕ\nh : some val✝ < none\n⊢ some val✝ + 1 ≤ none\ncase some.some val✝¹ val✝ : ℕ h : some val✝¹ < some val✝ ⊢ some val✝¹ + 1 ≤ some val✝\n[PROOFSTEP]\nexacts [(not_lt_bot h).elim, WithBot.some_le_some.2 (WithBot.some_lt_some.1 h)]\n", "meta": {"mathlib_filename": "Mathlib.Data.Nat.WithBot", "llama_tokens": 9953, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO", "lm_q1_score": 0.3738758227716966, "lm_q2_score": 0.017986210159487682, "lm_q1q2_score": 0.006724609121923106}} {"text": "[GOAL]\nα : Type u_1\na : Lists α\nl : Lists' α true\n⊢ toList (cons a l) = a :: toList l\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nl : List (Lists α)\n⊢ toList (ofList l) = l\n[PROOFSTEP]\ninduction l\n[GOAL]\ncase nil\nα : Type u_1\n⊢ toList (ofList []) = []\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase cons\nα : Type u_1\nhead✝ : Lists α\ntail✝ : List (Lists α)\ntail_ih✝ : toList (ofList tail✝) = tail✝\n⊢ toList (ofList (head✝ :: tail✝)) = head✝ :: tail✝\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nα : Type u_1\nb : Bool\nh : true = b\nl : Lists' α b\n⊢ Lists' α true\n[PROOFSTEP]\nrw [h]\n[GOAL]\nα : Type u_1\nb : Bool\nh : true = b\nl : Lists' α b\n⊢ Lists' α b\n[PROOFSTEP]\nexact l\n[GOAL]\nα : Type u_1\nb : Bool\nh : true = b\nl : Lists' α b\n⊢ let l' := Eq.mpr (_ : Lists' α true = Lists' α b) l;\n ofList (toList l') = l'\n[PROOFSTEP]\ninduction l with\n| atom => cases h\n| nil => simp\n| cons' b a _ IH =>\n intro l'\n simpa [cons] using IH rfl\n[GOAL]\nα : Type u_1\nb : Bool\nh : true = b\nl : Lists' α b\n⊢ let l' := Eq.mpr (_ : Lists' α true = Lists' α b) l;\n ofList (toList l') = l'\n[PROOFSTEP]\ninduction l with\n| atom => cases h\n| nil => simp\n| cons' b a _ IH =>\n intro l'\n simpa [cons] using IH rfl\n[GOAL]\ncase atom\nα : Type u_1\nb : Bool\na✝ : α\nh : true = false\n⊢ let l' := Eq.mpr (_ : Lists' α true = Lists' α false) (atom a✝);\n ofList (toList l') = l'\n[PROOFSTEP]\n\n| atom => cases h\n[GOAL]\ncase atom\nα : Type u_1\nb : Bool\na✝ : α\nh : true = false\n⊢ let l' := Eq.mpr (_ : Lists' α true = Lists' α false) (atom a✝);\n ofList (toList l') = l'\n[PROOFSTEP]\ncases h\n[GOAL]\ncase nil\nα : Type u_1\nb : Bool\nh : true = true\n⊢ let l' := Eq.mpr (_ : Lists' α true = Lists' α true) nil;\n ofList (toList l') = l'\n[PROOFSTEP]\n\n| nil => simp\n[GOAL]\ncase nil\nα : Type u_1\nb : Bool\nh : true = true\n⊢ let l' := Eq.mpr (_ : Lists' α true = Lists' α true) nil;\n ofList (toList l') = l'\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons'\nα : Type u_1\nb✝¹ b✝ : Bool\nb : Lists' α b✝\na : Lists' α true\na_ih✝ :\n ∀ (h : true = b✝),\n let l' := Eq.mpr (_ : Lists' α true = Lists' α b✝) b;\n ofList (toList l') = l'\nIH :\n ∀ (h : true = true),\n let l' := Eq.mpr (_ : Lists' α true = Lists' α true) a;\n ofList (toList l') = l'\nh : true = true\n⊢ let l' := Eq.mpr (_ : Lists' α true = Lists' α true) (cons' b a);\n ofList (toList l') = l'\n[PROOFSTEP]\n\n| cons' b a _ IH =>\n intro l'\n simpa [cons] using IH rfl\n[GOAL]\ncase cons'\nα : Type u_1\nb✝¹ b✝ : Bool\nb : Lists' α b✝\na : Lists' α true\na_ih✝ :\n ∀ (h : true = b✝),\n let l' := Eq.mpr (_ : Lists' α true = Lists' α b✝) b;\n ofList (toList l') = l'\nIH :\n ∀ (h : true = true),\n let l' := Eq.mpr (_ : Lists' α true = Lists' α true) a;\n ofList (toList l') = l'\nh : true = true\n⊢ let l' := Eq.mpr (_ : Lists' α true = Lists' α true) (cons' b a);\n ofList (toList l') = l'\n[PROOFSTEP]\nintro l'\n[GOAL]\ncase cons'\nα : Type u_1\nb✝¹ b✝ : Bool\nb : Lists' α b✝\na : Lists' α true\na_ih✝ :\n ∀ (h : true = b✝),\n let l' := Eq.mpr (_ : Lists' α true = Lists' α b✝) b;\n ofList (toList l') = l'\nIH :\n ∀ (h : true = true),\n let l' := Eq.mpr (_ : Lists' α true = Lists' α true) a;\n ofList (toList l') = l'\nh : true = true\nl' : Lists' α true := Eq.mpr (_ : Lists' α true = Lists' α true) (cons' b a)\n⊢ ofList (toList l') = l'\n[PROOFSTEP]\nsimpa [cons] using IH rfl\n[GOAL]\nα : Type u_1\na y : Lists α\nl : Lists' α true\n⊢ a ∈ cons y l ↔ a ~ y ∨ a ∈ l\n[PROOFSTEP]\nsimp [mem_def, or_and_right, exists_or]\n[GOAL]\nα : Type u_1\na : Lists α\nl₁ l₂ : Lists' α true\n⊢ cons a l₁ ⊆ l₂ ↔ a ∈ l₂ ∧ l₁ ⊆ l₂\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun ⟨⟨a', m, e⟩, s⟩ => Subset.cons e m s⟩\n[GOAL]\nα : Type u_1\na : Lists α\nl₁ l₂ : Lists' α true\nh : cons a l₁ ⊆ l₂\n⊢ a ∈ l₂ ∧ l₁ ⊆ l₂\n[PROOFSTEP]\ngeneralize h' : Lists'.cons a l₁ = l₁' at h \n[GOAL]\nα : Type u_1\na : Lists α\nl₁ l₂ l₁' : Lists' α true\nh' : cons a l₁ = l₁'\nh : l₁' ⊆ l₂\n⊢ a ∈ l₂ ∧ l₁ ⊆ l₂\n[PROOFSTEP]\ncases' h with l a' a'' l l' e m s\n[GOAL]\ncase nil\nα : Type u_1\na : Lists α\nl₁ l₂ : Lists' α true\nh' : cons a l₁ = nil\n⊢ a ∈ l₂ ∧ l₁ ⊆ l₂\n[PROOFSTEP]\ncases a\n[GOAL]\ncase nil.mk\nα : Type u_1\nl₁ l₂ : Lists' α true\nfst✝ : Bool\nsnd✝ : Lists' α fst✝\nh' : cons { fst := fst✝, snd := snd✝ } l₁ = nil\n⊢ { fst := fst✝, snd := snd✝ } ∈ l₂ ∧ l₁ ⊆ l₂\n[PROOFSTEP]\ncases h'\n[GOAL]\ncase cons\nα : Type u_1\na : Lists α\nl₁ l₂ : Lists' α true\na' a'' : Lists α\nl : Lists' α true\ne : a' ~ a''\nh' : cons a l₁ = cons a' l\nm : a'' ∈ toList l₂\ns : Subset l l₂\n⊢ a ∈ l₂ ∧ l₁ ⊆ l₂\n[PROOFSTEP]\ncases a\n[GOAL]\ncase cons.mk\nα : Type u_1\nl₁ l₂ : Lists' α true\na' a'' : Lists α\nl : Lists' α true\ne : a' ~ a''\nm : a'' ∈ toList l₂\ns : Subset l l₂\nfst✝ : Bool\nsnd✝ : Lists' α fst✝\nh' : cons { fst := fst✝, snd := snd✝ } l₁ = cons a' l\n⊢ { fst := fst✝, snd := snd✝ } ∈ l₂ ∧ l₁ ⊆ l₂\n[PROOFSTEP]\ncases a'\n[GOAL]\ncase cons.mk.mk\nα : Type u_1\nl₁ l₂ : Lists' α true\na'' : Lists α\nl : Lists' α true\nm : a'' ∈ toList l₂\ns : Subset l l₂\nfst✝¹ : Bool\nsnd✝¹ : Lists' α fst✝¹\nfst✝ : Bool\nsnd✝ : Lists' α fst✝\ne : { fst := fst✝, snd := snd✝ } ~ a''\nh' : cons { fst := fst✝¹, snd := snd✝¹ } l₁ = cons { fst := fst✝, snd := snd✝ } l\n⊢ { fst := fst✝¹, snd := snd✝¹ } ∈ l₂ ∧ l₁ ⊆ l₂\n[PROOFSTEP]\ncases h'\n[GOAL]\ncase cons.mk.mk.refl\nα : Type u_1\nl₁ l₂ : Lists' α true\na'' : Lists α\nm : a'' ∈ toList l₂\nfst✝ : Bool\nsnd✝ : Lists' α fst✝\ne : { fst := fst✝, snd := snd✝ } ~ a''\ns : Subset l₁ l₂\n⊢ { fst := fst✝, snd := snd✝ } ∈ l₂ ∧ l₁ ⊆ l₂\n[PROOFSTEP]\nexact ⟨⟨_, m, e⟩, s⟩\n[GOAL]\nα : Type u_1\nl₁ l₂ : List (Lists α)\nh : l₁ ⊆ l₂\n⊢ ofList l₁ ⊆ ofList l₂\n[PROOFSTEP]\ninduction' l₁ with _ _ l₁_ih\n[GOAL]\ncase nil\nα : Type u_1\nl₁ l₂ : List (Lists α)\nh✝ : l₁ ⊆ l₂\nh : [] ⊆ l₂\n⊢ ofList [] ⊆ ofList l₂\n[PROOFSTEP]\nexact Subset.nil\n[GOAL]\ncase cons\nα : Type u_1\nl₁ l₂ : List (Lists α)\nh✝ : l₁ ⊆ l₂\nhead✝ : Lists α\ntail✝ : List (Lists α)\nl₁_ih : tail✝ ⊆ l₂ → ofList tail✝ ⊆ ofList l₂\nh : head✝ :: tail✝ ⊆ l₂\n⊢ ofList (head✝ :: tail✝) ⊆ ofList l₂\n[PROOFSTEP]\nrefine' Subset.cons (Lists.Equiv.refl _) _ (l₁_ih (List.subset_of_cons_subset h))\n[GOAL]\ncase cons\nα : Type u_1\nl₁ l₂ : List (Lists α)\nh✝ : l₁ ⊆ l₂\nhead✝ : Lists α\ntail✝ : List (Lists α)\nl₁_ih : tail✝ ⊆ l₂ → ofList tail✝ ⊆ ofList l₂\nh : head✝ :: tail✝ ⊆ l₂\n⊢ head✝ ∈ toList (ofList l₂)\n[PROOFSTEP]\nsimp at h \n[GOAL]\ncase cons\nα : Type u_1\nl₁ l₂ : List (Lists α)\nh✝ : l₁ ⊆ l₂\nhead✝ : Lists α\ntail✝ : List (Lists α)\nl₁_ih : tail✝ ⊆ l₂ → ofList tail✝ ⊆ ofList l₂\nh : head✝ ∈ l₂ ∧ tail✝ ⊆ l₂\n⊢ head✝ ∈ toList (ofList l₂)\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα : Type u_1\nl : Lists' α true\n⊢ l ⊆ l\n[PROOFSTEP]\nrw [← Lists'.of_toList l]\n[GOAL]\nα : Type u_1\nl : Lists' α true\n⊢ ofList (toList l) ⊆ ofList (toList l)\n[PROOFSTEP]\nexact ofList_subset (List.Subset.refl _)\n[GOAL]\nα : Type u_1\nl : Lists' α true\n⊢ l ⊆ nil → l = nil\n[PROOFSTEP]\nrw [← of_toList l]\n[GOAL]\nα : Type u_1\nl : Lists' α true\n⊢ ofList (toList l) ⊆ nil → ofList (toList l) = nil\n[PROOFSTEP]\ninduction toList l\n[GOAL]\ncase nil\nα : Type u_1\nl : Lists' α true\n⊢ ofList [] ⊆ nil → ofList [] = nil\n[PROOFSTEP]\nintro h\n[GOAL]\ncase cons\nα : Type u_1\nl : Lists' α true\nhead✝ : Lists α\ntail✝ : List (Lists α)\ntail_ih✝ : ofList tail✝ ⊆ nil → ofList tail✝ = nil\n⊢ ofList (head✝ :: tail✝) ⊆ nil → ofList (head✝ :: tail✝) = nil\n[PROOFSTEP]\nintro h\n[GOAL]\ncase nil\nα : Type u_1\nl : Lists' α true\nh : ofList [] ⊆ nil\n⊢ ofList [] = nil\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nα : Type u_1\nl : Lists' α true\nhead✝ : Lists α\ntail✝ : List (Lists α)\ntail_ih✝ : ofList tail✝ ⊆ nil → ofList tail✝ = nil\nh : ofList (head✝ :: tail✝) ⊆ nil\n⊢ ofList (head✝ :: tail✝) = nil\n[PROOFSTEP]\nrcases cons_subset.1 h with ⟨⟨_, ⟨⟩, _⟩, _⟩\n[GOAL]\nα : Type u_1\na : Lists α\nx✝ : Lists' α true\nh : a ∈ toList nil\n⊢ a ∈ x✝\n[PROOFSTEP]\ncases h\n[GOAL]\nα : Type u_1\na : Lists α\nb✝ : Bool\na0 : Lists' α b✝\nl0 l₂ : Lists' α true\ns : cons' a0 l0 ⊆ l₂\nh : a ∈ toList (cons' a0 l0)\n⊢ a ∈ l₂\n[PROOFSTEP]\ncases' s with _ _ _ _ _ e m s\n[GOAL]\ncase cons\nα : Type u_1\na : Lists α\nl0 l₂ : Lists' α true\na✝ a'✝ : Lists α\ne : a✝ ~ a'✝\nh : a ∈ toList (cons' a✝.snd l0)\nm : a'✝ ∈ toList l₂\ns : Subset l0 l₂\n⊢ a ∈ l₂\n[PROOFSTEP]\nsimp only [toList, Sigma.eta, List.find?, List.mem_cons] at h \n[GOAL]\ncase cons\nα : Type u_1\na : Lists α\nl0 l₂ : Lists' α true\na✝ a'✝ : Lists α\ne : a✝ ~ a'✝\nm : a'✝ ∈ toList l₂\ns : Subset l0 l₂\nh : a = a✝ ∨ a ∈ toList l0\n⊢ a ∈ l₂\n[PROOFSTEP]\nrcases h with (rfl | h)\n[GOAL]\ncase cons.inl\nα : Type u_1\na : Lists α\nl0 l₂ : Lists' α true\na'✝ : Lists α\nm : a'✝ ∈ toList l₂\ns : Subset l0 l₂\ne : a ~ a'✝\n⊢ a ∈ l₂\n[PROOFSTEP]\nexact ⟨_, m, e⟩\n[GOAL]\ncase cons.inr\nα : Type u_1\na : Lists α\nl0 l₂ : Lists' α true\na✝ a'✝ : Lists α\ne : a✝ ~ a'✝\nm : a'✝ ∈ toList l₂\ns : Subset l0 l₂\nh : a ∈ toList l0\n⊢ a ∈ l₂\n[PROOFSTEP]\nexact mem_of_subset' s h\n[GOAL]\nα : Type u_1\nl₁ l₂ : Lists' α true\nH : ∀ (a : Lists α), a ∈ toList l₁ → a ∈ l₂\n⊢ l₁ ⊆ l₂\n[PROOFSTEP]\nrw [← of_toList l₁]\n[GOAL]\nα : Type u_1\nl₁ l₂ : Lists' α true\nH : ∀ (a : Lists α), a ∈ toList l₁ → a ∈ l₂\n⊢ ofList (toList l₁) ⊆ l₂\n[PROOFSTEP]\nrevert H\n[GOAL]\nα : Type u_1\nl₁ l₂ : Lists' α true\n⊢ (∀ (a : Lists α), a ∈ toList l₁ → a ∈ l₂) → ofList (toList l₁) ⊆ l₂\n[PROOFSTEP]\ninduction' toList l₁ with h t t_ih\n[GOAL]\ncase nil\nα : Type u_1\nl₁ l₂ : Lists' α true\n⊢ (∀ (a : Lists α), a ∈ [] → a ∈ l₂) → ofList [] ⊆ l₂\n[PROOFSTEP]\nintro H\n[GOAL]\ncase cons\nα : Type u_1\nl₁ l₂ : Lists' α true\nh : Lists α\nt : List (Lists α)\nt_ih : (∀ (a : Lists α), a ∈ t → a ∈ l₂) → ofList t ⊆ l₂\n⊢ (∀ (a : Lists α), a ∈ h :: t → a ∈ l₂) → ofList (h :: t) ⊆ l₂\n[PROOFSTEP]\nintro H\n[GOAL]\ncase nil\nα : Type u_1\nl₁ l₂ : Lists' α true\nH : ∀ (a : Lists α), a ∈ [] → a ∈ l₂\n⊢ ofList [] ⊆ l₂\n[PROOFSTEP]\nexact Subset.nil\n[GOAL]\ncase cons\nα : Type u_1\nl₁ l₂ : Lists' α true\nh : Lists α\nt : List (Lists α)\nt_ih : (∀ (a : Lists α), a ∈ t → a ∈ l₂) → ofList t ⊆ l₂\nH : ∀ (a : Lists α), a ∈ h :: t → a ∈ l₂\n⊢ ofList (h :: t) ⊆ l₂\n[PROOFSTEP]\nsimp only [ofList, List.find?, List.mem_cons, forall_eq_or_imp] at *\n[GOAL]\ncase cons\nα : Type u_1\nl₁ l₂ : Lists' α true\nh : Lists α\nt : List (Lists α)\nt_ih : (∀ (a : Lists α), a ∈ t → a ∈ l₂) → ofList t ⊆ l₂\nH : h ∈ l₂ ∧ ∀ (a : Lists α), a ∈ t → a ∈ l₂\n⊢ cons h (ofList t) ⊆ l₂\n[PROOFSTEP]\nexact cons_subset.2 ⟨H.1, t_ih H.2⟩\n[GOAL]\nα : Type u_1\nl : List (Lists α)\n⊢ toList (ofList l) = l\n[PROOFSTEP]\nsimp [ofList, of']\n[GOAL]\nα : Type u_1\nl : Lists' α true\nx✝ : IsList { fst := true, snd := l }\n⊢ ofList (toList { fst := true, snd := l }) = { fst := true, snd := l }\n[PROOFSTEP]\nsimp_all [ofList, of']\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n⊢ DecidableEq (Lists α)\n[PROOFSTEP]\nunfold Lists\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n⊢ DecidableEq ((b : Bool) × Lists' α b)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\ninst✝ : SizeOf α\n⊢ SizeOf (Lists α)\n[PROOFSTEP]\nunfold Lists\n[GOAL]\nα : Type u_1\ninst✝ : SizeOf α\n⊢ SizeOf ((b : Bool) × Lists' α b)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\nC : Lists α → Sort u_2\nD : Lists' α true → Sort u_3\nC0 : (a : α) → C (atom a)\nC1 : (l : Lists' α true) → D l → C (of' l)\nD0 : D Lists'.nil\nD1 : (a : Lists α) → (l : Lists' α true) → C a → D l → D (Lists'.cons a l)\n⊢ PProd ((l : Lists α) → C l) ((l : Lists' α true) → D l)\n[PROOFSTEP]\nsuffices\n ∀ {b} (l : Lists' α b),\n PProd (C ⟨_, l⟩)\n (match b, l with\n | true, l => D l\n | false, _ => PUnit)\n by exact ⟨fun ⟨b, l⟩ => (this _).1, fun l => (this l).2⟩\n[GOAL]\nα : Type u_1\nC : Lists α → Sort u_2\nD : Lists' α true → Sort u_3\nC0 : (a : α) → C (atom a)\nC1 : (l : Lists' α true) → D l → C (of' l)\nD0 : D Lists'.nil\nD1 : (a : Lists α) → (l : Lists' α true) → C a → D l → D (Lists'.cons a l)\nthis :\n {b : Bool} →\n (l : Lists' α b) →\n PProd (C { fst := b, snd := l })\n (match b, l with\n | true, l => D l\n | false, x => PUnit)\n⊢ PProd ((l : Lists α) → C l) ((l : Lists' α true) → D l)\n[PROOFSTEP]\nexact ⟨fun ⟨b, l⟩ => (this _).1, fun l => (this l).2⟩\n[GOAL]\nα : Type u_1\nC : Lists α → Sort u_2\nD : Lists' α true → Sort u_3\nC0 : (a : α) → C (atom a)\nC1 : (l : Lists' α true) → D l → C (of' l)\nD0 : D Lists'.nil\nD1 : (a : Lists α) → (l : Lists' α true) → C a → D l → D (Lists'.cons a l)\n⊢ {b : Bool} →\n (l : Lists' α b) →\n PProd (C { fst := b, snd := l })\n (match b, l with\n | true, l => D l\n | false, x => PUnit)\n[PROOFSTEP]\nintros b l\n[GOAL]\nα : Type u_1\nC : Lists α → Sort u_2\nD : Lists' α true → Sort u_3\nC0 : (a : α) → C (atom a)\nC1 : (l : Lists' α true) → D l → C (of' l)\nD0 : D Lists'.nil\nD1 : (a : Lists α) → (l : Lists' α true) → C a → D l → D (Lists'.cons a l)\nb : Bool\nl : Lists' α b\n⊢ PProd (C { fst := b, snd := l })\n (match b, l with\n | true, l => D l\n | false, x => PUnit)\n[PROOFSTEP]\ninduction' l with a b a l IH₁ IH\n[GOAL]\ncase atom\nα : Type u_1\nC : Lists α → Sort u_2\nD : Lists' α true → Sort u_3\nC0 : (a : α) → C (atom a)\nC1 : (l : Lists' α true) → D l → C (of' l)\nD0 : D Lists'.nil\nD1 : (a : Lists α) → (l : Lists' α true) → C a → D l → D (Lists'.cons a l)\nb : Bool\na : α\n⊢ PProd (C { fst := false, snd := Lists'.atom a })\n (match false, Lists'.atom a with\n | true, l => D l\n | false, x => PUnit)\n[PROOFSTEP]\nexact ⟨C0 _, ⟨⟩⟩\n[GOAL]\ncase nil\nα : Type u_1\nC : Lists α → Sort u_2\nD : Lists' α true → Sort u_3\nC0 : (a : α) → C (atom a)\nC1 : (l : Lists' α true) → D l → C (of' l)\nD0 : D Lists'.nil\nD1 : (a : Lists α) → (l : Lists' α true) → C a → D l → D (Lists'.cons a l)\nb : Bool\n⊢ PProd (C { fst := true, snd := Lists'.nil })\n (match true, Lists'.nil with\n | true, l => D l\n | false, x => PUnit)\n[PROOFSTEP]\nexact ⟨C1 _ D0, D0⟩\n[GOAL]\ncase cons'\nα : Type u_1\nC : Lists α → Sort u_2\nD : Lists' α true → Sort u_3\nC0 : (a : α) → C (atom a)\nC1 : (l : Lists' α true) → D l → C (of' l)\nD0 : D Lists'.nil\nD1 : (a : Lists α) → (l : Lists' α true) → C a → D l → D (Lists'.cons a l)\nb✝ b : Bool\na : Lists' α b\nl : Lists' α true\nIH₁ :\n PProd (C { fst := b, snd := a })\n (match b, a with\n | true, l => D l\n | false, x => PUnit)\nIH :\n PProd (C { fst := true, snd := l })\n (match true, l with\n | true, l => D l\n | false, x => PUnit)\n⊢ PProd (C { fst := true, snd := Lists'.cons' a l })\n (match true, Lists'.cons' a l with\n | true, l => D l\n | false, x => PUnit)\n[PROOFSTEP]\nhave : D (Lists'.cons' a l) := D1 ⟨_, _⟩ _ IH₁.1 IH.2\n[GOAL]\ncase cons'\nα : Type u_1\nC : Lists α → Sort u_2\nD : Lists' α true → Sort u_3\nC0 : (a : α) → C (atom a)\nC1 : (l : Lists' α true) → D l → C (of' l)\nD0 : D Lists'.nil\nD1 : (a : Lists α) → (l : Lists' α true) → C a → D l → D (Lists'.cons a l)\nb✝ b : Bool\na : Lists' α b\nl : Lists' α true\nIH₁ :\n PProd (C { fst := b, snd := a })\n (match b, a with\n | true, l => D l\n | false, x => PUnit)\nIH :\n PProd (C { fst := true, snd := l })\n (match true, l with\n | true, l => D l\n | false, x => PUnit)\nthis : D (Lists'.cons' a l)\n⊢ PProd (C { fst := true, snd := Lists'.cons' a l })\n (match true, Lists'.cons' a l with\n | true, l => D l\n | false, x => PUnit)\n[PROOFSTEP]\nexact ⟨C1 _ this, this⟩\n[GOAL]\nα : Type u_1\nl₁ l₂ : Lists' α true\n⊢ of' l₁ ~ of' l₂ ↔ l₁ ⊆ l₂ ∧ l₂ ⊆ l₁\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun ⟨h₁, h₂⟩ => Equiv.antisymm h₁ h₂⟩\n[GOAL]\nα : Type u_1\nl₁ l₂ : Lists' α true\nh : of' l₁ ~ of' l₂\n⊢ l₁ ⊆ l₂ ∧ l₂ ⊆ l₁\n[PROOFSTEP]\ncases' h with _ _ _ h₁ h₂\n[GOAL]\ncase refl\nα : Type u_1\nl₁ : Lists' α true\n⊢ l₁ ⊆ l₁ ∧ l₁ ⊆ l₁\n[PROOFSTEP]\nsimp [Lists'.Subset.refl]\n[GOAL]\ncase antisymm\nα : Type u_1\nl₁ l₂ : Lists' α true\nh₁ : Lists'.Subset l₁ l₂\nh₂ : Lists'.Subset l₂ l₁\n⊢ l₁ ⊆ l₂ ∧ l₂ ⊆ l₁\n[PROOFSTEP]\nexact ⟨h₁, h₂⟩\n[GOAL]\nα : Type u_1\na : α\nl : Lists α\nh : atom a ~ l\n⊢ atom a = l\n[PROOFSTEP]\ncases h\n[GOAL]\ncase refl\nα : Type u_1\na : α\n⊢ atom a = atom a\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nl₁ l₂ : Lists α\nh : l₁ ~ l₂\n⊢ l₂ ~ l₁\n[PROOFSTEP]\ncases' h with _ _ _ h₁ h₂ <;> [rfl; exact Equiv.antisymm h₂ h₁]\n[GOAL]\nα : Type u_1\nl₁ l₂ : Lists α\nh : l₁ ~ l₂\n⊢ l₂ ~ l₁\n[PROOFSTEP]\ncases' h with _ _ _ h₁ h₂\n[GOAL]\ncase refl\nα : Type u_1\nl₁ : Lists α\n⊢ l₁ ~ l₁\n[PROOFSTEP]\nrfl\n[GOAL]\ncase antisymm\nα : Type u_1\nl₁✝ l₂✝ : Lists' α true\nh₁ : Lists'.Subset l₁✝ l₂✝\nh₂ : Lists'.Subset l₂✝ l₁✝\n⊢ { fst := true, snd := l₂✝ } ~ { fst := true, snd := l₁✝ }\n[PROOFSTEP]\nexact Equiv.antisymm h₂ h₁\n[GOAL]\nα : Type u_1\n⊢ ∀ {l₁ l₂ l₃ : Lists α}, l₁ ~ l₂ → l₂ ~ l₃ → l₁ ~ l₃\n[PROOFSTEP]\nlet trans := fun l₁ : Lists α => ∀ ⦃l₂ l₃⦄, l₁ ~ l₂ → l₂ ~ l₃ → l₁ ~ l₃\n[GOAL]\nα : Type u_1\ntrans : Lists α → Prop := fun l₁ => ∀ ⦃l₂ l₃ : Lists α⦄, l₁ ~ l₂ → l₂ ~ l₃ → l₁ ~ l₃\n⊢ ∀ {l₁ l₂ l₃ : Lists α}, l₁ ~ l₂ → l₂ ~ l₃ → l₁ ~ l₃\n[PROOFSTEP]\nsuffices PProd (∀ l₁, trans l₁) (∀ (l : Lists' α true), ∀ l' ∈ l.toList, trans l') by exact this.1\n[GOAL]\nα : Type u_1\ntrans : Lists α → Prop := fun l₁ => ∀ ⦃l₂ l₃ : Lists α⦄, l₁ ~ l₂ → l₂ ~ l₃ → l₁ ~ l₃\nthis : PProd (∀ (l₁ : Lists α), trans l₁) (∀ (l : Lists' α true) (l' : Lists α), l' ∈ Lists'.toList l → trans l')\n⊢ ∀ {l₁ l₂ l₃ : Lists α}, l₁ ~ l₂ → l₂ ~ l₃ → l₁ ~ l₃\n[PROOFSTEP]\nexact this.1\n[GOAL]\nα : Type u_1\ntrans : Lists α → Prop := fun l₁ => ∀ ⦃l₂ l₃ : Lists α⦄, l₁ ~ l₂ → l₂ ~ l₃ → l₁ ~ l₃\n⊢ PProd (∀ (l₁ : Lists α), trans l₁) (∀ (l : Lists' α true) (l' : Lists α), l' ∈ Lists'.toList l → trans l')\n[PROOFSTEP]\napply inductionMut\n[GOAL]\ncase C0\nα : Type u_1\ntrans : Lists α → Prop := fun l₁ => ∀ ⦃l₂ l₃ : Lists α⦄, l₁ ~ l₂ → l₂ ~ l₃ → l₁ ~ l₃\n⊢ ∀ (a : α), trans (atom a)\n[PROOFSTEP]\nintro a l₂ l₃ h₁ h₂\n[GOAL]\ncase C0\nα : Type u_1\ntrans : Lists α → Prop := fun l₁ => ∀ ⦃l₂ l₃ : Lists α⦄, l₁ ~ l₂ → l₂ ~ l₃ → l₁ ~ l₃\na : α\nl₂ l₃ : Lists α\nh₁ : atom a ~ l₂\nh₂ : l₂ ~ l₃\n⊢ atom a ~ l₃\n[PROOFSTEP]\nrwa [← equiv_atom.1 h₁] at h₂ \n[GOAL]\ncase C1\nα : Type u_1\ntrans : Lists α → Prop := fun l₁ => ∀ ⦃l₂ l₃ : Lists α⦄, l₁ ~ l₂ → l₂ ~ l₃ → l₁ ~ l₃\n⊢ ∀ (l : Lists' α true), (∀ (l' : Lists α), l' ∈ Lists'.toList l → trans l') → trans (of' l)\n[PROOFSTEP]\nintro l₁ IH l₂ l₃ h₁ h₂\n[GOAL]\ncase C1\nα : Type u_1\ntrans : Lists α → Prop := fun l₁ => ∀ ⦃l₂ l₃ : Lists α⦄, l₁ ~ l₂ → l₂ ~ l₃ → l₁ ~ l₃\nl₁ : Lists' α true\nIH : ∀ (l' : Lists α), l' ∈ Lists'.toList l₁ → trans l'\nl₂ l₃ : Lists α\nh₁ : of' l₁ ~ l₂\nh₂ : l₂ ~ l₃\n⊢ of' l₁ ~ l₃\n[PROOFSTEP]\nhave h₁' := h₁\n[GOAL]\ncase C1\nα : Type u_1\ntrans : Lists α → Prop := fun l₁ => ∀ ⦃l₂ l₃ : Lists α⦄, l₁ ~ l₂ → l₂ ~ l₃ → l₁ ~ l₃\nl₁ : Lists' α true\nIH : ∀ (l' : Lists α), l' ∈ Lists'.toList l₁ → trans l'\nl₂ l₃ : Lists α\nh₁ : of' l₁ ~ l₂\nh₂ : l₂ ~ l₃\nh₁' : of' l₁ ~ l₂\n⊢ of' l₁ ~ l₃\n[PROOFSTEP]\nhave h₂' := h₂\n[GOAL]\ncase C1\nα : Type u_1\ntrans : Lists α → Prop := fun l₁ => ∀ ⦃l₂ l₃ : Lists α⦄, l₁ ~ l₂ → l₂ ~ l₃ → l₁ ~ l₃\nl₁ : Lists' α true\nIH : ∀ (l' : Lists α), l' ∈ Lists'.toList l₁ → trans l'\nl₂ l₃ : Lists α\nh₁ : of' l₁ ~ l₂\nh₂ : l₂ ~ l₃\nh₁' : of' l₁ ~ l₂\nh₂' : l₂ ~ l₃\n⊢ of' l₁ ~ l₃\n[PROOFSTEP]\ncases' h₁ with _ _ l₂\n[GOAL]\ncase C1.refl\nα : Type u_1\ntrans : Lists α → Prop := fun l₁ => ∀ ⦃l₂ l₃ : Lists α⦄, l₁ ~ l₂ → l₂ ~ l₃ → l₁ ~ l₃\nl₁ : Lists' α true\nIH : ∀ (l' : Lists α), l' ∈ Lists'.toList l₁ → trans l'\nl₃ : Lists α\nh₂ : of' l₁ ~ l₃\nh₁' : of' l₁ ~ of' l₁\nh₂' : of' l₁ ~ l₃\n⊢ of' l₁ ~ l₃\n[PROOFSTEP]\nexact h₂\n[GOAL]\ncase C1.antisymm\nα : Type u_1\ntrans : Lists α → Prop := fun l₁ => ∀ ⦃l₂ l₃ : Lists α⦄, l₁ ~ l₂ → l₂ ~ l₃ → l₁ ~ l₃\nl₁ : Lists' α true\nIH : ∀ (l' : Lists α), l' ∈ Lists'.toList l₁ → trans l'\nl₃ : Lists α\nl₂ : Lists' α true\na✝¹ : Lists'.Subset l₁ l₂\na✝ : Lists'.Subset l₂ l₁\nh₂ : { fst := true, snd := l₂ } ~ l₃\nh₁' : of' l₁ ~ { fst := true, snd := l₂ }\nh₂' : { fst := true, snd := l₂ } ~ l₃\n⊢ of' l₁ ~ l₃\n[PROOFSTEP]\ncases' h₂ with _ _ l₃\n[GOAL]\ncase C1.antisymm.refl\nα : Type u_1\ntrans : Lists α → Prop := fun l₁ => ∀ ⦃l₂ l₃ : Lists α⦄, l₁ ~ l₂ → l₂ ~ l₃ → l₁ ~ l₃\nl₁ : Lists' α true\nIH : ∀ (l' : Lists α), l' ∈ Lists'.toList l₁ → trans l'\nl₂ : Lists' α true\na✝¹ : Lists'.Subset l₁ l₂\na✝ : Lists'.Subset l₂ l₁\nh₁' : of' l₁ ~ { fst := true, snd := l₂ }\nh₂' : { fst := true, snd := l₂ } ~ { fst := true, snd := l₂ }\n⊢ of' l₁ ~ { fst := true, snd := l₂ }\n[PROOFSTEP]\nexact h₁'\n[GOAL]\ncase C1.antisymm.antisymm\nα : Type u_1\ntrans : Lists α → Prop := fun l₁ => ∀ ⦃l₂ l₃ : Lists α⦄, l₁ ~ l₂ → l₂ ~ l₃ → l₁ ~ l₃\nl₁ : Lists' α true\nIH : ∀ (l' : Lists α), l' ∈ Lists'.toList l₁ → trans l'\nl₂ : Lists' α true\na✝³ : Lists'.Subset l₁ l₂\na✝² : Lists'.Subset l₂ l₁\nh₁' : of' l₁ ~ { fst := true, snd := l₂ }\nl₃ : Lists' α true\na✝¹ : Lists'.Subset l₂ l₃\na✝ : Lists'.Subset l₃ l₂\nh₂' : { fst := true, snd := l₂ } ~ { fst := true, snd := l₃ }\n⊢ of' l₁ ~ { fst := true, snd := l₃ }\n[PROOFSTEP]\ncases' Equiv.antisymm_iff.1 h₁' with hl₁ hr₁\n[GOAL]\ncase C1.antisymm.antisymm.intro\nα : Type u_1\ntrans : Lists α → Prop := fun l₁ => ∀ ⦃l₂ l₃ : Lists α⦄, l₁ ~ l₂ → l₂ ~ l₃ → l₁ ~ l₃\nl₁ : Lists' α true\nIH : ∀ (l' : Lists α), l' ∈ Lists'.toList l₁ → trans l'\nl₂ : Lists' α true\na✝³ : Lists'.Subset l₁ l₂\na✝² : Lists'.Subset l₂ l₁\nh₁' : of' l₁ ~ { fst := true, snd := l₂ }\nl₃ : Lists' α true\na✝¹ : Lists'.Subset l₂ l₃\na✝ : Lists'.Subset l₃ l₂\nh₂' : { fst := true, snd := l₂ } ~ { fst := true, snd := l₃ }\nhl₁ : l₁ ⊆ l₂\nhr₁ : l₂ ⊆ l₁\n⊢ of' l₁ ~ { fst := true, snd := l₃ }\n[PROOFSTEP]\ncases' Equiv.antisymm_iff.1 h₂' with hl₂ hr₂\n[GOAL]\ncase C1.antisymm.antisymm.intro.intro\nα : Type u_1\ntrans : Lists α → Prop := fun l₁ => ∀ ⦃l₂ l₃ : Lists α⦄, l₁ ~ l₂ → l₂ ~ l₃ → l₁ ~ l₃\nl₁ : Lists' α true\nIH : ∀ (l' : Lists α), l' ∈ Lists'.toList l₁ → trans l'\nl₂ : Lists' α true\na✝³ : Lists'.Subset l₁ l₂\na✝² : Lists'.Subset l₂ l₁\nh₁' : of' l₁ ~ { fst := true, snd := l₂ }\nl₃ : Lists' α true\na✝¹ : Lists'.Subset l₂ l₃\na✝ : Lists'.Subset l₃ l₂\nh₂' : { fst := true, snd := l₂ } ~ { fst := true, snd := l₃ }\nhl₁ : l₁ ⊆ l₂\nhr₁ : l₂ ⊆ l₁\nhl₂ : l₂ ⊆ l₃\nhr₂ : l₃ ⊆ l₂\n⊢ of' l₁ ~ { fst := true, snd := l₃ }\n[PROOFSTEP]\napply Equiv.antisymm_iff.2\n[GOAL]\ncase C1.antisymm.antisymm.intro.intro\nα : Type u_1\ntrans : Lists α → Prop := fun l₁ => ∀ ⦃l₂ l₃ : Lists α⦄, l₁ ~ l₂ → l₂ ~ l₃ → l₁ ~ l₃\nl₁ : Lists' α true\nIH : ∀ (l' : Lists α), l' ∈ Lists'.toList l₁ → trans l'\nl₂ : Lists' α true\na✝³ : Lists'.Subset l₁ l₂\na✝² : Lists'.Subset l₂ l₁\nh₁' : of' l₁ ~ { fst := true, snd := l₂ }\nl₃ : Lists' α true\na✝¹ : Lists'.Subset l₂ l₃\na✝ : Lists'.Subset l₃ l₂\nh₂' : { fst := true, snd := l₂ } ~ { fst := true, snd := l₃ }\nhl₁ : l₁ ⊆ l₂\nhr₁ : l₂ ⊆ l₁\nhl₂ : l₂ ⊆ l₃\nhr₂ : l₃ ⊆ l₂\n⊢ l₁ ⊆ l₃ ∧ l₃ ⊆ l₁\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase C1.antisymm.antisymm.intro.intro.left\nα : Type u_1\ntrans : Lists α → Prop := fun l₁ => ∀ ⦃l₂ l₃ : Lists α⦄, l₁ ~ l₂ → l₂ ~ l₃ → l₁ ~ l₃\nl₁ : Lists' α true\nIH : ∀ (l' : Lists α), l' ∈ Lists'.toList l₁ → trans l'\nl₂ : Lists' α true\na✝³ : Lists'.Subset l₁ l₂\na✝² : Lists'.Subset l₂ l₁\nh₁' : of' l₁ ~ { fst := true, snd := l₂ }\nl₃ : Lists' α true\na✝¹ : Lists'.Subset l₂ l₃\na✝ : Lists'.Subset l₃ l₂\nh₂' : { fst := true, snd := l₂ } ~ { fst := true, snd := l₃ }\nhl₁ : l₁ ⊆ l₂\nhr₁ : l₂ ⊆ l₁\nhl₂ : l₂ ⊆ l₃\nhr₂ : l₃ ⊆ l₂\n⊢ l₁ ⊆ l₃\n[PROOFSTEP]\napply Lists'.subset_def.2\n[GOAL]\ncase C1.antisymm.antisymm.intro.intro.right\nα : Type u_1\ntrans : Lists α → Prop := fun l₁ => ∀ ⦃l₂ l₃ : Lists α⦄, l₁ ~ l₂ → l₂ ~ l₃ → l₁ ~ l₃\nl₁ : Lists' α true\nIH : ∀ (l' : Lists α), l' ∈ Lists'.toList l₁ → trans l'\nl₂ : Lists' α true\na✝³ : Lists'.Subset l₁ l₂\na✝² : Lists'.Subset l₂ l₁\nh₁' : of' l₁ ~ { fst := true, snd := l₂ }\nl₃ : Lists' α true\na✝¹ : Lists'.Subset l₂ l₃\na✝ : Lists'.Subset l₃ l₂\nh₂' : { fst := true, snd := l₂ } ~ { fst := true, snd := l₃ }\nhl₁ : l₁ ⊆ l₂\nhr₁ : l₂ ⊆ l₁\nhl₂ : l₂ ⊆ l₃\nhr₂ : l₃ ⊆ l₂\n⊢ l₃ ⊆ l₁\n[PROOFSTEP]\napply Lists'.subset_def.2\n[GOAL]\ncase C1.antisymm.antisymm.intro.intro.left\nα : Type u_1\ntrans : Lists α → Prop := fun l₁ => ∀ ⦃l₂ l₃ : Lists α⦄, l₁ ~ l₂ → l₂ ~ l₃ → l₁ ~ l₃\nl₁ : Lists' α true\nIH : ∀ (l' : Lists α), l' ∈ Lists'.toList l₁ → trans l'\nl₂ : Lists' α true\na✝³ : Lists'.Subset l₁ l₂\na✝² : Lists'.Subset l₂ l₁\nh₁' : of' l₁ ~ { fst := true, snd := l₂ }\nl₃ : Lists' α true\na✝¹ : Lists'.Subset l₂ l₃\na✝ : Lists'.Subset l₃ l₂\nh₂' : { fst := true, snd := l₂ } ~ { fst := true, snd := l₃ }\nhl₁ : l₁ ⊆ l₂\nhr₁ : l₂ ⊆ l₁\nhl₂ : l₂ ⊆ l₃\nhr₂ : l₃ ⊆ l₂\n⊢ ∀ (a : Lists α), a ∈ Lists'.toList l₁ → a ∈ l₃\n[PROOFSTEP]\nintro a₁ m₁\n[GOAL]\ncase C1.antisymm.antisymm.intro.intro.left\nα : Type u_1\ntrans : Lists α → Prop := fun l₁ => ∀ ⦃l₂ l₃ : Lists α⦄, l₁ ~ l₂ → l₂ ~ l₃ → l₁ ~ l₃\nl₁ : Lists' α true\nIH : ∀ (l' : Lists α), l' ∈ Lists'.toList l₁ → trans l'\nl₂ : Lists' α true\na✝³ : Lists'.Subset l₁ l₂\na✝² : Lists'.Subset l₂ l₁\nh₁' : of' l₁ ~ { fst := true, snd := l₂ }\nl₃ : Lists' α true\na✝¹ : Lists'.Subset l₂ l₃\na✝ : Lists'.Subset l₃ l₂\nh₂' : { fst := true, snd := l₂ } ~ { fst := true, snd := l₃ }\nhl₁ : l₁ ⊆ l₂\nhr₁ : l₂ ⊆ l₁\nhl₂ : l₂ ⊆ l₃\nhr₂ : l₃ ⊆ l₂\na₁ : Lists α\nm₁ : a₁ ∈ Lists'.toList l₁\n⊢ a₁ ∈ l₃\n[PROOFSTEP]\nrcases Lists'.mem_of_subset' hl₁ m₁ with ⟨a₂, m₂, e₁₂⟩\n[GOAL]\ncase C1.antisymm.antisymm.intro.intro.left.intro.intro\nα : Type u_1\ntrans : Lists α → Prop := fun l₁ => ∀ ⦃l₂ l₃ : Lists α⦄, l₁ ~ l₂ → l₂ ~ l₃ → l₁ ~ l₃\nl₁ : Lists' α true\nIH : ∀ (l' : Lists α), l' ∈ Lists'.toList l₁ → trans l'\nl₂ : Lists' α true\na✝³ : Lists'.Subset l₁ l₂\na✝² : Lists'.Subset l₂ l₁\nh₁' : of' l₁ ~ { fst := true, snd := l₂ }\nl₃ : Lists' α true\na✝¹ : Lists'.Subset l₂ l₃\na✝ : Lists'.Subset l₃ l₂\nh₂' : { fst := true, snd := l₂ } ~ { fst := true, snd := l₃ }\nhl₁ : l₁ ⊆ l₂\nhr₁ : l₂ ⊆ l₁\nhl₂ : l₂ ⊆ l₃\nhr₂ : l₃ ⊆ l₂\na₁ : Lists α\nm₁ : a₁ ∈ Lists'.toList l₁\na₂ : Lists α\nm₂ : a₂ ∈ Lists'.toList l₂\ne₁₂ : a₁ ~ a₂\n⊢ a₁ ∈ l₃\n[PROOFSTEP]\nrcases Lists'.mem_of_subset' hl₂ m₂ with ⟨a₃, m₃, e₂₃⟩\n[GOAL]\ncase C1.antisymm.antisymm.intro.intro.left.intro.intro.intro.intro\nα : Type u_1\ntrans : Lists α → Prop := fun l₁ => ∀ ⦃l₂ l₃ : Lists α⦄, l₁ ~ l₂ → l₂ ~ l₃ → l₁ ~ l₃\nl₁ : Lists' α true\nIH : ∀ (l' : Lists α), l' ∈ Lists'.toList l₁ → trans l'\nl₂ : Lists' α true\na✝³ : Lists'.Subset l₁ l₂\na✝² : Lists'.Subset l₂ l₁\nh₁' : of' l₁ ~ { fst := true, snd := l₂ }\nl₃ : Lists' α true\na✝¹ : Lists'.Subset l₂ l₃\na✝ : Lists'.Subset l₃ l₂\nh₂' : { fst := true, snd := l₂ } ~ { fst := true, snd := l₃ }\nhl₁ : l₁ ⊆ l₂\nhr₁ : l₂ ⊆ l₁\nhl₂ : l₂ ⊆ l₃\nhr₂ : l₃ ⊆ l₂\na₁ : Lists α\nm₁ : a₁ ∈ Lists'.toList l₁\na₂ : Lists α\nm₂ : a₂ ∈ Lists'.toList l₂\ne₁₂ : a₁ ~ a₂\na₃ : Lists α\nm₃ : a₃ ∈ Lists'.toList l₃\ne₂₃ : a₂ ~ a₃\n⊢ a₁ ∈ l₃\n[PROOFSTEP]\nexact ⟨a₃, m₃, IH _ m₁ e₁₂ e₂₃⟩\n[GOAL]\ncase C1.antisymm.antisymm.intro.intro.right\nα : Type u_1\ntrans : Lists α → Prop := fun l₁ => ∀ ⦃l₂ l₃ : Lists α⦄, l₁ ~ l₂ → l₂ ~ l₃ → l₁ ~ l₃\nl₁ : Lists' α true\nIH : ∀ (l' : Lists α), l' ∈ Lists'.toList l₁ → trans l'\nl₂ : Lists' α true\na✝³ : Lists'.Subset l₁ l₂\na✝² : Lists'.Subset l₂ l₁\nh₁' : of' l₁ ~ { fst := true, snd := l₂ }\nl₃ : Lists' α true\na✝¹ : Lists'.Subset l₂ l₃\na✝ : Lists'.Subset l₃ l₂\nh₂' : { fst := true, snd := l₂ } ~ { fst := true, snd := l₃ }\nhl₁ : l₁ ⊆ l₂\nhr₁ : l₂ ⊆ l₁\nhl₂ : l₂ ⊆ l₃\nhr₂ : l₃ ⊆ l₂\n⊢ ∀ (a : Lists α), a ∈ Lists'.toList l₃ → a ∈ l₁\n[PROOFSTEP]\nintro a₃ m₃\n[GOAL]\ncase C1.antisymm.antisymm.intro.intro.right\nα : Type u_1\ntrans : Lists α → Prop := fun l₁ => ∀ ⦃l₂ l₃ : Lists α⦄, l₁ ~ l₂ → l₂ ~ l₃ → l₁ ~ l₃\nl₁ : Lists' α true\nIH : ∀ (l' : Lists α), l' ∈ Lists'.toList l₁ → trans l'\nl₂ : Lists' α true\na✝³ : Lists'.Subset l₁ l₂\na✝² : Lists'.Subset l₂ l₁\nh₁' : of' l₁ ~ { fst := true, snd := l₂ }\nl₃ : Lists' α true\na✝¹ : Lists'.Subset l₂ l₃\na✝ : Lists'.Subset l₃ l₂\nh₂' : { fst := true, snd := l₂ } ~ { fst := true, snd := l₃ }\nhl₁ : l₁ ⊆ l₂\nhr₁ : l₂ ⊆ l₁\nhl₂ : l₂ ⊆ l₃\nhr₂ : l₃ ⊆ l₂\na₃ : Lists α\nm₃ : a₃ ∈ Lists'.toList l₃\n⊢ a₃ ∈ l₁\n[PROOFSTEP]\nrcases Lists'.mem_of_subset' hr₂ m₃ with ⟨a₂, m₂, e₃₂⟩\n[GOAL]\ncase C1.antisymm.antisymm.intro.intro.right.intro.intro\nα : Type u_1\ntrans : Lists α → Prop := fun l₁ => ∀ ⦃l₂ l₃ : Lists α⦄, l₁ ~ l₂ → l₂ ~ l₃ → l₁ ~ l₃\nl₁ : Lists' α true\nIH : ∀ (l' : Lists α), l' ∈ Lists'.toList l₁ → trans l'\nl₂ : Lists' α true\na✝³ : Lists'.Subset l₁ l₂\na✝² : Lists'.Subset l₂ l₁\nh₁' : of' l₁ ~ { fst := true, snd := l₂ }\nl₃ : Lists' α true\na✝¹ : Lists'.Subset l₂ l₃\na✝ : Lists'.Subset l₃ l₂\nh₂' : { fst := true, snd := l₂ } ~ { fst := true, snd := l₃ }\nhl₁ : l₁ ⊆ l₂\nhr₁ : l₂ ⊆ l₁\nhl₂ : l₂ ⊆ l₃\nhr₂ : l₃ ⊆ l₂\na₃ : Lists α\nm₃ : a₃ ∈ Lists'.toList l₃\na₂ : Lists α\nm₂ : a₂ ∈ Lists'.toList l₂\ne₃₂ : a₃ ~ a₂\n⊢ a₃ ∈ l₁\n[PROOFSTEP]\nrcases Lists'.mem_of_subset' hr₁ m₂ with ⟨a₁, m₁, e₂₁⟩\n[GOAL]\ncase C1.antisymm.antisymm.intro.intro.right.intro.intro.intro.intro\nα : Type u_1\ntrans : Lists α → Prop := fun l₁ => ∀ ⦃l₂ l₃ : Lists α⦄, l₁ ~ l₂ → l₂ ~ l₃ → l₁ ~ l₃\nl₁ : Lists' α true\nIH : ∀ (l' : Lists α), l' ∈ Lists'.toList l₁ → trans l'\nl₂ : Lists' α true\na✝³ : Lists'.Subset l₁ l₂\na✝² : Lists'.Subset l₂ l₁\nh₁' : of' l₁ ~ { fst := true, snd := l₂ }\nl₃ : Lists' α true\na✝¹ : Lists'.Subset l₂ l₃\na✝ : Lists'.Subset l₃ l₂\nh₂' : { fst := true, snd := l₂ } ~ { fst := true, snd := l₃ }\nhl₁ : l₁ ⊆ l₂\nhr₁ : l₂ ⊆ l₁\nhl₂ : l₂ ⊆ l₃\nhr₂ : l₃ ⊆ l₂\na₃ : Lists α\nm₃ : a₃ ∈ Lists'.toList l₃\na₂ : Lists α\nm₂ : a₂ ∈ Lists'.toList l₂\ne₃₂ : a₃ ~ a₂\na₁ : Lists α\nm₁ : a₁ ∈ Lists'.toList l₁\ne₂₁ : a₂ ~ a₁\n⊢ a₃ ∈ l₁\n[PROOFSTEP]\nexact ⟨a₁, m₁, (IH _ m₁ e₂₁.symm e₃₂.symm).symm⟩\n[GOAL]\ncase D0\nα : Type u_1\ntrans : Lists α → Prop := fun l₁ => ∀ ⦃l₂ l₃ : Lists α⦄, l₁ ~ l₂ → l₂ ~ l₃ → l₁ ~ l₃\n⊢ ∀ (l' : Lists α), l' ∈ Lists'.toList Lists'.nil → trans l'\n[PROOFSTEP]\nrintro _ ⟨⟩\n[GOAL]\ncase D1\nα : Type u_1\ntrans : Lists α → Prop := fun l₁ => ∀ ⦃l₂ l₃ : Lists α⦄, l₁ ~ l₂ → l₂ ~ l₃ → l₁ ~ l₃\n⊢ ∀ (a : Lists α) (l : Lists' α true),\n trans a →\n (∀ (l' : Lists α), l' ∈ Lists'.toList l → trans l') →\n ∀ (l' : Lists α), l' ∈ Lists'.toList (Lists'.cons a l) → trans l'\n[PROOFSTEP]\nintro a l IH₁ IH\n[GOAL]\ncase D1\nα : Type u_1\ntrans : Lists α → Prop := fun l₁ => ∀ ⦃l₂ l₃ : Lists α⦄, l₁ ~ l₂ → l₂ ~ l₃ → l₁ ~ l₃\na : Lists α\nl : Lists' α true\nIH₁ : trans a\nIH : ∀ (l' : Lists α), l' ∈ Lists'.toList l → trans l'\n⊢ ∀ (l' : Lists α), l' ∈ Lists'.toList (Lists'.cons a l) → trans l'\n[PROOFSTEP]\nsimp only [Lists'.toList, Sigma.eta, List.find?, List.mem_cons, forall_eq_or_imp]\n[GOAL]\ncase D1\nα : Type u_1\ntrans : Lists α → Prop := fun l₁ => ∀ ⦃l₂ l₃ : Lists α⦄, l₁ ~ l₂ → l₂ ~ l₃ → l₁ ~ l₃\na : Lists α\nl : Lists' α true\nIH₁ : trans a\nIH : ∀ (l' : Lists α), l' ∈ Lists'.toList l → trans l'\n⊢ (∀ ⦃l₂ l₃ : Lists α⦄, a ~ l₂ → l₂ ~ l₃ → a ~ l₃) ∧\n ∀ (a : Lists α), a ∈ Lists'.toList l → ∀ ⦃l₂ l₃ : Lists α⦄, a ~ l₂ → l₂ ~ l₃ → a ~ l₃\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase D1.left\nα : Type u_1\ntrans : Lists α → Prop := fun l₁ => ∀ ⦃l₂ l₃ : Lists α⦄, l₁ ~ l₂ → l₂ ~ l₃ → l₁ ~ l₃\na : Lists α\nl : Lists' α true\nIH₁ : trans a\nIH : ∀ (l' : Lists α), l' ∈ Lists'.toList l → trans l'\n⊢ ∀ ⦃l₂ l₃ : Lists α⦄, a ~ l₂ → l₂ ~ l₃ → a ~ l₃\n[PROOFSTEP]\nintros l₂ l₃ h₁ h₂\n[GOAL]\ncase D1.left\nα : Type u_1\ntrans : Lists α → Prop := fun l₁ => ∀ ⦃l₂ l₃ : Lists α⦄, l₁ ~ l₂ → l₂ ~ l₃ → l₁ ~ l₃\na : Lists α\nl : Lists' α true\nIH₁ : trans a\nIH : ∀ (l' : Lists α), l' ∈ Lists'.toList l → trans l'\nl₂ l₃ : Lists α\nh₁ : a ~ l₂\nh₂ : l₂ ~ l₃\n⊢ a ~ l₃\n[PROOFSTEP]\nexact IH₁ h₁ h₂\n[GOAL]\ncase D1.right\nα : Type u_1\ntrans : Lists α → Prop := fun l₁ => ∀ ⦃l₂ l₃ : Lists α⦄, l₁ ~ l₂ → l₂ ~ l₃ → l₁ ~ l₃\na : Lists α\nl : Lists' α true\nIH₁ : trans a\nIH : ∀ (l' : Lists α), l' ∈ Lists'.toList l → trans l'\n⊢ ∀ (a : Lists α), a ∈ Lists'.toList l → ∀ ⦃l₂ l₃ : Lists α⦄, a ~ l₂ → l₂ ~ l₃ → a ~ l₃\n[PROOFSTEP]\nintros a h₁ l₂ l₃ h₂ h₃\n[GOAL]\ncase D1.right\nα : Type u_1\ntrans : Lists α → Prop := fun l₁ => ∀ ⦃l₂ l₃ : Lists α⦄, l₁ ~ l₂ → l₂ ~ l₃ → l₁ ~ l₃\na✝ : Lists α\nl : Lists' α true\nIH₁ : trans a✝\nIH : ∀ (l' : Lists α), l' ∈ Lists'.toList l → trans l'\na : Lists α\nh₁ : a ∈ Lists'.toList l\nl₂ l₃ : Lists α\nh₂ : a ~ l₂\nh₃ : l₂ ~ l₃\n⊢ a ~ l₃\n[PROOFSTEP]\nexact IH _ h₁ h₂ h₃\n[GOAL]\nα : Type u_1\nb : Bool\nl : Lists' α b\n⊢ 0 < sizeOf l\n[PROOFSTEP]\ncases l\n[GOAL]\ncase atom\nα : Type u_1\na✝ : α\n⊢ 0 < sizeOf (Lists'.atom a✝)\n[PROOFSTEP]\nsimp only [Lists'.atom.sizeOf_spec, Lists'.nil.sizeOf_spec, Lists'.cons'.sizeOf_spec, true_or, add_pos_iff]\n[GOAL]\ncase nil\nα : Type u_1\n⊢ 0 < sizeOf Lists'.nil\n[PROOFSTEP]\nsimp only [Lists'.atom.sizeOf_spec, Lists'.nil.sizeOf_spec, Lists'.cons'.sizeOf_spec, true_or, add_pos_iff]\n[GOAL]\ncase cons'\nα : Type u_1\nb✝ : Bool\na✝¹ : Lists' α b✝\na✝ : Lists' α true\n⊢ 0 < sizeOf (Lists'.cons' a✝¹ a✝)\n[PROOFSTEP]\nsimp only [Lists'.atom.sizeOf_spec, Lists'.nil.sizeOf_spec, Lists'.cons'.sizeOf_spec, true_or, add_pos_iff]\n[GOAL]\nα : Type u_1\nb : Bool\na : Lists' α b\nl : Lists' α true\n⊢ sizeOf { fst := b, snd := a } < sizeOf (Lists'.cons' a l)\n[PROOFSTEP]\nsimp only [Sigma.mk.sizeOf_spec, Lists'.cons'.sizeOf_spec, lt_add_iff_pos_right]\n[GOAL]\nα : Type u_1\nb : Bool\na : Lists' α b\nl : Lists' α true\n⊢ 0 < sizeOf l\n[PROOFSTEP]\napply sizeof_pos\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\nl₁ l₂ : Lists' α false\n⊢ { fst := false, snd := l₁ } ~ { fst := false, snd := l₂ } ↔ l₁ = l₂\n[PROOFSTEP]\ncases l₁\n[GOAL]\ncase atom\nα : Type u_1\ninst✝ : DecidableEq α\nl₂ : Lists' α false\na✝ : α\n⊢ { fst := false, snd := Lists'.atom a✝ } ~ { fst := false, snd := l₂ } ↔ Lists'.atom a✝ = l₂\n[PROOFSTEP]\napply equiv_atom.trans\n[GOAL]\ncase atom\nα : Type u_1\ninst✝ : DecidableEq α\nl₂ : Lists' α false\na✝ : α\n⊢ atom a✝ = { fst := false, snd := l₂ } ↔ Lists'.atom a✝ = l₂\n[PROOFSTEP]\nsimp [atom]\n[GOAL]\ncase atom\nα : Type u_1\ninst✝ : DecidableEq α\nl₂ : Lists' α false\na✝ : α\n⊢ { fst := false, snd := Lists'.atom a✝ } = { fst := false, snd := l₂ } ↔ Lists'.atom a✝ = l₂\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase atom.mp\nα : Type u_1\ninst✝ : DecidableEq α\nl₂ : Lists' α false\na✝ : α\n⊢ { fst := false, snd := Lists'.atom a✝ } = { fst := false, snd := l₂ } → Lists'.atom a✝ = l₂\n[PROOFSTEP]\nrintro ⟨rfl⟩\n[GOAL]\ncase atom.mp.refl\nα : Type u_1\ninst✝ : DecidableEq α\na✝ : α\n⊢ Lists'.atom a✝ = Lists'.atom a✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase atom.mpr\nα : Type u_1\ninst✝ : DecidableEq α\nl₂ : Lists' α false\na✝ : α\n⊢ Lists'.atom a✝ = l₂ → { fst := false, snd := Lists'.atom a✝ } = { fst := false, snd := l₂ }\n[PROOFSTEP]\nrintro ⟨rfl⟩\n[GOAL]\ncase atom.mpr.refl\nα : Type u_1\ninst✝ : DecidableEq α\na✝ : α\n⊢ { fst := false, snd := Lists'.atom a✝ } = { fst := false, snd := Lists'.atom a✝ }\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\nl₁ : Lists' α false\nl₂ : Lists' α true\n⊢ ¬{ fst := false, snd := l₁ } ~ { fst := true, snd := l₂ }\n[PROOFSTEP]\nrintro ⟨⟩\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\nl₁ : Lists' α true\nl₂ : Lists' α false\n⊢ ¬{ fst := true, snd := l₁ } ~ { fst := false, snd := l₂ }\n[PROOFSTEP]\nrintro ⟨⟩\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\nl₁ l₂ : Lists' α true\n⊢ Decidable ({ fst := true, snd := l₁ } ~ { fst := true, snd := l₂ })\n[PROOFSTEP]\nhaveI : Decidable (l₁ ⊆ l₂) :=\n have :\n SizeOf.sizeOf l₁ + SizeOf.sizeOf l₂ < SizeOf.sizeOf (⟨true, l₁⟩ : Lists α) + SizeOf.sizeOf (⟨true, l₂⟩ : Lists α) :=\n by decreasing_tactic\n Subset.decidable l₁ l₂\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\nl₁ l₂ : Lists' α true\n⊢ sizeOf l₁ + sizeOf l₂ < sizeOf { fst := true, snd := l₁ } + sizeOf { fst := true, snd := l₂ }\n[PROOFSTEP]\ndecreasing_tactic\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\nl₁ l₂ : Lists' α true\nthis : Decidable (l₁ ⊆ l₂)\n⊢ Decidable ({ fst := true, snd := l₁ } ~ { fst := true, snd := l₂ })\n[PROOFSTEP]\nhaveI : Decidable (l₂ ⊆ l₁) :=\n have :\n SizeOf.sizeOf l₂ + SizeOf.sizeOf l₁ < SizeOf.sizeOf (⟨true, l₁⟩ : Lists α) + SizeOf.sizeOf (⟨true, l₂⟩ : Lists α) :=\n by decreasing_tactic\n Subset.decidable l₂ l₁\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\nl₁ l₂ : Lists' α true\nthis : Decidable (l₁ ⊆ l₂)\n⊢ sizeOf l₂ + sizeOf l₁ < sizeOf { fst := true, snd := l₁ } + sizeOf { fst := true, snd := l₂ }\n[PROOFSTEP]\ndecreasing_tactic\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\nl₁ l₂ : Lists' α true\nthis✝ : Decidable (l₁ ⊆ l₂)\nthis : Decidable (l₂ ⊆ l₁)\n⊢ Decidable ({ fst := true, snd := l₁ } ~ { fst := true, snd := l₂ })\n[PROOFSTEP]\nexact decidable_of_iff' _ Equiv.antisymm_iff\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\nb : Bool\na : Lists' α b\nl₁ l₂ : Lists' α true\n⊢ Decidable (Lists'.cons' a l₁ ⊆ l₂)\n[PROOFSTEP]\nhaveI :=\n have : sizeOf (⟨b, a⟩ : Lists α) < 1 + 1 + sizeOf a + sizeOf l₁ := by simp [sizeof_pos]\n mem.decidable ⟨b, a⟩ l₂\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\nb : Bool\na : Lists' α b\nl₁ l₂ : Lists' α true\n⊢ sizeOf { fst := b, snd := a } < 1 + 1 + sizeOf a + sizeOf l₁\n[PROOFSTEP]\nsimp [sizeof_pos]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\nb : Bool\na : Lists' α b\nl₁ l₂ : Lists' α true\nthis : Decidable ({ fst := b, snd := a } ∈ l₂)\n⊢ Decidable (Lists'.cons' a l₁ ⊆ l₂)\n[PROOFSTEP]\nhaveI :=\n have : SizeOf.sizeOf l₁ + SizeOf.sizeOf l₂ < SizeOf.sizeOf (Lists'.cons' a l₁) + SizeOf.sizeOf l₂ := by\n decreasing_tactic\n Subset.decidable l₁ l₂\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\nb : Bool\na : Lists' α b\nl₁ l₂ : Lists' α true\nthis : Decidable ({ fst := b, snd := a } ∈ l₂)\n⊢ sizeOf l₁ + sizeOf l₂ < sizeOf (Lists'.cons' a l₁) + sizeOf l₂\n[PROOFSTEP]\ndecreasing_tactic\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\nb : Bool\na : Lists' α b\nl₁ l₂ : Lists' α true\nthis✝ : Decidable ({ fst := b, snd := a } ∈ l₂)\nthis : Decidable (l₁ ⊆ l₂)\n⊢ Decidable (Lists'.cons' a l₁ ⊆ l₂)\n[PROOFSTEP]\nexact decidable_of_iff' _ (@Lists'.cons_subset _ ⟨_, _⟩ _ _)\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\na : Lists α\n⊢ ¬a ∈ Lists'.nil\n[PROOFSTEP]\nrintro ⟨_, ⟨⟩, _⟩\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\na : Lists α\nb✝ : Bool\nb : Lists' α b✝\nl₂ : Lists' α true\n⊢ Decidable (a ∈ Lists'.cons' b l₂)\n[PROOFSTEP]\nhaveI :=\n have : sizeOf (⟨_, b⟩ : Lists α) < 1 + 1 + sizeOf b + sizeOf l₂ := by simp [sizeof_pos]\n Equiv.decidable a ⟨_, b⟩\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\na : Lists α\nb✝ : Bool\nb : Lists' α b✝\nl₂ : Lists' α true\n⊢ sizeOf { fst := b✝, snd := b } < 1 + 1 + sizeOf b + sizeOf l₂\n[PROOFSTEP]\nsimp [sizeof_pos]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\na : Lists α\nb✝ : Bool\nb : Lists' α b✝\nl₂ : Lists' α true\nthis : Decidable (a ~ { fst := b✝, snd := b })\n⊢ Decidable (a ∈ Lists'.cons' b l₂)\n[PROOFSTEP]\nhaveI :=\n have : SizeOf.sizeOf a + SizeOf.sizeOf l₂ < SizeOf.sizeOf a + SizeOf.sizeOf (Lists'.cons' b l₂) := by\n decreasing_tactic\n mem.decidable a l₂\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\na : Lists α\nb✝ : Bool\nb : Lists' α b✝\nl₂ : Lists' α true\nthis : Decidable (a ~ { fst := b✝, snd := b })\n⊢ sizeOf a + sizeOf l₂ < sizeOf a + sizeOf (Lists'.cons' b l₂)\n[PROOFSTEP]\ndecreasing_tactic\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\na : Lists α\nb✝ : Bool\nb : Lists' α b✝\nl₂ : Lists' α true\nthis✝ : Decidable (a ~ { fst := b✝, snd := b })\nthis : Decidable (a ∈ l₂)\n⊢ Decidable (a ∈ Lists'.cons' b l₂)\n[PROOFSTEP]\nrefine' decidable_of_iff' (a ~ ⟨_, b⟩ ∨ a ∈ l₂) _\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\na : Lists α\nb✝ : Bool\nb : Lists' α b✝\nl₂ : Lists' α true\nthis✝ : Decidable (a ~ { fst := b✝, snd := b })\nthis : Decidable (a ∈ l₂)\n⊢ a ∈ Lists'.cons' b l₂ ↔ a ~ { fst := b✝, snd := b } ∨ a ∈ l₂\n[PROOFSTEP]\nrw [← Lists'.mem_cons]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\na : Lists α\nb✝ : Bool\nb : Lists' α b✝\nl₂ : Lists' α true\nthis✝ : Decidable (a ~ { fst := b✝, snd := b })\nthis : Decidable (a ∈ l₂)\n⊢ a ∈ Lists'.cons' b l₂ ↔ a ∈ Lists'.cons { fst := b✝, snd := b } l₂\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n⊢ DecidableEq (Finsets α)\n[PROOFSTEP]\nunfold Finsets\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n⊢ DecidableEq (Quotient Lists.instSetoidLists)\n[PROOFSTEP]\nexact (Quotient.decidableEq (d := fun _ _ => Lists.Equiv.decidable _ _))\n", "meta": {"mathlib_filename": "Mathlib.SetTheory.Lists", "llama_tokens": 20459, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. NO\n2. NO", "lm_q1_score": 0.34864513533394575, "lm_q2_score": 0.014957087471327428, "lm_q1q2_score": 0.005214715785642615}}